[llvm-commits] [Patch] Extend IRBuilder to be able to set fast-math flags
Eric Christopher
echristo at gmail.com
Tue Nov 27 20:24:28 PST 2012
On Tue, Nov 27, 2012 at 6:31 PM, Michael Ilseman <milseman at apple.com> wrote:
> 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.
>
> >
>
Sounds good here.
One nit on the patch:
+ Instruction *AddFPMathAttributes(Instruction *I,
+ MDNode *FPMathTag,
+ FastMathFlags FMF) const {
Indenting.
-eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121127/e757b8b0/attachment.html>
More information about the llvm-commits
mailing list