[PATCH] D67404: [ARM] LE support in ConstantIslands

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 12 22:10:24 PDT 2019


dmgreen added a comment.

Nice. I was expecting this to happen earlier, maybe in the other branch optimisations. This seems like a good place for it, though.

What does it do for codesize?



================
Comment at: lib/Target/ARM/ARMConstantIslandPass.cpp:1935
+  // branches, will succeed.
+  for (unsigned i = ImmBranches.size(); i != 0; --i) {
+    ImmBranch &Br = ImmBranches[i-1];
----------------
for (ImmBranch &Br : reverse(ImmBranches))


================
Comment at: lib/Target/ARM/ARMConstantIslandPass.cpp:1986
+      Br.MI = NewBR;
+    } else if (&MBB->back() != Br.MI) {
+      MachineInstr &LastMI = MBB->back();
----------------
Can you explain this? Is it that we know that this is the LE case, and the other br at the end of the block is being deleted? Can you add a comment.


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

https://reviews.llvm.org/D67404





More information about the llvm-commits mailing list