diff options
author | Scott Linder <scott@scottlinder.com> | 2019-04-23 14:31:17 +0000 |
---|---|---|
committer | Scott Linder <scott@scottlinder.com> | 2019-04-23 14:31:17 +0000 |
commit | 3eed961973d6bb918317c7ac7810509ebeeae8f8 (patch) | |
tree | 87fc7b025f346f69b71fb677a124805aa477097d /llvm/lib | |
parent | d7a748a71b117060d7ab7be96786dd28d513bda2 (diff) | |
download | bcm5719-llvm-3eed961973d6bb918317c7ac7810509ebeeae8f8.tar.gz bcm5719-llvm-3eed961973d6bb918317c7ac7810509ebeeae8f8.zip |
[AMDGPU] Fix hidden argument metadata duplication for V3
Essentially complete a proper rebase of the V3 metadata change over
https://reviews.llvm.org/D49096.
Minimize the diff between the V2 and V3 variants of the relevant lit
tests, and clean up some trailing whitespace.
llvm-svn: 358992
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp b/llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp index b4bed4e7805..236d750fba9 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp @@ -713,36 +713,6 @@ void MetadataStreamerV3::emitKernelArgs(const Function &Func, emitHiddenKernelArgs(Func, Offset, Args); - // TODO: What about other languages? - if (Func.getParent()->getNamedMetadata("opencl.ocl.version")) { - auto &DL = Func.getParent()->getDataLayout(); - auto Int64Ty = Type::getInt64Ty(Func.getContext()); - - emitKernelArg(DL, Int64Ty, "hidden_global_offset_x", Offset, Args); - emitKernelArg(DL, Int64Ty, "hidden_global_offset_y", Offset, Args); - emitKernelArg(DL, Int64Ty, "hidden_global_offset_z", Offset, Args); - - auto Int8PtrTy = - Type::getInt8PtrTy(Func.getContext(), AMDGPUAS::GLOBAL_ADDRESS); - - // Emit "printf buffer" argument if printf is used, otherwise emit dummy - // "none" argument. - if (Func.getParent()->getNamedMetadata("llvm.printf.fmts")) - emitKernelArg(DL, Int8PtrTy, "hidden_printf_buffer", Offset, Args); - else - emitKernelArg(DL, Int8PtrTy, "hidden_none", Offset, Args); - - // Emit "default queue" and "completion action" arguments if enqueue kernel - // is used, otherwise emit dummy "none" arguments. - if (Func.hasFnAttribute("calls-enqueue-kernel")) { - emitKernelArg(DL, Int8PtrTy, "hidden_default_queue", Offset, Args); - emitKernelArg(DL, Int8PtrTy, "hidden_completion_action", Offset, Args); - } else { - emitKernelArg(DL, Int8PtrTy, "hidden_none", Offset, Args); - emitKernelArg(DL, Int8PtrTy, "hidden_none", Offset, Args); - } - } - Kern[".args"] = Args; } |