[PATCH] D16590: Refactor backend diagnostics for unsupported features

Oliver Stannard via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 26 10:05:10 PST 2016


olista01 created this revision.
olista01 added reviewers: ast, sunfish, tstellarAMD.
olista01 added a subscriber: llvm-commits.
olista01 set the repository for this revision to rL LLVM.
Herald added subscribers: dschuff, arsenm, jfb.

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.

The implementation of DiagnosticInfoUnsupported::print must be in
lib/Codegen rather than in the existing file in lib/IR/ to avoid
introducing a dependency from IR to CodeGen.

Repository:
  rL LLVM

http://reviews.llvm.org/D16590

Files:
  include/llvm/IR/DiagnosticInfo.h
  lib/CodeGen/CMakeLists.txt
  lib/CodeGen/DiagnosticInfoCodeGen.cpp
  lib/IR/DiagnosticInfo.cpp
  lib/Target/AMDGPU/AMDGPUDiagnosticInfoUnsupported.cpp
  lib/Target/AMDGPU/AMDGPUDiagnosticInfoUnsupported.h
  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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16590.46007.patch
Type: text/x-patch
Size: 27796 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160126/2f2b3f10/attachment.bin>


More information about the llvm-commits mailing list