<div dir="ltr">Hello Johannes,<br><br>One of your resent commits broke our builder on tests:<br><a href="http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win">http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win</a><br>. . .<br>Failing Tests (1):<br>    LLVM :: Transforms/Attributor/liveness.ll<br><br>Please have a look ASAP?<br><br>Thanks<br><br>Galina</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 19, 2020 at 8:35 PM Johannes Doerfert via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Author: Johannes Doerfert<br>
Date: 2020-02-19T22:33:51-06:00<br>
New Revision: 16188f9d70d77ca9ff1d1d2ff2db64479341e9bf<br>
<br>
URL: <a href="https://github.com/llvm/llvm-project/commit/16188f9d70d77ca9ff1d1d2ff2db64479341e9bf" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/16188f9d70d77ca9ff1d1d2ff2db64479341e9bf</a><br>
DIFF: <a href="https://github.com/llvm/llvm-project/commit/16188f9d70d77ca9ff1d1d2ff2db64479341e9bf.diff" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/16188f9d70d77ca9ff1d1d2ff2db64479341e9bf.diff</a><br>
<br>
LOG: [Attributor][FIX] Do not create new calls edge we cannot handle<br>
<br>
If we propagate function pointers across function boundaries we can<br>
create new call edges. These need to be represented in the CG if we run<br>
as a CGSCC pass. In the new pass manager that is currently not handled<br>
by the CallGraphUpdater so we need to prevent the situation for now.<br>
<br>
Added: <br>
<br>
<br>
Modified: <br>
    llvm/include/llvm/Transforms/IPO/Attributor.h<br>
    llvm/lib/Transforms/IPO/Attributor.cpp<br>
<br>
Removed: <br>
<br>
<br>
<br>
################################################################################<br>
diff  --git a/llvm/include/llvm/Transforms/IPO/Attributor.h b/llvm/include/llvm/Transforms/IPO/Attributor.h<br>
index 54a980523d28..2fd5f59efa66 100644<br>
--- a/llvm/include/llvm/Transforms/IPO/Attributor.h<br>
+++ b/llvm/include/llvm/Transforms/IPO/Attributor.h<br>
@@ -775,6 +775,12 @@ struct Attributor {<br>
   /// Return the internal information cache.<br>
   InformationCache &getInfoCache() { return InfoCache; }<br>
<br>
+  /// Return true if this is a module pass, false otherwise.<br>
+  bool isModulePass() const {<br>
+    return !Functions.empty() &&<br>
+           Functions.size() == Functions.front()->getParent()->size();<br>
+  }<br>
+<br>
   /// Determine opportunities to derive 'default' attributes in \p F and create<br>
   /// abstract attribute objects for them.<br>
   ///<br>
<br>
diff  --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp<br>
index f089ba7ce93e..7d6ea0fa2db4 100644<br>
--- a/llvm/lib/Transforms/IPO/Attributor.cpp<br>
+++ b/llvm/lib/Transforms/IPO/Attributor.cpp<br>
@@ -4577,6 +4577,17 @@ struct AAValueSimplifyArgument final : AAValueSimplifyImpl {<br>
     if (hasAttr({Attribute::InAlloca, Attribute::StructRet, Attribute::Nest},<br>
                 /* IgnoreSubsumingPositions */ true))<br>
       indicatePessimisticFixpoint();<br>
+<br>
+    // FIXME: This is a hack to prevent us from propagating function poiner in<br>
+    // the new pass manager CGSCC pass as it creates call edges the<br>
+    // CallGraphUpdater cannot handle yet.<br>
+    Value &V = getAssociatedValue();<br>
+    if (V.getType()->isPointerTy() &&<br>
+        V.getType()->getPointerElementType()->isFunctionTy() &&<br>
+        !A.isModulePass() &&<br>
+        A.getInfoCache().getAnalysisResultForFunction<LoopAnalysis>(<br>
+            *getAnchorScope()))<br>
+      indicatePessimisticFixpoint();<br>
   }<br>
<br>
   /// See AbstractAttribute::updateImpl(...).<br>
@@ -4700,6 +4711,7 @@ struct AAValueSimplifyFloating : AAValueSimplifyImpl {<br>
<br>
   /// See AbstractAttribute::initialize(...).<br>
   void initialize(Attributor &A) override {<br>
+    AAValueSimplifyImpl::initialize(A);<br>
     Value &V = getAnchorValue();<br>
<br>
     // TODO: add other stuffs<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="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>