This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: local-alloc update_equiv_regs and moving register initialization
- To: amylaar at cygnus dot co dot uk
- Subject: Re: local-alloc update_equiv_regs and moving register initialization
- From: John Wehle <john at feith dot com>
- Date: Thu, 14 Sep 2000 19:04:00 -0400 (EDT)
- CC: gcc at gcc dot gnu dot org
>> Why isn't desirable to move the register initialization just before the
>> use when both are within the same loop?
>
> Because then you might change the semantics of the program.
That's a good reason, however I'm feeling a bit dense. How could it
change the semantics of the program? If it's safe to change:
a = 3;
...
c = a + b;
to
...
a = 3;
c = a + b;
when a = 3 and c = a + b are outside a loop, why isn't it safe to make
the same change when both are inside the same loop?
-- John
-------------------------------------------------------------------------
| Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com |
| John Wehle | Fax: 1-215-540-5495 | |
-------------------------------------------------------------------------