[LLVMdev] undefs in phis
evan.cheng at apple.com
Thu Feb 5 19:55:41 CST 2009
On Feb 5, 2009, at 5:30 PM, David Greene wrote:
> On Monday 02 February 2009 23:55, Evan Cheng wrote:
>>>> Think about what will happen the 2nd iteration. %v1177 will have
>>>> the value of
>>>> %v1645 which is wrong. This is because %v1176 in bb74 will be
>>>> replaced with
>>>> %v1177. That's incorrect.
>>> Ok, right. The trick to fixing is to make sure the valno of the
>>> def of
>>> v1177 hasPHIKill to true and make sure the coalescer checks it.
> What does hasPHIKill mean, what are the consequences of using it and
> how do I
> know when I can set it? I assume this would have been set by
> someone. Or is
> that part of the bug?
hasPHIKill just means it has a phi use so it's not possible to
determine where the value is killed. Look for LiveIntervalAnalysis.cpp.
>> Actually liveintervals can construct a v1177 live range starting from
>> the beginning mbb with a val# of unknown def.
> What's "the beginning mbb?" The start of the bb containing the phi
> (bb74 in
> this case)? Again, how would I instruct liveintervals to do this?
> IMPLICIT_DEF is already gone by that point.
%v1645 = ...
%v1176 = %v1645
%v1645 = op ...
%v1177 = %v1176
When the live interval for v1177 is created, the code should recognize
v1177 is live-in to the MBB. So even though it's not clear where it's
defined, it's still clear it's live-in to the MBB.
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the LLVMdev