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: John Wehle <john at feith dot com>
- Subject: Re: local-alloc update_equiv_regs and moving register initialization
- From: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Date: Fri, 15 Sep 2000 00:22:46 +0100 (BST)
- CC: amylaar at pasanda dot cygnus dot co dot uk, gcc at gcc dot gnu dot org
> > 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?
consider
if (i)
c = a + b;
a = i * 3;