@@ -523,7 +523,7 @@ class DiagnosticInfoOptimizationBase : public DiagnosticInfoWithLocationBase {
523523
524524 // / \p PassName is the name of the pass emitting this diagnostic. \p
525525 // / RemarkName is a textual identifier for the remark (single-word,
526- // / camel-case ). \p Fn is the function where the diagnostic is being emitted.
526+ // / CamelCase ). \p Fn is the function where the diagnostic is being emitted.
527527 // / \p Loc is the location information to use in the diagnostic. If line table
528528 // / information is available, the diagnostic will include the source code
529529 // / location.
@@ -588,7 +588,7 @@ class DiagnosticInfoOptimizationBase : public DiagnosticInfoWithLocationBase {
588588 // / be emitted.
589589 const char *PassName;
590590
591- // / Textual identifier for the remark (single-word, camel-case ). Can be used
591+ // / Textual identifier for the remark (single-word, CamelCase ). Can be used
592592 // / by external tools reading the output file for optimization remarks to
593593 // / identify the remark.
594594 StringRef RemarkName;
@@ -663,18 +663,17 @@ class DiagnosticInfoIROptimization : public DiagnosticInfoOptimizationBase {
663663public:
664664 // / \p PassName is the name of the pass emitting this diagnostic. \p
665665 // / RemarkName is a textual identifier for the remark (single-word,
666- // / camel-case ). \p Fn is the function where the diagnostic is being emitted.
666+ // / CamelCase ). \p Fn is the function where the diagnostic is being emitted.
667667 // / \p Loc is the location information to use in the diagnostic. If line table
668668 // / information is available, the diagnostic will include the source code
669- // / location. \p CodeRegion is IR value (currently basic block) that the
670- // / optimization operates on. This is currently used to provide run-time
671- // / hotness information with PGO.
669+ // / location. \p CodeRegion is IR value that the optimization operates on.
670+ // / This is currently used to provide run-time hotness information with PGO.
672671 DiagnosticInfoIROptimization (enum DiagnosticKind Kind,
673672 enum DiagnosticSeverity Severity,
674673 const char *PassName, StringRef RemarkName,
675674 const Function &Fn,
676675 const DiagnosticLocation &Loc,
677- const Value *CodeRegion = nullptr )
676+ const BasicBlock *CodeRegion = nullptr )
678677 : DiagnosticInfoOptimizationBase(Kind, Severity, PassName, RemarkName, Fn,
679678 Loc),
680679 CodeRegion (CodeRegion) {}
@@ -712,16 +711,16 @@ class DiagnosticInfoIROptimization : public DiagnosticInfoOptimizationBase {
712711 *this << Msg.str ();
713712 }
714713
715- const Value *getCodeRegion () const { return CodeRegion; }
714+ const BasicBlock *getCodeRegion () const { return CodeRegion; }
716715
717716 static bool classof (const DiagnosticInfo *DI) {
718717 return DI->getKind () >= DK_FirstRemark && DI->getKind () <= DK_LastRemark;
719718 }
720719
721720private:
722- // / The IR value (currently basic block) that the optimization operates on.
721+ // / The IR value that the optimization operates on.
723722 // / This is currently used to provide run-time hotness information with PGO.
724- const Value *CodeRegion = nullptr ;
723+ const BasicBlock *CodeRegion = nullptr ;
725724};
726725
727726// / Diagnostic information for applied optimization remarks.
@@ -730,11 +729,11 @@ class OptimizationRemark : public DiagnosticInfoIROptimization {
730729 // / \p PassName is the name of the pass emitting this diagnostic. If this name
731730 // / matches the regular expression given in -Rpass=, then the diagnostic will
732731 // / be emitted. \p RemarkName is a textual identifier for the remark (single-
733- // / word, camel-case). \p Loc is the debug location and \p CodeRegion is the
734- // / region that the optimization operates on (currently only block is
735- // / supported).
732+ // / word, CamelCase). \p Loc is the debug location and \p CodeRegion is the
733+ // / region that the optimization operates on.
736734 OptimizationRemark (const char *PassName, StringRef RemarkName,
737- const DiagnosticLocation &Loc, const Value *CodeRegion);
735+ const DiagnosticLocation &Loc,
736+ const BasicBlock *CodeRegion);
738737
739738 // / Same as above, but the debug location and code region are derived from \p
740739 // / Instr.
@@ -775,12 +774,11 @@ class OptimizationRemarkMissed : public DiagnosticInfoIROptimization {
775774 // / \p PassName is the name of the pass emitting this diagnostic. If this name
776775 // / matches the regular expression given in -Rpass-missed=, then the
777776 // / diagnostic will be emitted. \p RemarkName is a textual identifier for the
778- // / remark (single-word, camel-case). \p Loc is the debug location and \p
779- // / CodeRegion is the region that the optimization operates on (currently only
780- // / block is supported).
777+ // / remark (single-word, CamelCase). \p Loc is the debug location and \p
778+ // / CodeRegion is the region that the optimization operates on.
781779 OptimizationRemarkMissed (const char *PassName, StringRef RemarkName,
782780 const DiagnosticLocation &Loc,
783- const Value *CodeRegion);
781+ const BasicBlock *CodeRegion);
784782
785783 // / Same as above but \p Inst is used to derive code region and debug
786784 // / location.
@@ -821,12 +819,11 @@ class OptimizationRemarkAnalysis : public DiagnosticInfoIROptimization {
821819 // / \p PassName is the name of the pass emitting this diagnostic. If this name
822820 // / matches the regular expression given in -Rpass-analysis=, then the
823821 // / diagnostic will be emitted. \p RemarkName is a textual identifier for the
824- // / remark (single-word, camel-case). \p Loc is the debug location and \p
825- // / CodeRegion is the region that the optimization operates on (currently only
826- // / block is supported).
822+ // / remark (single-word, CamelCase). \p Loc is the debug location and \p
823+ // / CodeRegion is the region that the optimization operates on.
827824 OptimizationRemarkAnalysis (const char *PassName, StringRef RemarkName,
828825 const DiagnosticLocation &Loc,
829- const Value *CodeRegion);
826+ const BasicBlock *CodeRegion);
830827
831828 // / This is ctor variant allows a pass to build an optimization remark
832829 // / from an existing remark.
@@ -869,7 +866,7 @@ class OptimizationRemarkAnalysis : public DiagnosticInfoIROptimization {
869866 OptimizationRemarkAnalysis (enum DiagnosticKind Kind, const char *PassName,
870867 StringRef RemarkName,
871868 const DiagnosticLocation &Loc,
872- const Value *CodeRegion);
869+ const BasicBlock *CodeRegion);
873870
874871private:
875872 // / This is deprecated now and only used by the function API below.
@@ -895,14 +892,14 @@ class OptimizationRemarkAnalysisFPCommute : public OptimizationRemarkAnalysis {
895892 // / \p PassName is the name of the pass emitting this diagnostic. If this name
896893 // / matches the regular expression given in -Rpass-analysis=, then the
897894 // / diagnostic will be emitted. \p RemarkName is a textual identifier for the
898- // / remark (single-word, camel-case ). \p Loc is the debug location and \p
899- // / CodeRegion is the region that the optimization operates on (currently only
900- // / block is supported). The front-end will append its own message related to
901- // / options that address floating-point non-commutativity.
895+ // / remark (single-word, CamelCase ). \p Loc is the debug location and \p
896+ // / CodeRegion is the region that the optimization operates on. The front-end
897+ // / will append its own message related to options that address floating-point
898+ // / non-commutativity.
902899 OptimizationRemarkAnalysisFPCommute (const char *PassName,
903900 StringRef RemarkName,
904901 const DiagnosticLocation &Loc,
905- const Value *CodeRegion)
902+ const BasicBlock *CodeRegion)
906903 : OptimizationRemarkAnalysis(DK_OptimizationRemarkAnalysisFPCommute,
907904 PassName, RemarkName, Loc, CodeRegion) {}
908905
@@ -937,13 +934,13 @@ class OptimizationRemarkAnalysisAliasing : public OptimizationRemarkAnalysis {
937934 // / \p PassName is the name of the pass emitting this diagnostic. If this name
938935 // / matches the regular expression given in -Rpass-analysis=, then the
939936 // / diagnostic will be emitted. \p RemarkName is a textual identifier for the
940- // / remark (single-word, camel-case ). \p Loc is the debug location and \p
941- // / CodeRegion is the region that the optimization operates on (currently only
942- // / block is supported). The front-end will append its own message related to
943- // / options that address pointer aliasing legality.
937+ // / remark (single-word, CamelCase ). \p Loc is the debug location and \p
938+ // / CodeRegion is the region that the optimization operates on. The front-end
939+ // / will append its own message related to options that address pointer
940+ // / aliasing legality.
944941 OptimizationRemarkAnalysisAliasing (const char *PassName, StringRef RemarkName,
945942 const DiagnosticLocation &Loc,
946- const Value *CodeRegion)
943+ const BasicBlock *CodeRegion)
947944 : OptimizationRemarkAnalysis(DK_OptimizationRemarkAnalysisAliasing,
948945 PassName, RemarkName, Loc, CodeRegion) {}
949946
@@ -1044,12 +1041,11 @@ class DiagnosticInfoOptimizationFailure : public DiagnosticInfoIROptimization {
10441041
10451042 // / \p PassName is the name of the pass emitting this diagnostic. \p
10461043 // / RemarkName is a textual identifier for the remark (single-word,
1047- // / camel-case). \p Loc is the debug location and \p CodeRegion is the
1048- // / region that the optimization operates on (currently basic block is
1049- // / supported).
1044+ // / CamelCase). \p Loc is the debug location and \p CodeRegion is the
1045+ // / region that the optimization operates on.
10501046 DiagnosticInfoOptimizationFailure (const char *PassName, StringRef RemarkName,
10511047 const DiagnosticLocation &Loc,
1052- const Value *CodeRegion);
1048+ const BasicBlock *CodeRegion);
10531049
10541050 static bool classof (const DiagnosticInfo *DI) {
10551051 return DI->getKind () == DK_OptimizationFailure;
0 commit comments