[llvm-commits] [Patch] Extend IRBuilder to be able to set fast-math flags

Michael Ilseman milseman at apple.com
Tue Nov 27 18:31:31 PST 2012


On Nov 27, 2012, at 5:34 PM, Evan Cheng <evan.cheng at apple.com> wrote:

> This changes the API somewhat. Rather than passing FastMathFlags to every invoking of CreateAdd(), etc., user needs to call Builder.SetFastMathFlags(FMF) first. Why do you choose this approach?
> 

This approach is much more convenient to the user and follows the precedent for InsertPoint and DefaultFPMathTag. The most common use of fast-math is to issue batches of similarly flagged instructions (e.g. a function body) together, and IRBuilder seems designed for this kind of convenience.

> Evan
> 
> On Nov 27, 2012, at 5:07 PM, Michael Ilseman <milseman at apple.com> wrote:
> 
>> Attached are patches to extend IRBuilder to be able to set fast-math flags, and a test case.
>> 
>> <0001-Fast-math-comments-and-convenience-method.patch><0002-Fast-math-Extend-IRBuilder-to-have-settable-FastMath.patch><0003-Fast-math-IRBuilder-test-for-creating-instructions-w.patch>_______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 




More information about the llvm-commits mailing list