[llvm] r369936 - [Attributor] Further cut down on non-determinism
Johannes Doerfert via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 26 10:51:24 PDT 2019
Author: jdoerfert
Date: Mon Aug 26 10:51:23 2019
New Revision: 369936
URL: http://llvm.org/viewvc/llvm-project?rev=369936&view=rev
Log:
[Attributor] Further cut down on non-determinism
Modified:
llvm/trunk/include/llvm/Transforms/IPO/Attributor.h
llvm/trunk/lib/Transforms/IPO/Attributor.cpp
Modified: llvm/trunk/include/llvm/Transforms/IPO/Attributor.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/IPO/Attributor.h?rev=369936&r1=369935&r2=369936&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/IPO/Attributor.h (original)
+++ llvm/trunk/include/llvm/Transforms/IPO/Attributor.h Mon Aug 26 10:51:23 2019
@@ -97,6 +97,7 @@
#define LLVM_TRANSFORMS_IPO_ATTRIBUTOR_H
#include "llvm/ADT/SetVector.h"
+#include "llvm/ADT/MapVector.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/PassManager.h"
@@ -758,7 +759,7 @@ private:
/// to the getAAFor<...>(...) method.
///{
using QueryMapTy =
- DenseMap<AbstractAttribute *, SetVector<AbstractAttribute *>>;
+ MapVector<AbstractAttribute *, SetVector<AbstractAttribute *>>;
QueryMapTy QueryMap;
///}
@@ -1157,9 +1158,9 @@ struct AAReturnedValues
const function_ref<bool(Value &, const SmallSetVector<ReturnInst *, 4> &)>
&Pred) const = 0;
- using iterator = DenseMap<Value *, SmallSetVector<ReturnInst *, 4>>::iterator;
+ using iterator = MapVector<Value *, SmallSetVector<ReturnInst *, 4>>::iterator;
using const_iterator =
- DenseMap<Value *, SmallSetVector<ReturnInst *, 4>>::const_iterator;
+ MapVector<Value *, SmallSetVector<ReturnInst *, 4>>::const_iterator;
virtual llvm::iterator_range<iterator> returned_values() = 0;
virtual llvm::iterator_range<const_iterator> returned_values() const = 0;
Modified: llvm/trunk/lib/Transforms/IPO/Attributor.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/Attributor.cpp?rev=369936&r1=369935&r2=369936&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/Attributor.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/Attributor.cpp Mon Aug 26 10:51:23 2019
@@ -689,7 +689,7 @@ class AAReturnedValuesImpl : public AARe
/// Mapping of values potentially returned by the associated function to the
/// return instructions that might return them.
- DenseMap<Value *, SmallSetVector<ReturnInst *, 4>> ReturnedValues;
+ MapVector<Value *, SmallSetVector<ReturnInst *, 4>> ReturnedValues;
/// Mapping to remember the number of returned values for a call site such
/// that we can avoid updates if nothing changed.
More information about the llvm-commits
mailing list