Revert "clang-misexpect: Profile Guided Validation of Performance Annotations in...
authorRoman Lebedev <lebedev.ri@gmail.com>
Sat, 14 Nov 2020 06:44:14 +0000 (09:44 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Sat, 14 Nov 2020 10:12:38 +0000 (13:12 +0300)
commit6861d938e5c946cc7079d9849ef7560d07aa2d80
tree0134b8f98b411e7435f8f4f0a58851fa3724750e
parente51631ca4cf461510019d5fc950eacb2fe45eb48
Revert "clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM"

See discussion in https://bugs.llvm.org/show_bug.cgi?id=45073 / https://reviews.llvm.org/D66324#2334485
the implementation is known-broken for certain inputs,
the bugreport was up for a significant amount of timer,
and there has been no activity to address it.
Therefore, just completely rip out all of misexpect handling.

I suspect, fixing it requires redesigning the internals of MD_misexpect.
Should anyone commit to fixing the implementation problem,
starting from clean slate may be better anyways.

This reverts commit 7bdad08429411e7d0ecd58cd696b1efe3cff309e,
and some of it's follow-ups, that don't stand on their own.
48 files changed:
clang/docs/DiagnosticsReference.rst
clang/include/clang/Basic/DiagnosticFrontendKinds.td
clang/include/clang/Basic/DiagnosticGroups.td
clang/lib/CodeGen/CodeGenAction.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/test/CodeGen/thinlto-clang-diagnostic-handler-in-be.c
clang/test/CodeGenCXX/attr-likelihood-if-vs-builtin-expect.cpp
clang/test/Profile/Inputs/misexpect-branch-nonconst-expect-arg.proftext [deleted file]
clang/test/Profile/Inputs/misexpect-branch.proftext [deleted file]
clang/test/Profile/Inputs/misexpect-switch-default-only.proftext [deleted file]
clang/test/Profile/Inputs/misexpect-switch-default.proftext [deleted file]
clang/test/Profile/Inputs/misexpect-switch-nonconst.proftext [deleted file]
clang/test/Profile/Inputs/misexpect-switch.proftext [deleted file]
clang/test/Profile/misexpect-branch-cold.c [deleted file]
clang/test/Profile/misexpect-branch-nonconst-expected-val.c [deleted file]
clang/test/Profile/misexpect-branch-unpredictable.c [deleted file]
clang/test/Profile/misexpect-branch.c [deleted file]
clang/test/Profile/misexpect-switch-default.c [deleted file]
clang/test/Profile/misexpect-switch-nonconst.c [deleted file]
clang/test/Profile/misexpect-switch-only-default-case.c [deleted file]
clang/test/Profile/misexpect-switch.c [deleted file]
llvm/include/llvm/IR/DiagnosticInfo.h
llvm/include/llvm/IR/FixedMetadataKinds.def
llvm/include/llvm/IR/MDBuilder.h
llvm/include/llvm/Transforms/Utils/MisExpect.h [deleted file]
llvm/lib/IR/DiagnosticInfo.cpp
llvm/lib/IR/MDBuilder.cpp
llvm/lib/Transforms/IPO/SampleProfile.cpp
llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
llvm/lib/Transforms/Scalar/LowerExpectIntrinsic.cpp
llvm/lib/Transforms/Utils/CMakeLists.txt
llvm/lib/Transforms/Utils/MisExpect.cpp [deleted file]
llvm/test/Transforms/LowerExpectIntrinsic/basic.ll
llvm/test/Transforms/LowerExpectIntrinsic/expect-with-probability.ll
llvm/test/Transforms/PGOProfile/Inputs/misexpect-branch-correct.proftext [deleted file]
llvm/test/Transforms/PGOProfile/Inputs/misexpect-branch.proftext [deleted file]
llvm/test/Transforms/PGOProfile/Inputs/misexpect-branch_entry.proftext [deleted file]
llvm/test/Transforms/PGOProfile/Inputs/misexpect-switch-correct.proftext [deleted file]
llvm/test/Transforms/PGOProfile/Inputs/misexpect-switch-correct_entry.proftext [deleted file]
llvm/test/Transforms/PGOProfile/Inputs/misexpect-switch.proftext [deleted file]
llvm/test/Transforms/PGOProfile/Inputs/misexpect-switch_entry.proftext [deleted file]
llvm/test/Transforms/PGOProfile/misexpect-branch-correct.ll [deleted file]
llvm/test/Transforms/PGOProfile/misexpect-branch-stripped.ll [deleted file]
llvm/test/Transforms/PGOProfile/misexpect-branch-unpredictable.ll [deleted file]
llvm/test/Transforms/PGOProfile/misexpect-branch.ll [deleted file]
llvm/test/Transforms/PGOProfile/misexpect-switch-default.ll [deleted file]
llvm/test/Transforms/PGOProfile/misexpect-switch.ll [deleted file]
llvm/utils/gn/secondary/llvm/lib/Transforms/Utils/BUILD.gn