[llvm] [SimplifyCFG] Supporting hoisting/sinking callbases with differing attrs (PR #109472)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 23 08:40:23 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) {
----------------
nikic wrote:
It's a bit tricky for attributes like this that don't have real operational semantics, but generally I'd say that optimizing an optnone function would be a bug, so dropping the attribute is not safe. Even more generally, if there is any doubt, we should not assume things are safe to drop.
https://github.com/llvm/llvm-project/pull/109472
More information about the llvm-commits
mailing list