summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gnu.org>2009-04-11 00:43:33 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2009-04-10 17:43:33 -0700
commit567a90f59cd53598b49d52fe079d025ec8752ca1 (patch)
treece35741803e4b49332cd8345a4ec57c833a70ba1
parent1f544684434f7058560b224cccd2286585e70ea2 (diff)
downloadgcc-567a90f59cd53598b49d52fe079d025ec8752ca1.tar.gz
re PR middle-end/39701 (Revision 145846 caused many test failures)
2009-04-10 Paolo Bonzini <bonzini@gnu.org> PR tree-optimization/39701 * doc/invoke.texi (Optimization Options): Document change in meaning and initialization of -fdelete-null-pointer-checks. From-SVN: r145948
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/doc/invoke.texi23
2 files changed, 20 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c61b4cde606..24e0f46f56f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2009-04-10 Paolo Bonzini <bonzini@gnu.org>
+
+ PR tree-optimization/39701
+ * doc/invoke.texi (Optimization Options): Document change in
+ meaning and initialization of -fdelete-null-pointer-checks.
+
2009-04-10 H.J. Lu <hongjiu.lu@intel.com>
PR middle-end/39701
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index e87de62049a..a09ce75d362 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -5888,17 +5888,22 @@ Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
@item -fdelete-null-pointer-checks
@opindex fdelete-null-pointer-checks
-Use global dataflow analysis to identify and eliminate useless checks
-for null pointers. The compiler assumes that dereferencing a null
-pointer would have halted the program. If a pointer is checked after
-it has already been dereferenced, it cannot be null.
-
-In some environments, this assumption is not true, and programs can
-safely dereference null pointers. Use
-@option{-fno-delete-null-pointer-checks} to disable this optimization
+Assume that programs cannot safely dereference null pointers, and that
+no code or data element resides there. This enables simple constant
+folding optimizations at all optimization levels. In addition, other
+optimization passes in GCC use this flag to control global dataflow
+analyses that eliminate useless checks for null pointers; these assume
+that if a pointer is checked after it has already been dereferenced,
+it cannot be null.
+
+Note however that in some environments this assumption is not true.
+Use @option{-fno-delete-null-pointer-checks} to disable this optimization
for programs which depend on that behavior.
-Enabled by default.
+Some targets, especially embedded ones, disable this option at all levels.
+Otherwise it is enabled at all levels: @option{-O0}, @option{-O1},
+@option{-O2}, @option{-O3}, @option{-Os}. Passes that use the information
+are enabled independently at different optimization levels.
@item -fexpensive-optimizations
@opindex fexpensive-optimizations