<div dir="ltr">Ack, I'm trying to add a work-around for 3.7, since this seems to be an issue in libc++ that's been fixed. <div>It would be good to have the bots updates at some point.</div><div><br></div><div>Thanks,</div><div>Alina</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Aug 20, 2018 at 12:23 PM Krzysztof Parzyszek <<a href="mailto:kparzysz@codeaurora.org">kparzysz@codeaurora.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I can only reproduce it with clang 3.7.0 and clang 3.8.0.  I tried 5.0.0 <br>
and 6.0.1 and they work.  I have a preprocessed file, but it's very <br>
large.  I opened a bug <a href="https://bugs.llvm.org/show_bug.cgi?id=38646" rel="noreferrer" target="_blank">https://bugs.llvm.org/show_bug.cgi?id=38646</a> and <br>
added the zipped file as an attachment there.<br>
<br>
This may be a bug in clang, given that it works with newer releases. I <br>
can upgrade the build compilers on the bots, but it will leave people <br>
who still use these compilers unable to build LLVM at the moment.<br>
<br>
-Krzysztof<br>
<br>
On 8/20/2018 1:21 PM, Alina Sbirlea wrote:<br>
> Would you mind giving a pointer on how I can reproduce this failure <br>
> locally (e.g. flags used)? I hoped r340067 would fix it, but seems not.<br>
> <br>
> On Mon, Aug 20, 2018 at 10:59 AM Krzysztof Parzyszek <br>
> <<a href="mailto:kparzysz@codeaurora.org" target="_blank">kparzysz@codeaurora.org</a> <mailto:<a href="mailto:kparzysz@codeaurora.org" target="_blank">kparzysz@codeaurora.org</a>>> wrote:<br>
> <br>
>     It seems like this commit broke Hexagon buildbots. Could you take a<br>
>     look?<br>
> <br>
>     First breakage:<br>
>     <a href="http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/19479" rel="noreferrer" target="_blank">http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/19479</a><br>
> <br>
>     -Krzysztof<br>
> <br>
>     On 8/17/2018 12:39 PM, Alina Sbirlea via llvm-commits wrote:<br>
>      > Author: asbirlea<br>
>      > Date: Fri Aug 17 10:39:15 2018<br>
>      > New Revision: 340052<br>
>      ><br>
>      > URL: <a href="http://llvm.org/viewvc/llvm-project?rev=340052&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=340052&view=rev</a><br>
>      > Log:<br>
>      > [IDF] Teach Iterated Dominance Frontier to use a snapshot CFG<br>
>     based on a GraphDiff.<br>
>      ><br>
>      > Summary:<br>
>      > Create the ability to compute IDF using a CFG View.<br>
>      > For this, we'll need a new DT created using a list of Updates (to<br>
>     be refactored later to a GraphDiff), and the GraphTraits based on<br>
>     the same GraphDiff.<br>
>      ><br>
>      > Reviewers: kuhar, george.burgess.iv, mzolotukhin<br>
>      ><br>
>      > Subscribers: sanjoy, jlebar, llvm-commits<br>
>      ><br>
>      > Differential Revision: <a href="https://reviews.llvm.org/D50675" rel="noreferrer" target="_blank">https://reviews.llvm.org/D50675</a><br>
>      ><br>
>      > Modified:<br>
>      >      llvm/trunk/include/llvm/Analysis/IteratedDominanceFrontier.h<br>
>      >      llvm/trunk/lib/Analysis/IteratedDominanceFrontier.cpp<br>
>      ><br>
>      > Modified:<br>
>     llvm/trunk/include/llvm/Analysis/IteratedDominanceFrontier.h<br>
>      > URL:<br>
>     <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/IteratedDominanceFrontier.h?rev=340052&r1=340051&r2=340052&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/IteratedDominanceFrontier.h?rev=340052&r1=340051&r2=340052&view=diff</a><br>
>      ><br>
>     ==============================================================================<br>
>      > --- llvm/trunk/include/llvm/Analysis/IteratedDominanceFrontier.h<br>
>     (original)<br>
>      > +++ llvm/trunk/include/llvm/Analysis/IteratedDominanceFrontier.h<br>
>     Fri Aug 17 10:39:15 2018<br>
>      > @@ -28,6 +28,7 @@<br>
>      >   #include "llvm/ADT/SmallPtrSet.h"<br>
>      >   #include "llvm/ADT/SmallVector.h"<br>
>      >   #include "llvm/IR/BasicBlock.h"<br>
>      > +#include "llvm/IR/CFGDiff.h"<br>
>      >   #include "llvm/IR/Dominators.h"<br>
>      ><br>
>      >   namespace llvm {<br>
>      > @@ -45,17 +46,21 @@ namespace llvm {<br>
>      >   template <class NodeTy, bool IsPostDom><br>
>      >   class IDFCalculator {<br>
>      >    public:<br>
>      > -  IDFCalculator(DominatorTreeBase<BasicBlock, IsPostDom> &DT)<br>
>      > -      : DT(DT), useLiveIn(false) {}<br>
>      > +   IDFCalculator(DominatorTreeBase<BasicBlock, IsPostDom> &DT)<br>
>      > +       : DT(DT), GD(nullptr), useLiveIn(false) {}<br>
>      ><br>
>      > -  /// Give the IDF calculator the set of blocks in which the<br>
>     value is<br>
>      > -  /// defined.  This is equivalent to the set of starting blocks<br>
>     it should be<br>
>      > -  /// calculating the IDF for (though later gets pruned based on<br>
>     liveness).<br>
>      > -  ///<br>
>      > -  /// Note: This set *must* live for the entire lifetime of the<br>
>     IDF calculator.<br>
>      > -  void setDefiningBlocks(const SmallPtrSetImpl<BasicBlock *><br>
>     &Blocks) {<br>
>      > -    DefBlocks = &Blocks;<br>
>      > -  }<br>
>      > +   IDFCalculator(DominatorTreeBase<BasicBlock, IsPostDom> &DT,<br>
>      > +                 GraphDiff<BasicBlock *, IsPostDom> *GD)<br>
>      > +       : DT(DT), GD(GD), useLiveIn(false) {}<br>
>      > +<br>
>      > +   /// Give the IDF calculator the set of blocks in which the<br>
>     value is<br>
>      > +   /// defined.  This is equivalent to the set of starting<br>
>     blocks it should be<br>
>      > +   /// calculating the IDF for (though later gets pruned based<br>
>     on liveness).<br>
>      > +   ///<br>
>      > +   /// Note: This set *must* live for the entire lifetime of the<br>
>     IDF calculator.<br>
>      > +   void setDefiningBlocks(const SmallPtrSetImpl<BasicBlock *><br>
>     &Blocks) {<br>
>      > +     DefBlocks = &Blocks;<br>
>      > +   }<br>
>      ><br>
>      >     /// Give the IDF calculator the set of blocks in which the<br>
>     value is<br>
>      >     /// live on entry to the block.   This is used to prune the<br>
>     IDF calculation to<br>
>      > @@ -85,6 +90,7 @@ class IDFCalculator {<br>
>      ><br>
>      >   private:<br>
>      >    DominatorTreeBase<BasicBlock, IsPostDom> &DT;<br>
>      > + GraphDiff<BasicBlock *, IsPostDom> *GD;<br>
>      >    bool useLiveIn;<br>
>      >    const SmallPtrSetImpl<BasicBlock *> *LiveInBlocks;<br>
>      >    const SmallPtrSetImpl<BasicBlock *> *DefBlocks;<br>
>      ><br>
>      > Modified: llvm/trunk/lib/Analysis/IteratedDominanceFrontier.cpp<br>
>      > URL:<br>
>     <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IteratedDominanceFrontier.cpp?rev=340052&r1=340051&r2=340052&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IteratedDominanceFrontier.cpp?rev=340052&r1=340051&r2=340052&view=diff</a><br>
>      ><br>
>     ==============================================================================<br>
>      > --- llvm/trunk/lib/Analysis/IteratedDominanceFrontier.cpp (original)<br>
>      > +++ llvm/trunk/lib/Analysis/IteratedDominanceFrontier.cpp Fri Aug<br>
>     17 10:39:15 2018<br>
>      > @@ -17,6 +17,7 @@<br>
>      >   #include <queue><br>
>      ><br>
>      >   namespace llvm {<br>
>      > +<br>
>      >   template <class NodeTy, bool IsPostDom><br>
>      >   void IDFCalculator<NodeTy, IsPostDom>::calculate(<br>
>      >       SmallVectorImpl<BasicBlock *> &PHIBlocks) {<br>
>      > @@ -61,29 +62,39 @@ void IDFCalculator<NodeTy, IsPostDom>::c<br>
>      >         BasicBlock *BB = Node->getBlock();<br>
>      >         // Succ is the successor in the direction we are<br>
>     calculating IDF, so it is<br>
>      >         // successor for IDF, and predecessor for Reverse IDF.<br>
>      > -      for (auto *Succ : children<NodeTy>(BB)) {<br>
>      > +      auto DoWork = [&](BasicBlock *Succ) {<br>
>      >           DomTreeNode *SuccNode = DT.getNode(Succ);<br>
>      ><br>
>      >           // Quickly skip all CFG edges that are also dominator<br>
>     tree edges instead<br>
>      >           // of catching them below.<br>
>      >           if (SuccNode->getIDom() == Node)<br>
>      > -          continue;<br>
>      > +          return;<br>
>      ><br>
>      >           const unsigned SuccLevel = SuccNode->getLevel();<br>
>      >           if (SuccLevel > RootLevel)<br>
>      > -          continue;<br>
>      > +          return;<br>
>      ><br>
>      >           if (!VisitedPQ.insert(SuccNode).second)<br>
>      > -          continue;<br>
>      > +          return;<br>
>      ><br>
>      >           BasicBlock *SuccBB = SuccNode->getBlock();<br>
>      >           if (useLiveIn && !LiveInBlocks->count(SuccBB))<br>
>      > -          continue;<br>
>      > +          return;<br>
>      ><br>
>      >           PHIBlocks.emplace_back(SuccBB);<br>
>      >           if (!DefBlocks->count(SuccBB))<br>
>      >             PQ.push(std::make_pair(<br>
>      >                 SuccNode, std::make_pair(SuccLevel,<br>
>     SuccNode->getDFSNumIn())));<br>
>      > +      };<br>
>      > +<br>
>      > +      if (GD) {<br>
>      > +        for (auto Pair : children<<br>
>      > +                 std::pair<const GraphDiff<BasicBlock *,<br>
>     IsPostDom> *, NodeTy>>(<br>
>      > +                 {GD, BB}))<br>
>      > +          DoWork(Pair.second);<br>
>      > +      } else {<br>
>      > +        for (auto *Succ : children<NodeTy>(BB))<br>
>      > +          DoWork(Succ);<br>
>      >         }<br>
>      ><br>
>      >         for (auto DomChild : *Node) {<br>
>      ><br>
>      ><br>
>      > _______________________________________________<br>
>      > llvm-commits mailing list<br>
>      > <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a> <mailto:<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>><br>
>      > <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
>      ><br>
> <br>
>     -- <br>
>     Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,<br>
>     hosted by The Linux Foundation<br>
> <br>
<br>
-- <br>
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, <br>
hosted by The Linux Foundation<br>
</blockquote></div>