@@ -27,26 +27,26 @@ namespace {
27
27
// / A key used for the AliasAnalysis cache.
28
28
// /
29
29
// / This struct represents the argument list to the method 'alias'. The two
30
- // / SILValue pointers are mapped to size_t indices because we need an
30
+ // / SILValue pointers are mapped to integer indices because we need an
31
31
// / efficient way to invalidate them (the mechanism is described below). The
32
32
// / Type arguments are translated to void* because their underlying storage is
33
33
// / opaque pointers that never goes away.
34
34
struct AliasKeyTy {
35
35
// The SILValue pair:
36
- size_t V1, V2;
36
+ swift::ValueIndexTy V1, V2;
37
37
// The TBAAType pair:
38
38
void *T1, *T2;
39
39
};
40
40
41
41
// / A key used for the MemoryBehavior Analysis cache.
42
42
// /
43
- // / The two SILValue pointers are mapped to size_t indices because we need an
43
+ // / The two SILValue pointers are mapped to integer indices because we need an
44
44
// / efficient way to invalidate them (the mechanism is described below). The
45
45
// / RetainObserveKind represents the inspection mode for the memory behavior
46
46
// / analysis.
47
47
struct MemBehaviorKeyTy {
48
48
// The SILValue pair:
49
- size_t V1, V2;
49
+ swift::ValueIndexTy V1, V2;
50
50
};
51
51
}
52
52
@@ -276,17 +276,17 @@ SILType computeTBAAType(SILValue V);
276
276
namespace llvm {
277
277
template <> struct DenseMapInfo <AliasKeyTy> {
278
278
static inline AliasKeyTy getEmptyKey () {
279
- auto Allone = std::numeric_limits<size_t >::max ();
279
+ auto Allone = std::numeric_limits<swift::ValueIndexTy >::max ();
280
280
return {0 , Allone, nullptr , nullptr };
281
281
}
282
282
static inline AliasKeyTy getTombstoneKey () {
283
- auto Allone = std::numeric_limits<size_t >::max ();
283
+ auto Allone = std::numeric_limits<swift::ValueIndexTy >::max ();
284
284
return {Allone, 0 , nullptr , nullptr };
285
285
}
286
286
static unsigned getHashValue (const AliasKeyTy Val) {
287
287
unsigned H = 0 ;
288
- H ^= DenseMapInfo<size_t >::getHashValue (Val.V1 );
289
- H ^= DenseMapInfo<size_t >::getHashValue (Val.V2 );
288
+ H ^= DenseMapInfo<swift::ValueIndexTy >::getHashValue (Val.V1 );
289
+ H ^= DenseMapInfo<swift::ValueIndexTy >::getHashValue (Val.V2 );
290
290
H ^= DenseMapInfo<void *>::getHashValue (Val.T1 );
291
291
H ^= DenseMapInfo<void *>::getHashValue (Val.T2 );
292
292
return H;
@@ -301,17 +301,17 @@ namespace llvm {
301
301
302
302
template <> struct DenseMapInfo <MemBehaviorKeyTy> {
303
303
static inline MemBehaviorKeyTy getEmptyKey () {
304
- auto Allone = std::numeric_limits<size_t >::max ();
304
+ auto Allone = std::numeric_limits<swift::ValueIndexTy >::max ();
305
305
return {0 , Allone};
306
306
}
307
307
static inline MemBehaviorKeyTy getTombstoneKey () {
308
- auto Allone = std::numeric_limits<size_t >::max ();
308
+ auto Allone = std::numeric_limits<swift::ValueIndexTy >::max ();
309
309
return {Allone, 0 };
310
310
}
311
311
static unsigned getHashValue (const MemBehaviorKeyTy V) {
312
312
unsigned H = 0 ;
313
- H ^= DenseMapInfo<size_t >::getHashValue (V.V1 );
314
- H ^= DenseMapInfo<size_t >::getHashValue (V.V2 );
313
+ H ^= DenseMapInfo<swift::ValueIndexTy >::getHashValue (V.V1 );
314
+ H ^= DenseMapInfo<swift::ValueIndexTy >::getHashValue (V.V2 );
315
315
return H;
316
316
}
317
317
static bool isEqual (const MemBehaviorKeyTy LHS,
0 commit comments