[LLVMdev] Optimization Levels - Need The Details
Vikram Adve
vadve at cs.uiuc.edu
Tue Aug 17 09:01:55 PDT 2004
Reid,
I have one substantial change to suggest to this. I think the
distinction between module-level and cross-module optimization is
artificial and unnecessary in LLVM because transparent link-time
optimization makes intra-module and cross-module optimizations
indistiguishable. It *is* important to distinguish between fast and
slow optimizations. Because of this, I would suggest a simpler scheme:
-O0 and -O1 -- unchanged
-O2 -- fast function-, module- and program-level
optimizations
-O3 -- aggressive (potentially slow) function-, module- and
program-level optimizations
A second important distinction that doesn't exist in LLVM today is
between "always-safe" and "sometimes-unsafe optimizations." The latter
class includes reordering optimizations on floating point code. We
need to identify these and provide a flag to disable them all (in
addition to the individual optimization on/off flags).
In the near future, I think we should plan another flag for runtime
optimization. It should *not* be just another level in the above list
(like -O4) because it should be orthogonal to the above set of choices,
i.e., you can combine runtime opt. with any level of development-time
opt:
-Oruntime -- transparent run-time optimization (or -Odynamic)
--Vikram
http://www.cs.uiuc.edu/~vadve
http://llvm.cs.uiuc.edu/
On Aug 14, 2004, at 7:25 PM, Reid Spencer wrote:
> Folks,
>
> I'm at the point in developing llvmc (Compiler Driver) where I need to
> get the details on the specific optimization arguments that the -O
> family of options should (by default) issue to "opt". I'm soliciting
> your feedback on this so I can start testing optimization. Hopefully
> you
> can provide it by early this coming week.
>
> For clarity, the -O options are currently defined as:
>
> -O0 - synonym for -O1
> -O1 - options to speed up compilation, not execution
> -O2 - simple/fast module/function optimizations
> -O3 - aggressive module/function optimizations (as well as -O2)
> -O4 - simple/fast link time optimizations (as well as -O3)
> -O5 - aggressive link time optimizations (as well as -O4)
>
> What I'm looking for is a list of equivalent "opt" options for each of
> the five optimization levels defined above. This supports language
> front
> ends that don't do their own optimization (e.g. Stacker).
>
> Thanks,
>
> Reid.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2570 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20040817/7382db9c/attachment.bin>
More information about the llvm-dev
mailing list