@@ -40,19 +40,6 @@ static cl::opt<unsigned>
40
40
cl::desc(" The maximum number of pointers may-alias "
41
41
" sets may contain before degradation" ));
42
42
43
- // / For the given two alias sets, when known that the sets are must-aliases
44
- // / individually, check whether their union preserves the must-alias status.
45
- static bool isMustAliasMerge (const AliasSet &AS, const AliasSet &OtherAS,
46
- BatchAAResults &BatchAA) {
47
- // Since the sets are must-aliases individually, we must only check
48
- // the pairs across the sets.
49
- for (const MemoryLocation &MemLoc : AS)
50
- for (const MemoryLocation &OtherMemLoc : OtherAS)
51
- if (!BatchAA.isMustAlias (MemLoc, OtherMemLoc))
52
- return false ;
53
- return true ;
54
- }
55
-
56
43
// / mergeSetIn - Merge the specified alias set into this alias set.
57
44
void AliasSet::mergeSetIn (AliasSet &AS, AliasSetTracker &AST,
58
45
BatchAAResults &BatchAA) {
@@ -66,8 +53,14 @@ void AliasSet::mergeSetIn(AliasSet &AS, AliasSetTracker &AST,
66
53
if (Alias == SetMustAlias) {
67
54
// Check that these two merged sets really are must aliases.
68
55
// If the pointers are not a must-alias pair, this set becomes a may alias.
69
- if (!isMustAliasMerge (*this , AS, BatchAA))
70
- Alias = SetMayAlias;
56
+ [&] {
57
+ for (const MemoryLocation &MemLoc : *this )
58
+ for (const MemoryLocation &ASMemLoc : AS)
59
+ if (!BatchAA.isMustAlias (MemLoc, ASMemLoc)) {
60
+ Alias = SetMayAlias;
61
+ return ;
62
+ }
63
+ }();
71
64
}
72
65
73
66
// Merge the list of constituent pointers...
0 commit comments