projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b31b06d
)
Inliner tweak. Function calls should cost more than one instruction!
author
Evan Cheng
<evan.cheng@apple.com>
Thu, 17 Jul 2008 01:31:49 +0000
(
01:31
+0000)
committer
Evan Cheng
<evan.cheng@apple.com>
Thu, 17 Jul 2008 01:31:49 +0000
(
01:31
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53712
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Utils/InlineCost.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Utils/InlineCost.cpp
b/lib/Transforms/Utils/InlineCost.cpp
index 10cb77bbcba61835a17736f3c1368650eaf770ca..5c97fd2f70665a5469597d10eb9463ef219fa5c1 100644
(file)
--- a/
lib/Transforms/Utils/InlineCost.cpp
+++ b/
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()))