What is the optimization level means?

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.).