[LLVMdev] C as used/implemented in practice: analysis of responses

Joerg Sonnenberger joerg at britannica.bec.de
Thu Jul 2 09:07:32 PDT 2015


On Wed, Jul 01, 2015 at 04:06:45PM +0100, Peter Sewell wrote:
> - for some, OS developers are already routinely turning off
> optimisations for the sake of more predictable semantics, e.g. with
> fno-strict-aliasing.

This one is interesting, because the biggest problem with strict
aliasing is that there is no standard compliant way to override it.
The most basic issue is how the allocator is supposed to work
internally. If you can fully inline malloc/free pairs, it is practically
impossible to avoid aliasing conflicts.

Other important use cases are things like vectorizing access, which
often means checking for the alignment of the data and casting to a more
appropiate type. Not everyone wants to implement strlen in assembler,
but writing a standard compliant and still fast implementation in C
seems impossible.

Joerg



More information about the llvm-dev mailing list