Commit bc300fec by Xinliang David Li Committed by Xinliang David Li

Revert r135493 & r135463

From-SVN: r135599
parent 0002cb25
2008-05-19 Xinliang David Li <davidxl@google.com>
* tree-ssa-dce.c: Revert patches of 2008-05-17 and 2008-05-18.
* opts.c: Ditto.
* common.opt: Ditto.
* doc/invoke.texi: Ditto.
2008-05-19 Eric Botcazou <ebotcazou@adacore.com> 2008-05-19 Eric Botcazou <ebotcazou@adacore.com>
* tree.c (substitute_in_expr) <tcc_vl_exp>: Fix thinko. * tree.c (substitute_in_expr) <tcc_vl_exp>: Fix thinko.
......
...@@ -1259,10 +1259,6 @@ fweb ...@@ -1259,10 +1259,6 @@ fweb
Common Report Var(flag_web) Init(2) Optimization Common Report Var(flag_web) Init(2) Optimization
Construct webs and split unrelated uses of single variable Construct webs and split unrelated uses of single variable
ftree-builtin-dce
Common Report Var(flag_tree_builtin_dce) Init(0) Optimization
Enable conditional dead code elimination for builtin calls.
fwhole-program fwhole-program
Common Report Var(flag_whole_program) Init(0) Optimization Common Report Var(flag_whole_program) Init(0) Optimization
Perform whole program optimizations Perform whole program optimizations
......
...@@ -353,7 +353,7 @@ Objective-C and Objective-C++ Dialects}. ...@@ -353,7 +353,7 @@ Objective-C and Objective-C++ Dialects}.
-fsignaling-nans -fsingle-precision-constant -fsplit-ivs-in-unroller @gol -fsignaling-nans -fsingle-precision-constant -fsplit-ivs-in-unroller @gol
-fsplit-wide-types -fstack-protector -fstack-protector-all @gol -fsplit-wide-types -fstack-protector -fstack-protector-all @gol
-fstrict-aliasing -fstrict-overflow -fthread-jumps -ftracer -ftree-ccp @gol -fstrict-aliasing -fstrict-overflow -fthread-jumps -ftracer -ftree-ccp @gol
-ftree-ch -ftree-copy-prop -ftree-copyrename -ftree-dce -ftree-builtin-dce@gol -ftree-ch -ftree-copy-prop -ftree-copyrename -ftree-dce @gol
-ftree-dominator-opts -ftree-dse -ftree-fre -ftree-loop-im @gol -ftree-dominator-opts -ftree-dse -ftree-fre -ftree-loop-im @gol
-ftree-loop-distribution @gol -ftree-loop-distribution @gol
-ftree-loop-ivcanon -ftree-loop-linear -ftree-loop-optimize @gol -ftree-loop-ivcanon -ftree-loop-linear -ftree-loop-optimize @gol
...@@ -5157,7 +5157,6 @@ compilation time. ...@@ -5157,7 +5157,6 @@ compilation time.
-ftree-ch @gol -ftree-ch @gol
-ftree-copyrename @gol -ftree-copyrename @gol
-ftree-dce @gol -ftree-dce @gol
-ftree-builtin-dce @gol
-ftree-dominator-opts @gol -ftree-dominator-opts @gol
-ftree-dse @gol -ftree-dse @gol
-ftree-fre @gol -ftree-fre @gol
...@@ -5874,12 +5873,6 @@ enabled by default at @option{-O2} and higher. ...@@ -5874,12 +5873,6 @@ enabled by default at @option{-O2} and higher.
Perform dead code elimination (DCE) on trees. This flag is enabled by Perform dead code elimination (DCE) on trees. This flag is enabled by
default at @option{-O} and higher. default at @option{-O} and higher.
@item -ftree-builtin-dce
@opindex ftree-builtin-dce
Perform conditional dead code elimination (DCE) for calls to builtin functions
that may set errno but are otherwise side-effect free. This flag is enabled by
default at @option{-O2} and higher.
@item -ftree-dominator-opts @item -ftree-dominator-opts
@opindex ftree-dominator-opts @opindex ftree-dominator-opts
Perform a variety of simple scalar cleanups (constant/copy Perform a variety of simple scalar cleanups (constant/copy
......
...@@ -886,7 +886,6 @@ decode_options (unsigned int argc, const char **argv) ...@@ -886,7 +886,6 @@ decode_options (unsigned int argc, const char **argv)
flag_reorder_functions = 1; flag_reorder_functions = 1;
flag_tree_store_ccp = 1; flag_tree_store_ccp = 1;
flag_tree_vrp = 1; flag_tree_vrp = 1;
flag_tree_builtin_dce = 1;
if (!optimize_size) if (!optimize_size)
{ {
......
2008-05-19 Xinliang David Li <davidxl@google.com>
* gcc.dg/cdce1.c: Remove test.
* gcc.dg/cdce2.c: Remove test.
2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/36265 PR fortran/36265
......
/* { dg-do run } */
/* { dg-options "-O2 -fdump-tree-dce1-details -lm" } */
/* { dg-message "note: function call is shrink-wrapped into error conditions\." "Missing conditional dce" {target "*-*-*"} 15 } */
#include <stdlib.h>
#include <math.h>
#include <errno.h>
#include <stdio.h>
int total_err_count = 0;
double foo_opt(int x, double y) __attribute__((noinline));
double foo_opt(int x, double y)
{
double yy = 0;
errno = 0;
yy = pow(x,y);
return 0;
}
double foo(int x, double y) __attribute__((noinline));
double foo(int x, double y)
{
double yy = 0;
errno = 0;
yy = pow(x,y);
return yy;
}
int test(double (*fp)(int x, double y))
{
int i,x;
x = 127;
for (i = 30; i < 300; i++)
{
fp(x,i);
if (errno)
total_err_count ++;
}
x = -300;
for (i = 100; i < 300; i++)
{
fp(x,i);
if (errno)
total_err_count ++;
}
x = 65577;
for (i = 60; i < 200; i++)
{
fp(x,i);
if (errno)
total_err_count ++;
}
x = 65577*127;
for (i = 1; i < 100; i++)
{
fp(x,i);
if (errno)
total_err_count ++;
}
return total_err_count;
}
int main()
{
int en1, en2;
total_err_count = 0;
en1 = test(foo_opt);
total_err_count = 0;
en2 = test(foo);
printf("total number of errors = %d, %d\n", en1, en2);
if (en1 != en2)
abort();
return 0;
}
/* { dg-do run } */
/* { dg-options "-O2 -fdump-tree-dce1-details -lm" } */
/* { dg-message "note: function call is shrink-wrapped into error conditions\." "Missing conditional dce" {target "*-*-*"} 15 } */
#include <stdlib.h>
#include <math.h>
#include <errno.h>
#include <stdio.h>
int total_err_count = 0;
double foo_opt(double y) __attribute__((noinline));
double foo_opt(double y)
{
double yy = 0;
errno = 0;
yy = log(y);
return 0;
}
double foo(double y) __attribute__((noinline));
double foo(double y)
{
double yy = 0;
errno = 0;
yy = log(y);
return yy;
}
int test(double (*fp)(double y) )
{
int i,x;
for (i = -100; i < 100; i++)
{
fp(i);
if (errno)
total_err_count ++;
}
return total_err_count;
}
int main()
{
int en1, en2;
double yy;
total_err_count = 0;
en1 = test(foo_opt);
total_err_count = 0;
en2 = test(foo);
if (en1 != en2)
abort();
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment