[TableGen] Re-work FactorNodes to avoid an extra temporary vector.
authorCraig Topper <craig.topper@sifive.com>
Sun, 23 Apr 2023 04:04:55 +0000 (21:04 -0700)
committerCraig Topper <craig.topper@sifive.com>
Sun, 23 Apr 2023 04:04:55 +0000 (21:04 -0700)
commitd28018709375808ea147e66d96af1e81fd9fe8a6
treef832320e376076d645e1fa961d70c79ac29c0949
parent8e3a5a965a14f3d40c0ef07456e244509358abd7
[TableGen] Re-work FactorNodes to avoid an extra temporary vector.

Instead of copying elements to the NewOptionsToMatchVector, we
now shift down elements in OptionsToMatch as we create holes by
pulling out equal matchers. After we finish processing the vector,
we'll trim the size to just the elements that are still in use.
llvm/utils/TableGen/DAGISelMatcher.h
llvm/utils/TableGen/DAGISelMatcherOpt.cpp