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
This commit is contained in:
Richard Biener 2013-01-31 09:00:54 +00:00 committed by Richard Biener
parent 636f59cfb3
commit 6e61611091
4 changed files with 27 additions and 2 deletions

View File

@ -1,3 +1,12 @@
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

View File

@ -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

View File

@ -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

View File

@ -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);