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]
Other format: [Raw text]

Re: Speedup int_bit_from_pos


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).

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