[llvm] 16188f9 - [Attributor][FIX] Do not create new calls edge we cannot handle

Galina Kistanova via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 21 10:44:22 PST 2020


Hello Johannes,

One of your resent commits broke our builder on tests:
http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win
. . .
Failing Tests (1):
    LLVM :: Transforms/Attributor/liveness.ll

Please have a look ASAP?

Thanks

Galina

On Wed, Feb 19, 2020 at 8:35 PM Johannes Doerfert via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

>
> Author: Johannes Doerfert
> Date: 2020-02-19T22:33:51-06:00
> New Revision: 16188f9d70d77ca9ff1d1d2ff2db64479341e9bf
>
> URL:
> https://github.com/llvm/llvm-project/commit/16188f9d70d77ca9ff1d1d2ff2db64479341e9bf
> DIFF:
> https://github.com/llvm/llvm-project/commit/16188f9d70d77ca9ff1d1d2ff2db64479341e9bf.diff
>
> LOG: [Attributor][FIX] Do not create new calls edge we cannot handle
>
> If we propagate function pointers across function boundaries we can
> create new call edges. These need to be represented in the CG if we run
> as a CGSCC pass. In the new pass manager that is currently not handled
> by the CallGraphUpdater so we need to prevent the situation for now.
>
> Added:
>
>
> Modified:
>     llvm/include/llvm/Transforms/IPO/Attributor.h
>     llvm/lib/Transforms/IPO/Attributor.cpp
>
> Removed:
>
>
>
>
> ################################################################################
> diff  --git a/llvm/include/llvm/Transforms/IPO/Attributor.h
> b/llvm/include/llvm/Transforms/IPO/Attributor.h
> index 54a980523d28..2fd5f59efa66 100644
> --- a/llvm/include/llvm/Transforms/IPO/Attributor.h
> +++ b/llvm/include/llvm/Transforms/IPO/Attributor.h
> @@ -775,6 +775,12 @@ struct Attributor {
>    /// Return the internal information cache.
>    InformationCache &getInfoCache() { return InfoCache; }
>
> +  /// Return true if this is a module pass, false otherwise.
> +  bool isModulePass() const {
> +    return !Functions.empty() &&
> +           Functions.size() == Functions.front()->getParent()->size();
> +  }
> +
>    /// Determine opportunities to derive 'default' attributes in \p F and
> create
>    /// abstract attribute objects for them.
>    ///
>
> diff  --git a/llvm/lib/Transforms/IPO/Attributor.cpp
> b/llvm/lib/Transforms/IPO/Attributor.cpp
> index f089ba7ce93e..7d6ea0fa2db4 100644
> --- a/llvm/lib/Transforms/IPO/Attributor.cpp
> +++ b/llvm/lib/Transforms/IPO/Attributor.cpp
> @@ -4577,6 +4577,17 @@ struct AAValueSimplifyArgument final :
> AAValueSimplifyImpl {
>      if (hasAttr({Attribute::InAlloca, Attribute::StructRet,
> Attribute::Nest},
>                  /* IgnoreSubsumingPositions */ true))
>        indicatePessimisticFixpoint();
> +
> +    // FIXME: This is a hack to prevent us from propagating function
> poiner in
> +    // the new pass manager CGSCC pass as it creates call edges the
> +    // CallGraphUpdater cannot handle yet.
> +    Value &V = getAssociatedValue();
> +    if (V.getType()->isPointerTy() &&
> +        V.getType()->getPointerElementType()->isFunctionTy() &&
> +        !A.isModulePass() &&
> +        A.getInfoCache().getAnalysisResultForFunction<LoopAnalysis>(
> +            *getAnchorScope()))
> +      indicatePessimisticFixpoint();
>    }
>
>    /// See AbstractAttribute::updateImpl(...).
> @@ -4700,6 +4711,7 @@ struct AAValueSimplifyFloating : AAValueSimplifyImpl
> {
>
>    /// See AbstractAttribute::initialize(...).
>    void initialize(Attributor &A) override {
> +    AAValueSimplifyImpl::initialize(A);
>      Value &V = getAnchorValue();
>
>      // TODO: add other stuffs
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200221/8ef41ed6/attachment.html>


More information about the llvm-commits mailing list