[PATCH] D62731: Add support for options -frounding-math, -ftrapping-math, -ffp-model=, and -ffp-exception-behavior=, : Specify floating point behavior

Kevin P. Neal via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 2 12:53:22 PST 2019


kpn added inline comments.


================
Comment at: llvm/include/llvm/IR/IRBuilder.h:268
       I->addAttribute(AttributeList::FunctionIndex, Attribute::StrictFP);
-    setConstrainedFPFunctionAttr();
   }
----------------
mibintc wrote:
> @kpn I got rid of this line because the function attribute is being set in CodeGen
Makes sense.


================
Comment at: llvm/unittests/IR/IRBuilderTest.cpp:186
   Builder.setIsFPConstrained(true);
+  auto Parent = BB->getParent();
+  Parent->addFnAttr(Attribute::StrictFP);
----------------
mibintc wrote:
> @kpn I changed the test to create the function attribute a priori since it will be set in CodeGen before passing to IRBuilder
Right, of course.

I'm not going to quibble over the use of auto. It's fine I think.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62731/new/

https://reviews.llvm.org/D62731





More information about the llvm-commits mailing list