LLVM  13.0.0git
DiagnosticInfo.h
Go to the documentation of this file.
1 //===- llvm/IR/DiagnosticInfo.h - Diagnostic Declaration --------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file declares the different classes involved in low level diagnostics.
10 //
11 // Diagnostics reporting is still done as part of the LLVMContext.
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_IR_DIAGNOSTICINFO_H
15 #define LLVM_IR_DIAGNOSTICINFO_H
16 
17 #include "llvm-c/Types.h"
18 #include "llvm/ADT/Optional.h"
19 #include "llvm/ADT/SmallVector.h"
20 #include "llvm/ADT/StringRef.h"
21 #include "llvm/ADT/Twine.h"
22 #include "llvm/IR/DebugLoc.h"
24 #include "llvm/Support/TypeSize.h"
26 #include <algorithm>
27 #include <cstdint>
28 #include <functional>
29 #include <iterator>
30 #include <string>
31 
32 namespace llvm {
33 
34 // Forward declarations.
35 class DiagnosticPrinter;
36 class Function;
37 class Instruction;
38 class InstructionCost;
39 class LLVMContext;
40 class Module;
41 class SMDiagnostic;
42 
43 /// Defines the different supported severity of a diagnostic.
44 enum DiagnosticSeverity : char {
48  // A note attaches additional information to one of the previous diagnostic
49  // types.
51 };
52 
53 /// Defines the different supported kind of a diagnostic.
54 /// This enum should be extended with a new ID for each added concrete subclass.
82  DK_FirstPluginKind // Must be last value to work with
83  // getNextAvailablePluginDiagnosticKind
84 };
85 
86 /// Get the next available kind ID for a plugin diagnostic.
87 /// Each time this function is called, it returns a different number.
88 /// Therefore, a plugin that wants to "identify" its own classes
89 /// with a dynamic identifier, just have to use this method to get a new ID
90 /// and assign it to each of its classes.
91 /// The returned ID will be greater than or equal to DK_FirstPluginKind.
92 /// Thus, the plugin identifiers will not conflict with the
93 /// DiagnosticKind values.
95 
96 /// This is the base abstract class for diagnostic reporting in
97 /// the backend.
98 /// The print method must be overloaded by the subclasses to print a
99 /// user-friendly message in the client of the backend (let us call it a
100 /// frontend).
102 private:
103  /// Kind defines the kind of report this is about.
104  const /* DiagnosticKind */ int Kind;
105  /// Severity gives the severity of the diagnostic.
106  const DiagnosticSeverity Severity;
107 
108  virtual void anchor();
109 public:
110  DiagnosticInfo(/* DiagnosticKind */ int Kind, DiagnosticSeverity Severity)
111  : Kind(Kind), Severity(Severity) {}
112 
113  virtual ~DiagnosticInfo() = default;
114 
115  /* DiagnosticKind */ int getKind() const { return Kind; }
116  DiagnosticSeverity getSeverity() const { return Severity; }
117 
118  /// Print using the given \p DP a user-friendly message.
119  /// This is the default message that will be printed to the user.
120  /// It is used when the frontend does not directly take advantage
121  /// of the information contained in fields of the subclasses.
122  /// The printed message must not end with '.' nor start with a severity
123  /// keyword.
124  virtual void print(DiagnosticPrinter &DP) const = 0;
125 };
126 
128 
129 /// Diagnostic information for inline asm reporting.
130 /// This is basically a message and an optional location.
132 private:
133  /// Optional line information. 0 if not set.
134  unsigned LocCookie = 0;
135  /// Message to be reported.
136  const Twine &MsgStr;
137  /// Optional origin of the problem.
138  const Instruction *Instr = nullptr;
139 
140 public:
141  /// \p MsgStr is the message to be reported to the frontend.
142  /// This class does not copy \p MsgStr, therefore the reference must be valid
143  /// for the whole life time of the Diagnostic.
145  DiagnosticSeverity Severity = DS_Error)
146  : DiagnosticInfo(DK_InlineAsm, Severity), MsgStr(MsgStr) {}
147 
148  /// \p LocCookie if non-zero gives the line number for this report.
149  /// \p MsgStr gives the message.
150  /// This class does not copy \p MsgStr, therefore the reference must be valid
151  /// for the whole life time of the Diagnostic.
152  DiagnosticInfoInlineAsm(unsigned LocCookie, const Twine &MsgStr,
153  DiagnosticSeverity Severity = DS_Error)
154  : DiagnosticInfo(DK_InlineAsm, Severity), LocCookie(LocCookie),
155  MsgStr(MsgStr) {}
156 
157  /// \p Instr gives the original instruction that triggered the diagnostic.
158  /// \p MsgStr gives the message.
159  /// This class does not copy \p MsgStr, therefore the reference must be valid
160  /// for the whole life time of the Diagnostic.
161  /// Same for \p I.
162  DiagnosticInfoInlineAsm(const Instruction &I, const Twine &MsgStr,
163  DiagnosticSeverity Severity = DS_Error);
164 
165  unsigned getLocCookie() const { return LocCookie; }
166  const Twine &getMsgStr() const { return MsgStr; }
167  const Instruction *getInstruction() const { return Instr; }
168 
169  /// \see DiagnosticInfo::print.
170  void print(DiagnosticPrinter &DP) const override;
171 
172  static bool classof(const DiagnosticInfo *DI) {
173  return DI->getKind() == DK_InlineAsm;
174  }
175 };
176 
177 /// Diagnostic information for stack size etc. reporting.
178 /// This is basically a function and a size.
180 private:
181  /// The function that is concerned by this resource limit diagnostic.
182  const Function &Fn;
183 
184  /// Description of the resource type (e.g. stack size)
185  const char *ResourceName;
186 
187  /// The computed size usage
188  uint64_t ResourceSize;
189 
190  // Threshould passed
191  uint64_t ResourceLimit;
192 
193 public:
194  /// \p The function that is concerned by this stack size diagnostic.
195  /// \p The computed stack size.
196  DiagnosticInfoResourceLimit(const Function &Fn, const char *ResourceName,
197  uint64_t ResourceSize,
198  DiagnosticSeverity Severity = DS_Warning,
200  uint64_t ResourceLimit = 0)
201  : DiagnosticInfo(Kind, Severity), Fn(Fn), ResourceName(ResourceName),
202  ResourceSize(ResourceSize), ResourceLimit(ResourceLimit) {}
203 
204  const Function &getFunction() const { return Fn; }
205  const char *getResourceName() const { return ResourceName; }
206  uint64_t getResourceSize() const { return ResourceSize; }
207  uint64_t getResourceLimit() const { return ResourceLimit; }
208 
209  /// \see DiagnosticInfo::print.
210  void print(DiagnosticPrinter &DP) const override;
211 
212  static bool classof(const DiagnosticInfo *DI) {
213  return DI->getKind() == DK_ResourceLimit || DI->getKind() == DK_StackSize;
214  }
215 };
216 
218  void anchor() override;
219 public:
220  DiagnosticInfoStackSize(const Function &Fn, uint64_t StackSize,
221  DiagnosticSeverity Severity = DS_Warning,
222  uint64_t StackLimit = 0)
223  : DiagnosticInfoResourceLimit(Fn, "stack size", StackSize, Severity,
224  DK_StackSize, StackLimit) {}
225 
226  uint64_t getStackSize() const { return getResourceSize(); }
227  uint64_t getStackLimit() const { return getResourceLimit(); }
228 
229  static bool classof(const DiagnosticInfo *DI) {
230  return DI->getKind() == DK_StackSize;
231  }
232 };
233 
234 /// Diagnostic information for debug metadata version reporting.
235 /// This is basically a module and a version.
237 private:
238  /// The module that is concerned by this debug metadata version diagnostic.
239  const Module &M;
240  /// The actual metadata version.
241  unsigned MetadataVersion;
242 
243 public:
244  /// \p The module that is concerned by this debug metadata version diagnostic.
245  /// \p The actual metadata version.
246  DiagnosticInfoDebugMetadataVersion(const Module &M, unsigned MetadataVersion,
247  DiagnosticSeverity Severity = DS_Warning)
248  : DiagnosticInfo(DK_DebugMetadataVersion, Severity), M(M),
249  MetadataVersion(MetadataVersion) {}
250 
251  const Module &getModule() const { return M; }
252  unsigned getMetadataVersion() const { return MetadataVersion; }
253 
254  /// \see DiagnosticInfo::print.
255  void print(DiagnosticPrinter &DP) const override;
256 
257  static bool classof(const DiagnosticInfo *DI) {
258  return DI->getKind() == DK_DebugMetadataVersion;
259  }
260 };
261 
262 /// Diagnostic information for stripping invalid debug metadata.
264 private:
265  /// The module that is concerned by this debug metadata version diagnostic.
266  const Module &M;
267 
268 public:
269  /// \p The module that is concerned by this debug metadata version diagnostic.
271  const Module &M, DiagnosticSeverity Severity = DS_Warning)
272  : DiagnosticInfo(DK_DebugMetadataVersion, Severity), M(M) {}
273 
274  const Module &getModule() const { return M; }
275 
276  /// \see DiagnosticInfo::print.
277  void print(DiagnosticPrinter &DP) const override;
278 
279  static bool classof(const DiagnosticInfo *DI) {
280  return DI->getKind() == DK_DebugMetadataInvalid;
281  }
282 };
283 
284 /// Diagnostic information for the sample profiler.
286 public:
287  DiagnosticInfoSampleProfile(StringRef FileName, unsigned LineNum,
288  const Twine &Msg,
289  DiagnosticSeverity Severity = DS_Error)
290  : DiagnosticInfo(DK_SampleProfile, Severity), FileName(FileName),
291  LineNum(LineNum), Msg(Msg) {}
293  DiagnosticSeverity Severity = DS_Error)
294  : DiagnosticInfo(DK_SampleProfile, Severity), FileName(FileName),
295  Msg(Msg) {}
297  DiagnosticSeverity Severity = DS_Error)
298  : DiagnosticInfo(DK_SampleProfile, Severity), Msg(Msg) {}
299 
300  /// \see DiagnosticInfo::print.
301  void print(DiagnosticPrinter &DP) const override;
302 
303  static bool classof(const DiagnosticInfo *DI) {
304  return DI->getKind() == DK_SampleProfile;
305  }
306 
307  StringRef getFileName() const { return FileName; }
308  unsigned getLineNum() const { return LineNum; }
309  const Twine &getMsg() const { return Msg; }
310 
311 private:
312  /// Name of the input file associated with this diagnostic.
313  StringRef FileName;
314 
315  /// Line number where the diagnostic occurred. If 0, no line number will
316  /// be emitted in the message.
317  unsigned LineNum = 0;
318 
319  /// Message to report.
320  const Twine &Msg;
321 };
322 
323 /// Diagnostic information for the PGO profiler.
325 public:
326  DiagnosticInfoPGOProfile(const char *FileName, const Twine &Msg,
327  DiagnosticSeverity Severity = DS_Error)
328  : DiagnosticInfo(DK_PGOProfile, Severity), FileName(FileName), Msg(Msg) {}
329 
330  /// \see DiagnosticInfo::print.
331  void print(DiagnosticPrinter &DP) const override;
332 
333  static bool classof(const DiagnosticInfo *DI) {
334  return DI->getKind() == DK_PGOProfile;
335  }
336 
337  const char *getFileName() const { return FileName; }
338  const Twine &getMsg() const { return Msg; }
339 
340 private:
341  /// Name of the input file associated with this diagnostic.
342  const char *FileName;
343 
344  /// Message to report.
345  const Twine &Msg;
346 };
347 
349  DIFile *File = nullptr;
350  unsigned Line = 0;
351  unsigned Column = 0;
352 
353 public:
354  DiagnosticLocation() = default;
356  DiagnosticLocation(const DISubprogram *SP);
357 
358  bool isValid() const { return File; }
359  /// Return the full path to the file.
360  std::string getAbsolutePath() const;
361  /// Return the file name relative to the compilation directory.
362  StringRef getRelativePath() const;
363  unsigned getLine() const { return Line; }
364  unsigned getColumn() const { return Column; }
365 };
366 
367 /// Common features for diagnostics with an associated location.
369  void anchor() override;
370 public:
371  /// \p Fn is the function where the diagnostic is being emitted. \p Loc is
372  /// the location information to use in the diagnostic.
374  enum DiagnosticSeverity Severity,
375  const Function &Fn,
376  const DiagnosticLocation &Loc)
377  : DiagnosticInfo(Kind, Severity), Fn(Fn), Loc(Loc) {}
378 
379  /// Return true if location information is available for this diagnostic.
380  bool isLocationAvailable() const { return Loc.isValid(); }
381 
382  /// Return a string with the location information for this diagnostic
383  /// in the format "file:line:col". If location information is not available,
384  /// it returns "<unknown>:0:0".
385  std::string getLocationStr() const;
386 
387  /// Return location information for this diagnostic in three parts:
388  /// the relative source file path, line number and column.
389  void getLocation(StringRef &RelativePath, unsigned &Line,
390  unsigned &Column) const;
391 
392  /// Return the absolute path tot the file.
393  std::string getAbsolutePath() const;
394 
395  const Function &getFunction() const { return Fn; }
396  DiagnosticLocation getLocation() const { return Loc; }
397 
398 private:
399  /// Function where this diagnostic is triggered.
400  const Function &Fn;
401 
402  /// Debug location where this diagnostic is triggered.
403  DiagnosticLocation Loc;
404 };
405 
406 /// Common features for diagnostics dealing with optimization remarks
407 /// that are used by both IR and MIR passes.
409 public:
410  /// Used to set IsVerbose via the stream interface.
411  struct setIsVerbose {};
412 
413  /// When an instance of this is inserted into the stream, the arguments
414  /// following will not appear in the remark printed in the compiler output
415  /// (-Rpass) but only in the optimization record file
416  /// (-fsave-optimization-record).
417  struct setExtraArgs {};
418 
419  /// Used in the streaming interface as the general argument type. It
420  /// internally converts everything into a key-value pair.
421  struct Argument {
422  std::string Key;
423  std::string Val;
424  // If set, the debug location corresponding to the value.
426 
427  explicit Argument(StringRef Str = "") : Key("String"), Val(Str) {}
428  Argument(StringRef Key, const Value *V);
429  Argument(StringRef Key, const Type *T);
431  Argument(StringRef Key, const char *S) : Argument(Key, StringRef(S)) {};
432  Argument(StringRef Key, int N);
433  Argument(StringRef Key, float N);
434  Argument(StringRef Key, long N);
435  Argument(StringRef Key, long long N);
436  Argument(StringRef Key, unsigned N);
437  Argument(StringRef Key, unsigned long N);
438  Argument(StringRef Key, unsigned long long N);
440  Argument(StringRef Key, bool B) : Key(Key), Val(B ? "true" : "false") {}
443  };
444 
445  /// \p PassName is the name of the pass emitting this diagnostic. \p
446  /// RemarkName is a textual identifier for the remark (single-word,
447  /// camel-case). \p Fn is the function where the diagnostic is being emitted.
448  /// \p Loc is the location information to use in the diagnostic. If line table
449  /// information is available, the diagnostic will include the source code
450  /// location.
452  enum DiagnosticSeverity Severity,
453  const char *PassName, StringRef RemarkName,
454  const Function &Fn,
455  const DiagnosticLocation &Loc)
456  : DiagnosticInfoWithLocationBase(Kind, Severity, Fn, Loc),
458 
459  void insert(StringRef S);
460  void insert(Argument A);
461  void insert(setIsVerbose V);
462  void insert(setExtraArgs EA);
463 
464  /// \see DiagnosticInfo::print.
465  void print(DiagnosticPrinter &DP) const override;
466 
467  /// Return true if this optimization remark is enabled by one of
468  /// of the LLVM command line flags (-pass-remarks, -pass-remarks-missed,
469  /// or -pass-remarks-analysis). Note that this only handles the LLVM
470  /// flags. We cannot access Clang flags from here (they are handled
471  /// in BackendConsumer::OptimizationRemarkHandler).
472  virtual bool isEnabled() const = 0;
473 
474  StringRef getPassName() const { return PassName; }
475  StringRef getRemarkName() const { return RemarkName; }
476  std::string getMsg() const;
479 
480  bool isVerbose() const { return IsVerbose; }
481 
482  ArrayRef<Argument> getArgs() const { return Args; }
483 
484  static bool classof(const DiagnosticInfo *DI) {
485  return (DI->getKind() >= DK_FirstRemark &&
486  DI->getKind() <= DK_LastRemark) ||
487  (DI->getKind() >= DK_FirstMachineRemark &&
488  DI->getKind() <= DK_LastMachineRemark);
489  }
490 
491  bool isPassed() const {
492  return (getKind() == DK_OptimizationRemark ||
494  }
495 
496  bool isMissed() const {
497  return (getKind() == DK_OptimizationRemarkMissed ||
499  }
500 
501  bool isAnalysis() const {
502  return (getKind() == DK_OptimizationRemarkAnalysis ||
504  }
505 
506 protected:
507  /// Name of the pass that triggers this report. If this matches the
508  /// regular expression given in -Rpass=regexp, then the remark will
509  /// be emitted.
510  const char *PassName;
511 
512  /// Textual identifier for the remark (single-word, camel-case). Can be used
513  /// by external tools reading the output file for optimization remarks to
514  /// identify the remark.
516 
517  /// If profile information is available, this is the number of times the
518  /// corresponding code was executed in a profile instrumentation run.
520 
521  /// Arguments collected via the streaming interface.
523 
524  /// The remark is expected to be noisy.
525  bool IsVerbose = false;
526 
527  /// If positive, the index of the first argument that only appear in
528  /// the optimization records and not in the remark printed in the compiler
529  /// output.
531 };
532 
533 /// Allow the insertion operator to return the actual remark type rather than a
534 /// common base class. This allows returning the result of the insertion
535 /// directly by value, e.g. return OptimizationRemarkAnalysis(...) << "blah".
536 template <class RemarkT>
537 RemarkT &
538 operator<<(RemarkT &R,
539  std::enable_if_t<
540  std::is_base_of<DiagnosticInfoOptimizationBase, RemarkT>::value,
541  StringRef>
542  S) {
543  R.insert(S);
544  return R;
545 }
546 
547 /// Also allow r-value for the remark to allow insertion into a
548 /// temporarily-constructed remark.
549 template <class RemarkT>
550 RemarkT &
551 operator<<(RemarkT &&R,
552  std::enable_if_t<
553  std::is_base_of<DiagnosticInfoOptimizationBase, RemarkT>::value,
554  StringRef>
555  S) {
556  R.insert(S);
557  return R;
558 }
559 
560 template <class RemarkT>
561 RemarkT &
562 operator<<(RemarkT &R,
563  std::enable_if_t<
564  std::is_base_of<DiagnosticInfoOptimizationBase, RemarkT>::value,
566  A) {
567  R.insert(A);
568  return R;
569 }
570 
571 template <class RemarkT>
572 RemarkT &
573 operator<<(RemarkT &&R,
574  std::enable_if_t<
575  std::is_base_of<DiagnosticInfoOptimizationBase, RemarkT>::value,
577  A) {
578  R.insert(A);
579  return R;
580 }
581 
582 template <class RemarkT>
583 RemarkT &
584 operator<<(RemarkT &R,
585  std::enable_if_t<
586  std::is_base_of<DiagnosticInfoOptimizationBase, RemarkT>::value,
588  V) {
589  R.insert(V);
590  return R;
591 }
592 
593 template <class RemarkT>
594 RemarkT &
595 operator<<(RemarkT &&R,
596  std::enable_if_t<
597  std::is_base_of<DiagnosticInfoOptimizationBase, RemarkT>::value,
599  V) {
600  R.insert(V);
601  return R;
602 }
603 
604 template <class RemarkT>
605 RemarkT &
606 operator<<(RemarkT &R,
607  std::enable_if_t<
608  std::is_base_of<DiagnosticInfoOptimizationBase, RemarkT>::value,
610  EA) {
611  R.insert(EA);
612  return R;
613 }
614 
615 /// Common features for diagnostics dealing with optimization remarks
616 /// that are used by IR passes.
618  void anchor() override;
619 public:
620  /// \p PassName is the name of the pass emitting this diagnostic. \p
621  /// RemarkName is a textual identifier for the remark (single-word,
622  /// camel-case). \p Fn is the function where the diagnostic is being emitted.
623  /// \p Loc is the location information to use in the diagnostic. If line table
624  /// information is available, the diagnostic will include the source code
625  /// location. \p CodeRegion is IR value (currently basic block) that the
626  /// optimization operates on. This is currently used to provide run-time
627  /// hotness information with PGO.
629  enum DiagnosticSeverity Severity,
630  const char *PassName, StringRef RemarkName,
631  const Function &Fn,
632  const DiagnosticLocation &Loc,
633  const Value *CodeRegion = nullptr)
634  : DiagnosticInfoOptimizationBase(Kind, Severity, PassName, RemarkName, Fn,
635  Loc),
636  CodeRegion(CodeRegion) {}
637 
638  /// This is ctor variant allows a pass to build an optimization remark
639  /// from an existing remark.
640  ///
641  /// This is useful when a transformation pass (e.g LV) wants to emit a remark
642  /// (\p Orig) generated by one of its analyses (e.g. LAA) as its own analysis
643  /// remark. The string \p Prepend will be emitted before the original
644  /// message.
646  const DiagnosticInfoIROptimization &Orig)
648  (DiagnosticKind)Orig.getKind(), Orig.getSeverity(), PassName,
649  Orig.RemarkName, Orig.getFunction(), Orig.getLocation()),
650  CodeRegion(Orig.getCodeRegion()) {
651  *this << Prepend;
652  std::copy(Orig.Args.begin(), Orig.Args.end(), std::back_inserter(Args));
653  }
654 
655  /// Legacy interface.
656  /// \p PassName is the name of the pass emitting this diagnostic.
657  /// \p Fn is the function where the diagnostic is being emitted. \p Loc is
658  /// the location information to use in the diagnostic. If line table
659  /// information is available, the diagnostic will include the source code
660  /// location. \p Msg is the message to show. Note that this class does not
661  /// copy this message, so this reference must be valid for the whole life time
662  /// of the diagnostic.
664  enum DiagnosticSeverity Severity,
665  const char *PassName, const Function &Fn,
666  const DiagnosticLocation &Loc, const Twine &Msg)
667  : DiagnosticInfoOptimizationBase(Kind, Severity, PassName, "", Fn, Loc) {
668  *this << Msg.str();
669  }
670 
671  const Value *getCodeRegion() const { return CodeRegion; }
672 
673  static bool classof(const DiagnosticInfo *DI) {
674  return DI->getKind() >= DK_FirstRemark && DI->getKind() <= DK_LastRemark;
675  }
676 
677 private:
678  /// The IR value (currently basic block) that the optimization operates on.
679  /// This is currently used to provide run-time hotness information with PGO.
680  const Value *CodeRegion = nullptr;
681 };
682 
683 /// Diagnostic information for applied optimization remarks.
685 public:
686  /// \p PassName is the name of the pass emitting this diagnostic. If this name
687  /// matches the regular expression given in -Rpass=, then the diagnostic will
688  /// be emitted. \p RemarkName is a textual identifier for the remark (single-
689  /// word, camel-case). \p Loc is the debug location and \p CodeRegion is the
690  /// region that the optimization operates on (currently only block is
691  /// supported).
693  const DiagnosticLocation &Loc, const Value *CodeRegion);
694 
695  /// Same as above, but the debug location and code region are derived from \p
696  /// Instr.
698  const Instruction *Inst);
699 
700  /// Same as above, but the debug location and code region are derived from \p
701  /// Func.
703  const Function *Func);
704 
705  static bool classof(const DiagnosticInfo *DI) {
706  return DI->getKind() == DK_OptimizationRemark;
707  }
708 
709  /// \see DiagnosticInfoOptimizationBase::isEnabled.
710  bool isEnabled() const override;
711 
712 private:
713  /// This is deprecated now and only used by the function API below.
714  /// \p PassName is the name of the pass emitting this diagnostic. If
715  /// this name matches the regular expression given in -Rpass=, then the
716  /// diagnostic will be emitted. \p Fn is the function where the diagnostic
717  /// is being emitted. \p Loc is the location information to use in the
718  /// diagnostic. If line table information is available, the diagnostic
719  /// will include the source code location. \p Msg is the message to show.
720  /// Note that this class does not copy this message, so this reference
721  /// must be valid for the whole life time of the diagnostic.
722  OptimizationRemark(const char *PassName, const Function &Fn,
723  const DiagnosticLocation &Loc, const Twine &Msg)
725  Fn, Loc, Msg) {}
726 };
727 
728 /// Diagnostic information for missed-optimization remarks.
730 public:
731  /// \p PassName is the name of the pass emitting this diagnostic. If this name
732  /// matches the regular expression given in -Rpass-missed=, then the
733  /// diagnostic will be emitted. \p RemarkName is a textual identifier for the
734  /// remark (single-word, camel-case). \p Loc is the debug location and \p
735  /// CodeRegion is the region that the optimization operates on (currently only
736  /// block is supported).
738  const DiagnosticLocation &Loc,
739  const Value *CodeRegion);
740 
741  /// Same as above but \p Inst is used to derive code region and debug
742  /// location.
744  const Instruction *Inst);
745 
746  static bool classof(const DiagnosticInfo *DI) {
747  return DI->getKind() == DK_OptimizationRemarkMissed;
748  }
749 
750  /// \see DiagnosticInfoOptimizationBase::isEnabled.
751  bool isEnabled() const override;
752 
753 private:
754  /// This is deprecated now and only used by the function API below.
755  /// \p PassName is the name of the pass emitting this diagnostic. If
756  /// this name matches the regular expression given in -Rpass-missed=, then the
757  /// diagnostic will be emitted. \p Fn is the function where the diagnostic
758  /// is being emitted. \p Loc is the location information to use in the
759  /// diagnostic. If line table information is available, the diagnostic
760  /// will include the source code location. \p Msg is the message to show.
761  /// Note that this class does not copy this message, so this reference
762  /// must be valid for the whole life time of the diagnostic.
763  OptimizationRemarkMissed(const char *PassName, const Function &Fn,
764  const DiagnosticLocation &Loc, const Twine &Msg)
766  PassName, Fn, Loc, Msg) {}
767 };
768 
769 /// Diagnostic information for optimization analysis remarks.
771 public:
772  /// \p PassName is the name of the pass emitting this diagnostic. If this name
773  /// matches the regular expression given in -Rpass-analysis=, then the
774  /// diagnostic will be emitted. \p RemarkName is a textual identifier for the
775  /// remark (single-word, camel-case). \p Loc is the debug location and \p
776  /// CodeRegion is the region that the optimization operates on (currently only
777  /// block is supported).
779  const DiagnosticLocation &Loc,
780  const Value *CodeRegion);
781 
782  /// This is ctor variant allows a pass to build an optimization remark
783  /// from an existing remark.
784  ///
785  /// This is useful when a transformation pass (e.g LV) wants to emit a remark
786  /// (\p Orig) generated by one of its analyses (e.g. LAA) as its own analysis
787  /// remark. The string \p Prepend will be emitted before the original
788  /// message.
790  const OptimizationRemarkAnalysis &Orig)
791  : DiagnosticInfoIROptimization(PassName, Prepend, Orig) {}
792 
793  /// Same as above but \p Inst is used to derive code region and debug
794  /// location.
796  const Instruction *Inst);
797 
798  static bool classof(const DiagnosticInfo *DI) {
799  return DI->getKind() == DK_OptimizationRemarkAnalysis;
800  }
801 
802  /// \see DiagnosticInfoOptimizationBase::isEnabled.
803  bool isEnabled() const override;
804 
805  static const char *AlwaysPrint;
806 
807  bool shouldAlwaysPrint() const { return getPassName() == AlwaysPrint; }
808 
809 protected:
811  const Function &Fn, const DiagnosticLocation &Loc,
812  const Twine &Msg)
813  : DiagnosticInfoIROptimization(Kind, DS_Remark, PassName, Fn, Loc, Msg) {}
814 
815  OptimizationRemarkAnalysis(enum DiagnosticKind Kind, const char *PassName,
817  const DiagnosticLocation &Loc,
818  const Value *CodeRegion);
819 
820 private:
821  /// This is deprecated now and only used by the function API below.
822  /// \p PassName is the name of the pass emitting this diagnostic. If
823  /// this name matches the regular expression given in -Rpass-analysis=, then
824  /// the diagnostic will be emitted. \p Fn is the function where the diagnostic
825  /// is being emitted. \p Loc is the location information to use in the
826  /// diagnostic. If line table information is available, the diagnostic will
827  /// include the source code location. \p Msg is the message to show. Note that
828  /// this class does not copy this message, so this reference must be valid for
829  /// the whole life time of the diagnostic.
830  OptimizationRemarkAnalysis(const char *PassName, const Function &Fn,
831  const DiagnosticLocation &Loc, const Twine &Msg)
833  PassName, Fn, Loc, Msg) {}
834 };
835 
836 /// Diagnostic information for optimization analysis remarks related to
837 /// floating-point non-commutativity.
839  void anchor() override;
840 public:
841  /// \p PassName is the name of the pass emitting this diagnostic. If this name
842  /// matches the regular expression given in -Rpass-analysis=, then the
843  /// diagnostic will be emitted. \p RemarkName is a textual identifier for the
844  /// remark (single-word, camel-case). \p Loc is the debug location and \p
845  /// CodeRegion is the region that the optimization operates on (currently only
846  /// block is supported). The front-end will append its own message related to
847  /// options that address floating-point non-commutativity.
850  const DiagnosticLocation &Loc,
851  const Value *CodeRegion)
853  PassName, RemarkName, Loc, CodeRegion) {}
854 
855  static bool classof(const DiagnosticInfo *DI) {
857  }
858 
859 private:
860  /// This is deprecated now and only used by the function API below.
861  /// \p PassName is the name of the pass emitting this diagnostic. If
862  /// this name matches the regular expression given in -Rpass-analysis=, then
863  /// the diagnostic will be emitted. \p Fn is the function where the diagnostic
864  /// is being emitted. \p Loc is the location information to use in the
865  /// diagnostic. If line table information is available, the diagnostic will
866  /// include the source code location. \p Msg is the message to show. The
867  /// front-end will append its own message related to options that address
868  /// floating-point non-commutativity. Note that this class does not copy this
869  /// message, so this reference must be valid for the whole life time of the
870  /// diagnostic.
872  const DiagnosticLocation &Loc,
873  const Twine &Msg)
875  PassName, Fn, Loc, Msg) {}
876 };
877 
878 /// Diagnostic information for optimization analysis remarks related to
879 /// pointer aliasing.
881  void anchor() override;
882 public:
883  /// \p PassName is the name of the pass emitting this diagnostic. If this name
884  /// matches the regular expression given in -Rpass-analysis=, then the
885  /// diagnostic will be emitted. \p RemarkName is a textual identifier for the
886  /// remark (single-word, camel-case). \p Loc is the debug location and \p
887  /// CodeRegion is the region that the optimization operates on (currently only
888  /// block is supported). The front-end will append its own message related to
889  /// options that address pointer aliasing legality.
891  const DiagnosticLocation &Loc,
892  const Value *CodeRegion)
894  PassName, RemarkName, Loc, CodeRegion) {}
895 
896  static bool classof(const DiagnosticInfo *DI) {
898  }
899 
900 private:
901  /// This is deprecated now and only used by the function API below.
902  /// \p PassName is the name of the pass emitting this diagnostic. If
903  /// this name matches the regular expression given in -Rpass-analysis=, then
904  /// the diagnostic will be emitted. \p Fn is the function where the diagnostic
905  /// is being emitted. \p Loc is the location information to use in the
906  /// diagnostic. If line table information is available, the diagnostic will
907  /// include the source code location. \p Msg is the message to show. The
908  /// front-end will append its own message related to options that address
909  /// pointer aliasing legality. Note that this class does not copy this
910  /// message, so this reference must be valid for the whole life time of the
911  /// diagnostic.
913  const DiagnosticLocation &Loc,
914  const Twine &Msg)
916  PassName, Fn, Loc, Msg) {}
917 };
918 
919 /// Diagnostic information for machine IR parser.
920 // FIXME: Remove this, use DiagnosticInfoSrcMgr instead.
922  const SMDiagnostic &Diagnostic;
923 
924 public:
926  const SMDiagnostic &Diagnostic)
927  : DiagnosticInfo(DK_MIRParser, Severity), Diagnostic(Diagnostic) {}
928 
929  const SMDiagnostic &getDiagnostic() const { return Diagnostic; }
930 
931  void print(DiagnosticPrinter &DP) const override;
932 
933  static bool classof(const DiagnosticInfo *DI) {
934  return DI->getKind() == DK_MIRParser;
935  }
936 };
937 
938 /// Diagnostic information for ISel fallback path.
940  /// The function that is concerned by this diagnostic.
941  const Function &Fn;
942 
943 public:
945  DiagnosticSeverity Severity = DS_Warning)
946  : DiagnosticInfo(DK_ISelFallback, Severity), Fn(Fn) {}
947 
948  const Function &getFunction() const { return Fn; }
949 
950  void print(DiagnosticPrinter &DP) const override;
951 
952  static bool classof(const DiagnosticInfo *DI) {
953  return DI->getKind() == DK_ISelFallback;
954  }
955 };
956 
957 // Create wrappers for C Binding types (see CBindingWrapping.h).
959 
960 /// Diagnostic information for optimization failures.
962 public:
963  /// \p Fn is the function where the diagnostic is being emitted. \p Loc is
964  /// the location information to use in the diagnostic. If line table
965  /// information is available, the diagnostic will include the source code
966  /// location. \p Msg is the message to show. Note that this class does not
967  /// copy this message, so this reference must be valid for the whole life time
968  /// of the diagnostic.
970  const DiagnosticLocation &Loc,
971  const Twine &Msg)
973  nullptr, Fn, Loc, Msg) {}
974 
975  /// \p PassName is the name of the pass emitting this diagnostic. \p
976  /// RemarkName is a textual identifier for the remark (single-word,
977  /// camel-case). \p Loc is the debug location and \p CodeRegion is the
978  /// region that the optimization operates on (currently basic block is
979  /// supported).
980  DiagnosticInfoOptimizationFailure(const char *PassName, StringRef RemarkName,
981  const DiagnosticLocation &Loc,
982  const Value *CodeRegion);
983 
984  static bool classof(const DiagnosticInfo *DI) {
985  return DI->getKind() == DK_OptimizationFailure;
986  }
987 
988  /// \see DiagnosticInfoOptimizationBase::isEnabled.
989  bool isEnabled() const override;
990 };
991 
992 /// Diagnostic information for unsupported feature in backend.
994 private:
995  Twine Msg;
996 
997 public:
998  /// \p Fn is the function where the diagnostic is being emitted. \p Loc is
999  /// the location information to use in the diagnostic. If line table
1000  /// information is available, the diagnostic will include the source code
1001  /// location. \p Msg is the message to show. Note that this class does not
1002  /// copy this message, so this reference must be valid for the whole life time
1003  /// of the diagnostic.
1005  const Function &Fn, const Twine &Msg,
1006  const DiagnosticLocation &Loc = DiagnosticLocation(),
1007  DiagnosticSeverity Severity = DS_Error)
1008  : DiagnosticInfoWithLocationBase(DK_Unsupported, Severity, Fn, Loc),
1009  Msg(Msg) {}
1010 
1011  static bool classof(const DiagnosticInfo *DI) {
1012  return DI->getKind() == DK_Unsupported;
1013  }
1014 
1015  const Twine &getMessage() const { return Msg; }
1016 
1017  void print(DiagnosticPrinter &DP) const override;
1018 };
1019 
1021  switch (DK) {
1023  return DS_Error;
1024  break;
1026  return DS_Warning;
1027  break;
1029  return DS_Note;
1030  break;
1032  return DS_Remark;
1033  break;
1034  }
1035  llvm_unreachable("unknown SourceMgr::DiagKind");
1036 }
1037 
1038 /// Diagnostic information for SMDiagnostic reporting.
1040  const SMDiagnostic &Diagnostic;
1041 
1042  // For inlineasm !srcloc translation.
1043  bool InlineAsmDiag;
1044  unsigned LocCookie;
1045 
1046 public:
1048  bool InlineAsmDiag = true, unsigned LocCookie = 0)
1050  Diagnostic(Diagnostic), InlineAsmDiag(InlineAsmDiag),
1051  LocCookie(LocCookie) {}
1052 
1053  bool isInlineAsmDiag() const { return InlineAsmDiag; }
1054  const SMDiagnostic &getSMDiag() const { return Diagnostic; }
1055  unsigned getLocCookie() const { return LocCookie; }
1056  void print(DiagnosticPrinter &DP) const override;
1057 
1058  static bool classof(const DiagnosticInfo *DI) {
1059  return DI->getKind() == DK_SrcMgr;
1060  }
1061 };
1062 
1063 } // end namespace llvm
1064 
1065 #endif // LLVM_IR_DIAGNOSTICINFO_H
llvm::DiagnosticInfoStackSize::DiagnosticInfoStackSize
DiagnosticInfoStackSize(const Function &Fn, uint64_t StackSize, DiagnosticSeverity Severity=DS_Warning, uint64_t StackLimit=0)
Definition: DiagnosticInfo.h:220
llvm::DK_FirstPluginKind
@ DK_FirstPluginKind
Definition: DiagnosticInfo.h:82
llvm::InstructionCost
Definition: InstructionCost.h:26
llvm::DiagnosticInfoOptimizationBase::Argument::Val
std::string Val
Definition: DiagnosticInfo.h:423
llvm::Argument
This class represents an incoming formal argument to a Function.
Definition: Argument.h:29
llvm::DK_Lowering
@ DK_Lowering
Definition: DiagnosticInfo.h:60
llvm::DiagnosticLocation::DiagnosticLocation
DiagnosticLocation()=default
llvm::OptimizationRemarkMissed
Diagnostic information for missed-optimization remarks.
Definition: DiagnosticInfo.h:729
llvm::DiagnosticInfoIgnoringInvalidDebugMetadata::DiagnosticInfoIgnoringInvalidDebugMetadata
DiagnosticInfoIgnoringInvalidDebugMetadata(const Module &M, DiagnosticSeverity Severity=DS_Warning)
The module that is concerned by this debug metadata version diagnostic.
Definition: DiagnosticInfo.h:270
llvm::DiagnosticInfoOptimizationBase::print
void print(DiagnosticPrinter &DP) const override
Definition: DiagnosticInfo.cpp:241
llvm::DiagnosticInfoIgnoringInvalidDebugMetadata::classof
static bool classof(const DiagnosticInfo *DI)
Definition: DiagnosticInfo.h:279
llvm
Definition: AllocatorList.h:23
llvm::DiagnosticInfoISelFallback
Diagnostic information for ISel fallback path.
Definition: DiagnosticInfo.h:939
M
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
Definition: README.txt:252
llvm::DiagnosticInfoIROptimization::DiagnosticInfoIROptimization
DiagnosticInfoIROptimization(enum DiagnosticKind Kind, enum DiagnosticSeverity Severity, const char *PassName, const Function &Fn, const DiagnosticLocation &Loc, const Twine &Msg)
Legacy interface.
Definition: DiagnosticInfo.h:663
Optional.h
llvm::DiagnosticInfoIgnoringInvalidDebugMetadata::print
void print(DiagnosticPrinter &DP) const override
Definition: DiagnosticInfo.cpp:86
llvm::DiagnosticInfoDebugMetadataVersion::getModule
const Module & getModule() const
Definition: DiagnosticInfo.h:251
llvm::DiagnosticInfoUnsupported
Diagnostic information for unsupported feature in backend.
Definition: DiagnosticInfo.h:993
llvm::DiagnosticInfoIROptimization::DiagnosticInfoIROptimization
DiagnosticInfoIROptimization(const char *PassName, StringRef Prepend, const DiagnosticInfoIROptimization &Orig)
This is ctor variant allows a pass to build an optimization remark from an existing remark.
Definition: DiagnosticInfo.h:645
llvm::ElementCount
Definition: TypeSize.h:386
llvm::OptimizationRemarkAnalysisAliasing
Diagnostic information for optimization analysis remarks related to pointer aliasing.
Definition: DiagnosticInfo.h:880
llvm::DiagnosticInfoDebugMetadataVersion::classof
static bool classof(const DiagnosticInfo *DI)
Definition: DiagnosticInfo.h:257
llvm::DiagnosticInfoSampleProfile::getFileName
StringRef getFileName() const
Definition: DiagnosticInfo.h:307
llvm::DiagnosticInfoOptimizationBase::Argument::Loc
DiagnosticLocation Loc
Definition: DiagnosticInfo.h:425
llvm::DiagnosticInfoOptimizationBase::setHotness
void setHotness(Optional< uint64_t > H)
Definition: DiagnosticInfo.h:478
llvm::DK_MachineOptimizationRemarkMissed
@ DK_MachineOptimizationRemarkMissed
Definition: DiagnosticInfo.h:74
llvm::Function
Definition: Function.h:61
StringRef.h
llvm::DiagnosticInfoWithLocationBase::getLocation
DiagnosticLocation getLocation() const
Definition: DiagnosticInfo.h:396
llvm::DK_PGOProfile
@ DK_PGOProfile
Definition: DiagnosticInfo.h:79
TypeSize.h
llvm::SmallVector
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1168
Types.h
llvm::DiagnosticInfoOptimizationBase::PassName
const char * PassName
Name of the pass that triggers this report.
Definition: DiagnosticInfo.h:510
llvm::DiagnosticInfoOptimizationBase::insert
void insert(StringRef S)
Definition: DiagnosticInfo.cpp:363
llvm::DiagnosticInfoOptimizationBase::getPassName
StringRef getPassName() const
Definition: DiagnosticInfo.h:474
llvm::DiagnosticInfoMIRParser::getDiagnostic
const SMDiagnostic & getDiagnostic() const
Definition: DiagnosticInfo.h:929
llvm::DiagnosticInfoPGOProfile::getMsg
const Twine & getMsg() const
Definition: DiagnosticInfo.h:338
llvm::DiagnosticInfoUnsupported::getMessage
const Twine & getMessage() const
Definition: DiagnosticInfo.h:1015
llvm::DiagnosticInfoSampleProfile::print
void print(DiagnosticPrinter &DP) const override
Definition: DiagnosticInfo.cpp:91
llvm::DiagnosticInfoSrcMgr::isInlineAsmDiag
bool isInlineAsmDiag() const
Definition: DiagnosticInfo.h:1053
llvm::DiagnosticInfo::getKind
int getKind() const
Definition: DiagnosticInfo.h:115
llvm::DiagnosticInfo::print
virtual void print(DiagnosticPrinter &DP) const =0
Print using the given DP a user-friendly message.
llvm::DiagnosticInfoOptimizationBase::Argument::Argument
Argument(StringRef Str="")
Definition: DiagnosticInfo.h:427
llvm::DK_OptimizationRemarkAnalysisFPCommute
@ DK_OptimizationRemarkAnalysisFPCommute
Definition: DiagnosticInfo.h:68
llvm::DiagnosticInfoResourceLimit::getResourceName
const char * getResourceName() const
Definition: DiagnosticInfo.h:205
llvm::OptimizationRemarkMissed::OptimizationRemarkMissed
OptimizationRemarkMissed(const char *PassName, StringRef RemarkName, const DiagnosticLocation &Loc, const Value *CodeRegion)
PassName is the name of the pass emitting this diagnostic.
Definition: DiagnosticInfo.cpp:279
llvm::DK_Linker
@ DK_Linker
Definition: DiagnosticInfo.h:59
llvm::DiagnosticInfoUnsupported::print
void print(DiagnosticPrinter &DP) const override
Print using the given DP a user-friendly message.
Definition: DiagnosticInfo.cpp:349
llvm::DiagnosticInfoOptimizationBase::isMissed
bool isMissed() const
Definition: DiagnosticInfo.h:496
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:46
llvm::DiagnosticInfoResourceLimit::classof
static bool classof(const DiagnosticInfo *DI)
Definition: DiagnosticInfo.h:212
llvm::DiagnosticInfoOptimizationBase::isPassed
bool isPassed() const
Definition: DiagnosticInfo.h:491
llvm::DiagnosticInfoOptimizationBase::RemarkName
StringRef RemarkName
Textual identifier for the remark (single-word, camel-case).
Definition: DiagnosticInfo.h:515
llvm::Optional< uint64_t >
llvm::DK_FirstRemark
@ DK_FirstRemark
Definition: DiagnosticInfo.h:71
llvm::DiagnosticInfoISelFallback::print
void print(DiagnosticPrinter &DP) const override
Print using the given DP a user-friendly message.
Definition: DiagnosticInfo.cpp:359
llvm::DiagnosticInfoOptimizationBase::getRemarkName
StringRef getRemarkName() const
Definition: DiagnosticInfo.h:475
CBindingWrapping.h
llvm::DiagnosticInfoResourceLimit::print
void print(DiagnosticPrinter &DP) const override
Definition: DiagnosticInfo.cpp:72
llvm::DiagnosticInfoIROptimization
Common features for diagnostics dealing with optimization remarks that are used by IR passes.
Definition: DiagnosticInfo.h:617
llvm::DiagnosticInfoInlineAsm::DiagnosticInfoInlineAsm
DiagnosticInfoInlineAsm(const Twine &MsgStr, DiagnosticSeverity Severity=DS_Error)
MsgStr is the message to be reported to the frontend.
Definition: DiagnosticInfo.h:144
llvm::SourceMgr::DK_Note
@ DK_Note
Definition: SourceMgr.h:37
llvm::DiagnosticInfoResourceLimit::DiagnosticInfoResourceLimit
DiagnosticInfoResourceLimit(const Function &Fn, const char *ResourceName, uint64_t ResourceSize, DiagnosticSeverity Severity=DS_Warning, DiagnosticKind Kind=DK_ResourceLimit, uint64_t ResourceLimit=0)
The function that is concerned by this stack size diagnostic.
Definition: DiagnosticInfo.h:196
llvm::DK_DebugMetadataVersion
@ DK_DebugMetadataVersion
Definition: DiagnosticInfo.h:61
llvm::DiagnosticInfoOptimizationBase
Common features for diagnostics dealing with optimization remarks that are used by both IR and MIR pa...
Definition: DiagnosticInfo.h:408
llvm::DK_SampleProfile
@ DK_SampleProfile
Definition: DiagnosticInfo.h:64
llvm::DiagnosticInfoPGOProfile::classof
static bool classof(const DiagnosticInfo *DI)
Definition: DiagnosticInfo.h:333
llvm::DiagnosticInfoISelFallback::classof
static bool classof(const DiagnosticInfo *DI)
Definition: DiagnosticInfo.h:952
llvm::DiagnosticInfoIROptimization::getCodeRegion
const Value * getCodeRegion() const
Definition: DiagnosticInfo.h:671
llvm::DiagnosticKind
DiagnosticKind
Defines the different supported kind of a diagnostic.
Definition: DiagnosticInfo.h:55
llvm::SourceMgr::DK_Remark
@ DK_Remark
Definition: SourceMgr.h:36
DEFINE_SIMPLE_CONVERSION_FUNCTIONS
#define DEFINE_SIMPLE_CONVERSION_FUNCTIONS(ty, ref)
Definition: CBindingWrapping.h:19
llvm::DiagnosticInfoUnsupported::DiagnosticInfoUnsupported
DiagnosticInfoUnsupported(const Function &Fn, const Twine &Msg, const DiagnosticLocation &Loc=DiagnosticLocation(), DiagnosticSeverity Severity=DS_Error)
Fn is the function where the diagnostic is being emitted.
Definition: DiagnosticInfo.h:1004
llvm::DiagnosticLocation::getRelativePath
StringRef getRelativePath() const
Return the file name relative to the compilation directory.
Definition: DiagnosticInfo.cpp:129
llvm::OptimizationRemark::isEnabled
bool isEnabled() const override
Definition: DiagnosticInfo.cpp:273
llvm::DK_MachineOptimizationRemark
@ DK_MachineOptimizationRemark
Definition: DiagnosticInfo.h:73
llvm::DiagnosticInfoPGOProfile::print
void print(DiagnosticPrinter &DP) const override
Definition: DiagnosticInfo.cpp:101
llvm::OptimizationRemarkAnalysis::classof
static bool classof(const DiagnosticInfo *DI)
Definition: DiagnosticInfo.h:798
llvm::OptimizationRemarkAnalysis::OptimizationRemarkAnalysis
OptimizationRemarkAnalysis(const char *PassName, StringRef RemarkName, const DiagnosticLocation &Loc, const Value *CodeRegion)
PassName is the name of the pass emitting this diagnostic.
Definition: DiagnosticInfo.cpp:300
llvm::DiagnosticInfoUnsupported::classof
static bool classof(const DiagnosticInfo *DI)
Definition: DiagnosticInfo.h:1011
llvm::DK_MachineOptimizationRemarkAnalysis
@ DK_MachineOptimizationRemarkAnalysis
Definition: DiagnosticInfo.h:75
llvm::DS_Warning
@ DS_Warning
Definition: DiagnosticInfo.h:46
llvm::DiagnosticInfoISelFallback::DiagnosticInfoISelFallback
DiagnosticInfoISelFallback(const Function &Fn, DiagnosticSeverity Severity=DS_Warning)
Definition: DiagnosticInfo.h:944
llvm::DiagnosticInfoMIRParser::print
void print(DiagnosticPrinter &DP) const override
Print using the given DP a user-friendly message.
Definition: DiagnosticInfo.cpp:329
llvm::DiagnosticInfoOptimizationBase::getHotness
Optional< uint64_t > getHotness() const
Definition: DiagnosticInfo.h:477
C
(vector float) vec_cmpeq(*A, *B) C
Definition: README_ALTIVEC.txt:86
Twine.h
llvm::DiagnosticInfoOptimizationBase::Argument::Argument
Argument(StringRef Key, const char *S)
Definition: DiagnosticInfo.h:431
llvm::DiagnosticInfoSampleProfile::getLineNum
unsigned getLineNum() const
Definition: DiagnosticInfo.h:308
llvm::DK_MIRParser
@ DK_MIRParser
Definition: DiagnosticInfo.h:78
llvm::SMDiagnostic
Instances of this class encapsulate one diagnostic report, allowing printing to a raw_ostream as a ca...
Definition: SourceMgr.h:251
llvm::DiagnosticInfoStackSize::getStackLimit
uint64_t getStackLimit() const
Definition: DiagnosticInfo.h:227
llvm::OptimizationRemarkAnalysisFPCommute::classof
static bool classof(const DiagnosticInfo *DI)
Definition: DiagnosticInfo.h:855
llvm::DiagnosticInfoSampleProfile::DiagnosticInfoSampleProfile
DiagnosticInfoSampleProfile(StringRef FileName, const Twine &Msg, DiagnosticSeverity Severity=DS_Error)
Definition: DiagnosticInfo.h:292
llvm::DiagnosticInfoResourceLimit
Diagnostic information for stack size etc.
Definition: DiagnosticInfo.h:179
llvm::OptimizationRemarkMissed::classof
static bool classof(const DiagnosticInfo *DI)
Definition: DiagnosticInfo.h:746
llvm::DiagnosticInfoWithLocationBase::getFunction
const Function & getFunction() const
Definition: DiagnosticInfo.h:395
B
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
llvm::DK_OptimizationRemarkAnalysis
@ DK_OptimizationRemarkAnalysis
Definition: DiagnosticInfo.h:67
llvm::DiagnosticHandlerFunction
std::function< void(const DiagnosticInfo &)> DiagnosticHandlerFunction
Definition: DiagnosticInfo.h:127
llvm::Instruction
Definition: Instruction.h:45
llvm::DiagnosticInfoDebugMetadataVersion::DiagnosticInfoDebugMetadataVersion
DiagnosticInfoDebugMetadataVersion(const Module &M, unsigned MetadataVersion, DiagnosticSeverity Severity=DS_Warning)
The module that is concerned by this debug metadata version diagnostic.
Definition: DiagnosticInfo.h:246
llvm::DiagnosticSeverity
DiagnosticSeverity
Defines the different supported severity of a diagnostic.
Definition: DiagnosticInfo.h:44
LLVMDiagnosticInfoRef
struct LLVMOpaqueDiagnosticInfo * LLVMDiagnosticInfoRef
Definition: Types.h:148
llvm::operator<<
raw_ostream & operator<<(raw_ostream &OS, const APFixedPoint &FX)
Definition: APFixedPoint.h:230
llvm::DiagnosticInfoOptimizationFailure::classof
static bool classof(const DiagnosticInfo *DI)
Definition: DiagnosticInfo.h:984
llvm::DK_OptimizationRemarkMissed
@ DK_OptimizationRemarkMissed
Definition: DiagnosticInfo.h:66
llvm::DiagnosticInfo::getSeverity
DiagnosticSeverity getSeverity() const
Definition: DiagnosticInfo.h:116
llvm::DiagnosticInfoOptimizationBase::Argument::Argument
Argument(StringRef Key, bool B)
Definition: DiagnosticInfo.h:440
DebugLoc.h
llvm::DK_LastRemark
@ DK_LastRemark
Definition: DiagnosticInfo.h:72
llvm::DiagnosticInfoSampleProfile::classof
static bool classof(const DiagnosticInfo *DI)
Definition: DiagnosticInfo.h:303
llvm::DiagnosticInfo
This is the base abstract class for diagnostic reporting in the backend.
Definition: DiagnosticInfo.h:101
llvm::DiagnosticInfoSrcMgr::DiagnosticInfoSrcMgr
DiagnosticInfoSrcMgr(const SMDiagnostic &Diagnostic, bool InlineAsmDiag=true, unsigned LocCookie=0)
Definition: DiagnosticInfo.h:1047
llvm::DiagnosticPrinter
Interface for custom diagnostic printing.
Definition: DiagnosticPrinter.h:31
llvm::OptimizationRemarkMissed::isEnabled
bool isEnabled() const override
Definition: DiagnosticInfo.cpp:294
llvm::DiagnosticInfoMIRParser::classof
static bool classof(const DiagnosticInfo *DI)
Definition: DiagnosticInfo.h:933
llvm::OptimizationRemark::OptimizationRemark
OptimizationRemark(const char *PassName, StringRef RemarkName, const DiagnosticLocation &Loc, const Value *CodeRegion)
PassName is the name of the pass emitting this diagnostic.
Definition: DiagnosticInfo.cpp:247
llvm::DiagnosticInfoOptimizationBase::Hotness
Optional< uint64_t > Hotness
If profile information is available, this is the number of times the corresponding code was executed ...
Definition: DiagnosticInfo.h:519
llvm::DK_ResourceLimit
@ DK_ResourceLimit
Definition: DiagnosticInfo.h:57
llvm::DiagnosticInfoSrcMgr::classof
static bool classof(const DiagnosticInfo *DI)
Definition: DiagnosticInfo.h:1058
llvm::Twine::str
std::string str() const
Return the twine contents as a std::string.
Definition: Twine.cpp:17
llvm::DiagnosticInfoOptimizationBase::Args
SmallVector< Argument, 4 > Args
Arguments collected via the streaming interface.
Definition: DiagnosticInfo.h:522
llvm::DiagnosticInfoInlineAsm
Diagnostic information for inline asm reporting.
Definition: DiagnosticInfo.h:131
llvm::DK_InlineAsm
@ DK_InlineAsm
Definition: DiagnosticInfo.h:56
llvm::DiagnosticInfoWithLocationBase::getLocationStr
std::string getLocationStr() const
Return a string with the location information for this diagnostic in the format "file:line:col".
Definition: DiagnosticInfo.cpp:155
llvm::DiagnosticInfoOptimizationBase::Argument
Used in the streaming interface as the general argument type.
Definition: DiagnosticInfo.h:421
llvm::DiagnosticInfoWithLocationBase::isLocationAvailable
bool isLocationAvailable() const
Return true if location information is available for this diagnostic.
Definition: DiagnosticInfo.h:380
llvm::DiagnosticInfoPGOProfile::getFileName
const char * getFileName() const
Definition: DiagnosticInfo.h:337
llvm::DiagnosticInfoResourceLimit::getFunction
const Function & getFunction() const
Definition: DiagnosticInfo.h:204
llvm::SourceMgr::DK_Warning
@ DK_Warning
Definition: SourceMgr.h:35
llvm::DS_Remark
@ DS_Remark
Definition: DiagnosticInfo.h:47
llvm::DiagnosticInfoIROptimization::DiagnosticInfoIROptimization
DiagnosticInfoIROptimization(enum DiagnosticKind Kind, enum DiagnosticSeverity Severity, const char *PassName, StringRef RemarkName, const Function &Fn, const DiagnosticLocation &Loc, const Value *CodeRegion=nullptr)
PassName is the name of the pass emitting this diagnostic.
Definition: DiagnosticInfo.h:628
llvm::DK_ISelFallback
@ DK_ISelFallback
Definition: DiagnosticInfo.h:63
llvm::DiagnosticInfoWithLocationBase::getAbsolutePath
std::string getAbsolutePath() const
Return the absolute path tot the file.
Definition: DiagnosticInfo.cpp:143
llvm::DiagnosticInfoSampleProfile::DiagnosticInfoSampleProfile
DiagnosticInfoSampleProfile(const Twine &Msg, DiagnosticSeverity Severity=DS_Error)
Definition: DiagnosticInfo.h:296
I
#define I(x, y, z)
Definition: MD5.cpp:59
llvm::DiagnosticInfoOptimizationBase::FirstExtraArgIndex
int FirstExtraArgIndex
If positive, the index of the first argument that only appear in the optimization records and not in ...
Definition: DiagnosticInfo.h:530
llvm::DK_SrcMgr
@ DK_SrcMgr
Definition: DiagnosticInfo.h:81
llvm::DiagnosticInfoPGOProfile
Diagnostic information for the PGO profiler.
Definition: DiagnosticInfo.h:324
llvm::DiagnosticInfoResourceLimit::getResourceSize
uint64_t getResourceSize() const
Definition: DiagnosticInfo.h:206
llvm::DiagnosticLocation::isValid
bool isValid() const
Definition: DiagnosticInfo.h:358
llvm::DiagnosticInfoOptimizationBase::Argument::Key
std::string Key
Definition: DiagnosticInfo.h:422
llvm::DiagnosticInfoIROptimization::classof
static bool classof(const DiagnosticInfo *DI)
Definition: DiagnosticInfo.h:673
function
print Print MemDeps of function
Definition: MemDepPrinter.cpp:83
llvm::DiagnosticInfoOptimizationBase::setExtraArgs
When an instance of this is inserted into the stream, the arguments following will not appear in the ...
Definition: DiagnosticInfo.h:417
llvm::Module
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:67
llvm::DiagnosticInfoDebugMetadataVersion::getMetadataVersion
unsigned getMetadataVersion() const
Definition: DiagnosticInfo.h:252
llvm::DK_OptimizationRemarkAnalysisAliasing
@ DK_OptimizationRemarkAnalysisAliasing
Definition: DiagnosticInfo.h:69
llvm::DK_Unsupported
@ DK_Unsupported
Definition: DiagnosticInfo.h:80
llvm::DiagnosticInfoSampleProfile
Diagnostic information for the sample profiler.
Definition: DiagnosticInfo.h:285
YAMLTraits.h
llvm::DiagnosticInfoOptimizationBase::classof
static bool classof(const DiagnosticInfo *DI)
Definition: DiagnosticInfo.h:484
llvm::DK_StackSize
@ DK_StackSize
Definition: DiagnosticInfo.h:58
llvm::DiagnosticInfoInlineAsm::DiagnosticInfoInlineAsm
DiagnosticInfoInlineAsm(unsigned LocCookie, const Twine &MsgStr, DiagnosticSeverity Severity=DS_Error)
LocCookie if non-zero gives the line number for this report.
Definition: DiagnosticInfo.h:152
llvm::DiagnosticInfo::~DiagnosticInfo
virtual ~DiagnosticInfo()=default
llvm::DiagnosticInfoSrcMgr::getSMDiag
const SMDiagnostic & getSMDiag() const
Definition: DiagnosticInfo.h:1054
llvm::ArrayRef
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: APInt.h:32
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:57
llvm::DiagnosticInfoIgnoringInvalidDebugMetadata
Diagnostic information for stripping invalid debug metadata.
Definition: DiagnosticInfo.h:263
llvm::DiagnosticInfoStackSize::getStackSize
uint64_t getStackSize() const
Definition: DiagnosticInfo.h:226
llvm::DK_OptimizationFailure
@ DK_OptimizationFailure
Definition: DiagnosticInfo.h:70
llvm_unreachable
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Definition: ErrorHandling.h:136
llvm::DiagnosticLocation
Definition: DiagnosticInfo.h:348
llvm::DiagnosticInfoInlineAsm::getLocCookie
unsigned getLocCookie() const
Definition: DiagnosticInfo.h:165
DL
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
Definition: AArch64SLSHardening.cpp:76
llvm::OptimizationRemarkAnalysisAliasing::OptimizationRemarkAnalysisAliasing
OptimizationRemarkAnalysisAliasing(const char *PassName, StringRef RemarkName, const DiagnosticLocation &Loc, const Value *CodeRegion)
PassName is the name of the pass emitting this diagnostic.
Definition: DiagnosticInfo.h:890
S
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Definition: README.txt:210
llvm::DiagnosticInfoInlineAsm::print
void print(DiagnosticPrinter &DP) const override
Definition: DiagnosticInfo.cpp:66
Module
Machine Check Debug Module
Definition: MachineCheckDebugify.cpp:122
llvm::DiagnosticInfoStackSize
Definition: DiagnosticInfo.h:217
llvm::DiagnosticInfoDebugMetadataVersion::print
void print(DiagnosticPrinter &DP) const override
Definition: DiagnosticInfo.cpp:81
llvm::OptimizationRemarkAnalysis
Diagnostic information for optimization analysis remarks.
Definition: DiagnosticInfo.h:770
llvm::DiagnosticInfoISelFallback::getFunction
const Function & getFunction() const
Definition: DiagnosticInfo.h:948
llvm::OptimizationRemarkAnalysis::OptimizationRemarkAnalysis
OptimizationRemarkAnalysis(const char *PassName, StringRef Prepend, const OptimizationRemarkAnalysis &Orig)
This is ctor variant allows a pass to build an optimization remark from an existing remark.
Definition: DiagnosticInfo.h:789
llvm::DiagnosticInfoStackSize::classof
static bool classof(const DiagnosticInfo *DI)
Definition: DiagnosticInfo.h:229
llvm::OptimizationRemarkAnalysis::shouldAlwaysPrint
bool shouldAlwaysPrint() const
Definition: DiagnosticInfo.h:807
llvm::SourceMgr::DiagKind
DiagKind
Definition: SourceMgr.h:33
llvm::DK_FirstMachineRemark
@ DK_FirstMachineRemark
Definition: DiagnosticInfo.h:76
llvm::Twine
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:80
H
#define H(x, y, z)
Definition: MD5.cpp:58
llvm::DiagnosticInfoOptimizationBase::getMsg
std::string getMsg() const
Definition: DiagnosticInfo.cpp:379
llvm::ore::setExtraArgs
DiagnosticInfoOptimizationBase::setExtraArgs setExtraArgs
Definition: OptimizationRemarkEmitter.h:130
llvm::DK_LastMachineRemark
@ DK_LastMachineRemark
Definition: DiagnosticInfo.h:77
llvm::DiagnosticInfoSrcMgr
Diagnostic information for SMDiagnostic reporting.
Definition: DiagnosticInfo.h:1039
llvm::DiagnosticInfoOptimizationBase::isVerbose
bool isVerbose() const
Definition: DiagnosticInfo.h:480
llvm::DK_OptimizationRemark
@ DK_OptimizationRemark
Definition: DiagnosticInfo.h:65
llvm::OptimizationRemarkAnalysisAliasing::classof
static bool classof(const DiagnosticInfo *DI)
Definition: DiagnosticInfo.h:896
llvm::DiagnosticInfo::DiagnosticInfo
DiagnosticInfo(int Kind, DiagnosticSeverity Severity)
Definition: DiagnosticInfo.h:110
llvm::DiagnosticInfoOptimizationFailure
Diagnostic information for optimization failures.
Definition: DiagnosticInfo.h:961
llvm::getDiagnosticSeverity
static DiagnosticSeverity getDiagnosticSeverity(SourceMgr::DiagKind DK)
Definition: DiagnosticInfo.h:1020
llvm::SourceMgr::DK_Error
@ DK_Error
Definition: SourceMgr.h:34
DP
So we should use XX3Form_Rcr to implement instrinsic Convert DP outs ins xscvdpsp No builtin are required Round &Convert QP DP(dword[1] is set to zero) No builtin are required Round to Quad Precision because you need to assign rounding mode in instruction Provide builtin(set f128:$vT,(int_ppc_vsx_xsrqpi f128:$vB))(set f128 yields< n x< ty > >< result > yields< ty >< result > No builtin are required Load Store load store see def memrix16 in PPCInstrInfo td Load Store Vector load store outs ins lxsdx set load store with conversion from to DP
Definition: README_P9.txt:520
llvm::OptimizationRemarkAnalysis::AlwaysPrint
static const char * AlwaysPrint
Definition: DiagnosticInfo.h:805
llvm::DiagnosticInfoIgnoringInvalidDebugMetadata::getModule
const Module & getModule() const
Definition: DiagnosticInfo.h:274
llvm::DiagnosticInfoWithLocationBase::DiagnosticInfoWithLocationBase
DiagnosticInfoWithLocationBase(enum DiagnosticKind Kind, enum DiagnosticSeverity Severity, const Function &Fn, const DiagnosticLocation &Loc)
Fn is the function where the diagnostic is being emitted.
Definition: DiagnosticInfo.h:373
llvm::DiagnosticInfoSrcMgr::getLocCookie
unsigned getLocCookie() const
Definition: DiagnosticInfo.h:1055
llvm::OptimizationRemark
Diagnostic information for applied optimization remarks.
Definition: DiagnosticInfo.h:684
llvm::OptimizationRemarkAnalysis::OptimizationRemarkAnalysis
OptimizationRemarkAnalysis(enum DiagnosticKind Kind, const char *PassName, const Function &Fn, const DiagnosticLocation &Loc, const Twine &Msg)
Definition: DiagnosticInfo.h:810
SmallVector.h
llvm::OptimizationRemark::classof
static bool classof(const DiagnosticInfo *DI)
Definition: DiagnosticInfo.h:705
N
#define N
llvm::DiagnosticLocation::getAbsolutePath
std::string getAbsolutePath() const
Return the full path to the file.
Definition: DiagnosticInfo.cpp:133
llvm::getNextAvailablePluginDiagnosticKind
int getNextAvailablePluginDiagnosticKind()
Get the next available kind ID for a plugin diagnostic.
Definition: DiagnosticInfo.cpp:47
llvm::DiagnosticInfoWithLocationBase
Common features for diagnostics with an associated location.
Definition: DiagnosticInfo.h:368
llvm::DiagnosticInfoInlineAsm::getInstruction
const Instruction * getInstruction() const
Definition: DiagnosticInfo.h:167
llvm::DISubprogram
Subprogram description.
Definition: DebugInfoMetadata.h:1815
llvm::DiagnosticLocation::getColumn
unsigned getColumn() const
Definition: DiagnosticInfo.h:364
llvm::DiagnosticInfoInlineAsm::getMsgStr
const Twine & getMsgStr() const
Definition: DiagnosticInfo.h:166
llvm::DiagnosticInfoDebugMetadataVersion
Diagnostic information for debug metadata version reporting.
Definition: DiagnosticInfo.h:236
llvm::DiagnosticInfoOptimizationBase::IsVerbose
bool IsVerbose
The remark is expected to be noisy.
Definition: DiagnosticInfo.h:525
llvm::DiagnosticInfoSampleProfile::getMsg
const Twine & getMsg() const
Definition: DiagnosticInfo.h:309
llvm::OptimizationRemarkAnalysisFPCommute
Diagnostic information for optimization analysis remarks related to floating-point non-commutativity.
Definition: DiagnosticInfo.h:838
llvm::DebugLoc
A debug info location.
Definition: DebugLoc.h:33
llvm::DiagnosticInfoPGOProfile::DiagnosticInfoPGOProfile
DiagnosticInfoPGOProfile(const char *FileName, const Twine &Msg, DiagnosticSeverity Severity=DS_Error)
Definition: DiagnosticInfo.h:326
llvm::DiagnosticInfoSrcMgr::print
void print(DiagnosticPrinter &DP) const override
Print using the given DP a user-friendly message.
Definition: DiagnosticInfo.cpp:333
llvm::DiagnosticInfoResourceLimit::getResourceLimit
uint64_t getResourceLimit() const
Definition: DiagnosticInfo.h:207
copy
we should consider alternate ways to model stack dependencies Lots of things could be done in WebAssemblyTargetTransformInfo cpp there are numerous optimization related hooks that can be overridden in WebAssemblyTargetLowering Instead of the OptimizeReturned which should consider preserving the returned attribute through to MachineInstrs and extending the MemIntrinsicResults pass to do this optimization on calls too That would also let the WebAssemblyPeephole pass clean up dead defs for such as it does for stores Consider implementing and or getMachineCombinerPatterns Find a clean way to fix the problem which leads to the Shrink Wrapping pass being run after the WebAssembly PEI pass When setting multiple variables to the same we currently get code like const It could be done with a smaller encoding like local tee $pop5 local copy
Definition: README.txt:101
llvm::DK_DebugMetadataInvalid
@ DK_DebugMetadataInvalid
Definition: DiagnosticInfo.h:62
llvm::OptimizationRemarkAnalysis::isEnabled
bool isEnabled() const override
Definition: DiagnosticInfo.cpp:322
llvm::DiagnosticInfoOptimizationBase::isAnalysis
bool isAnalysis() const
Definition: DiagnosticInfo.h:501
llvm::DiagnosticInfoMIRParser
Diagnostic information for machine IR parser.
Definition: DiagnosticInfo.h:921
llvm::DiagnosticInfoOptimizationFailure::DiagnosticInfoOptimizationFailure
DiagnosticInfoOptimizationFailure(const Function &Fn, const DiagnosticLocation &Loc, const Twine &Msg)
Fn is the function where the diagnostic is being emitted.
Definition: DiagnosticInfo.h:969
llvm::Value
LLVM Value Representation.
Definition: Value.h:75
llvm::DiagnosticInfoSampleProfile::DiagnosticInfoSampleProfile
DiagnosticInfoSampleProfile(StringRef FileName, unsigned LineNum, const Twine &Msg, DiagnosticSeverity Severity=DS_Error)
Definition: DiagnosticInfo.h:287
llvm::DiagnosticInfoInlineAsm::classof
static bool classof(const DiagnosticInfo *DI)
Definition: DiagnosticInfo.h:172
llvm::DS_Error
@ DS_Error
Definition: DiagnosticInfo.h:45
llvm::DiagnosticInfoOptimizationBase::getArgs
ArrayRef< Argument > getArgs() const
Definition: DiagnosticInfo.h:482
llvm::DiagnosticInfoOptimizationBase::isEnabled
virtual bool isEnabled() const =0
Return true if this optimization remark is enabled by one of of the LLVM command line flags (-pass-re...
PassName
static const char PassName[]
Definition: X86LowerAMXIntrinsics.cpp:669
llvm::DiagnosticInfoOptimizationBase::DiagnosticInfoOptimizationBase
DiagnosticInfoOptimizationBase(enum DiagnosticKind Kind, enum DiagnosticSeverity Severity, const char *PassName, StringRef RemarkName, const Function &Fn, const DiagnosticLocation &Loc)
PassName is the name of the pass emitting this diagnostic.
Definition: DiagnosticInfo.h:451
llvm::DiagnosticInfoOptimizationBase::setIsVerbose
Used to set IsVerbose via the stream interface.
Definition: DiagnosticInfo.h:411
llvm::DiagnosticLocation::getLine
unsigned getLine() const
Definition: DiagnosticInfo.h:363
llvm::codeview::PublicSymFlags::Function
@ Function
llvm::DIFile
File.
Definition: DebugInfoMetadata.h:526
llvm::OptimizationRemarkAnalysisFPCommute::OptimizationRemarkAnalysisFPCommute
OptimizationRemarkAnalysisFPCommute(const char *PassName, StringRef RemarkName, const DiagnosticLocation &Loc, const Value *CodeRegion)
PassName is the name of the pass emitting this diagnostic.
Definition: DiagnosticInfo.h:848
llvm::ore::setIsVerbose
DiagnosticInfoOptimizationBase::setIsVerbose setIsVerbose
Definition: OptimizationRemarkEmitter.h:129
llvm::DiagnosticInfoMIRParser::DiagnosticInfoMIRParser
DiagnosticInfoMIRParser(DiagnosticSeverity Severity, const SMDiagnostic &Diagnostic)
Definition: DiagnosticInfo.h:925
llvm::DS_Note
@ DS_Note
Definition: DiagnosticInfo.h:50