Vyacheslav, you helped me a lot! Thank you for response.

Vasiliy.

среда, 17 апреля 2013 г., 0:53:16 UTC+4 пользователь Vyacheslav Egorov 
написал:
>
> > I have suggestion that i'th operand corresponds to i'th predecessor 
> block. Is it right?
>
> Yes, this is absolutely correct. You can see this in
>  HBasicBlock::RegisterPredecessor.
>
> > What is purpose of that index?
>
> It records the correspondence between phis and environment which describes 
> the state of the unoptimized code. That is merged index 0 is the first 
> local (receiver) and so on. You can see this in 
> HEnvironment::AddIncommingEdge. 
>
> I think it is mostly an artifact of the way we build SSA and later rebuild 
> deoptimization environments when generating lithium.
>
> > if I want to insert new phi node during hydrogen transformation what 
> merged index should I use
>
> Depends on the transformation you are trying to perform. 
>
> If you are inserting a phi that does not correspond to any position in the 
> environment then you should probably use -1 and fix all callsites that use 
> merged index to skip phis with -1.
>
>
> Vyacheslav Egorov
>
>
> On Tue, Apr 16, 2013 at 9:00 PM, <[email protected] <javascript:>>wrote:
>
>> Hi all,
>>
>> I'm reading through the source code of V8, and phi nodes in hydrogen are 
>> a bit confusing and cryptic for me. Maybe you can clafiry some things out?
>>
>> First, I can't see explicit correspondence between phi operand and basic 
>> block where control came from. I have suggestion that i'th operand 
>> corresponds to i'th predecessor block. Is it right?
>>
>> Second, each phi has interger value named "merged index" and phi takes 
>> this index in constructor. What is purpose of that index? And if I want to 
>> insert new phi node during hydrogen transformation what merged index should 
>> I use?
>>
>> Thanks very much!
>> Sincerely,
>> Vasiliy
>>
>> -- 
>> -- 
>> v8-dev mailing list
>> [email protected] <javascript:>
>> http://groups.google.com/group/v8-dev
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "v8-dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to