AMDGPU: Move isa version and EF_AMDGPU_MACH_* determination
authorKonstantin Zhuravlyov <kzhuravl_dev@outlook.com>
Tue, 11 Sep 2018 18:56:51 +0000 (18:56 +0000)
committerKonstantin Zhuravlyov <kzhuravl_dev@outlook.com>
Tue, 11 Sep 2018 18:56:51 +0000 (18:56 +0000)
commit941615e4c8c6eb0300665360f53f8ac768179a13
tree31829e5458c54f357b88ba82d931d7ef4bb1f78a
parent342c3bcf110f4ce4f75f1855845e43ab1553bdb9
AMDGPU: Move isa version and EF_AMDGPU_MACH_* determination
into TargetParser.

Also switch away from target features to CPU string when
determining isa version. This fixes an issue when we
output wrong isa version in the object code when features
of a particular CPU are altered (i.e. gfx902 w/o xnack
used to result in gfx900).

Differential Revision: https://reviews.llvm.org/D51890

llvm-svn: 341982
15 files changed:
llvm/include/llvm/Support/TargetParser.h
llvm/lib/Support/TargetParser.cpp
llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
llvm/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.cpp
llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp
llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.h
llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp
llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
llvm/test/CodeGen/AMDGPU/gfx902-without-xnack.ll [new file with mode: 0644]
llvm/test/MC/AMDGPU/hsa_isa_version_attrs.s