[PATCH] D74317: [AMDGPU] Fix non-deterministic iteration order

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 10 06:14:36 PST 2020


foad created this revision.
foad added reviewers: arsenm, rampitec, nhaehnle.
Herald added subscribers: llvm-commits, kerbowa, mgrang, hiraditya, t-tye, tpr, dstuttard, yaxunl, wdng, jvesely, kzhuravl.
Herald added a project: LLVM.

As far as I know this did not affect code generation, but it did affect
the order of -debug-only=si-wqm output and the naming of autonamed
values in -print-after=si-wqm output.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74317

Files:
  llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp


Index: llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
+++ llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
@@ -61,6 +61,7 @@
 #include "SIInstrInfo.h"
 #include "SIMachineFunctionInfo.h"
 #include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/MapVector.h"
 #include "llvm/ADT/PostOrderIterator.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/StringRef.h"
@@ -154,7 +155,7 @@
   LiveIntervals *LIS;
 
   DenseMap<const MachineInstr *, InstrInfo> Instructions;
-  DenseMap<MachineBasicBlock *, BlockInfo> Blocks;
+  MapVector<MachineBasicBlock *, BlockInfo> Blocks;
   SmallVector<MachineInstr *, 1> LiveMaskQueries;
   SmallVector<MachineInstr *, 4> LowerToMovInstrs;
   SmallVector<MachineInstr *, 4> LowerToCopyInstrs;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74317.243536.patch
Type: text/x-patch
Size: 831 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200210/831089a5/attachment-0001.bin>


More information about the llvm-commits mailing list