[llvm] r269839 - minor cleanup /NFC
Xinliang David Li via llvm-commits
llvm-commits at lists.llvm.org
Tue May 17 14:06:16 PDT 2016
Author: davidxl
Date: Tue May 17 16:06:16 2016
New Revision: 269839
URL: http://llvm.org/viewvc/llvm-project?rev=269839&view=rev
Log:
minor cleanup /NFC
Modified:
llvm/trunk/include/llvm/Transforms/PGOInstrumentation.h
llvm/trunk/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
Modified: llvm/trunk/include/llvm/Transforms/PGOInstrumentation.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/PGOInstrumentation.h?rev=269839&r1=269838&r2=269839&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/PGOInstrumentation.h (original)
+++ llvm/trunk/include/llvm/Transforms/PGOInstrumentation.h Tue May 17 16:06:16 2016
@@ -38,9 +38,8 @@ private:
/// The indirect function call promotion pass.
class PGOIndirectCallPromotion : public PassInfoMixin<PGOIndirectCallPromotion> {
public:
- PGOIndirectCallPromotion() : InLTO(false) {}
+ PGOIndirectCallPromotion(bool IsInLTO = false) : InLTO(IsInLTO) {}
PreservedAnalyses run(Module &M, AnalysisManager<Module> &AM);
- void setInLTO() { InLTO = true; }
private:
bool InLTO;
};
Modified: llvm/trunk/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp?rev=269839&r1=269838&r2=269839&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp Tue May 17 16:06:16 2016
@@ -691,13 +691,11 @@ static bool promoteIndirectCalls(Module
bool PGOIndirectCallPromotionLegacyPass::runOnModule(Module &M) {
// Command-line option has the priority for InLTO.
- InLTO |= ICPLTOMode;
- return promoteIndirectCalls(M, InLTO);
+ return promoteIndirectCalls(M, InLTO | ICPLTOMode);
}
PreservedAnalyses PGOIndirectCallPromotion::run(Module &M, AnalysisManager<Module> &AM) {
- InLTO |= ICPLTOMode;
- if (!promoteIndirectCalls(M, InLTO))
+ if (!promoteIndirectCalls(M, InLTO | ICPLTOMode))
return PreservedAnalyses::all();
return PreservedAnalyses::none();
More information about the llvm-commits
mailing list