diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-09-22 20:58:04 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-09-22 20:58:04 +0000 |
commit | bbeeb2a61ea19fbb5449260165b56c40fdc4860b (patch) | |
tree | afd3e364209c9b349e6a70ca3ee71c086ff7297a /lib/CodeGen | |
parent | f74185b80e07d58208b24f0314d94853d48ec9bd (diff) | |
download | external_llvm-bbeeb2a61ea19fbb5449260165b56c40fdc4860b.zip external_llvm-bbeeb2a61ea19fbb5449260165b56c40fdc4860b.tar.gz external_llvm-bbeeb2a61ea19fbb5449260165b56c40fdc4860b.tar.bz2 |
Mark several codegen passes as preserving all analysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56469 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/BranchFolding.cpp | 12 | ||||
-rw-r--r-- | lib/CodeGen/LiveStackAnalysis.cpp | 1 | ||||
-rw-r--r-- | lib/CodeGen/LoopAligner.cpp | 1 | ||||
-rw-r--r-- | lib/CodeGen/LowerSubregs.cpp | 5 | ||||
-rw-r--r-- | lib/CodeGen/MachineModuleInfo.cpp | 5 | ||||
-rw-r--r-- | lib/CodeGen/PrologEpilogInserter.cpp | 5 | ||||
-rw-r--r-- | lib/CodeGen/SimpleRegisterCoalescing.cpp | 4 | ||||
-rw-r--r-- | lib/CodeGen/StackSlotColoring.cpp | 1 |
8 files changed, 26 insertions, 8 deletions
diff --git a/lib/CodeGen/BranchFolding.cpp b/lib/CodeGen/BranchFolding.cpp index 1051dc7..8828265 100644 --- a/lib/CodeGen/BranchFolding.cpp +++ b/lib/CodeGen/BranchFolding.cpp @@ -48,12 +48,12 @@ namespace { struct VISIBILITY_HIDDEN BranchFolder : public MachineFunctionPass { static char ID; explicit BranchFolder(bool defaultEnableTailMerge) : - MachineFunctionPass(&ID) { - switch (FlagEnableTailMerge) { - case cl::BOU_UNSET: EnableTailMerge = defaultEnableTailMerge; break; - case cl::BOU_TRUE: EnableTailMerge = true; break; - case cl::BOU_FALSE: EnableTailMerge = false; break; - } + MachineFunctionPass(&ID) { + switch (FlagEnableTailMerge) { + case cl::BOU_UNSET: EnableTailMerge = defaultEnableTailMerge; break; + case cl::BOU_TRUE: EnableTailMerge = true; break; + case cl::BOU_FALSE: EnableTailMerge = false; break; + } } virtual bool runOnMachineFunction(MachineFunction &MF); diff --git a/lib/CodeGen/LiveStackAnalysis.cpp b/lib/CodeGen/LiveStackAnalysis.cpp index 9358c10..2baf699 100644 --- a/lib/CodeGen/LiveStackAnalysis.cpp +++ b/lib/CodeGen/LiveStackAnalysis.cpp @@ -26,6 +26,7 @@ static RegisterPass<LiveStacks> X("livestacks", "Live Stack Slot Analysis"); void LiveStacks::getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); + MachineFunctionPass::getAnalysisUsage(AU); } void LiveStacks::releaseMemory() { diff --git a/lib/CodeGen/LoopAligner.cpp b/lib/CodeGen/LoopAligner.cpp index 51c6356..906e888 100644 --- a/lib/CodeGen/LoopAligner.cpp +++ b/lib/CodeGen/LoopAligner.cpp @@ -34,6 +34,7 @@ namespace { virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<MachineLoopInfo>(); AU.addPreserved<MachineLoopInfo>(); + AU.setPreservesAll(); MachineFunctionPass::getAnalysisUsage(AU); } }; diff --git a/lib/CodeGen/LowerSubregs.cpp b/lib/CodeGen/LowerSubregs.cpp index 6e115dd..5430d4f 100644 --- a/lib/CodeGen/LowerSubregs.cpp +++ b/lib/CodeGen/LowerSubregs.cpp @@ -30,6 +30,11 @@ namespace { return "Subregister lowering instruction pass"; } + virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.setPreservesAll(); + MachineFunctionPass::getAnalysisUsage(AU); + } + /// runOnMachineFunction - pass entry point bool runOnMachineFunction(MachineFunction&); diff --git a/lib/CodeGen/MachineModuleInfo.cpp b/lib/CodeGen/MachineModuleInfo.cpp index 69f8d3c..9843ff2 100644 --- a/lib/CodeGen/MachineModuleInfo.cpp +++ b/lib/CodeGen/MachineModuleInfo.cpp @@ -2013,6 +2013,11 @@ struct DebugLabelFolder : public MachineFunctionPass { static char ID; DebugLabelFolder() : MachineFunctionPass(&ID) {} + virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.setPreservesAll(); + MachineFunctionPass::getAnalysisUsage(AU); + } + virtual bool runOnMachineFunction(MachineFunction &MF); virtual const char *getPassName() const { return "Label Folder"; } }; diff --git a/lib/CodeGen/PrologEpilogInserter.cpp b/lib/CodeGen/PrologEpilogInserter.cpp index 51d3698..8efef1b 100644 --- a/lib/CodeGen/PrologEpilogInserter.cpp +++ b/lib/CodeGen/PrologEpilogInserter.cpp @@ -41,6 +41,11 @@ namespace { return "Prolog/Epilog Insertion & Frame Finalization"; } + virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.setPreservesAll(); + MachineFunctionPass::getAnalysisUsage(AU); + } + /// runOnMachineFunction - Insert prolog/epilog code and replace abstract /// frame indexes with appropriate references. /// diff --git a/lib/CodeGen/SimpleRegisterCoalescing.cpp b/lib/CodeGen/SimpleRegisterCoalescing.cpp index 8899657..05e0505 100644 --- a/lib/CodeGen/SimpleRegisterCoalescing.cpp +++ b/lib/CodeGen/SimpleRegisterCoalescing.cpp @@ -67,13 +67,13 @@ static RegisterAnalysisGroup<RegisterCoalescer, true/*The Default*/> V(X); const PassInfo *const llvm::SimpleRegisterCoalescingID = &X; void SimpleRegisterCoalescing::getAnalysisUsage(AnalysisUsage &AU) const { + AU.addRequired<LiveIntervals>(); AU.addPreserved<LiveIntervals>(); + AU.addRequired<MachineLoopInfo>(); AU.addPreserved<MachineLoopInfo>(); AU.addPreservedID(MachineDominatorsID); AU.addPreservedID(PHIEliminationID); AU.addPreservedID(TwoAddressInstructionPassID); - AU.addRequired<LiveIntervals>(); - AU.addRequired<MachineLoopInfo>(); MachineFunctionPass::getAnalysisUsage(AU); } diff --git a/lib/CodeGen/StackSlotColoring.cpp b/lib/CodeGen/StackSlotColoring.cpp index ab980a1..1b5d417 100644 --- a/lib/CodeGen/StackSlotColoring.cpp +++ b/lib/CodeGen/StackSlotColoring.cpp @@ -66,6 +66,7 @@ namespace { virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<LiveStacks>(); + AU.setPreservesAll(); MachineFunctionPass::getAnalysisUsage(AU); } |