<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jun 5, 2016 at 8:56 AM, Mehdi Amini <span dir="ltr"><<a href="mailto:mehdi.amini@apple.com" target="_blank">mehdi.amini@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class=""><br>
> On Jun 4, 2016, at 7:56 PM, vivek pandya <<a href="mailto:vivekvpandya@gmail.com">vivekvpandya@gmail.com</a>> wrote:<br>
><br>
> Hello Mehdi Amini,<br>
><br>
> Sorry for slow progress this week but it was due to interesting mistake of mine. I had build llvm with ipra enable by default and that build files were on my path ! Due to that next time I tried to build llvm it was terribly slow (almost 1 hour for 10% build ). I spend to much time on fixing this by playing around with environment variables, cmake options etc.<br>
> But I think this is a serious concern, we need to think verify this time complexity other wise building a large software with IPRA enable would be very time consuming.<br>
<br>
</span>Did you build your own clang in release mode or debug? That makes a very important difference...<br></blockquote><div>oh yes nice point, what I did is Debug mode with IPRA 😬 that is insane. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<span class=""><br>
><br>
> I studied tets case suggest by you on phabricator, for RegUsageInfo passes I am thinking to print clobbered registers and verify that with FileCheck as expected clobbered register for a particular test-case. Is this approach fine?<br>
><br>
> I did not find function call to CostModelAnalysis::print() , Is opt -analyze making that call ?<br>
<br>
</span>Yes.<br>
(In general, if you find yourself in a situation where you can find the caller for a function, run in a debugger and set a breakpoint)<br></blockquote><div>Ok </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<span class=""><br>
> I am not able to find similar option in llc.<br>
<br>
</span>That's an issue. Looks it may not be feasible to test the analysis in llc with the current infrastructure.<br>
<span class=""><br></span></blockquote><div>I got the trick, actaully I am trying to do the same thing but let me figure out why it does not work? </div><div>./print-machineinstrs.ll:; RUN: llc < %s -O3 -debug-pass=Structure -print-machineinstrs=branch-folder -o /dev/null 2>&1 | FileCheck %s</div><div>./print-machineinstrs.ll:; RUN: llc < %s -O3 -debug-pass=Structure -print-machineinstrs -o /dev/null 2>&1 | FileCheck %s</div><div>./print-machineinstrs.ll:; RUN: llc < %s -O3 -debug-pass=Structure -print-machineinstrs= -o /dev/null 2>&1 | FileCheck %s </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">
> I can't use info printed with dbgs() function as release build do not add -debug-only option to llc executable.<br>
><br>
> For the testcase sent by you earlier I have modified it as following :<br>
> ;;;;; ip-regallco-simple.ll<br>
> ; RUN: llc < %s | FileCheck %s -check-prefix=NOIPRA<br>
> ; RUN: llc < %s -enable-ipra | FileCheck %s<br>
> ; NOIPRA: foo:<br>
<br>
</span>should be NOIPRA-LABEL:<br>
<span class=""><br>
> ; NOIPRA: pushq %r10<br>
> ; NOIPRA: pushq %r9<br>
> ; NOIPRA: pushq %r8<br>
</span>> ; NOIPRA: calls bar1<br>
<br>
If this is an exact sequence you want to match, you may use NOIPRA-NEXT </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<span class=""><br>
> ; CHECK: foo:<br>
> ; CHECK-NOT: pushq %r10<br>
> ; CHECK-NOT: pushq %r9<br>
> ; CHECK-NOT: pushq %r8<br>
<br>
</span>You can just write "CHECK-NOT: push"<br>
<span class=""><br>
> ; CHECK: callq bar1<br>
> target triple = "x86_64-unknown-unknown"<br>
> define void @bar1() {<br>
> ret void<br>
> }<br>
> define preserve_allcc void @foo()#0 {<br>
> call void @bar1()<br>
> call void @bar2()<br>
> ret void<br>
> }<br>
> define void @bar2() {<br>
> ret void<br>
> }<br>
> attributes #0 = {nounwind}<br>
><br>
> Is this correct approach to verify spills?<br>
<br>
</span>Yes.<br>
<span class=""><font color="#888888"><br>
<br>
--<br>
Mehdi<br>
<br>
</font></span></blockquote></div><br></div></div>