This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
computation_cost too blind to hard regs
- From: DJ Delorie <dj at redhat dot com>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 17 Jan 2005 17:07:56 -0500
- Subject: computation_cost too blind to hard regs
Am I missing something obvious here? We're creating a temporary
sequence only to compute its cost, but we're using HARD registers in
ways that they might not support (in my case, my backend aborted due
to a subreg of a register in a mode it didn't support). In my case,
using FIRST_PSEUDO_REGISTER intead of 0 as the initial regno works
better.
static unsigned
computation_cost (tree expr)
{
rtx seq, rslt;
tree type = TREE_TYPE (expr);
unsigned cost;
int regno = 0; <------ HARD registers used?
walk_tree (&expr, prepare_decl_rtl, ®no, NULL);
start_sequence ();
rslt = expand_expr (expr, NULL_RTX, TYPE_MODE (type), EXPAND_NORMAL);