From 43770272fbebb49cdf152724725b793bc637b3f2 Mon Sep 17 00:00:00 2001 From: Christian Konig Date: Tue, 26 Mar 2013 10:24:20 +0000 Subject: R600: fix DenseMap with pointer key iteration in the structurizer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- lib/Target/R600/AMDGPUStructurizeCFG.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/Target/R600/AMDGPUStructurizeCFG.cpp') diff --git a/lib/Target/R600/AMDGPUStructurizeCFG.cpp b/lib/Target/R600/AMDGPUStructurizeCFG.cpp index b723433c16..dea43b874c 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. -- cgit v1.2.3