This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] SSA expand: Convert mode when copying between partition base vars
- From: Michael Matz <matz at suse dot de>
- To: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 27 Apr 2009 17:47:22 +0200 (CEST)
- Subject: Re: [PATCH] SSA expand: Convert mode when copying between partition base vars
- References: <20090427152535.GA9517@bart>
On Mon, 27 Apr 2009, Andreas Krebbel wrote:
> s390 currently doesn't bootstrap. It fails since emit_move_insn is
> invoked with two rtxs having a different mode. The insert_* functions
> call emit_move_insn to copy between two partition base variables. This
> doesn't work out if the source or destination variable has been promoted
> to a different type. The attached patch adds a call to convert_to_mode
> when emitting the move.
> With that patch the bootstrap gets significantly farther and dies due to
> genautomata eating up all the memory :(
Rather try this one. It fixes the cris issue (and perhaps the sparc
thingy too), which is also about promoting PARM_DECLs.
* cfgexpand.c (expand_one_register_var): Correctly promote mode for PARM_DECLs.
--- cfgexpand.c (revision 146824)
+++ cfgexpand.c (working copy)
@@ -1049,7 +1049,9 @@ expand_one_register_var (tree var)
tree type = TREE_TYPE (decl);
int unsignedp = TYPE_UNSIGNED (type);
enum machine_mode reg_mode
- = promote_mode (type, DECL_MODE (decl), &unsignedp, 0);
+ = promote_mode (type, DECL_MODE (decl), &unsignedp,
+ (TREE_CODE (decl) == RESULT_DECL
+ || TREE_CODE (decl) == PARM_DECL) ? 1 : 0);
rtx x = gen_reg_rtx (reg_mode);
set_rtl (var, x);