On Tue, Aug 2, 2011 at 6:02 PM, Richard Henderson <r...@redhat.com> wrote: > On 08/02/2011 05:22 AM, Richard Guenther wrote: >>> -fno-tree-ter also unbreaks the ARM test case in PR48863 comment #4. >> >> It's of course only a workaround, not a real fix as nothing prevents >> other optimizers from performing the re-scheduling TER does. >> >> I suggest to amend the documentation for local call-clobbered register >> variables to say that the only valid sequence using them is from a >> non-inlinable function that contains only direct initializations of the >> register variables from constants or parameters. >> >> Or go one step further and deprecate local register variables alltogether >> (they IMHO don't make much sense, and rather the targets should provide >> a way to properly constrain asm inputs and outputs). > > Neither of these is a viable option. > > What we might be able to do is throttle TER when the destination > is a local register variable. This should unbreak the common case > of local regs immediately surrounding an asm.
Sure, similar to disabling TER for functions containing such vars. But it isn't a solution for the general issue that nothing prevents scheduling gimple statements between register variable def and use. Richard. > > r~ >