[PATCH] D100808: [Propeller] Use Fixed MBB ID instead of volatile MachineBasicBlock::Number.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 11 01:25:26 PDT 2022


jhenderson added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/BasicBlockSectionsProfileReader.h:35
 struct BBClusterInfo {
   // MachineBasicBlock ID.
+  unsigned BBID;
----------------
Is this comment still accurate? (It might be, I don't know).


================
Comment at: llvm/lib/CodeGen/BasicBlockSections.cpp:187
+  unsigned MaxBBID = 0;
+  for (auto bbClusterInfo : P.second)
+    if (bbClusterInfo.BBID > MaxBBID)
----------------
Nit: this is not the LLVM naming style convention. The old name (as was in the original diff, and changed in an intermediate commit somewhere) was correct style. Since you're modifying this area of code, let's fix it.


================
Comment at: llvm/lib/CodeGen/BasicBlockSections.cpp:224
       // set every basic block's section ID equal to its number (basic block
       // id). This further ensures that basic blocks are ordered canonically.
+      MBB.setSectionID(PreLayoutPosition.lookup(&MBB));
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100808



More information about the llvm-commits mailing list