[llvm] [CGData][GMF] Skip No Params (PR #116548)
Ellis Hoag via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 19 11:24:17 PST 2024
================
@@ -159,22 +169,33 @@ static bool isProfitable(
unsigned InstCount = SFS[0]->InstCount;
if (InstCount < GlobalMergingMinInstrs)
return false;
+ double Benefit =
+ InstCount * (StableFunctionCount - 1) * GlobalMergingInstOverhead;
----------------
ellishg wrote:
This looks unused until after this loop. Can we move until after we compute cost? Or could we early return if `Cost >= Benefit` for any iteration in the loop?
https://github.com/llvm/llvm-project/pull/116548
More information about the llvm-commits
mailing list