computation_cost too blind to hard regs
DJ Delorie
dj@redhat.com
Mon Jan 17 22:31:00 GMT 2005
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);
More information about the Gcc
mailing list