<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Aug 3, 2014 at 6:36 PM, Jeremy Salwen <span dir="ltr"><<a href="mailto:jeremysalwen@gmail.com" target="_blank">jeremysalwen@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hello All,<br><br>I have some data tied to the basic blocks in a function, and after inlining that function, I'd like to recover that data in the inlined version. Is there some way to match up the inlined version of the function with the original basic blocks?</div>
</blockquote></div><br>See the code in CloneFunctionInto and CloneAndPruneFunctionInto. This is what does the actual inlining. You can see how that code tracks the basic blocks after inlining.</div><div class="gmail_extra">
<br></div><div class="gmail_extra">Honestly, the right way to do this architecturally is for us to support metadata attached to basic blocks (if we don't already?) and then for the inliner to preserve it when inlining. Then you could use metadata as a container for your data.</div>
</div>