[cfe-dev] [NVPTX] Adjust data layout according to LLVM's change

Hal Finkel via cfe-dev cfe-dev at lists.llvm.org
Wed Jul 12 07:09:25 PDT 2017


On 07/11/2017 03:21 PM, Denys Zariaiev via cfe-dev wrote:
> Hello,
>
> I'm curious, is it safe to change an alignment i128 type for NVPTX 
> target? I made a patch to the LLVM backend 
> <https://reviews.llvm.org/D34555> and added `-i128:128` into data layout.
>
> But after it became that LLVM and Clang layouts are different and 
> error is thrown at Clang side:
> > backend data layout 'e-i64:64-i128:128-v16:16-v32:32-n16:32:64' does 
> not match expected target description 'e-i64:64-v16:16-v32:32-n16:32:64'
>
> Could you please help with advice, can I just make another patch for 
> Clang to modify the layout? Won't it break any backward compatibility?

There could be some backward compatibility issues with linking new IR 
files with old IR files (because you're increasing the alignment 
requirements for i128), but often no more than other ISAs when new SIMD 
instructions are added, etc. For the NVPTX backend, this might be a 
concern if it affects anything in libdevice (the bitcode library that is 
shipped with CUDA in bitcode form), otherwise, I don't think it is a 
concern. In general, however, I think you should just update Clang.

  -Hal

>
> Thanks a lot,
> Denys Zariaiev
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170712/a14d1b88/attachment.html>


More information about the cfe-dev mailing list