From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30157 invoked by alias); 24 Apr 2009 14:21:41 -0000 Received: (qmail 30113 invoked by uid 22791); 24 Apr 2009 14:21:33 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_26,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from fk-out-0910.google.com (HELO fk-out-0910.google.com) (209.85.128.186) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 24 Apr 2009 14:21:24 +0000 Received: by fk-out-0910.google.com with SMTP id 18so559821fks.8 for ; Fri, 24 Apr 2009 07:21:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.52.2 with SMTP id f2mr2129690bkg.90.1240582880296; Fri, 24 Apr 2009 07:21:20 -0700 (PDT) In-Reply-To: References: <49EE0F0C.1090101@redhat.com> Date: Fri, 24 Apr 2009 14:32:00 -0000 Message-ID: <84fc9c000904240721he410b55p9776a1d033f82fc3@mail.gmail.com> Subject: Re: [RFA] expand from SSA form (1/2) From: Richard Guenther To: Michael Matz Cc: gcc-patches@gcc.gnu.org, Andrew MacLeod , Andrey Belevantsev Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2009-04/txt/msg01915.txt.bz2 On Wed, Apr 22, 2009 at 6:42 PM, Michael Matz wrote: > On Wed, 22 Apr 2009, Michael Matz wrote: > >> I'll soon send a new version of the patch that fixes all problems and >> testcases I encountered. > > Like so. =A0This is the full patch, i.e. including the cleanups, but > excluding the testsuite changes. =A0It should incorporate all feedback. > Compared to the last version it adds comments for new functions, fixes > muflap2, and generally some other minor problems showing when I started > testing Ada and a bug reported by Andrey. > > This patch (plus testsuite changes) was bootstrapped with Ada on > x86_64-linux. =A0There are no testsuite regressions: > FAIL: gcc.dg/tree-prof/bb-reorg.c compilation, =A0-fprofile-use -D_PROFIL= E_USE > FAIL: gcc.dg/tree-prof/pr34999.c compilation, =A0-fprofile-use -D_PROFILE= _USE > FAIL: gcc.target/i386/avx-vmovntdq-256-1.c (test for excess errors) > FAIL: gcc.target/i386/avx-vmovntpd-256-1.c (test for excess errors) > FAIL: gcc.target/i386/avx-vmovntps-256-1.c (test for excess errors) > FAIL: libmudflap.c++/pass41-frag.cxx execution test > FAIL: libmudflap.c++/pass41-frag.cxx (-static) execution test > FAIL: libmudflap.c++/pass41-frag.cxx (-O2) execution test > FAIL: libmudflap.c++/pass41-frag.cxx (-O3) execution test > > All of these happen without the patch too (known bugs, old binutils, and > pass41-frag never seems to work anyway). > > I'd like to ask for approval for the series. > > > Ciao, > Michael. > -- > =A0 =A0 =A0 =A0* builtins.c (fold_builtin_next_arg): Handle SSA names. > =A0 =A0 =A0 =A0* tree-ssa-copyrename.c (rename_ssa_copies): Don't iterate > =A0 =A0 =A0 =A0beyond num_ssa_names, use ssa_name() directly. > =A0 =A0 =A0 =A0* tree-ssa-ter.c (free_temp_expr_table): Likewise. > =A0 =A0 =A0 =A0* tree-ssa-coalesce.c (create_outofssa_var_map): Likewise, > =A0 =A0 =A0 =A0mark only useful SSA names. > =A0 =A0 =A0 =A0(compare_pairs): Swap cost comparison. > =A0 =A0 =A0 =A0(coalesce_ssa_name): Don't use change_partition_var. > =A0 =A0 =A0 =A0* tree-nrv.c (struct nrv_data): Add modified member. > =A0 =A0 =A0 =A0(finalize_nrv_r): Set it. > =A0 =A0 =A0 =A0(tree_nrv): Use it to update statements. > =A0 =A0 =A0 =A0(pass_nrv): Require PROP_ssa. > =A0 =A0 =A0 =A0* tree-mudflap.c (create_referenced_var): New static helpe= r. > =A0 =A0 =A0 =A0(mf_decl_cache_locals, mf_build_check_statement_for): Use = it. > =A0 =A0 =A0 =A0(pass_mudflap_2): Require PROP_ssa, run ssa update at fini= sh. > =A0 =A0 =A0 =A0* alias.c (find_base_decl): Handle SSA names. > =A0 =A0 =A0 =A0* emit-rtl (set_reg_attrs_for_parm): Make non-static. > =A0 =A0 =A0 =A0(component_ref_for_mem_expr): Don't leak SSA names into RT= L. > =A0 =A0 =A0 =A0* rtl.h (set_reg_attrs_for_parm): Declare. > =A0 =A0 =A0 =A0* tree-optimize.c (pass_cleanup_cfg_post_optimizing): Rena= me > =A0 =A0 =A0 =A0to "optimized", remove unused locals at finish. > =A0 =A0 =A0 =A0(execute_free_datastructures): Make global, call > =A0 =A0 =A0 =A0delete_tree_cfg_annotations. > =A0 =A0 =A0 =A0(execute_free_cfg_annotations): Don't call > =A0 =A0 =A0 =A0delete_tree_cfg_annotations. > > =A0 =A0 =A0 =A0* ssaexpand.h: New file. > =A0 =A0 =A0 =A0* expr.c (toplevel): Include ssaexpand.h. > =A0 =A0 =A0 =A0(expand_assignment): Handle SSA names the same as register > =A0 =A0 =A0 =A0variables. > =A0 =A0 =A0 =A0(expand_expr_real_1): Expand SSA names. > =A0 =A0 =A0 =A0* cfgexpand.c (toplevel): Include ssaexpand.h. > =A0 =A0 =A0 =A0(SA): New global variable. > =A0 =A0 =A0 =A0(gimple_cond_pred_to_tree): Fold TERed comparisons into pr= edicates. > =A0 =A0 =A0 =A0(SSAVAR): New macro. > =A0 =A0 =A0 =A0(set_rtl): New helper function. > =A0 =A0 =A0 =A0(add_stack_var): Deal with SSA names, use set_rtl. > =A0 =A0 =A0 =A0(expand_one_stack_var_at): Likewise. > =A0 =A0 =A0 =A0(expand_one_stack_var): Deal with SSA names. > =A0 =A0 =A0 =A0(stack_var_size_cmp): Use code (SSA_NAME / DECL) as tie br= eaker > =A0 =A0 =A0 =A0before unique numbers. > =A0 =A0 =A0 =A0(expand_stack_vars): Use set_rtl. > =A0 =A0 =A0 =A0(expand_one_var): Accept SSA names, add asserts for them, = feed them > =A0 =A0 =A0 =A0to above subroutines. > =A0 =A0 =A0 =A0(expand_used_vars): Expand all partitions (without default= defs), > =A0 =A0 =A0 =A0then only the local decls (ignoring those expanded already= ). > =A0 =A0 =A0 =A0(expand_gimple_cond): Remove edges when jumpif() expands an > =A0 =A0 =A0 =A0unconditional jump. > =A0 =A0 =A0 =A0(expand_gimple_basic_block): Don't clear EDGE_EXECUTABLE h= ere, > =A0 =A0 =A0 =A0or remove abnormal edges. =A0Ignore insns setting the LHS = of a TERed > =A0 =A0 =A0 =A0SSA name. > =A0 =A0 =A0 =A0(gimple_expand_cfg): Call into rewrite_out_of_ssa, initial= ize > =A0 =A0 =A0 =A0members of SA; deal with PARM_DECL partitions here; expand > =A0 =A0 =A0 =A0all PHI nodes, free tree datastructures and SA. =A0Commit = instructions > =A0 =A0 =A0 =A0on edges, clear EDGE_EXECUTABLE and remove abnormal edges = here. > =A0 =A0 =A0 =A0(pass_expand): Require and destroy PROP_ssa, verify SSA fo= rm, flow > =A0 =A0 =A0 =A0info and statements at start, collect garbage at finish. > =A0 =A0 =A0 =A0* tree-ssa-live.h (struct _var_map): Remove partition_to_v= ar member. > =A0 =A0 =A0 =A0(VAR_ANN_PARTITION) Remove. > =A0 =A0 =A0 =A0(change_partition_var): Don't declare. > =A0 =A0 =A0 =A0(partition_to_var): Always return SSA names. > =A0 =A0 =A0 =A0(var_to_partition): Only accept SSA names. > =A0 =A0 =A0 =A0(register_ssa_partition): Only check argument. > =A0 =A0 =A0 =A0* tree-ssa-live.c (init_var_map): Don't allocate partition= _to_var > =A0 =A0 =A0 =A0member. > =A0 =A0 =A0 =A0(delete_var_map): Don't free it. > =A0 =A0 =A0 =A0(var_union): Only accept SSA names, simplify. > =A0 =A0 =A0 =A0(partition_view_init): Mark only useful SSA names as used. > =A0 =A0 =A0 =A0(partition_view_fini): Only deal with SSA names. > =A0 =A0 =A0 =A0(change_partition_var): Remove. > =A0 =A0 =A0 =A0(dump_var_map): Use ssa_name instead of partition_to_var m= ember. > =A0 =A0 =A0 =A0* tree-ssa.c (delete_tree_ssa): Don't remove PHI nodes on = RTL > =A0 =A0 =A0 =A0basic blocks. > =A0 =A0 =A0 =A0* tree-outof-ssa.c (toplevel): Include ssaexpand.h and exp= r.h. > =A0 =A0 =A0 =A0(struct _elim_graph): New member const_dests; nodes member= vector of > =A0 =A0 =A0 =A0ints. > =A0 =A0 =A0 =A0(set_location_for_edge): New static helper. > =A0 =A0 =A0 =A0(create_temp): Remove. > =A0 =A0 =A0 =A0(insert_partition_copy_on_edge, insert_part_to_rtx_on_edge, > =A0 =A0 =A0 =A0insert_value_copy_on_edge, insert_rtx_to_part_on_edge): New > =A0 =A0 =A0 =A0functions. > =A0 =A0 =A0 =A0(new_elim_graph): Allocate const_dests member. > =A0 =A0 =A0 =A0(clean_elim_graph): Truncate const_dests member. > =A0 =A0 =A0 =A0(delete_elim_graph): Free const_dests member. > =A0 =A0 =A0 =A0(elim_graph_size): Adapt to new type of nodes member. > =A0 =A0 =A0 =A0(elim_graph_add_node): Likewise. > =A0 =A0 =A0 =A0(eliminate_name): Likewise. > =A0 =A0 =A0 =A0(eliminate_build): Don't take basic block argument, deal o= nly with > =A0 =A0 =A0 =A0partition numbers, not variables. > =A0 =A0 =A0 =A0(get_temp_reg): New static helper. > =A0 =A0 =A0 =A0(elim_create): Use it, deal with RTL temporaries instead o= f trees. > =A0 =A0 =A0 =A0(eliminate_phi): Adjust all calls to new signature. > =A0 =A0 =A0 =A0(assign_vars, replace_use_variable, replace_def_variable):= Remove. > =A0 =A0 =A0 =A0(rewrite_trees): Only do checking. > =A0 =A0 =A0 =A0(edge_leader, stmt_list, leader_has_match, leader_match): = Remove. > =A0 =A0 =A0 =A0(same_stmt_list_p, identical_copies_p, identical_stmt_list= s_p, > =A0 =A0 =A0 =A0init_analyze_edges_for_bb, fini_analyze_edges_for_bb, > =A0 =A0 =A0 =A0contains_tree_r, MAX_STMTS_IN_LATCH, > =A0 =A0 =A0 =A0process_single_block_loop_latch, analyze_edges_for_bb, > =A0 =A0 =A0 =A0perform_edge_inserts): Remove. > =A0 =A0 =A0 =A0(expand_phi_nodes): New global function. > =A0 =A0 =A0 =A0(remove_ssa_form): Take ssaexpand parameter. =A0Don't call= removed > =A0 =A0 =A0 =A0functions, initialize new parameter, remember partitions h= aving a > =A0 =A0 =A0 =A0default def. > =A0 =A0 =A0 =A0(finish_out_of_ssa): New global function. > =A0 =A0 =A0 =A0(rewrite_out_of_ssa): Make global. =A0Adjust call to remov= e_ssa_form, > =A0 =A0 =A0 =A0don't reset in_ssa_p here. > =A0 =A0 =A0 =A0(pass_del_ssa): Remove. > =A0 =A0 =A0 =A0* tree-flow.h (struct var_ann_d): Remove out_of_ssa_tag and > =A0 =A0 =A0 =A0partition members. > =A0 =A0 =A0 =A0(execute_free_datastructures): Declare. > =A0 =A0 =A0 =A0* Makefile.in (SSAEXPAND_H): New variable. > =A0 =A0 =A0 =A0(tree-outof-ssa.o, expr.o, cfgexpand.o): Depend on SSAEXPA= ND_H. > =A0 =A0 =A0 =A0* basic-block.h (commit_one_edge_insertion): Declare. > =A0 =A0 =A0 =A0* passes.c (init_optimization_passes): Move pass_nrv and > =A0 =A0 =A0 =A0pass_mudflap2 before pass_cleanup_cfg_post_optimizing, rem= ove > =A0 =A0 =A0 =A0pass_del_ssa, pass_free_datastructures, pass_free_cfg_anno= tations. > =A0 =A0 =A0 =A0* cfgrtl.c (commit_one_edge_insertion): Make global, don't= declare. > =A0 =A0 =A0 =A0(redirect_branch_edge): Deal with super block when expandi= ng, split > =A0 =A0 =A0 =A0out jump patching itself into ... > =A0 =A0 =A0 =A0(patch_jump_insn): ... here, new static helper. Some comments inline... > Index: tree-ssa-copyrename.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > *** tree-ssa-copyrename.c =A0 =A0 =A0 (revision 146576) > --- tree-ssa-copyrename.c =A0 =A0 =A0 (working copy) > *************** rename_ssa_copies (void) > *** 291,297 **** > =A0 =A0else > =A0 =A0 =A0debug =3D NULL; > > ! =A0 map =3D init_var_map (num_ssa_names + 1); > > =A0 =A0FOR_EACH_BB (bb) > =A0 =A0 =A0{ > --- 291,297 ---- > =A0 =A0else > =A0 =A0 =A0debug =3D NULL; > > ! =A0 map =3D init_var_map (num_ssa_names); > > =A0 =A0FOR_EACH_BB (bb) > =A0 =A0 =A0{ > *************** rename_ssa_copies (void) > *** 339,350 **** > =A0 =A0/* Now one more pass to make all elements of a partition share the= same > =A0 =A0 =A0 root variable. =A0*/ > > ! =A0 for (x =3D 1; x <=3D num_ssa_names; x++) > =A0 =A0 =A0{ > =A0 =A0 =A0 =A0part_var =3D partition_to_var (map, x); > =A0 =A0 =A0 =A0if (!part_var) > =A0 =A0 =A0 =A0 =A0continue; > ! =A0 =A0 =A0 var =3D map->partition_to_var[x]; > =A0 =A0 =A0 =A0if (debug) > =A0 =A0 =A0 =A0 =A0{ > =A0 =A0 =A0 =A0 =A0if (SSA_NAME_VAR (var) !=3D SSA_NAME_VAR (part_var)) > --- 339,350 ---- > =A0 =A0/* Now one more pass to make all elements of a partition share the= same > =A0 =A0 =A0 root variable. =A0*/ > > ! =A0 for (x =3D 1; x < num_ssa_names; x++) > =A0 =A0 =A0{ > =A0 =A0 =A0 =A0part_var =3D partition_to_var (map, x); > =A0 =A0 =A0 =A0if (!part_var) > =A0 =A0 =A0 =A0 =A0continue; > ! =A0 =A0 =A0 var =3D ssa_name (x); > =A0 =A0 =A0 =A0if (debug) > =A0 =A0 =A0 =A0 =A0{ > =A0 =A0 =A0 =A0 =A0if (SSA_NAME_VAR (var) !=3D SSA_NAME_VAR (part_var)) This piece is ok as obvious. Please commit it separately. > Index: cfgexpand.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > *** cfgexpand.c (revision 146576) > --- cfgexpand.c (working copy) > *************** along with GCC; see the file COPYING3. > *** 42,49 **** > --- 42,54 ---- > =A0#include "tree-inline.h" > =A0#include "value-prof.h" > =A0#include "target.h" > + #include "ssaexpand.h" > > > + /* This variable holds information helping the rewriting of SSA trees > + =A0 =A0into RTL. =A0*/ > + struct ssaexpand SA; > + > =A0/* Return an expression tree corresponding to the RHS of GIMPLE > =A0 =A0 statement STMT. =A0*/ > > *************** gimple_assign_rhs_to_tree (gimple stmt) > *** 78,85 **** > =A0static tree > =A0gimple_cond_pred_to_tree (gimple stmt) > =A0{ > =A0 =A0return build2 (gimple_cond_code (stmt), boolean_type_node, > ! =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0gimple_cond_lhs (stmt), gimple_cond_rhs = (stmt)); > =A0} > > =A0/* Helper for gimple_to_tree. =A0Set EXPR_LOCATION for every expression > --- 83,104 ---- > =A0static tree > =A0gimple_cond_pred_to_tree (gimple stmt) > =A0{ > + =A0 /* We're sometimes presented with such code: > + =A0 =A0 =A0 =A0D.123_1 =3D x < y; > + =A0 =A0 =A0 =A0if (D.123_1 !=3D 0) > + =A0 =A0 =A0 =A0 =A0... > + =A0 =A0 =A0This would expand to two comparisons which then later might > + =A0 =A0 =A0be cleaned up by combine. =A0But some pattern matchers like = if-conversion > + =A0 =A0 =A0work better when there's only one compare, so make up for th= is > + =A0 =A0 =A0here as special exception if TER would have made the same ch= ange. =A0*/ > + =A0 tree lhs =3D gimple_cond_lhs (stmt); > + =A0 if (SA.values > + =A0 =A0 =A0 && TREE_CODE (lhs) =3D=3D SSA_NAME > + =A0 =A0 =A0 && SA.values[SSA_NAME_VERSION (lhs)]) > + =A0 =A0 lhs =3D gimple_assign_rhs_to_tree (SA.values[SSA_NAME_VERSION (= lhs)]); Do we really need the SA.values array here? It seems that a bitmap would be enough, as the definition should be still reachable via SSA_NAME_DEF_STMT (lhs). (Thanks Paolo for noticing this) > + > =A0 =A0return build2 (gimple_cond_code (stmt), boolean_type_node, > ! =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0lhs, gimple_cond_rhs (stmt)); > =A0} > > =A0/* Helper for gimple_to_tree. =A0Set EXPR_LOCATION for every expression > *************** failed: > *** 423,428 **** > --- 442,464 ---- > =A0#define STACK_ALIGNMENT_NEEDED 1 > =A0#endif > > + #define SSAVAR(x) (TREE_CODE (x) =3D=3D SSA_NAME ? SSA_NAME_VAR (x) : x) This should be in some public place, ideally with a more sound name. Any ideas? > + /* Associate declaration T with storage space X. =A0If T is no > + =A0 =A0SSA name this is exactly SET_DECL_RTL, otherwise make the > + =A0 =A0partition of T associated with X. =A0*/ > + static inline void > + set_rtl (tree t, rtx x) > + { > + =A0 if (TREE_CODE (t) =3D=3D SSA_NAME) > + =A0 =A0 { > + =A0 =A0 =A0 SA.partition_to_pseudo[var_to_partition (SA.map, t)] =3D x; > + =A0 =A0 =A0 if (x && !MEM_P (x)) > + =A0 =A0 =A0 set_reg_attrs_for_decl_rtl (SSA_NAME_VAR (t), x); > + =A0 =A0 } > + =A0 else > + =A0 =A0 SET_DECL_RTL (t, x); > + } > > =A0/* This structure holds data relevant to one variable that will be > =A0 =A0 placed in a stack slot. =A0*/ > *************** add_stack_var (tree decl) > *** 561,575 **** > =A0 =A0 =A0} > =A0 =A0stack_vars[stack_vars_num].decl =3D decl; > =A0 =A0stack_vars[stack_vars_num].offset =3D 0; > ! =A0 stack_vars[stack_vars_num].size =3D tree_low_cst (DECL_SIZE_UNIT (d= ecl), 1); > ! =A0 stack_vars[stack_vars_num].alignb =3D get_decl_align_unit (decl); > > =A0 =A0/* All variables are initially in their own partition. =A0*/ > =A0 =A0stack_vars[stack_vars_num].representative =3D stack_vars_num; > =A0 =A0stack_vars[stack_vars_num].next =3D EOC; > > =A0 =A0/* Ensure that this decl doesn't get put onto the list twice. =A0*/ > ! =A0 SET_DECL_RTL (decl, pc_rtx); > > =A0 =A0stack_vars_num++; > =A0} > --- 597,611 ---- > =A0 =A0 =A0} > =A0 =A0stack_vars[stack_vars_num].decl =3D decl; > =A0 =A0stack_vars[stack_vars_num].offset =3D 0; > ! =A0 stack_vars[stack_vars_num].size =3D tree_low_cst (DECL_SIZE_UNIT (S= SAVAR (decl)), 1); > ! =A0 stack_vars[stack_vars_num].alignb =3D get_decl_align_unit (SSAVAR (= decl)); > > =A0 =A0/* All variables are initially in their own partition. =A0*/ > =A0 =A0stack_vars[stack_vars_num].representative =3D stack_vars_num; > =A0 =A0stack_vars[stack_vars_num].next =3D EOC; > > =A0 =A0/* Ensure that this decl doesn't get put onto the list twice. =A0*/ > ! =A0 set_rtl (decl, pc_rtx); > > =A0 =A0stack_vars_num++; > =A0} > *************** add_alias_set_conflicts (void) > *** 688,709 **** > =A0} > > =A0/* A subroutine of partition_stack_vars. =A0A comparison function for = qsort, > ! =A0 =A0sorting an array of indices by the size of the object. =A0*/ > > =A0static int > =A0stack_var_size_cmp (const void *a, const void *b) > =A0{ > =A0 =A0HOST_WIDE_INT sa =3D stack_vars[*(const size_t *)a].size; > =A0 =A0HOST_WIDE_INT sb =3D stack_vars[*(const size_t *)b].size; > ! =A0 unsigned int uida =3D DECL_UID (stack_vars[*(const size_t *)a].decl= ); > ! =A0 unsigned int uidb =3D DECL_UID (stack_vars[*(const size_t *)b].decl= ); > > =A0 =A0if (sa < sb) > =A0 =A0 =A0return -1; > =A0 =A0if (sa > sb) > =A0 =A0 =A0return 1; > ! =A0 /* For stack variables of the same size use the uid of the decl > ! =A0 =A0 =A0to make the sort stable. =A0*/ > =A0 =A0if (uida < uidb) > =A0 =A0 =A0return -1; > =A0 =A0if (uida > uidb) > --- 724,760 ---- > =A0} > > =A0/* A subroutine of partition_stack_vars. =A0A comparison function for = qsort, > ! =A0 =A0sorting an array of indices by the size and type of the object. = =A0*/ > > =A0static int > =A0stack_var_size_cmp (const void *a, const void *b) > =A0{ > =A0 =A0HOST_WIDE_INT sa =3D stack_vars[*(const size_t *)a].size; > =A0 =A0HOST_WIDE_INT sb =3D stack_vars[*(const size_t *)b].size; > ! =A0 tree decla, declb; > ! =A0 unsigned int uida, uidb; > > =A0 =A0if (sa < sb) > =A0 =A0 =A0return -1; > =A0 =A0if (sa > sb) > =A0 =A0 =A0return 1; > ! =A0 decla =3D stack_vars[*(const size_t *)a].decl; > ! =A0 declb =3D stack_vars[*(const size_t *)b].decl; > ! =A0 /* For stack variables of the same size use and id of the decls > ! =A0 =A0 =A0to make the sort stable. =A0Two SSA names are compared by th= eir > ! =A0 =A0 =A0version, SSA names come before non-SSA names, and two normal > ! =A0 =A0 =A0decls are compared by their DECL_UID. =A0*/ > ! =A0 if (TREE_CODE (decla) =3D=3D SSA_NAME) > ! =A0 =A0 { > ! =A0 =A0 =A0 if (TREE_CODE (declb) =3D=3D SSA_NAME) > ! =A0 =A0 =A0 uida =3D SSA_NAME_VERSION (decla), uidb =3D SSA_NAME_VERSIO= N (declb); > ! =A0 =A0 =A0 else > ! =A0 =A0 =A0 return -1; > ! =A0 =A0 } > ! =A0 else if (TREE_CODE (declb) =3D=3D SSA_NAME) > ! =A0 =A0 return 1; > ! =A0 else > ! =A0 =A0 uida =3D DECL_UID (decla), uidb =3D DECL_UID (declb); > =A0 =A0if (uida < uidb) > =A0 =A0 =A0return -1; > =A0 =A0if (uida > uidb) > *************** expand_one_stack_var_at (tree decl, HOST > *** 874,894 **** > =A0 =A0gcc_assert (offset =3D=3D trunc_int_for_mode (offset, Pmode)); > > =A0 =A0x =3D plus_constant (virtual_stack_vars_rtx, offset); > ! =A0 x =3D gen_rtx_MEM (DECL_MODE (decl), x); > > ! =A0 /* Set alignment we actually gave this decl. =A0*/ > ! =A0 offset -=3D frame_phase; > ! =A0 align =3D offset & -offset; > ! =A0 align *=3D BITS_PER_UNIT; > ! =A0 if (align =3D=3D 0) > ! =A0 =A0 align =3D STACK_BOUNDARY; > ! =A0 else if (align > MAX_SUPPORTED_STACK_ALIGNMENT) > ! =A0 =A0 align =3D MAX_SUPPORTED_STACK_ALIGNMENT; > ! =A0 DECL_ALIGN (decl) =3D align; > ! =A0 DECL_USER_ALIGN (decl) =3D 0; > > ! =A0 set_mem_attributes (x, decl, true); > ! =A0 SET_DECL_RTL (decl, x); > =A0} > > =A0/* A subroutine of expand_used_vars. =A0Give each partition representa= tive > --- 925,951 ---- > =A0 =A0gcc_assert (offset =3D=3D trunc_int_for_mode (offset, Pmode)); > > =A0 =A0x =3D plus_constant (virtual_stack_vars_rtx, offset); > ! =A0 x =3D gen_rtx_MEM (DECL_MODE (SSAVAR (decl)), x); > > ! =A0 if (TREE_CODE (decl) !=3D SSA_NAME) > ! =A0 =A0 { > ! =A0 =A0 =A0 /* Set alignment we actually gave this decl if it isn't an = SSA name. > ! =A0 =A0 =A0 =A0 =A0If it is we generate stack slots only accidentally s= o it isn't as > ! =A0 =A0 =A0 =A0important, we'll simply use the alignment that is alread= y set. =A0*/ > ! =A0 =A0 =A0 offset -=3D frame_phase; > ! =A0 =A0 =A0 align =3D offset & -offset; > ! =A0 =A0 =A0 align *=3D BITS_PER_UNIT; > ! =A0 =A0 =A0 if (align =3D=3D 0) > ! =A0 =A0 =A0 align =3D STACK_BOUNDARY; > ! =A0 =A0 =A0 else if (align > MAX_SUPPORTED_STACK_ALIGNMENT) > ! =A0 =A0 =A0 align =3D MAX_SUPPORTED_STACK_ALIGNMENT; > > ! =A0 =A0 =A0 DECL_ALIGN (decl) =3D align; > ! =A0 =A0 =A0 DECL_USER_ALIGN (decl) =3D 0; > ! =A0 =A0 } > ! > ! =A0 set_mem_attributes (x, SSAVAR (decl), true); > ! =A0 set_rtl (decl, x); > =A0} > > =A0/* A subroutine of expand_used_vars. =A0Give each partition representa= tive > *************** expand_stack_vars (bool (*pred) (tree)) > *** 912,918 **** > > =A0 =A0 =A0 =A0/* Skip variables that have already had rtl assigned. =A0S= ee also > =A0 =A0 =A0 =A0 add_stack_var where we perpetrate this pc_rtx hack. =A0*/ > ! =A0 =A0 =A0 if (DECL_RTL (stack_vars[i].decl) !=3D pc_rtx) > =A0 =A0 =A0 =A0continue; > > =A0 =A0 =A0 =A0/* Check the predicate to see whether this variable should= be > --- 969,977 ---- > > =A0 =A0 =A0 =A0/* Skip variables that have already had rtl assigned. =A0S= ee also > =A0 =A0 =A0 =A0 add_stack_var where we perpetrate this pc_rtx hack. =A0*/ > ! =A0 =A0 =A0 if ((TREE_CODE (stack_vars[i].decl) =3D=3D SSA_NAME > ! =A0 =A0 =A0 =A0 =A0? SA.partition_to_pseudo[var_to_partition (SA.map, s= tack_vars[i].decl)] > ! =A0 =A0 =A0 =A0 =A0: DECL_RTL (stack_vars[i].decl)) !=3D pc_rtx) > =A0 =A0 =A0 =A0continue; > > =A0 =A0 =A0 =A0/* Check the predicate to see whether this variable should= be > *************** account_stack_vars (void) > *** 951,957 **** > > =A0 =A0 =A0 =A0size +=3D stack_vars[i].size; > =A0 =A0 =A0 =A0for (j =3D i; j !=3D EOC; j =3D stack_vars[j].next) > ! =A0 =A0 =A0 SET_DECL_RTL (stack_vars[j].decl, NULL); > =A0 =A0 =A0} > =A0 =A0return size; > =A0} > --- 1010,1016 ---- > > =A0 =A0 =A0 =A0size +=3D stack_vars[i].size; > =A0 =A0 =A0 =A0for (j =3D i; j !=3D EOC; j =3D stack_vars[j].next) > ! =A0 =A0 =A0 set_rtl (stack_vars[j].decl, NULL); > =A0 =A0 =A0} > =A0 =A0return size; > =A0} > *************** expand_one_stack_var (tree var) > *** 964,971 **** > =A0{ > =A0 =A0HOST_WIDE_INT size, offset, align; > > ! =A0 size =3D tree_low_cst (DECL_SIZE_UNIT (var), 1); > ! =A0 align =3D get_decl_align_unit (var); > =A0 =A0offset =3D alloc_stack_frame_space (size, align); > > =A0 =A0expand_one_stack_var_at (var, offset); > --- 1023,1030 ---- > =A0{ > =A0 =A0HOST_WIDE_INT size, offset, align; > > ! =A0 size =3D tree_low_cst (DECL_SIZE_UNIT (SSAVAR (var)), 1); > ! =A0 align =3D get_decl_align_unit (SSAVAR (var)); > =A0 =A0offset =3D alloc_stack_frame_space (size, align); > > =A0 =A0expand_one_stack_var_at (var, offset); > *************** expand_one_hard_reg_var (tree var) > *** 986,1005 **** > =A0static void > =A0expand_one_register_var (tree var) > =A0{ > ! =A0 tree type =3D TREE_TYPE (var); > =A0 =A0int unsignedp =3D TYPE_UNSIGNED (type); > =A0 =A0enum machine_mode reg_mode > ! =A0 =A0 =3D promote_mode (type, DECL_MODE (var), &unsignedp, 0); > =A0 =A0rtx x =3D gen_reg_rtx (reg_mode); > > ! =A0 SET_DECL_RTL (var, x); > > =A0 =A0/* Note if the object is a user variable. =A0*/ > ! =A0 if (!DECL_ARTIFICIAL (var)) > ! =A0 =A0 =A0 mark_user_reg (x); > > =A0 =A0if (POINTER_TYPE_P (type)) > ! =A0 =A0 mark_reg_pointer (x, TYPE_ALIGN (TREE_TYPE (TREE_TYPE (var)))); > =A0} > > =A0/* A subroutine of expand_one_var. =A0Called to assign rtl to a VAR_DE= CL that > --- 1045,1065 ---- > =A0static void > =A0expand_one_register_var (tree var) > =A0{ > *************** struct rtl_opt_pass pass_expand =3D > *** 2471,2480 **** > =A0 =A00, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0/* static_pass_number */ > =A0 =A0TV_EXPAND, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* t= v_id */ > =A0 =A0/* ??? If TER is enabled, we actually receive GENERIC. =A0*/ > ! =A0 PROP_gimple_leh | PROP_cfg, =A0 =A0 =A0 =A0 =A0 /* properties_requi= red */ > =A0 =A0PROP_rtl, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = /* properties_provided */ > ! =A0 PROP_trees, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* prop= erties_destroyed */ > ! =A0 0, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0/* todo_flags_start */ > ! =A0 TODO_dump_func, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* todo= _flags_finish */ > =A0 } > =A0}; > --- 2644,2655 ---- > =A0 =A00, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0/* static_pass_number */ > =A0 =A0TV_EXPAND, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* t= v_id */ > =A0 =A0/* ??? If TER is enabled, we actually receive GENERIC. =A0*/ This is no longer true ;) > ! =A0 PROP_ssa | PROP_gimple_leh | PROP_cfg, =A0 =A0 =A0 =A0 =A0 /* prope= rties_required */ > =A0 =A0PROP_rtl, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = /* properties_provided */ > ! =A0 PROP_ssa | PROP_trees, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0/* properties_destroyed */ > ! =A0 TODO_verify_ssa | TODO_verify_flow > ! =A0 =A0 | TODO_verify_stmts, =A0 =A0 =A0 =A0 =A0 =A0 =A0/* todo_flags_s= tart */ > ! =A0 TODO_dump_func > ! =A0 | TODO_ggc_collect =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* todo_flags= _finish */ > =A0 } > =A0}; > Index: tree-mudflap.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > *** tree-mudflap.c =A0 =A0 =A0(revision 146576) > --- tree-mudflap.c =A0 =A0 =A0(working copy) > *************** execute_mudflap_function_ops (void) > *** 447,452 **** > --- 447,465 ---- > =A0 =A0return 0; > =A0} > > + /* Construct a new temporary variable with TYPE > + =A0 =A0as type and PREFIX as name prefix, add it to referenced vars > + =A0 =A0and mark it for renaming. =A0*/ > + > + static tree > + create_referenced_var (tree type, const char *prefix) > + { > + =A0 tree var =3D create_tmp_var (type, prefix); > + =A0 add_referenced_var (var); > + =A0 mark_sym_for_renaming (var); > + =A0 return var; > + } This is exactly the same as make_rename_temp () from tree-dfa.c, so use that. > =A0/* Create and initialize local shadow variables for the lookup cache > =A0 =A0 globals. =A0Put their decls in the *_l globals for use by > =A0 =A0 mf_build_check_statement_for. =A0*/ > *************** mf_decl_cache_locals (void) > *** 459,469 **** > > =A0 =A0/* Build the cache vars. =A0*/ > =A0 =A0mf_cache_shift_decl_l > ! =A0 =A0 =3D mf_mark (create_tmp_var (TREE_TYPE (mf_cache_shift_decl), > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "__mf_loo= kup_shift_l")); > > =A0 =A0mf_cache_mask_decl_l > ! =A0 =A0 =3D mf_mark (create_tmp_var (TREE_TYPE (mf_cache_mask_decl), > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "__mf_loo= kup_mask_l")); > > =A0 =A0/* Build initialization nodes for the cache vars. =A0We just load = the > --- 472,482 ---- > > =A0 =A0/* Build the cache vars. =A0*/ > =A0 =A0mf_cache_shift_decl_l > ! =A0 =A0 =3D mf_mark (create_referenced_var (TREE_TYPE (mf_cache_shift_d= ecl), > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "__mf_loo= kup_shift_l")); > > =A0 =A0mf_cache_mask_decl_l > ! =A0 =A0 =3D mf_mark (create_referenced_var (TREE_TYPE (mf_cache_mask_de= cl), > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "__mf_loo= kup_mask_l")); > > =A0 =A0/* Build initialization nodes for the cache vars. =A0We just load = the > *************** mf_build_check_statement_for (tree base, > *** 546,554 **** > =A0 =A0 =A0} > > =A0 =A0/* Build our local variables. =A0*/ > ! =A0 mf_elem =3D create_tmp_var (mf_cache_structptr_type, "__mf_elem"); > ! =A0 mf_base =3D create_tmp_var (mf_uintptr_type, "__mf_base"); > ! =A0 mf_limit =3D create_tmp_var (mf_uintptr_type, "__mf_limit"); > > =A0 =A0/* Build: __mf_base =3D (uintptr_t) . =A0= */ > =A0 =A0seq =3D gimple_seq_alloc (); > --- 559,567 ---- > =A0 =A0 =A0} > > =A0 =A0/* Build our local variables. =A0*/ > ! =A0 mf_elem =3D create_referenced_var (mf_cache_structptr_type, "__mf_e= lem"); > ! =A0 mf_base =3D create_referenced_var (mf_uintptr_type, "__mf_base"); > ! =A0 mf_limit =3D create_referenced_var (mf_uintptr_type, "__mf_limit"); > > =A0 =A0/* Build: __mf_base =3D (uintptr_t) . =A0= */ > =A0 =A0seq =3D gimple_seq_alloc (); > *************** mf_build_check_statement_for (tree base, > *** 627,633 **** > =A0 =A0t =3D build2 (TRUTH_OR_EXPR, boolean_type_node, t, u); > =A0 =A0t =3D force_gimple_operand (t, &stmts, false, NULL_TREE); > =A0 =A0gimple_seq_add_seq (&seq, stmts); > ! =A0 cond =3D create_tmp_var (boolean_type_node, "__mf_unlikely_cond"); > =A0 =A0g =3D gimple_build_assign =A0(cond, t); > =A0 =A0gimple_set_location (g, location); > =A0 =A0gimple_seq_add_stmt (&seq, g); > --- 640,646 ---- > =A0 =A0t =3D build2 (TRUTH_OR_EXPR, boolean_type_node, t, u); > =A0 =A0t =3D force_gimple_operand (t, &stmts, false, NULL_TREE); > =A0 =A0gimple_seq_add_seq (&seq, stmts); > ! =A0 cond =3D create_referenced_var (boolean_type_node, "__mf_unlikely_c= ond"); > =A0 =A0g =3D gimple_build_assign =A0(cond, t); > =A0 =A0gimple_set_location (g, location); > =A0 =A0gimple_seq_add_stmt (&seq, g); > *************** struct gimple_opt_pass pass_mudflap_2 =3D > *** 1366,1377 **** > =A0 =A0NULL, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 /* next */ > =A0 =A00, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0/* static_pass_number */ > =A0 =A0TV_NONE, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0/* tv_id */ > ! =A0 PROP_gimple_leh, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* prop= erties_required */ > =A0 =A00, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0/* properties_provided */ > =A0 =A00, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0/* properties_destroyed */ > =A0 =A00, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0/* todo_flags_start */ > =A0 =A0TODO_verify_flow | TODO_verify_stmts > ! =A0 | TODO_dump_func =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* todo= _flags_finish */ > =A0 } > =A0}; > > --- 1379,1390 ---- > =A0 =A0NULL, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 /* next */ > =A0 =A00, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0/* static_pass_number */ > =A0 =A0TV_NONE, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0/* tv_id */ > ! =A0 PROP_ssa | PROP_cfg | PROP_gimple_leh,/* properties_required */ > =A0 =A00, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0/* properties_provided */ > =A0 =A00, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0/* properties_destroyed */ > =A0 =A00, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0/* todo_flags_start */ > =A0 =A0TODO_verify_flow | TODO_verify_stmts > ! =A0 | TODO_dump_func | TODO_update_ssa =A0 =A0/* todo_flags_finish */ > =A0 } > =A0}; > > Index: tree-ssa-ter.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > *** tree-ssa-ter.c =A0 =A0 =A0(revision 146576) > --- tree-ssa-ter.c =A0 =A0 =A0(working copy) > *************** free_temp_expr_table (temp_expr_table_p > *** 225,231 **** > =A0 =A0unsigned x; > =A0 =A0for (x =3D 0; x <=3D num_var_partitions (t->map); x++) > =A0 =A0 =A0gcc_assert (!t->kill_list[x]); > ! =A0 for (x =3D 0; x < num_ssa_names + 1; x++) > =A0 =A0 =A0{ > =A0 =A0 =A0 =A0gcc_assert (t->expr_decl_uids[x] =3D=3D NULL); > =A0 =A0 =A0 =A0gcc_assert (t->partition_dependencies[x] =3D=3D NULL); > --- 225,231 ---- > =A0 =A0unsigned x; > =A0 =A0for (x =3D 0; x <=3D num_var_partitions (t->map); x++) > =A0 =A0 =A0gcc_assert (!t->kill_list[x]); > ! =A0 for (x =3D 0; x < num_ssa_names; x++) > =A0 =A0 =A0{ > =A0 =A0 =A0 =A0gcc_assert (t->expr_decl_uids[x] =3D=3D NULL); > =A0 =A0 =A0 =A0gcc_assert (t->partition_dependencies[x] =3D=3D NULL); Obvious, commit with the other similar piece separately. > Index: tree-ssa.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > *** tree-ssa.c =A0(revision 146576) > --- tree-ssa.c =A0(working copy) > *************** delete_tree_ssa (void) > *** 844,850 **** > > =A0 =A0 =A0 =A0 =A0gimple_set_modified (stmt, true); > =A0 =A0 =A0 =A0} > ! =A0 =A0 =A0 set_phi_nodes (bb, NULL); > =A0 =A0 =A0} > > =A0 =A0/* Remove annotations from every referenced local variable. =A0*/ > --- 844,851 ---- > > =A0 =A0 =A0 =A0 =A0gimple_set_modified (stmt, true); > =A0 =A0 =A0 =A0} > ! =A0 =A0 =A0 if (!(bb->flags & BB_RTL)) > ! =A0 =A0 =A0 set_phi_nodes (bb, NULL); > =A0 =A0 =A0} > > =A0 =A0/* Remove annotations from every referenced local variable. =A0*/ > Index: rtl.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > *** rtl.h =A0 =A0 =A0 (revision 146576) > --- rtl.h =A0 =A0 =A0 (working copy) > *************** extern rtx gen_int_mode (HOST_WIDE_INT, > *** 1494,1499 **** > --- 1494,1500 ---- > =A0extern rtx emit_copy_of_insn_after (rtx, rtx); > =A0extern void set_reg_attrs_from_value (rtx, rtx); > =A0extern void set_reg_attrs_for_parm (rtx, rtx); > + extern void set_reg_attrs_for_decl_rtl (tree t, rtx x); > =A0extern void adjust_reg_mode (rtx, enum machine_mode); > =A0extern int mem_expr_equal_p (const_tree, const_tree); > > Index: tree-optimize.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > *** tree-optimize.c =A0 =A0 (revision 146576) > --- tree-optimize.c =A0 =A0 (working copy) > *************** struct gimple_opt_pass pass_cleanup_cfg_ > *** 201,207 **** > =A0{ > =A0 { > =A0 =A0GIMPLE_PASS, > ! =A0 "final_cleanup", =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* name */ > =A0 =A0NULL, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 /* gate */ > =A0 =A0execute_cleanup_cfg_post_optimizing, =A0 =A0 =A0 =A0/* execute */ > =A0 =A0NULL, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 /* sub */ > --- 201,207 ---- > =A0{ > =A0 { > =A0 =A0GIMPLE_PASS, > ! =A0 "optimized", =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* name= */ > =A0 =A0NULL, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 /* gate */ > =A0 =A0execute_cleanup_cfg_post_optimizing, =A0 =A0 =A0 =A0/* execute */ > =A0 =A0NULL, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 /* sub */ > *************** struct gimple_opt_pass pass_cleanup_cfg_ > *** 213,225 **** > =A0 =A00, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0/* properties_destroyed */ > =A0 =A00, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0/* todo_flags_start */ > =A0 =A0TODO_dump_func =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* todo_= flags_finish */ > =A0 } > =A0}; > > =A0/* Pass: do the actions required to finish with tree-ssa optimization > =A0 =A0 passes. =A0*/ > > ! static unsigned int > =A0execute_free_datastructures (void) > =A0{ > =A0 =A0free_dominance_info (CDI_DOMINATORS); > --- 213,226 ---- > =A0 =A00, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0/* properties_destroyed */ > =A0 =A00, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0/* todo_flags_start */ > =A0 =A0TODO_dump_func =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* todo_= flags_finish */ > + =A0 =A0 | TODO_remove_unused_locals > =A0 } > =A0}; > > =A0/* Pass: do the actions required to finish with tree-ssa optimization > =A0 =A0 passes. =A0*/ > > ! unsigned int > =A0execute_free_datastructures (void) > =A0{ > =A0 =A0free_dominance_info (CDI_DOMINATORS); > *************** execute_free_datastructures (void) > *** 228,233 **** > --- 229,238 ---- > =A0 =A0/* Remove the ssa structures. =A0*/ > =A0 =A0if (cfun->gimple_df) > =A0 =A0 =A0delete_tree_ssa (); > + > + =A0 /* And get rid of annotations we no longer need. =A0*/ > + =A0 delete_tree_cfg_annotations (); > + > =A0 =A0return 0; > =A0} > > *************** struct gimple_opt_pass pass_free_datastr > *** 254,262 **** > =A0static unsigned int > =A0execute_free_cfg_annotations (void) > =A0{ > - =A0 /* And get rid of annotations we no longer need. =A0*/ > - =A0 delete_tree_cfg_annotations (); > - > =A0 =A0return 0; > =A0} It looks like the pass referencing this is now dead. Please remove this function and the pass structure. > [Message clipped] bah ... ;) Other half in next mail. Richard.