<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=""><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 30, 2014, at 2:37 PM, Hal Finkel <<a href="mailto:hfinkel@anl.gov" class="">hfinkel@anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="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; float: none; display: inline !important;" class="">----- Original Message -----</span><br style="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;" class=""><blockquote type="cite" style="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;" class="">From: "Andrew Trick" <<a href="mailto:atrick@apple.com" class="">atrick@apple.com</a>><br class="">To: "zinovy nis" <<a href="mailto:zinovy.nis@gmail.com" class="">zinovy.nis@gmail.com</a>>, <a href="mailto:chandlerc@gmail.com" class="">chandlerc@gmail.com</a>, <a href="mailto:atrick@apple.com" class="">atrick@apple.com</a><br class="">Cc: <a href="mailto:llvm-commits@cs.uiuc.edu" class="">llvm-commits@cs.uiuc.edu</a><br class="">Sent: Tuesday, September 30, 2014 4:29:08 PM<br class="">Subject: Re: [PATCH] [OPENMP] llvm.loop.vectorize.enable metadata are lost<span class="Apple-tab-span" style="white-space: pre;">     </span>after critical edge splitting<br class=""><br class="">Is it incorrect to leave the loop metadata on the original branch<br class="">when splitting the edge?<br class=""><br class="">GVN already requires DomTree, so no change to the pipeline is needed<br class="">if you use it.<br class=""><br class="">In splitCriticalEdges, if LoopInfo is available you can use it.<br class="">Otherwise you can use the DomTree. If the DomTree check fails (ie.<br class="">both targets dominate the latch) then just invalidate the metadata.<br class=""><br class="">I think there is a fundamental problem with the metadata design--it's<br class="">ridiculous to assume that any pass that splits critical edges has<br class="">LoopInfo--but that should at least workaround your problem.<br class=""></blockquote><br style="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;" class=""><span style="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; float: none; display: inline !important;" class="">Is that a flaw in the design of the metadata, or just in the fact that the utility functions used to manipulate the metadata are part of LoopInfo?</span><br style="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;" class=""></div></blockquote></div><br class=""><div class="">I haven’t reviewed the metadata design since it was put in place. Based on this patch, the problem is that splitCriticalEdges needs to update the metadata (that is itself a somewhat bad design), and updating the metadata requires LoopInfo to determine whether we’re splitting the loop backedge or not. My suggestion is simply to use the DomTree to determine whether we’re splitting the backedge and update the metadata without requiring LoopInfo.</div><div class=""><br class=""></div><div class="">You’re correct that my approach cannot use the setLoopID() utility, but I think that’s only part of the problem.</div><div class=""><br class=""></div><div class="">-Andy</div></body></html>