[tree-ssa] How to increase PHI capacity?
Steven Bosscher
s.bosscher@student.tudelft.nl
Mon Aug 4 22:23:00 GMT 2003
Op ma 04-08-2003, om 22:34 schreef Diego Novillo:
> On Mon, 2003-08-04 at 16:28, Steven Bosscher wrote:
>
> > Yes. But I need a phi with increased capacity. Inserting a whole new
> > phi is childs play.
> >
> I don't understand. What's the problem, then? Remove the old PHI node
> from the phi_nodes() list, ggc_realloc it and put it back in
> phi_nodes().
If that's OK with you, it's OK with me :) I just think it would be
cleaner to have the ability to adjust the phi arg vector without
reallocating the whole phi. But it's not a big deal now anyway.
>
> Oh, you also need to adjust SSA_NAME_DEF_STMT for PHI_RESULT of the new
> PHI node.
Thanks, I hadn't thought of that.
Does this look OK? Bootstrapped and regtested, but obviously no-one
uses the resize code at this point (and I haven't tried yet).
Gr.
Steven
2003-08-04 Steven Bosscher <steven@gcc.gnu.org>
* tree-dfa.c (add_phi_arg): Allow PHI capacity to grow.
* tree-flow.h (add_phi_arg): Adjust prototype.
* tree-ssa-pre.c (code_motion): Adjust call.
* tree-ssa.c (rewrite_block): Likewise.
* tree.c (resize_phi_node): New function.
* tree.h (resize_phi_node): Add prototype.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: text/x-patch
Size: 7123 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20030804/c215d0b2/attachment.bin>
More information about the Gcc
mailing list