This is the mail archive of the 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]

Re: New Regalloc Branch

> The current allocator (which really works in three
> passes) doesn't work
> really globally, and the algorithms it uses are
> failry adhoc.  It can't
> split pseudo registers, or coalesce them (although
> it has something like
> preferences to get rid of copies, which is something
> like coalescing).
> It doesn't use exact live-ness information to the
> full extent. And
> spill-code is inserted by a different pass (reload),

In reg-alloc branch code I am seeing a call to
reload after reg_alloc.

 3090   if (flag_new_regalloc)
   3091     {
   3092       delete_trivially_dead_insns (insns,
max_reg_num ());
   3093       reg_alloc ();
   3095       timevar_pop (TV_LOCAL_ALLOC);
   3096       if (dump_file[DFI_lreg].enabled)
   3097         {
   3098           timevar_push (TV_DUMP);
   3100           close_dump_file (DFI_lreg, NULL,
   3101           timevar_pop (TV_DUMP);
   3102         }
   3104       /* XXX clean up the whole mess to bring
live info in shape
         again.  */
   3105       timevar_push (TV_GLOBAL_ALLOC);
   3106       open_dump_file (DFI_greg, decl);
   3108       build_insn_chain (insns);
   3109       failure = reload (insns, 0);

would not that imply spill code in a seperate pass
after reg_alloc or I am missing something.
As I understand handling spill should be part
of reg_alloc from ur previous reply.

BTW In ra.c it is mentioned

/* The algorithm used is currently Iterated Register
Coalescing by  L.A.George, and Appel. XXX not true

Could you give me some comments on what all
additions/deletions have been done.

Sorry to bother you with all this.But I hope 
my queries would be useful when comments are 
added so even dumb fellows like me can understand
the code :-)

  Erwin. - Yahoo! Travel
- Plan and book your dream holiday online!

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