aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2008-03-19 23:05:52 +0000
committerDevang Patel <dpatel@apple.com>2008-03-19 23:05:52 +0000
commit86ad6a27be4d2ccd889e5af59e959bf45cf71b94 (patch)
tree6a831fe70cf28b3e81b91331af11193c2d031f2b /lib
parent0e7614e4f71407a59620555f432ad156a5d04754 (diff)
downloadexternal_llvm-86ad6a27be4d2ccd889e5af59e959bf45cf71b94.zip
external_llvm-86ad6a27be4d2ccd889e5af59e959bf45cf71b94.tar.gz
external_llvm-86ad6a27be4d2ccd889e5af59e959bf45cf71b94.tar.bz2
Add comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48567 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/Scalar/LoopUnroll.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/LoopUnroll.cpp b/lib/Transforms/Scalar/LoopUnroll.cpp
index 71a5955..1962c14 100644
--- a/lib/Transforms/Scalar/LoopUnroll.cpp
+++ b/lib/Transforms/Scalar/LoopUnroll.cpp
@@ -101,6 +101,10 @@ static unsigned ApproximateLoopSize(const Loop *L) {
} else if (isa<DbgInfoIntrinsic>(I)) {
// Ignore debug instructions
} else if (isa<CallInst>(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<IntrinsicInst>(I))
Size = Size + 3;
else