target.def (use_blocks_for_decl_p): New hook.

* target.def (use_blocks_for_decl_p): New hook.
        * varasm.c (use_blocks_for_decl_p): Apply hook as final condition.
        * doc/tm.texi.in (USE_BLOCKS_FOR_DECL_P): New description.
        * doc/tm.texi: Regenerated.

From-SVN: r193906
This commit is contained in:
David Edelsohn 2012-11-28 20:22:58 +00:00 committed by David Edelsohn
parent 00efe3ea3c
commit 361a58da83
5 changed files with 29 additions and 1 deletions

View file

@ -1,3 +1,10 @@
2012-11-28 David Edelsohn <dje.gcc@gmail.com>
* target.def (use_blocks_for_decl_p): New hook.
* varasm.c (use_blocks_for_decl_p): Apply hook as final condition.
* doc/tm.texi.in (USE_BLOCKS_FOR_DECL_P): New description.
* doc/tm.texi: Regenerated.
2012-11-28 Richard Sandiford <rdsandiford@googlemail.com>
PR middle-end/55438

View file

@ -5654,6 +5654,13 @@ of @var{x}.
The default version returns false for all constants.
@end deftypefn
@deftypefn {Target Hook} bool TARGET_USE_BLOCKS_FOR_DECL_P (const_tree @var{decl})
This hook should return true if pool entries for @var{decl} should
be placed in an @code{object_block} structure.
The default version returns true for all decls.
@end deftypefn
@deftypefn {Target Hook} tree TARGET_BUILTIN_RECIPROCAL (unsigned @var{fn}, bool @var{md_fn}, bool @var{sqrt})
This hook should return the DECL of a function that implements reciprocal of
the builtin function with builtin function code @var{fn}, or

View file

@ -5570,6 +5570,13 @@ of @var{x}.
The default version returns false for all constants.
@end deftypefn
@hook TARGET_USE_BLOCKS_FOR_DECL_P
This hook should return true if pool entries for @var{decl} should
be placed in an @code{object_block} structure.
The default version returns true for all decls.
@end deftypefn
@hook TARGET_BUILTIN_RECIPROCAL
This hook should return the DECL of a function that implements reciprocal of
the builtin function with builtin function code @var{fn}, or

View file

@ -1495,6 +1495,13 @@ DEFHOOK
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,

View file

@ -1113,7 +1113,7 @@ use_blocks_for_decl_p (tree decl)
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