[PATCH] D99649: [ARM] Updates to arm-block-placement pass

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 31 09:57:26 PDT 2021


dmgreen added inline comments.


================
Comment at: llvm/lib/Target/ARM/ARMBlockPlacement.cpp:95
+  MachineInstr *wlsInstr = nullptr;
+  for (auto &Terminator : Predecessor->terminators()) {
+    if (Terminator.getOpcode() == ARM::t2WhileLoopStartLR)
----------------
It still probably doesn't need to search for it. If we've found it once, we can just return the WLS instruction.

Also LLVM capitalizes variable names.


================
Comment at: llvm/lib/Target/ARM/ARMBlockPlacement.cpp:192
+bool ARMBlockPlacement::processPostOrderLoops(MachineLoop *ML) {
+  bool changed = false;
+  for (auto *InnerML : *ML) {
----------------
changed -> Changed


================
Comment at: llvm/lib/Target/ARM/ARMBlockPlacement.cpp:194
+  for (auto *InnerML : *ML) {
+    if (processPostOrderLoops(InnerML))
+      changed = true;
----------------
Changed |= processPostOrderLoops(..)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99649



More information about the llvm-commits mailing list