[PATCH] D129585: [BOLT] Replace uses of layout with basic block list

Maksim Panchenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 13 18:44:03 PDT 2022


maksfb added a comment.

Maybe instead of `for (const BinaryBasicBlock *const BB : BasicBlocks)` we can have `for (const BinaryBasicBlock &BB : blocks())`?

Other than that, looks good to me. Thanks.



================
Comment at: bolt/lib/Core/BinaryFunction.cpp:3510
+  });
+  for (BinaryBasicBlock *const BB : reverse(EntryPoints)) {
+    Stack.push(BB);
----------------
nit: remove curly braces.


================
Comment at: bolt/lib/Core/BinaryFunction.cpp:3514
+
+  for (BinaryBasicBlock *const BB : BasicBlocks) {
     BB->setLayoutIndex(BinaryBasicBlock::InvalidIndex);
----------------
Likewise.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129585



More information about the llvm-commits mailing list