This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: New Regalloc Branch
- From: Erwin Ingris <erwiningris at yahoo dot com dot au>
- To: Michael Matz <matz at kde dot org>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 30 May 2002 22:08:26 +1000 (EST)
- Subject: Re: New Regalloc Branch
Hi,
> 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 ();
3094
3095 timevar_pop (TV_LOCAL_ALLOC);
3096 if (dump_file[DFI_lreg].enabled)
3097 {
3098 timevar_push (TV_DUMP);
3099
3100 close_dump_file (DFI_lreg, NULL,
NULL);
3101 timevar_pop (TV_DUMP);
3102 }
3103
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);
3107
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
anymore
*/
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 :-)
Regards,
Erwin.
http://travel.yahoo.com.au - Yahoo! Travel
- Plan and book your dream holiday online!