<div dir="ltr">How did you choose where you started from? An Instruction can only be used by another Instruction, but it seems you've started from a Constant which can be used by ConstantExprs.<div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">~Craig</div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 17, 2021 at 5:25 PM 周书林 via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Michael, <div><br></div><div>Thank you very much! </div><div>I have a further question: if I want to get the dataflow of a target Value, is there any way to handle these situations when iterate the Users?Or only by iterator all the instructions and their operands? </div><div><br></div><div>Sincerely,</div><div>Shulin</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Michael Kruse <<a href="mailto:llvmdev@meinersbur.de" target="_blank">llvmdev@meinersbur.de</a>> 于2021年6月18日周五 上午5:11写道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Am Do., 17. Juni 2021 um 10:24 Uhr schrieb 周书林 via llvm-dev<br>
<<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>>:<br>
> %39 = load i32, i32* getelementptr inbounds (%struct.TTT, %struct.TTT* @ttt, i32 0, i32 2), align 8, !dbg !971<br>
<br>
%39 is the LoadInst, while getelementptr is its second operand. It is<br>
inlined because it is an llvm::Constant, not an instruction. Constants<br>
do not participate in use/user-chains and hence there is no link from<br>
GEP to the LoadInst that is using it. The constant GEP object may be<br>
used by an arbitrary number of other instructions, other constants in<br>
the same or other functions.<br>
<br>
Node that there "GEPOperator" can represent either a GetElementPtrInst<br>
(i.e. an instruction) or a GEP constant expression (derived from<br>
ConstantExpr)<br>
<br>
Michael<br>
</blockquote></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>