[PATCH] D70783: AMDGPU: Fixed indeterminate map iteration in SIPeepholeSDWA

Tim Renouf via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 2 04:12:24 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rG3d5ba7c60f39: AMDGPU: Fixed indeterminate map iteration in SIPeepholeSDWA (authored by tpr).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70783/new/

https://reviews.llvm.org/D70783

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


Index: llvm/lib/Target/AMDGPU/SIPeepholeSDWA.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/SIPeepholeSDWA.cpp
+++ llvm/lib/Target/AMDGPU/SIPeepholeSDWA.cpp
@@ -26,6 +26,7 @@
 #include "SIRegisterInfo.h"
 #include "MCTargetDesc/AMDGPUMCTargetDesc.h"
 #include "Utils/AMDGPUBaseInfo.h"
+#include "llvm/ADT/MapVector.h"
 #include "llvm/ADT/None.h"
 #include "llvm/ADT/Optional.h"
 #include "llvm/ADT/STLExtras.h"
@@ -73,8 +74,8 @@
   const SIRegisterInfo *TRI;
   const SIInstrInfo *TII;
 
-  std::unordered_map<MachineInstr *, std::unique_ptr<SDWAOperand>> SDWAOperands;
-  std::unordered_map<MachineInstr *, SDWAOperandsVector> PotentialMatches;
+  MapVector<MachineInstr *, std::unique_ptr<SDWAOperand>> SDWAOperands;
+  MapVector<MachineInstr *, SDWAOperandsVector> PotentialMatches;
   SmallVector<MachineInstr *, 8> ConvertedInstructions;
 
   Optional<int64_t> foldToImm(const MachineOperand &Op) const;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70783.231671.patch
Type: text/x-patch
Size: 961 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191202/9bc46591/attachment.bin>


More information about the llvm-commits mailing list