[llvm] [SimplifyCFG] Supporting hoisting/sinking callbases with differing attrs (PR #109472)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 23 07:33:22 PDT 2024
================
@@ -1591,10 +1591,150 @@ static void hoistLockstepIdenticalDbgVariableRecords(
}
}
+// See if we can intersect the attributes for two callbases (used for
+// hoisting/sinking).
+static std::optional<AttributeList> tryIntersectAttrs(const CallBase *CB0,
+ const CallBase *CB1) {
----------------
goldsteinn wrote:
Thats what I originally had done, the reason I changed it was the sink/hoist intersection isn't necessarily complete as there may be attributes that change the nature of a function to a degree that makes sinking/hoisting no profitable i.e you can imagine something like the alloc attributes which are probably best not to drop.
https://github.com/llvm/llvm-project/pull/109472
More information about the llvm-commits
mailing list