What's the purpose of struct elt_loc_list's canon_loc field?

Jakub Jelinek jakub@redhat.com
Tue Apr 6 16:56:00 GMT 2004


Hi!

http://gcc.gnu.org/ml/gcc-patches/2004-01/msg00963.html
patch (trunk, gcc-3_4-branch) introduced canon_loc field in
struct elt_loc_list and canon_x var in cselib_invalidate_mem.
But:
find . -name \*.[chS] | xargs grep canon_'\(x\|loc\)'
./cselib.h:  rtx canon_loc;
./cselib.c:  el->canon_loc = NULL;
./cselib.c:       rtx canon_x = (*p)->canon_loc;
./cselib.c:       if (!canon_x)
./cselib.c:         canon_x = (*p)->canon_loc = canon_rtx (x);

So unless canon_rtx actually modifies its argument (AFAIK it should not),
this is all useless code wasting cycles.
Either these 5 lines should be yanked, or canon_x should be actually
used somewhere (I'm not sure if canon_true_dependence needs also x
canonicalized or not).

	Jakub



More information about the Gcc mailing list