diff options
| author | Dan Gohman <gohman@apple.com> | 2010-04-14 17:02:07 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2010-04-14 17:02:07 +0000 |
| commit | 4bfb437ec937ba3fd288e60faf5929ebc2364aaf (patch) | |
| tree | 9e0b9127a722dc1c4fc13825423bc0abf5eeef17 /llvm/lib/CodeGen/SelectionDAG | |
| parent | 1939b5f13048e8cd7006480555d62f317ac55c32 (diff) | |
| download | bcm5719-llvm-4bfb437ec937ba3fd288e60faf5929ebc2364aaf.tar.gz bcm5719-llvm-4bfb437ec937ba3fd288e60faf5929ebc2364aaf.zip | |
Reorgnaize this code to be more tidy and readable.
llvm-svn: 101256
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 4ada8f63415..2f89aa04a9c 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -193,26 +193,21 @@ void SelectionDAGISel::getAnalysisUsage(AnalysisUsage &AU) const { } bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) { - Function &Fn = *mf.getFunction(); - // Do some sanity-checking on the command-line options. assert((!EnableFastISelVerbose || EnableFastISel) && "-fast-isel-verbose requires -fast-isel"); assert((!EnableFastISelAbort || EnableFastISel) && "-fast-isel-abort requires -fast-isel"); - // Get alias analysis for load/store combining. - AA = &getAnalysis<AliasAnalysis>(); - - MF = &mf; + Function &Fn = *mf.getFunction(); const TargetInstrInfo &TII = *TM.getInstrInfo(); const TargetRegisterInfo &TRI = *TM.getRegisterInfo(); - if (Fn.hasGC()) - GFI = &getAnalysis<GCModuleInfo>().getFunctionInfo(Fn); - else - GFI = 0; + MF = &mf; RegInfo = &MF->getRegInfo(); + AA = &getAnalysis<AliasAnalysis>(); + GFI = Fn.hasGC() ? &getAnalysis<GCModuleInfo>().getFunctionInfo(Fn) : 0; + DEBUG(dbgs() << "\n\n\n=== " << Fn.getName() << "\n"); CurDAG->init(*MF); |

