[llvm] [ArgPromotion] Perform alias analysis on actual arguments of Calls (PR #106216)
Hari Limaye via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 27 15:47:37 PDT 2024
================
@@ -485,11 +485,36 @@ static bool allCallersPassValidPointerForArgument(
});
}
+// Try to prove that all Calls to F do not modify the memory pointed to by Arg,
+// using alias analysis local to each caller of F.
+static bool isArgUnmodifiedByAllCalls(Argument *Arg,
+ FunctionAnalysisManager &FAM) {
+ for (User *U : Arg->getParent()->users()) {
+
+ // Bail if we find an unexpected (non CallInst) use of the function.
+ auto *Call = dyn_cast<CallInst>(U);
----------------
hazzlim wrote:
Apologies, I was perhaps a bit trigger happy with committing this. I have put up #110335 to address this.
https://github.com/llvm/llvm-project/pull/106216
More information about the llvm-commits
mailing list