[PATCH] D127208: MachineSink debug invariance

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 8 08:27:34 PDT 2022


fhahn added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineBasicBlock.cpp:1622
+  auto R = instructionsWithoutDebug(begin(), end());
+  return std::distance(R.begin(), R.end());
+}
----------------
One issue with this helper is that it needs to iterate over all instructions in the block to count them and the limit is used to decide whether the block is too big to process.

Not sure there's a good alternative, but maybe have something like `sizeWIthoutDebugLargerThan(x)` so we can at least bail out once the limit is reached.


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

https://reviews.llvm.org/D127208



More information about the llvm-commits mailing list