diff options
author | Jeff Law <law@redhat.com> | 2019-04-25 08:32:16 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2019-04-25 08:32:16 -0600 |
commit | 33579b59aaf02eb726c62d0e63e51af2d94610f4 (patch) | |
tree | ebb2e235a5cec9ff41fc7e79a6c37d6fb50dc8e9 /gcc/passes.def | |
parent | b16f214775619dd850e724a0630792da38ba3e40 (diff) |
re PR tree-optimization/90037 (-Wnull-dereference false positive after r269302)
PR tree-optimization/90037
* Makefile.in (OBJS): Remove tree-ssa-phionlycprop.c
* passes.def: Replace all instance of phi-only cprop with the
lattice propagator. Move propagation pass from after erroneous
path isolation to before erroneous path isolation.
* tree-ssa-phionlycprop.c: Remove.
* gcc.dg/tree-ssa/20030710-1.c: Update dump file to scan.
* gcc.dg/isolate-2.c: Likewise.
* gcc.dg/isolate-4.c: Likewise.
* gcc.dg/pr19431.c: Accept either ordering of PHI args.
* gcc.dg/pr90037.c: New test.
From-SVN: r270574
Diffstat (limited to 'gcc/passes.def')
-rw-r--r-- | gcc/passes.def | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/gcc/passes.def b/gcc/passes.def index 446a7c48276..bc147c4444d 100644 --- a/gcc/passes.def +++ b/gcc/passes.def @@ -222,19 +222,13 @@ along with GCC; see the file COPYING3. If not see trying to move or duplicate pass_dominator somewhere earlier. */ NEXT_PASS (pass_thread_jumps); NEXT_PASS (pass_dominator, true /* may_peel_loop_headers_p */); - /* At this point the majority of const/copy propagations - are exposed. Go ahead and identify paths that should never - be executed in a conforming program and isolate those paths. - - This will expose more degenerate PHIs in the main path and - expose more PRE/DOM optimization opportunities. */ + /* Threading can leave many const/copy propagations in the IL. + Clean them up. Failure to do so well can lead to false + positives from warnings for erroneous code. */ + NEXT_PASS (pass_copy_prop); + /* Identify paths that should never be executed in a conforming + program and isolate those paths. */ NEXT_PASS (pass_isolate_erroneous_paths); - /* The only const/copy propagation opportunities left after - DOM and erroneous path isolation should be due to degenerate PHI nodes. - So rather than run the full propagators, run a specialized pass which - only examines PHIs to discover const/copy propagation - opportunities. */ - NEXT_PASS (pass_phi_only_cprop); NEXT_PASS (pass_dse); NEXT_PASS (pass_reassoc, true /* insert_powi_p */); NEXT_PASS (pass_dce); @@ -321,13 +315,10 @@ along with GCC; see the file COPYING3. If not see NEXT_PASS (pass_strlen); NEXT_PASS (pass_thread_jumps); NEXT_PASS (pass_vrp, false /* warn_array_bounds_p */); - /* The only const/copy propagation opportunities left after - DOM and VRP should be due to degenerate PHI nodes. So rather than - run the full propagators, run a specialized pass which - only examines PHIs to discover const/copy propagation - opportunities. */ NEXT_PASS (pass_warn_restrict); - NEXT_PASS (pass_phi_only_cprop); + /* Threading can leave many const/copy propagations in the IL. + Clean them up. */ + NEXT_PASS (pass_copy_prop); NEXT_PASS (pass_dse); NEXT_PASS (pass_cd_dce); NEXT_PASS (pass_forwprop); |