mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
Reverting r138695 to see if it fixes clang self host.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138701 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
884fb72f15
commit
8592a0cda4
@ -84,7 +84,7 @@ public:
|
||||
class LPPassManager : public FunctionPass, public PMDataManager {
|
||||
public:
|
||||
static char ID;
|
||||
explicit LPPassManager();
|
||||
explicit LPPassManager(int Depth);
|
||||
|
||||
/// run - Execute all of the passes scheduled for execution. Keep track of
|
||||
/// whether any of the passes modifies the module, and if so, return true.
|
||||
|
@ -88,7 +88,7 @@ class RGPassManager : public FunctionPass, public PMDataManager {
|
||||
|
||||
public:
|
||||
static char ID;
|
||||
explicit RGPassManager();
|
||||
explicit RGPassManager(int Depth);
|
||||
|
||||
/// @brief Execute all of the passes scheduled for execution.
|
||||
///
|
||||
|
@ -156,7 +156,7 @@ namespace {
|
||||
(void)new llvm::FindUsedTypes();
|
||||
(void)new llvm::ScalarEvolution();
|
||||
((llvm::Function*)0)->viewCFGOnly();
|
||||
llvm::RGPassManager RGM;
|
||||
llvm::RGPassManager RGM(0);
|
||||
((llvm::RegionPass*)0)->runOnRegion((llvm::Region*)0, RGM);
|
||||
llvm::AliasSetTracker X(*(llvm::AliasAnalysis*)0);
|
||||
X.add((llvm::Value*)0, 0, 0); // for -print-alias-sets
|
||||
|
@ -263,7 +263,7 @@ private:
|
||||
class PMDataManager {
|
||||
public:
|
||||
|
||||
explicit PMDataManager() : TPM(NULL), Depth(0) {
|
||||
explicit PMDataManager(int Depth) : TPM(NULL), Depth(Depth) {
|
||||
initializeAnalysisInfo();
|
||||
}
|
||||
|
||||
@ -333,7 +333,6 @@ public:
|
||||
void setTopLevelManager(PMTopLevelManager *T) { TPM = T; }
|
||||
|
||||
unsigned getDepth() const { return Depth; }
|
||||
void setDepth(unsigned newDepth) { Depth = newDepth; }
|
||||
|
||||
// Print routines used by debug-pass
|
||||
void dumpLastUses(Pass *P, unsigned Offset) const;
|
||||
@ -409,8 +408,8 @@ private:
|
||||
class FPPassManager : public ModulePass, public PMDataManager {
|
||||
public:
|
||||
static char ID;
|
||||
explicit FPPassManager()
|
||||
: ModulePass(ID), PMDataManager() { }
|
||||
explicit FPPassManager(int Depth)
|
||||
: ModulePass(ID), PMDataManager(Depth) { }
|
||||
|
||||
/// run - Execute all of the passes scheduled for execution. Keep track of
|
||||
/// whether any of the passes modifies the module, and if so, return true.
|
||||
|
@ -44,8 +44,8 @@ namespace {
|
||||
class CGPassManager : public ModulePass, public PMDataManager {
|
||||
public:
|
||||
static char ID;
|
||||
explicit CGPassManager()
|
||||
: ModulePass(ID), PMDataManager() { }
|
||||
explicit CGPassManager(int Depth)
|
||||
: ModulePass(ID), PMDataManager(Depth) { }
|
||||
|
||||
/// run - Execute all of the passes scheduled for execution. Keep track of
|
||||
/// whether any of the passes modifies the module, and if so, return true.
|
||||
@ -543,7 +543,7 @@ void CallGraphSCCPass::assignPassManager(PMStack &PMS,
|
||||
PMDataManager *PMD = PMS.top();
|
||||
|
||||
// [1] Create new Call Graph Pass Manager
|
||||
CGP = new CGPassManager();
|
||||
CGP = new CGPassManager(PMD->getDepth() + 1);
|
||||
|
||||
// [2] Set up new manager's top level manager
|
||||
PMTopLevelManager *TPM = PMD->getTopLevelManager();
|
||||
|
@ -73,8 +73,8 @@ static void createDebugInfoProbe() {
|
||||
|
||||
char LPPassManager::ID = 0;
|
||||
|
||||
LPPassManager::LPPassManager()
|
||||
: FunctionPass(ID), PMDataManager() {
|
||||
LPPassManager::LPPassManager(int Depth)
|
||||
: FunctionPass(ID), PMDataManager(Depth) {
|
||||
skipThisLoop = false;
|
||||
redoThisLoop = false;
|
||||
LI = NULL;
|
||||
@ -357,8 +357,8 @@ void LoopPass::assignPassManager(PMStack &PMS,
|
||||
assert (!PMS.empty() && "Unable to create Loop Pass Manager");
|
||||
PMDataManager *PMD = PMS.top();
|
||||
|
||||
// [1] Create new Loop Pass Manager
|
||||
LPPM = new LPPassManager();
|
||||
// [1] Create new Call Graph Pass Manager
|
||||
LPPM = new LPPassManager(PMD->getDepth() + 1);
|
||||
LPPM->populateInheritedAnalysis(PMS);
|
||||
|
||||
// [2] Set up new manager's top level manager
|
||||
|
@ -27,8 +27,8 @@ using namespace llvm;
|
||||
|
||||
char RGPassManager::ID = 0;
|
||||
|
||||
RGPassManager::RGPassManager()
|
||||
: FunctionPass(ID), PMDataManager() {
|
||||
RGPassManager::RGPassManager(int Depth)
|
||||
: FunctionPass(ID), PMDataManager(Depth) {
|
||||
skipThisRegion = false;
|
||||
redoThisRegion = false;
|
||||
RI = NULL;
|
||||
@ -250,7 +250,7 @@ void RegionPass::assignPassManager(PMStack &PMS,
|
||||
PMDataManager *PMD = PMS.top();
|
||||
|
||||
// [1] Create new Region Pass Manager
|
||||
RGPM = new RGPassManager();
|
||||
RGPM = new RGPassManager(PMD->getDepth() + 1);
|
||||
RGPM->populateInheritedAnalysis(PMS);
|
||||
|
||||
// [2] Set up new manager's top level manager
|
||||
|
@ -167,8 +167,8 @@ class BBPassManager : public PMDataManager, public FunctionPass {
|
||||
|
||||
public:
|
||||
static char ID;
|
||||
explicit BBPassManager()
|
||||
: PMDataManager(), FunctionPass(ID) {}
|
||||
explicit BBPassManager(int Depth)
|
||||
: PMDataManager(Depth), FunctionPass(ID) {}
|
||||
|
||||
/// Execute all of the passes scheduled for execution. Keep track of
|
||||
/// whether any of the passes modifies the function, and if so, return true.
|
||||
@ -228,9 +228,9 @@ private:
|
||||
bool wasRun;
|
||||
public:
|
||||
static char ID;
|
||||
explicit FunctionPassManagerImpl() :
|
||||
Pass(PT_PassManager, ID), PMDataManager(),
|
||||
PMTopLevelManager(new FPPassManager()), wasRun(false) {}
|
||||
explicit FunctionPassManagerImpl(int Depth) :
|
||||
Pass(PT_PassManager, ID), PMDataManager(Depth),
|
||||
PMTopLevelManager(new FPPassManager(1)), wasRun(false) {}
|
||||
|
||||
/// add - Add a pass to the queue of passes to run. This passes ownership of
|
||||
/// the Pass to the PassManager. When the PassManager is destroyed, the pass
|
||||
@ -303,8 +303,8 @@ char FunctionPassManagerImpl::ID = 0;
|
||||
class MPPassManager : public Pass, public PMDataManager {
|
||||
public:
|
||||
static char ID;
|
||||
explicit MPPassManager() :
|
||||
Pass(PT_PassManager, ID), PMDataManager() { }
|
||||
explicit MPPassManager(int Depth) :
|
||||
Pass(PT_PassManager, ID), PMDataManager(Depth) { }
|
||||
|
||||
// Delete on the fly managers.
|
||||
virtual ~MPPassManager() {
|
||||
@ -388,9 +388,9 @@ class PassManagerImpl : public Pass,
|
||||
|
||||
public:
|
||||
static char ID;
|
||||
explicit PassManagerImpl() :
|
||||
Pass(PT_PassManager, ID), PMDataManager(),
|
||||
PMTopLevelManager(new MPPassManager()) {}
|
||||
explicit PassManagerImpl(int Depth) :
|
||||
Pass(PT_PassManager, ID), PMDataManager(Depth),
|
||||
PMTopLevelManager(new MPPassManager(1)) {}
|
||||
|
||||
/// add - Add a pass to the queue of passes to run. This passes ownership of
|
||||
/// the Pass to the PassManager. When the PassManager is destroyed, the pass
|
||||
@ -1340,7 +1340,7 @@ bool BBPassManager::doFinalization(Function &F) {
|
||||
|
||||
/// Create new Function pass manager
|
||||
FunctionPassManager::FunctionPassManager(Module *m) : M(m) {
|
||||
FPM = new FunctionPassManagerImpl();
|
||||
FPM = new FunctionPassManagerImpl(0);
|
||||
// FPM is the top level manager.
|
||||
FPM->setTopLevelManager(FPM);
|
||||
|
||||
@ -1626,7 +1626,7 @@ void MPPassManager::addLowerLevelRequiredPass(Pass *P, Pass *RequiredPass) {
|
||||
|
||||
FunctionPassManagerImpl *FPP = OnTheFlyManagers[P];
|
||||
if (!FPP) {
|
||||
FPP = new FunctionPassManagerImpl();
|
||||
FPP = new FunctionPassManagerImpl(0);
|
||||
// FPP is the top level manager.
|
||||
FPP->setTopLevelManager(FPP);
|
||||
|
||||
@ -1677,7 +1677,7 @@ bool PassManagerImpl::run(Module &M) {
|
||||
|
||||
/// Create new pass manager
|
||||
PassManager::PassManager() {
|
||||
PM = new PassManagerImpl();
|
||||
PM = new PassManagerImpl(0);
|
||||
// PM is the top level manager
|
||||
PM->setTopLevelManager(PM);
|
||||
}
|
||||
@ -1761,23 +1761,13 @@ void PMStack::pop() {
|
||||
// Push PM on the stack and set its top level manager.
|
||||
void PMStack::push(PMDataManager *PM) {
|
||||
assert(PM && "Unable to push. Pass Manager expected");
|
||||
assert(PM->getDepth()==0 && "Pass Manager depth set too early");
|
||||
|
||||
if (!this->empty()) {
|
||||
assert(PM->getPassManagerType() > this->top()->getPassManagerType()
|
||||
&& "pushing bad pass manager to PMStack");
|
||||
PMTopLevelManager *TPM = this->top()->getTopLevelManager();
|
||||
|
||||
assert(TPM && "Unable to find top level manager");
|
||||
TPM->addIndirectPassManager(PM);
|
||||
PM->setTopLevelManager(TPM);
|
||||
PM->setDepth(this->top()->getDepth()+1);
|
||||
}
|
||||
else {
|
||||
assert(PM->getPassManagerType() == PMT_ModulePassManager
|
||||
|| PM->getPassManagerType() == PMT_FunctionPassManager
|
||||
&& "pushing bad pass manager to PMStack");
|
||||
PM->setDepth(1);
|
||||
}
|
||||
|
||||
S.push_back(PM);
|
||||
@ -1833,7 +1823,7 @@ void FunctionPass::assignPassManager(PMStack &PMS,
|
||||
PMDataManager *PMD = PMS.top();
|
||||
|
||||
// [1] Create new Function Pass Manager
|
||||
FPP = new FPPassManager();
|
||||
FPP = new FPPassManager(PMD->getDepth() + 1);
|
||||
FPP->populateInheritedAnalysis(PMS);
|
||||
|
||||
// [2] Set up new manager's top level manager
|
||||
@ -1870,7 +1860,7 @@ void BasicBlockPass::assignPassManager(PMStack &PMS,
|
||||
PMDataManager *PMD = PMS.top();
|
||||
|
||||
// [1] Create new Basic Block Manager
|
||||
BBP = new BBPassManager();
|
||||
BBP = new BBPassManager(PMD->getDepth() + 1);
|
||||
|
||||
// [2] Set up new manager's top level manager
|
||||
// Basic Block Pass Manager does not live by itself
|
||||
|
Loading…
Reference in New Issue
Block a user