In an operation in the true/false dest of a branch,
one can assume that the operation itself was true/false if
only that edge can reach the operation.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/StandardOps/IR/Ops.cpp | ||
---|---|---|
961 | nit: Remove the mlir:: here and below. | |
966 | Ideally this would be based on a DominanceInfo that gets passed in as this only works for local cases. Can you add a TODO/FIXME on this pattern for upgrading when we have access to a DominanceInfo here? | |
968 | ||
969–970 | Do you need to create a new ConstantOp for every use? Can you just check to see if one has already been created? | |
970 | Isn't there a rewriter.getBoolAttr? | |
980 | ||
981 | Same comment here. | |
987 | ? | |
mlir/test/Dialect/Standard/canonicalize.mlir | ||
315–316 | Can you clean this up to check only what is necessary? We shouldn't be checking comments, blocks, etc. We should only need to check that constants get generated and those constants feed into the consumers. Any SSA values should also be using regex captures, and not the literal value from the printer. |
LGTM with River's comments addressed.
mlir/lib/Dialect/StandardOps/IR/Ops.cpp | ||
---|---|---|
989–1001 | It would be nice to have this code factored out into a function, it's almost the same as above and the overall pattern looks useful. |
nit: Remove the mlir:: here and below.