Scheduler / Regalloc: use unique_ptr[] instead of std::vector
authorFiona Glaser <escha@apple.com>
Wed, 2 Dec 2015 18:32:59 +0000 (18:32 +0000)
committerFiona Glaser <escha@apple.com>
Wed, 2 Dec 2015 18:32:59 +0000 (18:32 +0000)
commit2b2fb7fbf2a02811f52ebc0a428837927b6f6340
tree987d27b00f5ae4de58d83027f1ef4f5c49ab268d
parent1c2b998913d05c83a781da1a15738ac4c9379f6f
Scheduler / Regalloc: use unique_ptr[] instead of std::vector

vector.resize() is significantly slower than memset in many STLs
and the cost of initializing these vectors is significant on targets
with many registers. Since we don't need the overhead of a vector,
use a simple unique_ptr instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254526 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/MachineRegisterInfo.h
lib/CodeGen/MachineRegisterInfo.cpp
lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp