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]

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, &regno, NULL);
  start_sequence ();
  rslt = expand_expr (expr, NULL_RTX, TYPE_MODE (type), EXPAND_NORMAL);


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