If a stack allocation is within a nested allocation scope
don't count that as an allocation of the outer allocation scope
that would prevent inlining.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
@wsmoses Looks like you missed my comments here: https://reviews.llvm.org/D121845 -- before merging it.
mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp | ||
---|---|---|
317–332 | Would it make sense to switch the walk order to preorder (template argument) and check alloc->hasTrait<OpTrait::AutomaticAllocationScope>() + skip instead? In any case, please do something with the formatting here, e.g., put alloc->getParentWithTrait into a variable. | |
329–330 | Nit: fold nested ifs? |
Nit: fold nested ifs?