Changes between Version 14 and Version 15 of AliasAnalysis
- Timestamp:
- 04/29/16 09:43:37 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AliasAnalysis
v14 v15 11 11 notes from Matt based on experience with OpenMP loop independence analysis: 12 12 13 1) Proving that two array variables are “disjoint". I think this is more subtle than simply determining that the base addresses 14 of the arrays are different, i.e., that they are not aliased. What is really wanted is to determine for array vars a and b, something like: 13 1) Proving that two array variables are “disjoint". I think this is more subtle than simply determining that the base addresses of the arrays are different, i.e., that they are not aliased. What is really wanted is to determine for array vars a and b, something like: 15 14 (a != b) && 16 15 (a < b \implies a+length(a) < b) && 17 16 (b < a \implies b+length(b) < a) 18 The problem is that one might not be able to easily capture the length in all cases. For most of the OpenMP loops I have seen 19 it is easy to do and once one enters the loop nest there are no redefinitions of a and b, so the common case is not so bad. 17 The problem is that one might not be able to easily capture the length in all cases. For most of the OpenMP loops I have seen it is easy to do and once one enters the loop nest there are no redefinitions of a and b, so the common case is not so bad. 20 18 21 You need this in cases where the arrays are passed as parameters which is common, so this is pretty important and it makes 22 this an inter-procedural analysis. 19 You need this in cases where the arrays are passed as parameters which is common, so this is pretty important and it makes this an inter-procedural analysis. 23 20 24 2) A workaround to avoid an inter-procedural analysis is to simply embed the above test into the model and then optimize the 25 OpenMP loop nest if the test passes. This is the genesis of the idea of computing the non-aliasing condition if it is impossible 26 to actually perform the aliasing. 21 2) A workaround to avoid an inter-procedural analysis is to simply embed the above test into the model and then optimize the OpenMP loop nest if the test passes. This is the genesis of the idea of computing the non-aliasing condition if it is impossible to actually perform the aliasing. 27 22 28 The generalization is an interesting direction, I think, and it would be good to see whether Hal agrees. The idea here would be 29 that rather then simply performing an alias analysis, instead you perform an alias analysis and compute some additional information 30 on the side so that you when you ask: 31 can p1 and p2 point to the same address? 23 The generalization is an interesting direction, I think, and it would be good to see whether Hal agrees. The idea here would be that rather then simply performing an alias analysis, instead you perform an alias analysis and compute some additional information on the side so that you when you ask: can p1 and p2 point to the same address? 32 24 it can answer: 33 25 yes
