[llvm-dev] TBAA
Richard Kenner via llvm-dev
llvm-dev at lists.llvm.org
Fri Jun 18 07:40:57 PDT 2021
> Are there any studies or examples of TBAA optimization for C showing
> substantive performance wins? I have not been able to find any
> papers or even compelling examples.
Consider:
void
square (float *arr, int *bound)
{
int i;
for (i = 0; i <= *bound; i++)
arr[i] = arr[i] * arr[i];
}
without TBAA you can't hoist the reference to *bound out of the loop. That
will prevent almost all loop optimizations.
More information about the llvm-dev
mailing list