]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
target.def (use_blocks_for_decl_p): New hook.
authorDavid Edelsohn <dje.gcc@gmail.com>
Wed, 28 Nov 2012 20:22:58 +0000 (20:22 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Wed, 28 Nov 2012 20:22:58 +0000 (15:22 -0500)
        * 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

gcc/ChangeLog
gcc/doc/tm.texi
gcc/doc/tm.texi.in
gcc/target.def
gcc/varasm.c

index 5350355484cab7a79aac2565be11740bc7dcdf53..83edb9b196507e659fd13e13685979c6fca9d5b2 100644 (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
index ef47b1434a15a8847951da842b5268c2e4f74bf6..f98196434f878cebcd7502f66e6fe66807f032ec 100644 (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
index f3945a46d3d36020770f2a5f685128f54859a4c3..7a93f21073cbcb67388d909ea79d12f587dfd71a 100644 (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
index 6d00262d68ca8cca99e64ef72f8d08be047736a7..0f3164a41bded7cc97e06eb02c1fb14e1079c2d4 100644 (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,
index 4598cf29433edfad1898fb118f4728d24e1efe03..4c98f8659239757684eae87afdc2c51be12f6f27 100644 (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