[PATCH] D87548: [UnifyLoopExits] Fix non-deterministic iteration order
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 11 14:04:51 PDT 2020
foad created this revision.
foad added a reviewer: sameerds.
Herald added subscribers: llvm-commits, mgrang, hiraditya, tpr.
Herald added a project: LLVM.
foad requested review of this revision.
This was causing random minor codegen differences in shaders compiled
with the AMDGPU backend.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D87548
Files:
llvm/lib/Transforms/Utils/UnifyLoopExits.cpp
Index: llvm/lib/Transforms/Utils/UnifyLoopExits.cpp
===================================================================
--- llvm/lib/Transforms/Utils/UnifyLoopExits.cpp
+++ llvm/lib/Transforms/Utils/UnifyLoopExits.cpp
@@ -16,6 +16,7 @@
//
//===----------------------------------------------------------------------===//
+#include "llvm/ADT/MapVector.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/IR/Dominators.h"
#include "llvm/InitializePasses.h"
@@ -80,7 +81,7 @@
const SetVector<BasicBlock *> &Incoming,
BasicBlock *LoopExitBlock) {
using InstVector = SmallVector<Instruction *, 8>;
- using IIMap = DenseMap<Instruction *, InstVector>;
+ using IIMap = MapVector<Instruction *, InstVector>;
IIMap ExternalUsers;
for (auto BB : L->blocks()) {
for (auto &I : *BB) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87548.291333.patch
Type: text/x-patch
Size: 845 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200911/3645e54a/attachment.bin>
More information about the llvm-commits
mailing list