[PATCH] D27826: Regenerate Halide benchmark bitcode files. Resolves TBAA verification failures.

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 16 10:05:06 PST 2016


mehdi_amini added a comment.

In https://reviews.llvm.org/D27826#625215, @sanjoy wrote:

> In https://reviews.llvm.org/D27826#624596, @mehdi_amini wrote:
>
> > (Repeating what I mentioned on IRC): having a strict verifier is fine, as long as the bitcode reader is able to upgrade the bitcode (if necessary by dropping MDs) so that old bitcode that were correctly processed before are still handled. This is an important behavior of the backward compatibility, at least for our (Apple) use case.
>
>
> I'm happy with the direction of https://reviews.llvm.org/D27839 and its dependencies, but I'd like to point out that this change is not erroring out on old bitcode that was "correctly processed before" -- any metadata this would have failed on could have been miscompiled.  That is, I did not change the spec and then add a verifier for the new spec; this verifier is only checking properties that correct bitcode should have had anyway.  This is not unlike (a friendlier form) of making LLVM better at exploiting undefined behavior.  Some programs will break, but they were wrong anyway.  :)


Right, I also see it as some case of UB, the program may break at runtime or being misoptimized. But UB does not allows the compiler to crash or refuse to compile :)


https://reviews.llvm.org/D27826





More information about the llvm-commits mailing list