14
14
#ifndef LLVM_ANALYSIS_SCALAREVOLUTIONEXPANDER_H
15
15
#define LLVM_ANALYSIS_SCALAREVOLUTIONEXPANDER_H
16
16
17
+ #include " llvm/ADT/DenseMap.h"
18
+ #include " llvm/ADT/DenseSet.h"
17
19
#include " llvm/ADT/Optional.h"
18
20
#include " llvm/Analysis/ScalarEvolutionExpressions.h"
19
21
#include " llvm/Analysis/ScalarEvolutionNormalization.h"
20
22
#include " llvm/Analysis/TargetFolder.h"
21
23
#include " llvm/IR/IRBuilder.h"
22
24
#include " llvm/IR/ValueHandle.h"
23
- #include < set>
24
25
25
26
namespace llvm {
26
27
class TargetTransformInfo ;
@@ -43,11 +44,12 @@ namespace llvm {
43
44
const char * IVName;
44
45
45
46
// InsertedExpressions caches Values for reuse, so must track RAUW.
46
- std::map<std::pair<const SCEV *, Instruction *>, TrackingVH<Value> >
47
- InsertedExpressions;
47
+ DenseMap<std::pair<const SCEV *, Instruction *>, TrackingVH<Value>>
48
+ InsertedExpressions;
49
+
48
50
// InsertedValues only flags inserted instructions so needs no RAUW.
49
- std::set <AssertingVH<Value> > InsertedValues;
50
- std::set <AssertingVH<Value> > InsertedPostIncValues;
51
+ DenseSet <AssertingVH<Value>> InsertedValues;
52
+ DenseSet <AssertingVH<Value>> InsertedPostIncValues;
51
53
52
54
// / A memoization of the "relevant" loop for a given SCEV.
53
55
DenseMap<const SCEV *, const Loop *> RelevantLoops;
@@ -68,7 +70,7 @@ namespace llvm {
68
70
Instruction *IVIncInsertPos;
69
71
70
72
// / \brief Phis that complete an IV chain. Reuse
71
- std::set <AssertingVH<PHINode> > ChainedPhis;
73
+ DenseSet <AssertingVH<PHINode>> ChainedPhis;
72
74
73
75
// / \brief When true, expressions are expanded in "canonical" form. In
74
76
// / particular, addrecs are expanded as arithmetic based on a canonical
0 commit comments