[PATCH] D92385: [ARM] Add a pass that re-arranges blocks when there is a backwards WLS branch

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 11 12:01:37 PST 2021


SjoerdMeijer added inline comments.


================
Comment at: llvm/lib/Target/ARM/ARMBlockPlacement.cpp:123
+          CanMove = false;
+          break;
+        }
----------------
I am a bit struggling with reading the indentation, but was wondering if we could `return false` here? In that case, do we need `CanMove`?


================
Comment at: llvm/lib/Target/ARM/ARMBlockPlacement.cpp:130
+        // An example loop structure where the LoopExit can't be moved, since
+        // bb2's LE will become forwards once bb1 is moved after bb3 bb1: -
+        // LoopExit bb2:
----------------
nit: newline after `bb3` and LoopExit? I guess you want to have: 

  // bb1:  -LoopExit
  // bb2:
  //   LE bb1 - Terminator
  // bb3:
  // ...


================
Comment at: llvm/lib/Target/ARM/ARMBlockPlacement.cpp:136
+        // bb4:          - Header
+        for (auto It = LoopExit->getIterator(); It != Preheader->getIterator();
+             It++) {
----------------
Have we checked that LoopExit < Preheader?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92385



More information about the llvm-commits mailing list