summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/InlineSimple.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson2010-10-191-2/+6
| | | | | | | | | | | | | | | | | exposes an initializeMyPassFunction(), which must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize the pass's dependencies. Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h before parsing commandline arguments. I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass registration/creation, please send the testcase to me directly. llvm-svn: 116820
* CallGraphSCC passes implicity require CallGraph analysis.Owen Anderson2010-10-131-1/+4
| | | | llvm-svn: 116443
* Now with fewer extraneous semicolons!Owen Anderson2010-10-071-1/+1
| | | | llvm-svn: 115996
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-061-2/+2
| | | | llvm-svn: 110460
* Revert r110396 to fix buildbots.Owen Anderson2010-08-061-2/+2
| | | | llvm-svn: 110410
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-051-2/+2
| | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
* Fix batch of converting RegisterPass<> to INTIALIZE_PASS().Owen Anderson2010-07-211-2/+2
| | | | llvm-svn: 109045
* Clear CachedFunctionInfo upon Pass::releaseMemory. Because ValueMap will abortNick Lewycky2010-05-121-0/+3
| | | | | | | | | | on RAUW of functions, this is a correctness issue instead of a mere memory usage problem. No testcase until the new MergeFunctions can land. llvm-svn: 103653
* Try to keep the cached inliner costs around for a bit longer for big functions.Jakob Stoklund Olesen2010-03-091-0/+3
| | | | | | | | | | | | | | | The Caller cost info would be reset everytime a callee was inlined. If the caller has lots of calls and there is some mutual recursion going on, the caller cost info could be calculated many times. This patch reduces inliner runtime from 240s to 0.5s for a function with 20000 small function calls. This is a more conservative version of r98089 that doesn't break the clang test CodeGenCXX/temp-order.cpp. That test relies on rather extreme inlining for constant folding. llvm-svn: 98099
* Revert r98089, it was breaking a clang test.Jakob Stoklund Olesen2010-03-091-3/+0
| | | | llvm-svn: 98094
* Try to keep the cached inliner costs around for a bit longer for big functions.Jakob Stoklund Olesen2010-03-091-0/+3
| | | | | | | | | | | The Caller cost info would be reset everytime a callee was inlined. If the caller has lots of calls and there is some mutual recursion going on, the caller cost info could be calculated many times. This patch reduces inliner runtime from 240s to 0.5s for a function with 20000 small function calls. llvm-svn: 98089
* Remove includes of Support/Compiler.h that are no longer needed after theNick Lewycky2009-10-251-1/+0
| | | | | | VISIBILITY_HIDDEN removal. llvm-svn: 85043
* Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.Nick Lewycky2009-10-251-1/+1
| | | | | | | Chris claims we should never have visibility_hidden inside any .cpp file but that's still not true even after this commit. llvm-svn: 85042
* Move the InlineCost code from Transforms/Utils to Analysis.Dan Gohman2009-10-131-1/+1
| | | | llvm-svn: 83998
* Use hasDefinitiveInitializer() instead of testing the same thingDan Gohman2009-08-191-1/+1
| | | | | | | by hand, and fix a few places that were using hasInitializer() that appear to depend on the initializer value. llvm-svn: 79441
* Adjustments to last patch based on review.Dale Johannesen2009-01-091-0/+3
| | | | llvm-svn: 61969
* Add InlineCost class for represent the estimated cost of inlining aDaniel Dunbar2008-10-301-1/+1
| | | | | | | | | function. - This explicitly models the costs for functions which should "always" or "never" be inlined. This fixes bugs where such costs were not previously respected. llvm-svn: 58450
* Implement function notes as function attributes. Devang Patel2008-09-261-1/+1
| | | | llvm-svn: 56716
* Large mechanical patch.Devang Patel2008-09-251-1/+1
| | | | | | | | | | | | | | | s/ParamAttr/Attribute/g s/PAList/AttrList/g s/FnAttributeWithIndex/AttributeWithIndex/g s/FnAttr/Attribute/g This sets the stage - to implement function notes as function attributes and - to distinguish between function attributes and return value attributes. This requires corresponding changes in llvm-gcc and clang. llvm-svn: 56622
* Put FN_NOTE_AlwaysInline and others in FnAttr namespace.Devang Patel2008-09-241-1/+1
| | | | llvm-svn: 56527
* Move FN_NOTE_AlwaysInline and other out of ParamAttrs namespace.Devang Patel2008-09-231-1/+1
| | | | | | Do not check isDeclaration() in hasNote(). It is clients' responsibility. llvm-svn: 56524
* Use parameter attribute store (soon to be renamed) forDevang Patel2008-09-231-1/+1
| | | | | | Function Notes also. Function notes are stored at index ~0. llvm-svn: 56511
* Add hasNote() to check note associated with a function.Devang Patel2008-09-221-1/+1
| | | | llvm-svn: 56477
* Add parentheses to make code more readable.Devang Patel2008-09-031-1/+1
| | | | llvm-svn: 55717
* Check noinline note and ignore other notes.Devang Patel2008-09-031-1/+1
| | | | llvm-svn: 55711
* Handle "noinline" note inside the simple inliner.Devang Patel2008-09-031-0/+5
| | | | llvm-svn: 55708
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-131-2/+4
| | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
* Increasing the inline limit from (overly conservative) 200 to 300. Given ↵Evan Cheng2008-03-241-0/+3
| | | | | | | | 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. llvm-svn: 48725
* Allow clients to specify the inline threshold when creatingChris Lattner2008-01-121-0/+5
| | | | | | the inliner pass. Patch by Robert Zeh. llvm-svn: 45903
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Don't crash on bogus llvm.noinline. This is first part of PR1817 (preventing ↵Anton Korobeynikov2007-11-221-0/+4
| | | | | | reduction) llvm-svn: 44281
* Use SmallPtrSet.Devang Patel2007-07-271-2/+3
| | | | llvm-svn: 40560
* Add BasicInliner interface. Devang Patel2007-07-251-246/+6
| | | | | | | This interface allows clients to inline bunch of functions with module level call graph information.:wq llvm-svn: 40486
* fix Transforms/Inline/2007-06-25-WeakInline.ll by not inlining functionsChris Lattner2007-06-251-4/+8
| | | | | | with weak linkage. llvm-svn: 37723
* Inliner pass header file was moved.Tanya Lattner2007-06-191-1/+2
| | | | llvm-svn: 37665
* Formating fixes.Tanya Lattner2007-06-071-4/+4
| | | | llvm-svn: 37491
* Instruct the inliner to obey the noinline attribute. Add test case.Tanya Lattner2007-06-061-1/+43
| | | | llvm-svn: 37481
* Fix PR1395, by passing the ID correctlyChris Lattner2007-05-061-0/+1
| | | | llvm-svn: 36894
* Fix typo in comment.Nick Lewycky2007-05-061-1/+1
| | | | llvm-svn: 36873
* Drop 'const'Devang Patel2007-05-031-2/+2
| | | | llvm-svn: 36662
* Use 'static const char' instead of 'static const int'.Devang Patel2007-05-021-2/+2
| | | | | | | Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. llvm-svn: 36652
* Do not use typeinfo to identify pass in pass manager.Devang Patel2007-05-011-0/+2
| | | | llvm-svn: 36632
* Apply the VISIBILITY_HIDDEN field to the remaining anonymous classes inReid Spencer2007-02-051-3/+4
| | | | | | | the Transforms library. This reduces debug library size by 132 KB, debug binary size by 376 KB, and reduces link time for llvm tools slightly. llvm-svn: 33939
* Inherit CallGraphSCCPass directly from Pass.Devang Patel2007-01-261-1/+1
| | | | llvm-svn: 33514
* For PR950:Reid Spencer2006-11-271-6/+3
| | | | | | | | | | The long awaited CAST patch. This introduces 12 new instructions into LLVM to replace the cast instruction. Corresponding changes throughout LLVM are provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the exception of 175.vpr which fails only on a slight floating point output difference. llvm-svn: 31931
* For PR786:Reid Spencer2006-11-021-1/+1
| | | | | | | | | | 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. llvm-svn: 31380
* Make inlining costs more accurate.Chris Lattner2006-09-091-3/+26
| | | | llvm-svn: 30231
* eliminate RegisterOpt. It does the same thing as RegisterPass.Chris Lattner2006-08-271-1/+1
| | | | llvm-svn: 29925
* Permit inlining functions that contain dynamic allocations now thatChris Lattner2006-01-131-27/+4
| | | | | | | InlineFunction handles this case safely. This implements Transforms/Inline/dynamic_alloca_test.ll. llvm-svn: 25288
* teach the inliner about coldcc and noreturn functionsChris Lattner2005-05-181-0/+15
| | | | llvm-svn: 22113
OpenPOWER on IntegriCloud