[tree-ssa] How to increase PHI capacity?
Diego Novillo
dnovillo@redhat.com
Mon Aug 4 18:35:00 GMT 2003
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.
More information about the Gcc
mailing list