(Are such blocks common or performance-painful on the public web?)

On Jul 16, 2012, at 1:35 PM, "Henrique Santos" <[email protected]> wrote:

> Dear guys,
> 
> I am trying to implement an optimization in IonMonkey that consists in 
> removing unreachable basic blocks. However, I am having problems to implement 
> it, because I do not know how to update the phi-functions once I remove a 
> block. For instance, if I have this program:
> 
> L0:
> v0 = 0
> goto L2
> 
> L1:
> v1 = 1
> 
> L2:
> v2 = phi(v0, v1)
> print v2
> 
> I want to eliminate L1, and then the program would be like:
> 
> L0:
> v0 = 0
> goto L2:
> 
> L2:
> v2 = phi(v0, ??)
> print v2
> 
> How can I update the phi-function v2 = phi(v0, v1)? I need to know from which 
> control flow edge the parameter v0 comes, so that I can add a copy like this:
> 
> L2:
> v2 = v0
> print v2
> 
> However, I do not know how to find from which edge v0 comes. Is there any 
> example of code in your repository in which basic blocks are removed? Or, 
> otherwise, is it possible to find out the correct parameter of a phi-function 
> that is associated with a CFG edge?
> 
> Thank you very much,
> 
> Henrique.
> _______________________________________________
> dev-tech-js-engine-internals mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals
_______________________________________________
dev-tech-js-engine-internals mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals

Reply via email to