Speedup int_bit_from_pos

Mike Stump mikestump@comcast.net
Mon Sep 22 18:37:00 GMT 2014


On Sep 22, 2014, at 11:22 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
>> Not quite:
>> 
>>      offset_int woffset
>>        = (wi::to_offset (xoffset)
>>           + wi::lrshift (wi::to_offset (DECL_FIELD_BIT_OFFSET (field)),
>>                          LOG2_BITS_PER_UNIT));
>> 
>> offset_int is the type that can hold all bit positions, byte positions, byte sizes and bit sizes.
> 
> Yep, I worked that out in meantime. Now I get:
> ../../gcc/tree.h: In function �long int int_bit_position(const_tree)�:
> ../../gcc/tree.h:3890:24: error: �to_offset� is not a member of �wi�
>   return (wi::lrshift (wi::to_offset (DECL_FIELD_OFFSET (field)), BITS_PER_UNIT_LOG)

That is defined later in tree.h?  If you want to use it in tree.h, you will have to have it after to_offset is defined.  Alternatively, you can move it up, but, you will need to understand the dependancies some (or try some builds).


More information about the Gcc-patches mailing list