[PATCH] D77777: [nvptx] Add `nvvm.texsurf.handle` internalizer.

2020-04-11 Thread David Majnemer via Phabricator via cfe-commits
majnemer added a comment. In D7#1975618 , @hliao wrote: > In D7#1975406 , @tra wrote: > > > In D7#1975178 , @hliao wrote: > > > > > the 1st argument in

[PATCH] D77777: [nvptx] Add `nvvm.texsurf.handle` internalizer.

2020-04-11 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D7#1975628 , @hliao wrote: > In D7#1975440 , @tra wrote: > > > Also, if I read PTX docs correctly, it should be OK to pass texture handle > > address via an intermediate variable: >

[PATCH] D77777: [nvptx] Add `nvvm.texsurf.handle` internalizer.

2020-04-10 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D7#1975440 , @tra wrote: > Also, if I read PTX docs correctly, it should be OK to pass texture handle > address via an intermediate variable: > >

[PATCH] D77777: [nvptx] Add `nvvm.texsurf.handle` internalizer.

2020-04-10 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D7#1975406 , @tra wrote: > In D7#1975178 , @hliao wrote: > > > the 1st argument in `llvm.nvvm.texsurf.hande.internal` or the 2nd one in > > `llvm.nvvm.texsurf.handle` must be kept

[PATCH] D77777: [nvptx] Add `nvvm.texsurf.handle` internalizer.

2020-04-10 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. Also, if I read PTX docs correctly, it should be OK to pass texture handle address via an intermediate variable: https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#texture-sampler-and-surface-types > Creating pointers to opaque variables using mov, e.g.,

[PATCH] D77777: [nvptx] Add `nvvm.texsurf.handle` internalizer.

2020-04-10 Thread Artem Belevich via Phabricator via cfe-commits
tra added a subscriber: majnemer. tra added a comment. In D7#1975178 , @hliao wrote: > the 1st argument in `llvm.nvvm.texsurf.hande.internal` or the 2nd one in > `llvm.nvvm.texsurf.handle` must be kept as an immediate or constant value, > i.e. that

[PATCH] D77777: [nvptx] Add `nvvm.texsurf.handle` internalizer.

2020-04-10 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D7#1974988 , @tra wrote: > In D7#1974849 , @hliao wrote: > > > > > > > > >> NVVM IR spec is for nvidia's own compiler. It's based on LLVM, but it does > >> not impose direct

[PATCH] D77777: [nvptx] Add `nvvm.texsurf.handle` internalizer.

2020-04-10 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D7#1974849 , @hliao wrote: > >> NVVM IR spec is for nvidia's own compiler. It's based on LLVM, but it does >> not impose direct constraints on LLVM's design choices. > > It would be an advantage and, sometimes, desirable

[PATCH] D77777: [nvptx] Add `nvvm.texsurf.handle` internalizer.

2020-04-10 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D7#1974672 , @tra wrote: > In D7#1972720 , @hliao wrote: > > > In D7#1972349 , @tra wrote: > > > > > The patch could use a more

[PATCH] D77777: [nvptx] Add `nvvm.texsurf.handle` internalizer.

2020-04-10 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D7#1972720 , @hliao wrote: > In D7#1972349 , @tra wrote: > > > The patch could use a more detailed description. Specifically, it does not > > describe the purpose of these changes.

[PATCH] D77777: [nvptx] Add `nvvm.texsurf.handle` internalizer.

2020-04-10 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 256518. hliao added a comment. Fix a clang-tidy warning. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7/new/ https://reviews.llvm.org/D7 Files: clang/lib/CodeGen/TargetInfo.cpp

[PATCH] D77777: [nvptx] Add `nvvm.texsurf.handle` internalizer.

2020-04-10 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 256511. hliao added a comment. Add more comments to explain what that pass does. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7/new/ https://reviews.llvm.org/D7 Files:

[PATCH] D77777: [nvptx] Add `nvvm.texsurf.handle` internalizer.

2020-04-09 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D7#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

[PATCH] D77777: [nvptx] Add `nvvm.texsurf.handle` internalizer.

2020-04-09 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. 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'.

[PATCH] D77777: [nvptx] Add `nvvm.texsurf.handle` internalizer.

2020-04-09 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 256321. hliao added a comment. Rebase to trunk. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7/new/ https://reviews.llvm.org/D7 Files: clang/lib/CodeGen/TargetInfo.cpp

[PATCH] D77777: [nvptx] Add `nvvm.texsurf.handle` internalizer.

2020-04-09 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added a reviewer: tra. Herald added subscribers: cfe-commits, hiraditya, mgorny, jholewinski. Herald added a project: clang. - Replace them with the internal version, i.e. `nvvm.texsurf.handle.internal` just before the instruction selector. - Teach clang