This is the mail archive of the
mailing list for the GCC project.
- To: gcc at gcc dot gnu dot org
- Subject: recompute_reg_usage
- From: DJ Delorie <dj at redhat dot com>
- Date: Thu, 25 Oct 2001 20:05:42 -0400
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