Change the SplitEditor interface to a single instance can be shared for multiple splits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126912 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen
2011-03-03 01:29:13 +00:00
parent 8701768ae2
commit bece06f0c6
3 changed files with 50 additions and 40 deletions
+11 -4
View File
@@ -209,17 +209,24 @@ void SplitAnalysis::analyze(const LiveInterval *li) {
SplitEditor::SplitEditor(SplitAnalysis &sa,
LiveIntervals &lis,
VirtRegMap &vrm,
MachineDominatorTree &mdt,
LiveRangeEdit &edit)
MachineDominatorTree &mdt)
: SA(sa), LIS(lis), VRM(vrm),
MRI(vrm.getMachineFunction().getRegInfo()),
MDT(mdt),
TII(*vrm.getMachineFunction().getTarget().getInstrInfo()),
TRI(*vrm.getMachineFunction().getTarget().getRegisterInfo()),
Edit(&edit),
Edit(0),
OpenIdx(0),
RegAssign(Allocator)
{
{}
void SplitEditor::reset(LiveRangeEdit &lre) {
Edit = &lre;
OpenIdx = 0;
RegAssign.clear();
Values.clear();
LiveOutCache.clear();
// We don't need an AliasAnalysis since we will only be performing
// cheap-as-a-copy remats anyway.
Edit->anyRematerializable(LIS, TII, 0);