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] |
"Daniel Berlin" <dberlin@dberlin.org> wrote on 20/07/2007 00:22:33: > > Comments on struct-reorg.c: > > > 1. The comments in strip_t ype do not make clear what it does > Just based on looking at it, it should be using POINTER_TYPE_P, not > TREE_CODE (type) == POINTER_TYPE done. > 2. why is get_type_name returning a char * and not a const char *? changed, done. > 3. why is get_type_var using DECL_ARG_TYPE? because get_type_var receives function parameters as arguments as well. > 4. > if (SSA_NAME_IS_DEFAULT_DEF(before_cast)) > return false; > Should be > if (SSA_NAME_IS_DEFAULT_DEF (before_cast)) > return false; fixed. > 5. your offset/base splitting code seems to be trying to approximate > exactly what get_ref_and_base_extent will do for you. > not exactly, as I need offset/base variables there. > 6. In build_basic_struct, why are you touching C_* fields? fixed. > > 7. Don't use CONSTANT_CLASS_P and simple_cst_equal, just call > operand_equal_p on rhs fixed. > > 8. It seems you assume struct sizes fit in unsigned int in a lot of > places, when they should actually be HOST_WIDE_INT fixed. This is an updated patch. In addition to changes mentioned above, by suggestion of Peter Bergner, I have changes the model to peel hot fields one by one instead of clustering them. It scales better, and now we are getting 47% on art with and w/o profiling, i.e. when by default we completely peel the structure into separate fields. Any further comments? Ok for mainline? :ADDPATCH ipa ssa: Olga 2007-08-01 Olga Golovanevsky <olga@il.ibm.com> * struct-reorg.c, struct-reorg.h: New files. * tree.h: Add pass_ipa_struct_reorg. * common.opt: Add ipa-struct-reorg flag. * Makefile.in: Add strcut-reorg.o compilation. * passes.c: Add pass pass_ipa_struct_reorg. (See attached file: struct-reorg.h)(See attached file: struct_reorg.txt) (See attached file: struct-reorg.c)
Attachment:
struct-reorg.h
Description: Binary data
Attachment:
struct_reorg.txt
Description: Text document
Attachment:
struct-reorg.c
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |