Skip to content

Commit b467043

Browse files
committed
[ConstraintSystem] Pass ArrayRef instead of full small vector (NFC).
This makes the called functions independent of the container type.
1 parent 1f0aadf commit b467043

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/include/llvm/Analysis/ConstraintSystem.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class ConstraintSystem {
3636
bool mayHaveSolutionImpl();
3737

3838
public:
39-
bool addVariableRow(const SmallVector<int64_t, 8> &R) {
39+
bool addVariableRow(ArrayRef<int64_t> R) {
4040
assert(Constraints.empty() || R.size() == Constraints.back().size());
4141
// If all variable coefficients are 0, the constraint does not provide any
4242
// usable information.
@@ -48,11 +48,11 @@ class ConstraintSystem {
4848
GCD = APIntOps::GreatestCommonDivisor({32, (uint32_t)A}, {32, GCD})
4949
.getZExtValue();
5050
}
51-
Constraints.push_back(R);
51+
Constraints.emplace_back(R.begin(), R.end());
5252
return true;
5353
}
5454

55-
bool addVariableRowFill(const SmallVector<int64_t, 8> &R) {
55+
bool addVariableRowFill(ArrayRef<int64_t> R) {
5656
for (auto &CR : Constraints) {
5757
while (CR.size() != R.size())
5858
CR.push_back(0);

0 commit comments

Comments
 (0)