Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td | ||
---|---|---|
428 | I'm removing these, but just for completeness for anyone reading this want to say that I think these being removed once unused is a good thing because I don't think these should be used as pure assertions and only to prevent incorrect code from being executed, so once the code is known to be correct, this form of assertion should be removed even if it might fire. The problem with NoSideEffect in my opinion is the fact that they could then be hoisted out of some If-block and then turned into an assertion that would never have executed in the original location. |
mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td | ||
---|---|---|
428 | I think this is another use case for the NoSpeculation trait. Or rather, we should have an AllowsSpeculation trait to attach to operations that can be hoisted across control flow. |
Marking these as NoSideEffect is dangerous. If their witness value goes unused, they will just disappear as the are considered dead at that point. That is likely not what we want.