[PATCH] D64621: [ARM] Make sure that the constant pool does not keep in the middle of an IT block.

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 23 08:43:59 PDT 2019


dmgreen added a comment.

I think that so long as we don't end up iterating off the end of a block, trying this seems like an improvement over current trunk. Changing the way the Constant Island Pass iterates would likely be more disruptive, and enabling the assert here will let us see if there are problems elsewhere. We may find that splitting the IT block is the better option. @efriedma what do you think?



================
Comment at: llvm/lib/Target/ARM/ARMConstantIslandPass.cpp:1358
+         Offset += TII->getInstSizeInBytes(*I), I = std::next(I)) {
+      BaseInsertOffset =
+          std::max(BaseInsertOffset, Offset + TII->getInstSizeInBytes(*I) + 1);
----------------
It is probably worth copying the "Fell off end of block" assert from below to here, to make it very obvious what's wrong in case that comes up.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64621/new/

https://reviews.llvm.org/D64621





More information about the llvm-commits mailing list