------- Comment #11 from hubicka at gcc dot gnu dot org 2010-09-04 18:00 ------- Created an attachment (id=21700) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21700&action=view) proposed fix for sccvn
Well, this is patch I am currently testing. At least small part is shared in between tree-ssa-ccp (probably should go into gimple-fold) and VN. I am not sure how much of other initializer folding I need to borrow - i.e. folding of var_decl into its decl_initial, handling of component_refs and such. Also the tree-ssa-ccp code seems quite incomplette, it won't fold array with incomplette initializer for example because it won't find the matching item. Probably worth to fix. Honza -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45522