From: Johannes Doerfert Date: Mon, 26 Aug 2019 17:51:23 +0000 (+0000) Subject: [Attributor] Further cut down on non-determinism X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=077bfee769d4f2ddbfbea7cbbf2d0ccb7a5e40c8;p=llvm [Attributor] Further cut down on non-determinism git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369936 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Transforms/IPO/Attributor.h b/include/llvm/Transforms/IPO/Attributor.h index 5929fc4a9ed..bea369a6b51 100644 --- a/include/llvm/Transforms/IPO/Attributor.h +++ b/include/llvm/Transforms/IPO/Attributor.h @@ -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>; + MapVector>; QueryMapTy QueryMap; ///} @@ -1157,9 +1158,9 @@ struct AAReturnedValues const function_ref &)> &Pred) const = 0; - using iterator = DenseMap>::iterator; + using iterator = MapVector>::iterator; using const_iterator = - DenseMap>::const_iterator; + MapVector>::const_iterator; virtual llvm::iterator_range returned_values() = 0; virtual llvm::iterator_range returned_values() const = 0; diff --git a/lib/Transforms/IPO/Attributor.cpp b/lib/Transforms/IPO/Attributor.cpp index a2ea0068bc0..ebe4fba0856 100644 --- a/lib/Transforms/IPO/Attributor.cpp +++ b/lib/Transforms/IPO/Attributor.cpp @@ -689,7 +689,7 @@ class AAReturnedValuesImpl : public AAReturnedValues, public AbstractState { /// Mapping of values potentially returned by the associated function to the /// return instructions that might return them. - DenseMap> ReturnedValues; + MapVector> ReturnedValues; /// Mapping to remember the number of returned values for a call site such /// that we can avoid updates if nothing changed.