summaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO/Inliner.cpp
Commit message (Collapse)AuthorAge
* Use removeAllCalledFunctions rather than removingDuncan Sands2008-09-05
| | | | | | | edges one by one by hand. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55836 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55779 91177308-0d34-0410-b5e6-96231b3b80d8
* Update inline threshold for current function if the notes say, optimize for ↵Devang Patel2008-09-03
| | | | | | size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55745 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle "always inline" note during inline cost analysis.Devang Patel2008-09-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55712 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle "noinline" note inside the simple inliner.Devang Patel2008-09-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55708 91177308-0d34-0410-b5e6-96231b3b80d8
* s/FP_AlwaysInline/FN_NOTE_AlwaysInline/gDevang Patel2008-09-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55676 91177308-0d34-0410-b5e6-96231b3b80d8
* respect inline=never and inline=always notes.Devang Patel2008-09-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55673 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-13
| | | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51017 91177308-0d34-0410-b5e6-96231b3b80d8
* Make several variable declarations static.Dan Gohman2008-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50696 91177308-0d34-0410-b5e6-96231b3b80d8
* 1. Drop default inline threshold back down to 200.Evan Cheng2008-04-01
| | | | | | | | 2. Do not use # of basic blocks as part of the cost computation since it doesn't really figure into function size. 3. More aggressively inline function with vector code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49061 91177308-0d34-0410-b5e6-96231b3b80d8
* Increasing the inline limit from (overly conservative) 200 to 300. Given ↵Evan Cheng2008-03-24
| | | | | | | | | each BB costs 20 and each instruction costs 5, 200 means a 4 BB function + 24 instructions (actually less because caller's size also contributes to it). Furthermore, double the limit when more than 10% of the callee instructions are vector instructions. Multimedia kernels tend to love inlining. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48725 91177308-0d34-0410-b5e6-96231b3b80d8
* allow specified inline threshold to be negative, as the value is Chris Lattner2008-03-01
| | | | | | | | itself sometimes negative. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47786 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow clients to specify the inline threshold when creatingChris Lattner2008-01-12
| | | | | | | the inliner pass. Patch by Robert Zeh. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45903 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45418 91177308-0d34-0410-b5e6-96231b3b80d8
* Use empty() member functions when that's what's being tested for insteadDan Gohman2007-10-03
| | | | | | | of comparing begin() and end(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42585 91177308-0d34-0410-b5e6-96231b3b80d8
* Inliner pass header file was moved.Tanya Lattner2007-06-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37665 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR1395, by passing the ID correctlyChris Lattner2007-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36894 91177308-0d34-0410-b5e6-96231b3b80d8
* Drop 'const'Devang Patel2007-05-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36662 91177308-0d34-0410-b5e6-96231b3b80d8
* Use 'static const char' instead of 'static const int'.Devang Patel2007-05-02
| | | | | | | | Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36652 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not use typeinfo to identify pass in pass manager.Devang Patel2007-05-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36632 91177308-0d34-0410-b5e6-96231b3b80d8
* the inliner pass now passes targetdata down through the inliner api'sChris Lattner2007-01-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33677 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoidReid Spencer2007-01-30
| | | | | | | confusion with external linkage types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33663 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate static ctors due to Statistic objectsChris Lattner2006-12-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32693 91177308-0d34-0410-b5e6-96231b3b80d8
* Detemplatize the Statistic class. The only type it is instantiated withChris Lattner2006-12-06
| | | | | | | is 'unsigned'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32279 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace #include <iostream> with llvm_* streams.Bill Wendling2006-11-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31924 91177308-0d34-0410-b5e6-96231b3b80d8
* second patch to fix PR992/993.Chris Lattner2006-11-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31610 91177308-0d34-0410-b5e6-96231b3b80d8
* Minimal patch to fix PR992/PR993Chris Lattner2006-11-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31608 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR786:Reid Spencer2006-11-02
| | | | | | | | | | | Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31380 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the callgraph representation to store the callsite along with theChris Lattner2006-07-12
| | | | | | | | | | | | target CG node. This allows the inliner to properly update the callgraph when using the pruning inliner. The pruning inliner may not copy over all call sites from a callee to a caller, so the edges corresponding to those call sites should not be copied over either. This fixes PR827 and Transforms/Inline/2006-07-12-InlinePruneCGUpdate.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29120 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some dead variables.Chris Lattner2006-05-12
| | | | | | | Fix a nasty bug in the memcmp optimizer where we used the wrong variable! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28269 91177308-0d34-0410-b5e6-96231b3b80d8
* Make iostream #inclusion explicitChris Lattner2006-01-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25514 91177308-0d34-0410-b5e6-96231b3b80d8
* Let the inliner update the callgraph to reflect the changes it makes, insteadChris Lattner2006-01-14
| | | | | | | of doing it ourselves. This fixes Transforms/Inline/2006-01-14-CallGraphUpdate.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25321 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix 80 column violationsChris Lattner2006-01-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25279 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespaceMisha Brukman2005-04-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21427 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the inliner to always delete any edges from the external call node toChris Lattner2004-09-18
| | | | | | | | | | | a function being deleted. Due to optimizations done while inlining, there can be edges from the external call node to a function node that were not apparent any longer. This fixes the compiler crash while compiling 175.vpr git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16399 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes For Bug 352Reid Spencer2004-09-01
| | | | | | | | | Move include/Config and include/Support into include/llvm/Config, include/llvm/ADT and include/llvm/Support. From here on out, all LLVM public header files must be under include/llvm/. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix another really nasty regression that Anshu pointed out. In cases whereChris Lattner2004-08-08
| | | | | | | | | | | dangling constant users were removed from a function, causing it to be dead, we never removed the call graph edge from the external node to the function. In most cases, this didn't cause a problem (by luck). This should definitely go into 1.3 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15570 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix #includes of i*.h => Instructions.h as per PR403.Misha Brukman2004-07-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15334 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a performance regression from the CPR patch, simplify codeChris Lattner2004-07-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14974 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a rather serious bug in previous checkinChris Lattner2004-07-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14957 91177308-0d34-0410-b5e6-96231b3b80d8
* bug 122:Reid Spencer2004-07-18
| | | | | | | - Replace ConstantPointerRef usage with GlobalValue usage git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14953 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the inliner to be deterministic, not letting its output depend on theChris Lattner2004-06-20
| | | | | | | relative location of Function objects in memory. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14260 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in my previous checkinChris Lattner2004-05-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13717 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix cases where we missed inlining some more obvious candidates because theChris Lattner2004-05-23
| | | | | | | caller was in an SCC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13693 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an incredibly nasty iterator invalidation problem. I am too spoiled by ↵Chris Lattner2004-04-21
| | | | | | | | | | ilists :) Eventually it would be nice if CallGraph maintained an ilist of CallGraphNode's instead of a vector of pointers to them, but today is not that day. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13100 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typeoChris Lattner2004-04-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13089 91177308-0d34-0410-b5e6-96231b3b80d8
* REALLY fix PR324: don't delete linkonce functions until after the SCC traversalChris Lattner2004-04-20
| | | | | | | is done, which avoids invalidating iterators in the SCC traversal routines git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13088 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR324 and testcase: Inline/2004-04-20-InlineLinkOnce.llxChris Lattner2004-04-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13080 91177308-0d34-0410-b5e6-96231b3b80d8
* Actually update the call graph as the inliner changes it. This allows us toChris Lattner2004-04-12
| | | | | | | execute other CallGraphSCCPasses after the inliner without crashing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12861 91177308-0d34-0410-b5e6-96231b3b80d8
* Stop printing Function*Chris Lattner2004-04-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12857 91177308-0d34-0410-b5e6-96231b3b80d8