On 10/20/2015 09:13 AM, Segher Boessenkool wrote:
On Mon, Oct 19, 2015 at 11:22:06PM -0600, Jeff Law wrote:
WRT your hope to limit this to only uses in extended asms. That'd be
nice, but that's never been an explicit limitation. I would strongly
hesitate to add that limitation at this point in time.
r88265 (from 2004) made explicit that local register asm only has a
guaranteed effect on asm operands. Since no other effect is guaranteed
we may as well not document those at all. Bug reports do still come in
about this.
I'm still trying to figure out why I'm not comfortable with dropping all
the other stuff and explicitly stating that the only legitimate use is
in extended asms. I guess I'm gun-shy given the grief we've taken
through the years when we've tightened down other extensions.
But the technical reality is I can't see a use outside the extended asm.
In the past we waffled a bit and said things like "if the object it
not live, then the register might be re-used for another purpose". But
even at a point where the object is live, it could as you mentioned be
on the stack. It could also be shuffled into a different register by
way of range splitting, or inheritance, copy propagation, etc.
Maybe it *is* time to bite the bullet and greatly simplify the local
case, dealing with any blow-back we get along the way.
Jeff