mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-24 08:24:33 +00: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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225743 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -69,12 +69,13 @@ private:
|
|||||||
|
|
||||||
/// \brief A function analysis manager to coordinate and cache analyses run over
|
/// \brief A function analysis manager to coordinate and cache analyses run over
|
||||||
/// a module.
|
/// a module.
|
||||||
class CGSCCAnalysisManager : public detail::AnalysisManagerBase<
|
class CGSCCAnalysisManager
|
||||||
CGSCCAnalysisManager, LazyCallGraph::SCC> {
|
: public detail::AnalysisManagerBase<CGSCCAnalysisManager,
|
||||||
|
LazyCallGraph::SCC> {
|
||||||
friend class detail::AnalysisManagerBase<CGSCCAnalysisManager,
|
friend class detail::AnalysisManagerBase<CGSCCAnalysisManager,
|
||||||
LazyCallGraph::SCC>;
|
LazyCallGraph::SCC>;
|
||||||
typedef detail::AnalysisManagerBase<CGSCCAnalysisManager,
|
typedef detail::AnalysisManagerBase<CGSCCAnalysisManager, LazyCallGraph::SCC>
|
||||||
LazyCallGraph::SCC> BaseT;
|
BaseT;
|
||||||
typedef BaseT::ResultConceptT ResultConceptT;
|
typedef BaseT::ResultConceptT ResultConceptT;
|
||||||
typedef BaseT::PassConceptT PassConceptT;
|
typedef BaseT::PassConceptT PassConceptT;
|
||||||
|
|
||||||
@ -127,9 +128,10 @@ private:
|
|||||||
/// Requires iterators to be valid across appending new entries and arbitrary
|
/// Requires iterators to be valid across appending new entries and arbitrary
|
||||||
/// erases. Provides both the pass ID and concept pointer such that it is
|
/// 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.
|
/// half of a bijection and provides storage for the actual result concept.
|
||||||
typedef std::list<
|
typedef std::list<std::pair<
|
||||||
std::pair<void *, std::unique_ptr<detail::AnalysisResultConcept<
|
void *,
|
||||||
LazyCallGraph::SCC>>>> CGSCCAnalysisResultListT;
|
std::unique_ptr<detail::AnalysisResultConcept<LazyCallGraph::SCC>>>>
|
||||||
|
CGSCCAnalysisResultListT;
|
||||||
|
|
||||||
/// \brief Map type from function pointer to our custom list type.
|
/// \brief Map type from function pointer to our custom list type.
|
||||||
typedef DenseMap<LazyCallGraph::SCC *, CGSCCAnalysisResultListT>
|
typedef DenseMap<LazyCallGraph::SCC *, CGSCCAnalysisResultListT>
|
||||||
@ -201,8 +203,7 @@ public:
|
|||||||
: CGAM(&CGAM) {}
|
: CGAM(&CGAM) {}
|
||||||
// We have to explicitly define all the special member functions because MSVC
|
// We have to explicitly define all the special member functions because MSVC
|
||||||
// refuses to generate them.
|
// refuses to generate them.
|
||||||
CGSCCAnalysisManagerModuleProxy(
|
CGSCCAnalysisManagerModuleProxy(const CGSCCAnalysisManagerModuleProxy &Arg)
|
||||||
const CGSCCAnalysisManagerModuleProxy &Arg)
|
|
||||||
: CGAM(Arg.CGAM) {}
|
: CGAM(Arg.CGAM) {}
|
||||||
CGSCCAnalysisManagerModuleProxy(CGSCCAnalysisManagerModuleProxy &&Arg)
|
CGSCCAnalysisManagerModuleProxy(CGSCCAnalysisManagerModuleProxy &&Arg)
|
||||||
: CGAM(std::move(Arg.CGAM)) {}
|
: CGAM(std::move(Arg.CGAM)) {}
|
||||||
@ -273,8 +274,7 @@ public:
|
|||||||
: MAM(&MAM) {}
|
: MAM(&MAM) {}
|
||||||
// We have to explicitly define all the special member functions because MSVC
|
// We have to explicitly define all the special member functions because MSVC
|
||||||
// refuses to generate them.
|
// refuses to generate them.
|
||||||
ModuleAnalysisManagerCGSCCProxy(
|
ModuleAnalysisManagerCGSCCProxy(const ModuleAnalysisManagerCGSCCProxy &Arg)
|
||||||
const ModuleAnalysisManagerCGSCCProxy &Arg)
|
|
||||||
: MAM(Arg.MAM) {}
|
: MAM(Arg.MAM) {}
|
||||||
ModuleAnalysisManagerCGSCCProxy(ModuleAnalysisManagerCGSCCProxy &&Arg)
|
ModuleAnalysisManagerCGSCCProxy(ModuleAnalysisManagerCGSCCProxy &&Arg)
|
||||||
: MAM(std::move(Arg.MAM)) {}
|
: MAM(std::move(Arg.MAM)) {}
|
||||||
@ -541,7 +541,8 @@ public:
|
|||||||
: Pass(Arg.Pass) {}
|
: Pass(Arg.Pass) {}
|
||||||
CGSCCToFunctionPassAdaptor(CGSCCToFunctionPassAdaptor &&Arg)
|
CGSCCToFunctionPassAdaptor(CGSCCToFunctionPassAdaptor &&Arg)
|
||||||
: Pass(std::move(Arg.Pass)) {}
|
: Pass(std::move(Arg.Pass)) {}
|
||||||
friend void swap(CGSCCToFunctionPassAdaptor &LHS, CGSCCToFunctionPassAdaptor &RHS) {
|
friend void swap(CGSCCToFunctionPassAdaptor &LHS,
|
||||||
|
CGSCCToFunctionPassAdaptor &RHS) {
|
||||||
using std::swap;
|
using std::swap;
|
||||||
swap(LHS.Pass, RHS.Pass);
|
swap(LHS.Pass, RHS.Pass);
|
||||||
}
|
}
|
||||||
@ -597,7 +598,6 @@ CGSCCToFunctionPassAdaptor<FunctionPassT>
|
|||||||
createCGSCCToFunctionPassAdaptor(FunctionPassT Pass) {
|
createCGSCCToFunctionPassAdaptor(FunctionPassT Pass) {
|
||||||
return std::move(CGSCCToFunctionPassAdaptor<FunctionPassT>(std::move(Pass)));
|
return std::move(CGSCCToFunctionPassAdaptor<FunctionPassT>(std::move(Pass)));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -203,8 +203,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
// Pull in the concept type and model template specialized for modules.
|
// Pull in the concept type and model template specialized for modules.
|
||||||
typedef detail::PassConcept<Module, ModuleAnalysisManager>
|
typedef detail::PassConcept<Module, ModuleAnalysisManager> ModulePassConcept;
|
||||||
ModulePassConcept;
|
|
||||||
template <typename PassT>
|
template <typename PassT>
|
||||||
struct ModulePassModel
|
struct ModulePassModel
|
||||||
: detail::PassModel<Module, ModuleAnalysisManager, PassT> {
|
: detail::PassModel<Module, ModuleAnalysisManager, PassT> {
|
||||||
@ -474,8 +473,7 @@ private:
|
|||||||
class FunctionAnalysisManager
|
class FunctionAnalysisManager
|
||||||
: public detail::AnalysisManagerBase<FunctionAnalysisManager, Function> {
|
: public detail::AnalysisManagerBase<FunctionAnalysisManager, Function> {
|
||||||
friend class detail::AnalysisManagerBase<FunctionAnalysisManager, Function>;
|
friend class detail::AnalysisManagerBase<FunctionAnalysisManager, Function>;
|
||||||
typedef detail::AnalysisManagerBase<FunctionAnalysisManager, Function>
|
typedef detail::AnalysisManagerBase<FunctionAnalysisManager, Function> BaseT;
|
||||||
BaseT;
|
|
||||||
typedef BaseT::ResultConceptT ResultConceptT;
|
typedef BaseT::ResultConceptT ResultConceptT;
|
||||||
typedef BaseT::PassConceptT PassConceptT;
|
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.
|
/// analysis passes to be re-run to produce fresh results if any are needed.
|
||||||
struct InvalidateAllAnalysesPass {
|
struct InvalidateAllAnalysesPass {
|
||||||
/// \brief Run this pass over some unit of IR.
|
/// \brief Run this pass over some unit of IR.
|
||||||
template <typename T>
|
template <typename T> PreservedAnalyses run(T &&Arg) {
|
||||||
PreservedAnalyses run(T &&Arg) {
|
|
||||||
return PreservedAnalyses::none();
|
return PreservedAnalyses::none();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
static cl::opt<bool>
|
static cl::opt<bool>
|
||||||
DebugPM("debug-cgscc-pass-manager", cl::Hidden,
|
DebugPM("debug-cgscc-pass-manager", cl::Hidden,
|
||||||
cl::desc("Print CGSCC pass management debugging information"));
|
cl::desc("Print CGSCC pass management debugging information"));
|
||||||
|
|
||||||
PreservedAnalyses CGSCCPassManager::run(LazyCallGraph::SCC &C,
|
PreservedAnalyses CGSCCPassManager::run(LazyCallGraph::SCC &C,
|
||||||
|
@ -107,8 +107,8 @@ PreservedAnalyses ModuleAnalysisManager::invalidateImpl(Module &M,
|
|||||||
// of the analysis manager is required for this invalidation event.
|
// of the analysis manager is required for this invalidation event.
|
||||||
if (I->second->invalidate(M, PA)) {
|
if (I->second->invalidate(M, PA)) {
|
||||||
if (DebugPM)
|
if (DebugPM)
|
||||||
dbgs() << "Invalidating module analysis: "
|
dbgs() << "Invalidating module analysis: " << lookupPass(PassID).name()
|
||||||
<< lookupPass(PassID).name() << "\n";
|
<< "\n";
|
||||||
|
|
||||||
ModuleAnalysisResults.erase(I);
|
ModuleAnalysisResults.erase(I);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user