<div dir="ltr">Reverted in r259016.</div><br><div class="gmail_quote"><div dir="ltr">On Thu, Jan 28, 2016 at 4:35 AM Benjamin Kramer via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, Jan 27, 2016 at 6:30 PM, Oliver Stannard via llvm-commits<br>
<<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br>
> Author: olista01<br>
> Date: Wed Jan 27 11:30:33 2016<br>
> New Revision: 258951<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=258951&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=258951&view=rev</a><br>
> Log:<br>
> Refactor backend diagnostics for unsupported features<br>
><br>
> The BPF and WebAssembly backends had identical code for emitting errors<br>
> for unsupported features, and AMDGPU had very similar code. This merges<br>
> them all into one DiagnosticInfo subclass, that can be used by any<br>
> backend.<br>
><br>
> There should be minimal functional changes here, but some AMDGPU tests<br>
> have been updated for the new format of errors (it used a slightly<br>
> different format to BPF and WebAssembly). The AMDGPU error messages will<br>
> now benefit from having precise source locations when debug info is<br>
> available.<br>
><br>
> The implementation of DiagnosticInfoUnsupported::print must be in<br>
> lib/Codegen rather than in the existing file in lib/IR/ to avoid<br>
> introducing a dependency from IR to CodeGen.<br>
><br>
> Differential Revision: <a href="http://reviews.llvm.org/D16590" rel="noreferrer" target="_blank">http://reviews.llvm.org/D16590</a><br>
><br>
><br>
> Added:<br>
>     llvm/trunk/lib/CodeGen/DiagnosticInfoCodeGen.cpp<br>
> Removed:<br>
>     llvm/trunk/lib/Target/AMDGPU/AMDGPUDiagnosticInfoUnsupported.cpp<br>
>     llvm/trunk/lib/Target/AMDGPU/AMDGPUDiagnosticInfoUnsupported.h<br>
> Modified:<br>
>     llvm/trunk/include/llvm/IR/DiagnosticInfo.h<br>
>     llvm/trunk/lib/CodeGen/CMakeLists.txt<br>
>     llvm/trunk/lib/IR/DiagnosticInfo.cpp<br>
>     llvm/trunk/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp<br>
>     llvm/trunk/lib/Target/AMDGPU/AMDGPUISelLowering.cpp<br>
>     llvm/trunk/lib/Target/AMDGPU/CMakeLists.txt<br>
>     llvm/trunk/lib/Target/AMDGPU/SIISelLowering.cpp<br>
>     llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp<br>
>     llvm/trunk/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp<br>
>     llvm/trunk/test/CodeGen/AMDGPU/addrspacecast.ll<br>
>     llvm/trunk/test/CodeGen/AMDGPU/call.ll<br>
>     llvm/trunk/test/CodeGen/AMDGPU/dynamic_stackalloc.ll<br>
>     llvm/trunk/test/CodeGen/AMDGPU/global-zero-initializer.ll<br>
>     llvm/trunk/test/CodeGen/AMDGPU/lds-initializer.ll<br>
>     llvm/trunk/test/CodeGen/AMDGPU/lds-zero-initializer.ll<br>
>     llvm/trunk/test/CodeGen/AMDGPU/llvm.amdgcn.dispatch.ptr.ll<br>
>     llvm/trunk/test/CodeGen/AMDGPU/no-hsa-graphics-shaders.ll<br>
>     llvm/trunk/test/CodeGen/AMDGPU/promote-alloca-bitcast-function.ll<br>
><br>
> Modified: llvm/trunk/include/llvm/IR/DiagnosticInfo.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DiagnosticInfo.h?rev=258951&r1=258950&r2=258951&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DiagnosticInfo.h?rev=258951&r1=258950&r2=258951&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/include/llvm/IR/DiagnosticInfo.h (original)<br>
> +++ llvm/trunk/include/llvm/IR/DiagnosticInfo.h Wed Jan 27 11:30:33 2016<br>
> @@ -16,6 +16,7 @@<br>
>  #define LLVM_IR_DIAGNOSTICINFO_H<br>
><br>
>  #include "llvm/ADT/ArrayRef.h"<br>
> +#include "llvm/CodeGen/SelectionDAG.h"<br>
<br>
This really really really doesn't belong into llvm/IR. Please put the<br>
code that needs it somewhere into llvm/CodeGen.<br>
<br>
>  #include "llvm/IR/DebugLoc.h"<br>
>  #include "llvm/IR/Module.h"<br>
>  #include "llvm/Support/Casting.h"<br>
> @@ -60,6 +61,7 @@ enum DiagnosticKind {<br>
>    DK_OptimizationFailure,<br>
>    DK_MIRParser,<br>
>    DK_PGOProfile,<br>
> +  DK_Unsupported,<br>
>    DK_FirstPluginKind<br>
>  };<br>
><br>
> @@ -275,8 +277,42 @@ private:<br>
>    const Twine &Msg;<br>
>  };<br>
><br>
> +/// Common features for diagnostics with an associated DebugLoc<br>
> +class DiagnosticInfoWithDebugLocBase : public DiagnosticInfo {<br>
> +public:<br>
> +  /// \p Fn is the function where the diagnostic is being emitted. \p DLoc is<br>
> +  /// the location information to use in the diagnostic.<br>
> +  DiagnosticInfoWithDebugLocBase(enum DiagnosticKind Kind,<br>
> +                                 enum DiagnosticSeverity Severity,<br>
> +                                 const Function &Fn,<br>
> +                                 const DebugLoc &DLoc)<br>
> +      : DiagnosticInfo(Kind, Severity), Fn(Fn), DLoc(DLoc) {}<br>
> +<br>
> +  /// Return true if location information is available for this diagnostic.<br>
> +  bool isLocationAvailable() const;<br>
> +<br>
> +  /// Return a string with the location information for this diagnostic<br>
> +  /// in the format "file:line:col". If location information is not available,<br>
> +  /// it returns "<unknown>:0:0".<br>
> +  const std::string getLocationStr() const;<br>
> +<br>
> +  /// Return location information for this diagnostic in three parts:<br>
> +  /// the source file name, line number and column.<br>
> +  void getLocation(StringRef *Filename, unsigned *Line, unsigned *Column) const;<br>
> +<br>
> +  const Function &getFunction() const { return Fn; }<br>
> +  const DebugLoc &getDebugLoc() const { return DLoc; }<br>
> +<br>
> +private:<br>
> +  /// Function where this diagnostic is triggered.<br>
> +  const Function &Fn;<br>
> +<br>
> +  /// Debug location where this diagnostic is triggered.<br>
> +  DebugLoc DLoc;<br>
> +};<br>
> +<br>
>  /// Common features for diagnostics dealing with optimization remarks.<br>
> -class DiagnosticInfoOptimizationBase : public DiagnosticInfo {<br>
> +class DiagnosticInfoOptimizationBase : public DiagnosticInfoWithDebugLocBase {<br>
>  public:<br>
>    /// \p PassName is the name of the pass emitting this diagnostic.<br>
>    /// \p Fn is the function where the diagnostic is being emitted. \p DLoc is<br>
> @@ -289,8 +325,8 @@ public:<br>
>                                   enum DiagnosticSeverity Severity,<br>
>                                   const char *PassName, const Function &Fn,<br>
>                                   const DebugLoc &DLoc, const Twine &Msg)<br>
> -      : DiagnosticInfo(Kind, Severity), PassName(PassName), Fn(Fn), DLoc(DLoc),<br>
> -        Msg(Msg) {}<br>
> +      : DiagnosticInfoWithDebugLocBase(Kind, Severity, Fn, DLoc),<br>
> +        PassName(PassName), Msg(Msg) {}<br>
><br>
>    /// \see DiagnosticInfo::print.<br>
>    void print(DiagnosticPrinter &DP) const override;<br>
> @@ -302,21 +338,7 @@ public:<br>
>    /// in BackendConsumer::OptimizationRemarkHandler).<br>
>    virtual bool isEnabled() const = 0;<br>
><br>
> -  /// Return true if location information is available for this diagnostic.<br>
> -  bool isLocationAvailable() const;<br>
> -<br>
> -  /// Return a string with the location information for this diagnostic<br>
> -  /// in the format "file:line:col". If location information is not available,<br>
> -  /// it returns "<unknown>:0:0".<br>
> -  const std::string getLocationStr() const;<br>
> -<br>
> -  /// Return location information for this diagnostic in three parts:<br>
> -  /// the source file name, line number and column.<br>
> -  void getLocation(StringRef *Filename, unsigned *Line, unsigned *Column) const;<br>
> -<br>
>    const char *getPassName() const { return PassName; }<br>
> -  const Function &getFunction() const { return Fn; }<br>
> -  const DebugLoc &getDebugLoc() const { return DLoc; }<br>
>    const Twine &getMsg() const { return Msg; }<br>
><br>
>  private:<br>
> @@ -325,12 +347,6 @@ private:<br>
>    /// be emitted.<br>
>    const char *PassName;<br>
><br>
> -  /// Function where this diagnostic is triggered.<br>
> -  const Function &Fn;<br>
> -<br>
> -  /// Debug location where this diagnostic is triggered.<br>
> -  DebugLoc DLoc;<br>
> -<br>
>    /// Message to report.<br>
>    const Twine &Msg;<br>
>  };<br>
> @@ -572,6 +588,35 @@ public:<br>
>    bool isEnabled() const override;<br>
>  };<br>
><br>
> +/// Diagnostic information for unsupported feature in backend.<br>
> +class DiagnosticInfoUnsupported<br>
> +    : public DiagnosticInfoWithDebugLocBase {<br>
> +private:<br>
> +  const Twine &Msg;<br>
> +  const SDValue Value;<br>
> +<br>
> +public:<br>
> +  /// \p Fn is the function where the diagnostic is being emitted. \p DLoc is<br>
> +  /// the location information to use in the diagnostic. If line table<br>
> +  /// information is available, the diagnostic will include the source code<br>
> +  /// location. \p Msg is the message to show. Note that this class does not<br>
> +  /// copy this message, so this reference must be valid for the whole life time<br>
> +  /// of the diagnostic.<br>
> +  DiagnosticInfoUnsupported(const Function &Fn, const Twine &Msg,<br>
> +                            SDLoc DLoc = SDLoc(), SDValue Value = SDValue())<br>
> +      : DiagnosticInfoWithDebugLocBase(DK_Unsupported, DS_Error, Fn,<br>
> +                                       DLoc.getDebugLoc()),<br>
> +        Msg(Msg), Value(Value) {}<br>
> +<br>
> +  static bool classof(const DiagnosticInfo *DI) {<br>
> +    return DI->getKind() == DK_Unsupported;<br>
> +  }<br>
> +<br>
> +  const Twine &getMessage() const { return Msg; }<br>
> +<br>
> +  void print(DiagnosticPrinter &DP) const;<br>
> +};<br>
> +<br>
>  /// Emit a warning when loop vectorization is specified but fails. \p Fn is the<br>
>  /// function triggering the warning, \p DLoc is the debug location where the<br>
>  /// diagnostic is generated. \p Msg is the message string to use.<br>
><br>
> Modified: llvm/trunk/lib/CodeGen/CMakeLists.txt<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CMakeLists.txt?rev=258951&r1=258950&r2=258951&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CMakeLists.txt?rev=258951&r1=258950&r2=258951&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/lib/CodeGen/CMakeLists.txt (original)<br>
> +++ llvm/trunk/lib/CodeGen/CMakeLists.txt Wed Jan 27 11:30:33 2016<br>
> @@ -18,6 +18,7 @@ add_llvm_library(LLVMCodeGen<br>
>    CriticalAntiDepBreaker.cpp<br>
>    DeadMachineInstructionElim.cpp<br>
>    DFAPacketizer.cpp<br>
> +  DiagnosticInfoCodeGen.cpp<br>
>    DwarfEHPrepare.cpp<br>
>    EarlyIfConversion.cpp<br>
>    EdgeBundles.cpp<br>
><br>
> Added: llvm/trunk/lib/CodeGen/DiagnosticInfoCodeGen.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/DiagnosticInfoCodeGen.cpp?rev=258951&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/DiagnosticInfoCodeGen.cpp?rev=258951&view=auto</a><br>
> ==============================================================================<br>
> --- llvm/trunk/lib/CodeGen/DiagnosticInfoCodeGen.cpp (added)<br>
> +++ llvm/trunk/lib/CodeGen/DiagnosticInfoCodeGen.cpp Wed Jan 27 11:30:33 2016<br>
> @@ -0,0 +1,33 @@<br>
> +//===- llvm/Support/DiagnosticInfo.cpp - Diagnostic Definitions -*- C++ -*-===//<br>
> +//<br>
> +//                     The LLVM Compiler Infrastructure<br>
> +//<br>
> +// This file is distributed under the University of Illinois Open Source<br>
> +// License. See LICENSE.TXT for details.<br>
> +//<br>
> +//===----------------------------------------------------------------------===//<br>
> +//<br>
> +// This file defines the different classes involved in codegen diagnostics.<br>
> +//<br>
> +// Diagnostics reporting is still done as part of the LLVMContext.<br>
> +//===----------------------------------------------------------------------===//<br>
> +<br>
> +#include "llvm/IR/DiagnosticInfo.h"<br>
> +#include "llvm/IR/DiagnosticPrinter.h"<br>
> +<br>
> +namespace llvm {<br>
> +<br>
> +void DiagnosticInfoUnsupported::print(DiagnosticPrinter &DP) const {<br>
> +  std::string Str;<br>
> +  raw_string_ostream OS(Str);<br>
> +<br>
> +  OS << getLocationStr() << ": in function " << getFunction().getName() << ' '<br>
> +     << *getFunction().getFunctionType() << ": " << Msg;<br>
> +  if (Value)<br>
> +    Value->print(OS);<br>
> +  OS << '\n';<br>
> +  OS.flush();<br>
> +  DP << Str;<br>
> +}<br>
> +<br>
> +}<br>
><br>
> Modified: llvm/trunk/lib/IR/DiagnosticInfo.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DiagnosticInfo.cpp?rev=258951&r1=258950&r2=258951&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DiagnosticInfo.cpp?rev=258951&r1=258950&r2=258951&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/lib/IR/DiagnosticInfo.cpp (original)<br>
> +++ llvm/trunk/lib/IR/DiagnosticInfo.cpp Wed Jan 27 11:30:33 2016<br>
> @@ -138,11 +138,11 @@ void DiagnosticInfoPGOProfile::print(Dia<br>
>    DP << getMsg();<br>
>  }<br>
><br>
> -bool DiagnosticInfoOptimizationBase::isLocationAvailable() const {<br>
> +bool DiagnosticInfoWithDebugLocBase::isLocationAvailable() const {<br>
>    return getDebugLoc();<br>
>  }<br>
><br>
> -void DiagnosticInfoOptimizationBase::getLocation(StringRef *Filename,<br>
> +void DiagnosticInfoWithDebugLocBase::getLocation(StringRef *Filename,<br>
>                                                   unsigned *Line,<br>
>                                                   unsigned *Column) const {<br>
>    DILocation *L = getDebugLoc();<br>
> @@ -152,7 +152,7 @@ void DiagnosticInfoOptimizationBase::get<br>
>    *Column = L->getColumn();<br>
>  }<br>
><br>
> -const std::string DiagnosticInfoOptimizationBase::getLocationStr() const {<br>
> +const std::string DiagnosticInfoWithDebugLocBase::getLocationStr() const {<br>
>    StringRef Filename("<unknown>");<br>
>    unsigned Line = 0;<br>
>    unsigned Column = 0;<br>
><br>
> Removed: llvm/trunk/lib/Target/AMDGPU/AMDGPUDiagnosticInfoUnsupported.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUDiagnosticInfoUnsupported.cpp?rev=258950&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUDiagnosticInfoUnsupported.cpp?rev=258950&view=auto</a><br>
> ==============================================================================<br>
> --- llvm/trunk/lib/Target/AMDGPU/AMDGPUDiagnosticInfoUnsupported.cpp (original)<br>
> +++ llvm/trunk/lib/Target/AMDGPU/AMDGPUDiagnosticInfoUnsupported.cpp (removed)<br>
> @@ -1,26 +0,0 @@<br>
> -//===-- AMDGPUDiagnosticInfoUnsupported.cpp -------------------------------===//<br>
> -//<br>
> -//                     The LLVM Compiler Infrastructure<br>
> -//<br>
> -// This file is distributed under the University of Illinois Open Source<br>
> -// License. See LICENSE.TXT for details.<br>
> -//<br>
> -//===----------------------------------------------------------------------===//<br>
> -<br>
> -#include "AMDGPUDiagnosticInfoUnsupported.h"<br>
> -<br>
> -using namespace llvm;<br>
> -<br>
> -DiagnosticInfoUnsupported::DiagnosticInfoUnsupported(<br>
> -  const Function &Fn,<br>
> -  const Twine &Desc,<br>
> -  DiagnosticSeverity Severity)<br>
> -  : DiagnosticInfo(getKindID(), Severity),<br>
> -    Description(Desc),<br>
> -    Fn(Fn) { }<br>
> -<br>
> -int DiagnosticInfoUnsupported::KindID = 0;<br>
> -<br>
> -void DiagnosticInfoUnsupported::print(DiagnosticPrinter &DP) const {<br>
> -  DP << "unsupported " << getDescription() << " in " << Fn.getName();<br>
> -}<br>
><br>
> Removed: llvm/trunk/lib/Target/AMDGPU/AMDGPUDiagnosticInfoUnsupported.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUDiagnosticInfoUnsupported.h?rev=258950&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUDiagnosticInfoUnsupported.h?rev=258950&view=auto</a><br>
> ==============================================================================<br>
> --- llvm/trunk/lib/Target/AMDGPU/AMDGPUDiagnosticInfoUnsupported.h (original)<br>
> +++ llvm/trunk/lib/Target/AMDGPU/AMDGPUDiagnosticInfoUnsupported.h (removed)<br>
> @@ -1,48 +0,0 @@<br>
> -//===-- AMDGPUDiagnosticInfoUnsupported.h - Error reporting -----*- C++ -*-===//<br>
> -//<br>
> -//                     The LLVM Compiler Infrastructure<br>
> -//<br>
> -// This file is distributed under the University of Illinois Open Source<br>
> -// License. See LICENSE.TXT for details.<br>
> -//<br>
> -//===----------------------------------------------------------------------===//<br>
> -<br>
> -#ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUDIAGNOSTICINFOUNSUPPORTED_H<br>
> -#define LLVM_LIB_TARGET_AMDGPU_AMDGPUDIAGNOSTICINFOUNSUPPORTED_H<br>
> -<br>
> -#include "llvm/IR/DiagnosticInfo.h"<br>
> -#include "llvm/IR/DiagnosticPrinter.h"<br>
> -<br>
> -namespace llvm {<br>
> -<br>
> -/// Diagnostic information for unimplemented or unsupported feature reporting.<br>
> -class DiagnosticInfoUnsupported : public DiagnosticInfo {<br>
> -private:<br>
> -  const Twine &Description;<br>
> -  const Function &Fn;<br>
> -<br>
> -  static int KindID;<br>
> -<br>
> -  static int getKindID() {<br>
> -    if (KindID == 0)<br>
> -      KindID = llvm::getNextAvailablePluginDiagnosticKind();<br>
> -    return KindID;<br>
> -  }<br>
> -<br>
> -public:<br>
> -  DiagnosticInfoUnsupported(const Function &Fn, const Twine &Desc,<br>
> -                            DiagnosticSeverity Severity = DS_Error);<br>
> -<br>
> -  const Function &getFunction() const { return Fn; }<br>
> -  const Twine &getDescription() const { return Description; }<br>
> -<br>
> -  void print(DiagnosticPrinter &DP) const override;<br>
> -<br>
> -  static bool classof(const DiagnosticInfo *DI) {<br>
> -    return DI->getKind() == getKindID();<br>
> -  }<br>
> -};<br>
> -<br>
> -}<br>
> -<br>
> -#endif<br>
><br>
> Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp?rev=258951&r1=258950&r2=258951&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp?rev=258951&r1=258950&r2=258951&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp (original)<br>
> +++ llvm/trunk/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp Wed Jan 27 11:30:33 2016<br>
> @@ -12,7 +12,6 @@<br>
>  //<br>
>  //===----------------------------------------------------------------------===//<br>
><br>
> -#include "AMDGPUDiagnosticInfoUnsupported.h"<br>
>  #include "AMDGPUInstrInfo.h"<br>
>  #include "AMDGPUISelLowering.h" // For AMDGPUISD<br>
>  #include "AMDGPURegisterInfo.h"<br>
> @@ -27,6 +26,7 @@<br>
>  #include "llvm/CodeGen/PseudoSourceValue.h"<br>
>  #include "llvm/CodeGen/SelectionDAG.h"<br>
>  #include "llvm/CodeGen/SelectionDAGISel.h"<br>
> +#include "llvm/IR/DiagnosticInfo.h"<br>
>  #include "llvm/IR/Function.h"<br>
><br>
>  using namespace llvm;<br>
> @@ -1220,7 +1220,7 @@ SDNode *AMDGPUDAGToDAGISel::SelectAddrSp<br>
><br>
>    const MachineFunction &MF = CurDAG->getMachineFunction();<br>
>    DiagnosticInfoUnsupported NotImplemented(*MF.getFunction(),<br>
> -                                           "addrspacecast not implemented");<br>
> +                                           "addrspacecast not implemented", DL);<br>
>    CurDAG->getContext()->diagnose(NotImplemented);<br>
><br>
>    assert(Subtarget->hasFlatAddressSpace() &&<br>
><br>
> Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPUISelLowering.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUISelLowering.cpp?rev=258951&r1=258950&r2=258951&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUISelLowering.cpp?rev=258951&r1=258950&r2=258951&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/lib/Target/AMDGPU/AMDGPUISelLowering.cpp (original)<br>
> +++ llvm/trunk/lib/Target/AMDGPU/AMDGPUISelLowering.cpp Wed Jan 27 11:30:33 2016<br>
> @@ -15,7 +15,7 @@<br>
><br>
>  #include "AMDGPUISelLowering.h"<br>
>  #include "AMDGPU.h"<br>
> -#include "AMDGPUDiagnosticInfoUnsupported.h"<br>
> +//#include "AMDGPUDiagnosticInfoUnsupported.h"<br>
>  #include "AMDGPUFrameLowering.h"<br>
>  #include "AMDGPUIntrinsicInfo.h"<br>
>  #include "AMDGPURegisterInfo.h"<br>
> @@ -28,6 +28,7 @@<br>
>  #include "llvm/CodeGen/SelectionDAG.h"<br>
>  #include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"<br>
>  #include "llvm/IR/DataLayout.h"<br>
> +#include "llvm/IR/DiagnosticInfo.h"<br>
>  #include "SIInstrInfo.h"<br>
>  using namespace llvm;<br>
><br>
> @@ -609,7 +610,7 @@ SDValue AMDGPUTargetLowering::LowerCall(<br>
>    else if (const GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Callee))<br>
>      FuncName = G->getGlobal()->getName();<br>
><br>
> -  DiagnosticInfoUnsupported NoCalls(Fn, "call to function " + FuncName);<br>
> +  DiagnosticInfoUnsupported NoCalls(Fn, "unsupported call to function " + FuncName, CLI.DL);<br>
>    DAG.getContext()->diagnose(NoCalls);<br>
>    return SDValue();<br>
>  }<br>
> @@ -618,7 +619,7 @@ SDValue AMDGPUTargetLowering::LowerDYNAM<br>
>                                                        SelectionDAG &DAG) const {<br>
>    const Function &Fn = *DAG.getMachineFunction().getFunction();<br>
><br>
> -  DiagnosticInfoUnsupported NoDynamicAlloca(Fn, "dynamic alloca");<br>
> +  DiagnosticInfoUnsupported NoDynamicAlloca(Fn, "unsupported dynamic alloca", SDLoc(Op));<br>
>    DAG.getContext()->diagnose(NoDynamicAlloca);<br>
>    return SDValue();<br>
>  }<br>
> @@ -865,8 +866,8 @@ SDValue AMDGPUTargetLowering::LowerGloba<br>
>    }<br>
><br>
>    const Function &Fn = *DAG.getMachineFunction().getFunction();<br>
> -  DiagnosticInfoUnsupported BadInit(Fn,<br>
> -                                    "initializer for address space");<br>
> +  DiagnosticInfoUnsupported BadInit(<br>
> +      Fn, "unsupported initializer for address space", SDLoc(Op));<br>
>    DAG.getContext()->diagnose(BadInit);<br>
>    return SDValue();<br>
>  }<br>
><br>
> Modified: llvm/trunk/lib/Target/AMDGPU/CMakeLists.txt<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/CMakeLists.txt?rev=258951&r1=258950&r2=258951&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/CMakeLists.txt?rev=258951&r1=258950&r2=258951&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/lib/Target/AMDGPU/CMakeLists.txt (original)<br>
> +++ llvm/trunk/lib/Target/AMDGPU/CMakeLists.txt Wed Jan 27 11:30:33 2016<br>
> @@ -18,7 +18,6 @@ add_llvm_target(AMDGPUCodeGen<br>
>    AMDGPUAnnotateKernelFeatures.cpp<br>
>    AMDGPUAnnotateUniformValues.cpp<br>
>    AMDGPUAsmPrinter.cpp<br>
> -  AMDGPUDiagnosticInfoUnsupported.cpp<br>
>    AMDGPUFrameLowering.cpp<br>
>    AMDGPUTargetObjectFile.cpp<br>
>    AMDGPUIntrinsicInfo.cpp<br>
><br>
> Modified: llvm/trunk/lib/Target/AMDGPU/SIISelLowering.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/SIISelLowering.cpp?rev=258951&r1=258950&r2=258951&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/SIISelLowering.cpp?rev=258951&r1=258950&r2=258951&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/lib/Target/AMDGPU/SIISelLowering.cpp (original)<br>
> +++ llvm/trunk/lib/Target/AMDGPU/SIISelLowering.cpp Wed Jan 27 11:30:33 2016<br>
> @@ -20,7 +20,6 @@<br>
><br>
>  #include "SIISelLowering.h"<br>
>  #include "AMDGPU.h"<br>
> -#include "AMDGPUDiagnosticInfoUnsupported.h"<br>
>  #include "AMDGPUIntrinsicInfo.h"<br>
>  #include "AMDGPUSubtarget.h"<br>
>  #include "SIInstrInfo.h"<br>
> @@ -32,6 +31,7 @@<br>
>  #include "llvm/CodeGen/MachineInstrBuilder.h"<br>
>  #include "llvm/CodeGen/MachineRegisterInfo.h"<br>
>  #include "llvm/CodeGen/SelectionDAG.h"<br>
> +#include "llvm/IR/DiagnosticInfo.h"<br>
>  #include "llvm/IR/Function.h"<br>
>  #include "llvm/ADT/SmallString.h"<br>
><br>
> @@ -591,7 +591,8 @@ SDValue SITargetLowering::LowerFormalArg<br>
><br>
>    if (Subtarget->isAmdHsaOS() && Info->getShaderType() != ShaderType::COMPUTE) {<br>
>      const Function *Fn = MF.getFunction();<br>
> -    DiagnosticInfoUnsupported NoGraphicsHSA(*Fn, "non-compute shaders with HSA");<br>
> +    DiagnosticInfoUnsupported NoGraphicsHSA(<br>
> +        *Fn, "unsupported non-compute shaders with HSA", DL);<br>
>      DAG.getContext()->diagnose(NoGraphicsHSA);<br>
>      return SDValue();<br>
>    }<br>
> @@ -1320,8 +1321,9 @@ SDValue SITargetLowering::LowerINTRINSIC<br>
>    switch (IntrinsicID) {<br>
>    case Intrinsic::amdgcn_dispatch_ptr:<br>
>      if (!Subtarget->isAmdHsaOS()) {<br>
> -      DiagnosticInfoUnsupported BadIntrin(*MF.getFunction(),<br>
> -                                          "hsa intrinsic without hsa target");<br>
> +      DiagnosticInfoUnsupported BadIntrin(<br>
> +          *MF.getFunction(), "unsupported hsa intrinsic without hsa target",<br>
> +          DL);<br>
>        DAG.getContext()->diagnose(BadIntrin);<br>
>        return DAG.getUNDEF(VT);<br>
>      }<br>
><br>
> Modified: llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp?rev=258951&r1=258950&r2=258951&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp?rev=258951&r1=258950&r2=258951&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp (original)<br>
> +++ llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp Wed Jan 27 11:30:33 2016<br>
> @@ -34,60 +34,6 @@ using namespace llvm;<br>
><br>
>  #define DEBUG_TYPE "bpf-lower"<br>
><br>
> -namespace {<br>
> -<br>
> -// Diagnostic information for unimplemented or unsupported feature reporting.<br>
> -class DiagnosticInfoUnsupported : public DiagnosticInfo {<br>
> -private:<br>
> -  // Debug location where this diagnostic is triggered.<br>
> -  DebugLoc DLoc;<br>
> -  const Twine &Description;<br>
> -  const Function &Fn;<br>
> -  SDValue Value;<br>
> -<br>
> -  static int KindID;<br>
> -<br>
> -  static int getKindID() {<br>
> -    if (KindID == 0)<br>
> -      KindID = llvm::getNextAvailablePluginDiagnosticKind();<br>
> -    return KindID;<br>
> -  }<br>
> -<br>
> -public:<br>
> -  DiagnosticInfoUnsupported(SDLoc DLoc, const Function &Fn, const Twine &Desc,<br>
> -                            SDValue Value)<br>
> -      : DiagnosticInfo(getKindID(), DS_Error), DLoc(DLoc.getDebugLoc()),<br>
> -        Description(Desc), Fn(Fn), Value(Value) {}<br>
> -<br>
> -  void print(DiagnosticPrinter &DP) const override {<br>
> -    std::string Str;<br>
> -    raw_string_ostream OS(Str);<br>
> -<br>
> -    if (DLoc) {<br>
> -      auto DIL = DLoc.get();<br>
> -      StringRef Filename = DIL->getFilename();<br>
> -      unsigned Line = DIL->getLine();<br>
> -      unsigned Column = DIL->getColumn();<br>
> -      OS << Filename << ':' << Line << ':' << Column << ' ';<br>
> -    }<br>
> -<br>
> -    OS << "in function " << Fn.getName() << ' ' << *Fn.getFunctionType() << '\n'<br>
> -       << Description;<br>
> -    if (Value)<br>
> -      Value->print(OS);<br>
> -    OS << '\n';<br>
> -    OS.flush();<br>
> -    DP << Str;<br>
> -  }<br>
> -<br>
> -  static bool classof(const DiagnosticInfo *DI) {<br>
> -    return DI->getKind() == getKindID();<br>
> -  }<br>
> -};<br>
> -<br>
> -int DiagnosticInfoUnsupported::KindID = 0;<br>
> -}<br>
> -<br>
>  BPFTargetLowering::BPFTargetLowering(const TargetMachine &TM,<br>
>                                       const BPFSubtarget &STI)<br>
>      : TargetLowering(TM) {<br>
> @@ -236,16 +182,16 @@ SDValue BPFTargetLowering::LowerFormalAr<br>
>          InVals.push_back(ArgValue);<br>
>        }<br>
>      } else {<br>
> -      DiagnosticInfoUnsupported Err(DL, *MF.getFunction(),<br>
> -                                    "defined with too many args", SDValue());<br>
> +      DiagnosticInfoUnsupported Err(<br>
> +          *MF.getFunction(), "defined with too many args", DL);<br>
>        DAG.getContext()->diagnose(Err);<br>
>      }<br>
>    }<br>
><br>
>    if (IsVarArg || MF.getFunction()->hasStructRetAttr()) {<br>
>      DiagnosticInfoUnsupported Err(<br>
> -        DL, *MF.getFunction(),<br>
> -        "functions with VarArgs or StructRet are not supported", SDValue());<br>
> +        *MF.getFunction(),<br>
> +        "functions with VarArgs or StructRet are not supported", DL);<br>
>      DAG.getContext()->diagnose(Err);<br>
>    }<br>
><br>
> @@ -285,8 +231,8 @@ SDValue BPFTargetLowering::LowerCall(Tar<br>
>    unsigned NumBytes = CCInfo.getNextStackOffset();<br>
><br>
>    if (Outs.size() >= 6) {<br>
> -    DiagnosticInfoUnsupported Err(CLI.DL, *MF.getFunction(),<br>
> -                                  "too many args to ", Callee);<br>
> +    DiagnosticInfoUnsupported Err(*MF.getFunction(), "too many args to ",<br>
> +                                  CLI.DL, Callee);<br>
>      DAG.getContext()->diagnose(Err);<br>
>    }<br>
><br>
> @@ -295,8 +241,8 @@ SDValue BPFTargetLowering::LowerCall(Tar<br>
>      if (!Flags.isByVal())<br>
>        continue;<br>
><br>
> -    DiagnosticInfoUnsupported Err(CLI.DL, *MF.getFunction(),<br>
> -                                  "pass by value not supported ", Callee);<br>
> +    DiagnosticInfoUnsupported Err(<br>
> +        *MF.getFunction(), "pass by value not supported ", CLI.DL, Callee);<br>
>      DAG.getContext()->diagnose(Err);<br>
>    }<br>
><br>
> @@ -398,8 +344,8 @@ BPFTargetLowering::LowerReturn(SDValue C<br>
>    CCState CCInfo(CallConv, IsVarArg, MF, RVLocs, *DAG.getContext());<br>
><br>
>    if (MF.getFunction()->getReturnType()->isAggregateType()) {<br>
> -    DiagnosticInfoUnsupported Err(DL, *MF.getFunction(),<br>
> -                                  "only integer returns supported", SDValue());<br>
> +    DiagnosticInfoUnsupported Err(<br>
> +        *MF.getFunction(), "only integer returns supported", DL);<br>
>      DAG.getContext()->diagnose(Err);<br>
>    }<br>
><br>
> @@ -443,8 +389,8 @@ SDValue BPFTargetLowering::LowerCallResu<br>
>    CCState CCInfo(CallConv, IsVarArg, MF, RVLocs, *DAG.getContext());<br>
><br>
>    if (Ins.size() >= 2) {<br>
> -    DiagnosticInfoUnsupported Err(DL, *MF.getFunction(),<br>
> -                                  "only small returns supported", SDValue());<br>
> +    DiagnosticInfoUnsupported Err(*MF.getFunction(),<br>
> +                                  "only small returns supported", DL);<br>
>      DAG.getContext()->diagnose(Err);<br>
>    }<br>
><br>
><br>
> Modified: llvm/trunk/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp?rev=258951&r1=258950&r2=258951&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp?rev=258951&r1=258950&r2=258951&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp (original)<br>
> +++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp Wed Jan 27 11:30:33 2016<br>
> @@ -35,61 +35,6 @@ using namespace llvm;<br>
><br>
>  #define DEBUG_TYPE "wasm-lower"<br>
><br>
> -namespace {<br>
> -// Diagnostic information for unimplemented or unsupported feature reporting.<br>
> -// TODO: This code is copied from BPF and AMDGPU; consider factoring it out<br>
> -// and sharing code.<br>
> -class DiagnosticInfoUnsupported final : public DiagnosticInfo {<br>
> -private:<br>
> -  // Debug location where this diagnostic is triggered.<br>
> -  DebugLoc DLoc;<br>
> -  const Twine &Description;<br>
> -  const Function &Fn;<br>
> -  SDValue Value;<br>
> -<br>
> -  static int KindID;<br>
> -<br>
> -  static int getKindID() {<br>
> -    if (KindID == 0)<br>
> -      KindID = llvm::getNextAvailablePluginDiagnosticKind();<br>
> -    return KindID;<br>
> -  }<br>
> -<br>
> -public:<br>
> -  DiagnosticInfoUnsupported(SDLoc DLoc, const Function &Fn, const Twine &Desc,<br>
> -                            SDValue Value)<br>
> -      : DiagnosticInfo(getKindID(), DS_Error), DLoc(DLoc.getDebugLoc()),<br>
> -        Description(Desc), Fn(Fn), Value(Value) {}<br>
> -<br>
> -  void print(DiagnosticPrinter &DP) const override {<br>
> -    std::string Str;<br>
> -    raw_string_ostream OS(Str);<br>
> -<br>
> -    if (DLoc) {<br>
> -      auto DIL = DLoc.get();<br>
> -      StringRef Filename = DIL->getFilename();<br>
> -      unsigned Line = DIL->getLine();<br>
> -      unsigned Column = DIL->getColumn();<br>
> -      OS << Filename << ':' << Line << ':' << Column << ' ';<br>
> -    }<br>
> -<br>
> -    OS << "in function " << Fn.getName() << ' ' << *Fn.getFunctionType() << '\n'<br>
> -       << Description;<br>
> -    if (Value)<br>
> -      Value->print(OS);<br>
> -    OS << '\n';<br>
> -    OS.flush();<br>
> -    DP << Str;<br>
> -  }<br>
> -<br>
> -  static bool classof(const DiagnosticInfo *DI) {<br>
> -    return DI->getKind() == getKindID();<br>
> -  }<br>
> -};<br>
> -<br>
> -int DiagnosticInfoUnsupported::KindID = 0;<br>
> -} // end anonymous namespace<br>
> -<br>
>  WebAssemblyTargetLowering::WebAssemblyTargetLowering(<br>
>      const TargetMachine &TM, const WebAssemblySubtarget &STI)<br>
>      : TargetLowering(TM), Subtarget(&STI) {<br>
><br>
> Modified: llvm/trunk/test/CodeGen/AMDGPU/addrspacecast.ll<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/addrspacecast.ll?rev=258951&r1=258950&r2=258951&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/addrspacecast.ll?rev=258951&r1=258950&r2=258951&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/test/CodeGen/AMDGPU/addrspacecast.ll (original)<br>
> +++ llvm/trunk/test/CodeGen/AMDGPU/addrspacecast.ll Wed Jan 27 11:30:33 2016<br>
> @@ -1,6 +1,6 @@<br>
>  ; RUN: not llc -O0 -march=amdgcn -mcpu=bonaire -mattr=-promote-alloca < %s 2>&1 | FileCheck -check-prefix=ERROR %s<br>
><br>
> -; ERROR: unsupported addrspacecast not implemented<br>
> +; ERROR: addrspacecast not implemented<br>
><br>
>  ; XUN: llc -O0 -march=amdgcn -mcpu=bonaire -mattr=-promote-alloca < %s | FileCheck -check-prefix=CHECK -check-prefix=CHECK-NO-PROMOTE %s<br>
>  ; XUN: llc -O0 -march=amdgcn -mcpu=bonaire -mattr=+promote-alloca < %s | FileCheck -check-prefix=CHECK -check-prefix=CHECK-PROMOTE %s<br>
><br>
> Modified: llvm/trunk/test/CodeGen/AMDGPU/call.ll<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/call.ll?rev=258951&r1=258950&r2=258951&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/call.ll?rev=258951&r1=258950&r2=258951&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/test/CodeGen/AMDGPU/call.ll (original)<br>
> +++ llvm/trunk/test/CodeGen/AMDGPU/call.ll Wed Jan 27 11:30:33 2016<br>
> @@ -2,7 +2,7 @@<br>
>  ; RUN: not llc -march=amdgcn -mcpu=tonga -verify-machineinstrs< %s 2>&1 | FileCheck %s<br>
>  ; RUN: not llc -march=r600 -mcpu=cypress < %s 2>&1 | FileCheck %s<br>
><br>
> -; CHECK: error: unsupported call to function external_function in test_call_external<br>
> +; CHECK: in function test_call_external{{.*}}: unsupported call to function external_function<br>
><br>
><br>
>  declare i32 @external_function(i32) nounwind<br>
><br>
> Modified: llvm/trunk/test/CodeGen/AMDGPU/dynamic_stackalloc.ll<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/dynamic_stackalloc.ll?rev=258951&r1=258950&r2=258951&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/dynamic_stackalloc.ll?rev=258951&r1=258950&r2=258951&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/test/CodeGen/AMDGPU/dynamic_stackalloc.ll (original)<br>
> +++ llvm/trunk/test/CodeGen/AMDGPU/dynamic_stackalloc.ll Wed Jan 27 11:30:33 2016<br>
> @@ -2,7 +2,7 @@<br>
>  ; RUN: not llc -march=amdgcn -mcpu=tahiti -mattr=-promote-alloca -verify-machineinstrs < %s 2>&1 | FileCheck %s<br>
>  ; RUN: not llc -march=r600 -mcpu=cypress < %s 2>&1 | FileCheck %s<br>
><br>
> -; CHECK: error: unsupported dynamic alloca in test_dynamic_stackalloc<br>
> +; CHECK: in function test_dynamic_stackalloc{{.*}}: unsupported dynamic alloca<br>
><br>
>  define void @test_dynamic_stackalloc(i32 addrspace(1)* %out, i32 %n) {<br>
>    %alloca = alloca i32, i32 %n<br>
><br>
> Modified: llvm/trunk/test/CodeGen/AMDGPU/global-zero-initializer.ll<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/global-zero-initializer.ll?rev=258951&r1=258950&r2=258951&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/global-zero-initializer.ll?rev=258951&r1=258950&r2=258951&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/test/CodeGen/AMDGPU/global-zero-initializer.ll (original)<br>
> +++ llvm/trunk/test/CodeGen/AMDGPU/global-zero-initializer.ll Wed Jan 27 11:30:33 2016<br>
> @@ -1,7 +1,7 @@<br>
>  ; RUN: not llc -march=amdgcn -mcpu=SI < %s 2>&1 | FileCheck %s<br>
>  ; RUN: not llc -march=amdgcn -mcpu=tonga < %s 2>&1 | FileCheck %s<br>
><br>
> -; CHECK: error: unsupported initializer for address space in load_init_global_global<br>
> +; CHECK: in function load_init_global_global{{.*}}: unsupported initializer for address space<br>
><br>
>  @lds = addrspace(1) global [256 x i32] zeroinitializer<br>
><br>
><br>
> Modified: llvm/trunk/test/CodeGen/AMDGPU/lds-initializer.ll<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/lds-initializer.ll?rev=258951&r1=258950&r2=258951&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/lds-initializer.ll?rev=258951&r1=258950&r2=258951&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/test/CodeGen/AMDGPU/lds-initializer.ll (original)<br>
> +++ llvm/trunk/test/CodeGen/AMDGPU/lds-initializer.ll Wed Jan 27 11:30:33 2016<br>
> @@ -1,7 +1,7 @@<br>
>  ; RUN: not llc -march=amdgcn -mcpu=SI < %s 2>&1 | FileCheck %s<br>
>  ; RUN: not llc -march=amdgcn -mcpu=tonga < %s 2>&1 | FileCheck %s<br>
><br>
> -; CHECK: error: unsupported initializer for address space in load_init_lds_global<br>
> +; CHECK: in function load_init_lds_global{{.*}}: unsupported initializer for address space<br>
><br>
>  @lds = addrspace(3) global [8 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8]<br>
><br>
><br>
> Modified: llvm/trunk/test/CodeGen/AMDGPU/lds-zero-initializer.ll<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/lds-zero-initializer.ll?rev=258951&r1=258950&r2=258951&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/lds-zero-initializer.ll?rev=258951&r1=258950&r2=258951&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/test/CodeGen/AMDGPU/lds-zero-initializer.ll (original)<br>
> +++ llvm/trunk/test/CodeGen/AMDGPU/lds-zero-initializer.ll Wed Jan 27 11:30:33 2016<br>
> @@ -1,7 +1,7 @@<br>
>  ; RUN: not llc -march=amdgcn -mcpu=SI < %s 2>&1 | FileCheck %s<br>
>  ; RUN: not llc -march=amdgcn -mcpu=tonga < %s 2>&1 | FileCheck %s<br>
><br>
> -; CHECK: error: unsupported initializer for address space in load_zeroinit_lds_global<br>
> +; CHECK: in function load_zeroinit_lds_global{{.*}}: unsupported initializer for address space<br>
><br>
>  @lds = addrspace(3) global [256 x i32] zeroinitializer<br>
><br>
><br>
> Modified: llvm/trunk/test/CodeGen/AMDGPU/llvm.amdgcn.dispatch.ptr.ll<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/llvm.amdgcn.dispatch.ptr.ll?rev=258951&r1=258950&r2=258951&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/llvm.amdgcn.dispatch.ptr.ll?rev=258951&r1=258950&r2=258951&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/test/CodeGen/AMDGPU/llvm.amdgcn.dispatch.ptr.ll (original)<br>
> +++ llvm/trunk/test/CodeGen/AMDGPU/llvm.amdgcn.dispatch.ptr.ll Wed Jan 27 11:30:33 2016<br>
> @@ -1,7 +1,7 @@<br>
>  ; RUN: llc -mtriple=amdgcn--amdhsa -mcpu=kaveri -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s<br>
>  ; RUN: not llc -mtriple=amdgcn-unknown-unknown -mcpu=kaveri -verify-machineinstrs < %s 2>&1 | FileCheck -check-prefix=ERROR %s<br>
><br>
> -; ERROR: error: unsupported hsa intrinsic without hsa target in test<br>
> +; ERROR: in function test{{.*}}: unsupported hsa intrinsic without hsa target<br>
><br>
>  ; GCN-LABEL: {{^}}test:<br>
>  ; GCN: enable_sgpr_dispatch_ptr = 1<br>
><br>
> Modified: llvm/trunk/test/CodeGen/AMDGPU/no-hsa-graphics-shaders.ll<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/no-hsa-graphics-shaders.ll?rev=258951&r1=258950&r2=258951&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/no-hsa-graphics-shaders.ll?rev=258951&r1=258950&r2=258951&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/test/CodeGen/AMDGPU/no-hsa-graphics-shaders.ll (original)<br>
> +++ llvm/trunk/test/CodeGen/AMDGPU/no-hsa-graphics-shaders.ll Wed Jan 27 11:30:33 2016<br>
> @@ -1,6 +1,6 @@<br>
>  ; RUN: not llc -march=amdgcn -mtriple=amdgcn-unknown-amdhsa < %s 2>&1 | FileCheck %s<br>
><br>
> -; CHECK: error: unsupported non-compute shaders with HSA in pixel_shader<br>
> +; CHECK: in function pixel_s{{.*}}: unsupported non-compute shaders with HSA<br>
>  define void @pixel_shader() #0 {<br>
>    ret void<br>
>  }<br>
><br>
> Modified: llvm/trunk/test/CodeGen/AMDGPU/promote-alloca-bitcast-function.ll<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/promote-alloca-bitcast-function.ll?rev=258951&r1=258950&r2=258951&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/promote-alloca-bitcast-function.ll?rev=258951&r1=258950&r2=258951&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/test/CodeGen/AMDGPU/promote-alloca-bitcast-function.ll (original)<br>
> +++ llvm/trunk/test/CodeGen/AMDGPU/promote-alloca-bitcast-function.ll Wed Jan 27 11:30:33 2016<br>
> @@ -6,7 +6,7 @@<br>
>  declare void @foo(float*) #0<br>
>  declare void @foo.varargs(...) #0<br>
><br>
> -; CHECK: error: unsupported call to function foo in crash_call_constexpr_cast<br>
> +; CHECK: in function crash_call_constexpr_cast{{.*}}: unsupported call to function foo<br>
>  define void @crash_call_constexpr_cast() #0 {<br>
>    %alloca = alloca i32<br>
>    call void bitcast (void (float*)* @foo to void (i32*)*)(i32* %alloca) #0<br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>