[llvm] 510d0e4 - [IR] Add memory attributes for init.trampoline
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 23 00:02:19 PST 2021
Author: Nikita Popov
Date: 2021-12-23T09:00:46+01:00
New Revision: 510d0e493365386b9eb082e91d72b62fe716d32e
URL: https://github.com/llvm/llvm-project/commit/510d0e493365386b9eb082e91d72b62fe716d32e
DIFF: https://github.com/llvm/llvm-project/commit/510d0e493365386b9eb082e91d72b62fe716d32e.diff
LOG: [IR] Add memory attributes for init.trampoline
Based on my reading of https://llvm.org/docs/LangRef.html#llvm-init-trampoline-intrinsic,
init.trampoline writes to the first argument, while the other two
are readnone. These two arguments are only captured and written
into the trampoline memory. This also matches what I see in the
X86TargetLowering::LowerINIT_TRAMPOLINE() implementation.
Differential Revision: https://reviews.llvm.org/D116149
Added:
Modified:
llvm/include/llvm/IR/Intrinsics.td
Removed:
################################################################################
diff --git a/llvm/include/llvm/IR/Intrinsics.td b/llvm/include/llvm/IR/Intrinsics.td
index 138770030ebbe..acea17bc7ab87 100644
--- a/llvm/include/llvm/IR/Intrinsics.td
+++ b/llvm/include/llvm/IR/Intrinsics.td
@@ -1019,7 +1019,10 @@ def int_codeview_annotation : DefaultAttrsIntrinsic<[], [llvm_metadata_ty],
//
def int_init_trampoline : Intrinsic<[],
[llvm_ptr_ty, llvm_ptr_ty, llvm_ptr_ty],
- [IntrArgMemOnly, NoCapture<ArgIndex<0>>]>,
+ [IntrArgMemOnly, NoCapture<ArgIndex<0>>,
+ WriteOnly<ArgIndex<0>>,
+ ReadNone<ArgIndex<1>>,
+ ReadNone<ArgIndex<2>>]>,
GCCBuiltin<"__builtin_init_trampoline">;
def int_adjust_trampoline : Intrinsic<[llvm_ptr_ty], [llvm_ptr_ty],
More information about the llvm-commits
mailing list