* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193906
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
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
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
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,
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