[llvm] fde0eb1 - [NFC] A couple more removeAttribute() cleanups

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 18 11:17:13 PDT 2021


Author: Arthur Eubanks
Date: 2021-08-18T11:15:20-07:00
New Revision: fde0eb1f9ad4cbd5769484ad7707a2d45730904e

URL: https://github.com/llvm/llvm-project/commit/fde0eb1f9ad4cbd5769484ad7707a2d45730904e
DIFF: https://github.com/llvm/llvm-project/commit/fde0eb1f9ad4cbd5769484ad7707a2d45730904e.diff

LOG: [NFC] A couple more removeAttribute() cleanups

Added: 
    

Modified: 
    llvm/lib/Transforms/Utils/BuildLibCalls.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Utils/BuildLibCalls.cpp b/llvm/lib/Transforms/Utils/BuildLibCalls.cpp
index 4118ee02a9e3..c17e7b7f3a5b 100644
--- a/llvm/lib/Transforms/Utils/BuildLibCalls.cpp
+++ b/llvm/lib/Transforms/Utils/BuildLibCalls.cpp
@@ -1453,9 +1453,8 @@ static Value *emitUnaryFloatFnCallHelper(Value *Op, StringRef Name,
   // The incoming attribute set may have come from a speculatable intrinsic, but
   // is being replaced with a library call which is not allowed to be
   // speculatable.
-  CI->setAttributes(Attrs.removeAttribute(B.getContext(),
-                                          AttributeList::FunctionIndex,
-                                          Attribute::Speculatable));
+  CI->setAttributes(
+      Attrs.removeFnAttribute(B.getContext(), Attribute::Speculatable));
   if (const Function *F =
           dyn_cast<Function>(Callee.getCallee()->stripPointerCasts()))
     CI->setCallingConv(F->getCallingConv());
@@ -1498,9 +1497,8 @@ static Value *emitBinaryFloatFnCallHelper(Value *Op1, Value *Op2,
   // The incoming attribute set may have come from a speculatable intrinsic, but
   // is being replaced with a library call which is not allowed to be
   // speculatable.
-  CI->setAttributes(Attrs.removeAttribute(B.getContext(),
-                                          AttributeList::FunctionIndex,
-                                          Attribute::Speculatable));
+  CI->setAttributes(
+      Attrs.removeFnAttribute(B.getContext(), Attribute::Speculatable));
   if (const Function *F =
           dyn_cast<Function>(Callee.getCallee()->stripPointerCasts()))
     CI->setCallingConv(F->getCallingConv());


        


More information about the llvm-commits mailing list