On Mon, 27 Mar 2006, John Criswell wrote:> One consideration to weigh is that a debug build of LLVM provides users with > more diagnostic information to submit with bug reports (since many bugs are > caught by assertions, which print a readable stack trace). The tradeoff > seems to be faster and smaller LLVM tools (optimized build) vs. better > diagnostic information for bug reports (debug build). > > If the LLVM developers who regularly fix user bugs depend on that > information, we should keep it a debug build by default. Otherwise, I think > an optimized build would be fine.Another option is to build an optimized build with assertions on. Do to local demand, I added a build option 'make ENABLE_OPTIMIZED=1 ENABLE_ASSERTIONS=1' that provides this. -Chris -- http://nondot.org/sabre/ http://llvm.org/
> On Mon, 27 Mar 2006, John Criswell wrote: >> One consideration to weigh is that a debug build of LLVM provides users >> with more diagnostic information to submit with bug reports (since many >> bugs are caught by assertions, which print a readable stack trace). The >> tradeoff seems to be faster and smaller LLVM tools (optimized build) vs. >> better diagnostic information for bug reports (debug build). >> >> If the LLVM developers who regularly fix user bugs depend on that >> information, we should keep it a debug build by default. Otherwise, I >> think an optimized build would be fine. > > Another option is to build an optimized build with assertions on. Do to > local demand, I added a build option 'make ENABLE_OPTIMIZED=1 > ENABLE_ASSERTIONS=1' that provides this.I think this may be a good compromise. The user base of LLVM still seems to be primarily developers, but it does seem to be expanding. It would be useful to keep assertions on so that we can get valuable feedback from the various types of programs that people are compiling. -Tanya
On Mon, 2006-03-27 at 11:47, Chris Lattner wrote:> On Mon, 27 Mar 2006, John Criswell wrote: > > One consideration to weigh is that a debug build of LLVM provides users with > > more diagnostic information to submit with bug reports (since many bugs are > > caught by assertions, which print a readable stack trace). The tradeoff > > seems to be faster and smaller LLVM tools (optimized build) vs. better > > diagnostic information for bug reports (debug build). > > > > If the LLVM developers who regularly fix user bugs depend on that > > information, we should keep it a debug build by default. Otherwise, I think > > an optimized build would be fine. > > Another option is to build an optimized build with assertions on. Do to > local demand, I added a build option 'make ENABLE_OPTIMIZED=1 > ENABLE_ASSERTIONS=1' that provides this.How does this compare size and performance wise with a debug build or a release build? Andrew
On Mon, 27 Mar 2006, Andrew Lenharth wrote:>> Another option is to build an optimized build with assertions on. Do to >> local demand, I added a build option 'make ENABLE_OPTIMIZED=1 >> ENABLE_ASSERTIONS=1' that provides this. > > How does this compare size and performance wise with a debug build or a > release build?I haven't done any scientific measurements. Here is some educated guessing :) I know that a debug build is about 10x bigger and 10x slower than a release build. Linking also takes about 10x as long with a debug build than it does for a release build. With assertions on, linking takes virtually the same time as a release build, I would expect it to also be about the same speed as a release build: a WAG would be within 10%. For the people that requested the optimized+assertions build, the big issue was link-time. Having a huge link time significantly impacted their productivity and they happened to not care about performance for most development. OTOH, not getting assertions was preventing them from finding bugs. The more I think about it, the more I like a configuration that looks like this: 'llvm --enable-optimized' should always build a release build. LLVM from CVS should always default to a debug build. LLVM releases should default to 'release + assertions'. Thoughts? -Chris -- http://nondot.org/sabre/ http://llvm.org/