<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 4/20/16 6:49 PM, Wenqing Zhuang via
llvm-dev wrote:<br>
</div>
<blockquote
cite="mid:CY1PR01MB1358FB15E3C546CFC221B5A3A06D0@CY1PR01MB1358.prod.exchangelabs.com"
type="cite">
<meta http-equiv="Context-Type" content="text/html;
charset=iso-8859-1">
<div id="divtagdefaultwrapper">
<p>Dear all,<br>
<br>
Hi, my name is Wenqing(Wendell) Zhuang who is a Ph.D student
in the college of EECS of Syracuse University in US, I am
currently writing a machine pass of LLVM which checks if a
pointer points to an address that is out of a certain range.
So in that pass, I need to determine if a pointer points to a
stack slot or to a non-stack area(e.g heap), I call the
function: X86InstrInfo::isLoadFromStackSlot(const MachineInstr
*MI, int &FrameIndex) in my pass which is added in
X86PassConfig::addPreEmitPass(), however, that function always
return 0 for every Machine Instruction, and returned
FrameIndex is always 0, my pass is executed before code emit
and after register allocation, but isLoadFromStackSlot and
isStoreToStackSlot do not work as I expected in my pass,I can
hardly figure out why.<br>
</p>
</div>
</blockquote>
<br>
Just out of curiosity, are you sure that you are running your pass
after the code for the stack frame has been created (maybe that is
Prologue insertion)? I'm not sure when the stack frame is created,
but if memory serves correctly, it does not exist when code
generation starts.<br>
<br>
Regards,<br>
<br>
John Criswell<br>
<br>
<blockquote
cite="mid:CY1PR01MB1358FB15E3C546CFC221B5A3A06D0@CY1PR01MB1358.prod.exchangelabs.com"
type="cite">
<div id="divtagdefaultwrapper">
<p>
<br>
I really appreciate if anyone can help me with this. Thanks.
The best!<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper">
<p>Wenqing(Wendell) Zhuang</p>
<p><a class="moz-txt-link-abbreviated" href="mailto:wzhuang@syr.edu">wzhuang@syr.edu</a></p>
<p>Department of Electrical Engineering and Computer Science</p>
<p>Syracuse University, US<br>
</p>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
John Criswell
Assistant Professor
Department of Computer Science, University of Rochester
<a class="moz-txt-link-freetext" href="http://www.cs.rochester.edu/u/criswell">http://www.cs.rochester.edu/u/criswell</a></pre>
</body>
</html>