<div dir="ltr">I'm not at all concerned about the time it took to respond, that was awesome! =]<br><br><div>Over the past few days, it's been a matter of isolating one after another regression. Not sure the last time we actually had been able to extensively test top-of-tree and have it go all the way through. So my worry is with low-confidence forward fixes. Those have a higher risk than reverts. I'm not saying *this* fix is actually a bad idea, I'm just trying to encourage lots of folks to be cautious about fixing forward without really high confidence that the fix is both correct and reasonably complete.</div><div><br></div><div>-Chandler</div></div><br><div class="gmail_quote">On Thu, May 21, 2015 at 8:43 PM Philip Reames <<a href="mailto:listmail@philipreames.com">listmail@philipreames.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>Chandler,<br>
      <br>
      I've been busy the last few days and not paying the most attention
      to LLVM happenings, but I'm a bit confused.  This change had been
      in for several days and, as far as I know, it hadn't broken the
      bots or anything.  A problem report to fix time of just under 3
      hours (counting from Nick's email) seems entirely within normal
      practice.  What am I missing here?<br>
      <br>
      For the record, my fix landed at about the same time as your
      email.  If you'd like to revert both, I wouldn't actively oppose
      it.  I just haven't seen any need so far.  <br></div></div><div bgcolor="#FFFFFF" text="#000000"><div>
      <br>
      Philip</div></div><div bgcolor="#FFFFFF" text="#000000"><div><br>
      <br>
      On 05/21/2015 07:19 PM, Chandler Carruth wrote:<br>
    </div></div><div bgcolor="#FFFFFF" text="#000000">
    <blockquote type="cite">
      <div dir="ltr">Given the very fragile state of the tree over the
        past few days, I'd suggest reverting first and then reapplying
        when you have the fix. If it ends up easy, great, but this way
        we can hopefully make it a bit farther in testing.<br>
      </div>
      <br>
      <div class="gmail_quote">On Thu, May 21, 2015 at 5:31 PM Philip
        Reames <<a href="mailto:listmail@philipreames.com" target="_blank">listmail@philipreames.com</a>>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div bgcolor="#FFFFFF" text="#000000"> Sanjoy is out on
            vacation, but I'm going to look into this.  I'll be offline
            for about an hour, but should be able to start investigating
            by around 7pm.  On the surface, it looks like it should be
            an easy fix.  Hopefully, I'll have this resolved within a
            couple of hours.  Sorry for the breakage.  <br>
          </div>
          <div bgcolor="#FFFFFF" text="#000000"> <br>
            Philip</div>
          <div bgcolor="#FFFFFF" text="#000000"><br>
            <br>
            <div>On 05/21/2015 04:38 PM, Nick Lewycky wrote:<br>
            </div>
            <blockquote type="cite">
              <div dir="ltr">
                <div class="gmail_extra">
                  <div class="gmail_quote">On 18 May 2015 at 11:07,
                    Sanjoy Das <span dir="ltr"><<a href="mailto:sanjoy@playingwithpointers.com" target="_blank">sanjoy@playingwithpointers.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">Author:

                      sanjoy<br>
                      Date: Mon May 18 13:07:00 2015<br>
                      New Revision: 237593<br>
                      <br>
                      URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D237593-26view-3Drev&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=EZRvoJai0V1ZEULFLl3UFBFw3GpoHtruFDOok84hYrI&s=4QqYr7GqSrZjVxTSY4zWHbjeCHYmt-2bkaDpOtpbsM8&e=" target="_blank">http://llvm.org/viewvc/llvm-project?rev=237593&view=rev</a><br>
                      Log:<br>
                      Exploit dereferenceable_or_null attribute in LICM
                      pass<br>
                      <br>
                      Summary:<br>
                      Allow hoisting of loads from values marked with
                      dereferenceable_or_null<br>
                      attribute. For values marked with the attribute
                      perform<br>
                      context-sensitive analysis to determine whether
                      it's known-non-null or<br>
                      not.<br>
                    </blockquote>
                    <div><br>
                    </div>
                    <div>This commit caused PR23608, see the testcase in
                      that PR.</div>
                    <div><br>
                    </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">-///

                      Only sink or hoist an instruction if it is not a
                      trapping instruction<br>
                      +/// Only sink or hoist an instruction if it is
                      not a trapping instruction,<br>
                      +/// or if the instruction is known not to trap
                      when moved to the preheader.<br>
                       /// or if it is a trapping instruction and is
                      guaranteed to execute.<br>
                      -///<br>
                      -static bool isSafeToExecuteUnconditionally(const
                      Instruction &Inst,<br>
                      +static bool isSafeToExecuteUnconditionally(const
                      Instruction &Inst,<br>
                                                                  const
                      DominatorTree *DT,<br>
                      +                                           const
                      TargetLibraryInfo *TLI,<br>
                                                                  const
                      Loop *CurLoop,<br>
                                                                  const
                      LICMSafetyInfo *SafetyInfo) {<br>
                      -  // If it is not a trapping instruction, it is
                      always safe to hoist.<br>
                      -  if (isSafeToSpeculativelyExecute(&Inst))<br>
                      +  const Instruction *CtxI =
                      CurLoop->getLoopPreheader()->getTerminator();<br>
                    </blockquote>
                    <div><br>
                    </div>
                    <div>A Loop* is not guaranteed to have a preheader,
                      in which case CurLoop->getLoopPreheader() will
                      return null.</div>
                    <div><br>
                    </div>
                    <div>Nick</div>
                    <div> </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">+ 

                      if (isSafeToSpeculativelyExecute(&Inst, CtxI,
                      DT, TLI))<br>
                           return true;<br>
                      <br>
                         return isGuaranteedToExecute(Inst, DT, CurLoop,
                      SafetyInfo);<br>
                    </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"><br>
                    </blockquote>
                  </div>
                </div>
              </div>
              <br>
              <fieldset></fieldset>
              <br>
              <pre>_______________________________________________
llvm-commits mailing list
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a>
</pre>
            </blockquote>
            <br>
          </div>
          _______________________________________________<br>
          llvm-commits mailing list<br>
          <a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
          <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
        </blockquote>
      </div>
    </blockquote>
    <br>
  </div></blockquote></div>