+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.
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;
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.
"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.