Skip to content

Commit fc7573f

Browse files
committed
Revert "[misexpect] Re-implement MisExpect Diagnostics"
This reverts commit 46774df.
1 parent de4bcdc commit fc7573f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2
-2045
lines changed

clang/docs/MisExpect.rst

Lines changed: 0 additions & 75 deletions
This file was deleted.

clang/docs/ReleaseNotes.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,6 @@ Improvements to Clang's diagnostics
111111
- ``-Wunused-but-set-variable`` now also warns if the variable is only used
112112
by unary operators.
113113

114-
- ``-Wmisexpect`` warns when the branch weights collected during profiling
115-
conflict with those added by ``llvm.expect``.
116-
117114
Non-comprehensive list of changes in this release
118115
-------------------------------------------------
119116
- Improve __builtin_dump_struct:

clang/docs/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ Using Clang as a Compiler
4242
SourceBasedCodeCoverage
4343
Modules
4444
MSVCCompatibility
45-
MisExpect
4645
OpenCLSupport
4746
OpenMPSupport
4847
SYCLSupport

clang/include/clang/Basic/CodeGenOptions.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ CODEGENOPT(NoExecStack , 1, 0) ///< Set when -Wa,--noexecstack is enabled.
175175
CODEGENOPT(FatalWarnings , 1, 0) ///< Set when -Wa,--fatal-warnings is
176176
///< enabled.
177177
CODEGENOPT(NoWarn , 1, 0) ///< Set when -Wa,--no-warn is enabled.
178-
CODEGENOPT(MisExpect , 1, 0) ///< Set when -Wmisexpect is enabled
179178
CODEGENOPT(EnableSegmentedStacks , 1, 0) ///< Set when -fsplit-stack is enabled.
180179
CODEGENOPT(NoInlineLineTables, 1, 0) ///< Whether debug info should contain
181180
///< inline line tables.

clang/include/clang/Basic/CodeGenOptions.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -420,10 +420,6 @@ class CodeGenOptions : public CodeGenOptionsBase {
420420
/// If threshold option is not specified, it is disabled by default.
421421
Optional<uint64_t> DiagnosticsHotnessThreshold = 0;
422422

423-
/// The maximum percentage profiling weights can deviate from the expected
424-
/// values in order to be included in misexpect diagnostics.
425-
Optional<uint64_t> DiagnosticsMisExpectTolerance = 0;
426-
427423
public:
428424
// Define accessors/mutators for code generation options of enumeration type.
429425
#define CODEGENOPT(Name, Bits, Default)

clang/include/clang/Basic/DiagnosticDriverKinds.td

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,6 @@ def err_drv_invalid_darwin_version : Error<
149149
"invalid Darwin version number: %0">;
150150
def err_drv_invalid_diagnotics_hotness_threshold : Error<
151151
"invalid argument in '%0', only integer or 'auto' is supported">;
152-
def err_drv_invalid_diagnotics_misexpect_tolerance : Error<
153-
"invalid argument in '%0', only integers are supported">;
154152
def err_drv_missing_argument : Error<
155153
"argument to '%0' is missing (expected %1 value%s1)">;
156154
def err_drv_invalid_Xarch_argument_with_args : Error<
@@ -378,9 +376,6 @@ def warn_drv_empty_joined_argument : Warning<
378376
def warn_drv_diagnostics_hotness_requires_pgo : Warning<
379377
"argument '%0' requires profile-guided optimization information">,
380378
InGroup<UnusedCommandLineArgument>;
381-
def warn_drv_diagnostics_misexpect_requires_pgo : Warning<
382-
"argument '%0' requires profile-guided optimization information">,
383-
InGroup<UnusedCommandLineArgument>;
384379
def warn_drv_clang_unsupported : Warning<
385380
"the clang compiler does not support '%0'">;
386381
def warn_drv_deprecated_arg : Warning<

clang/include/clang/Basic/DiagnosticFrontendKinds.td

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -311,11 +311,6 @@ def warn_profile_data_missing : Warning<
311311
def warn_profile_data_unprofiled : Warning<
312312
"no profile data available for file \"%0\"">,
313313
InGroup<ProfileInstrUnprofiled>;
314-
def warn_profile_data_misexpect : Warning<
315-
"Potential performance regression from use of __builtin_expect(): "
316-
"Annotation was correct on %0 of profiled executions.">,
317-
BackendInfo,
318-
InGroup<MisExpect>;
319314
} // end of instrumentation issue category
320315

321316
}

clang/include/clang/Basic/DiagnosticGroups.td

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1254,7 +1254,6 @@ def BackendWarningAttributes : DiagGroup<"attribute-warning">;
12541254
def ProfileInstrMissing : DiagGroup<"profile-instr-missing">;
12551255
def ProfileInstrOutOfDate : DiagGroup<"profile-instr-out-of-date">;
12561256
def ProfileInstrUnprofiled : DiagGroup<"profile-instr-unprofiled">;
1257-
def MisExpect : DiagGroup<"misexpect">;
12581257

12591258
// AddressSanitizer frontend instrumentation remarks.
12601259
def SanitizeAddressRemarks : DiagGroup<"sanitize-address">;

clang/include/clang/Driver/Options.td

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,9 +1426,6 @@ def fdiagnostics_hotness_threshold_EQ : Joined<["-"], "fdiagnostics-hotness-thre
14261426
Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<value>">,
14271427
HelpText<"Prevent optimization remarks from being output if they do not have at least this profile count. "
14281428
"Use 'auto' to apply the threshold from profile summary">;
1429-
def fdiagnostics_misexpect_tolerance_EQ : Joined<["-"], "fdiagnostics-misexpect-tolerance=">,
1430-
Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<value>">,
1431-
HelpText<"Prevent misexpect diagnostics from being output if the profile counts are within N% of the expected. ">;
14321429
defm diagnostics_show_option : BoolFOption<"diagnostics-show-option",
14331430
DiagnosticOpts<"ShowOptionNames">, DefaultTrue,
14341431
NegFlag<SetFalse, [CC1Option]>, PosFlag<SetTrue, [], "Print option name with mappable diagnostics">>;

clang/lib/CodeGen/BackendUtil.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,6 @@ static bool initTargetOptions(DiagnosticsEngine &Diags,
651651
Entry.IgnoreSysRoot ? Entry.Path : HSOpts.Sysroot + Entry.Path);
652652
Options.MCOptions.Argv0 = CodeGenOpts.Argv0;
653653
Options.MCOptions.CommandLineArgs = CodeGenOpts.CommandLineArgs;
654-
Options.MisExpect = CodeGenOpts.MisExpect;
655654

656655
return true;
657656
}

0 commit comments

Comments
 (0)