summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp2
-rw-r--r--llvm/lib/Transforms/Scalar/DCE.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp b/llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
index b71cd97ec5f..b68be789721 100644
--- a/llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
+++ b/llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
@@ -144,6 +144,7 @@ ModulePass *llvm::createPGOIndirectCallPromotionLegacyPass(bool InLTO) {
return new PGOIndirectCallPromotionLegacyPass(InLTO);
}
+namespace {
// The class for main data structure to promote indirect calls to conditional
// direct calls.
class ICallPromotionFunc {
@@ -234,6 +235,7 @@ public:
}
bool processFunction();
};
+} // end anonymous namespace
bool ICallPromotionFunc::isPromotionProfitable(uint64_t Count,
uint64_t TotalCount) {
diff --git a/llvm/lib/Transforms/Scalar/DCE.cpp b/llvm/lib/Transforms/Scalar/DCE.cpp
index 2310ba62e6b..f73809d9f04 100644
--- a/llvm/lib/Transforms/Scalar/DCE.cpp
+++ b/llvm/lib/Transforms/Scalar/DCE.cpp
@@ -100,7 +100,7 @@ static bool DCEInstruction(Instruction *I,
return false;
}
-bool eliminateDeadCode(Function &F, TargetLibraryInfo *TLI) {
+static bool eliminateDeadCode(Function &F, TargetLibraryInfo *TLI) {
bool MadeChange = false;
SmallSetVector<Instruction *, 16> WorkList;
// Iterate over the original function, only adding insts to the worklist
OpenPOWER on IntegriCloud