[llvm] 9a193bd - [Attributor][FIX] AACallEdges, fix propagation error.

Kuter Dinel via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 12 17:45:55 PDT 2021


Author: Kuter Dinel
Date: 2021-09-13T03:45:26+03:00
New Revision: 9a193bdc81e1db22c1035f2f771f5f8034627608

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

LOG: [Attributor][FIX] AACallEdges, fix propagation error.

This patch fixes a error made in 2cc6f7c8e108. That patch
added a call site position but there was a small error with the way
the presence of a unknown call edge was being propagated from call site
to function. This patch fixes that error. This error was effecting some
AMDGPU tests.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
index 0f73d1925f42..a6342e219a08 100644
--- a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+++ b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
@@ -9472,9 +9472,9 @@ struct AACallEdgesFunction : public AACallEdgesImpl {
       auto &CBEdges = A.getAAFor<AACallEdges>(
           *this, IRPosition::callsite_function(CB), DepClassTy::REQUIRED);
       if (CBEdges.hasNonAsmUnknownCallee())
-        setHasUnknownCallee(false, Change);
-      if (CBEdges.hasUnknownCallee())
         setHasUnknownCallee(true, Change);
+      if (CBEdges.hasUnknownCallee())
+        setHasUnknownCallee(false, Change);
 
       for (Function *F : CBEdges.getOptimisticEdges())
         addCalledFunction(F, Change);


        


More information about the llvm-commits mailing list