Skip to content

Commit

Permalink
[SCCP] fix non-determinism (llvm#105758)
Browse files Browse the repository at this point in the history
the visit order depended on hashing because we iterated over a
SmallPtrSet
  • Loading branch information
fmayer authored Aug 23, 2024
1 parent 0bf5846 commit aec3ec0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion llvm/lib/Transforms/Utils/SCCPSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
//===----------------------------------------------------------------------===//

#include "llvm/Transforms/Utils/SCCPSolver.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/Analysis/ConstantFolding.h"
#include "llvm/Analysis/InstructionSimplify.h"
#include "llvm/Analysis/ValueLattice.h"
Expand Down Expand Up @@ -418,7 +419,7 @@ class SCCPInstVisitor : public InstVisitor<SCCPInstVisitor> {

DenseMap<Function *, std::unique_ptr<PredicateInfo>> FnPredicateInfo;

DenseMap<Value *, SmallPtrSet<User *, 2>> AdditionalUsers;
DenseMap<Value *, SmallSetVector<User *, 2>> AdditionalUsers;

LLVMContext &Ctx;

Expand Down

0 comments on commit aec3ec0

Please sign in to comment.