On Thu, Sep 08, 2016 at 11:20:41AM -0600, Jeff Law wrote:
> On 08/29/2016 03:31 AM, Bernd Schmidt wrote:
> >On 08/01/2016 03:42 AM, Segher Boessenkool wrote:
> >>+@deftypefn {Target Hook} void
> >>TARGET_SHRINK_WRAP_EMIT_PROLOGUE_COMPONENTS (sbitmap)
> >>+Emit prologue insns for the components indicated by the parameter.
> >>+@end deftypefn
> >>+
> >>+@deftypefn {Target Hook} void
> >>TARGET_SHRINK_WRAP_EMIT_EPILOGUE_COMPONENTS (sbitmap)
> >>+Emit epilogue insns for the components indicated by the parameter.
> >>+@end deftypefn
> >
> >How do these actually know where to save/restore registers? The frame
> >pointer may have been eliminated, and SP isn't necessarily constant
> >during the function. Seems like you'd have to calculate CFA reg/offset
> >much like dwarf2out does and pass it to this hook.
> So I think the confusion here is these hooks are independent of 
> placement. ie, the target independent code does something like:
> 
> FOR_EACH_BB
>   Build the component bitmap using the incoming edge components
>   Emit the prologue components at the start of the block
>   Emit the epilogue components at the end of the block

So you think those hooks need a BB parameter?  If there are ports that
need that, then sure.  PowerPC doesn't need it.


Segher

Reply via email to