[LoopVectorize] Use MapVector rather than DenseMap for MinBWs.
authorCharlie Turner <charlie.turner@arm.com>
Thu, 26 Nov 2015 20:39:51 +0000 (20:39 +0000)
committerCharlie Turner <charlie.turner@arm.com>
Thu, 26 Nov 2015 20:39:51 +0000 (20:39 +0000)
commitc8dc70b58428df59c331f68543bc025d56d368f6
treec45851ba493ce23e79d42d7a344ddb2f8222e21e
parentd647d4ba0fbbdd4c0c0de97352a67a083e454726
[LoopVectorize] Use MapVector rather than DenseMap for MinBWs.

The order in which instructions are truncated in truncateToMinimalBitwidths
effects code generation. Switch to a map with a determinisic order, since the
iteration order over a DenseMap is not defined.

This code is not hot, so the difference in container performance isn't
interesting.

Many thanks to David Blaikie for making me aware of MapVector!

Fixes PR25490.

Differential Revision: http://reviews.llvm.org/D14981

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254179 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/VectorUtils.h
lib/Analysis/VectorUtils.cpp
lib/Transforms/Vectorize/LoopVectorize.cpp
test/Transforms/LoopVectorize/AArch64/deterministic-type-shrinkage.ll [new file with mode: 0644]