We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f65e0b3 commit 46750bfCopy full SHA for 46750bf
llvm/lib/CGData/StableFunctionMap.cpp
@@ -169,8 +169,6 @@ static bool isProfitable(
169
unsigned InstCount = SFS[0]->InstCount;
170
if (InstCount < GlobalMergingMinInstrs)
171
return false;
172
- double Benefit =
173
- InstCount * (StableFunctionCount - 1) * GlobalMergingInstOverhead;
174
175
double Cost = 0.0;
176
SmallSet<stable_hash, 8> UniqueHashVals;
@@ -192,6 +190,8 @@ static bool isProfitable(
192
190
}
193
191
Cost += GlobalMergingExtraThreshold;
194
+ double Benefit =
+ InstCount * (StableFunctionCount - 1) * GlobalMergingInstOverhead;
195
bool Result = Benefit > Cost;
196
LLVM_DEBUG(dbgs() << "isProfitable: Hash = " << SFS[0]->Hash << ", "
197
<< "StableFunctionCount = " << StableFunctionCount
0 commit comments