1. Porting to tree-ssa representation (see Table1 below).
2. Generate separate pass for struct-reorg optimization and integrate it into ipa-passes.
3. When peeling separate fields from structure, experiment with generating them as variables, not as individual structures.
4. Algorithmic extensions (see Table2 below).
5. Development of testcases (currently 18).
Table1 testcase description reordering only; was implemented peeling; was implemented splitting; was implemented current status on gimple current status on gimple current status on gimple on tree-ssa on tree-ssa on tree-ssa test1.c one structure, stage1: done yes stage1:done yes stage1: not done partly no substructures, stage3: done stage3:done stage3: not done no arrays, only direct access (by value), no standard allocations test3.c * structure stage1:not done yes stage1:not done yes stage1: not done partly accesses are stage3:not done stage3:not done stage3: not done through pointers test4.c * with field accesses stage1:not done yes stage1:not done yes stage1: not done partly are through stage3:not done stage3:not done stage3: not done pointers test5.c * with substructures stage1:not done not stage1:not done not stage1: not done not stage3:not done stage3:not done stage3: not done test4.c * with arrays with stage1:not done yes stage1:not done yes stage1: not done not access by index stage3:not done stage3:not done stage3: not done test5.c * with arrays with stage1:not done yes stage1:not done yes stage1: not done not access by pointer stage3:not done stage3:not done stage3: not done test16.c * with standard stage1:not done partly stage1:not done partly stage1: not done not allocation stage3:not done stage3:not done stage3: not done (malloc, calloc, etc.) * similar to test1.c
Table2 testcase description current optimization preferable optimization of testcase decision decision test1.c struct has 4 fields; function f() split structure into four structures split structure into two structures: make extensive use of two of them, with one field of original structure one with two fields extensively used in function f () while function g() use another in each of them and the other - with two fields used in g() two fields test2.c similar to test1.c, with extensive split structure into four structures split structure into two structures use of cache through array accesses between two function calls: f() and g() test3.c struct has 4 fields; fields of split structure into four structures do not split at all structure are used in cycles: 1th, with one field of original structure 2nd, 3d, 4th, 1th, etc. in each of them test5.c struct has two separate fields split struct to three: two - with The problem here is that sub-struct is not and one sub-struct with two only one field, which was separate analyzed because no instances of its has been made. fields; one of separated fields field of original struct and one - Two options of algorithm behaviour are possible: is used extensively with one of with sub-struct of original struct - split sub-struct into two structs with one fields each; fields of sub-struct; the other then split struct into tree as it's done now; separate fields is used - split into two structs: one with separate field extensively with the other of original struct and one field of sub-struct; fields of sub-struct (no separate the other - with the other separate field of struct and instances of substruct has been the other fields of sub-struct. made) (it requires struct-reorg opt. to run twice, or to analyze all structures simultaneously) test6.c similar to test5.c, with instances split sub-struct into two structs similar to test5.c, split into two structs: one with of sub-struct with one field each; split struct separate field of original struct and one field into tree struct: two for separate of sub-struct; the other - with other separate fields fields and one with sub-struct of struct and other fields of sub-struct test17.c two structs each with four fields; split both structs to separate fields split and reorganize structs into two new structs function f() uses two fields with four fields in each: one with those that from one struct and two fields used in function f(), and the other from the other; function g() uses - those from function g(). all remained fields from both extension is needed to get this result: we need to be able structs not only split structures, but also union their separate fields into new structures)