Eric Botcazou writes:
>> get_best_mode has various checks to decide what counts as an acceptable
>> bitfield mode. It actually has two copies of them, with slightly different
>> alignment checks:
>>
>> MIN (unit, BIGGEST_ALIGNMENT) > align
>>
>> vs.
>>
>> unit <= MIN (align, BIGGEST_ALIGNM
Richard Henderson writes:
> On 11/15/2012 04:10 AM, Richard Sandiford wrote:
>> "next" was supposed to be "find and return another mode" rather than "++".
>> Did you think it was confusing because "next" sounded too much like
>> the latter?
>
> I wasn't keen on "next" being find-and-return, though
On 11/15/2012 04:10 AM, Richard Sandiford wrote:
> "next" was supposed to be "find and return another mode" rather than "++".
> Did you think it was confusing because "next" sounded too much like the
> latter?
I wasn't keen on "next" being find-and-return, though I didn't
actually find it confusi
Eric Botcazou writes:
>> Now that we're in C++, I think we should be using iterators that are much
>> more in the style of libstdc++. I agree that the .next interface used here
>> is a bit confusing.
>>
>> I'd expect to see something like
>>
>> for (bit_field_mode_iterator i(x,y,z); i ; ++i)
> Now that we're in C++, I think we should be using iterators that are much
> more in the style of libstdc++. I agree that the .next interface used here
> is a bit confusing.
>
> I'd expect to see something like
>
> for (bit_field_mode_iterator i(x,y,z); i ; ++i)
> {
> enum machine_m
On 11/13/2012 04:41 AM, Eric Botcazou wrote:
> I find the interface a bit awkward though. Can't we model it on the existing
> iterators in basic-block.h or tree-flow.h? get_best_mode would be written:
>
> FOR_EACH_BITFIELD_MODE (mode, iter, bitsize, bitpos,
> bitregion
> get_best_mode has various checks to decide what counts as an acceptable
> bitfield mode. It actually has two copies of them, with slightly different
> alignment checks:
>
> MIN (unit, BIGGEST_ALIGNMENT) > align
>
> vs.
>
> unit <= MIN (align, BIGGEST_ALIGNMENT)
>
> The second looks more
get_best_mode has various checks to decide what counts as an acceptable
bitfield mode. It actually has two copies of them, with slightly different
alignment checks:
MIN (unit, BIGGEST_ALIGNMENT) > align
vs.
unit <= MIN (align, BIGGEST_ALIGNMENT)
The second looks more correct, since we can'