Message ID | CAGWvnynJvdTwwBEfFsRZc+=c9hpDdJiVg_4ZWfo9X6sFEkJGew@mail.gmail.com |
---|---|
State | New |
Headers | show |
David Edelsohn <dje.gcc@gmail.com> writes:
> Below is the implementation as a new target hook.
Looks good to me. The documentation string needs filling in though,
with a hook placeholder in tm.texi.in.
Richard
On Tue, Nov 27, 2012 at 3:17 PM, Richard Sandiford <rdsandiford@googlemail.com> wrote: > David Edelsohn <dje.gcc@gmail.com> writes: >> Below is the implementation as a new target hook. > > Looks good to me. The documentation string needs filling in though, > with a hook placeholder in tm.texi.in. Yes. Thanks, David
Index: target.def =================================================================== --- target.def (revision 193798) +++ target.def (working copy) @@ -1495,6 +1495,13 @@ bool, (enum machine_mode mode, const_rtx x), hook_bool_mode_const_rtx_false) +/* True if the given decl can be put into an object_block. */ +DEFHOOK +(use_blocks_for_decl_p, + "", + bool, (const_tree decl), + hook_bool_const_tree_true) + /* The minimum and maximum byte offsets for anchored addresses. */ DEFHOOKPOD (min_anchor_offset, Index: varasm.c =================================================================== --- varasm.c (revision 193798) +++ varasm.c (working copy) @@ -1113,7 +1113,7 @@ if (lookup_attribute ("alias", DECL_ATTRIBUTES (decl))) return false; - return true; + return targetm.use_blocks_for_decl_p (decl); } /* Create the DECL_RTL for a VAR_DECL or FUNCTION_DECL. DECL should