@@ -528,7 +528,7 @@ class DiagnosticInfoOptimizationBase : public DiagnosticInfoWithLocationBase {
528
528
529
529
// / \p PassName is the name of the pass emitting this diagnostic. \p
530
530
// / 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.
532
532
// / \p Loc is the location information to use in the diagnostic. If line table
533
533
// / information is available, the diagnostic will include the source code
534
534
// / location.
@@ -593,7 +593,7 @@ class DiagnosticInfoOptimizationBase : public DiagnosticInfoWithLocationBase {
593
593
// / be emitted.
594
594
const char *PassName;
595
595
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
597
597
// / by external tools reading the output file for optimization remarks to
598
598
// / identify the remark.
599
599
StringRef RemarkName;
@@ -668,18 +668,17 @@ class DiagnosticInfoIROptimization : public DiagnosticInfoOptimizationBase {
668
668
public:
669
669
// / \p PassName is the name of the pass emitting this diagnostic. \p
670
670
// / 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.
672
672
// / \p Loc is the location information to use in the diagnostic. If line table
673
673
// / 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.
677
676
DiagnosticInfoIROptimization (enum DiagnosticKind Kind,
678
677
enum DiagnosticSeverity Severity,
679
678
const char *PassName, StringRef RemarkName,
680
679
const Function &Fn,
681
680
const DiagnosticLocation &Loc,
682
- const Value *CodeRegion = nullptr )
681
+ const BasicBlock *CodeRegion = nullptr )
683
682
: DiagnosticInfoOptimizationBase(Kind, Severity, PassName, RemarkName, Fn,
684
683
Loc),
685
684
CodeRegion (CodeRegion) {}
@@ -717,16 +716,16 @@ class DiagnosticInfoIROptimization : public DiagnosticInfoOptimizationBase {
717
716
*this << Msg.str ();
718
717
}
719
718
720
- const Value *getCodeRegion () const { return CodeRegion; }
719
+ const BasicBlock *getCodeRegion () const { return CodeRegion; }
721
720
722
721
static bool classof (const DiagnosticInfo *DI) {
723
722
return DI->getKind () >= DK_FirstRemark && DI->getKind () <= DK_LastRemark;
724
723
}
725
724
726
725
private:
727
- // / The IR value (currently basic block) that the optimization operates on.
726
+ // / The IR region (currently basic block) that the optimization operates on.
728
727
// / This is currently used to provide run-time hotness information with PGO.
729
- const Value *CodeRegion = nullptr ;
728
+ const BasicBlock *CodeRegion = nullptr ;
730
729
};
731
730
732
731
// / Diagnostic information for applied optimization remarks.
@@ -735,11 +734,11 @@ class OptimizationRemark : public DiagnosticInfoIROptimization {
735
734
// / \p PassName is the name of the pass emitting this diagnostic. If this name
736
735
// / matches the regular expression given in -Rpass=, then the diagnostic will
737
736
// / 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.
741
739
OptimizationRemark (const char *PassName, StringRef RemarkName,
742
- const DiagnosticLocation &Loc, const Value *CodeRegion);
740
+ const DiagnosticLocation &Loc,
741
+ const BasicBlock *CodeRegion);
743
742
744
743
// / Same as above, but the debug location and code region are derived from \p
745
744
// / Instr.
@@ -780,12 +779,11 @@ class OptimizationRemarkMissed : public DiagnosticInfoIROptimization {
780
779
// / \p PassName is the name of the pass emitting this diagnostic. If this name
781
780
// / matches the regular expression given in -Rpass-missed=, then the
782
781
// / 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.
786
784
OptimizationRemarkMissed (const char *PassName, StringRef RemarkName,
787
785
const DiagnosticLocation &Loc,
788
- const Value *CodeRegion);
786
+ const BasicBlock *CodeRegion);
789
787
790
788
// / Same as above but \p Inst is used to derive code region and debug
791
789
// / location.
@@ -826,12 +824,11 @@ class OptimizationRemarkAnalysis : public DiagnosticInfoIROptimization {
826
824
// / \p PassName is the name of the pass emitting this diagnostic. If this name
827
825
// / matches the regular expression given in -Rpass-analysis=, then the
828
826
// / 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.
832
829
OptimizationRemarkAnalysis (const char *PassName, StringRef RemarkName,
833
830
const DiagnosticLocation &Loc,
834
- const Value *CodeRegion);
831
+ const BasicBlock *CodeRegion);
835
832
836
833
// / This is ctor variant allows a pass to build an optimization remark
837
834
// / from an existing remark.
@@ -874,7 +871,7 @@ class OptimizationRemarkAnalysis : public DiagnosticInfoIROptimization {
874
871
OptimizationRemarkAnalysis (enum DiagnosticKind Kind, const char *PassName,
875
872
StringRef RemarkName,
876
873
const DiagnosticLocation &Loc,
877
- const Value *CodeRegion);
874
+ const BasicBlock *CodeRegion);
878
875
879
876
private:
880
877
// / This is deprecated now and only used by the function API below.
@@ -900,14 +897,14 @@ class OptimizationRemarkAnalysisFPCommute : public OptimizationRemarkAnalysis {
900
897
// / \p PassName is the name of the pass emitting this diagnostic. If this name
901
898
// / matches the regular expression given in -Rpass-analysis=, then the
902
899
// / 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.
907
904
OptimizationRemarkAnalysisFPCommute (const char *PassName,
908
905
StringRef RemarkName,
909
906
const DiagnosticLocation &Loc,
910
- const Value *CodeRegion)
907
+ const BasicBlock *CodeRegion)
911
908
: OptimizationRemarkAnalysis(DK_OptimizationRemarkAnalysisFPCommute,
912
909
PassName, RemarkName, Loc, CodeRegion) {}
913
910
@@ -942,13 +939,13 @@ class OptimizationRemarkAnalysisAliasing : public OptimizationRemarkAnalysis {
942
939
// / \p PassName is the name of the pass emitting this diagnostic. If this name
943
940
// / matches the regular expression given in -Rpass-analysis=, then the
944
941
// / 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.
949
946
OptimizationRemarkAnalysisAliasing (const char *PassName, StringRef RemarkName,
950
947
const DiagnosticLocation &Loc,
951
- const Value *CodeRegion)
948
+ const BasicBlock *CodeRegion)
952
949
: OptimizationRemarkAnalysis(DK_OptimizationRemarkAnalysisAliasing,
953
950
PassName, RemarkName, Loc, CodeRegion) {}
954
951
@@ -1049,12 +1046,11 @@ class DiagnosticInfoOptimizationFailure : public DiagnosticInfoIROptimization {
1049
1046
1050
1047
// / \p PassName is the name of the pass emitting this diagnostic. \p
1051
1048
// / 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.
1055
1051
DiagnosticInfoOptimizationFailure (const char *PassName, StringRef RemarkName,
1056
1052
const DiagnosticLocation &Loc,
1057
- const Value *CodeRegion);
1053
+ const BasicBlock *CodeRegion);
1058
1054
1059
1055
static bool classof (const DiagnosticInfo *DI) {
1060
1056
return DI->getKind () == DK_OptimizationFailure;
0 commit comments