Skip to content

Commit 46750bf

Browse files
committed
Address 2nd comments from ellishg
1 parent f65e0b3 commit 46750bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/CGData/StableFunctionMap.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,6 @@ static bool isProfitable(
169169
unsigned InstCount = SFS[0]->InstCount;
170170
if (InstCount < GlobalMergingMinInstrs)
171171
return false;
172-
double Benefit =
173-
InstCount * (StableFunctionCount - 1) * GlobalMergingInstOverhead;
174172

175173
double Cost = 0.0;
176174
SmallSet<stable_hash, 8> UniqueHashVals;
@@ -192,6 +190,8 @@ static bool isProfitable(
192190
}
193191
Cost += GlobalMergingExtraThreshold;
194192

193+
double Benefit =
194+
InstCount * (StableFunctionCount - 1) * GlobalMergingInstOverhead;
195195
bool Result = Benefit > Cost;
196196
LLVM_DEBUG(dbgs() << "isProfitable: Hash = " << SFS[0]->Hash << ", "
197197
<< "StableFunctionCount = " << StableFunctionCount

0 commit comments

Comments
 (0)