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:
8324fa7
)
Fix bugzilla bug #5
author
Chris Lattner
<sabre@nondot.org>
Tue, 7 Oct 2003 19:33:31 +0000
(19:33 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Tue, 7 Oct 2003 19:33:31 +0000
(19:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8930
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/IPO/InlineSimple.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/IPO/InlineSimple.cpp
b/lib/Transforms/IPO/InlineSimple.cpp
index 966ac2eab5a2f5979cbf73aff91f3662024b94a4..5e72d8a2e64d1cc9745b80db084c459e9a4be68e 100644
(file)
--- a/
lib/Transforms/IPO/InlineSimple.cpp
+++ b/
lib/Transforms/IPO/InlineSimple.cpp
@@
-97,7
+97,12
@@
int SimpleInliner::getInlineCost(CallSite CS) {
CalleeFI.NumInsts = NumInsts;
}
- // Look at the size of the callee. Each basic block counts as 21 units, and
+ // Don't inline into something too big, which would make it bigger. Here, we
+ // count each basic block as a single unit.
+ InlineCost += Caller->size()*2;
+
+
+ // Look at the size of the callee. Each basic block counts as 20 units, and
// each instruction counts as 10.
InlineCost += CalleeFI.NumInsts*10 + CalleeFI.NumBlocks*20;
return InlineCost;