This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Fix for "Too restrictive sanity check"


> 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]