aboutsummaryrefslogtreecommitdiff
path: root/gcc/common.opt
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2013-03-14 09:13:36 +0000
committerJakub Jelinek <jakub@redhat.com>2013-03-14 09:13:36 +0000
commit95295010ca099bff71bbcfacc984d1d965200b90 (patch)
tree20df72f941802d316ad1e5b63a60b221cc29586a /gcc/common.opt
parent8b23f4f43ae7ed8a1bed2cbd6bc7109b20d1952c (diff)
PR tree-optimization/53265
* common.opt (Waggressive-loop-optimizations): New option. * tree-ssa-loop-niter.c: Include tree-pass.h. (do_warn_aggressive_loop_optimizations): New function. (record_estimate): Call it. Don't add !is_exit bounds to loop->bounds if number_of_latch_executions returned constant. (estimate_numbers_of_iterations_loop): Call number_of_latch_executions early. If number_of_latch_executions returned constant, set nb_iterations_upper_bound back to it. * cfgloop.h (struct loop): Add warned_aggressive_loop_optimizations field. * Makefile.in (tree-ssa-loop-niter.o): Depend on $(TREE_PASS_H). * doc/invoke.texi (-Wno-aggressive-loop-optimizations): Document. * gcc.dg/pr53265.c: New test. * gcc.dg/torture/pr49518.c: Add -Wno-aggressive-loop-optimizations to dg-options. * g++.dg/opt/longbranch2.C (EBCOTLut): Double sizes of a2 and a3 arrays. * gcc.dg/tree-ssa/cunroll-10.c (main): Rename to foo. Add argument n, use it as high bound instead of 4. * unwind-dw2.c (execute_cfa_program): Avoid -Waggressive-array-optimizations warnings for DW_CFA_GNU_window_save on targets with DWARF_FRAME_REGISTERS < 32. * testsuite/libmudflap.c/fail37-frag.c: Add optimization barrier. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@196650 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/common.opt')
-rw-r--r--gcc/common.opt4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/common.opt b/gcc/common.opt
index 3c7b4153846..bdbd3b6cd9e 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -505,6 +505,10 @@ Waggregate-return
Common Var(warn_aggregate_return) Warning
Warn about returning structures, unions or arrays
+Waggressive-loop-optimizations
+Common Var(warn_aggressive_loop_optimizations) Init(1) Warning
+Warn if a loop with constant number of iterations triggers undefined behavior
+
Warray-bounds
Common Var(warn_array_bounds) Warning
Warn if an array is accessed out of bounds