[ConstraintSystem] Remove last variable, use move instead of copy. (NFC)
At the moment, a large amount of time is spent construction vectors by pushing back all elements except the first variable. For large inputs, such as discussed in https://reviews.llvm.org/D135915#4057050 this can result in excessive compile-time. Instead, it is more efficient to remove the last variable. Then the original vector can be re-used by simply popping the last element and then moving the contents to the new system. This improves time spent in ConstraintElimination for the linked reproducer from ~43s to ~3s.
Loading
Please sign in to comment