On Fri, Sep 23, 2016 at 4:21 AM, Segher Boessenkool
<seg...@kernel.crashing.org> wrote:
> This implements the hooks for separate shrink-wrapping for rs6000.
> It handles GPRs and LR.  The GPRs get a component number corresponding
> to their register number; LR gets component number 0.
>
>
> 2016-09-23  Segher Boessenkool  <seg...@kernel.crashing.org>
>
>         * config/rs6000/rs6000.c (machine_function): Add new fields
>         gpr_is_wrapped_separately and lr_is_wrapped_separately.
>         (TARGET_SHRINK_WRAP_GET_SEPARATE_COMPONENTS,
>         TARGET_SHRINK_WRAP_COMPONENTS_FOR_BB,
>         TARGET_SHRINK_WRAP_DISQUALIFY_COMPONENTS,
>         TARGET_SHRINK_WRAP_EMIT_PROLOGUE_COMPONENTS,
>         TARGET_SHRINK_WRAP_EMIT_EPILOGUE_COMPONENTS,
>         TARGET_SHRINK_WRAP_SET_HANDLED_COMPONENTS): Define.
>         (rs6000_get_separate_components): New function.
>         (rs6000_components_for_bb): New function.
>         (rs6000_disqualify_components): New function.
>         (rs6000_emit_prologue_components): New function.
>         (rs6000_emit_epilogue_components): New function.
>         (rs6000_set_handled_components): New function.
>         (rs6000_emit_prologue): Don't emit LR save if 
> lr_is_wrapped_separately.
>         Don't emit GPR saves if gpr_is_wrapped_separately for that register.
>         (rs6000_emit_epilogue): Don't emit GPR restores if
>         gpr_is_wrapped_separately for that register.  Don't make a
>         REG_CFA_RESTORE note for registers we did not restore, either.

The rs6000 bits are okay when the rest of the shrink-wrapping
infrastructure is approved.

Thanks, David

Reply via email to