Commit ccaeeafe by Nick Clifton Committed by Nick Clifton

common.opt: Add -fcombine-stack-adjustments.

        * common.opt: Add -fcombine-stack-adjustments.
        * opts.c (decode_options): Enable -fcombine-stack-adjustments at
        -O1.
        * combine-stack-adj.c (gate_handle_stack_adjustments): Check
        flag_combine_stack_adjustments.
        * doc/invoke.texi: Document the new option.

From-SVN: r164883
parent 0d228a52
2010-10-01 Nick Clifton <nickc@redhat.com>
* common.opt: Add -fcombine-stack-adjustments.
* opts.c (decode_options): Enable -fcombine-stack-adjustments at
-O1.
* combine-stack-adj.c (gate_handle_stack_adjustments): Check
flag_combine_stack_adjustments.
* doc/invoke.texi: Document the new option.
2010-10-01 Richard Guenther <rguenther@suse.de> 2010-10-01 Richard Guenther <rguenther@suse.de>
PR tree-optimization/45854 PR tree-optimization/45854
...@@ -546,7 +546,7 @@ combine_stack_adjustments_for_block (basic_block bb) ...@@ -546,7 +546,7 @@ combine_stack_adjustments_for_block (basic_block bb)
static bool static bool
gate_handle_stack_adjustments (void) gate_handle_stack_adjustments (void)
{ {
return (optimize > 0); return flag_combine_stack_adjustments;
} }
static unsigned int static unsigned int
......
...@@ -640,6 +640,10 @@ fcheck-data-deps ...@@ -640,6 +640,10 @@ fcheck-data-deps
Common Report Var(flag_check_data_deps) Common Report Var(flag_check_data_deps)
Compare the results of several data dependence analyzers. Compare the results of several data dependence analyzers.
fcombine-stack-adjustments
Common Report Var(flag_combine_stack_adjustments) Optimization
Looks for opportunities to reduce stack adjustments and stack references.
fcommon fcommon
Common Report Var(flag_no_common,0) Optimization Common Report Var(flag_no_common,0) Optimization
Do not put uninitialized globals in the common section Do not put uninitialized globals in the common section
......
...@@ -334,7 +334,8 @@ Objective-C and Objective-C++ Dialects}. ...@@ -334,7 +334,8 @@ Objective-C and Objective-C++ Dialects}.
-falign-labels[=@var{n}] -falign-loops[=@var{n}] -fassociative-math @gol -falign-labels[=@var{n}] -falign-loops[=@var{n}] -fassociative-math @gol
-fauto-inc-dec -fbranch-probabilities -fbranch-target-load-optimize @gol -fauto-inc-dec -fbranch-probabilities -fbranch-target-load-optimize @gol
-fbranch-target-load-optimize2 -fbtr-bb-exclusive -fcaller-saves @gol -fbranch-target-load-optimize2 -fbtr-bb-exclusive -fcaller-saves @gol
-fcheck-data-deps -fconserve-stack -fcprop-registers -fcrossjumping @gol -fcheck-data-deps -fcombine-stack-adjustments -fconserve-stack @gol
-fcprop-registers -fcrossjumping @gol
-fcse-follow-jumps -fcse-skip-blocks -fcx-fortran-rules @gol -fcse-follow-jumps -fcse-skip-blocks -fcx-fortran-rules @gol
-fcx-limited-range @gol -fcx-limited-range @gol
-fdata-sections -fdce -fdce @gol -fdata-sections -fdce -fdce @gol
...@@ -6618,6 +6619,13 @@ those which have no call-preserved registers to use instead. ...@@ -6618,6 +6619,13 @@ those which have no call-preserved registers to use instead.
Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
@item -fcombine-stack-adjustments
@opindex fcombine-stack-adjustments
Tracks stack adjustments (pushes and pops) and stack memory references
and then tries to find ways to combine them.
Enabled by default at @option{-O1} and higher.
@item -fconserve-stack @item -fconserve-stack
@opindex fconserve-stack @opindex fconserve-stack
Attempt to minimize stack usage. The compiler will attempt to use less Attempt to minimize stack usage. The compiler will attempt to use less
......
...@@ -801,6 +801,7 @@ decode_options (unsigned int argc, const char **argv, ...@@ -801,6 +801,7 @@ decode_options (unsigned int argc, const char **argv,
flag_tree_copy_prop = opt1; flag_tree_copy_prop = opt1;
flag_tree_sink = opt1; flag_tree_sink = opt1;
flag_tree_ch = opt1; flag_tree_ch = opt1;
flag_combine_stack_adjustments = opt1;
/* -O2 optimizations. */ /* -O2 optimizations. */
opt2 = (optimize >= 2); opt2 = (optimize >= 2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment