This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] How to increase PHI capacity?
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Steven Bosscher <s dot bosscher at student dot tudelft dot nl>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: 04 Aug 2003 14:33:07 -0400
- Subject: Re: [tree-ssa] How to increase PHI capacity?
- Organization: Red Hat Canada
- References: <1060010146.9010.35.camel@steven.lr-s.tudelft.nl>
On Mon, 2003-08-04 at 11:15, Steven Bosscher wrote:
> There doesn't seem to be an easy way to increase the capacity of a PHI,
> at least I can't find it. Is this just missing, or have my thoughts
> completely misguided me here?
>
No, there isn't. It's a fixed-size array set at PHI creation time. You
would have to implement a new function that calls ggc_realloc to resize
the array. Also remember to update the immediate dominator information
in each basic block.
I'm wondering if it wouldn't be easier to do this optimization *before*
converting the function into SSA. After all, this optimization doesn't
need dataflow information. OTOH, we may need to run it after other
optimizations, so I guess we might as well support this.
At some point, however, we should probably just give up and re-build the
whole thing from scratch.
Diego.