<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Artyom,<div class=""><br class=""></div><div class="">Can you please measure the performance impact of your patch and provide the timing information along with the patch? Testing with the preprocessed files we've sent you is a must.</div><div class=""><br class=""></div><div class="">Below are the results comparing the baseline with the revert of r218296 + the other 2 patches you sent to be applied on top of it. I see an 84% slowdown with the patches on gram.c, see below.</div><div class=""><br class=""></div><div class="">Anna.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">--- baseline ---</div><div class=""><br class=""></div><div class="">Zakss-Mac-Pro:build-clang zaks$ time ./bin/clang --analyze ~/tmp/gram.c <br class="">gram.c:18574:200: warning: Value stored to 'yyptr' is never read<br class="">  ...* sizeof (*yyls) + (sizeof (union yyalloc) - 1); yyptr += yynewbytes / sizeof (*yyptr); } while (0);<br class="">                                                      ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br class="">gram.y:11400:18: warning: Assigned value is garbage or undefined<br class="">     c->location = yylsp[-4];<br class="">                 ^ ~~~~~~~~~<br class="">gram.y:11417:18: warning: Assigned value is garbage or undefined<br class="">     w->location = yylsp[-3];<br class="">                 ^ ~~~~~~~~~<br class="">gram.y:11715:18: warning: Assigned value is garbage or undefined<br class="">     t->location = yylsp[-4];<br class="">                 ^ ~~~~~~~~~<br class="">gram.y:11734:287: warning: Function call argument is an uninitialized value<br class="">  ...<< 24))), errmsg("interval precision specified twice"), scanner_errposition(yylsp[-5], yyscanner))) : (voi...<br class="">                                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br class="">gram.y:11738:43: warning: Function call argument is an uninitialized value<br class="">      t->typmods = lappend(yyvsp[0].list, makeIntConst(yyvsp[-3].ival, yylsp[-3]));<br class="">                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br class="">gram.y:11741:60: warning: Function call argument is an uninitialized value<br class="">      t->typmods = lcons(makeIntConst((0x7FFF), -1), lcons(makeIntConst(yyvsp[-3].ival, yylsp[-3]), ((Lis...<br class="">                                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br class="">7 warnings generated.<br class=""><br class="">real<span class="Apple-tab-span" style="white-space:pre">      </span>0m17.958s<br class="">user<span class="Apple-tab-span" style="white-space:pre">  </span>0m17.020s<br class="">sys<span class="Apple-tab-span" style="white-space:pre">   </span>0m0.302s<br class=""><br class=""><br class=""><div class="">--- latest patches ---</div><div class=""><br class=""></div><div class="">Zakss-Mac-Pro:build-clang zaks$ time ./bin/clang --analyze ~/tmp/gram.c <br class="">gram.c:18574:200: warning: Value stored to 'yyptr' is never read<br class="">  ...* sizeof (*yyls) + (sizeof (union yyalloc) - 1); yyptr += yynewbytes / sizeof (*yyptr); } while (0);<br class="">                                                      ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br class="">gram.y:11400:18: warning: Assigned value is garbage or undefined<br class="">     c->location = yylsp[-4];<br class="">                 ^ ~~~~~~~~~<br class="">gram.y:11417:18: warning: Assigned value is garbage or undefined<br class="">     w->location = yylsp[-3];<br class="">                 ^ ~~~~~~~~~<br class="">gram.y:11715:18: warning: Assigned value is garbage or undefined<br class="">     t->location = yylsp[-4];<br class="">                 ^ ~~~~~~~~~<br class="">gram.y:11734:287: warning: Function call argument is an uninitialized value<br class="">  ...<< 24))), errmsg("interval precision specified twice"), scanner_errposition(yylsp[-5], yyscanner))) : (voi...<br class="">                                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br class="">gram.y:11738:43: warning: Function call argument is an uninitialized value<br class="">      t->typmods = lappend(yyvsp[0].list, makeIntConst(yyvsp[-3].ival, yylsp[-3]));<br class="">                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br class="">gram.y:11741:60: warning: Function call argument is an uninitialized value<br class="">      t->typmods = lcons(makeIntConst((0x7FFF), -1), lcons(makeIntConst(yyvsp[-3].ival, yylsp[-3]), ((Lis...<br class="">                                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br class="">7 warnings generated.<br class=""><br class="">real<span class="Apple-tab-span" style="white-space: pre;">       </span>1m45.005s<br class="">user<span class="Apple-tab-span" style="white-space: pre;">        </span>1m43.871s<br class="">sys<span class="Apple-tab-span" style="white-space: pre;"> </span>0m0.418s</div><div class=""><br class=""></div><div><blockquote type="cite" class=""><div class="">On Oct 6, 2014, at 2:27 AM, Artyom Skrobov <<a href="mailto:Artyom.Skrobov@arm.com" class="">Artyom.Skrobov@arm.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">Anna, sorry, now I see what you mean (I needed to pass --fblocks on the command line).</span></div></div></div></blockquote><blockquote type="cite" class=""><div class=""><div class="WordSection1" style="page: WordSection1; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">The following simple patch fixes the performance in this case, as well as brings the implementation in line with the comment just above it (dequeue rather than unstack).<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: 'Courier New'; color: rgb(31, 73, 125);" class="">Index: lib/Analysis/DataflowWorklist.cpp<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: 'Courier New'; color: rgb(31, 73, 125);" class="">===================================================================<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: 'Courier New'; color: rgb(31, 73, 125);" class="">--- lib/Analysis/DataflowWorklist.cpp (revision 218295)<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: 'Courier New'; color: rgb(31, 73, 125);" class="">+++ lib/Analysis/DataflowWorklist.cpp (working copy)<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: 'Courier New'; color: rgb(31, 73, 125);" class="">@@ -58,8 +101,10 @@<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: 'Courier New'; color: rgb(31, 73, 125);" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: 'Courier New'; color: rgb(31, 73, 125);" class="">   // First dequeue from the worklist.  This can represent<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: 'Courier New'; color: rgb(31, 73, 125);" class="">   // updates along backedges that we want propagated as quickly as possible.<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: 'Courier New'; color: rgb(31, 73, 125);" class="">-  if (!worklist.empty())<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: 'Courier New'; color: rgb(31, 73, 125);" class="">-    B = worklist.pop_back_val();<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: 'Courier New'; color: rgb(31, 73, 125);" class="">+  if (!worklist.empty()) {<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: 'Courier New'; color: rgb(31, 73, 125);" class="">+     B = worklist.front();<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: 'Courier New'; color: rgb(31, 73, 125);" class="">+     worklist.erase(worklist.begin());<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: 'Courier New'; color: rgb(31, 73, 125);" class="">+  }<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: 'Courier New'; color: rgb(31, 73, 125);" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: 'Courier New'; color: rgb(31, 73, 125);" class="">   // Next dequeue from the initial graph traversal (either post order or<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: 'Courier New'; color: rgb(31, 73, 125);" class="">   // reverse post order).  This is the theoretical ideal in the presence<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">The two patches are independent one from the other.<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span></div><div class=""><div style="border-style: solid none none; border-top-color: rgb(181, 196, 223); border-top-width: 1pt; padding: 3pt 0cm 0cm;" class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><b class=""><span lang="EN-US" style="font-size: 10pt; font-family: Tahoma, sans-serif;" class="">From:</span></b><span lang="EN-US" style="font-size: 10pt; font-family: Tahoma, sans-serif;" class=""><span class="Apple-converted-space"> </span>Anna Zaks [<a href="mailto:ganna@apple.com" class="">mailto:ganna@apple.com</a>]<span class="Apple-converted-space"> </span><br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>03 October 2014 19:56<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span>Artyom Skrobov<br class=""><b class="">Cc:</b><span class="Apple-converted-space"> </span>Alexander Kornienko; Ted Kremenek; <a href="mailto:cfe-commits@cs.uiuc.edu" class="">cfe-commits@cs.uiuc.edu</a><br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: [PATCH] Inverse post-order traversal for LiveVariables analysis, to recover the performance after r214064<o:p class=""></o:p></span></div></div></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">The analyzer is still timing out for me on postgresql.<o:p class=""></o:p></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">I am going to send a preprocessed file off line.<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">Maybe you will find some answers by looking at other performance related patches for LiveVariables that have been committed over years. <o:p class=""></o:p></div></div><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">Anna.<o:p class=""></o:p></div><div class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class="" type="cite"><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">On Oct 2, 2014, at 4:45 AM, Artyom Skrobov <<a href="mailto:Artyom.Skrobov@arm.com" style="color: purple; text-decoration: underline;" class="">Artyom.Skrobov@arm.com</a>> wrote:<o:p class=""></o:p></div></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><o:p class=""> </o:p></div><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">Hello,</span><o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span><o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">I see now that the CFG iteration orders, so painstakingly defined during the previous round of reviews in Aug, didn’t entirely match the pre-r214064 behaviour.</span><o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span><o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">Attached is a patch that simplifies PostOrderCFGView significantly, making the two possible iteration orders really obvious.</span><o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span><o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">I have tested it with both Alexander’s testcases (analyzer-regression1.c from Sep, and options.c from Aug), and it shows good performance on both.</span><o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span><o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">OK to un-revert r218296, and to commit this patch on top of that?</span><o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span><o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span><o:p class=""></o:p></div></div><div style="border-style: solid none none; border-top-color: rgb(181, 196, 223); border-top-width: 1pt; padding: 3pt 0cm 0cm;" class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><b class=""><span lang="EN-US" style="font-size: 10pt; font-family: Tahoma, sans-serif;" class="">From:</span></b><span class="apple-converted-space"><span lang="EN-US" style="font-size: 10pt; font-family: Tahoma, sans-serif;" class=""> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: Tahoma, sans-serif;" class="">Alexander Kornienko [<a href="mailto:alexfh@google.com" style="color: purple; text-decoration: underline;" class="">mailto:alexfh@google.com</a>]<span class="apple-converted-space"> </span><br class=""><b class="">Sent:</b><span class="apple-converted-space"> </span>21 September 2014 01:16<br class=""><b class="">To:</b><span class="apple-converted-space"> </span>Artyom Skrobov<br class=""><b class="">Cc:</b><span class="apple-converted-space"> </span>Anna Zaks;<span class="Apple-converted-space"> </span><a href="mailto:cfe-commits@cs.uiuc.edu" style="color: purple; text-decoration: underline;" class="">cfe-commits@cs.uiuc.edu</a><span class="Apple-converted-space"> </span>Commits<br class=""><b class="">Subject:</b><span class="apple-converted-space"> </span>Re: [PATCH] Inverse post-order traversal for LiveVariables analysis, to recover the performance after r214064</span><o:p class=""></o:p></div></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div></div><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">I'm attaching one of the files that regressed after r214064 and never got fixed (preprocessed ceval.c from Python 3.3).<o:p class=""></o:p></div></div><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div></div><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">On Sat, Sep 20, 2014 at 5:38 PM, Alexander Kornienko <<a href="mailto:alexfh@google.com" target="_blank" style="color: purple; text-decoration: underline;" class=""><span style="color: purple;" class="">alexfh@google.com</span></a>> wrote:<o:p class=""></o:p></div></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">I actually still think, that I have some code that started taking large time to be analyzed after r214064 and didn't recover after r215650. But I didn't get to creating a reasonable repro for you. And the number of files left affected after r215650 is so small, that I didn't prioritize this high enough. I'll still try to provide a repro soon.<o:p class=""></o:p></div><div class=""><div class=""><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">On 20 Sep 2014 17:10, "Artyom Skrobov" <<a href="mailto:Artyom.Skrobov@arm.com" target="_blank" style="color: purple; text-decoration: underline;" class=""><span style="color: purple;" class="">Artyom.Skrobov@arm.com</span></a>> wrote:<o:p class=""></o:p></div></div><div class=""><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">Anna, do you mean the performance had been acceptable after r214064, but degraded after r215650, which fixed the performance regression introduced in r214064?</span><o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span><o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">Do you have any specific example of code that takes longer to compile after r215650?</span><o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span><o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">Not hearing back from Alexander since August, I assumed the performance regression he observed after r215650 was not in fact related to that commit.</span><o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span><o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span><o:p class=""></o:p></div></div><div class=""><div style="border-style: solid none none; border-top-color: rgb(181, 196, 223); border-top-width: 1pt; padding: 3pt 0cm 0cm;" class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><b class=""><span lang="EN-US" style="font-size: 10pt; font-family: Tahoma, sans-serif;" class="">From:</span></b><span class="apple-converted-space"><span lang="EN-US" style="font-size: 10pt; font-family: Tahoma, sans-serif;" class=""> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: Tahoma, sans-serif;" class="">Anna Zaks [mailto:<a href="mailto:ganna@apple.com" target="_blank" style="color: purple; text-decoration: underline;" class=""><span style="color: purple;" class="">ganna@apple.com</span></a>]<span class="apple-converted-space"> </span><br class=""><b class="">Sent:</b><span class="apple-converted-space"> </span>20 September 2014 01:19<br class=""><b class="">To:</b><span class="apple-converted-space"> </span>Artyom Skrobov<br class=""><b class="">Cc:</b><span class="apple-converted-space"> </span><a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank" style="color: purple; text-decoration: underline;" class=""><span style="color: purple;" class="">cfe-commits@cs.uiuc.edu</span></a><span class="apple-converted-space"> </span>Commits; Ted Kremenek; Jordan Rose; Alexander Kornienko<br class=""><b class="">Subject:</b><span class="apple-converted-space"> </span>Re: [PATCH] Inverse post-order traversal for LiveVariables analysis, to recover the performance after r214064</span><o:p class=""></o:p></div></div></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">Hi Artyom,<o:p class=""></o:p></div></div><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div></div></div><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">Unfortunately, this commit (r215650) causes major performance regressions on our buildbots. In particular, building <span style="font-family: Menlo, serif;" class="">postgresql-9.1</span> times out.<o:p class=""></o:p></div></div></div><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div></div></div><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">Please, revert as soon as possible.<o:p class=""></o:p></div></div></div><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div></div></div><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">Thank you,<o:p class=""></o:p></div></div></div><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">Anna.<o:p class=""></o:p></div></div><div class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class="" type="cite"><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">On Aug 20, 2014, at 3:13 AM, Alexander Kornienko <<a href="mailto:alexfh@google.com" target="_blank" style="color: purple; text-decoration: underline;" class=""><span style="color: purple;" class="">alexfh@google.com</span></a>> wrote:<o:p class=""></o:p></div></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div></div><div class=""><div class=""><div class=""><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">On Fri, Aug 15, 2014 at 10:38 AM, Artyom Skrobov <<a href="mailto:Artyom.Skrobov@arm.com" target="_blank" style="color: purple; text-decoration: underline;" class=""><span style="color: purple;" class="">Artyom.Skrobov@arm.com</span></a>> wrote:<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">Many thanks -- committed as r215650<br class=""><br class="">Alexander, can you confirm that the analyzer performance is now acceptable<br class="">for your use cases?<o:p class=""></o:p></div></div><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div></div></div><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">Artyom, sorry for the long delay. These files now work fine, but I still see up to 8-10 hours analysis time on a couple of other files. I'm sure I didn't see this before your first patch, but I can't yet tell in which revision it was introduced. I'll post more details and a repro later today.<o:p class=""></o:p></div></div></div><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div></div></div><blockquote style="border-style: none none none solid; border-left-color: rgb(204, 204, 204); border-left-width: 1pt; padding: 0cm 0cm 0cm 6pt; margin: 5pt 0cm 5pt 4.8pt;" class="" type="cite"><div class=""><p class="MsoNormal" style="margin: 0cm 0cm 12pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><br class=""><br class="">-----Original Message-----<br class="">From: Ted kremenek [mailto:<a href="mailto:kremenek@apple.com" target="_blank" style="color: purple; text-decoration: underline;" class=""><span style="color: purple;" class="">kremenek@apple.com</span></a>]<br class="">Sent: 14 August 2014 16:36<br class="">To: Artyom Skrobov<br class="">Cc: Alexander Kornienko;<span class="apple-converted-space"> </span><a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank" style="color: purple; text-decoration: underline;" class=""><span style="color: purple;" class="">cfe-commits@cs.uiuc.edu</span></a><br class="">Subject: Re: [PATCH] Inverse post-order traversal for LiveVariables<br class="">analysis, to recover the performance after r214064<o:p class=""></o:p></p></div><div class=""><div class=""><p class="MsoNormal" style="margin: 0cm 0cm 12pt; font-size: 12pt; font-family: 'Times New Roman', serif;">Looks great to me.<br class=""><br class="">> On Aug 14, 2014, at 3:08 AM, Artyom Skrobov <<a href="mailto:Artyom.Skrobov@arm.com" target="_blank" style="color: purple; text-decoration: underline;" class=""><span style="color: purple;" class="">Artyom.Skrobov@arm.com</span></a>><br class="">wrote:<br class="">><br class="">> Thank you Ted!<br class="">><br class="">> Attaching the updated patch for a final review.<br class="">><br class="">> Summary of changes:<br class="">><br class="">> * Comments updated to reflect the two possible CFG traversal orders<br class="">> * PostOrderCFGView::po_iterator taken out of the header file<br class="">> * Iteration order for PostOrderCFGView changed to "reverse inverse<br class="">> post-order", the one required for a backward analysis<br class="">> * ReversePostOrderCFGView created, with the same iteration order that<br class="">> PostOrderCFGView used to have, the one required for a forward analysis<br class="">> * The two previous consumers of PostOrderCFGView, ThreadSafetyCommon.h and<br class="">> Consumed.cpp, switched to use ReversePostOrderCFGView<br class="">> * DataflowWorklistBase renamed to DataflowWorklist, and the two<br class="">> specializations named BackwardDataflowWorklist and ForwardDataflowWorklist<br class="">><br class="">> I believe this naming scheme matches the accepted terminology best.<o:p class=""></o:p></p></div></div></blockquote></div></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">_______________________________________________<br class="">cfe-commits mailing list<br class=""><a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank" style="color: purple; text-decoration: underline;" class=""><span style="color: purple;" class="">cfe-commits@cs.uiuc.edu</span></a><br class=""><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank" style="color: purple; text-decoration: underline;" class=""><span style="color: purple;" class="">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</span></a><o:p class=""></o:p></div></div></div></blockquote></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div></div></div></div></div></div></div></div></div></div></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><PostOrderCFGView.patch></div></div></blockquote></div></div></div></div></div></blockquote></div><br class=""></div></body></html>