This make LLVM dialect constants to work with m_constant matches. Implement
the folding hook for this operation as required by the trait. This in turn
allows LLVM::ConstantOp to properly participate in constant-folding.
Depends On D116757
Paths
| Differential D116758
[mlir] Add ConstantLike trait to LLVM::ConstantOp ClosedPublic Authored by ftynse on Jan 6 2022, 10:26 AM.
Details
Summary This make LLVM dialect constants to work with m_constant matches. Implement Depends On D116757
Diff Detail
Event TimelineHerald added subscribers: sdasgup3, wenzhicui, wrengr and 21 others. · View Herald TranscriptJan 6 2022, 10:26 AM ftynse added a child revision: D116759: [mlir] Require struct indices in LLVM::GEPOp to be constant.Jan 6 2022, 10:27 AM This revision is now accepted and ready to land.Jan 6 2022, 10:31 AM This revision was landed with ongoing or failed builds.Jan 7 2022, 12:56 AM Closed by commit rG43ff4a6d5562: [mlir] Add ConstantLike trait to LLVM::ConstantOp (authored by ftynse). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 397933 mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
mlir/test/Dialect/LLVMIR/canonicalize.mlir
|