[llvm-commits] [PATCH] [MIPS] Avoid use of __builtin_unreachable() when compiling LLVM for MIPS.

Duncan Sands baldrick at free.fr
Wed Jul 25 02:51:33 PDT 2012


Hi,

> I don't think that's a quite accurate portrayal of the issue... it's more "our
> host compilers are full of bugs w.r.t. __builtin_unreachable". I think that's an
> issue w/ the host compiler, and folks should either A) find a better host
> compiler, or B) bootstrap and use a Clang-built tree.

having now read the GCC bug reports I have to agree with Chandler here.

Ciao, Duncan.

>
> If B doesn't work for some reason, you should work on that. ;] Patches very
> welcome there.
>
> I don't think its reasonable to hack around these broken compilers inside the
> LLVM codebase. Applying local patches to satisfy your build environment is a
> common reality.
>
>
> I actually have a lot of sympathy for Reed's comment, but the fact is that this
> patch hacks around bugs in the host compiler. That is a very slippery slope, and
> frankly we are already sliding. I don't want more and more hacks to satisfy a
> host compiler. This is especially true if the host compiler with problems is
> some specific toolchain that none else would be using. You should file bugs and
> get that toolchain fixed, and/or you should come up with a bootstrap solution.
>
>     That said, I personally think it was a mistake to replace
>     assert(false) with llvm_unreachable in places that may be reachable but
>     shouldn't happen.
>
>
> I think the current llvm_unreachable definition is very workable -- it has nice
> asserting logic in debug builds.
>




More information about the llvm-commits mailing list