diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2016-09-16 21:34:26 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2016-09-16 21:34:26 +0000 |
commit | 0b76fc4c772c03beb6d09eef7e48ffc77a214c82 (patch) | |
tree | 5a1fa69ae335f5977f104fa2699aa2ff17ba079f /llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h | |
parent | aab6d5c52a2ffd9ed392d13ffcd23bd8156fd026 (diff) | |
download | bcm5719-llvm-0b76fc4c772c03beb6d09eef7e48ffc77a214c82.tar.gz bcm5719-llvm-0b76fc4c772c03beb6d09eef7e48ffc77a214c82.zip |
AMDGPU/SI: Add support for triples with the mesa3d operating system
Summary:
mesa3d will use the same kernel calling convention as amdhsa, but it will
handle everything else like the default 'unknown' OS type.
Reviewers: arsenm
Subscribers: arsenm, llvm-commits, kzhuravl
Differential Revision: https://reviews.llvm.org/D22783
llvm-svn: 281779
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h')
-rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h index b1cadeb0459..6b953eadeed 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h +++ b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h @@ -138,6 +138,10 @@ public: return TargetTriple.getOS() == Triple::AMDHSA; } + bool isMesa3DOS() const { + return TargetTriple.getOS() == Triple::Mesa3D; + } + Generation getGeneration() const { return Gen; } @@ -270,10 +274,14 @@ public: return EnableXNACK; } + bool isAmdCodeObjectV2() const { + return isAmdHsaOS() || isMesa3DOS(); + } + /// \brief Returns the offset in bytes from the start of the input buffer /// of the first explicit kernel argument. unsigned getExplicitKernelArgOffset() const { - return isAmdHsaOS() ? 0 : 36; + return isAmdCodeObjectV2() ? 0 : 36; } unsigned getAlignmentForImplicitArgPtr() const { |