This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Infinite loop in init_alias_analysis
- To: egcs at cygnus dot com
- Subject: Infinite loop in init_alias_analysis
- From: Christian Iseli <chris at lslsun dot epfl dot ch>
- Date: Tue, 04 Nov 1997 13:26:36 +0100
Hi there,
I got an infinite loop while compiling sone test code here. I think I have
tracked down the
problem to the new (as of snapshot 971031) code in alias.c, in the
init_alias_analysis routine,
in the while (changed) loop.
Things happen in the following way:
- During the first iteration of the loop, new_reg_base_value[24] is set to
(address (reg:HI 1 %r3)),
(reg 1 is a FUNCTION_ARG_REGNO_P) while copying_arguments is true.
- Later in the function, new_reg_base_value[1] is set to (reg/v:HI 24)
- Now the first iteration terminates and the values from new_reg_base_value
are copied into
reg_base_value.
- In the next loop iteration, find_base_value is called and promptly returns
the values it finds
in reg_base_value, which yields to new_reg_base_value[24] => (reg/v:HI 24)
and
new_reg_base_value[1] => (address (reg:HI 1 %r3))
- And so on...
I'm not sure what's the best fix...
- set reg_seen of the argument register when it is copied to the pseudo ?
- avoid the part before NOTE_INSN_FUNCTION_BEG in subsequent loop iterations
?
- do some clever testing of new_reg_base_value and reg_base_value ?
- reverse the if statements in the REG case in find_base_value ?
What do you think?
Christian