This is the mail archive of the
mailing list for the GCC project.
stack height reduction in tree-SSA
- From: "Rakesh Kumar, Noida" <rakesh dot kumar at noida dot hcltech dot com>
- To: <gcc at gcc dot gnu dot org>, <rakeshku at noida dot hcltech dot com>
- Date: Wed, 1 Sep 2004 11:11:42 +0530
- Subject: stack height reduction in tree-SSA
Sharing stack space for objects with disjoint
lifetimes is a well known problem with GCC (especially
for the kernel people). Consider the code
Apparantly, 'a' and 'b' can share same stack slot. I feel
that this problem could have been fixed in tree-SSA, but
exactly opposite is done. During 'lower' pass, record_vars
saves the variable declarations in a link list, which are
later expanded to RTL during RTL generation pass in expand_vars.
Below is the dump of 'lower' pass for the above test case.
if (i != 0) goto <D1052>; else goto <D1053>;
Is it that good to forget the scope of variable and allocate each
one a new stack slot? I'm unable to get any reasons why the stack
slots can't be shared. Please make me aware of the issues involved.
Thanks and Regards,