diff options
author | River Riddle <riddleriver@gmail.com> | 2020-03-12 14:06:14 -0700 |
---|---|---|
committer | River Riddle <riddleriver@gmail.com> | 2020-03-12 14:26:15 -0700 |
commit | 907403f342fe661b590f930a83f940c67b3ff855 (patch) | |
tree | bde2d4fb6e519f1237d7b7b529d60c36ebcffd44 /mlir/lib/Transforms/LoopInvariantCodeMotion.cpp | |
parent | 7c211cf3af56be211a36d4f2275b871264117312 (diff) | |
download | llvm-907403f342fe661b590f930a83f940c67b3ff855.zip llvm-907403f342fe661b590f930a83f940c67b3ff855.tar.gz llvm-907403f342fe661b590f930a83f940c67b3ff855.tar.bz2 |
[mlir] Add a new `ConstantLike` trait to better identify operations that represent a "constant".
The current mechanism for identifying is a bit hacky and extremely adhoc, i.e. we explicit check 1-result, 0-operand, no side-effect, and always foldable and then assume that this is a constant. Adding a trait adds structure to this, and makes checking for a constant much more efficient as we can guarantee that all of these things have already been verified.
Differential Revision: https://reviews.llvm.org/D76020
Diffstat (limited to 'mlir/lib/Transforms/LoopInvariantCodeMotion.cpp')
0 files changed, 0 insertions, 0 deletions