@@ -528,7 +528,7 @@ class DiagnosticInfoOptimizationBase : public DiagnosticInfoWithLocationBase {
528528
529529 // / \p PassName is the name of the pass emitting this diagnostic. \p
530530 // / RemarkName is a textual identifier for the remark (single-word,
531- // / camel-case ). \p Fn is the function where the diagnostic is being emitted.
531+ // / CamelCase ). \p Fn is the function where the diagnostic is being emitted.
532532 // / \p Loc is the location information to use in the diagnostic. If line table
533533 // / information is available, the diagnostic will include the source code
534534 // / location.
@@ -593,7 +593,7 @@ class DiagnosticInfoOptimizationBase : public DiagnosticInfoWithLocationBase {
593593 // / be emitted.
594594 const char *PassName;
595595
596- // / Textual identifier for the remark (single-word, camel-case ). Can be used
596+ // / Textual identifier for the remark (single-word, CamelCase ). Can be used
597597 // / by external tools reading the output file for optimization remarks to
598598 // / identify the remark.
599599 StringRef RemarkName;
@@ -668,18 +668,17 @@ class DiagnosticInfoIROptimization : public DiagnosticInfoOptimizationBase {
668668public:
669669 // / \p PassName is the name of the pass emitting this diagnostic. \p
670670 // / RemarkName is a textual identifier for the remark (single-word,
671- // / camel-case ). \p Fn is the function where the diagnostic is being emitted.
671+ // / CamelCase ). \p Fn is the function where the diagnostic is being emitted.
672672 // / \p Loc is the location information to use in the diagnostic. If line table
673673 // / information is available, the diagnostic will include the source code
674- // / location. \p CodeRegion is IR value (currently basic block) that the
675- // / optimization operates on. This is currently used to provide run-time
676- // / hotness information with PGO.
674+ // / location. \p CodeRegion is IR value that the optimization operates on.
675+ // / This is currently used to provide run-time hotness information with PGO.
677676 DiagnosticInfoIROptimization (enum DiagnosticKind Kind,
678677 enum DiagnosticSeverity Severity,
679678 const char *PassName, StringRef RemarkName,
680679 const Function &Fn,
681680 const DiagnosticLocation &Loc,
682- const Value *CodeRegion = nullptr )
681+ const BasicBlock *CodeRegion = nullptr )
683682 : DiagnosticInfoOptimizationBase(Kind, Severity, PassName, RemarkName, Fn,
684683 Loc),
685684 CodeRegion (CodeRegion) {}
@@ -717,16 +716,16 @@ class DiagnosticInfoIROptimization : public DiagnosticInfoOptimizationBase {
717716 *this << Msg.str ();
718717 }
719718
720- const Value *getCodeRegion () const { return CodeRegion; }
719+ const BasicBlock *getCodeRegion () const { return CodeRegion; }
721720
722721 static bool classof (const DiagnosticInfo *DI) {
723722 return DI->getKind () >= DK_FirstRemark && DI->getKind () <= DK_LastRemark;
724723 }
725724
726725private:
727- // / The IR value (currently basic block) that the optimization operates on.
726+ // / The IR region (currently basic block) that the optimization operates on.
728727 // / This is currently used to provide run-time hotness information with PGO.
729- const Value *CodeRegion = nullptr ;
728+ const BasicBlock *CodeRegion = nullptr ;
730729};
731730
732731// / Diagnostic information for applied optimization remarks.
@@ -735,11 +734,11 @@ class OptimizationRemark : public DiagnosticInfoIROptimization {
735734 // / \p PassName is the name of the pass emitting this diagnostic. If this name
736735 // / matches the regular expression given in -Rpass=, then the diagnostic will
737736 // / be emitted. \p RemarkName is a textual identifier for the remark (single-
738- // / word, camel-case). \p Loc is the debug location and \p CodeRegion is the
739- // / region that the optimization operates on (currently only block is
740- // / supported).
737+ // / word, CamelCase). \p Loc is the debug location and \p CodeRegion is the
738+ // / region that the optimization operates on.
741739 OptimizationRemark (const char *PassName, StringRef RemarkName,
742- const DiagnosticLocation &Loc, const Value *CodeRegion);
740+ const DiagnosticLocation &Loc,
741+ const BasicBlock *CodeRegion);
743742
744743 // / Same as above, but the debug location and code region are derived from \p
745744 // / Instr.
@@ -780,12 +779,11 @@ class OptimizationRemarkMissed : public DiagnosticInfoIROptimization {
780779 // / \p PassName is the name of the pass emitting this diagnostic. If this name
781780 // / matches the regular expression given in -Rpass-missed=, then the
782781 // / diagnostic will be emitted. \p RemarkName is a textual identifier for the
783- // / remark (single-word, camel-case). \p Loc is the debug location and \p
784- // / CodeRegion is the region that the optimization operates on (currently only
785- // / block is supported).
782+ // / remark (single-word, CamelCase). \p Loc is the debug location and \p
783+ // / CodeRegion is the region that the optimization operates on.
786784 OptimizationRemarkMissed (const char *PassName, StringRef RemarkName,
787785 const DiagnosticLocation &Loc,
788- const Value *CodeRegion);
786+ const BasicBlock *CodeRegion);
789787
790788 // / Same as above but \p Inst is used to derive code region and debug
791789 // / location.
@@ -826,12 +824,11 @@ class OptimizationRemarkAnalysis : public DiagnosticInfoIROptimization {
826824 // / \p PassName is the name of the pass emitting this diagnostic. If this name
827825 // / matches the regular expression given in -Rpass-analysis=, then the
828826 // / diagnostic will be emitted. \p RemarkName is a textual identifier for the
829- // / remark (single-word, camel-case). \p Loc is the debug location and \p
830- // / CodeRegion is the region that the optimization operates on (currently only
831- // / block is supported).
827+ // / remark (single-word, CamelCase). \p Loc is the debug location and \p
828+ // / CodeRegion is the region that the optimization operates on.
832829 OptimizationRemarkAnalysis (const char *PassName, StringRef RemarkName,
833830 const DiagnosticLocation &Loc,
834- const Value *CodeRegion);
831+ const BasicBlock *CodeRegion);
835832
836833 // / This is ctor variant allows a pass to build an optimization remark
837834 // / from an existing remark.
@@ -874,7 +871,7 @@ class OptimizationRemarkAnalysis : public DiagnosticInfoIROptimization {
874871 OptimizationRemarkAnalysis (enum DiagnosticKind Kind, const char *PassName,
875872 StringRef RemarkName,
876873 const DiagnosticLocation &Loc,
877- const Value *CodeRegion);
874+ const BasicBlock *CodeRegion);
878875
879876private:
880877 // / This is deprecated now and only used by the function API below.
@@ -900,14 +897,14 @@ class OptimizationRemarkAnalysisFPCommute : public OptimizationRemarkAnalysis {
900897 // / \p PassName is the name of the pass emitting this diagnostic. If this name
901898 // / matches the regular expression given in -Rpass-analysis=, then the
902899 // / diagnostic will be emitted. \p RemarkName is a textual identifier for the
903- // / remark (single-word, camel-case ). \p Loc is the debug location and \p
904- // / CodeRegion is the region that the optimization operates on (currently only
905- // / block is supported). The front-end will append its own message related to
906- // / options that address floating-point non-commutativity.
900+ // / remark (single-word, CamelCase ). \p Loc is the debug location and \p
901+ // / CodeRegion is the region that the optimization operates on. The front-end
902+ // / will append its own message related to options that address floating-point
903+ // / non-commutativity.
907904 OptimizationRemarkAnalysisFPCommute (const char *PassName,
908905 StringRef RemarkName,
909906 const DiagnosticLocation &Loc,
910- const Value *CodeRegion)
907+ const BasicBlock *CodeRegion)
911908 : OptimizationRemarkAnalysis(DK_OptimizationRemarkAnalysisFPCommute,
912909 PassName, RemarkName, Loc, CodeRegion) {}
913910
@@ -942,13 +939,13 @@ class OptimizationRemarkAnalysisAliasing : public OptimizationRemarkAnalysis {
942939 // / \p PassName is the name of the pass emitting this diagnostic. If this name
943940 // / matches the regular expression given in -Rpass-analysis=, then the
944941 // / diagnostic will be emitted. \p RemarkName is a textual identifier for the
945- // / remark (single-word, camel-case ). \p Loc is the debug location and \p
946- // / CodeRegion is the region that the optimization operates on (currently only
947- // / block is supported). The front-end will append its own message related to
948- // / options that address pointer aliasing legality.
942+ // / remark (single-word, CamelCase ). \p Loc is the debug location and \p
943+ // / CodeRegion is the region that the optimization operates on. The front-end
944+ // / will append its own message related to options that address pointer
945+ // / aliasing legality.
949946 OptimizationRemarkAnalysisAliasing (const char *PassName, StringRef RemarkName,
950947 const DiagnosticLocation &Loc,
951- const Value *CodeRegion)
948+ const BasicBlock *CodeRegion)
952949 : OptimizationRemarkAnalysis(DK_OptimizationRemarkAnalysisAliasing,
953950 PassName, RemarkName, Loc, CodeRegion) {}
954951
@@ -1049,12 +1046,11 @@ class DiagnosticInfoOptimizationFailure : public DiagnosticInfoIROptimization {
10491046
10501047 // / \p PassName is the name of the pass emitting this diagnostic. \p
10511048 // / RemarkName is a textual identifier for the remark (single-word,
1052- // / camel-case). \p Loc is the debug location and \p CodeRegion is the
1053- // / region that the optimization operates on (currently basic block is
1054- // / supported).
1049+ // / CamelCase). \p Loc is the debug location and \p CodeRegion is the
1050+ // / region that the optimization operates on.
10551051 DiagnosticInfoOptimizationFailure (const char *PassName, StringRef RemarkName,
10561052 const DiagnosticLocation &Loc,
1057- const Value *CodeRegion);
1053+ const BasicBlock *CodeRegion);
10581054
10591055 static bool classof (const DiagnosticInfo *DI) {
10601056 return DI->getKind () == DK_OptimizationFailure;
0 commit comments