[llvm] [SimplifyCFG] Supporting hoisting/sinking callbases with differing attrs (PR #109472)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 22 20:03:14 PDT 2024


================
@@ -2048,6 +2196,11 @@ static bool canSinkInstructions(
         else if (Callee != CurrCallee)
           return false;
       }
+    }
+	// Check that we can intersect the attributes if we sink.
+    for (const Instruction *I : Insts) {
+      if (I != I0 && !tryIntersectAttrs(CB, cast<CallBase>(I)))
----------------
dtcxzyw wrote:

Can we cache the result of intersection?


https://github.com/llvm/llvm-project/pull/109472


More information about the llvm-commits mailing list