<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/mlir/lib/Tools/PDLL/Parser/Lexer.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>mlir/LogicalResult: move into llvm (#97309)</title>
<updated>2024-07-02T09:42:33+00:00</updated>
<author>
<name>Ramkumar Ramachandra</name>
<email>ramkumar.ramachandra@codasip.com</email>
</author>
<published>2024-07-02T09:42:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=db791b278a414fb6df1acc1799adcf11d8fb9169'/>
<id>db791b278a414fb6df1acc1799adcf11d8fb9169</id>
<content type='text'>
This patch is part of a project to move the Presburger library into
LLVM.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch is part of a project to move the Presburger library into
LLVM.</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][PDL] Add PDLL support for negated native constraints</title>
<updated>2023-09-01T23:12:16+00:00</updated>
<author>
<name>Mogball</name>
<email>jeff@modular.com</email>
</author>
<published>2023-09-01T23:12:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=930916c7f3622870b40138dafcc5f94740404e8c'/>
<id>930916c7f3622870b40138dafcc5f94740404e8c</id>
<content type='text'>
This commit enables the expression of negated native constraints in PDLL:

If a constraint is prefixed with "not" it is parsed as a negated constraint and hence the attribute `isNegated` of the emitted `pdl.apply_native_constraint` operation is set to `true`.
In first instance this is only supported for the calling of external native C++ constraints and generation of PDL patterns.

Previously, negating a native constraint would have  been handled by creating an additional native call, e.g.
```PDLL
Constraint checkA(input: Attr);
Constarint checkNotA(input: Attr);
```
or by including an explicit additional operand for negation, e.g.
`Constraint checkA(input: Attr, negated: Attr);`

With this a constraint can simply be negated by prefixing it with `not`. e.g.
```PDLL
Constraint simpleConstraint(op: Op);

Pattern example {
    let inputOp = op&lt;test.bar&gt;() -&gt;(type: Type);
    let root = op&lt;test.foo&gt;(inputOp.0) -&gt; ();
    not simpleConstraint(inputOp);
    simpleConstraint(root);
    erase root;
}
```

