[llvm] [CodeGen] Size live ranges in real instructions (PR #224144)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 17 02:55:08 PDT 2026


================
@@ -293,6 +293,21 @@ void SlotIndexes::packIndexes() {
     Entry.setIndex(Index * SlotIndex::InstrDist);
 }
 
+unsigned SlotIndexes::getRealInstrSpan(SlotIndex A, SlotIndex B) const {
+  if (B <= A)
+    return 0;
+  unsigned Count = 0;
+  IndexList::const_iterator E = B.listEntry()->getIterator();
+  for (IndexList::const_iterator I = A.listEntry()->getIterator(); I != E;
----------------
nikic wrote:

Compile-time: http://llvm-compile-time-tracker.com/compare.php?from=54e36c83bc42b2a15d75eee3fc7a61eaf44a4e3a&to=66422163bacc130c878346e1cbc4fc94877474b3&stat=instructions%3Au

https://github.com/llvm/llvm-project/pull/224144


More information about the llvm-commits mailing list