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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits