summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/InlineSimple.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Remove trailing whitespaceMisha Brukman2005-04-211-3/+3
| | | | llvm-svn: 21427
* This mega patch converts us from using Function::a{iterator|begin|end} toChris Lattner2005-03-151-1/+1
| | | | | | | | using Function::arg_{iterator|begin|end}. Likewise Module::g* -> Module::global_*. This patch is contributed by Gabor Greif, thanks! llvm-svn: 20597
* Ignore debugger intrinsics when doing inlining size computations.Chris Lattner2004-11-221-1/+2
| | | | llvm-svn: 18109
* Change this back so that I get stable numbers to reflect the change from theChris Lattner2004-11-091-1/+1
| | | | | | nightly testers llvm-svn: 17646
* VERY large functions that are only called from one place are not reallyChris Lattner2004-11-071-1/+1
| | | | | | | exciting to inline. Only inline medium or small sized functions with a single call site. llvm-svn: 17588
* 'Pass' should now not be derived from by clients. Instead, they should deriveChris Lattner2004-09-201-1/+1
| | | | | | | from ModulePass. Instead of implementing Pass::run, then should implement ModulePass::runOnModule. llvm-svn: 16436
* This patch makes the inliner refuse to inline functions that have allocaChris Lattner2004-08-121-25/+57
| | | | | | | | | | instructions in the body of the function (not the entry block). This fixes test/Programs/SingleSource/Regression/C/2004-08-12-InlinerAndAllocas.c and test/Programs/External/SPEC/CINT2000/176.gcc on zion. This should obviously be pulled into 1.3. llvm-svn: 15684
* bug 122:Reid Spencer2004-07-181-3/+2
| | | | | | - Minimize redundant isa<GlobalValue> usage llvm-svn: 14948
* Remove the "really gross hacks" that are there to deal with recursive functions.Chris Lattner2004-04-081-7/+1
| | | | | | | | Now we collect all of the call sites we are interested in inlining, then inline them. This entirely avoids issues with trying to inline a call site we got by inlining another call site. This also eliminates iterator invalidation issues. llvm-svn: 12770
* Restore old inlining heuristic. As the comment indicates, this is a nastyChris Lattner2004-03-151-1/+8
| | | | | | horrible hack. llvm-svn: 12423
* This change makes two big adjustments.Chris Lattner2004-03-131-11/+49
| | | | | | | | | | * Be a lot more accurate about what the effects will be when inlining a call to a function when an argument is an alloca. * Dramatically reduce the penalty for inlining a call in a large function. This heuristic made it almost impossible to inline a function into a large function, no matter how small the callee is. llvm-svn: 12363
* Considering that CI is not even IN SCOPE here, I wooda thought the compilerChris Lattner2003-11-211-1/+1
| | | | | | would have caught this. *sigh* llvm-svn: 10142
* * Finegrainify namespacificationChris Lattner2003-11-211-30/+99
| | | | | | | | * Make the cost metric for passing constants in as arguments to functions MUCH more accurate, by actually estimating the amount of code that will be constant propagated away. llvm-svn: 10136
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-111-0/+4
| | | | llvm-svn: 9903
* Added LLVM project notice to the top of every C++ source file.John Criswell2003-10-201-0/+7
| | | | | | Header files will be on the way. llvm-svn: 9298
* Reorder for minor efficiency gainChris Lattner2003-10-201-1/+1
| | | | llvm-svn: 9285
* Decrease usage of use_size()Chris Lattner2003-10-151-1/+1
| | | | llvm-svn: 9135
* Fix spelling.Misha Brukman2003-10-101-1/+1
| | | | llvm-svn: 9027
* Fix bugzilla bug #5Chris Lattner2003-10-071-1/+6
| | | | llvm-svn: 8930
* Speed up the predicate used to decide when to inline by caching the sizeChris Lattner2003-10-061-13/+28
| | | | | | | | | | | | | | | | of callees between executions. On eon, in release mode, this changes the inliner from taking 11.5712s to taking 2.2066s. In debug mode, it went from taking 14.4148s to taking 7.0745s. In release mode, this is a 24.7% speedup of gccas, in debug mode, it's a total speedup of 11.7%. This also makes it slightly more aggressive. This could be because we are not judging the size of the functions quite as accurately as before. When we start looking at the performance of the generated code, this can be investigated further. llvm-svn: 8893
* Heavily refactor code:Chris Lattner2003-08-311-127/+27
| | | | | | | | | * Separate the policy decisions into a derived class [InlineSimple] * Move the inlining mechanics into a base class [Inliner] * Change the inliner to be an SCCPass, making it more structured and eventually pipelinable with other SCC passes llvm-svn: 8257
* Inline invoke instructions as well as call instructionsChris Lattner2003-08-241-13/+18
| | | | llvm-svn: 8107
* Big diff for a small change: delete inlined functions if all callees haveChris Lattner2003-08-241-21/+32
| | | | | | | inlined the function. Implements: Inline/inline_dce.ll llvm-svn: 8101
* DEBUG got moved to Support/Debug.hChris Lattner2003-08-011-1/+2
| | | | llvm-svn: 7492
* Allow the inlining limit to be controlled from the command line!Chris Lattner2003-06-281-1/+5
| | | | llvm-svn: 6929
* * Separate all of the grunt work of inlining out into the Utils library.Chris Lattner2003-05-291-169/+127
| | | | | | * Make the function inliner _significantly_ smarter. :) llvm-svn: 6396
* Don't inline functions that take variable numbers of arguments!Chris Lattner2003-05-081-3/+4
| | | | llvm-svn: 6024
* Remove using declChris Lattner2003-05-081-2/+1
| | | | llvm-svn: 6023
* Remove unnecesary &*'sChris Lattner2003-04-231-1/+1
| | | | llvm-svn: 5872
* Fix references to functionsChris Lattner2003-01-131-6/+8
| | | | llvm-svn: 5222
* Minor changes to cloning interfaceChris Lattner2002-11-191-4/+9
| | | | llvm-svn: 4770
* Rework inline pass to use cloning infrastructure to do the dirty workChris Lattner2002-11-191-112/+38
| | | | llvm-svn: 4766
* Start using the new function cloning headerChris Lattner2002-11-191-1/+2
| | | | llvm-svn: 4764
* Updates to work with recent Statistic's changes:Chris Lattner2002-10-011-3/+2
| | | | | | | | | | | | * Renamed StatisticReporter.h/cpp to Statistic.h/cpp * Broke constructor to take two const char * arguments instead of one, so that indendation can be taken care of automatically. * Sort the list by pass name when printing * Make sure to print all statistics as a group, instead of randomly when the statistics dtors are called. * Updated ProgrammersManual with new semantics. llvm-svn: 4001
* Don't insert a PHI node to merge "returns" from an inlined function if thereChris Lattner2002-09-221-1/+12
| | | | | | is only a single return from the function! llvm-svn: 3878
* Fix FunctionInlining pass assertion failure:Chris Lattner2002-09-161-1/+1
| | | | | | ilist:104: failed assertion `Traits::getNext(NodePtr) != 0 && "Dereferencing end()!"' llvm-svn: 3768
* Clean up code due to auto-insert constructorsChris Lattner2002-09-101-4/+3
| | | | llvm-svn: 3666
* * Add support for different "PassType's"Chris Lattner2002-07-261-1/+1
| | | | | | | | | | | | | | | * Add new RegisterOpt/RegisterAnalysis templates for registering passes that are to show up in opt or analyze * Register Analyses now * Change optimizations to use RegisterOpt instead of RegisterPass * Add support for different "PassType's" * Add new RegisterOpt/RegisterAnalysis templates for registering passes that are to show up in opt or analyze * Register Analyses now * Change optimizations to use RegisterOpt instead of RegisterPass * Remove getPassName implementations from various subclasses llvm-svn: 3113
* * Remove getPassName implementationChris Lattner2002-07-231-1/+1
| | | | | | * Register all Passes llvm-svn: 3015
* MEGAPATCH checkin.Chris Lattner2002-06-251-55/+38
| | | | | | For details, See: docs/2002-06-25-MegaPatchInfo.txt llvm-svn: 2779
* Add support for printing out statistics information when -stats is added toChris Lattner2002-05-101-0/+4
| | | | | | the command line llvm-svn: 2601
* Eliminate duplicate or unneccesary #include'sChris Lattner2002-04-291-1/+0
| | | | llvm-svn: 2397
* Add new optional getPassName() virtual function that a Pass can overrideChris Lattner2002-04-291-0/+1
| | | | | | to make debugging output a lot nicer. llvm-svn: 2395
OpenPOWER on IntegriCloud