This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: A question about combining constraints


On Fri, 12 Nov 2010, Joern Rennecke wrote:
Please read the node "Register Classes" in doc/tm.texi .
I am sorry , could you please highlight the relevant portion for me?
In the pattern that i have given the combination (a,W) satisfies the
pattern. But its not matched because i have given then like (da,Wd). I
know that we can combine the constraints together.
Do you think that the attached patch improves the documentation?

Yes, I think so. Unless someone else disagrees, mind going ahead and committing your patch (attached again in case you don't have it handy anymore).

Thanks,
Gerald
2010-11-12  Joern Rennecke  <amylaar@spamcop.net>

	* doc/tm.texi.in: Spell out that a lack of register class unions
	can lead to ICEs.
	* doc/tm.texi: Regenerate.

Index: doc/tm.texi
===================================================================
--- doc/tm.texi	(revision 166609)
+++ doc/tm.texi	(working copy)
@@ -2337,7 +2343,9 @@ union of two classes will be another cla
 instruction allows both classes.  For example, if an instruction allows
 either a floating point (coprocessor) register or a general register for a
 certain operand, you should define a class @code{FLOAT_OR_GENERAL_REGS}
-which includes both of them.  Otherwise you will get suboptimal code.
+which includes both of them.  Otherwise you will get suboptimal code,
+or even internal compiler errors when reload cannot find a register in the
+the class computed via @code{reg_class_subunion}.
 
 You must also specify certain redundant information about the register
 classes: for each class, which classes contain it and which ones are
Index: doc/tm.texi.in
===================================================================
--- doc/tm.texi.in	(revision 166609)
+++ doc/tm.texi.in	(working copy)
@@ -2327,7 +2333,9 @@ union of two classes will be another cla
 instruction allows both classes.  For example, if an instruction allows
 either a floating point (coprocessor) register or a general register for a
 certain operand, you should define a class @code{FLOAT_OR_GENERAL_REGS}
-which includes both of them.  Otherwise you will get suboptimal code.
+which includes both of them.  Otherwise you will get suboptimal code,
+or even internal compiler errors when reload cannot find a register in the
+the class computed via @code{reg_class_subunion}.
 
 You must also specify certain redundant information about the register
 classes: for each class, which classes contain it and which ones are

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]