diff options
author | Bob Wilson <bob.wilson@apple.com> | 2010-07-24 06:01:53 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2010-07-24 06:01:53 +0000 |
commit | f28dd8861190df4926cdc66201a39a6af950d564 (patch) | |
tree | a07e775122873e7024223d22eaad9d5e99c6d11c | |
parent | 2f58485fc87143bb97e3d88dde9ab2d28211cd28 (diff) |
Change ScheduleDAGInstrs::Defs and ::Uses to be variable-size vectors
instead of fixed size arrays, so that increasing FirstVirtualRegister to 16K
won't cause a compile time performance regression.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109330 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/ScheduleDAGInstrs.cpp | 3 | ||||
-rw-r--r-- | lib/CodeGen/ScheduleDAGInstrs.h | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/ScheduleDAGInstrs.cpp b/lib/CodeGen/ScheduleDAGInstrs.cpp index 40670da56e..ea93dd5c66 100644 --- a/lib/CodeGen/ScheduleDAGInstrs.cpp +++ b/lib/CodeGen/ScheduleDAGInstrs.cpp @@ -32,7 +32,8 @@ using namespace llvm; ScheduleDAGInstrs::ScheduleDAGInstrs(MachineFunction &mf, const MachineLoopInfo &mli, const MachineDominatorTree &mdt) - : ScheduleDAG(mf), MLI(mli), MDT(mdt), LoopRegs(MLI, MDT) { + : ScheduleDAG(mf), MLI(mli), MDT(mdt), Defs(TRI->getNumRegs()), + Uses(TRI->getNumRegs()), LoopRegs(MLI, MDT) { MFI = mf.getFrameInfo(); DbgValueVec.clear(); } diff --git a/lib/CodeGen/ScheduleDAGInstrs.h b/lib/CodeGen/ScheduleDAGInstrs.h index d90659bb16..c8f543f714 100644 --- a/lib/CodeGen/ScheduleDAGInstrs.h +++ b/lib/CodeGen/ScheduleDAGInstrs.h @@ -106,8 +106,8 @@ namespace llvm { /// are as we iterate upward through the instructions. This is allocated /// here instead of inside BuildSchedGraph to avoid the need for it to be /// initialized and destructed for each block. - std::vector<SUnit *> Defs[TargetRegisterInfo::FirstVirtualRegister]; - std::vector<SUnit *> Uses[TargetRegisterInfo::FirstVirtualRegister]; + std::vector<std::vector<SUnit *> > Defs; + std::vector<std::vector<SUnit *> > Uses; /// DbgValueVec - Remember DBG_VALUEs that refer to a particular /// register. |