Depends on [[ https://reviews.llvm.org/D153871 | D153871 ]]

Reviewed By: Mogball

Differential Revision: https://reviews.llvm.org/D153959
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit enables the expression of negated native constraints in PDLL:

If a constraint is prefixed with "not" it is parsed as a negated constraint and hence the attribute `isNegated` of the emitted `pdl.apply_native_constraint` operation is set to `true`.
In first instance this is only supported for the calling of external native C++ constraints and generation of PDL patterns.

Previously, negating a native constraint would have  been handled by creating an additional native call, e.g.
```PDLL
Constraint checkA(input: Attr);
Constarint checkNotA(input: Attr);
```
or by including an explicit additional operand for negation, e.g.
`Constraint checkA(input: Attr, negated: Attr);`

With this a constraint can simply be negated by prefixing it with `not`. e.g.
```PDLL
Constraint simpleConstraint(op: Op);

Pattern example {
    let inputOp = op&lt;test.bar&gt;() -&gt;(type: Type);
    let root = op&lt;test.foo&gt;(inputOp.0) -&gt; ();
    not simpleConstraint(inputOp);
    simpleConstraint(root);
    erase root;
}
```

Depends on [[ https://reviews.llvm.org/D153871 | D153871 ]]

Reviewed By: Mogball

Differential Revision: https://reviews.llvm.org/D153959
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] LLVM_FALLTHROUGH =&gt; [[fallthrough]]. NFC</title>
<updated>2022-08-09T03:56:05+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2022-08-09T03:56:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fc63c0542c8d6e5be07e059d03a73ae77f5155aa'/>
<id>fc63c0542c8d6e5be07e059d03a73ae77f5155aa</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] (NFC) run clang-format on all files</title>
<updated>2022-07-14T20:32:13+00:00</updated>
<author>
<name>Jeff Niu</name>
<email>jeff@modular.com</email>
</author>
<published>2022-07-14T20:31:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b7f93c28096fc8503e4d2d80c43ee2c0ccce480f'/>
<id>b7f93c28096fc8503e4d2d80c43ee2c0ccce480f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir:PDLL] Fix error handling of eof within a string literal</title>
<updated>2022-04-28T19:58:00+00:00</updated>
<author>
<name>River Riddle</name>
<email>riddleriver@gmail.com</email>
</author>
<published>2022-04-26T20:27:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ebb1e900d3b3edcac0e96f23cd15509f1fbe77d9'/>
<id>ebb1e900d3b3edcac0e96f23cd15509f1fbe77d9</id>
<content type='text'>
We currently aren't handling this properly, and in the case
of a string block just crash. This commit adds proper error handling
and detection for eof.

Differential Revision: https://reviews.llvm.org/D124585</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We currently aren't handling this properly, and in the case
of a string block just crash. This commit adds proper error handling
and detection for eof.

Differential Revision: https://reviews.llvm.org/D124585</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][PDLL-LSP] Add code completion for include file paths</title>
<updated>2022-04-27T01:33:17+00:00</updated>
<author>
<name>River Riddle</name>
<email>riddleriver@gmail.com</email>
</author>
<published>2022-04-20T18:58:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=41d2c6df5cce4a4d65ff2956be762a50600ebfd9'/>
<id>41d2c6df5cce4a4d65ff2956be762a50600ebfd9</id>
<content type='text'>
This allows for providing completion results for include directive
file paths by searching the set of include directories for the current
file.

Differential Revision: https://reviews.llvm.org/D124112
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows for providing completion results for include directive
file paths by searching the set of include directories for the current
file.

Differential Revision: https://reviews.llvm.org/D124112
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][PDLL] Add document link and hover support to mlir-pdll-lsp-server</title>
<updated>2022-04-27T01:33:17+00:00</updated>
<author>
<name>River Riddle</name>
<email>riddleriver@gmail.com</email>
</author>
<published>2022-04-20T09:14:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=09af7fefc8dce7648fe45fd9ffce6795b56400f2'/>
<id>09af7fefc8dce7648fe45fd9ffce6795b56400f2</id>
<content type='text'>
This allows for navigating to included files on click, and also provides hover
information about the include file (similarly to clangd).

Differential Revision: https://reviews.llvm.org/D124077
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows for navigating to included files on click, and also provides hover
information about the include file (similarly to clangd).

Differential Revision: https://reviews.llvm.org/D124077
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][PDLL] Add code completion to the PDLL language server</title>
<updated>2022-03-19T20:28:24+00:00</updated>
<author>
<name>River Riddle</name>
<email>riddleriver@gmail.com</email>
</author>
<published>2022-03-11T08:32:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=008de486f706ef25a66d4384c2c3af1ed86e680e'/>
<id>008de486f706ef25a66d4384c2c3af1ed86e680e</id>
<content type='text'>
This commit adds code completion support to the language server,
and initially supports providing completions for: Member access,
attributes/constraint/dialect/operation names, and pattern metadata.

Differential Revision: https://reviews.llvm.org/D121544
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit adds code completion support to the language server,
and initially supports providing completions for: Member access,
attributes/constraint/dialect/operation names, and pattern metadata.

Differential Revision: https://reviews.llvm.org/D121544
</pre>
</div>
</content>
</entry>
<entry>
<title>[PDLL] Add support for user defined constraint and rewrite functions</title>
<updated>2022-02-10T20:48:59+00:00</updated>
<author>
<name>River Riddle</name>
<email>riddleriver@gmail.com</email>
</author>
<published>2022-01-02T03:41:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=faf42264e5401a1dfca95b701e5c2bf951d7f8a7'/>
<id>faf42264e5401a1dfca95b701e5c2bf951d7f8a7</id>
<content type='text'>
These functions allow for defining pattern fragments usable within the `match` and `rewrite` sections of a pattern. The main structure of Constraints and Rewrites functions are the same, and are similar to functions in other languages; they contain a signature (i.e. name, argument list, result list) and a body:

