Displaying 2 results from an estimated 2 matches for "codegenlevel".
2012 Jun 30
0
[LLVMdev] llc -O# / opt -O# differences
Dimitri Tcaciuc wrote:
> Is the llc/opt difference expected?
Yes. "opt" runs the optimizers, which take LLVM IR as input and produce
LLVM IR as output. "opt -O2 -debug-pass=Arguments" will show you a list
of the individual optimizations (and analyses) that opt -O2 performs.
It's possible to run them individually (opt -scalarrepl -instcombine) to
create a list
2012 Jun 30
2
[LLVMdev] llc -O# / opt -O# differences
...## %entry
movq %rdi, -24(%rsp)
movq %rsi, -16(%rsp)
movq -24(%rsp), %rax
movsd (%rax), %xmm0
subsd (%rsi), %xmm0
movsd %xmm0, -8(%rsp)
mulsd %xmm0, %xmm0
ret
.cfi_endproc
This matches the results of LLVMCreateTargetMachine with
CodeGenLevelAggressive followed by LLVMTargetMachineEmitToFile which
I'm using.
.
Is the llc/opt difference expected? I'm a bit confused since I'd
expect same -O level running the same optimization passes. I have to
admit I'm not well versed in assembly but to me it looks like opt
produces somet...