summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/doc/tm.texi7
-rw-r--r--gcc/doc/tm.texi.in7
-rw-r--r--gcc/target.def7
-rw-r--r--gcc/varasm.c2
5 files changed, 29 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5350355484c..83edb9b1965 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index ef47b1434a1..f98196434f8 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -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
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index f3945a46d3d..7a93f21073c 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -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
diff --git a/gcc/target.def b/gcc/target.def
index 6d00262d68c..0f3164a41bd 100644
--- a/gcc/target.def
+++ b/gcc/target.def
@@ -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,
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 4598cf29433..4c98f865923 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -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