<div dir="ltr">Your use case seems to be somewhat similar to what LTO does, so it may be possible to hack something up in LTO. Perhaps you'd need to have a custom pass pipeline that would accomplish what you need. Since you say you can't link the two files, I imagine you'd need to make sure you don't emit code from one of them in the LTO link step or something along those lines. In any case, I'm not very familiar with LTO or ThinLTO, but it just seems like a good fit for what you're after.<br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 13, 2018 at 1:03 AM, Yingtong Liu via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>I am trying to run two llvm passes on two different IRs to finish my analysis. These two passes need to exchange information during their excecution. I am doing so because I can't link the two IRs I want to analyze together as a big IR and run my llvm pass on it. </div><div><br></div><div>What I want to do specifically is: </div><div><br></div><div>The first IR will call the functions in the second IR. Whenver there is a function call in the first IR to the second IR, the first pass will evoke the second pass on the second IR and give it some information as input. When the second pass is finished analysing its IR, it will return some information to the first pass.</div><div><br></div><div>Basically, I want to do the same analysis for two IRs just like they were linked together. Since I can't actually link them togther, I need to manage the communication between two passes running on two IRs by myself. </div><div><br></div><div>I feel like to do so, I need to write another program to control these two passes, pretty like what the opt program does. But I am not sure if it is durable and feel overwhemled to start. Anyone can give me any suggestions about this? Thank you very much. </div><div><br></div><div><div><div><div class="m_7135319267503006362gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div style="font-size:small"><span style="font-size:12.8px">Best,</span></div><div style="font-size:small"><span style="font-size:12.8px">Ying</span></div><div style="font-size:small" dir="ltr"><span style="font-size:12.8px"></span></div></div></div></div>
</div></div></div>
<br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>