Replace another std::set in the core of CodeGenRegister, this time with sorted arrays.
authorOwen Anderson <resistor@mac.com>
Sat, 31 Jan 2015 09:13:36 +0000 (09:13 +0000)
committerOwen Anderson <resistor@mac.com>
Sat, 31 Jan 2015 09:13:36 +0000 (09:13 +0000)
commitbe2edf30e4fab6ced3e505352c1b2cad31f6cbf5
tree29b9043bb8125c0879a34de9fe320a264ab77c18
parentda798ddba50c97d4719a71697db059260dd3bc45
Replace another std::set in the core of CodeGenRegister, this time with sorted arrays.

The hot path through this region of code does lots of batch inserts into sets. By storing them as sorted arrays, we can defer the sorting to the end of the batch, which is dramatically more efficient. This reduces tblgen runtime by 25% on my worst-case target.

llvm-svn: 227682
llvm/utils/TableGen/CodeGenRegisters.cpp
llvm/utils/TableGen/CodeGenRegisters.h
llvm/utils/TableGen/RegisterInfoEmitter.cpp