[PATCH] D89397: [AMDGPU] SILowerControlFlow::removeMBBifRedundant should not try to change MBB layout if it can fallthrough

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 14 09:30:17 PDT 2020


rampitec added a comment.

Please address couple clang-tidy comments.



================
Comment at: llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp:693
+        MachineBasicBlock::iterator I(MBB->getFirstInstrTerminator());
+        while (I != MBB->end()) {
+          if (I->isBranch() && TII->getBranchDestBlock(*I) == S)
----------------
It can be a regular for loop.


================
Comment at: llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp:705
+    return Ret;
+  };
   bool Redundant = true;
----------------
Add a blank like after this.


================
Comment at: llvm/test/CodeGen/AMDGPU/collapse-endcf.mir:643
+# going to be a layout successor to that pred after redundant block removal we should not rearrange
+# blocks to keep pred's fallthrough path if the succ has fallthrough path to one of it's succ too.
+
----------------
This sentence clearly misses some punctuation.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89397



More information about the llvm-commits mailing list