Skip to content

Commit 74519ed

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. (cherry picked from commit c300a99)
1 parent 7adf2b4 commit 74519ed

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
@@ -1596,7 +1596,7 @@ class LoopVectorizationCostModel {
15961596
/// presence of a cost for an instruction in the mapping indicates that the
15971597
/// instruction will be scalarized when vectorizing with the associated
15981598
/// vectorization factor. The entries are VF-ScalarCostTy pairs.
1599-
DenseMap<ElementCount, ScalarCostsTy> InstsToScalarize;
1599+
MapVector<ElementCount, ScalarCostsTy> InstsToScalarize;
16001600

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

0 commit comments

Comments
 (0)