mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
Use setPreservesAll and setPreservesCFG in CodeGen passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77754 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a3477fe06d
commit
845012e6d3
@ -169,6 +169,7 @@ void AsmPrinter::SwitchToSection(const MCSection *NS) {
|
||||
}
|
||||
|
||||
void AsmPrinter::getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.setPreservesAll();
|
||||
MachineFunctionPass::getAnalysisUsage(AU);
|
||||
AU.addRequired<GCModuleInfo>();
|
||||
}
|
||||
|
@ -67,6 +67,7 @@ char LiveIntervals::ID = 0;
|
||||
static RegisterPass<LiveIntervals> X("liveintervals", "Live Interval Analysis");
|
||||
|
||||
void LiveIntervals::getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.setPreservesCFG();
|
||||
AU.addRequired<AliasAnalysis>();
|
||||
AU.addPreserved<AliasAnalysis>();
|
||||
AU.addPreserved<LiveVariables>();
|
||||
|
@ -39,6 +39,7 @@ namespace {
|
||||
}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.setPreservesCFG();
|
||||
AU.addPreservedID(MachineLoopInfoID);
|
||||
AU.addPreservedID(MachineDominatorsID);
|
||||
MachineFunctionPass::getAnalysisUsage(AU);
|
||||
|
@ -306,6 +306,7 @@ struct DebugLabelFolder : public MachineFunctionPass {
|
||||
DebugLabelFolder() : MachineFunctionPass(&ID) {}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.setPreservesCFG();
|
||||
AU.addPreservedID(MachineLoopInfoID);
|
||||
AU.addPreservedID(MachineDominatorsID);
|
||||
MachineFunctionPass::getAnalysisUsage(AU);
|
||||
|
@ -40,6 +40,7 @@ namespace {
|
||||
virtual bool runOnMachineFunction(MachineFunction &MF);
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.setPreservesCFG();
|
||||
MachineFunctionPass::getAnalysisUsage(AU);
|
||||
AU.addRequired<MachineDominatorTree>();
|
||||
AU.addPreserved<MachineDominatorTree>();
|
||||
|
@ -41,11 +41,12 @@ X("phi-node-elimination", "Eliminate PHI nodes for register allocation");
|
||||
const PassInfo *const llvm::PHIEliminationID = &X;
|
||||
|
||||
void llvm::PHIElimination::getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addPreserved<LiveVariables>();
|
||||
AU.addPreservedID(MachineLoopInfoID);
|
||||
AU.addPreservedID(MachineDominatorsID);
|
||||
MachineFunctionPass::getAnalysisUsage(AU);
|
||||
}
|
||||
AU.setPreservesCFG();
|
||||
AU.addPreserved<LiveVariables>();
|
||||
AU.addPreservedID(MachineLoopInfoID);
|
||||
AU.addPreservedID(MachineDominatorsID);
|
||||
MachineFunctionPass::getAnalysisUsage(AU);
|
||||
}
|
||||
|
||||
bool llvm::PHIElimination::runOnMachineFunction(MachineFunction &Fn) {
|
||||
MRI = &Fn.getRegInfo();
|
||||
|
@ -59,6 +59,7 @@ namespace {
|
||||
PostRAScheduler() : MachineFunctionPass(&ID) {}
|
||||
|
||||
void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.setPreservesCFG();
|
||||
AU.addRequired<MachineDominatorTree>();
|
||||
AU.addPreserved<MachineDominatorTree>();
|
||||
AU.addRequired<MachineLoopInfo>();
|
||||
|
@ -92,6 +92,7 @@ namespace {
|
||||
virtual bool runOnMachineFunction(MachineFunction &MF);
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.setPreservesCFG();
|
||||
AU.addRequired<LiveIntervals>();
|
||||
AU.addPreserved<LiveIntervals>();
|
||||
AU.addRequired<LiveStacks>();
|
||||
|
@ -111,6 +111,7 @@ bool PEI::runOnMachineFunction(MachineFunction &Fn) {
|
||||
|
||||
#if 0
|
||||
void PEI::getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.setPreservesCFG();
|
||||
if (ShrinkWrapping || ShrinkWrapFunc != "") {
|
||||
AU.addRequired<MachineLoopInfo>();
|
||||
AU.addRequired<MachineDominatorTree>();
|
||||
|
@ -145,6 +145,7 @@ namespace {
|
||||
}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.setPreservesCFG();
|
||||
AU.addRequired<LiveIntervals>();
|
||||
if (StrongPHIElim)
|
||||
AU.addRequiredID(StrongPHIEliminationID);
|
||||
|
@ -153,6 +153,7 @@ namespace {
|
||||
}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.setPreservesCFG();
|
||||
AU.addRequiredID(PHIEliminationID);
|
||||
AU.addRequiredID(TwoAddressInstructionPassID);
|
||||
MachineFunctionPass::getAnalysisUsage(AU);
|
||||
|
@ -77,15 +77,16 @@ namespace {
|
||||
}
|
||||
|
||||
//! PBQP analysis usage.
|
||||
virtual void getAnalysisUsage(AnalysisUsage &au) const {
|
||||
au.addRequired<LiveIntervals>();
|
||||
au.addRequiredTransitive<RegisterCoalescer>();
|
||||
au.addRequired<LiveStacks>();
|
||||
au.addPreserved<LiveStacks>();
|
||||
au.addRequired<MachineLoopInfo>();
|
||||
au.addPreserved<MachineLoopInfo>();
|
||||
au.addRequired<VirtRegMap>();
|
||||
MachineFunctionPass::getAnalysisUsage(au);
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.setPreservesCFG();
|
||||
AU.addRequired<LiveIntervals>();
|
||||
AU.addRequiredTransitive<RegisterCoalescer>();
|
||||
AU.addRequired<LiveStacks>();
|
||||
AU.addPreserved<LiveStacks>();
|
||||
AU.addRequired<MachineLoopInfo>();
|
||||
AU.addPreserved<MachineLoopInfo>();
|
||||
AU.addRequired<VirtRegMap>();
|
||||
MachineFunctionPass::getAnalysisUsage(AU);
|
||||
}
|
||||
|
||||
//! Perform register allocation
|
||||
|
@ -70,6 +70,7 @@ namespace {
|
||||
bool runOnMachineFunction(MachineFunction &Fn);
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.setPreservesCFG();
|
||||
AU.addRequiredID(PHIEliminationID); // Eliminate PHI nodes
|
||||
MachineFunctionPass::getAnalysisUsage(AU);
|
||||
}
|
||||
|
@ -76,6 +76,7 @@ static RegisterAnalysisGroup<RegisterCoalescer, true/*The Default*/> V(X);
|
||||
const PassInfo *const llvm::SimpleRegisterCoalescingID = &X;
|
||||
|
||||
void SimpleRegisterCoalescing::getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.setPreservesCFG();
|
||||
AU.addRequired<LiveIntervals>();
|
||||
AU.addPreserved<LiveIntervals>();
|
||||
AU.addRequired<MachineLoopInfo>();
|
||||
|
@ -97,6 +97,7 @@ namespace {
|
||||
MachineFunctionPass(&ID), ColorWithRegs(RegColor), NextColor(-1) {}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.setPreservesCFG();
|
||||
AU.addRequired<LiveStacks>();
|
||||
AU.addRequired<VirtRegMap>();
|
||||
AU.addPreserved<VirtRegMap>();
|
||||
|
@ -71,6 +71,7 @@ namespace {
|
||||
bool runOnMachineFunction(MachineFunction &Fn);
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.setPreservesCFG();
|
||||
AU.addRequired<MachineDominatorTree>();
|
||||
AU.addRequired<LiveIntervals>();
|
||||
|
||||
|
@ -113,6 +113,7 @@ namespace {
|
||||
TwoAddressInstructionPass() : MachineFunctionPass(&ID) {}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.setPreservesCFG();
|
||||
AU.addPreserved<LiveVariables>();
|
||||
AU.addPreservedID(MachineLoopInfoID);
|
||||
AU.addPreservedID(MachineDominatorsID);
|
||||
|
Loading…
Reference in New Issue
Block a user