LoopVectorize: Use SetVector for the access set
authorArnold Schwaighofer <aschwaighofer@apple.com>
Mon, 24 Jun 2013 12:09:12 +0000 (12:09 +0000)
committerArnold Schwaighofer <aschwaighofer@apple.com>
Mon, 24 Jun 2013 12:09:12 +0000 (12:09 +0000)
We are creating the runtime checks using this set so we need a deterministic
iteration order.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184723 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Vectorize/LoopVectorize.cpp

index 67c4e42db63fdddd6c619da7865233981c4b1a46..2a8380613e0c0f9398c1442d90eaad6a0d2d06a4 100644 (file)
@@ -49,6 +49,7 @@
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/EquivalenceClasses.h"
 #include "llvm/ADT/MapVector.h"
+#include "llvm/ADT/SetVector.h"
 #include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/ADT/SmallSet.h"
 #include "llvm/ADT/SmallVector.h"
@@ -2888,7 +2889,7 @@ public:
   DenseSet<MemAccessInfo> &getDependenciesToCheck() { return CheckDeps; }
 
 private:
-  typedef DenseSet<MemAccessInfo> PtrAccessSet;
+  typedef SetVector<MemAccessInfo> PtrAccessSet;
   typedef DenseMap<Value*, MemAccessInfo> UnderlyingObjToAccessMap;
 
   /// \brief Go over all memory access or only the deferred ones if