```pdll
// Constraint that takes a value as an input, and produces a value:
Constraint Cst(arg: Value) -&gt; Value { ... }

// Constraint that returns multiple values:
Constraint Cst() -&gt; (result1: Value, result2: ValueRange);
```

When returning multiple results, each result can be optionally be named (the result of a Constraint/Rewrite in the case of multiple results is a tuple).

These body of a Constraint/Rewrite functions can be specified in several ways:

* Externally
In this case we are importing an external function (registered by the user outside of PDLL):

```pdll
Constraint Foo(op: Op);
Rewrite Bar();
```

* In PDLL (using PDLL constructs)
In this case, the body is defined using PDLL constructs:

```pdll
Rewrite BuildFooOp() {
  // The result type of the Rewrite is inferred from the return.
  return op&lt;my_dialect.foo&gt;;
}
// Constraints/Rewrites can also implement a lambda/expression
// body for simple one line bodies.
Rewrite BuildFooOp() =&gt; op&lt;my_dialect.foo&gt;;
```

* In PDLL (using a native/C++ code block)
In this case the body is specified using a C++(or potentially other language at some point) code block. When building PDLL in AOT mode this will generate a native constraint/rewrite and register it with the PDL bytecode.

```pdll
Rewrite BuildFooOp() -&gt; Op&lt;my_dialect.foo&gt; [{
  return rewriter.create&lt;my_dialect::FooOp&gt;(...);
}];
```

Differential Revision: https://reviews.llvm.org/D115836
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These functions allow for defining pattern fragments usable within the `match` and `rewrite` sections of a pattern. The main structure of Constraints and Rewrites functions are the same, and are similar to functions in other languages; they contain a signature (i.e. name, argument list, result list) and a body:

```pdll
// Constraint that takes a value as an input, and produces a value:
Constraint Cst(arg: Value) -&gt; Value { ... }

// Constraint that returns multiple values:
Constraint Cst() -&gt; (result1: Value, result2: ValueRange);
```

When returning multiple results, each result can be optionally be named (the result of a Constraint/Rewrite in the case of multiple results is a tuple).

These body of a Constraint/Rewrite functions can be specified in several ways:

* Externally
In this case we are importing an external function (registered by the user outside of PDLL):

```pdll
Constraint Foo(op: Op);
Rewrite Bar();
```

* In PDLL (using PDLL constructs)
In this case, the body is defined using PDLL constructs:

```pdll
Rewrite BuildFooOp() {
  // The result type of the Rewrite is inferred from the return.
  return op&lt;my_dialect.foo&gt;;
}
// Constraints/Rewrites can also implement a lambda/expression
// body for simple one line bodies.
Rewrite BuildFooOp() =&gt; op&lt;my_dialect.foo&gt;;
```

* In PDLL (using a native/C++ code block)
In this case the body is specified using a C++(or potentially other language at some point) code block. When building PDLL in AOT mode this will generate a native constraint/rewrite and register it with the PDL bytecode.

```pdll
Rewrite BuildFooOp() -&gt; Op&lt;my_dialect.foo&gt; [{
  return rewriter.create&lt;my_dialect::FooOp&gt;(...);
}];
```

Differential Revision: https://reviews.llvm.org/D115836
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][NFC] Add a using for llvm::SMLoc/llvm::SMRange to LLVM.h</title>
<updated>2022-01-27T05:37:23+00:00</updated>
<author>
<name>River Riddle</name>
<email>riddleriver@gmail.com</email>
</author>
<published>2022-01-26T23:49:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6842ec42f665f38bc744e3c576004bc1fd36ad9d'/>
<id>6842ec42f665f38bc744e3c576004bc1fd36ad9d</id>
<content type='text'>
These are used pervasively during parsing.

Differential Revision: https://reviews.llvm.org/D118291</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These are used pervasively during parsing.

Differential Revision: https://reviews.llvm.org/D118291</pre>
</div>
</content>
</entry>
</feed>
