OSDN Git Service

Refactor backend diagnostics for unsupported features
authorOliver Stannard <oliver.stannard@arm.com>
Tue, 2 Feb 2016 13:52:43 +0000 (13:52 +0000)
committerOliver Stannard <oliver.stannard@arm.com>
Tue, 2 Feb 2016 13:52:43 +0000 (13:52 +0000)
commit9ed9eb72f4b83e7881efe391ba111091456b34af
treef9f270f508ecb9f57eca01a467dd39b9879e8c94
parentb5a988525a660a72e6fb4262c5535b84c71ad1fb
Refactor backend diagnostics for unsupported features

Re-commit of r258951 after fixing layering violation.

The BPF and WebAssembly backends had identical code for emitting errors
for unsupported features, and AMDGPU had very similar code. This merges
them all into one DiagnosticInfo subclass, that can be used by any
backend.

There should be minimal functional changes here, but some AMDGPU tests
have been updated for the new format of errors (it used a slightly
different format to BPF and WebAssembly). The AMDGPU error messages will
now benefit from having precise source locations when debug info is
available.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259498 91177308-0d34-0410-b5e6-96231b3b80d8
19 files changed:
include/llvm/IR/DiagnosticInfo.h
lib/IR/DiagnosticInfo.cpp
lib/Target/AMDGPU/AMDGPUDiagnosticInfoUnsupported.cpp [deleted file]
lib/Target/AMDGPU/AMDGPUDiagnosticInfoUnsupported.h [deleted file]
lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
lib/Target/AMDGPU/AMDGPUISelLowering.cpp
lib/Target/AMDGPU/CMakeLists.txt
lib/Target/AMDGPU/SIISelLowering.cpp
lib/Target/BPF/BPFISelLowering.cpp
lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
test/CodeGen/AMDGPU/addrspacecast.ll
test/CodeGen/AMDGPU/call.ll
test/CodeGen/AMDGPU/dynamic_stackalloc.ll
test/CodeGen/AMDGPU/global-zero-initializer.ll
test/CodeGen/AMDGPU/lds-initializer.ll
test/CodeGen/AMDGPU/lds-zero-initializer.ll
test/CodeGen/AMDGPU/llvm.amdgcn.dispatch.ptr.ll
test/CodeGen/AMDGPU/no-hsa-graphics-shaders.ll
test/CodeGen/AMDGPU/promote-alloca-bitcast-function.ll