This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa] How to increase PHI capacity?


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]