[llvm] r177999 - R600: fix DenseMap with pointer key iteration in the structurizer
Christian Konig
christian.koenig at amd.com
Tue Mar 26 03:24:21 PDT 2013
Author: ckoenig
Date: Tue Mar 26 05:24:20 2013
New Revision: 177999
URL: http://llvm.org/viewvc/llvm-project?rev=177999&view=rev
Log:
R600: fix DenseMap with pointer key iteration in the structurizer
Use a MapVector on types where the iteration order matters.
Otherwise we doesn't always produce a deterministic output.
Signed-off-by: Christian König <christian.koenig at amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
Modified:
llvm/trunk/lib/Target/R600/AMDGPUStructurizeCFG.cpp
Modified: llvm/trunk/lib/Target/R600/AMDGPUStructurizeCFG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/AMDGPUStructurizeCFG.cpp?rev=177999&r1=177998&r2=177999&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/AMDGPUStructurizeCFG.cpp (original)
+++ llvm/trunk/lib/Target/R600/AMDGPUStructurizeCFG.cpp Tue Mar 26 05:24:20 2013
@@ -17,6 +17,7 @@
#include "AMDGPU.h"
#include "llvm/ADT/SCCIterator.h"
+#include "llvm/ADT/MapVector.h"
#include "llvm/Analysis/RegionInfo.h"
#include "llvm/Analysis/RegionIterator.h"
#include "llvm/Analysis/RegionPass.h"
@@ -40,13 +41,14 @@ typedef SmallVector<BBValuePair, 2> BBVa
typedef SmallPtrSet<BasicBlock *, 8> BBSet;
-typedef DenseMap<PHINode *, BBValueVector> PhiMap;
+typedef MapVector<PHINode *, BBValueVector> PhiMap;
+typedef MapVector<BasicBlock *, BBVector> BB2BBVecMap;
+
typedef DenseMap<DomTreeNode *, unsigned> DTN2UnsignedMap;
typedef DenseMap<BasicBlock *, PhiMap> BBPhiMap;
typedef DenseMap<BasicBlock *, Value *> BBPredicates;
typedef DenseMap<BasicBlock *, BBPredicates> PredMap;
typedef DenseMap<BasicBlock *, BasicBlock*> BB2BBMap;
-typedef DenseMap<BasicBlock *, BBVector> BB2BBVecMap;
// The name for newly created blocks.
More information about the llvm-commits
mailing list