This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
What's the purpose of struct elt_loc_list's canon_loc field?
- From: Jakub Jelinek <jakub at redhat dot com>
- To: jh at suse dot cz
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 6 Apr 2004 12:55:28 -0400
- Subject: What's the purpose of struct elt_loc_list's canon_loc field?
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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