Details
- Reviewers
bondhugula ftynse
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Please include a brief commit summary. I only did a superficial review. Could you please include test cases?
mlir/lib/Dialect/StandardOps/IR/Ops.cpp | ||
---|---|---|
312 | Doc comment with /// | |
313 | Typo | |
322 | More compact to use: for (auto *userOp : oldOp->getUsers()) | |
329 | Likewise. | |
335 | You could use replaceOpWithNewOp(oldOp, oldValue.getLoc(), ...) |
mlir/lib/Dialect/StandardOps/IR/Ops.cpp | ||
---|---|---|
311 | MLIR/LLVM prefer static to anonymous namespaces for functions | |
320 | Either auto * or Operation *. | |
330 | I'm not certain setType is okay inside a rewrite pattern. Can you find another way? | |
335 | Nit: you don't need oldValue.getLoc(), the location will be extracted from oldOp. |
mlir/lib/Dialect/StandardOps/IR/Ops.cpp | ||
---|---|---|
330 | Should be fine if you wrap this loop in: rewriter.startRootUpdate()/rewriter.finalizeRootUpdate() |
mlir/lib/Dialect/StandardOps/IR/Ops.cpp | ||
---|---|---|
322 | Operation * instead of auto please. In general please avoid auto where is does not improve readability / when the type isn't obvious from the context. |
I prefer to abandon this revision as I believe the way I'm doing things is the wrong way to do them:
- This change is already breaking with some recent diffs of LLVM.
- I really dislike having to add a "blacklist" instead of a whitelist.
- I believe a new canonicalisation pattern would be more suited (ie less invasive).
MLIR/LLVM prefer static to anonymous namespaces for functions