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: Mainline bootstrap failure on ia64


Andreas Schwab wrote:
Mainline does not bootstrap on ia64 because -frename-registers is now the
default.

The problem is that the IA-64 port uses the common idiom of leaving off the constraints for op0 of a call_value pattern, so that we can accept any return rtx. In particular, we need to accept PARALLEL here which is not an ordinary operand. However, the lack of constraints means we have an output operand with no "=".


regrename handles conditional execution by identifying output operands (i.e. operands with = constraints), and then changing them to in-out operands if they occured inside a COND_EXEC. This fails when we have a call_value pattern inside a COND_EXEC because the = constraint is missing, so this operand does not get changed to an in-out operand.

This can be fixed by changing the call_value op0 constraints to "=X,X". It looks a bit odd to use using X outside a match_scratch, but it seems to do what I want, i.e. accept all operands, even things that don't look like operands like PARALLEL.

Any other target that uses COND_EXEC and drops the constraints for op0 of a call_value pattern will run into the same problem. Perhaps we should go through and fix all md files to use =X constraints here.

This patch works for the libstdc++-v3/src/wlocal-inst.cc testcase which is the first failure I saw when doing an IA-64 bootstrap. I haven't done any further testing yet.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
2004-04-19  James E Wilson  <wilson@specifixinc.com>

	* config/ia64/ia64.md (call_value_nogp): Add constraints for op0.
	(vall_value_gp): Likewise.

Index: ia64.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/ia64.md,v
retrieving revision 1.127
diff -p -r1.127 ia64.md
*** ia64.md	10 Mar 2004 12:34:43 -0000	1.127
--- ia64.md	20 Apr 2004 02:51:16 -0000
***************
*** 5137,5143 ****
    [(set_attr "itanium_class" "br,scall")])
  
  (define_insn "call_value_nogp"
!   [(set (match_operand 0 "" "")
  	(call (mem:DI (match_operand:DI 1 "call_operand" "?b,i"))
  	      (const_int 0)))
     (clobber (match_operand:DI 2 "register_operand" "=b,b"))]
--- 5137,5143 ----
    [(set_attr "itanium_class" "br,scall")])
  
  (define_insn "call_value_nogp"
!   [(set (match_operand 0 "" "=X,X")
  	(call (mem:DI (match_operand:DI 1 "call_operand" "?b,i"))
  	      (const_int 0)))
     (clobber (match_operand:DI 2 "register_operand" "=b,b"))]
***************
*** 5193,5199 ****
  })
  
  (define_insn "call_value_gp"
!   [(set (match_operand 0 "" "")
  	(call (mem:DI (match_operand:DI 1 "call_operand" "?r,i"))
  	      (const_int 1)))
     (clobber (match_operand:DI 2 "register_operand" "=b,b"))
--- 5193,5199 ----
  })
  
  (define_insn "call_value_gp"
!   [(set (match_operand 0 "" "=X,X")
  	(call (mem:DI (match_operand:DI 1 "call_operand" "?r,i"))
  	      (const_int 1)))
     (clobber (match_operand:DI 2 "register_operand" "=b,b"))

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