diff options
author | Yaxun Liu <Yaxun.Liu@amd.com> | 2018-06-13 17:31:51 +0000 |
---|---|---|
committer | Yaxun Liu <Yaxun.Liu@amd.com> | 2018-06-13 17:31:51 +0000 |
commit | fb17bf60dd14a664bd7ee382e7404f4e8559fc5c (patch) | |
tree | 5bd727694cb6e4e2ba34515bbce9ec2fe2b0d7c5 /llvm/lib/Target/AMDGPU/AMDGPUOpenCLEnqueuedBlockLowering.cpp | |
parent | 4bf9b5612a716167520e9c66606756d17b0c47b6 (diff) | |
download | bcm5719-llvm-fb17bf60dd14a664bd7ee382e7404f4e8559fc5c.tar.gz bcm5719-llvm-fb17bf60dd14a664bd7ee382e7404f4e8559fc5c.zip |
[AMDGPU] Change enqueue kernel handle type
Currently the handle type is a global pointer which holds 8 bytes.
We need a larger type which hold 16 bytes, therefore change it
to [i64 x 2].
Differential Revision: https://reviews.llvm.org/D48094
llvm-svn: 334625
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUOpenCLEnqueuedBlockLowering.cpp')
-rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPUOpenCLEnqueuedBlockLowering.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUOpenCLEnqueuedBlockLowering.cpp b/llvm/lib/Target/AMDGPU/AMDGPUOpenCLEnqueuedBlockLowering.cpp index 4ff6c6e01c6..7bd8533a0cc 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUOpenCLEnqueuedBlockLowering.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUOpenCLEnqueuedBlockLowering.cpp @@ -36,6 +36,7 @@ #include "llvm/ADT/DenseSet.h" #include "llvm/ADT/StringRef.h" #include "llvm/IR/Constants.h" +#include "llvm/IR/DerivedTypes.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/Mangler.h" #include "llvm/IR/Module.h" @@ -116,7 +117,7 @@ bool AMDGPUOpenCLEnqueuedBlockLowering::runOnModule(Module &M) { } LLVM_DEBUG(dbgs() << "found enqueued kernel: " << F.getName() << '\n'); auto RuntimeHandle = (F.getName() + ".runtime_handle").str(); - auto T = Type::getInt8Ty(C)->getPointerTo(AMDGPUAS::GLOBAL_ADDRESS); + auto T = ArrayType::get(Type::getInt64Ty(C), 2); auto *GV = new GlobalVariable( M, T, /*IsConstant=*/false, GlobalValue::ExternalLinkage, |