mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
Move PMTopLevelManager and TImingInfo into anon namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32606 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -21,7 +21,9 @@
|
|||||||
#include "llvm/Support/ManagedStatic.h"
|
#include "llvm/Support/ManagedStatic.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
class llvm::PMDataManager;
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// Overview:
|
// Overview:
|
||||||
@ -114,16 +116,14 @@ PassDebugging_New("debug-pass", cl::Hidden,
|
|||||||
} // End of llvm namespace
|
} // End of llvm namespace
|
||||||
|
|
||||||
#ifndef USE_OLD_PASSMANAGER
|
#ifndef USE_OLD_PASSMANAGER
|
||||||
namespace llvm {
|
namespace {
|
||||||
|
|
||||||
class PMDataManager;
|
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// PMTopLevelManager
|
// PMTopLevelManager
|
||||||
//
|
//
|
||||||
/// PMTopLevelManager manages LastUser info and collects common APIs used by
|
/// PMTopLevelManager manages LastUser info and collects common APIs used by
|
||||||
/// top level pass managers.
|
/// top level pass managers.
|
||||||
class PMTopLevelManager {
|
class VISIBILITY_HIDDEN PMTopLevelManager {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
inline std::vector<Pass *>::iterator passManagersBegin() {
|
inline std::vector<Pass *>::iterator passManagersBegin() {
|
||||||
@ -211,9 +211,12 @@ private:
|
|||||||
std::vector<ImmutablePass *> ImmutablePasses;
|
std::vector<ImmutablePass *> ImmutablePasses;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // End of anon namespace
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// PMDataManager
|
// PMDataManager
|
||||||
|
|
||||||
|
namespace llvm {
|
||||||
/// PMDataManager provides the common place to manage the analysis data
|
/// PMDataManager provides the common place to manage the analysis data
|
||||||
/// used by pass managers.
|
/// used by pass managers.
|
||||||
class PMDataManager {
|
class PMDataManager {
|
||||||
@ -365,7 +368,7 @@ private:
|
|||||||
/// BasicBlockPassManager manages BasicBlockPass. It batches all the
|
/// BasicBlockPassManager manages BasicBlockPass. It batches all the
|
||||||
/// pass together and sequence them to process one basic block before
|
/// pass together and sequence them to process one basic block before
|
||||||
/// processing next basic block.
|
/// processing next basic block.
|
||||||
class BasicBlockPassManager : public PMDataManager,
|
class VISIBILITY_HIDDEN BasicBlockPassManager : public PMDataManager,
|
||||||
public FunctionPass {
|
public FunctionPass {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -390,7 +393,7 @@ public:
|
|||||||
|
|
||||||
// Print passes managed by this manager
|
// Print passes managed by this manager
|
||||||
void dumpPassStructure(unsigned Offset) {
|
void dumpPassStructure(unsigned Offset) {
|
||||||
llvm::cerr << std::string(Offset*2, ' ') << "BasicBLockPass Manager\n";
|
llvm::cerr << std::string(Offset*2, ' ') << "BasicBlockPass Manager\n";
|
||||||
for (std::vector<Pass *>::iterator I = passVectorBegin(),
|
for (std::vector<Pass *>::iterator I = passVectorBegin(),
|
||||||
E = passVectorEnd(); I != E; ++I) {
|
E = passVectorEnd(); I != E; ++I) {
|
||||||
(*I)->dumpPassStructure(Offset + 1);
|
(*I)->dumpPassStructure(Offset + 1);
|
||||||
@ -574,13 +577,17 @@ private:
|
|||||||
ModulePassManager *activeManager;
|
ModulePassManager *activeManager;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // End of llvm namespace
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// TimingInfo Class - This class is used to calculate information about the
|
// TimingInfo Class - This class is used to calculate information about the
|
||||||
// amount of time each pass takes to execute. This only happens when
|
// amount of time each pass takes to execute. This only happens when
|
||||||
// -time-passes is enabled on the command line.
|
// -time-passes is enabled on the command line.
|
||||||
//
|
//
|
||||||
|
|
||||||
class TimingInfo {
|
class VISIBILITY_HIDDEN TimingInfo {
|
||||||
std::map<Pass*, Timer> TimingData;
|
std::map<Pass*, Timer> TimingData;
|
||||||
TimerGroup TG;
|
TimerGroup TG;
|
||||||
|
|
||||||
@ -623,7 +630,7 @@ public:
|
|||||||
|
|
||||||
static TimingInfo *TheTimeInfo;
|
static TimingInfo *TheTimeInfo;
|
||||||
|
|
||||||
} // End of llvm namespace
|
} // End of anon namespace
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// PMTopLevelManager implementation
|
// PMTopLevelManager implementation
|
||||||
|
Reference in New Issue
Block a user