This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix for "Too restrictive sanity check"
- To: Jeffrey A Law <law at cygnus dot com>
- Subject: Re: Fix for "Too restrictive sanity check"
- From: Jan Hubicka <hubicka at atrey dot karlin dot mff dot cuni dot cz>
- Date: Thu, 20 Apr 2000 12:32:26 +0200
- Cc: Alexandre Oliva <aoliva at cygnus dot com>, rth at cygnus dot com, gcc-patches at gcc dot gnu dot org
- References: <20000419130601.A11198@atrey.karlin.mff.cuni.cz> <2345.956179325@upchuck>
> This patch is clearly wrong.
>
> compute_argument_block_size modifies the data in args_size which needs to
> happen before the call to finalize_must_preallocate.
I was commenting my understanding of the code here:
> > The fix is to call compute_argument_block_size later. There are two
> > uses of args_size in between. First one is in precompute_arguments.
> > I have patch approved to avoid this, since it is useless. Second is in
> > finalize_must_preallocate. I've did same change for this code in my home
> > tree. The rationale is, that finalize_must_preallocate use args_size to
> > decide whether it is better to precompute arguments (and direct structures
> > to it) or not precompute (and require pushing). Ratio of structs over
> > args size is calculated and when it exceeds 50%, preallocation is done.
> >
> > Author had unadjusted args size in mind here, so in fact this is third
> > bug fixed by this patch.
>
For your reference, there is the bit of code in question:
if (copy_to_evaluate_size * 2 >= args_size->constant
&& args_size->constant > 0)
must_preallocate = 1;
Can you please tell me more what kind of incorrect code you are getting?
Honza