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]

[patch][struct-reorg] porting to ssa


This patch is an actual porting of struct-reorg optimization
to analyze and transform in tree-ssa form (it was initially
developed to work on gimple). Although, not all features are
ported yet, the testcase below (test1.c), which represent the
basic functionality of struct-reorg, can be successfully
analyzed and transformed now.

Special thanks for Dan, who suggested to use mark_new_vars_to_rename,
thus resolving me a bug and a headache of building "manually" all
missing virtual operands.

olga

2006-06-01  Olga Golovanevsky  <olga@il.ibm.com>

      * struct-reorg.c (insert_into_var_list): Remove.
      (make_new_vars_1): Parameter orig_decl now ssa_name.
      (find_struct_field): New function.
      (find_new_var_of_type): New function.
      (copy_stuct_init): New function.
      (create_new_vars): Changed to go over ssa_names.
      (search_lhs_for_struct_vars): New function.
      (search_rhs_for_struct_vars): New function.
      (find_var_of_given_type): New funciton.
      (build_new_stmts): Updated to deal with ssa form.
      Use mark_new_vars_to_rename and update_stmt.
      (find_orig_varable): New function.
      (update_field_accesses): Updated to deal with ssa form.
      Use mark_new_vars_to_rename and update_stmt.
      (update_struct_use_stmt): Updated to deal with ssa form.
      (do_reorg_for_func): New function.
      (do_reorg1): New function helper for do_reorg.
      (do_reorg): Changed to process one function at a time.


(See attached file: struct-reorg.txt.ssa_port)

(See attached file: test1.c)

Attachment: struct-reorg.txt.ssa_port
Description: Binary data

Attachment: test1.c
Description: Binary data


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