================
@@ -5627,10 +5627,27 @@ void OpenMPOpt::registerAAs(bool IsModulePass) {
     }
   }
 
+  // Seed the generic noalias deduction for callback-mapped pointer arguments
+  // in host regions. It will inspect every callback and direct call site 
before
+  // manifesting the attribute.
+  if (!isOpenMPDevice(M)) {
+    for (Function *F : SCC) {
+      if (F->isDeclaration())
+        continue;
+      for (Use &U : F->uses()) {
+        AbstractCallSite ACS(&U);
+        if (!ACS || !ACS.isCallbackCall())
+          continue;
+        for (Argument &Arg : F->args())
+          if (Arg.getType()->isPointerTy() && ACS.getCallArgOperandNo(Arg) >= 
0)
+            A.getOrCreateAAFor<AANoAlias>(IRPosition::argument(Arg));
----------------
arsenm wrote:

I don't expect to see a new loop through the program to add new AAs

https://github.com/llvm/llvm-project/pull/218453
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to