[CUDA] Simplify GPU variant handling. NFC.
authorArtem Belevich <tra@google.com>
Mon, 6 Apr 2020 22:21:24 +0000 (15:21 -0700)
committerArtem Belevich <tra@google.com>
Wed, 8 Apr 2020 18:19:43 +0000 (11:19 -0700)
commit33386b20aa82c73e28b871cfa35c89a3808c9f92
treeacbf7252be3f889b44f6c85591d49d9a676ac82f
parentd51b38f1b3a34c2a8e1869af6434ebd743ce7a5e
[CUDA] Simplify GPU variant handling. NFC.

Instead of hardcoding individual GPU mappings in multiple functions, keep them
all in one table and use it to look up the mappings.

We also don't care about 'virtual' architecture much, so the API is trimmed down
down to a simpler GPU->Virtual arch name lookup.

Differential Revision: https://reviews.llvm.org/D77665
clang/include/clang/Basic/Cuda.h
clang/lib/Basic/Cuda.cpp
clang/lib/Driver/ToolChains/Cuda.cpp