C/C++
alias.txt
Associated article: Type-Based Alias Analysis
Tags: C/C++
Published source code accompanying the article by Mark Mitchell in which he discusses aliasing issues which make it difficult for compilers to generate code that runs as fast as you might hope. Luckily, the C++ type system makes clear what can and cannot alias.
Type-Based Alias Analysis
by Mark Mitchell
Example 1:
int i;
int *ip1 = &i;
int *ip2 = &i;
Example 2:
(a)
void f (int ip1[], int ip2[]) {
int i;
for (i = 0; i < 9; ++i) {
ip1[i + 1] = ip2[i] + ip2[i + 1];
}
}
(b)
LOAD ...


