From efd1233d5901e06b690c0d882c0d66dd4e452e50 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Tue, 2 Oct 2007 20:06:14 +0000 Subject: [PATCH] Do not imply -ftree-vrp with -O2 and above. One must implicitly specify '-ftree-vrp' if one wants it. Some bad code generation has been tracked to -ftree-vrp. jdk1{5,6} are notable examples. Approved by: re(kensmith) --- contrib/gcc/opts.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contrib/gcc/opts.c b/contrib/gcc/opts.c index 90a733078053..3de5627174e7 100644 --- a/contrib/gcc/opts.c +++ b/contrib/gcc/opts.c @@ -501,7 +501,10 @@ decode_options (unsigned int argc, const char **argv) flag_reorder_functions = 1; flag_tree_store_ccp = 1; flag_tree_store_copy_prop = 1; - flag_tree_vrp = 1; + /* XXX: some issues with ports have been traced to -ftree-vrp. + So remove it from -O2 and above. Note that jdk1{5,6} are affected + and they build with w/-O3 - so we cannot just move it to -O3. */ + // flag_tree_vrp = 1; if (!optimize_size) {