History log of /llvm-project-15.0.7/mlir/lib/TableGen/Pattern.cpp (Results 1 – 25 of 72)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init
# ae002f8b 26-Jul-2022 Kazu Hirata <[email protected]>

Use isa instead of dyn_cast (NFC)


Revision tags: llvmorg-14.0.6
# 064a08cd 21-Jun-2022 Kazu Hirata <[email protected]>

Don't use Optional::hasValue (NFC)


Revision tags: llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1
# 7b196f1b 03-Feb-2022 Markus Böck <[email protected]>

[mlir][Rewrite] Add support for using an operation with no results as location

Prior to this patch, using an operation without any results as the location would result in the generation of invalid C

[mlir][Rewrite] Add support for using an operation with no results as location

Prior to this patch, using an operation without any results as the location would result in the generation of invalid C++ code. It'd try to format using the result values, which would would end up being an empty string for an operation without any.
This patch fixes that issue by instead using getValueAndRangeUse which handles both ranges as well as the case for an op without any results.

Differential Revision: https://reviews.llvm.org/D118885

show more ...


# 8652fc84 03-Feb-2022 Markus Böck <[email protected]>

[mlir][NFC] Fully qualify a default C++ string in Pattern.cpp


Revision tags: llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2
# 1fc096af 02-Jan-2022 Mehdi Amini <[email protected]>

Apply clang-tidy fixes for performance-unnecessary-value-param to MLIR (NFC)

Reviewed By: Mogball

Differential Revision: https://reviews.llvm.org/D116250


# e5639b3f 22-Dec-2021 Mehdi Amini <[email protected]>

Fix more clang-tidy cleanups in mlir/ (NFC)


# 02b6fb21 20-Dec-2021 Mehdi Amini <[email protected]>

Fix clang-tidy issues in mlir/ (NFC)

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D115956


Revision tags: llvmorg-13.0.1-rc1
# 2d99c815 08-Nov-2021 Chia-hung Duan <[email protected]>

[mlir-tblgen] Support `either` in Tablegen DRR.

Add a new directive `either` to specify the operands can be matched in either order

Reviewed By: jpienaar, Mogball

Differential Revision: https://re

[mlir-tblgen] Support `either` in Tablegen DRR.

Add a new directive `either` to specify the operands can be matched in either order

Reviewed By: jpienaar, Mogball

Differential Revision: https://reviews.llvm.org/D110666

show more ...


# fb3d83ac 06-Oct-2021 rdzhabarov <[email protected]>

[mlir] Fix redundant return in the void method.

clang-tidy, fix redundant return statement at the end of the void method.

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D111

[mlir] Fix redundant return in the void method.

clang-tidy, fix redundant return statement at the end of the void method.

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D111251

show more ...


Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4
# bb250606 20-Sep-2021 Chia-hung Duan <[email protected]>

[mlir-tblgen] Add DagNode StaticMatcher.

Some patterns may share the common DAG structures. Generate a static
function to do the match logic to reduce the binary size.

Reviewed By: jpienaar

Differ

[mlir-tblgen] Add DagNode StaticMatcher.

Some patterns may share the common DAG structures. Generate a static
function to do the match logic to reduce the binary size.

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D105797

show more ...


# cb8c30d3 15-Sep-2021 Mogball <[email protected]>

[DRR] Explicit Return Types in Rewrites

Adds a new rewrite directive returnType that can be added at the end of an op's
argument list to explicitly specify return types.

