From: H.J. Lu Date: Fri, 10 Apr 2009 18:58:12 +0000 (-0700) Subject: re PR middle-end/39701 (Revision 145846 caused many test failures) X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1ad2f450a07b32d08f8b9c64cf6b708adf406be1;p=platform%2Fupstream%2Fgcc.git re PR middle-end/39701 (Revision 145846 caused many test failures) 2009-04-10 H.J. Lu PR middle-end/39701 * common.opt (-fdelete-null-pointer-checks): Initialize to 1. * opts.c (decode_options): Don't set flag_delete_null_pointer_checks here. * doc/invoke.texi: Update -fdelete-null-pointer-checks. From-SVN: r145937 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9965730..c61b4cd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2009-04-10 H.J. Lu + + PR middle-end/39701 + * common.opt (-fdelete-null-pointer-checks): Initialize to 1. + + * opts.c (decode_options): Don't set flag_delete_null_pointer_checks + here. + + * doc/invoke.texi: Update -fdelete-null-pointer-checks. + 2009-04-10 Chao-ying Fu * doc/tm.texi (Instruction Output): Document @@ -18,8 +28,8 @@ 2009-04-10 Paolo Bonzini PR middle-end/39701 - * fold-const.c (tree_single_nonzero_warnv_p): Pass non-static - variables as non-NULL even with -fdelete-null-pointer-checks. + * fold-const.c (tree_single_nonzero_warnv_p): Pass non-static + variables as non-NULL even with -fdelete-null-pointer-checks. 2009-04-10 H.J. Lu @@ -54,8 +64,8 @@ * expmed.c (expand_divmod): Always use a comparison for a division by a large unsigned integer. - * fold-const.c (tree_single_nonzero_warnv_p): Always treat decls - for things others than variables or functions as nonzero. + * fold-const.c (tree_single_nonzero_warnv_p): Always treat decls + for things others than variables or functions as nonzero. 2009-04-09 Nick Clifton @@ -396,40 +406,40 @@ 2009-04-09 Paolo Bonzini - * config/i386/i386.md (cmpcc): New. - * config/i386/sync.md (sync_compare_and_swap*): Set FLAGS_REG. - (sync_compare_and_swap_cc*): Delete. - - * config/s390/s390.c (s390_compare_emitted): Remove. - (s390_emit_compare): Handle MODE_CC s390_compare_op0 like - s390_compare_emitted used to be handled. Assert that modes match. - (s390_emit_compare_and_swap): Use s390_emit_compare, do not - refer to sync_compare_and_swap_ccsi. - * config/s390/s390.h (s390_compare_emitted): Remove. - * config/s390/s390.md (seq): Look for MODE_CC s390_compare_op0 - instead of s390_compare_emitted. - (stack_protect_test, sync_compare_and_swap_cc): Set s390_compare_op0 - instead of s390_compare_emitted. - * config/s390/s390.md (cmpcc): New. - (sync_compare_and_swapqi, sync_compare_and_swaphi): Clobber - CC_REGNUM, do not pretend it's set. - (sync_compare_and_swap_cc*): Delete. - * config/s390/predicates.md (cc_reg_operand): New. - - * expr.c (sync_compare_and_swap_cc): Delete. - * optabs.h (sync_compare_and_swap_cc): Delete. - * optabs.c (prepare_cmp_insn): Ignore which specific CCmode - is being used with can_compare_p. - (emit_cmp_and_jump_insn_1): Likewise when looking in the optab. - (find_cc_set): New. - (expand_bool_compare_and_swap): Do not use sync_compare_and_swap_cc, - look for a MODE_CC set instead. Use emit_store_flag. - (expand_compare_and_swap_loop): Likewise, with some additional - complication to avoid a force_reg when useless. Use - emit_cmp_and_jump_insns. - * genopinit.c (optabs): Delete sync_compare_and_swap_cc. - * doc/md.texi (sync_compare_and_swap_cc): Merge with - sync_compare_and_swap documentation. + * config/i386/i386.md (cmpcc): New. + * config/i386/sync.md (sync_compare_and_swap*): Set FLAGS_REG. + (sync_compare_and_swap_cc*): Delete. + + * config/s390/s390.c (s390_compare_emitted): Remove. + (s390_emit_compare): Handle MODE_CC s390_compare_op0 like + s390_compare_emitted used to be handled. Assert that modes match. + (s390_emit_compare_and_swap): Use s390_emit_compare, do not + refer to sync_compare_and_swap_ccsi. + * config/s390/s390.h (s390_compare_emitted): Remove. + * config/s390/s390.md (seq): Look for MODE_CC s390_compare_op0 + instead of s390_compare_emitted. + (stack_protect_test, sync_compare_and_swap_cc): Set s390_compare_op0 + instead of s390_compare_emitted. + * config/s390/s390.md (cmpcc): New. + (sync_compare_and_swapqi, sync_compare_and_swaphi): Clobber + CC_REGNUM, do not pretend it's set. + (sync_compare_and_swap_cc*): Delete. + * config/s390/predicates.md (cc_reg_operand): New. + + * expr.c (sync_compare_and_swap_cc): Delete. + * optabs.h (sync_compare_and_swap_cc): Delete. + * optabs.c (prepare_cmp_insn): Ignore which specific CCmode + is being used with can_compare_p. + (emit_cmp_and_jump_insn_1): Likewise when looking in the optab. + (find_cc_set): New. + (expand_bool_compare_and_swap): Do not use sync_compare_and_swap_cc, + look for a MODE_CC set instead. Use emit_store_flag. + (expand_compare_and_swap_loop): Likewise, with some additional + complication to avoid a force_reg when useless. Use + emit_cmp_and_jump_insns. + * genopinit.c (optabs): Delete sync_compare_and_swap_cc. + * doc/md.texi (sync_compare_and_swap_cc): Merge with + sync_compare_and_swap documentation. 2009-04-09 Jan Hubicka diff --git a/gcc/common.opt b/gcc/common.opt index 1cc0ac2..c15de5a 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -436,7 +436,7 @@ Common Report Var(flag_delayed_branch) Optimization Attempt to fill delay slots of branch instructions fdelete-null-pointer-checks -Common Report Var(flag_delete_null_pointer_checks) Optimization +Common Report Var(flag_delete_null_pointer_checks) Init(1) Optimization Delete useless null pointer checks fdiagnostics-show-location= diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 29ccb22..e87de62 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -5898,7 +5898,7 @@ safely dereference null pointers. Use @option{-fno-delete-null-pointer-checks} to disable this optimization for programs which depend on that behavior. -Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. +Enabled by default. @item -fexpensive-optimizations @opindex fexpensive-optimizations diff --git a/gcc/opts.c b/gcc/opts.c index 2c7531e..76f5d1e 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -894,7 +894,6 @@ decode_options (unsigned int argc, const char **argv) flag_regmove = opt2; flag_strict_aliasing = opt2; flag_strict_overflow = opt2; - flag_delete_null_pointer_checks = opt2; flag_reorder_blocks = opt2; flag_reorder_functions = opt2; flag_tree_vrp = opt2;