forked from OSchip/llvm-project
Move a DenseMap's declaration outside of a loop, and just call
clear() on each iteration. This avoids allocating and deallocating all of DenseMap's memory on each iteration. llvm-svn: 52642
This commit is contained in:
parent
29a8220501
commit
fa63cc4e91
|
@ -953,10 +953,11 @@ void ScheduleDAGRRList::ListScheduleBottomUp() {
|
||||||
// While Available queue is not empty, grab the node with the highest
|
// While Available queue is not empty, grab the node with the highest
|
||||||
// priority. If it is not ready put it back. Schedule the node.
|
// priority. If it is not ready put it back. Schedule the node.
|
||||||
SmallVector<SUnit*, 4> NotReady;
|
SmallVector<SUnit*, 4> NotReady;
|
||||||
|
DenseMap<SUnit*, SmallVector<unsigned, 4> > LRegsMap;
|
||||||
Sequence.reserve(SUnits.size());
|
Sequence.reserve(SUnits.size());
|
||||||
while (!AvailableQueue->empty()) {
|
while (!AvailableQueue->empty()) {
|
||||||
bool Delayed = false;
|
bool Delayed = false;
|
||||||
DenseMap<SUnit*, SmallVector<unsigned, 4> > LRegsMap;
|
LRegsMap.clear();
|
||||||
SUnit *CurSU = AvailableQueue->pop();
|
SUnit *CurSU = AvailableQueue->pop();
|
||||||
while (CurSU) {
|
while (CurSU) {
|
||||||
if (CurSU->CycleBound <= CurCycle) {
|
if (CurSU->CycleBound <= CurCycle) {
|
||||||
|
|
Loading…
Reference in New Issue