[cfe-dev] -Wunreachable-code and templates
Ted Kremenek
kremenek at apple.com
Tue Jan 10 10:07:19 PST 2012
On Jan 10, 2012, at 8:46 AM, David Blaikie wrote:
> I haven't done any perf analysis yet - I was asking if there was any
> recommended approach I should be using to make such measurements.
>
> I'll take this answer as implying that there probably isn't much &
> I'll have a first blush at making my own ad-hoc measurements. I'll
> repost here once I have any numbers I think might be useful.
That's not quite the message I was trying to convey. :)
As a first pass, I was wondering if you had observed anything noticeable before digging deeper.
I'd approach this as follows:
(1) Try running turning the warning on by default and run it through all of our benchmark tests, e.g. the GCC testsuite, clang tests, etc. See if there is a performance regression there. We regularly do this when measuring compile time regressions.
(2) Try building a few real world C++ codebases that are known to use templates (or otherwise make heavy use of C++) with this warning, e.g. Clang, Boost, Blender, Qt and see if there is a noticeable compile-time regression.
(3) While doing (2), see if the results of the warning (if any) are acceptable.
This is a fair amount of work, but it's the kind of thing we need to do to make this warning production quality.
Cheers,
Ted
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120110/9248b715/attachment.html>
More information about the cfe-dev
mailing list