Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(454)

Issue 4415044: [lto/pph] Do not pack more bits than requested (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years ago by Diego Novillo
Modified:
12 years, 6 months ago
Reviewers:
jakub
CC:
rguenther_suse.de, gcc-patches_gcc.gnu.org
Visibility:
Public.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -1 line) Patch
M gcc/lto-streamer.h View 1 chunk +12 lines, -1 line 0 comments Download

Messages

Total messages: 7
Diego Novillo
This is a corner case that happens not to affect LTO because the "bad" value ...
13 years ago (2011-04-14 18:51:09 UTC) #1
jakub_redhat.com
On Thu, Apr 14, 2011 at 02:50:53PM -0400, Diego Novillo wrote: > @@ -1190,8 +1190,19 ...
13 years ago (2011-04-14 19:28:58 UTC) #2
Diego Novillo
On Thu, Apr 14, 2011 at 15:28, Jakub Jelinek <jakub@redhat.com> wrote: > If bitpack_word_t has ...
13 years ago (2011-04-14 20:40:43 UTC) #3
rguenther_suse.de
On Thu, 14 Apr 2011, Diego Novillo wrote: > On Thu, Apr 14, 2011 at ...
13 years ago (2011-04-15 08:56:15 UTC) #4
Diego Novillo
On Fri, Apr 15, 2011 at 04:56, Richard Guenther <rguenther@suse.de> wrote: >> @@ -518,7 +518,8 ...
13 years ago (2011-04-15 12:44:57 UTC) #5
rguenther_suse.de
On Fri, 15 Apr 2011, Diego Novillo wrote: > On Fri, Apr 15, 2011 at ...
13 years ago (2011-04-15 12:49:44 UTC) #6
Diego Novillo
13 years ago (2011-04-15 13:05:53 UTC) #7
On Fri, Apr 15, 2011 at 08:49, Richard Guenther <rguenther@suse.de> wrote:
> On Fri, 15 Apr 2011, Diego Novillo wrote:
>
>> On Fri, Apr 15, 2011 at 04:56, Richard Guenther <rguenther@suse.de> wrote:
>>
>> >> @@ -518,7 +518,8 @@ pack_ts_type_value_fields (struct bitpack_d *bp, tree
expr)
>> >>    bp_pack_value (bp, TYPE_USER_ALIGN (expr), 1);
>> >>    bp_pack_value (bp, TYPE_READONLY (expr), 1);
>> >>    bp_pack_value (bp, TYPE_ALIGN (expr), HOST_BITS_PER_INT);
>> >> -  bp_pack_value (bp, TYPE_ALIAS_SET (expr) == 0 ? 0 : -1,
HOST_BITS_PER_INT);
>> >> +  bp_pack_value (bp, TYPE_ALIAS_SET (expr) == 0 ? 0 : -1,
>> >> +                BITS_PER_BITPACK_WORD);
>> >
>> > As we only want to stream alias-set zeros just change it to a single bit,
>> > like
>> >
>> >     bp_pack_value (bp, TYPE_ALIAS_SET (expr) == 0, 1);
>> >
>> > and on the reader side restore either a zero or -1.
>>
>> Ah, yes.  Much better.
>>
>> > As for the -1 case, it's simply broken use of the interface.
>>
>> Which would've been caught by the assertion.  How about this, we keep
>> the asserts with #ifdef ENABLE_CHECKING. This would've saved me some
>> ugly debugging.
>
> I think we should rather add the masking.  The assert would only
> trigger for particular values, not for bogus use of the interface
> (you get sign-extension for signed arguments).

OK, that works too.  I'll prepare a patch.


Diego.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b