<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 Feb 27, 2017, at 12:01 PM, Hal Finkel <<a href="mailto:hfinkel@anl.gov" class="">hfinkel@anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" class="">
<div bgcolor="#FFFFFF" text="#000000" class=""><p class=""><br class="">
</p>
<div class="moz-cite-prefix">On 02/27/2017 01:47 PM, Daniel Berlin
wrote:<br class="">
</div>
<blockquote cite="mid:CAF4BwTX9XUeNd2JZE0=f6Fh=B+dk3w2xX6Tf7xBafi4=65NfQw@mail.gmail.com" type="cite" class="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" class="">
<div dir="ltr" class=""><br class="">
<div class="gmail_extra"><br class="">
<div class="gmail_quote">On Mon, Feb 27, 2017 at 11:29 AM,
Adam Nemet <span dir="ltr" class=""><<a moz-do-not-send="true" href="mailto:anemet@apple.com" target="_blank" class="">anemet@apple.com</a>></span>
wrote:<br class="">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word" class=""><br class="">
<div class="">
<div class="">
<div class="h5">
<blockquote type="cite" class="">
<div class="">On Feb 27, 2017, at 10:11 AM, Hal Finkel
<<a moz-do-not-send="true" href="mailto:hfinkel@anl.gov" target="_blank" class="">hfinkel@anl.gov</a>>
wrote:</div>
<br class="m_-8094851141848933186Apple-interchange-newline">
<div class="">
<div bgcolor="#FFFFFF" text="#000000" class=""><p class=""><br class="">
</p>
<div class="m_-8094851141848933186moz-cite-prefix">On
02/27/2017 11:47 AM, Adam Nemet wrote:<br class="">
</div>
<blockquote type="cite" class=""> <br class="">
<div class="">
<blockquote type="cite" class="">
<div class="">On Feb 27, 2017, at 9:39 AM,
Daniel Berlin <<a moz-do-not-send="true" href="mailto:dberlin@dberlin.org" target="_blank" class="">dberlin@dberlin.org</a>>
wrote:</div>
<br class="m_-8094851141848933186Apple-interchange-newline">
<div class="">
<div dir="ltr" class=""><br class="">
<div class="gmail_extra"><br class="">
<div class="gmail_quote">On Mon,
Feb 27, 2017 at 9:29 AM, Adam
Nemet <span dir="ltr" class=""><<a moz-do-not-send="true" href="mailto:anemet@apple.com" target="_blank" class="">anemet@apple.com</a>></span>
wrote:<br class="">
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div style="word-wrap:break-word" class=""><br class="">
<div class=""><span class="m_-8094851141848933186gmail-">
<blockquote type="cite" class="">
<div class="">On Feb 27,
2017, at 7:27 AM,
Hal Finkel <<a moz-do-not-send="true" href="mailto:hfinkel@anl.gov" target="_blank" class="">hfinkel@anl.gov</a>>
wrote:</div>
<br class="m_-8094851141848933186gmail-m_8239107560126363242Apple-interchange-newline">
<div class="">
<div class="m_-8094851141848933186gmail-m_8239107560126363242moz-cite-prefix" style="font-family:helvetica;font-size:10px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)"><br class="m_-8094851141848933186gmail-m_8239107560126363242Apple-interchange-newline">
On 02/27/2017
06:29 AM, Nema,
Ashutosh wrote:<br class="">
</div>
<blockquote type="cite" style="font-family:helvetica;font-size:10px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)" class="">
<div class="m_-8094851141848933186gmail-m_8239107560126363242WordSection1">
<div class="">Thanks
for looking
into this.</div>
<div class=""> </div>
<div class="">1) Issues
with re
running
vectorizer:</div>
<div class="">Vectorizer
might generate
redundant
alias checks
while
vectorizing
epilog loop.</div>
<div class="">Redundant
alias checks
are expensive,
we like to
reuse the
results of
already
computed alias
checks.</div>
<div class="">With
metadata we
can limit the
width of
epilog loop,
but not sure
about reusing
alias check
result.</div>
<div class="">Any
thoughts on
rerunning
vectorizer
with reusing
the alias
check result ?</div>
</div>
</blockquote>
<br style="font-family:helvetica;font-size:10px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)" class="">
<span style="font-family:helvetica;font-size:10px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);float:none;display:inline" class="">One
way of looking
at this is:
Reusing the
alias-check
result is really
just a
conditional
propagation
problem; if we
don't already
have an
optimization
that can combine
these after the
fact, then we
should.</span><br style="font-family:helvetica;font-size:10px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)" class="">
</div>
</blockquote>
<div class=""><br class="">
</div>
</span>
<div class="">+Danny</div>
<div class=""><br class="">
</div>
<div class="">Isn’t Extended SSA
supposed to help with
this?</div>
</div>
</div>
</blockquote>
<div class=""><br class="">
</div>
<div class="">Yes, it will solve this
with no issue already. GVN
probably does already too.</div>
<div class=""><br class="">
</div>
<div class="">even if if you have</div>
<div class=""><br class="">
</div>
<div class="">if (a == b)</div>
<div class="">
<div class="">if (a == c)</div>
</div>
<div class="">
<div class=""> if (a == d)</div>
</div>
<div class="">
<div class=""> if (a == e)</div>
</div>
<div class="">
<div class=""> if (a == g)</div>
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">and we can prove a ... g
equivalent, newgvn will
eliminate them all and set
all the branches true.</div>
<div class=""><br class="">
</div>
<div class="">If you need a simpler
clean up pass, we could run
it on sub-graphs.</div>
</div>
</div>
</div>
</div>
</blockquote>
<div class=""><br class="">
</div>
<div class="">Yes we probably don’t want to run a
full GVN after the “loop-scheduling”
passes.</div>
</div>
</blockquote>
<br class="">
FWIW, we could, just without the
memory-dependence analysis enabled (i.e. set
the NoLoads constructor parameter to true).
GVN is pretty fast in that mode.<br class="">
</div>
</div>
</blockquote>
<div class=""><br class="">
</div>
</div>
</div>
<div class="">OK. Another data point is that I’ve seen cases
in the past where the alias checks required for the
loop passes could enable GVN to remove redundant
loads/stores. Currently we can only pick these up
with LTO when GVN is rerun.</div>
</div>
</div>
</blockquote>
<div class=""><br class="">
</div>
<div class="">This is just GVN brokenness, newgvn should not have
this problem.</div>
<div class="">If it does, i'd love to see it.</div>
</div>
</div>
</div>
</blockquote>
<br class="">
I thought that the problem is that we just don't run GVN after that
point in the pipeline.<br class=""></div></div></blockquote><div><br class=""></div><div>Yeah, that is the problem but I think Danny misunderstood what I was trying to say.</div><div><br class=""></div><div>This was a datapoint to possibly rerun GVN with memory-awareness.</div><br class=""><blockquote type="cite" class=""><div class=""><div bgcolor="#FFFFFF" text="#000000" class="">
<br class="">
-Hal<br class="">
<br class="">
<blockquote cite="mid:CAF4BwTX9XUeNd2JZE0=f6Fh=B+dk3w2xX6Tf7xBafi4=65NfQw@mail.gmail.com" type="cite" class="">
<div dir="ltr" class="">
<div class="gmail_extra">
<div class="gmail_quote">
<div class=""><br class="">
</div>
<div class="">(I'm working on the last few parts of turning it on by
default, but it requires a new getModRefInfo interface to
be able to get the last few testcases)</div>
<div class=""><br class="">
</div>
</div>
</div>
</div>
</blockquote>
<br class="">
<pre class="moz-signature" cols="72">--
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
</div>
</div></blockquote></div><br class=""></body></html>