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]

ELIMINABLE_REGS and INITIAL_ELIMINATION_OFFSET effectiveness.


Dear All,

We are porting 4.8.1 to the one of out private backend and defined the
macros like

#define ELIMINABLE_REGS                                 \
 {{ ARG_POINTER_REGNUM, STACK_POINTER_REGNUM},          \
  { FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}}        \

#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
 (OFFSET) = tlcs_initial_elimination_offset (FROM, TO)


The above macros were effective when the optimization was enabled(-On) i.e

static void
ira (FILE *f)
{
  bool loops_p;
  int ira_max_point_before_emit;
  int rebuild_p;
  bool saved_flag_caller_saves = flag_caller_saves;
  enum ira_region saved_flag_ira_region = flag_ira_region;

  ira_conflicts_p = optimize > 0; //optimize is zero here for defualt
and -O0 options


}

static void
do_reload (void)

{
{
      df_set_flags (DF_NO_INSN_RESCAN);
      build_insn_chain ();

      need_dce = reload (get_insns (), ira_conflicts_p);
//ira_conflicts_p is zero

    }
}
/*
   GLOBAL nonzero means we were called from global_alloc
   and should attempt to reallocate any pseudoregs that we
   displace from hard regs we will use for reloads.
   If GLOBAL is zero, we do not have enough information to do that,
   so any pseudo reg that is spilled must go to the stack.
*/

bool
reload (rtx first, int global) //global is zero
{


  /* If global-alloc was run, notify it of any register eliminations we have
     done.  */
  if (global)
    for (ep = reg_eliminate; ep < &reg_eliminate[NUM_ELIMINABLE_REGS]; ep++)
      if (ep->can_eliminate)
        mark_elimination (ep->from, ep->to);
}



Did the ELIMINABLE_REGS and INITIAL_ELIMINATION_OFFSET macros are only
effective when optimization enabled or do we missing something
here????

Thank you in advance
~Umesh


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