[PATCH] D63476: [ARM] DLS/LE low-overhead loop code generation

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 25 01:34:36 PDT 2019


dmgreen added a comment.

In D63476#1557021 <https://reviews.llvm.org/D63476#1557021>, @samparker wrote:

> I will add some comments, but I really don't think this belongs in constant islands. This doesn't have to worry about iterative changes, the loop size may only vary by 8 bytes, which is nothing compared to the 4KB that we need to concern ourselves with. Plus this is a very specific pass, especially once we start having to handle the tail predicated loops!


Its not really about the 4KB range of a LE instruction, I agree that's not super important, but the much smaller range of a cbz for example. If we are over-estimating the size of the loop in constant island pass, we may loose out on other optimisations we would otherwise have performed.



================
Comment at: lib/Target/ARM/ARMLowOverheadLoops.cpp:76
+  BBUtils = std::unique_ptr<ARMBasicBlockUtils>(new ARMBasicBlockUtils(MF));
+  BBUtils->computeAllBlockSizes();
+
----------------
samparker wrote:
> dmgreen wrote:
> > How expensive is this? We might as well not do it for cores that won't have low overhead loops.
> Good point! I'll add a check and an exit.
Also, I'm not sure it's doing everything it should, and might not be calculating offsets. Can you add a test with multiple loop bbs that together go over the limit?


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

https://reviews.llvm.org/D63476





More information about the llvm-commits mailing list