[llvm] r272991 - [PM] Run clang-format over various parts of the new pass manager code
Chandler Carruth via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 17 00:15:30 PDT 2016
Author: chandlerc
Date: Fri Jun 17 02:15:29 2016
New Revision: 272991
URL: http://llvm.org/viewvc/llvm-project?rev=272991&view=rev
Log:
[PM] Run clang-format over various parts of the new pass manager code
prior to some very substantial patches to isolate any formatting-only
changes.
Modified:
llvm/trunk/include/llvm/IR/PassManagerInternal.h
llvm/trunk/lib/IR/PassManager.cpp
llvm/trunk/lib/Passes/PassBuilder.cpp
llvm/trunk/unittests/Analysis/CGSCCPassManagerTest.cpp
llvm/trunk/unittests/IR/PassManagerTest.cpp
Modified: llvm/trunk/include/llvm/IR/PassManagerInternal.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/PassManagerInternal.h?rev=272991&r1=272990&r2=272991&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/PassManagerInternal.h (original)
+++ llvm/trunk/include/llvm/IR/PassManagerInternal.h Fri Jun 17 02:15:29 2016
@@ -18,8 +18,8 @@
#ifndef LLVM_IR_PASSMANAGERINTERNAL_H
#define LLVM_IR_PASSMANAGERINTERNAL_H
-#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/STLExtras.h"
+#include "llvm/ADT/StringRef.h"
namespace llvm {
Modified: llvm/trunk/lib/IR/PassManager.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/PassManager.cpp?rev=272991&r1=272990&r2=272991&view=diff
==============================================================================
--- llvm/trunk/lib/IR/PassManager.cpp (original)
+++ llvm/trunk/lib/IR/PassManager.cpp Fri Jun 17 02:15:29 2016
@@ -7,9 +7,9 @@
//
//===----------------------------------------------------------------------===//
+#include "llvm/IR/PassManager.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/IR/LLVMContext.h"
-#include "llvm/IR/PassManager.h"
using namespace llvm;
Modified: llvm/trunk/lib/Passes/PassBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Passes/PassBuilder.cpp?rev=272991&r1=272990&r2=272991&view=diff
==============================================================================
--- llvm/trunk/lib/Passes/PassBuilder.cpp (original)
+++ llvm/trunk/lib/Passes/PassBuilder.cpp Fri Jun 17 02:15:29 2016
@@ -86,11 +86,11 @@
#include "llvm/Transforms/Scalar/PartiallyInlineLibCalls.h"
#include "llvm/Transforms/Scalar/Reassociate.h"
#include "llvm/Transforms/Scalar/SCCP.h"
+#include "llvm/Transforms/Scalar/SLPVectorizer.h"
#include "llvm/Transforms/Scalar/SROA.h"
#include "llvm/Transforms/Scalar/SimplifyCFG.h"
#include "llvm/Transforms/Scalar/Sink.h"
#include "llvm/Transforms/Utils/AddDiscriminators.h"
-#include "llvm/Transforms/Scalar/SLPVectorizer.h"
#include "llvm/Transforms/Utils/LCSSA.h"
#include "llvm/Transforms/Utils/Mem2Reg.h"
#include "llvm/Transforms/Utils/MemorySSA.h"
@@ -190,25 +190,25 @@ char NoOpLoopAnalysis::PassID;
} // End anonymous namespace.
void PassBuilder::registerModuleAnalyses(ModuleAnalysisManager &MAM) {
-#define MODULE_ANALYSIS(NAME, CREATE_PASS) \
+#define MODULE_ANALYSIS(NAME, CREATE_PASS) \
MAM.registerPass([&] { return CREATE_PASS; });
#include "PassRegistry.def"
}
void PassBuilder::registerCGSCCAnalyses(CGSCCAnalysisManager &CGAM) {
-#define CGSCC_ANALYSIS(NAME, CREATE_PASS) \
+#define CGSCC_ANALYSIS(NAME, CREATE_PASS) \
CGAM.registerPass([&] { return CREATE_PASS; });
#include "PassRegistry.def"
}
void PassBuilder::registerFunctionAnalyses(FunctionAnalysisManager &FAM) {
-#define FUNCTION_ANALYSIS(NAME, CREATE_PASS) \
+#define FUNCTION_ANALYSIS(NAME, CREATE_PASS) \
FAM.registerPass([&] { return CREATE_PASS; });
#include "PassRegistry.def"
}
void PassBuilder::registerLoopAnalyses(LoopAnalysisManager &LAM) {
-#define LOOP_ANALYSIS(NAME, CREATE_PASS) \
+#define LOOP_ANALYSIS(NAME, CREATE_PASS) \
LAM.registerPass([&] { return CREATE_PASS; });
#include "PassRegistry.def"
}
@@ -250,7 +250,9 @@ static bool isModulePassName(StringRef N
if (Name.startswith("default") || Name.startswith("lto"))
return DefaultAliasRegex.match(Name);
-#define MODULE_PASS(NAME, CREATE_PASS) if (Name == NAME) return true;
+#define MODULE_PASS(NAME, CREATE_PASS) \
+ if (Name == NAME) \
+ return true;
#define MODULE_ANALYSIS(NAME, CREATE_PASS) \
if (Name == "require<" NAME ">" || Name == "invalidate<" NAME ">") \
return true;
@@ -261,7 +263,9 @@ static bool isModulePassName(StringRef N
#endif
static bool isCGSCCPassName(StringRef Name) {
-#define CGSCC_PASS(NAME, CREATE_PASS) if (Name == NAME) return true;
+#define CGSCC_PASS(NAME, CREATE_PASS) \
+ if (Name == NAME) \
+ return true;
#define CGSCC_ANALYSIS(NAME, CREATE_PASS) \
if (Name == "require<" NAME ">" || Name == "invalidate<" NAME ">") \
return true;
@@ -271,7 +275,9 @@ static bool isCGSCCPassName(StringRef Na
}
static bool isFunctionPassName(StringRef Name) {
-#define FUNCTION_PASS(NAME, CREATE_PASS) if (Name == NAME) return true;
+#define FUNCTION_PASS(NAME, CREATE_PASS) \
+ if (Name == NAME) \
+ return true;
#define FUNCTION_ANALYSIS(NAME, CREATE_PASS) \
if (Name == "require<" NAME ">" || Name == "invalidate<" NAME ">") \
return true;
@@ -281,7 +287,9 @@ static bool isFunctionPassName(StringRef
}
static bool isLoopPassName(StringRef Name) {
-#define LOOP_PASS(NAME, CREATE_PASS) if (Name == NAME) return true;
+#define LOOP_PASS(NAME, CREATE_PASS) \
+ if (Name == NAME) \
+ return true;
#define LOOP_ANALYSIS(NAME, CREATE_PASS) \
if (Name == "require<" NAME ">" || Name == "invalidate<" NAME ">") \
return true;
@@ -384,8 +392,7 @@ bool PassBuilder::parseFunctionPassName(
return false;
}
-bool PassBuilder::parseLoopPassName(LoopPassManager &FPM,
- StringRef Name) {
+bool PassBuilder::parseLoopPassName(LoopPassManager &FPM, StringRef Name) {
#define LOOP_PASS(NAME, CREATE_PASS) \
if (Name == NAME) { \
FPM.addPass(CREATE_PASS); \
@@ -707,7 +714,6 @@ bool PassBuilder::parsePassPipeline(Modu
return true;
}
-
return false;
}
Modified: llvm/trunk/unittests/Analysis/CGSCCPassManagerTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Analysis/CGSCCPassManagerTest.cpp?rev=272991&r1=272990&r2=272991&view=diff
==============================================================================
--- llvm/trunk/unittests/Analysis/CGSCCPassManagerTest.cpp (original)
+++ llvm/trunk/unittests/Analysis/CGSCCPassManagerTest.cpp Fri Jun 17 02:15:29 2016
@@ -142,9 +142,8 @@ struct TestModulePass {
struct TestSCCPass {
TestSCCPass(int &RunCount, int &AnalyzedInstrCount,
- int &AnalyzedSCCFunctionCount,
- int &AnalyzedModuleFunctionCount,
- bool OnlyUseCachedResults = false)
+ int &AnalyzedSCCFunctionCount, int &AnalyzedModuleFunctionCount,
+ bool OnlyUseCachedResults = false)
: RunCount(RunCount), AnalyzedInstrCount(AnalyzedInstrCount),
AnalyzedSCCFunctionCount(AnalyzedSCCFunctionCount),
AnalyzedModuleFunctionCount(AnalyzedModuleFunctionCount),
Modified: llvm/trunk/unittests/IR/PassManagerTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/IR/PassManagerTest.cpp?rev=272991&r1=272990&r2=272991&view=diff
==============================================================================
--- llvm/trunk/unittests/IR/PassManagerTest.cpp (original)
+++ llvm/trunk/unittests/IR/PassManagerTest.cpp Fri Jun 17 02:15:29 2016
@@ -238,8 +238,8 @@ TEST_F(PassManagerTest, Basic) {
{
// Pointless scope to test move assignment.
FunctionPassManager NestedFPM;
- NestedFPM.addPass(TestFunctionPass(FunctionPassRunCount1, AnalyzedInstrCount1,
- AnalyzedFunctionCount1));
+ NestedFPM.addPass(TestFunctionPass(
+ FunctionPassRunCount1, AnalyzedInstrCount1, AnalyzedFunctionCount1));
FPM = std::move(NestedFPM);
}
NestedMPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM)));
More information about the llvm-commits
mailing list