<div dir="ltr"><div>+// FIXME: How to determine this?</div><div>+static AllocaInst* derivedFromAlloca(Value *Ptr) {</div><div>+  return dyn_cast<AllocaInst>(Ptr);</div><div>+}</div><div><br></div><div>I think what you're looking for here is GetUnderlyingObject, and checking if it's an AllocaInst</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Oct 24, 2013 at 9:02 PM, Tom Stellard <span dir="ltr"><<a href="mailto:tom@stellard.net" target="_blank">tom@stellard.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
As a follow up to this discussion:<br>
<a href="http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-October/066780.html" target="_blank">http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-October/066780.html</a><br>
<br>
I put together a very simple patch that begins to implement the transformation<br>
mentioned in the llvm-dev thread.  The patch is incomplete and is mostly comments<br>
with question about how to do certain things, but it does work for the<br>
simple test case included in the patch.<br>
<br>
I'd appreciate any feedback people can give me on this patch and the<br>
questions posed in the comments.<br>
<br>
Thanks,<br>
Tom<br>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>