[TableGen] Avoid a couple vector copies in ExpandHwModeBasedTypes.
authorCraig Topper <craig.topper@sifive.com>
Sat, 30 Jan 2021 20:19:14 +0000 (12:19 -0800)
committerCraig Topper <craig.topper@sifive.com>
Sat, 30 Jan 2021 21:16:39 +0000 (13:16 -0800)
commit4e04a535d8f836804d39e8861ae17d7817293c5a
tree13b16f96ecb6a2586c21966284d3c9862109d20c
parent26d38f6d20ff137d89cb7c891b739662de1ca508
[TableGen] Avoid a couple vector copies in ExpandHwModeBasedTypes.

Use vector::swap instead of copying to a local vector and clearing
the original. We can just swap into the just created local vector
instead which will move the pointers and not the data.

Use std::move in another place to avoid a copy.
llvm/utils/TableGen/CodeGenDAGPatterns.cpp