[llvm-dev] Understanding SlotIndexes
via llvm-dev
llvm-dev at lists.llvm.org
Thu Feb 23 19:01:45 PST 2017
Krzysztof Parzyszek via llvm-dev <llvm-dev at lists.llvm.org> writes:
>> 4B A = ...
>> 10B D = use A
>>
>> This seems straightforward. The instruction at slot 10 uses A at 10r
>> and the VNInfo for 10r should have a def at 4r.
>>
>> But that's not right! I am staring at the following:
>>
>> LiveInterval: %vreg163 [5404r,6432B:0)[6480B,6688r:0) 0 at 5404r
>> Instruction: 6688B %RDX<def> = COPY %vreg163
>
> An instruction by itself doesn't have any meaningful slot. It shows
> as B, but only because B is the default slot. For a given register you
> get the actual slot from the live interval.
Which slot? In this case I'm staring at a use of vreg163 and want to
find the def of the value reaching that use. 6688r is *not* in the
interval. Thus I can't look up 6688r in the interval and get the def
from the VNInfo. If I look up 6688B I get the expected answer. Thus
the question.
Again, LVQuery seems to do what I want. But the comments in
LiveInterval.h seem to be misleading at best.
-David
More information about the llvm-dev
mailing list