diff options
author | Andrew Trick <atrick@apple.com> | 2013-08-23 17:48:33 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2013-08-23 17:48:33 +0000 |
commit | d2763f6ce62eaa497e944331668414e35f3712f3 (patch) | |
tree | 99dad54e1dfa9dddf225602e60e9ee031b74769e /lib/CodeGen/ScheduleDAGInstrs.cpp | |
parent | f89c7498706185ef7cd974fa3459f2cbdcfba73e (diff) | |
download | llvm-d2763f6ce62eaa497e944331668414e35f3712f3.tar.gz llvm-d2763f6ce62eaa497e944331668414e35f3712f3.tar.bz2 llvm-d2763f6ce62eaa497e944331668414e35f3712f3.tar.xz |
mi-sched: Don't call MBB.size() in initSUnits. The driver already has instr count.
This fixes a pathological compile time problem with very large blocks
and lots of scheduling boundaries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189116 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/ScheduleDAGInstrs.cpp')
-rw-r--r-- | lib/CodeGen/ScheduleDAGInstrs.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/ScheduleDAGInstrs.cpp b/lib/CodeGen/ScheduleDAGInstrs.cpp index 892903c238..b0245d5c3c 100644 --- a/lib/CodeGen/ScheduleDAGInstrs.cpp +++ b/lib/CodeGen/ScheduleDAGInstrs.cpp @@ -178,11 +178,11 @@ void ScheduleDAGInstrs::finishBlock() { void ScheduleDAGInstrs::enterRegion(MachineBasicBlock *bb, MachineBasicBlock::iterator begin, MachineBasicBlock::iterator end, - unsigned endcount) { + unsigned regioninstrs) { assert(bb == BB && "startBlock should set BB"); RegionBegin = begin; RegionEnd = end; - EndIndex = endcount; + NumRegionInstrs = regioninstrs; MISUnitMap.clear(); ScheduleDAG::clearDAG(); @@ -664,7 +664,7 @@ void addChainDependency (AliasAnalysis *AA, const MachineFrameInfo *MFI, void ScheduleDAGInstrs::initSUnits() { // We'll be allocating one SUnit for each real instruction in the region, // which is contained within a basic block. - SUnits.reserve(BB->size()); + SUnits.reserve(NumRegionInstrs); for (MachineBasicBlock::iterator I = RegionBegin; I != RegionEnd; ++I) { MachineInstr *MI = I; |