<div dir="ltr"><span style="font-size:small;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Hope </span><span style="text-decoration-style:initial;text-decoration-color:initial;font-family:arial,sans-serif;font-size:12.8px;float:none;display:inline">rL339724 (D50734) fixed this (original culp</span>rit  rL339694).<div style="font-size:small;text-decoration-style:initial;text-decoration-color:initial"><span style="font-family:arial,sans-serif;font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Thank you for the heads up!</span></div><br></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Aug 14, 2018 at 11:36 AM Adrian Prantl <<a href="mailto:aprantl@apple.com">aprantl@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">It looks like this (or a related) patch broke the build with -DLLVM_ENABLE_MODULES=On. Could you please take a look?<div><br></div><div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">While building module 'LLVM_Backend' imported from ../lib/Target/BPF/BPF.h:14:</span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">While building module 'LLVM_Analysis' imported from ../include/llvm/CodeGen/MachineInstr.h:23:</span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">While building module 'LLVM_intrinsic_gen' imported from ../include/llvm/Analysis/MemoryLocation.h:21:</span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">While building module 'LLVM_IR' imported from ../include/llvm/IR/Argument.h:20:</span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">In file included from <module-includes>:32:</span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><b>../include/llvm/IR/CFGDiff.h:22:10: </b></span><span style="font-variant-ligatures:no-common-ligatures;color:#b42419"><b>fatal error: </b></span><span style="font-variant-ligatures:no-common-ligatures"><b>cyclic dependency in module 'LLVM_intrinsic_gen': LLVM_intrinsic_gen -> LLVM_IR -> LLVM_intrinsic_gen</b></span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">#include "llvm/IR/CFG.h"</span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(47,180,29)"><span style="font-variant-ligatures:no-common-ligatures"><b>         ^</b></span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">While building module 'LLVM_Backend' imported from ../lib/Target/BPF/BPF.h:14:</span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">While building module 'LLVM_Analysis' imported from ../include/llvm/CodeGen/MachineInstr.h:23:</span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">While building module 'LLVM_intrinsic_gen' imported from ../include/llvm/Analysis/MemoryLocation.h:21:</span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">In file included from <module-includes>:1:</span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><b>../include/llvm/IR/Argument.h:20:10: </b></span><span style="font-variant-ligatures:no-common-ligatures;color:#b42419"><b>fatal error: </b></span><span style="font-variant-ligatures:no-common-ligatures"><b>could not build module 'LLVM_IR'</b></span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">#include "llvm/IR/Value.h"</span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(47,180,29)"><span style="font-variant-ligatures:no-common-ligatures"><b> ~~~~~~~~^~~~~~~~~~~~~~~~~</b></span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><b>../include/llvm/Analysis/MemoryLocation.h:21:10: </b></span><span style="font-variant-ligatures:no-common-ligatures;color:#b42419"><b>fatal error: </b></span><span style="font-variant-ligatures:no-common-ligatures"><b>could not build module 'LLVM_intrinsic_gen'</b></span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">#include "llvm/IR/CallSite.h"</span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(47,180,29)"><span style="font-variant-ligatures:no-common-ligatures"><b> ~~~~~~~~^~~~~~~~~~~~~~~~~~~~</b></span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><b>../include/llvm/ProfileData/InstrProfReader.h:20:10: </b></span><span style="font-variant-ligatures:no-common-ligatures;color:#b42419"><b>fatal error: </b></span><span style="font-variant-ligatures:no-common-ligatures"><b>could not build module 'LLVM_IR'</b></span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">#include "llvm/IR/ProfileSummary.h"</span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(47,180,29)"><span style="font-variant-ligatures:no-common-ligatures"><b> ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~</b></span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">While building module 'LLVM_Backend' imported from ../lib/Target/BPF/BPF.h:14:</span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">In file included from <module-includes>:1:</span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">In file included from ../include/llvm/CodeGen/LatencyPriorityQueue.h:19:</span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">In file included from ../include/llvm/CodeGen/ScheduleDAG.h:24:</span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><b>../include/llvm/CodeGen/MachineInstr.h:23:10: </b></span><span style="font-variant-ligatures:no-common-ligatures;color:#b42419"><b>fatal error: </b></span><span style="font-variant-ligatures:no-common-ligatures"><b>could not build module 'LLVM_Analysis'</b></span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">#include "llvm/Analysis/AliasAnalysis.h"</span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(47,180,29)"><span style="font-variant-ligatures:no-common-ligatures"><b> ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</b></span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">In file included from ../lib/Target/BPF/BPFAsmPrinter.cpp:15:</span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><b>../lib/Target/BPF/BPF.h:14:10: </b></span><span style="font-variant-ligatures:no-common-ligatures;color:#b42419"><b>fatal error: </b></span><span style="font-variant-ligatures:no-common-ligatures"><b>could not build module 'LLVM_Backend'</b></span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">#include "llvm/Target/TargetMachine.h"</span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(47,180,29)"><span style="font-variant-ligatures:no-common-ligatures"><b> ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~</b></span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">6 errors generated.</span></div><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div>thanks!</div><div>adrian</div><div><br><blockquote type="cite"><div>On Aug 14, 2018, at 10:43 AM, Alina Sbirlea via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:</div><br class="m_3153799061097155378Apple-interchange-newline"><div><div>Author: asbirlea<br>Date: Tue Aug 14 10:43:24 2018<br>New Revision: 339699<br><br>URL: <a href="http://llvm.org/viewvc/llvm-project?rev=339699&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=339699&view=rev</a><br>Log:<br>[GraphDiff] Make InverseGraph a property of a GraphDiff.<br><br>Summary:<br>Treating a graph in reverse is a property of the GraphDiff and should instead be a template argument, just like IsPostDom is one for DomTrees.<br>If it's just an argument to all methods, we could have mismatches between the constructor of the GraphDiff which may reverse the updates when filtering them, and the calls retrieving the filtered delete/insert updates.<br>Also, since this will be used in IDF, where we're using a DomTree, this creates a cleaner interface for the GraphTraits to use the existing template argument of DomTreeBase.<br><br>Separate patch from the one adding GraphDiff, so get a clear diff of what changed.<br><br>Reviewers: timshen, kuhar<br><br>Subscribers: sanjoy, llvm-commits, jlebar<br><br>Differential Revision: <a href="https://reviews.llvm.org/D50687" target="_blank">https://reviews.llvm.org/D50687</a><br><br>Modified:<br>    llvm/trunk/include/llvm/IR/CFGDiff.h<br><br>Modified: llvm/trunk/include/llvm/IR/CFGDiff.h<br>URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/CFGDiff.h?rev=339699&r1=339698&r2=339699&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/CFGDiff.h?rev=339699&r1=339698&r2=339699&view=diff</a><br>==============================================================================<br>--- llvm/trunk/include/llvm/IR/CFGDiff.h (original)<br>+++ llvm/trunk/include/llvm/IR/CFGDiff.h Tue Aug 14 10:43:24 2018<br>@@ -78,7 +78,7 @@ namespace llvm {<br> // newly inserted. The current diff treats the CFG as a graph rather than a<br> // multigraph. Added edges are pruned to be unique, and deleted edges will<br> // remove all existing edges between two blocks.<br>-template <typename NodePtr> class GraphDiff {<br>+template <typename NodePtr, bool InverseGraph = false> class GraphDiff {<br>   using UpdateMapType = SmallDenseMap<NodePtr, SmallVector<NodePtr, 2>>;<br>   UpdateMapType SuccInsert;<br>   UpdateMapType SuccDelete;<br>@@ -102,7 +102,7 @@ template <typename NodePtr> class GraphD<br><br> public:<br>   GraphDiff() {}<br>-  GraphDiff(ArrayRef<cfg::Update<NodePtr>> Updates, bool InverseGraph = false) {<br>+  GraphDiff(ArrayRef<cfg::Update<NodePtr>> Updates) {<br>     SmallVector<cfg::Update<NodePtr>, 4> LegalizedUpdates;<br>     cfg::LegalizeUpdates<NodePtr>(Updates, LegalizedUpdates, InverseGraph);<br>     for (auto U : LegalizedUpdates) {<br>@@ -116,8 +116,7 @@ public:<br>     }<br>   }<br><br>-  bool ignoreChild(const NodePtr BB, NodePtr EdgeEnd, bool InverseEdge,<br>-                   bool InverseGraph) const {<br>+  bool ignoreChild(const NodePtr BB, NodePtr EdgeEnd, bool InverseEdge) const {<br>     auto &DeleteChildren =<br>         (InverseEdge != InverseGraph) ? PredDelete : SuccDelete;<br>     auto It = DeleteChildren.find(BB);<br>@@ -128,8 +127,7 @@ public:<br>   }<br><br>   iterator_range<typename SmallVectorImpl<NodePtr>::const_iterator><br>-  getAddedChildren(const NodePtr BB, bool InverseEdge,<br>-                   bool InverseGraph) const {<br>+  getAddedChildren(const NodePtr BB, bool InverseEdge) const {<br>     auto &InsertChildren =<br>         (InverseEdge != InverseGraph) ? PredInsert : SuccInsert;<br>     auto It = InsertChildren.find(BB);<br>@@ -159,7 +157,7 @@ public:<br> };<br><br> template <bool InverseGraph = false> struct CFGViewSuccessors {<br>-  using DataRef = const GraphDiff<BasicBlock *> *;<br>+  using DataRef = const GraphDiff<BasicBlock *, InverseGraph> *;<br>   using NodeRef = std::pair<DataRef, BasicBlock *>;<br><br>   using ExistingChildIterator =<br>@@ -168,7 +166,7 @@ template <bool InverseGraph = false> str<br>     BasicBlock *BB;<br>     DeletedEdgesFilter(BasicBlock *BB) : BB(BB){};<br>     bool operator()(NodeRef N) const {<br>-      return !N.first->ignoreChild(BB, N.second, false, InverseGraph);<br>+      return !N.first->ignoreChild(BB, N.second, false);<br>     }<br>   };<br>   using FilterExistingChildrenIterator =<br>@@ -182,7 +180,7 @@ template <bool InverseGraph = false> str<br>                       AddNewChildrenIterator>;<br><br>   static ChildIteratorType child_begin(NodeRef N) {<br>-    auto InsertVec = N.first->getAddedChildren(N.second, false, InverseGraph);<br>+    auto InsertVec = N.first->getAddedChildren(N.second, false);<br>     // filter iterator init:<br>     auto firstit = make_filter_range(<br>         make_range<ExistingChildIterator>({succ_begin(N.second), N.first},<br>@@ -197,7 +195,7 @@ template <bool InverseGraph = false> str<br>   }<br><br>   static ChildIteratorType child_end(NodeRef N) {<br>-    auto InsertVec = N.first->getAddedChildren(N.second, false, InverseGraph);<br>+    auto InsertVec = N.first->getAddedChildren(N.second, false);<br>     // filter iterator init:<br>     auto firstit = make_filter_range(<br>         make_range<ExistingChildIterator>({succ_end(N.second), N.first},<br>@@ -213,7 +211,7 @@ template <bool InverseGraph = false> str<br> };<br><br> template <bool InverseGraph = false> struct CFGViewPredecessors {<br>-  using DataRef = const GraphDiff<BasicBlock *> *;<br>+  using DataRef = const GraphDiff<BasicBlock *, InverseGraph> *;<br>   using NodeRef = std::pair<DataRef, BasicBlock *>;<br><br>   using ExistingChildIterator =<br>@@ -222,7 +220,7 @@ template <bool InverseGraph = false> str<br>     BasicBlock *BB;<br>     DeletedEdgesFilter(BasicBlock *BB) : BB(BB){};<br>     bool operator()(NodeRef N) const {<br>-      return !N.first->ignoreChild(BB, N.second, true, InverseGraph);<br>+      return !N.first->ignoreChild(BB, N.second, true);<br>     }<br>   };<br>   using FilterExistingChildrenIterator =<br>@@ -236,7 +234,7 @@ template <bool InverseGraph = false> str<br>                       AddNewChildrenIterator>;<br><br>   static ChildIteratorType child_begin(NodeRef N) {<br>-    auto InsertVec = N.first->getAddedChildren(N.second, true, InverseGraph);<br>+    auto InsertVec = N.first->getAddedChildren(N.second, true);<br>     // filter iterator init:<br>     auto firstit = make_filter_range(<br>         make_range<ExistingChildIterator>({pred_begin(N.second), N.first},<br>@@ -251,7 +249,7 @@ template <bool InverseGraph = false> str<br>   }<br><br>   static ChildIteratorType child_end(NodeRef N) {<br>-    auto InsertVec = N.first->getAddedChildren(N.second, true, InverseGraph);<br>+    auto InsertVec = N.first->getAddedChildren(N.second, true);<br>     // filter iterator init:<br>     auto firstit = make_filter_range(<br>         make_range<ExistingChildIterator>({pred_end(N.second), N.first},<br>@@ -267,19 +265,20 @@ template <bool InverseGraph = false> str<br> };<br><br> template <><br>-struct GraphTraits<std::pair<const GraphDiff<BasicBlock *> *, BasicBlock *>><br>+struct GraphTraits<<br>+    std::pair<const GraphDiff<BasicBlock *, false> *, BasicBlock *>><br>     : CFGViewSuccessors<false> {};<br> template <><br> struct GraphTraits<<br>-    std::pair<const GraphDiff<Inverse<BasicBlock *>> *, BasicBlock *>><br>+    std::pair<const GraphDiff<BasicBlock *, true> *, BasicBlock *>><br>     : CFGViewSuccessors<true> {};<br> template <><br> struct GraphTraits<<br>-    std::pair<const GraphDiff<BasicBlock *> *, Inverse<BasicBlock *>>><br>+    std::pair<const GraphDiff<BasicBlock *, false> *, Inverse<BasicBlock *>>><br>     : CFGViewPredecessors<false> {};<br> template <><br> struct GraphTraits<<br>-    std::pair<const GraphDiff<Inverse<BasicBlock *>> *, Inverse<BasicBlock *>>><br>+    std::pair<const GraphDiff<BasicBlock *, true> *, Inverse<BasicBlock *>>><br>     : CFGViewPredecessors<true> {};<br> } // end namespace llvm<br><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><br><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br></div></div></blockquote></div><br></div></div></blockquote></div>