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] Remove dead struct-equiv.c


> While looking for something else I noticed that struct-equiv.c is completely
> dead in trunk. The only caller outside the file is a function that is only
> called by struct-equiv.c itself (condjump_equiv_p)
> 
> This patch removes all traces of struct-equiv.c from Makefiles and headers
> and the call to the initialization function. It doesn't remove
> the file itself; after it is applied a svn rm struct-equiv.c should be done.
> 
> Patch successfully bootstraped and test suite run on x86_64-linux.
> I get a couple of unexpected failures, but they don't seem to be
> related to my patch.
> 
> Patch should not change any gcc behaviour, just make the executable a little smaller.
> 
> I don't have SVN write access; please commit it if approved. Also
> run svn rm gcc/struct-equiv.c while doing so.
> 
> -Andi
> 
> 2007-07-22 Andi Kleen <ak@suse.de>
> 
> 	* cfg_cleanup.c (condjump_equiv_p): Remove.
> 	* Makefile.in (OBJS-common): Remove struct-equiv.o
> 	* basic-block.h (struct_equiv_checkpoint, STRUCT_EQUIV_*,
> 	insns_match_p, struct_equiv_block_eq, struct_equiv_init, 
> 	rtx_equiv_p, condjump_equiv_p): Remove prototypes.

I would vote to accept this patch.  However, I do not have the
authority to approve this.  This is going to require a middle end
maintainer to approve.  

According to Steven Bosscher, this code was originally written by
Joern and was turned off because it was too slow. I think that the
fact that it was not orphaned by the dataflow commit puts me off the
list of possible approvers.

In support of the code, (and also according to stevenb) 


>  The original plan with this code was to improve
> if-conversion of longer sequences, such as the examples of PR10050,
> PR20070,  PR21803, and PR29144. It would also allow cross-jumping of
> longer sequences, especially because the live range splitting passes
> (i.e. out-of-ssa and web) tend to destroy ifcvt and crossjump
> opportunities with out current exact insn sequence matching. The
> struct-equiv stuff was supposed to overcome this by comparing
> sequences by semantics, instead of by lexical equivalence. 

However, the methods employed in this code are not suitable for gcc
and a major rewrite is needed to get this function into the compiler.

I will, if this patch is accepted, do the work of actually doing the
commit.  Andi does not have write after access, but according to
Edelsohn, has a proper assignment.  

Kenny


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