On 06/06/2016 12:01 PM, Jakub Jelinek wrote:
On Mon, Jun 06, 2016 at 11:54:04AM -0600, Jeff Law wrote:
As for recog.c, I can not approve this as I am not a maintainer of it.
I only can say that the code looks questionable to me.
I think the question on the recog part is a matter of how we choose to
interpret what the "X" constraint means.
Does it literally mean accept anything, or accept some subset expressions?
I tend to think the former, which means that things like
reg_overlap_mentioned_p or its callers have to be bullet-proofed.
I think it is a bad idea to accept really anything, even for debug insns,
which initially accepted arbitrarily large RTL expressions (and still accept
stuff like subregs otherwise considered invalid etc.) we found it is highly
undesirable, as it is not very good idea for the compile time complexity
etc., so now we are trying to limit the complexity of the expressions there
by splitting up more complex expressions into smaller ones using temporaries.
So, even accept anything should always be accept anything reasonable,
because most of the RTL passes don't really expect arbitrarily deep
expressions, or expressions where the same reg can appear thousands of times
etc.
The problem is how do you define this subset of expressions you're going
to accept and those which you are going to reject.
I first pondered accepting RTL leaf nodes (reg, subreg, constants) and
rejecting everything else. But I couldn't convince myself that some
port might reasonably expect (plus (x) (y)) to match the "X" constraint.
jeff