This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [GCSE PATCH]: make complexity cut off less binary
- From: "Zack Weinberg" <zack at codesourcery dot com>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 25 Jul 2003 12:59:20 -0700
- Subject: Re: [GCSE PATCH]: make complexity cut off less binary
- References: <3F218831.2020305@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com> writes:
> This patch changes the GCSE cut off to be something that is less binary.
> In diagnosing a customer's performance issue, it turned out there was
> a function with ~500 blocks and 50 edges/block. Now, 1000 blocks
> at 20/block is 20,000 edges, and 500 blocks at 40/block is also 20,000
> edges. Thus rather than
> blocks > 1000 && edges > 20 * blocks
> or
> blocks > 500 && edges > 40 * blocks
> having
> edges > 20000 + 4 * blocks
> seems a better complexity check. Although the average edges/block
> is 2, I chose the scaling factor of 4 to be conservative.
>
> I also found that we didn't check the size of some bitmaps for the
> null-pointer deletion check or print a bail out message,
> so folding all these checks into one function makes things consistent.
>
> booted & tested on i686-pc-linux-gnu, ok?
The basic concept looks good. However, you've introduced a
translation problem: the name of the pass is no longer translated in
the -Wdisabled-optimization message, and even if it were, it wouldn't
be translated with the rest of the sentence. You need to figure out
some way to avoid breaking up the sentence like that.
zw