On 6/6/19 6:20 AM, Martin Liška wrote:
Hi.
The code is dead:
757 char *
758 get_lsm_tmp_name (tree ref, unsigned n, const char *suffix)
759 {
760 char ns[2];
761
762 lsm_tmp_name_length = 0;
763 gen_lsm_tmp_name (ref);
764 lsm_tmp_name_add ("_lsm");
765 if (n < 10)
766 {
767 ns[0] = '0' + n;
768 ns[1] = 0;
769 lsm_tmp_name_add (ns);
770 }
771 return lsm_tmp_name;
772 if (suffix != NULL)
773 lsm_tmp_name_add (suffix);
774 }
Andrew is it a typo or an issue?
Thanks,
Martin
Dunno. It was written in 2005.
2005-08-16 Zdenek Dvorak <dvor...@suse.cz>
* tree-ssa-loop-im.c (MAX_LSM_NAME_LENGTH, lsm_tmp_name,
lsm_tmp_name_length): New.
(lsm_tmp_name_add, gen_lsm_tmp_name, get_lsm_tmp_name): New
functions.
(schedule_sm): Use get_lsm_tmp_name instead of "lsm_tmp".
The whole thing is a little odd since you cant get more than 10 tmp
names without suddenly all being the same name.
I dont know anything about the code, my guess is the return should be
after the 'if'. the only callers appears to pass ~0 as the value for N.
execute_sm_if_changed_flag_set() adds '_flag' as a suffix and
execute_sm() calls it without the suffix.
My guess is the return should be moved to the bottom so that those 2 get
different names, so it could be a problem as it is. Someone who know
the loop code better could comment..
Andrew