1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

[PM] Re-clang-format much of this code as the code has changed some and

so has clang-format. Notably, this fixes a bunch of formatting in the
CGSCC pass manager side of things that has been improved in clang-format
recently.

llvm-svn: 225743
This commit is contained in:
Chandler Carruth 2015-01-13 00:36:47 +00:00
parent 197d61fb5f
commit 02ead01a1e
4 changed files with 22 additions and 25 deletions

View File

@ -52,7 +52,7 @@ public:
private:
// Pull in the concept type and model template specialized for SCCs.
typedef detail::PassConcept<LazyCallGraph::SCC, CGSCCAnalysisManager>
CGSCCPassConcept;
CGSCCPassConcept;
template <typename PassT>
struct CGSCCPassModel
: detail::PassModel<LazyCallGraph::SCC, CGSCCAnalysisManager, PassT> {
@ -69,12 +69,13 @@ private:
/// \brief A function analysis manager to coordinate and cache analyses run over
/// a module.
class CGSCCAnalysisManager : public detail::AnalysisManagerBase<
CGSCCAnalysisManager, LazyCallGraph::SCC> {
class CGSCCAnalysisManager
: public detail::AnalysisManagerBase<CGSCCAnalysisManager,
LazyCallGraph::SCC> {
friend class detail::AnalysisManagerBase<CGSCCAnalysisManager,
LazyCallGraph::SCC>;
typedef detail::AnalysisManagerBase<CGSCCAnalysisManager,
LazyCallGraph::SCC> BaseT;
typedef detail::AnalysisManagerBase<CGSCCAnalysisManager, LazyCallGraph::SCC>
BaseT;
typedef BaseT::ResultConceptT ResultConceptT;
typedef BaseT::PassConceptT PassConceptT;
@ -127,13 +128,14 @@ private:
/// Requires iterators to be valid across appending new entries and arbitrary
/// erases. Provides both the pass ID and concept pointer such that it is
/// half of a bijection and provides storage for the actual result concept.
typedef std::list<
std::pair<void *, std::unique_ptr<detail::AnalysisResultConcept<
LazyCallGraph::SCC>>>> CGSCCAnalysisResultListT;
typedef std::list<std::pair<
void *,
std::unique_ptr<detail::AnalysisResultConcept<LazyCallGraph::SCC>>>>
CGSCCAnalysisResultListT;
/// \brief Map type from function pointer to our custom list type.
typedef DenseMap<LazyCallGraph::SCC *, CGSCCAnalysisResultListT>
CGSCCAnalysisResultListMapT;
CGSCCAnalysisResultListMapT;
/// \brief Map from function to a list of function analysis results.
///
@ -201,8 +203,7 @@ public:
: CGAM(&CGAM) {}
// We have to explicitly define all the special member functions because MSVC
// refuses to generate them.
CGSCCAnalysisManagerModuleProxy(
const CGSCCAnalysisManagerModuleProxy &Arg)
CGSCCAnalysisManagerModuleProxy(const CGSCCAnalysisManagerModuleProxy &Arg)
: CGAM(Arg.CGAM) {}
CGSCCAnalysisManagerModuleProxy(CGSCCAnalysisManagerModuleProxy &&Arg)
: CGAM(std::move(Arg.CGAM)) {}
@ -273,8 +274,7 @@ public:
: MAM(&MAM) {}
// We have to explicitly define all the special member functions because MSVC
// refuses to generate them.
ModuleAnalysisManagerCGSCCProxy(
const ModuleAnalysisManagerCGSCCProxy &Arg)
ModuleAnalysisManagerCGSCCProxy(const ModuleAnalysisManagerCGSCCProxy &Arg)
: MAM(Arg.MAM) {}
ModuleAnalysisManagerCGSCCProxy(ModuleAnalysisManagerCGSCCProxy &&Arg)
: MAM(std::move(Arg.MAM)) {}
@ -541,7 +541,8 @@ public:
: Pass(Arg.Pass) {}
CGSCCToFunctionPassAdaptor(CGSCCToFunctionPassAdaptor &&Arg)
: Pass(std::move(Arg.Pass)) {}
friend void swap(CGSCCToFunctionPassAdaptor &LHS, CGSCCToFunctionPassAdaptor &RHS) {
friend void swap(CGSCCToFunctionPassAdaptor &LHS,
CGSCCToFunctionPassAdaptor &RHS) {
using std::swap;
swap(LHS.Pass, RHS.Pass);
}
@ -597,7 +598,6 @@ CGSCCToFunctionPassAdaptor<FunctionPassT>
createCGSCCToFunctionPassAdaptor(FunctionPassT Pass) {
return std::move(CGSCCToFunctionPassAdaptor<FunctionPassT>(std::move(Pass)));
}
}
#endif

View File

@ -203,8 +203,7 @@ public:
private:
// Pull in the concept type and model template specialized for modules.
typedef detail::PassConcept<Module, ModuleAnalysisManager>
ModulePassConcept;
typedef detail::PassConcept<Module, ModuleAnalysisManager> ModulePassConcept;
template <typename PassT>
struct ModulePassModel
: detail::PassModel<Module, ModuleAnalysisManager, PassT> {
@ -474,8 +473,7 @@ private:
class FunctionAnalysisManager
: public detail::AnalysisManagerBase<FunctionAnalysisManager, Function> {
friend class detail::AnalysisManagerBase<FunctionAnalysisManager, Function>;
typedef detail::AnalysisManagerBase<FunctionAnalysisManager, Function>
BaseT;
typedef detail::AnalysisManagerBase<FunctionAnalysisManager, Function> BaseT;
typedef BaseT::ResultConceptT ResultConceptT;
typedef BaseT::PassConceptT PassConceptT;
@ -830,8 +828,7 @@ template <typename AnalysisT> struct InvalidateAnalysisPass {
/// analysis passes to be re-run to produce fresh results if any are needed.
struct InvalidateAllAnalysesPass {
/// \brief Run this pass over some unit of IR.
template <typename T>
PreservedAnalyses run(T &&Arg) {
template <typename T> PreservedAnalyses run(T &&Arg) {
return PreservedAnalyses::none();
}

View File

@ -14,8 +14,8 @@
using namespace llvm;
static cl::opt<bool>
DebugPM("debug-cgscc-pass-manager", cl::Hidden,
cl::desc("Print CGSCC pass management debugging information"));
DebugPM("debug-cgscc-pass-manager", cl::Hidden,
cl::desc("Print CGSCC pass management debugging information"));
PreservedAnalyses CGSCCPassManager::run(LazyCallGraph::SCC &C,
CGSCCAnalysisManager *AM) {

View File

@ -107,8 +107,8 @@ PreservedAnalyses ModuleAnalysisManager::invalidateImpl(Module &M,
// of the analysis manager is required for this invalidation event.
if (I->second->invalidate(M, PA)) {
if (DebugPM)
dbgs() << "Invalidating module analysis: "
<< lookupPass(PassID).name() << "\n";
dbgs() << "Invalidating module analysis: " << lookupPass(PassID).name()
<< "\n";
ModuleAnalysisResults.erase(I);
}