[llvm-dev] TBAA
Richard Kenner via llvm-dev
llvm-dev at lists.llvm.org
Fri Jun 18 10:13:36 PDT 2021
> I would think that in a language like C, the role of the optimizer
> should be to do optimizations that are difficult or impossible or
> time consuming for the programmer.
That's a philosphical question. Keep in mind that very few
programmers nowadays, even in C, have a good idea of the underlying
machine model (or even the fact that there *is* such a model), so they
don't really even know what to do. Also, think of macro expansion and
such. And maintenance costs over time if you add all of the
"clutter". I would argue against that view.
> My concern is that TBAA has a trade-off in terms of the complexity of the
> language for the programmer
I don't understand. TBAA implements the rules of the programming language
with respect to aliasing. It doesn't change the language in any way, so
I don't see how it can increase the complexity for the programmer.
Perhaps you're arguing that anti-aliasing rules in languages aren't
worth the complexity, but that's a different issue and one that language
design groups look at, not compiler writers.
More information about the llvm-dev
mailing list