diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-10-28 20:34:50 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-10-28 20:34:50 +0000 |
commit | d68f458244b9d9a6644a9550dd5cee60331c9e7d (patch) | |
tree | be0b854b155d5095eeb52ab05922ec2a16742ad2 /lib/CodeGen/InlineSpiller.cpp | |
parent | 26b92be9222e267447efe943f12848775075e22f (diff) |
Make MachineDominators available for SplitEditor. We are going to need it for
proper SSA updating.
This doesn't cause MachineDominators to be recomputed since we are already
requiring MachineLoopInfo which uses dominators as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117598 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/InlineSpiller.cpp')
-rw-r--r-- | lib/CodeGen/InlineSpiller.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/CodeGen/InlineSpiller.cpp b/lib/CodeGen/InlineSpiller.cpp index 73980f38b9..05aa388657 100644 --- a/lib/CodeGen/InlineSpiller.cpp +++ b/lib/CodeGen/InlineSpiller.cpp @@ -19,6 +19,7 @@ #include "VirtRegMap.h" #include "llvm/CodeGen/LiveIntervalAnalysis.h" #include "llvm/CodeGen/LiveStackAnalysis.h" +#include "llvm/CodeGen/MachineDominators.h" #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineLoopInfo.h" @@ -40,6 +41,7 @@ class InlineSpiller : public Spiller { MachineFunction &mf_; LiveIntervals &lis_; LiveStacks &lss_; + MachineDominatorTree &mdt_; MachineLoopInfo &loops_; VirtRegMap &vrm_; MachineFrameInfo &mfi_; @@ -68,6 +70,7 @@ public: mf_(mf), lis_(pass.getAnalysis<LiveIntervals>()), lss_(pass.getAnalysis<LiveStacks>()), + mdt_(pass.getAnalysis<MachineDominatorTree>()), loops_(pass.getAnalysis<MachineLoopInfo>()), vrm_(vrm), mfi_(*mf.getFrameInfo()), @@ -112,7 +115,7 @@ bool InlineSpiller::split() { // Try splitting around loops. if (const MachineLoop *loop = splitAnalysis_.getBestSplitLoop()) { - SplitEditor(splitAnalysis_, lis_, vrm_, *edit_) + SplitEditor(splitAnalysis_, lis_, vrm_, mdt_, *edit_) .splitAroundLoop(loop); return true; } @@ -120,14 +123,14 @@ bool InlineSpiller::split() { // Try splitting into single block intervals. SplitAnalysis::BlockPtrSet blocks; if (splitAnalysis_.getMultiUseBlocks(blocks)) { - SplitEditor(splitAnalysis_, lis_, vrm_, *edit_) + SplitEditor(splitAnalysis_, lis_, vrm_, mdt_, *edit_) .splitSingleBlocks(blocks); return true; } // Try splitting inside a basic block. if (const MachineBasicBlock *MBB = splitAnalysis_.getBlockForInsideSplit()) { - SplitEditor(splitAnalysis_, lis_, vrm_, *edit_) + SplitEditor(splitAnalysis_, lis_, vrm_, mdt_, *edit_) .splitInsideBlock(MBB); return true; } |