[llvm] 0526713 - [FunctionAttrs] Remove redundant check. NFC

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 19 20:53:26 PDT 2020


Author: Fangrui Song
Date: 2020-09-19T20:46:18-07:00
New Revision: 0526713aa8017bc0dc8f6d0dd14238ef788400b9

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

LOG: [FunctionAttrs] Remove redundant check. NFC

Added: 
    

Modified: 
    llvm/lib/Transforms/IPO/FunctionAttrs.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
index 011e95e9eab1..293c73a01480 100644
--- a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
+++ b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
@@ -1346,8 +1346,6 @@ static bool inferAttrsFromFunctionBodies(const SCCNodeSet &SCCNodes) {
 }
 
 static bool setDoesNotRecurse(Function &F) {
-  if (F.doesNotRecurse())
-    return false;
   F.setDoesNotRecurse();
   ++NumNoRecurse;
   return true;


        


More information about the llvm-commits mailing list