Thanks for the updates!<div><br></div><div>Minor comments:</div><div><div>+  if (!Accuracy)</div><div>+    // If it's not a floating point number then it must be 'fast'.</div><div>+    return HUGE_VALF;</div></div>
<div><br></div><div>Can we add an assert instead of a comment? It's just as documenting and will catch any goofs.</div><div><br></div><div><div>+  // If it's not a floating point number then it must be 'fast'.</div>
<div>+  return !isa<ConstantFP>(MD->getOperand(0));</div></div><div><br></div><div>Here as well.</div><div><br></div><div><div>+    if (ConstantFP *CFP0 = dyn_cast_or_null<ConstantFP>(Op0)) {</div><div>+      APFloat Accuracy = CFP0->getValueAPF();</div>
<div>+      Assert1(Accuracy.isNormal() && !Accuracy.isNegative(),</div><div>+              "fpmath accuracy not a positive number!", &I);</div></div><div><br></div><div>To be pedantic for a moment, zero is not a positive number. What about asserting these individually to give us more clear asserts if they fire? That also makes the string easier to write: "fpmath accuracy is a negative number!".</div>
<div><br></div><div><div>+  /// SetDefaultFPMathTag - Set the floating point math metadata to be used.</div><div>+  void SetDefaultFPMathTag(MDNode *FPMathTag) { DefaultFPMathTag = FPMathTag; }</div></div><div><br></div><div>
This should be 'setDefault...' much like 'getDefault...' above.</div><div><br></div><div><div>+  Instruction *AddFPMathTag(Instruction *I, MDNode *FPMathTag) const {</div></div><div><br></div><div>Another bad case, but I think this instruction is gone...</div>
<div><br></div><div><div>+    MDString *GetFastString() const {</div><div>+      return CreateString("fast");</div><div>+    }</div></div><div><br></div><div>'getFastString'.</div><div><br></div><div><div>
+    /// CreateFastFPMath - Return metadata with appropriate settings for 'fast</div><div>+    /// math'.</div><div><br></div><div>I would prefer the more modern doxygen style:</div><div><br></div><div>/// \brief Return metadata ...</div>
<div><br></div><div>+    MDNode *CreateFastFPMath() {</div><div><br></div><div>Capitalization.</div><div><br></div><div>The capitalization and doxygen style comments apply to the next function as well.</div></div><div><br>
</div><div><br></div><div>Both the Clang and DragonEgg patches look good, but both need test cases. =]</div><div><br></div>