aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDavid Edelsohn <dje.gcc@gmail.com>2012-11-28 20:22:58 +0000
committerDavid Edelsohn <dje@gcc.gnu.org>2012-11-28 15:22:58 -0500
commit361a58da83a1f870af4e53b6a22eabc53e1c2879 (patch)
treed1265a7f21fa36333e53d93d90b783011f0aed2f /gcc
parent00efe3ea3c907b4d7b090da19add210432b3de2c (diff)
downloadgcc-361a58da83a1f870af4e53b6a22eabc53e1c2879.zip
gcc-361a58da83a1f870af4e53b6a22eabc53e1c2879.tar.gz
gcc-361a58da83a1f870af4e53b6a22eabc53e1c2879.tar.bz2
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
Diffstat (limited to 'gcc')
-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 5350355..83edb9b 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 ef47b14..f981964 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 f3945a4..7a93f21 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 6d00262..0f3164a 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 4598cf2..4c98f86 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