From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joern Rennecke To: John Wehle Cc: gcc@gcc.gnu.org Subject: Re: local-alloc update_equiv_regs and moving register initialization Date: Thu, 14 Sep 2000 16:54:00 -0000 Message-id: <200009142355.AAA30446@phal.cygnus.co.uk> References: <200009142341.TAA18674@jwlab.FEITH.COM> X-SW-Source: 2000-09/msg00332.html > > consider > > > > if (i) > > c = a + b; > > a = i * 3; > > The optimization in question requires that the register be set and used > exactly once. I was going with the requirement that the set appear > prior to the use and known to be executed. a is set and used exactly once, and the set is known to be executed. It just happens to come after the use. Note that you also have to watch out for cases where the set is statically before the use, but dynamically after the use in loop order. goto foo; bar: a = i * 3; goto baz; foo: if (i) c = a + b; goto bar; baz: