llvm-6502/lib/Transforms/Scalar
Chris Lattner c1526a9da1 Fix a major pessimization in the instcombiner. If an allocation instruction
is only used by a cast, and the casted type is the same size as the original
allocation, it would eliminate the cast by folding it into the allocation.

Unfortunately, it was placing the new allocation instruction right before
the cast, which could pull (for example) alloca instructions into the body
of a function.  This turns statically allocatable allocas into expensive
dynamically allocated allocas, which is bad bad bad.

This fixes the problem by placing the new allocation instruction at the same
place the old one was, duh. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13289 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-30 04:37:52 +00:00
..
ADCE.cpp Simplify code a bit, and fix a bug that was breaking perlbmk 2004-04-10 18:06:21 +00:00
BasicBlockPlacement.cpp Remove obsolete comment. Unreachable blocks will automatically be left at the 2004-02-11 05:20:50 +00:00
ConstantProp.cpp Changes to fix up the inst_iterator to pass to boost iterator checks. This 2004-04-27 15:13:33 +00:00
CorrelatedExprs.cpp Remove use of the ConstantHandling interfaces 2004-01-12 19:12:50 +00:00
DCE.cpp Changes to fix up the inst_iterator to pass to boost iterator checks. This 2004-04-27 15:13:33 +00:00
DecomposeMultiDimRefs.cpp Finegrainify namespacification 2004-01-09 06:02:20 +00:00
GCSE.cpp Add support for removing invoke instructions 2004-04-12 05:15:13 +00:00
IndVarSimplify.cpp Move the scev expansion code into this pass, where it belongs. There is 2004-04-23 21:29:48 +00:00
InstructionCombining.cpp Fix a major pessimization in the instcombiner. If an allocation instruction 2004-04-30 04:37:52 +00:00
LICM.cpp Move isLoopInvariant to the Loop class 2004-04-18 22:46:08 +00:00
LoopUnroll.cpp Fix PR325 2004-04-20 20:26:03 +00:00
LoopUnswitch.cpp Initial checkin of a simple loop unswitching pass. It still needs work, 2004-04-19 18:07:02 +00:00
Makefile Added LLVM copyright notice to Makefiles. 2003-10-20 22:26:57 +00:00
PiNodeInsertion.cpp Finegrainify namespacification 2004-01-09 06:02:20 +00:00
PRE.cpp Finegrainify namespacification 2004-01-09 06:02:20 +00:00
Reassociate.cpp Finegrainify namespacification 2004-01-09 06:02:20 +00:00
ScalarReplAggregates.cpp Support getelementptr instructions which use uint's to index into structure 2004-04-05 01:30:19 +00:00
SCCP.cpp Add SCCP support for constant folding calls, implementing: 2004-04-13 19:43:54 +00:00
SimplifyCFG.cpp Finegrainify namespacification 2004-01-09 06:02:20 +00:00
SymbolStripping.cpp Update obsolete comments 2004-01-10 21:36:49 +00:00
TailDuplication.cpp Make the tail duplication threshold accessible from the command line instead of hardcoded 2004-04-18 00:52:43 +00:00
TailRecursionElimination.cpp Adjust to the new BasicBlock ctor, which requires a function parameter 2004-02-04 03:58:28 +00:00