diff --git a/llvm/lib/Transforms/Scalar/LoopUnroll.cpp b/llvm/lib/Transforms/Scalar/LoopUnroll.cpp index 71a5955b76b0d8d82b09d9a751872645570f6a55..1962c14d5d6c64ad669054da0760d99ee8501221 100644 --- a/llvm/lib/Transforms/Scalar/LoopUnroll.cpp +++ b/llvm/lib/Transforms/Scalar/LoopUnroll.cpp @@ -101,6 +101,10 @@ static unsigned ApproximateLoopSize(const Loop *L) { } else if (isa(I)) { // Ignore debug instructions } else if (isa(I)) { + // Estimate size overhead introduced by call instructions which + // is higher than other instructions. Here 3 and 10 are magic + // numbers that help one isolated test case from PR2067 without + // negatively impacting measured benchmarks. if (isa(I)) Size = Size + 3; else