summaryrefslogtreecommitdiffstats
path: root/llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-10-06 20:57:02 +0000
committerChris Lattner <sabre@nondot.org>2004-10-06 20:57:02 +0000
commit1f849a08a353a836c85382185c0d202c5154b9e8 (patch)
treef387f1071405fe90adf12c592bacd4771addb07c /llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp
parent645bcf6c5db4ad1bb49cb26f08c8c2b3e3bba92d (diff)
downloadbcm5719-llvm-1f849a08a353a836c85382185c0d202c5154b9e8.tar.gz
bcm5719-llvm-1f849a08a353a836c85382185c0d202c5154b9e8.zip
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. llvm-svn: 16793
Diffstat (limited to 'llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud