From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22762 invoked by alias); 15 Oct 2014 17:37:45 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 22752 invoked by uid 89); 15 Oct 2014 17:37:44 -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; Wed, 15 Oct 2014 17:37:43 +0000 Received: by mail-vc0-f178.google.com with SMTP id hq12so1356847vcb.23 for ; Wed, 15 Oct 2014 10:37:41 -0700 (PDT) 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=C/X4MUXU4QWrEY2P8EH+Gsih++uF7V3NUG+6lG7EdXI=; b=ljImo6CrpuS1CdZcf8AHyDSHIw2Uy67rlRbVISPUR77TLRq0UKUrOK3QPoGBpRudEg IfB1y4bcid53+W3UYq4XQT/I8lDw499f24a53V3T4SsKtc+RVF175OZweuuTNMU+CM/3 Z803+utwbQUnswnpIpShfucoGvC0OCYiwXTtysbaBfj29ZKSzMpZbRnWbKdt5jwbVc8E Q3NERNSI2AG15z8tU/WtdbPr3Pe5gjwOjmdZab8CRbMWnlgq+Y6rv1/XRq2bke505Ffe I6FYlgGQeOkk8VOtaJ0vljeEBHyOjEjWVuogJrPiMtZ1zA5Pok3QY9GXZ9jQPgYl+dzd 1C/g== X-Gm-Message-State: ALoCoQnCLBYQhlY1cO+ZH+Ps4gfXjeguV3WGeNrk2u+EYD+r/GP6VtDmPAZf9t2xlSIQuKpE6VoR MIME-Version: 1.0 X-Received: by 10.221.22.196 with SMTP id qx4mr13998046vcb.37.1413394661499; Wed, 15 Oct 2014 10:37:41 -0700 (PDT) Received: by 10.52.136.4 with HTTP; Wed, 15 Oct 2014 10:37:41 -0700 (PDT) Date: Wed, 15 Oct 2014 17:42:00 -0000 Message-ID: Subject: [GOOGLE] recalculate dominance before update_ssa in AutoFDO pass From: Dehao Chen To: GCC Patches Cc: David Li Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg01409.txt.bz2 This patch recalculates dominance info before update_ssa call in AutoFDO. This fixes bug when dominance info is out-of-date and causes segfaults during update_ssa. Bootstrapped and regression test on-going. OK for google-4_9 branch? Thanks, Dehao Index: gcc/auto-profile.c =================================================================== --- gcc/auto-profile.c (revision 216278) +++ gcc/auto-profile.c (working copy) @@ -1756,6 +1756,11 @@ auto_profile (void) early_inline (); autofdo::afdo_annotate_cfg (promoted_stmts); compute_function_frequency (); + + free_dominance_info (CDI_DOMINATORS); + free_dominance_info (CDI_POST_DOMINATORS); + calculate_dominance_info (CDI_POST_DOMINATORS); + calculate_dominance_info (CDI_DOMINATORS); update_ssa (TODO_update_ssa); /* Local pure-const may imply need to fixup the cfg. */