From patchwork Tue Dec 16 22:38:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dehao Chen X-Patchwork-Id: 422120 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 CD4FC1400B7 for ; Wed, 17 Dec 2014 09:39:04 +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:content-type; q= dns; s=default; b=Uve8O6xJQmnsyK79TGf+zr852Cvj3jZVA7w6utq45+tNFN fBzVe91gTP/QvwxE966yRI+1BVEd7+yDPrIEIlNIm7V/9GEPmwyfnOA8rszHQcz5 KPO451IYsHodvffnyM8XBeuo2Nywd8MRj9OCzat276lflV6ISMJdsQahmOHCc= 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:content-type; s= default; bh=y0PXi6SmpaSK4k67H7RWU9OxKLQ=; b=chMyFuppOuem9K6Dykcr AvJLMt8rKOZRL+WHW9UjvWWa6UIAdx6p4C1Eh/VUiG4ZnCSxogchkcvg0mbQOsMy bJ0xBKoGvtxt9VAc4/4JyT+v8Hl5HU28HIoEVczOuQFOFjZo1LzxrvYItLksLcFz m0mQnv5Dmoq4yDjT2wxSK+o= Received: (qmail 29929 invoked by alias); 16 Dec 2014 22:38:58 -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 29915 invoked by uid 89); 16 Dec 2014 22:38:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 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-vc0-f178.google.com Received: from mail-vc0-f178.google.com (HELO mail-vc0-f178.google.com) (209.85.220.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 16 Dec 2014 22:38:56 +0000 Received: by mail-vc0-f178.google.com with SMTP id hq11so6932659vcb.9 for ; Tue, 16 Dec 2014 14:38: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 :content-type; bh=HyJwL6uhlB7ViGKQq4f0ZZqQAnXoU76KcH1nb9jd1wQ=; b=mFFkjbJZcjNkPfPn8m9EXkWgIdxPCYrA4eb9+C02gcaZtV6cDPLGcw0ZwPBM6oka94 F3Iekf66MH6E6OdLon514Y83CNVd+Hj6TfoN3bg/JUi7ailGLLzm9K/tR8Oeul3/4CNf cE8UJ+UtpxqEl6vMR4wPkEX3f1AvA2qOzijRvsZMS/v8pA+un5hTg34WItWezy7H75IR WEGpKjUVs41qrtf2HyvhF3cx3Hi1svFb5C8vTPbzWZkLq5rumidogFQDVpUIB4OIRwLE C/39MV/zrjH0m1Hhx1TRDTEFnc/UY5X00/KLin8QGC5oDXYUiW//s9EMeJjDrj4S38kp oc1A== X-Gm-Message-State: ALoCoQnNTP4lJQgXxgjSHet1XPRqEymq/m9bY9rQwH0xYwj9Yu9I7CahsJ2Gw/aiPAnMzbjkG/YP MIME-Version: 1.0 X-Received: by 10.221.74.81 with SMTP id yv17mr24010102vcb.15.1418769534752; Tue, 16 Dec 2014 14:38:54 -0800 (PST) Received: by 10.52.35.106 with HTTP; Tue, 16 Dec 2014 14:38:54 -0800 (PST) Date: Tue, 16 Dec 2014 14:38:54 -0800 Message-ID: Subject: [GOOGLE] Do not promote indirect call for AutoFDO in the callee body definition is not available From: Dehao Chen To: GCC Patches , David Li X-IsSubscribed: yes This patch fixes the bug for undefined symbol in AutoFDO build. Testing on going. OK for google-4_9 branch? Thanks, Dehao Index: gcc/auto-profile.c =================================================================== --- gcc/auto-profile.c (revision 218784) +++ gcc/auto-profile.c (working copy) @@ -592,6 +592,8 @@ continue; if (!check_ic_target (stmt, node)) continue; + if (!node->definition) + continue; (*map)[callee] = iter->second->total_count (); ret += iter->second->total_count (); }