llvm/lib/Transforms/IPO
Chris Lattner 30ba5690cf This patch implements two things (sorry).
First, it allows SRA of globals that have embedded arrays, implementing
GlobalOpt/globalsra-partial.llx.  This comes up infrequently, but does allow,
for example, deleting several stores to dead parts of globals in dhrystone.

Second, this implements GlobalOpt/malloc-promote-*.llx, which is the
following nifty transformation:

Basically if a global pointer is initialized with malloc, and we can tell
that the program won't notice, we transform this:

struct foo *FooPtr;
...
  FooPtr = malloc(sizeof(struct foo));
...
  FooPtr->A   FooPtr->B

Into:

struct foo FooPtrBody;
...
   FooPtrBody.A  FooPtrBody.B

This comes up occasionally, for example, the 'disp' global in 183.equake (where
the xform speeds the CBE version of the program up from 56.16s to 52.40s (7%)
on apoc), and the 'desired_accept', 'fixLRBT', 'macroArray', & 'key_queue'
globals in 300.twolf (speeding it up from 22.29s to 21.55s (3.4%)).

The nice thing about this xform is that it exposes the resulting global to
global variable optimization and makes alias analysis easier in addition to
eliminating a few loads.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16916 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-11 05:54:41 +00:00
..
ArgumentPromotion.cpp 'Pass' should now not be derived from by clients. Instead, they should derive 2004-09-20 04:48:05 +00:00
ConstantMerge.cpp 'Pass' should now not be derived from by clients. Instead, they should derive 2004-09-20 04:48:05 +00:00
DeadArgumentElimination.cpp 'Pass' should now not be derived from by clients. Instead, they should derive 2004-09-20 04:48:05 +00:00
DeadTypeElimination.cpp 'Pass' should now not be derived from by clients. Instead, they should derive 2004-09-20 04:48:05 +00:00
ExtractFunction.cpp 'Pass' should now not be derived from by clients. Instead, they should derive 2004-09-20 04:48:05 +00:00
FunctionResolution.cpp Disable the 'WARNING: Found global types that are not compatible' warning 2004-09-30 00:12:29 +00:00
GlobalDCE.cpp 'Pass' should now not be derived from by clients. Instead, they should derive 2004-09-20 04:48:05 +00:00
GlobalOpt.cpp This patch implements two things (sorry). 2004-10-11 05:54:41 +00:00
Inliner.cpp Fix the inliner to always delete any edges from the external call node to 2004-09-18 21:37:03 +00:00
Inliner.h Simplify the interface and remove an unneeded #include 2004-05-23 21:21:35 +00:00
InlineSimple.cpp 'Pass' should now not be derived from by clients. Instead, they should derive 2004-09-20 04:48:05 +00:00
Internalize.cpp 'Pass' should now not be derived from by clients. Instead, they should derive 2004-09-20 04:48:05 +00:00
IPConstantPropagation.cpp 'Pass' should now not be derived from by clients. Instead, they should derive 2004-09-20 04:48:05 +00:00
LoopExtractor.cpp 'Pass' should now not be derived from by clients. Instead, they should derive 2004-09-20 04:48:05 +00:00
LowerSetJmp.cpp Comment cleanups 2004-10-07 06:00:24 +00:00
Makefile Added LLVM copyright notice to Makefiles. 2003-10-20 22:26:57 +00:00
Makefile.am Initial version of automake Makefile.am file. 2004-10-10 22:20:40 +00:00
PruneEH.cpp 'Pass' should now not be derived from by clients. Instead, they should derive 2004-09-20 04:48:05 +00:00
RaiseAllocations.cpp 'Pass' should now not be derived from by clients. Instead, they should derive 2004-09-20 04:48:05 +00:00