1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00

[ADT] Make TrackingStatistic's ctor constexpr

This lets clang diagnose unused statistics, so remove them.
This commit is contained in:
Benjamin Kramer 2021-04-28 11:54:00 +02:00
parent 162a7c0f22
commit aa22c800d0
4 changed files with 2 additions and 7 deletions

View File

@ -55,7 +55,8 @@ public:
std::atomic<unsigned> Value; std::atomic<unsigned> Value;
std::atomic<bool> Initialized; std::atomic<bool> Initialized;
TrackingStatistic(const char *DebugType, const char *Name, const char *Desc) constexpr TrackingStatistic(const char *DebugType, const char *Name,
const char *Desc)
: DebugType(DebugType), Name(Name), Desc(Desc), Value(0), : DebugType(DebugType), Name(Name), Desc(Desc), Value(0),
Initialized(false) {} Initialized(false) {}

View File

@ -201,9 +201,6 @@ using namespace llvm;
#define DEBUG_TYPE "livedebugvalues" #define DEBUG_TYPE "livedebugvalues"
STATISTIC(NumInserted, "Number of DBG_VALUE instructions inserted");
STATISTIC(NumRemoved, "Number of DBG_VALUE instructions removed");
// Act more like the VarLoc implementation, by propagating some locations too // Act more like the VarLoc implementation, by propagating some locations too
// far and ignoring some transfers. // far and ignoring some transfers.
static cl::opt<bool> EmulateOldLDV("emulate-old-livedebugvalues", cl::Hidden, static cl::opt<bool> EmulateOldLDV("emulate-old-livedebugvalues", cl::Hidden,

View File

@ -63,8 +63,6 @@ STATISTIC(NumAttributesValidFixpoint,
"Number of abstract attributes in a valid fixpoint state"); "Number of abstract attributes in a valid fixpoint state");
STATISTIC(NumAttributesManifested, STATISTIC(NumAttributesManifested,
"Number of abstract attributes manifested in IR"); "Number of abstract attributes manifested in IR");
STATISTIC(NumAttributesFixedDueToRequiredDependences,
"Number of abstract attributes fixed due to required dependences");
// TODO: Determine a good default value. // TODO: Determine a good default value.
// //

View File

@ -44,7 +44,6 @@ STATISTIC(NumSExtArg, "Number of arguments inferred as signext");
STATISTIC(NumReadOnlyArg, "Number of arguments inferred as readonly"); STATISTIC(NumReadOnlyArg, "Number of arguments inferred as readonly");
STATISTIC(NumNoAlias, "Number of function returns inferred as noalias"); STATISTIC(NumNoAlias, "Number of function returns inferred as noalias");
STATISTIC(NumNoUndef, "Number of function returns inferred as noundef returns"); STATISTIC(NumNoUndef, "Number of function returns inferred as noundef returns");
STATISTIC(NumNonNull, "Number of function returns inferred as nonnull returns");
STATISTIC(NumReturnedArg, "Number of arguments inferred as returned"); STATISTIC(NumReturnedArg, "Number of arguments inferred as returned");
STATISTIC(NumWillReturn, "Number of functions inferred as willreturn"); STATISTIC(NumWillReturn, "Number of functions inferred as willreturn");