<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Nov 27, 2012 at 6:31 PM, Michael Ilseman <span dir="ltr"><<a href="mailto:milseman@apple.com" target="_blank">milseman@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">On Nov 27, 2012, at 5:34 PM, Evan Cheng <<a href="mailto:evan.cheng@apple.com">evan.cheng@apple.com</a>> wrote:<br>

<br>
> 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?<br>
><br>
<br>
</div>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.<br>

<div class=""><div class="h5"><br>
> </div></div></blockquote><div><br></div><div>Sounds good here.</div><div><br></div><div>One nit on the patch:</div><div><br></div><div><div>+  Instruction *AddFPMathAttributes(Instruction *I,</div><div>+                         MDNode *FPMathTag,</div>
<div>+                         FastMathFlags FMF) const {</div></div><div><br></div><div>Indenting.</div><div><br></div><div>-eric</div></div></div>