From: Christian Konig Date: Tue, 26 Mar 2013 10:24:20 +0000 (+0000) Subject: R600: fix DenseMap with pointer key iteration in the structurizer X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=43770272fbebb49cdf152724725b793bc637b3f2;p=oota-llvm.git 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 Reviewed-by: Michel Dänzer git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177999 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/R600/AMDGPUStructurizeCFG.cpp b/lib/Target/R600/AMDGPUStructurizeCFG.cpp index b723433c161..dea43b874c6 100644 --- a/lib/Target/R600/AMDGPUStructurizeCFG.cpp +++ b/lib/Target/R600/AMDGPUStructurizeCFG.cpp @@ -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 BBValueVector; typedef SmallPtrSet BBSet; -typedef DenseMap PhiMap; +typedef MapVector PhiMap; +typedef MapVector BB2BBVecMap; + typedef DenseMap DTN2UnsignedMap; typedef DenseMap BBPhiMap; typedef DenseMap BBPredicates; typedef DenseMap PredMap; typedef DenseMap BB2BBMap; -typedef DenseMap BB2BBVecMap; // The name for newly created blocks.