llvm-6502/lib/Transforms
Chris Lattner e47ba74b07 Implement GlobalConstifier/trivialstore.llx, and also do some
simplifications of the resultant program to avoid making later passes
do it all.

This allows us to constify globals that just have the same constant that
they are initialized stored into them.

Suprisingly this comes up ALL of the freaking time, dozens of times in
SPEC, 30 times in vortex alone.

For example, on 256.bzip2, it allows us to constify these two globals:

%smallMode = internal global ubyte 0             ; <ubyte*> [#uses=8]
%verbosity = internal global int 0               ; <int*> [#uses=49]

Which (with later optimizations) results in the bytecode file shrinking
from 82286 to 69686 bytes!  Lets hear it for IPO :)

For the record, it's nuking lots of "if (verbosity > 2) { do lots of stuff }"
code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16793 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-06 20:57:02 +00:00
..
Hello Add a newline 2004-09-15 17:53:52 +00:00
Instrumentation Add accessor function. 2004-09-30 20:14:29 +00:00
IPO Implement GlobalConstifier/trivialstore.llx, and also do some 2004-10-06 20:57:02 +00:00
Scalar Instcombine: -(X sdiv C) -> (X sdiv -C), tested by sub.ll:test16 2004-10-06 15:08:25 +00:00
Utils Do not insert trivially dead select instructions, which allows us to 2004-09-29 05:43:32 +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
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