[PATCH 2/5] Triple: Add AMDHSA operating system type

Matt Arsenault arsenm2 at gmail.com
Mon Dec 1 08:46:12 PST 2014


> On Nov 28, 2014, at 8:34 PM, Tom Stellard <tom at stellard.net> wrote:
> 
> On Thu, Nov 06, 2014 at 04:16:15PM -0500, Tom Stellard wrote:
>> This operating system type represents the AMD HSA runtime,
>> and will be required by the R600 backend in order to generate
>> correct code for this runtime.
> 
> Ping.
> 
>> ---
>> include/llvm/ADT/Triple.h | 3 ++-
>> lib/Support/Triple.cpp    | 2 ++
>> 2 files changed, 4 insertions(+), 1 deletion(-)
>> 
>> diff --git a/include/llvm/ADT/Triple.h b/include/llvm/ADT/Triple.h
>> index c1b7882..b46bce8 100644
>> --- a/include/llvm/ADT/Triple.h
>> +++ b/include/llvm/ADT/Triple.h
>> @@ -138,7 +138,8 @@ public:
>>     Bitrig,
>>     AIX,
>>     CUDA,       // NVIDIA CUDA
>> -    NVCL        // NVIDIA OpenCL
>> +    NVCL,       // NVIDIA OpenCL
>> +    AMDHSA      // AMD HSA Runtime
>>   };
>>   enum EnvironmentType {
>>     UnknownEnvironment,
>> diff --git a/lib/Support/Triple.cpp b/lib/Support/Triple.cpp
>> index c9fc785..dbcebe8 100644
>> --- a/lib/Support/Triple.cpp
>> +++ b/lib/Support/Triple.cpp
>> @@ -157,6 +157,7 @@ const char *Triple::getOSTypeName(OSType Kind) {
>>   case AIX: return "aix";
>>   case CUDA: return "cuda";
>>   case NVCL: return "nvcl";
>> +  case AMDHSA: return "amdhsa";
>>   }
>> 
>>   llvm_unreachable("Invalid OSType");
>> @@ -311,6 +312,7 @@ static Triple::OSType parseOS(StringRef OSName) {
>>     .StartsWith("aix", Triple::AIX)
>>     .StartsWith("cuda", Triple::CUDA)
>>     .StartsWith("nvcl", Triple::NVCL)
>> +    .StartsWith("amdhsa", Triple::AMDHSA)
>>     .Default(Triple::UnknownOS);
>> }
>> 
>> -- 
>> 1.8.5.5
>> 
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu <mailto:llvm-commits at cs.uiuc.edu>
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits <http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits>


LGTM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141201/be10a683/attachment.html>


More information about the llvm-commits mailing list