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: [PATCH] Fix var-tracking ICE (PR debug/46387)


On Thu, Nov 11, 2010 at 4:41 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Thu, Nov 11, 2010 at 06:32:28PM +0300, Alexander Monakov wrote:
>> This is what we need from the selective scheduler side (the part of the
>> sel-sched.c patch actually needs to be more complicated to work properly, but
>> the alias.c change is what we have in mind to fix PR45652).
>
> That's unfortunately not usable for var-tracking, where we know
> VEC_index (rtx, reg_base_value, dest_regno) is non-NULL and different from
> src_regno, yet we want to copy from src_regno instead of clearing it.

Hm, can't we teach alias analysis about cfa_base_reg somehow?  What would
we loose (in var-tracking) if we re-set the regs base value to NULL instead
of to that of the frame pointer?

Richard.

>> +/* Set REG_BASE_VALUE of DEST to that of SRC if unset,
>> + ? or set it to NULL if DEST and SRC have conflicting REG_BASE_VALUEs. ?*/
>> +void
>> +inherit_reg_base_value (rtx dest, rtx src)
>> +{
>> + ?unsigned dest_regno = REGNO (dest), src_regno = REGNO (src);
>> +
>> + ?if (! VEC_index (rtx, reg_base_value, dest_regno))
>> + ? ?{
>> + ? ? ?if (!reg_seen[dest_regno]
>> + ? ? ? ? && (dest_regno >= FIRST_PSEUDO_REGISTER || !fixed_regs[dest_regno]))
>> + ? ? ? VEC_replace (rtx, reg_base_value, dest_regno,
>> + ? ? ? ? ? ? ? ? ? ?VEC_index (rtx, reg_base_value, src_regno));
>> + ? ?}
>> + ?else if (VEC_index (rtx, reg_base_value, src_regno)
>> + ? ? ? ? ?!= VEC_index (rtx, reg_base_value, dest_regno))
>> + ? ?VEC_replace (rtx, reg_base_value, dest_regno, NULL_RTX);
>> +
>> + ?reg_seen[dest_regno] = 1;
>> +}
>> +
>
> ? ? ? ?Jakub
>


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