[clang] [flang] [llvm] [mlir] [Flang]Fix for changed code at the end of AllocaIP. (PR #92430)
Nikita Popov via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 6 07:18:02 PDT 2024
nikic wrote:
> > Allocas should be placed at the start of the entry block.
>
> Would it be acceptable to make this change such that the alloca's are at the very start of the block? I have tried that, and it seems to work. It will still mean changes to the tests, and I can't guarantee ALL alloca's for all Fortran (via MLIR) generated code will be at the start of the entry block.
Yes, that should be fine.
You could also use something like getFirstNonPHIOrDbgOrAlloca to compute the insert point after the current allocas. (Calling this many times could have quadratic runtime though -- I don't have enough context here to say whether that's a problem or not.)
https://github.com/llvm/llvm-project/pull/92430
More information about the cfe-commits
mailing list