llvm-6502/lib/Transforms/IPO
Chris Lattner 199ba42cbf Implement a new optimization in the inliner: if inlining multiple
calls into a function and if the calls bring in arrays, try to merge
them together to reduce stack size.  For example, in the testcase
we'd previously end up with 4 allocas, now we end up with 2 allocas.

As described in the comments, this is not really the ideal solution
to this problem, but it is surprisingly effective.  For example, on
176.gcc, we end up eliminating 67 arrays at "gccas" time and another
24 at "llvm-ld" time.

One piece of concern that I didn't look into: at -O0 -g with
forced inlining this will almost certainly result in worse debug
info.  I think this is acceptable though given that this is a case
of "debugging optimized code", and we don't want debug info to
prevent the optimizer from doing things anyway.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80215 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 06:29:33 +00:00
..
ArgumentPromotion.cpp prune the #includes in raw_ostream.h by moving a 2009-08-24 03:52:50 +00:00
CMakeLists.txt Update CMake files. 2009-07-21 17:43:20 +00:00
ConstantMerge.cpp Use hasDefinitiveInitializer() instead of testing the same thing 2009-08-19 18:20:44 +00:00
DeadArgumentElimination.cpp remove a few DOUTs here and there. 2009-08-23 06:35:02 +00:00
DeadTypeElimination.cpp Get rid of the Pass+Context magic. 2009-07-22 00:24:57 +00:00
ExtractGV.cpp Push LLVMContexts through the IntegerType APIs. 2009-08-13 21:58:54 +00:00
FunctionAttrs.cpp Fix PR3754: don't mark functions that wrap MallocInst with 2009-05-06 08:42:00 +00:00
GlobalDCE.cpp Remove dead metadata. 2009-08-11 06:31:57 +00:00
GlobalOpt.cpp eliminate the "Value" printing methods that print to a std::ostream. 2009-08-23 04:37:46 +00:00
IndMemRemoval.cpp Push LLVMContexts through the IntegerType APIs. 2009-08-13 21:58:54 +00:00
InlineAlways.cpp Adjustments to last patch based on review. 2009-01-09 01:30:11 +00:00
Inliner.cpp Implement a new optimization in the inliner: if inlining multiple 2009-08-27 06:29:33 +00:00
InlineSimple.cpp Use hasDefinitiveInitializer() instead of testing the same thing 2009-08-19 18:20:44 +00:00
Internalize.cpp eliminate uses of cerr() 2009-08-23 07:05:07 +00:00
IPConstantPropagation.cpp Push LLVMContexts through the IntegerType APIs. 2009-08-13 21:58:54 +00:00
IPO.cpp add a bunch more passes to the C bindings (PR3734), patch by 2009-03-06 16:52:18 +00:00
LoopExtractor.cpp convert LoopInfo.h and GraphWriter.h to use raw_ostream 2009-08-23 07:19:13 +00:00
LowerSetJmp.cpp Push LLVMContexts through the IntegerType APIs. 2009-08-13 21:58:54 +00:00
Makefile Removed trailing whitespace from Makefiles. 2009-01-09 16:44:42 +00:00
MergeFunctions.cpp Rename Instruction::isIdenticalTo to Instruction::isIdenticalToWhenDefined, 2009-08-25 22:11:20 +00:00
PartialInlining.cpp Get rid of the Pass+Context magic. 2009-07-22 00:24:57 +00:00
PartialSpecialization.cpp Get rid of the Pass+Context magic. 2009-07-22 00:24:57 +00:00
PruneEH.cpp Push LLVMContexts through the IntegerType APIs. 2009-08-13 21:58:54 +00:00
RaiseAllocations.cpp Push LLVMContexts through the IntegerType APIs. 2009-08-13 21:58:54 +00:00
StripDeadPrototypes.cpp Get rid of the Pass+Context magic. 2009-07-22 00:24:57 +00:00
StripSymbols.cpp Revert 79977. It causes llvm-gcc bootstrap failures on some platforms. 2009-08-26 05:01:18 +00:00
StructRetPromotion.cpp remove a few DOUTs here and there. 2009-08-23 06:35:02 +00:00