From patchwork Sat Dec 20 01:40:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Teresa Johnson X-Patchwork-Id: 423020 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 8A039140082 for ; Sat, 20 Dec 2014 12:41:08 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:date:message-id:subject:from:to:cc:content-type; q=dns; s=default; b=SQeiPa1CyTh+TS0kjyn/Yb+48MtviabHQ4JWt/XMWGD mM60fDh2R+y+66PtdyQ8MZ2nLoKHiZKZQEXhKFIRnK+P7rXaIYFoZ050stJa6Fcy TVXeFDin53iCM/3EUSJBrWtfOjs/hMxcAMAEmDSlCjQgg0nBZeJUMdKekoMQtz2o = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:date:message-id:subject:from:to:cc:content-type; s=default; bh=SmGzjx5DUoav66fYjg81iuKQlBo=; b=H3W2KFxWqiH7z8I6l 41OfwgOkFiXeWMuFqSwBDoa4eKTuKZfbxn4S/+i/5HGXeAhOJ1RfdueDdfQngRBi UrRUt5wJXi7tkVZNF3+irKWzei9sGm08FooIk/Lpqg5A9zGWr5KV9/eZXb1RUnDD 14g3uXq51E0yLiAfQ6WfVRQgM8= Received: (qmail 29429 invoked by alias); 20 Dec 2014 01:41:00 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 29404 invoked by uid 89); 20 Dec 2014 01:40:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail-ob0-f176.google.com Received: from mail-ob0-f176.google.com (HELO mail-ob0-f176.google.com) (209.85.214.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sat, 20 Dec 2014 01:40:56 +0000 Received: by mail-ob0-f176.google.com with SMTP id vb8so15033324obc.7 for ; Fri, 19 Dec 2014 17:40:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to:cc :content-type; bh=WjiYmsVu5oNGHsLZwaJycu4FmT9KvQ+44FqTJxJKEHE=; b=CxEiEy3zmyJ7Wx2vWArMmeofKYHZ/Fp2IwhYquwik85qHVulGxDJKTp/AlzR0st3No /RsKcbnmtzsbAXBRSLWMv04w79h3izrcX7/gQS1SoxdwQbiXRkCP9Nv4am/gf6WxBlDk q65+OfYPBccIjxim5tWxEnDGLz2e5l0RCamd8bWeQPwBw9TZzfrHyY0MvjRoh6aYGdFt dq16QDYm6sYHWhO4QfDaDjp3UJeNNOxioA35sXQSL+KkfPZd3p0emc5Xf0LJ5wrPZNAQ 8EyuhCEyb2yv6yaRdJashWwynsfiNWoGI602wRgpm9M4jbi1FQBv+yVUql/QR10DiMPT WdGg== X-Gm-Message-State: ALoCoQm7W6wPfae72AM1MCaBwhKil/lZybvA29R/+I8CSBUsxPDBHfMHlDSPXirVNILIJwyXFMT7 MIME-Version: 1.0 X-Received: by 10.202.104.134 with SMTP id o6mr6098915oik.129.1419039654309; Fri, 19 Dec 2014 17:40:54 -0800 (PST) Received: by 10.76.0.44 with HTTP; Fri, 19 Dec 2014 17:40:53 -0800 (PST) Date: Fri, 19 Dec 2014 17:40:53 -0800 Message-ID: Subject: [GOOGLE] Make LIPO aux function removal consistent From: Teresa Johnson To: Xinliang David Li Cc: "gcc-patches@gcc.gnu.org" X-IsSubscribed: yes Passes regression tests, ok for google 4_9? Thanks, Teresa 2014-12-19 Teresa Johnson Google ref b/18800499 * cgraph.c (cgraph_can_remove_if_no_direct_calls_and_refs_p): Make consistent with mark_functions_for_output for LIPO aux functions. Index: cgraph.c =================================================================== --- cgraph.c (revision 216977) +++ cgraph.c (working copy) @@ -2464,6 +2464,8 @@ cgraph_can_remove_if_no_direct_calls_and_refs_p (s /* Extern inlines can always go, we will use the external definition. */ if (DECL_EXTERNAL (node->decl)) return true; + if (cgraph_is_aux_decl_external (node)) + return true; /* When function is needed, we can not remove it. */ if (node->force_output || node->used_from_other_partition) return false;