Traverse the cloneOp for aliases to find the alloc op
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Nice! Thank you!
mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp | ||
---|---|---|
455 | LLVM coding style is sourceOp. Please fix the other variable names also. Maybe a better name here is allocOp, which is what you're trying to find. | |
455 | Instead of cloneOp.getInput() you can reuse source from above | |
456–457 | What if it is an alias of an argument, e.g. (reshape(%buffer_arg)), then you will run into a nullptr here. You can use dyn_cast_or_null. Then the surrounding if statement is not needed also. | |
465 | This is a canonicalSource, possibly the allocation value. |
LLVM coding style is sourceOp. Please fix the other variable names also.
Maybe a better name here is allocOp, which is what you're trying to find.