This is the mail archive of the gcc@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]

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


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


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