I have a question about process_bb_lives and check_pseudos_live_through_calls.

I am trying to optimize aarch64 vector functions, which do not partially
clobber vector registers the way that 'normal' functions do.  To do this
I am looking at modifying the hard_regno_call_part_clobbered target
function to take an instruction as an argument so that it could look
at what function is being called and return a different value based on
an attribute of that function.  If the instruction is NULL it defaults
to the standard conservative behavour, but if it is a vector call it
will return false where the existing function (may) return true.

The problem I am having is that check_pseudos_live_through_calls calls
targetm.hard_regno_call_part_clobbered.  To pass the call instruction
into targetm.hard_regno_call_part_clobbered, I need to pass it in to
check_pseudos_live_through_calls first.  This works for three of the
four check_pseudos_live_through_calls that process_bb_lives makes.

The problem I am having is with the fourth (and last) call to
check_pseudos_live_through_calls from process_bb_lives.  It is
not in the loop that is processing each instruction in a basic
block so I do not have a specific call instruction to pass in.

I do not understand the purpose of the loop that contains this
particular call to check_pseudos_live_through_calls so I am not
sure what (if anything) I can do to address my problem.

Can anyone help me understand what the loop below in process_bb_lives
is doing and why it is needed?

  EXECUTE_IF_SET_IN_BITMAP (df_get_live_in (bb), FIRST_PSEUDO_REGISTER, j, bi)
    {
      if (sparseset_cardinality (pseudos_live_through_calls) == 0)
        break;
      if (sparseset_bit_p (pseudos_live_through_calls, j))
        check_pseudos_live_through_calls (j, last_call_used_reg_set);
    }


Steve Ellcey
sell...@cavium.com

Reply via email to