Commit 6e616110 by Richard Biener Committed by Richard Biener

re PR middle-end/53073 (464.h264ref in SPEC CPU 2006 miscompiled)

2013-01-31  Richard Biener  <rguenther@suse.de>

	PR middle-end/53073
	* common.opt (faggressive-loop-optimizations): New flag,
	enabled by default.
	* doc/invoke.texi (faggressive-loop-optimizations): Document.
	* tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop): Guard
	infer_loop_bounds_from_undefined by it.

From-SVN: r195610
parent 636f59cf
2013-01-31 Richard Biener <rguenther@suse.de>
PR middle-end/53073
* common.opt (faggressive-loop-optimizations): New flag,
enabled by default.
* doc/invoke.texi (faggressive-loop-optimizations): Document.
* tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop): Guard
infer_loop_bounds_from_undefined by it.
2013-01-31 Richard Biener <rguenther@suse.de>
PR tree-optimization/56150
* tree-ssa-loop-manip.c (find_uses_to_rename_stmt): Do not
visit virtual operands.
......
......@@ -792,6 +792,10 @@ Driver Undocumented
fabi-version=
Common Joined RejectNegative UInteger Var(flag_abi_version) Init(2)
faggressive-loop-optimizations
Common Report Var(flag_aggressive_loop_optimizations) Optimization Init(1)
Aggressively optimize loops using language constraints
falign-functions
Common Report Var(align_functions,0) Optimization UInteger
Align the start of functions
......
......@@ -349,7 +349,8 @@ Objective-C and Objective-C++ Dialects}.
@item Optimization Options
@xref{Optimize Options,,Options that Control Optimization}.
@gccoptlist{-falign-functions[=@var{n}] -falign-jumps[=@var{n}] @gol
@gccoptlist{-faggressive-loop-optimizations -falign-functions[=@var{n}] @gol
-falign-jumps[=@var{n}] @gol
-falign-labels[=@var{n}] -falign-loops[=@var{n}] @gol
-fassociative-math -fauto-inc-dec -fbranch-probabilities @gol
-fbranch-target-load-optimize -fbranch-target-load-optimize2 @gol
......@@ -6988,6 +6989,16 @@ When @option{-fgcse-after-reload} is enabled, a redundant load elimination
pass is performed after reload. The purpose of this pass is to clean up
redundant spilling.
@item -faggressive-loop-optimizations
@opindex faggressive-loop-optimizations
This option tells the loop optimizer to use language constraints to
derive bounds for the number of iterations of a loop. This assumes that
loop code does not invoke undefined behavior by for example causing signed
integer overflows or out-of-bound array accesses. The bounds for the
number of iterations of a loop are used to guide loop unrolling and peeling
and loop exit test optimizations.
This option is enabled by default.
@item -funsafe-loop-optimizations
@opindex funsafe-loop-optimizations
This option tells the loop optimizer to assume that loop indices do not
......
......@@ -3336,7 +3336,8 @@ estimate_numbers_of_iterations_loop (struct loop *loop)
}
exits.release ();
infer_loop_bounds_from_undefined (loop);
if (flag_aggressive_loop_optimizations)
infer_loop_bounds_from_undefined (loop);
discover_iteration_bound_by_body_walk (loop);
......
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