[PATCH] D34163: Add strictfp attribute to prevent unwanted optimizations of libm calls

Andy Kaylor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 6 15:22:56 PDT 2017


andrew.w.kaylor added inline comments.


================
Comment at: lib/AsmParser/LLToken.h:212
   kw_swifterror,
   kw_swiftself,
   kw_uwtable,
----------------
craig.topper wrote:
> Wow how many different not alphabetical orders do we have on these keywords?
Yeah,  if you don't object I'm going to leave this patch in the "approximately alphabetical" state it's in and maybe clean them all up afterward in a separate patch.


================
Comment at: lib/Transforms/Utils/SimplifyLibCalls.cpp:2055
+  // Check for floating point library functions.
+  if (!TLI->getLibFunc(*Callee, Func) || !TLI->has(Func))
+    return nullptr;
----------------
craig.topper wrote:
> Doesnt' the caller already check getLibFunc and TLI->has?
Yes, but I need to call getLibFunc() here to get the Func (or I could pass it as an argument).  I chose to do it this way to mimic the behavior of optimizeStringMemoryLibCall(), but I suppose there is some benefit to avoiding the churn that getLibFunc goes through with the StringRef.


Repository:
  rL LLVM

https://reviews.llvm.org/D34163





More information about the llvm-commits mailing list