```
(OpX $v0, $v1, (returnT

[DRR] Explicit Return Types in Rewrites

Adds a new rewrite directive returnType that can be added at the end of an op's
argument list to explicitly specify return types.

```
(OpX $v0, $v1, (returnType "$_builder.getI32Type()"))
```

Pass in a bound value to copy its return type, or pass a native code call to
dynamically create new types.

```
(OpX $v0, $v1, (returnType $v0, (NativeCodeCall<"..."> $v1)))
```

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D109472

show more ...


Revision tags: llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init
# d7314b3c 21-Jul-2021 Chia-hung Duan <[email protected]>

[mlir-tblgen] Support binding multi-results of NativeCodeCall

We are able to bind NativeCodeCall result as binding operation. To make
table-gen have better understanding in the form of helper functi

[mlir-tblgen] Support binding multi-results of NativeCodeCall

We are able to bind NativeCodeCall result as binding operation. To make
table-gen have better understanding in the form of helper function,
we need to specify the number of return values in the NativeCodeCall
template. A VoidNativeCodeCall is added for void case.

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D102160

show more ...


# b4001ae8 20-Jul-2021 Chia-hung Duan <[email protected]>

[mlir-tblgen] Fix failed matching when binds same operand of an op in different depth

For example, we will generate incorrect code for the pattern,

def : Pat<((FooOp (FooOp, $a, $b), $b)), (...)>;

[mlir-tblgen] Fix failed matching when binds same operand of an op in different depth

For example, we will generate incorrect code for the pattern,

def : Pat<((FooOp (FooOp, $a, $b), $b)), (...)>;

We didn't allow $b to be bond twice with same operand of same op.

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D105677

show more ...


Revision tags: llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1
# 34b5482b 16-Apr-2021 Chia-hung Duan <[email protected]>

Support NativeCodeCall binding in rewrite pattern.

We are able to bind the result from native function while rewriting
pattern. In matching pattern, if we want to get some values back, we can
do tha

Support NativeCodeCall binding in rewrite pattern.

We are able to bind the result from native function while rewriting
pattern. In matching pattern, if we want to get some values back, we can
do that by passing parameter as return value placeholder. Besides, add
the semantic of '$_self' in NativeCodeCall while matching, it'll be the
operation that defines certain operand.

Differential Revision: https://reviews.llvm.org/D100746

show more ...


Revision tags: llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1
# 415fab6f 24-Nov-2020 Paul C. Anagnostopoulos <[email protected]>

[TableGen] Eliminate the 'code' type

Update the documentation.

Rework various backends that relied on the code type.

Differential Revision: https://reviews.llvm.org/D92269


# ad1fe396 16-Oct-2020 Rob Suderman <[email protected]>

[MLIR] Fix gcc5 in D89161

Missing .str() makes gcc5 unable to infer the template to use.

Differential Revision: https://reviews.llvm.org/D89516


# 2bf423b0 09-Oct-2020 Rob Suderman <[email protected]>

[mlir] RewriterGen NativeCodeCall matcher with ConstantOp matcher

Added an underlying matcher for generic constant ops. This
included a rewriter of RewriterGen to make variable use more
clear.

Diff

[mlir] RewriterGen NativeCodeCall matcher with ConstantOp matcher

Added an underlying matcher for generic constant ops. This
included a rewriter of RewriterGen to make variable use more
clear.

Differential Revision: https://reviews.llvm.org/D89161

show more ...


# 008c0ea6 14-Oct-2020 rdzhabarov <[email protected]>

[DDR] Introduce implicit equality check for the source pattern operands with the same name.

This CL allows user to specify the same name for the operands in the source pattern which implicitly enfor

[DDR] Introduce implicit equality check for the source pattern operands with the same name.

This CL allows user to specify the same name for the operands in the source pattern which implicitly enforces equality on operands with the same name.
E.g., Pat<(OpA $a, $b, $a) ... > would create a matching rule for checking equality for the first and the last operands. Equality of the operands is enforced at any depth, e.g., OpA ($a, $b, OpB($a, $c, OpC ($a))).

Example usage: Pat<(Reshape $arg0, (Shape $arg0)), (replaceWithValue $arg0)>

Note, this feature only covers operands but not attributes.
Current use cases are based on the operand equality and explicitly add the constraint into the pattern. Attribute equality will be worked out on the different CL.

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D89254

show more ...


# 0b793c4b 14-Oct-2020 Mehdi Amini <[email protected]>

Revert "[DDR] Introduce implicit equality check for the source pattern operands with the same name."

This reverts commit 7271c1bcb96051bcd227d3fa6071a620fe238850.

This broke the gcc-5 build:

/usr/

Revert "[DDR] Introduce implicit equality check for the source pattern operands with the same name."

This reverts commit 7271c1bcb96051bcd227d3fa6071a620fe238850.

This broke the gcc-5 build:

/usr/include/c++/5/ext/new_allocator.h:120:4: error: no matching function for call to 'std::pair<const std::__cxx11::basic_string<char>, mlir::tblgen::SymbolInfoMap::SymbolInfo>::pair(llvm::StringRef&, mlir::tblgen::SymbolInfoMap::SymbolInfo)'
{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
^
In file included from /usr/include/c++/5/utility:70:0,
from llvm/include/llvm/Support/type_traits.h:18,
from llvm/include/llvm/Support/Casting.h:18,
from mlir/include/mlir/Support/LLVM.h:24,
from mlir/include/mlir/TableGen/Pattern.h:17,
from mlir/lib/TableGen/Pattern.cpp:14:
/usr/include/c++/5/bits/stl_pair.h:206:9: note: candidate: template<class ... _Args1, long unsigned int ..._Indexes1, class ... _Args2, long unsigned int ..._Indexes2> std::pair<_T1, _T2>::pair(std::tuple<_Args1 ...>&, std::tuple<_Args2 ...>&, std::_Index_tuple<_Indexes1 ...>, std::_Index_tuple<_Indexes2 ...>)
pair(tuple<_Args1...>&, tuple<_Args2...>&,
^

show more ...


# 7271c1bc 13-Oct-2020 rdzhabarov <[email protected]>

[DDR] Introduce implicit equality check for the source pattern operands with the same name.

This CL allows user to specify the same name for the operands in the source pattern which implicitly enfor

[DDR] Introduce implicit equality check for the source pattern operands with the same name.

This CL allows user to specify the same name for the operands in the source pattern which implicitly enforces equality on operands with the same name.
E.g., Pat<(OpA $a, $b, $a) ... > would create a matching rule for checking equality for the first and the last operands. Equality of the operands is enforced at any depth, e.g., OpA ($a, $b, OpB($a, $c, OpC ($a))).

Example usage: Pat<(Reshape $arg0, (Shape $arg0)), (replaceWithValue $arg0)>

Note, this feature only covers operands but not attributes.
Current use cases are based on the operand equality and explicitly add the constraint into the pattern. Attribute equality will be worked out on the different CL.

Differential Revision: https://reviews.llvm.org/D89254

show more ...


# 60cf8453 12-Oct-2020 Nicolas Vasilache <[email protected]>

Revert "Revert "Give attributes C++ namespaces.""

This reverts commit df295fac6cd14977672b2874700572e0f77b77da.

Reactivates a spuriously rolled back change.


# df295fac 09-Oct-2020 Nicolas Vasilache <[email protected]>

Revert "Give attributes C++ namespaces."

This reverts commit 0a34492f36d77f043d371cc91f359b2d65e86475.

This change turned out to be very intrusive wrt some internal projects.
Reverting until this c

Revert "Give attributes C++ namespaces."

This reverts commit 0a34492f36d77f043d371cc91f359b2d65e86475.

This change turned out to be very intrusive wrt some internal projects.
Reverting until this can be sorted out.

show more ...


# 0a34492f 09-Oct-2020 Federico Lebrón <[email protected]>

Give attributes C++ namespaces.

Reviewed By: mehdi_amini, jpienaar

Differential Revision: https://reviews.llvm.org/D89014


Revision tags: llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2
# 12d16de5 12-Aug-2020 Rahul Joshi <[email protected]>

[MLIR][NFC] Remove tblgen:: prefix in TableGen/*.cpp files

- Add "using namespace mlir::tblgen" in several of the TableGen/*.cpp files and
eliminate the tblgen::prefix to reduce code clutter.

Dif

[MLIR][NFC] Remove tblgen:: prefix in TableGen/*.cpp files

- Add "using namespace mlir::tblgen" in several of the TableGen/*.cpp files and
eliminate the tblgen::prefix to reduce code clutter.

Differential Revision: https://reviews.llvm.org/D85800

show more ...


Revision tags: llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2
# d891d738 24-Jun-2020 Rahul Joshi <[email protected]>

[MLIR][NFC] Adopt variadic isa<>

Differential Revision: https://reviews.llvm.org/D82489


123