Skip to content

Commit c300a99

Browse files
committed
[LV] Use MapVector for InstsToScalarize for deterministic iter order (NFC)
We iterate over InstsToScalarize when printing costs, and currently the iteration order is not deterministic. Currently no tests check the output with multiple instructions in InstsToScalarize, but those will come soon.
1 parent e0fa656 commit c300a99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1624,7 +1624,7 @@ class LoopVectorizationCostModel {
16241624
/// presence of a cost for an instruction in the mapping indicates that the
16251625
/// instruction will be scalarized when vectorizing with the associated
16261626
/// vectorization factor. The entries are VF-ScalarCostTy pairs.
1627-
DenseMap<ElementCount, ScalarCostsTy> InstsToScalarize;
1627+
MapVector<ElementCount, ScalarCostsTy> InstsToScalarize;
16281628

16291629
/// Holds the instructions known to be uniform after vectorization.
16301630
/// The data is collected per VF.

0 commit comments

Comments
 (0)