forked from OSchip/llvm-project
[UnifyLoopExits] Fix non-deterministic iteration order
This was causing random minor codegen differences in shaders compiled with the AMDGPU backend. Differential Revision: https://reviews.llvm.org/D87548
This commit is contained in:
parent
4946802c5f
commit
9a4476072e
|
@ -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 @@ static void restoreSSA(const DominatorTree &DT, const Loop *L,
|
|||
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) {
|
||||
|
|
Loading…
Reference in New Issue