imageworks/OpenShadingLanguage — pull request #108 by lgritz (2012-02-02 00:04:31+00:00)
Title: Review: Overhaul the LLVM JIT optimization strategy

Been sitting on this for a while, sorry.

Overhaul the LLVM JIT optimization strategy in the wake of adding LLVM 3.0 support. Remove lots of dead code and comments.

New attribute "llvm_optimize" controls the optimization passes. The default, 0, means to use the same optimization passes we always did. When compiling against LLVM 3.0, values 1-3 correspond to using approximately the set of optimizations that clang would use for -O1, -O2, -O3. Possibly values >3 will someday mean other pass sets or strategies. At this point, it's all experimental, and I don't particularly recommend anything other than 0 (old pass strategy), but I'm doing benchmarks to find out if anything else is significantly better.