[llvm-branch-commits] [llvm] [LICM] Drop per-iteration AA tags (PR #223530)

Zach Goldthorpe via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Sep 15 08:46:26 PDT 2026


================
@@ -2348,6 +2349,33 @@ static bool isPotentiallyPromotable(const Instruction *I, const Loop *L) {
   return false;
 }
 
+/// Returns whether \p N has any operand from the set \p Operands.
+static bool
+hasAnyOperandsFrom(const MDNode *N,
+                   const SmallPtrSetImpl<const MDNode *> &Operands) {
+  return N && llvm::any_of(N->operands(), [&](const MDOperand &Op) {
+           return Operands.contains(cast<MDNode>(Op.get()));
+         });
+}
+
+/// Returns the alias scopes declared via llvm.experimental.noalias.scope.decl
+/// to be local to the loop \p L.
+static SmallPtrSet<const MDNode *, 4>
+collectLoopLocalAliasScopes(const Loop *L) {
----------------
zGoldthorpe wrote:

Okay, I tried collecting the scopes at around the same place

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


More information about the llvm-branch-commits mailing list