[PATCH] D77777: [nvptx] Add `nvvm.texsurf.handle` internalizer.
Michael Liao via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 9 13:07:35 PDT 2020
hliao added a comment.
In D77777#1972349 <https://reviews.llvm.org/D77777#1972349>, @tra wrote:
> The patch could use a more detailed description. Specifically, it does not describe the purpose of these changes.
>
> > Replace them with the internal version, i.e. nvvm.texsurf.handle.internal just before the instruction selector.
>
> It's not clear what is 'them'. 'nvvm.texsurf.handle' ?
> If so, do we need 'internal' any more? Can we just rename internal and be done with it? Adding an extra pass just to replace one intrinsic with another seems to be unnecessary.
>
> I may be missing something here. Why do we have internal and non-internal intrinsics at all? Do we need both?
besides required by NVVM IR spec, the metadata in that intrinsic is a trick to prevent it from being sunk into common code during optimization in LLVM IR. NVPTX backend only handles the `internal` version. We need to internalize them for codegen. I will put a brief explanation in that pass.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77777/new/
https://reviews.llvm.org/D77777
More information about the cfe-commits
mailing list