Skip to content

Commit 4358955

Browse files
author
git apple-llvm automerger
committed
Merge commit '8384ced974c6' from llvm.org/main into next
2 parents 2757702 + 8384ced commit 4358955

File tree

3 files changed

+3
-22
lines changed

3 files changed

+3
-22
lines changed

llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,6 @@ void MetadataStreamerV3::emitHiddenKernelArgs(const MachineFunction &MF,
794794
msgpack::ArrayDocNode Args) {
795795
auto &Func = MF.getFunction();
796796
const GCNSubtarget &ST = MF.getSubtarget<GCNSubtarget>();
797-
const SIMachineFunctionInfo &MFI = *MF.getInfo<SIMachineFunctionInfo>();
798797

799798
unsigned HiddenArgNumBytes = ST.getImplicitArgNumBytes(Func);
800799
if (!HiddenArgNumBytes)
@@ -823,7 +822,7 @@ void MetadataStreamerV3::emitHiddenKernelArgs(const MachineFunction &MF,
823822
if (M->getNamedMetadata("llvm.printf.fmts"))
824823
emitKernelArg(DL, Int8PtrTy, Align(8), "hidden_printf_buffer", Offset,
825824
Args);
826-
else if (MFI.hasHostcallPtr()) {
825+
else if (!Func.hasFnAttribute("amdgpu-no-hostcall-ptr")) {
827826
// The printf runtime binding pass should have ensured that hostcall and
828827
// printf are not used in the same module.
829828
assert(!M->getNamedMetadata("llvm.printf.fmts"));
@@ -1019,7 +1018,7 @@ void MetadataStreamerV5::emitHiddenKernelArgs(const MachineFunction &MF,
10191018
} else
10201019
Offset += 8; // Skipped.
10211020

1022-
if (MFI.hasHostcallPtr()) {
1021+
if (!Func.hasFnAttribute("amdgpu-no-hostcall-ptr")) {
10231022
emitKernelArg(DL, Int8PtrTy, Align(8), "hidden_hostcall_buffer", Offset,
10241023
Args);
10251024
} else
@@ -1028,7 +1027,7 @@ void MetadataStreamerV5::emitHiddenKernelArgs(const MachineFunction &MF,
10281027
emitKernelArg(DL, Int8PtrTy, Align(8), "hidden_multigrid_sync_arg", Offset,
10291028
Args);
10301029

1031-
if (MFI.hasHeapPtr())
1030+
if (!Func.hasFnAttribute("amdgpu-no-heap-ptr"))
10321031
emitKernelArg(DL, Int8PtrTy, Align(8), "hidden_heap_v1", Offset, Args);
10331032
else
10341033
Offset += 8; // Skipped.

llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ SIMachineFunctionInfo::SIMachineFunctionInfo(const MachineFunction &MF)
4747
WorkItemIDZ(false),
4848
ImplicitBufferPtr(false),
4949
ImplicitArgPtr(false),
50-
HostcallPtr(false),
51-
HeapPtr(false),
5250
GITPtrHigh(0xffffffff),
5351
HighBitsOf32BitAddress(0),
5452
GDSSize(0) {
@@ -143,12 +141,6 @@ SIMachineFunctionInfo::SIMachineFunctionInfo(const MachineFunction &MF)
143141

144142
if (!F.hasFnAttribute("amdgpu-no-dispatch-id"))
145143
DispatchID = true;
146-
147-
if (!F.hasFnAttribute("amdgpu-no-hostcall-ptr"))
148-
HostcallPtr = true;
149-
150-
if (!F.hasFnAttribute("amdgpu-no-heap-ptr"))
151-
HeapPtr = true;
152144
}
153145

154146
// FIXME: This attribute is a hack, we just need an analysis on the function

llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -421,8 +421,6 @@ class SIMachineFunctionInfo final : public AMDGPUMachineFunction {
421421
// Pointer to where the ABI inserts special kernel arguments separate from the
422422
// user arguments. This is an offset from the KernargSegmentPtr.
423423
bool ImplicitArgPtr : 1;
424-
bool HostcallPtr : 1;
425-
bool HeapPtr : 1;
426424

427425
bool MayNeedAGPRs : 1;
428426

@@ -698,14 +696,6 @@ class SIMachineFunctionInfo final : public AMDGPUMachineFunction {
698696
return ImplicitArgPtr;
699697
}
700698

701-
bool hasHostcallPtr() const {
702-
return HostcallPtr;
703-
}
704-
705-
bool hasHeapPtr () const {
706-
return HeapPtr;
707-
}
708-
709699
bool hasImplicitBufferPtr() const {
710700
return ImplicitBufferPtr;
711701
}

0 commit comments

Comments
 (0)