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]

recompute_reg_usage



Ok, I'm probably misunderstanding something here, but...

In toplev.c we call recompute_reg_usage after the optimization passes
but before reg alloc.  One of the comments in toplev.c says:

  /* Any of the several passes since flow1 will have munged register
     lifetime data a bit.  */
  register_life_up_to_date = 0;

recompute_reg_usage passes UPDATE_LIFE_LOCAL.  In update_life_info we
see this comment:

   If EXTENT is UPDATE_LIFE_LOCAL, such as after splitting or peepholeing,
   we are only expecting local modifications to basic blocks.

It seems to me that if we just finished a bunch of optimization passes
(combine, ifcvt, regmove), we just did a lot of non-local
modifications, and life info is going to change (as the toplev.c
comment says).  After all, we just rearranged all the insns.

Shouldn't we pass UPDATE_LIFE_GLOBAL to update_life_info?

If not, which of the comments is misleading?

In my case (sh-elf), a SET gets "moved" from one block to another by
combine, and gcc aborts because the new life information doesn't match
the old.


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