[PATCH] D18564: Remove HasFnAttribute guards to getFnAttribute calls

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 29 14:09:31 PDT 2016


hans added a comment.

Thanks for fixing this!


================
Comment at: lib/Target/ARM/ARMTargetMachine.cpp:221
@@ -220,5 +220,3 @@
   // between two functions.
-  bool SoftFloat =
-      F.hasFnAttribute("use-soft-float") &&
-      F.getFnAttribute("use-soft-float").getValueAsString() == "true";
+  bool SoftFloat = F.getFnAttribute("use-soft-float").getValueAsString() == "true";
   // If the soft float attribute is set on the function turn on the soft float
----------------
Looks like this is wider than 80 columns? Same goes for the others below.

================
Comment at: lib/Transforms/Utils/LoopUtils.cpp:479
@@ -481,1 +478,3 @@
+
+  HasFunNoNaNAttr = F.getFnAttribute("no-nans-fp-math").getValueAsString() == "true";
 
----------------
can probably just use this to initialize HasFunNoNaNAttr when it's declared


http://reviews.llvm.org/D18564





More information about the llvm-commits mailing list