]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
params.def (PARAM_MIN_SIZE_FOR_STACK_SHARING): New param...
authorEaswaran Raman <eraman@google.com>
Wed, 9 Oct 2013 21:07:54 +0000 (21:07 +0000)
committerEaswaran Raman <eraman@gcc.gnu.org>
Wed, 9 Oct 2013 21:07:54 +0000 (21:07 +0000)
2013-10-09  Easwaran Raman <eraman@google.com>

        * params.def (PARAM_MIN_SIZE_FOR_STACK_SHARING): New param...
        * cfgexpand.c (defer_stack_allocation): ...use here
        * doc/invoke.texi: Add documentation for min-size-for-stack-sharing.

From-SVN: r203330

gcc/ChangeLog
gcc/cfgexpand.c
gcc/doc/invoke.texi
gcc/params.def

index b1028bf7167a3cc5f6a71d212923754522f822bc..5f7b962d978a2229da04f45561b1121b6112acd0 100644 (file)
@@ -1,3 +1,9 @@
+2013-10-09  Easwaran Raman <eraman@google.com>
+
+       * params.def (PARAM_MIN_SIZE_FOR_STACK_SHARING): New param...
+       * cfgexpand.c (defer_stack_allocation): ...use here
+       * doc/invoke.texi: Add documentation for min-size-for-stack-sharing.
+
 2013-10-09  Zhenqiang Chen  <zhenqiang.chen@arm.com>
 
        * tree-ssa-phiopts.c (rhs_is_fed_for_value_replacement): New function.
index afb02a0801b9fa17f22220e616d5e3a09b9d12ba..7ed29f5c227311a78e894ea6bd08016aea055c34 100644 (file)
@@ -1131,7 +1131,9 @@ defer_stack_allocation (tree var, bool toplevel)
      other hand, we don't want the function's stack frame size to
      get completely out of hand.  So we avoid adding scalars and
      "small" aggregates to the list at all.  */
-  if (optimize == 0 && tree_low_cst (DECL_SIZE_UNIT (var), 1) < 32)
+  if (optimize == 0
+      && (tree_low_cst (DECL_SIZE_UNIT (var), 1)
+          < PARAM_VALUE (PARAM_MIN_SIZE_FOR_STACK_SHARING)))
     return false;
 
   return true;
index 0f32c24f15fd4e50538a141f85648de5ccf91212..a8d6dfa5459d3ee1c1da16ec4281fcb9b3ee13b9 100644 (file)
@@ -9686,6 +9686,10 @@ value of a shared integer constant.  The default value is 256.
 The minimum size of buffers (i.e.@: arrays) that receive stack smashing
 protection when @option{-fstack-protection} is used.
 
+@item min-size-for-stack-sharing
+The minimum size of variables taking part in stack slot sharing when not
+optimizing. The default value is 32.
+
 @item max-jump-thread-duplication-stmts
 Maximum number of statements allowed in a block that needs to be
 duplicated when threading jumps.
index ff9ba9a8abcc6dc2148e498464aabd56096f7f0e..def5a9a5eaa7bd2ed5897c960d22c530408de515 100644 (file)
@@ -682,6 +682,12 @@ DEFPARAM (PARAM_SSP_BUFFER_SIZE,
          "The lower bound for a buffer to be considered for stack smashing protection",
          8, 1, 0)
 
+DEFPARAM (PARAM_MIN_SIZE_FOR_STACK_SHARING,
+         "min-size-for-stack-sharing",
+         "The minimum size of variables taking part in stack slot sharing "
+         "when not optimizing",
+         32, 0, 0)
+
 /* When we thread through a block we have to make copies of the
    statements within the block.  Clearly for large blocks the code
    duplication is bad.