diff options
author | Fangrui Song <maskray@google.com> | 2018-09-05 03:10:20 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2018-09-05 03:10:20 +0000 |
commit | c8f348cba7035286ab49d3a2e5d82439ffd814ec (patch) | |
tree | 2b1b0c0b5e64c422e3d5f52c68fafef583c28c79 /llvm/lib/Transforms | |
parent | 416296b8f76f1d131e0c33452f8683cd3a023526 (diff) | |
download | bcm5719-llvm-c8f348cba7035286ab49d3a2e5d82439ffd814ec.tar.gz bcm5719-llvm-c8f348cba7035286ab49d3a2e5d82439ffd814ec.zip |
Fix -Wunused-function in release build after rL341386
llvm-svn: 341443
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp b/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp index 5b1f499eacc..4da8a7113f6 100644 --- a/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp +++ b/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp @@ -160,7 +160,8 @@ struct CHRStats { // count at the scope entry. }; -inline raw_ostream &operator<<(raw_ostream &OS, const CHRStats &Stats) { +inline raw_ostream LLVM_ATTRIBUTE_UNUSED &operator<<(raw_ostream &OS, + const CHRStats &Stats) { Stats.print(OS); return OS; } @@ -459,7 +460,8 @@ static bool shouldApply(Function &F, ProfileSummaryInfo& PSI) { return PSI.isFunctionEntryHot(&F); } -static void dumpIR(Function &F, const char *Label, CHRStats *Stats) { +static void LLVM_ATTRIBUTE_UNUSED dumpIR(Function &F, const char *Label, + CHRStats *Stats) { std::string Name = F.getName().str(); const char *DemangledName = nullptr; #if !defined(_MSC_VER) @@ -479,7 +481,6 @@ static void dumpIR(Function &F, const char *Label, CHRStats *Stats) { CHR_DEBUG(F.dump()); } - void CHRScope::print(raw_ostream &OS) const { assert(RegInfos.size() > 0 && "Empty CHRScope"); OS << "CHRScope["; @@ -1566,7 +1567,8 @@ static void insertTrivialPHIs(CHRScope *Scope, } // Assert that all the CHR regions of the scope have a biased branch or select. -static void assertCHRRegionsHaveBiasedBranchOrSelect(CHRScope *Scope) { +static void LLVM_ATTRIBUTE_UNUSED +assertCHRRegionsHaveBiasedBranchOrSelect(CHRScope *Scope) { #ifndef NDEBUG auto HasBiasedBranchOrSelect = [](RegInfo &RI, CHRScope *Scope) { if (Scope->TrueBiasedRegions.count(RI.R) || @@ -1587,8 +1589,8 @@ static void assertCHRRegionsHaveBiasedBranchOrSelect(CHRScope *Scope) { // Assert that all the condition values of the biased branches and selects have // been hoisted to the pre-entry block or outside of the scope. -static void assertBranchOrSelectConditionHoisted(CHRScope *Scope, - BasicBlock *PreEntryBlock) { +static void LLVM_ATTRIBUTE_UNUSED assertBranchOrSelectConditionHoisted( + CHRScope *Scope, BasicBlock *PreEntryBlock) { CHR_DEBUG(dbgs() << "Biased regions condition values \n"); for (RegInfo &RI : Scope->CHRRegions) { Region *R = RI.R; @@ -1908,7 +1910,8 @@ void CHR::transformScopes(SmallVectorImpl<CHRScope *> &CHRScopes) { } } -static void dumpScopes(SmallVectorImpl<CHRScope *> &Scopes, const char * Label) { +static void LLVM_ATTRIBUTE_UNUSED +dumpScopes(SmallVectorImpl<CHRScope *> &Scopes, const char *Label) { dbgs() << Label << " " << Scopes.size() << "\n"; for (CHRScope *Scope : Scopes) { dbgs() << *Scope << "\n"; |