Skip to content

Commit 2bad642

Browse files
committed
use sizeWithoutDebug
1 parent 3bb61a8 commit 2bad642

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Transforms/Scalar/DFAJumpThreading.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ struct TransformDFA {
854854
BasicBlock *VisitedBB = getClonedBB(BB, NextState, DuplicateMap);
855855
if (!VisitedBB) {
856856
Metrics.analyzeBasicBlock(BB, *TTI, EphValues);
857-
NumClonedInst += range_size(*BB);
857+
NumClonedInst += BB->sizeWithoutDebug();
858858
DuplicateMap[BB].push_back({BB, NextState});
859859
}
860860

@@ -872,7 +872,7 @@ struct TransformDFA {
872872
if (VisitedBB)
873873
continue;
874874
Metrics.analyzeBasicBlock(BB, *TTI, EphValues);
875-
NumClonedInst += range_size(*BB);
875+
NumClonedInst += BB->sizeWithoutDebug();
876876
DuplicateMap[BB].push_back({BB, NextState});
877877
}
878878

@@ -914,7 +914,7 @@ struct TransformDFA {
914914
// TODO: Thread the switch partially before reaching the threshold.
915915
uint64_t NumOrigInst = 0;
916916
for (auto *BB : DuplicateMap.keys())
917-
NumOrigInst += range_size(*BB);
917+
NumOrigInst += BB->sizeWithoutDebug();
918918
if (double(NumClonedInst) / double(NumOrigInst) > MaxClonedRate) {
919919
LLVM_DEBUG(dbgs() << "DFA Jump Threading: Not jump threading, too much "
920920
"instructions wll be cloned\n");

0 commit comments

Comments
 (0)