[PATCH] D128529: [InlineFunction] Only check pointer arguments for a call
ChenZheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 30 02:40:00 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb05801de35aa: [InlineFunction] Only check pointer arguments for a call (authored by shchenz).
Changed prior to commit:
https://reviews.llvm.org/D128529?vs=439747&id=441317#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128529/new/
https://reviews.llvm.org/D128529
Files:
llvm/lib/Transforms/Utils/InlineFunction.cpp
Index: llvm/lib/Transforms/Utils/InlineFunction.cpp
===================================================================
--- llvm/lib/Transforms/Utils/InlineFunction.cpp
+++ llvm/lib/Transforms/Utils/InlineFunction.cpp
@@ -1043,12 +1043,10 @@
}
for (Value *Arg : Call->args()) {
- // We need to check the underlying objects of all arguments, not just
- // the pointer arguments, because we might be passing pointers as
- // integers, etc.
- // However, if we know that the call only accesses pointer arguments,
- // then we only need to check the pointer arguments.
- if (IsArgMemOnlyCall && !Arg->getType()->isPointerTy())
+ // Only care about pointer arguments. If a noalias argument is
+ // accessed through a non-pointer argument, it must be captured
+ // first (e.g. via ptrtoint), and we protect against captures below.
+ if (!Arg->getType()->isPointerTy())
continue;
PtrArgs.push_back(Arg);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128529.441317.patch
Type: text/x-patch
Size: 1033 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220630/fd239791/attachment.bin>
More information about the llvm-commits
mailing list