On Tue, 2014-08-12 at 15:16 -0600, Jeff Law wrote:
> On 08/06/14 11:19, David Malcolm wrote:
> > This is further scaffolding; convert the BB_* and SET_BB_* macros
> > into functions.  Convert the BB_* rvalue-style functions into returning
> > rtx_insn * rather than plain rtx.
> >
> > For now, this is done by adding a checked cast, but this will eventually
> > become a field lookup.  The lvalue form for now returns an rtx& to allow
> > in-place modification.
> >
> > gcc/
> >     * basic-block.h (BB_HEAD): Convert to a function.  Strengthen the
> >     return type from rtx to rtx_insn *.
> >     (BB_END): Likewise.
> >     (BB_HEADER): Likewise.
> >     (BB_FOOTER): Likewise.
> >     (SET_BB_HEAD): Convert to a function.
> >     (SET_BB_END): Likewise.
> >     (SET_BB_HEADER): Likewise.
> >     (SET_BB_FOOTER): Likewise.
> >
> >     * cfgrtl.c (BB_HEAD): New function, from macro of same name.
> >     Strengthen the return type from rtx to rtx_insn *.  For now, this
> >     is done by adding a checked cast, but this will eventually
> >     become a field lookup.
> >     (BB_END): Likewise.
> >     (BB_HEADER): Likewise.
> >     (BB_FOOTER): Likewise.
> >     (SET_BB_HEAD): New function, from macro of same name.  This is
> >     intended for use as an lvalue, and so returns an rtx& to allow
> >     in-place modification.
> >     (SET_BB_END): Likewise.
> >     (SET_BB_HEADER): Likewise.
> >     (SET_BB_FOOTER): Likewise.
> OK.
Committed to trunk as r214126, having bootstrapped&regrtested on
x86_64-unknown-linux-gnu (Fedora 20) albeit in combination with patches
9-29 [1], and verified it builds by itself with targets
x86_64-unknown-linux-gnu, c6x-elf and ia64-elf.

Note that these functions get converted back to macros in patches #158
(BB_FOOTER) and #178 (the others).

Dave

[1] as per https://gcc.gnu.org/ml/gcc-patches/2014-08/msg01420.html


Reply via email to