This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Speedup int_bit_from_pos
- From: Mike Stump <mikestump at comcast dot net>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: Richard Biener <rguenther at suse dot de>, Jeff Law <law at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 22 Sep 2014 11:36:40 -0700
- Subject: Re: Speedup int_bit_from_pos
- Authentication-results: sourceware.org; auth=none
- References: <20140920040451 dot GC21760 at kam dot mff dot cuni dot cz> <541D948B dot 1030602 at redhat dot com> <20140920160752 dot GA18043 at kam dot mff dot cuni dot cz> <9767d203-5e46-4835-86b2-f983d20fcba8 at email dot android dot com> <20140921141944 dot GA4519 at kam dot mff dot cuni dot cz> <alpine dot LSU dot 2 dot 11 dot 1409220951530 dot 20733 at zhemvz dot fhfr dot qr> <20140922155110 dot GA30885 at kam dot mff dot cuni dot cz> <CF77FAC2-E85A-4204-8DF8-CCB78336EB7B at comcast dot net> <20140922182217 dot GA5371 at kam dot mff dot cuni dot cz>
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).