llvm-6502/lib/Transforms
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
..
Hello Initial version of automake Makefile.am file. 2004-10-10 22:20:40 +00:00
Instrumentation Initial version of automake Makefile.am file. 2004-10-10 22:20:40 +00:00
IPO This patch implements two things (sorry). 2004-10-11 05:54:41 +00:00
Scalar Initial version of automake Makefile.am file. 2004-10-10 22:20:40 +00:00
Utils Initial version of automake Makefile.am file. 2004-10-10 22:20:40 +00:00
ExprTypeConvert.cpp Add includes and use std:: for standard library calls to make code 2004-09-28 14:42:44 +00:00
LevelRaise.cpp Prototype more accurately 2004-09-20 04:43:57 +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
TransformInternals.cpp Merge i*.h headers into Instructions.h as part of bug403. 2004-07-29 12:17:34 +00:00
TransformInternals.h Put all LLVM code into the llvm namespace, as per bug 109. 2003-11-11 22:41:34 +00:00