[llvm] [SimplifyCFG] Supporting hoisting/sinking callbases with differing attrs (PR #109472)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 1 12:16:40 PDT 2024
================
@@ -1747,6 +1727,36 @@ static bool isSafeCheapLoadStore(const Instruction *I,
getLoadStoreAlignment(I) < Value::MaximumAlignment;
}
+static std::optional<AttributeList> tryIntersectCBAttrs(const CallBase *CB0,
+ const CallBase *CB1) {
+ AttributeList AL0 = CB0->getAttributes();
+ if (CB0 == CB1)
+ return AL0;
+
+ return AL0.intersectWith(CB0->getContext(), CB1->getAttributes());
+}
+
+static bool areIdenticalUpToCommutativity(const Instruction *I1,
+ const Instruction *I2) {
----------------
nikic wrote:
Why was this function moved?
https://github.com/llvm/llvm-project/pull/109472
More information about the llvm-commits
mailing list