diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-07-17 01:31:49 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-07-17 01:31:49 +0000 |
commit | 97cd0298cc4886673a272659e6a8b887ee0db6bd (patch) | |
tree | 044f5503fec91add167a23bb463c8587393aecd3 /llvm/lib/Transforms/Utils | |
parent | c062381c7b05c811637e47c5fbd38164fef1dcae (diff) | |
download | bcm5719-llvm-97cd0298cc4886673a272659e6a8b887ee0db6bd.tar.gz bcm5719-llvm-97cd0298cc4886673a272659e6a8b887ee0db6bd.zip |
Inliner tweak. Function calls should cost more than one instruction!
llvm-svn: 53712
Diffstat (limited to 'llvm/lib/Transforms/Utils')
-rw-r--r-- | llvm/lib/Transforms/Utils/InlineCost.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineCost.cpp b/llvm/lib/Transforms/Utils/InlineCost.cpp index 10cb77bbcba..5c97fd2f706 100644 --- a/llvm/lib/Transforms/Utils/InlineCost.cpp +++ b/llvm/lib/Transforms/Utils/InlineCost.cpp @@ -119,6 +119,11 @@ void InlineCostAnalyzer::FunctionInfo::analyzeFunction(Function *F) { NeverInline = true; return; } + + // Calls often compile into many machine instructions. Bump up their + // cost to reflect this. + if (!isa<IntrinsicInst>(II)) + NumInsts += 5; } if (isa<ExtractElementInst>(II) || isa<VectorType>(II->getType())) |