<div dir="ltr">So... looking at OptBisect, I have a few thoughts:<br><br>1) what's the purpose of the virtual interface/OptPassGate? I'm guessing maybe that worked around the circular referencing in these APIs? hmm, no, I suppose that wouldn't work/be relevant here.<br><br>2) Why is OptBisector a ManagedStatic? That seems pretty antithetical to the role of LLVMContext. When/why would a user be bisecting over multiple LLVMContexts? & even then, maybe it'd be more suitable for that grouping (the scope for the bisection) to be API driven - passing the bisector into the LLVMContext ctor to define the set of contexts that share a bisector?<br></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Mar 21, 2018 at 10:20 PM Yevgeny Rouban 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Andrew,<br><br>I would not make the caller pass the description of the IR unit. That is because it would result in the description generated every time even if <span id="m_-7506391951429324223:wo.1">OptBisect</span> is disabled. Description generation is not very chip.<br></div><div>Thinking on the <span id="m_-7506391951429324223:wo.2">OptBisect</span> extension, I believe passing the units are the right choice because <span id="m_-7506391951429324223:wo.3">OptPassGates</span> may use them to make pass skipping decisions.<br></div><div><br></div>-<span id="m_-7506391951429324223:wo.4">Yevgeny</span> <span id="m_-7506391951429324223:wo.5">Rouban</span><br><div>-----------------------------------------------------------<br><p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif"><b><span style="font-size:11pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11pt;font-family:"Calibri",sans-serif"> <span id="m_-7506391951429324223:wo.6">llvm</span>-<span id="m_-7506391951429324223:wo.7">dev</span> [<a href="mailto:llvm-dev-bounces@lists.llvm.org" style="color:rgb(5,99,193);text-decoration:underline" target="_blank"><span id="m_-7506391951429324223:wo.8">mailto</span>:<span id="m_-7506391951429324223:wo.9">llvm</span>-<span id="m_-7506391951429324223:wo.10">dev</span>-bounces@lists.<span id="m_-7506391951429324223:wo.11">llvm</span>.org</a>]
<b>On Behalf Of </b><span id="m_-7506391951429324223:wo.12">Kaylor</span>, Andrew via <span id="m_-7506391951429324223:wo.13">llvm</span>-<span id="m_-7506391951429324223:wo.14">dev</span><br>
<b>Sent:</b> Thursday, March 22, 2018 3:52 AM<br>
<b>To:</b> David <span id="m_-7506391951429324223:wo.15">Blaikie</span> <<a href="mailto:dblaikie@gmail.com" style="color:rgb(5,99,193);text-decoration:underline" target="_blank"><span id="m_-7506391951429324223:wo.16">dblaikie</span>@gmail.com</a>>;
<span id="m_-7506391951429324223:wo.17">llvm</span>-<span id="m_-7506391951429324223:wo.18">dev</span> <<a href="mailto:llvm-dev@lists.llvm.org" style="color:rgb(5,99,193);text-decoration:underline" target="_blank"><span id="m_-7506391951429324223:wo.19">llvm</span>-<span id="m_-7506391951429324223:wo.20">dev</span>@lists.<span id="m_-7506391951429324223:wo.21">llvm</span>.org</a>>;
Friedman, Eli <<a href="mailto:efriedma@codeaurora.org" style="color:rgb(5,99,193);text-decoration:underline" target="_blank"><span id="m_-7506391951429324223:wo.22">efriedma</span>@<span id="m_-7506391951429324223:wo.23">codeaurora</span>.org</a>><br>
<b>Subject:</b> Re: [<span id="m_-7506391951429324223:wo.24">llvm</span>-<span id="m_-7506391951429324223:wo.25">dev</span>] Opt Bisect layering<span></span></span></p></div></div><div dir="ltr"><div>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif"><span> </span></p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">There is a patch under review right now from someone who wants
to provide a mechanism to replace <span id="m_-7506391951429324223:wo.26">OptBisect</span> as the pass gate keeping mechanism.<span></span></span></p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)"><span> </span></span></p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)"><a href="https://reviews.llvm.org/D44464" style="color:rgb(5,99,193);text-decoration:underline" target="_blank">https://reviews.<span id="m_-7506391951429324223:wo.27">llvm</span>.org/D44464</a><span></span></span></p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)"><span> </span></span></p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">Possibly we could take this opportunity to move <span id="m_-7506391951429324223:wo.28">OptBisect</span> to a
different layer, though I don’t know where else it would belong.<span></span></span></p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)"><span> </span></span></p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">The other possibility is that we could have the caller pass in a
description instead of a pointer to the pass and the IR unit. <span id="m_-7506391951429324223:wo.29">OptBisect</span> isn’t
doing anything with them other than building a string for output.<span></span></span></p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)"><span> </span></span></p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">-Andy<span></span></span></p>





<br></div></div><div dir="ltr"><div></div></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="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>