Displaying 4 results from an estimated 4 matches for "callfoo".
2020 Mar 03
2
TBAA for struct fields
...ings by explicitly type-casting it to struct*, and still get similar results.
#######################################################
struct P {
float f1;
float f2;
float f3[3];
float f4;
};
void foo(struct P* p1, struct P* p2) {
p1->f2 = 1.2;
p2->f1 = 3.7;
}
int callFoo() {
struct P p;
foo(&p, (struct P*)(&(p.f2)));
return 0;
}
#######################################################
Shouldn’t any alias analysis(including TBAA) be conservative in interprocedural context, and consider all aliasing possibilities between different fields?
As men...
2017 Aug 07
3
AliasAnalysis: may-alias subcategory
...erprocedural function specialization optimization where in the clone function version no-alias assumption can be assumed and the original function version will hold the default alias assumption.
i.e.
void foo(int *A, int *B, int *C) {
for (int i=0; i<N; i++)
A[i] = B[i] + C[i];
}
void callFoo() {
foo (A1, B1, C1); // A1 no-alias with B1 & C1
foo (A2, B2, C2); // A2 no-alias with B1 & C1
foo (A3, B3, C3); // A3 must-alias with B3/C3
}
Will be transformed to:
void foo(int *A, int *B, int *C) {
// default loop version
}
void foo.clone(int * restrict A, int *B, int...
2020 Feb 27
2
TBAA for struct fields
...l Distribution Only]
Hi,
Following issue is observed with Type Based Alias Analysis(TBAA).
#######################################################
struct P {
float f1;
float f2;
float f3[3];
float f4;
};
void foo(struct P* p1, struct P* p2) {
p1->f2 = 1.2;
p2->f1 = 3.7;
}
int callFoo() {
struct P p;
foo(&p, &(p.f2));
}
######################################################
Printing alias-sets using commands:
clang -O1 -S -emit-llvm struct_tbaa.c
opt -basicaa -tbaa -print-alias-sets -disable-output struct_tbaa.ll
yields:
Alias sets for function 'foo':...
2017 Aug 07
2
AliasAnalysis: may-alias subcategory
Hi,
The current AliasAnalysis marks may-alias for cases when memory passed as function argument.
i.e.
void foo(int *A, int *B, int *C) {
for (int i=0; i<N; i++)
A[i] = B[i] + C[i];
}
In the above example, it's may-alias for memory 'A', because 'A' is not known at 'foo' call sites.
Alias analysis is able to figure out memory 'A' is no-alias, if I