================
@@ -408,19 +396,34 @@ static void createNewAliasScopesFromNoAliasParameter(
// Call operations are included in this list since we do not know whether
// the callee accesses any memory besides the ones passed as its
// arguments.
- if (aliasesOtherKnownObject ||
- isa<LLVM::CallOp>(aliasInterface.getOperation()))
- return;
-
SmallVector<Attribute> aliasScopes;
- for (LLVM::SSACopyOp noAlias : noAliasParams)
- if (basedOnPointers.contains(noAlias))
- aliasScopes.push_back(pointerScopes[noAlias]);
+ if (!aliasesOtherKnownObject &&
+ !isa<LLVM::CallOp>(aliasInterface.getOperation()))
+ for (LLVM::SSACopyOp noAlias : noAliasParams)
+ if (basedOnPointers.contains(noAlias))
+ aliasScopes.push_back(pointerScopes[noAlias]);
- if (!aliasScopes.empty())
+ if (!aliasScopes.empty()) {
aliasInterface.setAliasScopes(
concatArrayAttr(aliasInterface.getAliasScopesOrNull(),
ArrayAttr::get(call->getContext(), aliasScopes)));
+ return;
----------------
krzysz00 wrote:
Nope! That's the whole point of a domain with disjoint scopes - all you list is
what scopes you're in, and, by definition, you're noalias with the rest of them
https://github.com/llvm/llvm-project/pull/218773
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits