This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tuples][patch] Dead Store Elimination


On 3/26/08 6:13 AM, Jakub Staszak wrote:

Previously I wrote there was "no regression", but there were four regressions:
< FAIL: gcc.dg/tree-ssa/ssa-dse-1.c scan-tree-dump-times dse1 " = 4" 0
< FAIL: gcc.dg/tree-ssa/ssa-dse-1.c scan-tree-dump-times dse1 " return 4" 1
< FAIL: gcc.dg/tree-ssa/ssa-dse-6.c scan-tree-dump-times dse1 "local2 = " 1
< FAIL: gcc.dg/tree-ssa/ssa-dse-7.c scan-tree-dump-times dse1 "return 5" 1


These regressions occurred because of "{dg-final}" instructions for dse only and lack
of pass_copyprop. These regressions should disappear after pass_copyprop is ready.

That's fine.



* gimple.h (gimple_uid, gimple_set_uid): Defined.
(gimple_statement_base): Field UID added.
* tree-ssa-dse.c (execute_simple_dse): #if 0 removed, bitmap_empty_p condition
added. (memory_ssa_name_same, memory_address_same, get_kill_of_stmt_lhs,
dse_possible_dead_store_p, dse_optimize_stmt, dse_record_phis,
dse_finalize_block, tree_ssa_dse): Tuplified.
* passes.c (init_optimization_passes): pass_simple_dse and pass_dse enabled.
* testsuite/gcc.dg/tree-ssa/ssa-dse-10.c: {dg-final} changed.
* testsuite/gcc.dg/tree-ssa/pr30375.c: {dg-final} changed.

OK with one nit:


- return stmt_ann (stmt)->uid;
+ return gimple_uid (stmt);
}
+ phis = phi_nodes (bb);
+
+ for (gsi = gsi_start (phis); !gsi_end_p (gsi); gsi_next (&gsi))

You can call gsi_start_phis() here.


For future patches, it makes things a bit easier to review if you use the -p switch to diff.

Thanks for the quick fix.


Diego.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]