[LLVMdev] Which transform passes to apply?

Duncan Sands baldrick at free.fr
Tue Dec 4 01:38:08 PST 2012


Hi Josh,

On 04/12/12 06:23, Josh Klontz wrote:
> Thanks Duncan, GVN/EarlyCSE worked as suggested. Any pointers on how to
> optimize out:
> %accumulate = fadd double %6, 0.000000e+00

instcombine, however this transform is only correct if you are adding -0.0
so you won't get it without "fast math", and in 3.2 I think it will only be
done by codegen (llc).  The situation should be better in 3.3 since a bunch
of fast-math support started going in to the IR level transforms.

>
> Using the 3.1 release and the C++ API, I can't figure out how
> FPMathOperator, TargetOptions, nor IRBuilder::SetDefaultFPMathTag work. I
> also don't see any floating point math transformation passes. I did see
> IRBuilder::SetFastMathFlags, do I need to update to 3.2 and use this call?

Please open a bug report since even in mainline this transform isn't done yet
(as fast-math support at the IR level only just got going).

Ciao, Duncan.

>
>
>
>
> --
> View this message in context: http://llvm.1065342.n5.nabble.com/Which-transform-passes-to-apply-tp52111p52211.html
> Sent from the LLVM - Dev mailing list archive at Nabble.com.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>




More information about the llvm-dev mailing list