[PATCH] D46147: [NVPTX] Added a feature to use short pointers for const/local/shared AS.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 3 13:59:33 PDT 2018


arsenm added a comment.

In https://reviews.llvm.org/D46147#1087005, @tra wrote:

> In https://reviews.llvm.org/D46147#1081990, @arsenm wrote:
>
> > In https://reviews.llvm.org/D46147#1081951, @bkramer wrote:
> >
> > > Would it be possible to get rid of the flag entirely and make this controlled only by the data layout? That's defined on the module level.
> >
> >
> > Yes, ultimately the switch is just changing the datalayout. If this is just a short term thing for migration I think a global flag is fine. If you want to be able to swap these properly long term, this is a different arch name / TargetMachine.
>
>
> I'm still not quite sure how clang's setting of data layout in the module plays with LLVM's. When they are out of sync, LLVM throws an error which suggests that we currently can't just have arbitrary datalayout specified by the module, it must also match LLVM's idea of the data layout used by particular back-end. At least, that's my understanding how things currently work. I might be wrong.
>
> In any case, I do want the short pointers to eventually become the default. However, it's a somewhat risky change, so I need an escape hatch to be able to test the changes without breaking everyone. I know of at least one issue in the split-GEP pass (will send a patch soon). There are likely more.


You need to repeat the datalayout in clang as the target expects


https://reviews.llvm.org/D46147





More information about the llvm-commits mailing list