I tried to understand what the difference in optimization level and I got confuse... When I use *llc -O1, -O2, or -O3*, I always got the same assembly code in my test program. Can anybody teach me that what's the actual effect for using different optimization level ? Best, Foster -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110607/3ebcde12/attachment.html>
On Mon, Jun 6, 2011 at 9:49 AM, don <dondum113 at gmail.com> wrote:> I tried to understand what the difference in optimization level and I got > confuse... > When I use llc -O1, -O2, or -O3, I always got the same assembly code in my > test program. > Can anybody teach me that what's the actual effect for using different > optimization level ?There really isn't a big difference between llc at -O1, -O2, and -O3; IIRC, some optimizations are slightly more aggressive, but you normally won't notice much difference. Most of the differences are in the IR optimization passes (which can be run with "opt -O3" etc.). -Eli
Possibly Parallel Threads
- LLVMTargetMachine with optimization level passed from clang.
- LLVMTargetMachine with optimization level passed from clang.
- LLVMTargetMachine with optimization level passed from clang.
- LLVMTargetMachine with optimization level passed from clang.
- [LLVMdev] Optimization Levels - Need The Details