News for hackers. Stuff that matters.
Re:ABI Mistakes by zozbot234 on Saturday May 08, 2021 @02:52PM (#27089743)
> Is this understandable, or does this tell us something bad about llvm?

LLVM is a large project that's mostly written in pre-modern C++, and "noalias" is a highly non-trivial feature that affects many parts of the compiler in 'cross-cutting' ways. It would be surprising if it did not turn up some initial bugs.

Re:ABI Mistakes by galangalalgol on Saturday May 08, 2021 @03:32PM (#27089999)
Initial, yes, but this was first uncovered in Oct 2015. That seems like long enough to fix it.
Re:ABI Mistakes by masklinn on Saturday May 08, 2021 @05:54PM (#27091097)
It’s not a single bug, it’s a bunch of different bugs in the interactions between noalias and various analysis and optimisation passes.
Re:ABI Mistakes by saagarjha on Saturday May 08, 2021 @06:10PM (#27091217)
Aliasing analysis is a complicated part of the compiler, and it underpins a lot of optimization passes. It’s not an easy thing to bolt on.
Re:ABI Mistakes by masklinn on Sunday May 09, 2021 @04:16AM (#27094223)
TBF the internal API could be designed more pessimistically, as in llvm could drop noalias annotations unless they’re explicitly maintained (/ converted).

This means optimisation phases would need to explicitly opt-in and aliasing optimisations would commonly be missed by default, but it would avoid miscompilations.