[LLVMdev] Disabling assertions in llvm.org releases

Duncan Sands baldrick at free.fr
Sun Jun 20 13:11:34 PDT 2010


Currently LLVM releases, as downloaded from llvm.org, have assertions enabled.
(I'm told Apple ships LLVM with assertions disabled, which is why I mention
llvm.org here).  What do people think of disabling assertions?

The advantage of disabling assertions is that LLVM runs faster.  I don't know
how much faster.  It also makes for fairer comparisons with gcc releases, which
have all but the cheapest checks disabled.

The disadvantage of disabling assertions is that we get less information in bug
reports.

An additional consideration here is clang: while LLVM itself is reasonably
mature, that's not the case for clang.  I don't know if it is practical to
ship LLVM with assertions disabled, and clang with assertions enabled.

A different possibility is to analyse which checks are the most expensive,
and just disable those.

Thoughts?

Ciao,

Duncan.



More information about the llvm-dev mailing list