From: Benjamin Kramer Date: Wed, 19 Dec 2012 11:09:15 +0000 (+0000) Subject: LoopVectorize: Make iteration over induction variables not depend on pointer values. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8b7c89f2d49dbce6832ba89b991a7134769e84fc;p=oota-llvm.git LoopVectorize: Make iteration over induction variables not depend on pointer values. MapVector is a bit heavyweight, but I don't see a simpler way. Also the InductionList is unlikely to be large. This should help 3-stage selfhost compares (PR14647). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170528 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Vectorize/LoopVectorize.h b/lib/Transforms/Vectorize/LoopVectorize.h index e5ef29052e2..cae1093a558 100644 --- a/lib/Transforms/Vectorize/LoopVectorize.h +++ b/lib/Transforms/Vectorize/LoopVectorize.h @@ -47,12 +47,12 @@ #define LV_NAME "loop-vectorize" #define DEBUG_TYPE LV_NAME -#include "llvm/Analysis/ScalarEvolution.h" -#include "llvm/ADT/SmallVector.h" #include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/MapVector.h" #include "llvm/ADT/SmallPtrSet.h" +#include "llvm/ADT/SmallVector.h" +#include "llvm/Analysis/ScalarEvolution.h" #include "llvm/IRBuilder.h" - #include using namespace llvm; @@ -304,7 +304,7 @@ public: /// InductionList saves induction variables and maps them to the /// induction descriptor. - typedef DenseMap InductionList; + typedef MapVector InductionList; /// Returns true if it is legal to vectorize this loop. /// This does not mean that it is profitable to vectorize this