[llvm-dev] TBAA

Richard Kenner via llvm-dev llvm-dev at lists.llvm.org
Fri Jun 18 13:47:06 PDT 2021


> I am working on it. So far I cannot find cases other than the obvious
> loop hoisting ones - which C programmers can do themselves.

Again, the fact that they *can* doesn't at all mean they know they should.
But indeed optimizations are most effective for loops, so that's where
you'll find the major benefits.  It's easy to construct other cases,
but you'd just argue that the C programmer should create the temporary
themselves.

Once way to look at it is that what's being said is "if you follow
reasonable aliasing rules (which, by the way, will result in cleaner
code), you won't have to manually create new variables in order for your
program to be more efficient: you can write it in whatever way is easiest
for you".


More information about the llvm-dev mailing list