diff options
author | Bill Wendling <isanbard@gmail.com> | 2010-07-15 19:41:20 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2010-07-15 19:41:20 +0000 |
commit | e4a4147c877777fddfff50a89cac81a596f1a8ba (patch) | |
tree | 88aba1cd384cb5bfc366a9a219eb2cc9f572f6c4 | |
parent | 20d256e479052590a7d8b93e9aaad66ab6d8af62 (diff) | |
download | external_llvm-e4a4147c877777fddfff50a89cac81a596f1a8ba.zip external_llvm-e4a4147c877777fddfff50a89cac81a596f1a8ba.tar.gz external_llvm-e4a4147c877777fddfff50a89cac81a596f1a8ba.tar.bz2 |
Reserve a goodly amount of room for the vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108448 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/AggressiveAntiDepBreaker.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/AggressiveAntiDepBreaker.cpp b/lib/CodeGen/AggressiveAntiDepBreaker.cpp index 50e5ace..8482774 100644 --- a/lib/CodeGen/AggressiveAntiDepBreaker.cpp +++ b/lib/CodeGen/AggressiveAntiDepBreaker.cpp @@ -42,6 +42,9 @@ DebugMod("agg-antidep-debugmod", AggressiveAntiDepState::AggressiveAntiDepState(const unsigned TargetRegs, MachineBasicBlock *BB) : NumTargetRegs(TargetRegs), GroupNodes(TargetRegs, 0) { + GroupNodeIndices.reserve(TargetRegs); + KillIndices.reserve(TargetRegs); + DefIndices.reserve(TargetRegs); const unsigned BBSize = BB->size(); for (unsigned i = 0; i < NumTargetRegs; ++i) { @@ -54,8 +57,7 @@ AggressiveAntiDepState::AggressiveAntiDepState(const unsigned TargetRegs, } } -unsigned AggressiveAntiDepState::GetGroup(unsigned Reg) -{ +unsigned AggressiveAntiDepState::GetGroup(unsigned Reg) { unsigned Node = GroupNodeIndices[Reg]; while (GroupNodes[Node] != Node) Node = GroupNodes[Node]; |