projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Inliner tweak. Function calls should cost more than one instruction!
[oota-llvm.git]
/
lib
/
Transforms
/
Utils
/
InlineCost.cpp
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()))