From patchwork Fri Mar 31 21:30:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Pop X-Patchwork-Id: 745815 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 3vvvpG47gvz9s7j for ; Sat, 1 Apr 2017 08:31:47 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="UxtNJOTG"; dkim-atps=neutral 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:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; q=dns; s=default; b=WMQwVwO8/ouXXXD OlQIYgL2ELB+L+zTfEIyESU2c28XBuwRpTniVmWrVRQX8UGpmloIayQGzrKGai42 tpwsLtQdFIbuQjiCdFjNpnGCKIn/Vdb+m7/EjFwKNXWUCZlE3VHaKp1HVcWyKlya WlWgQE8qv1fHkaPIkyadlw/FHOWs= 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:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; s=default; bh=V3zA3edKPiZ+FvPZ3PWQH P+VDa8=; b=UxtNJOTGah1C4gqz4BBXpvvjXXxdcOTYxPPn8A9O+yy2lUTF3BYk/ Gv4RMUDLg/FImB9KkCXf2rfWJ+rgfS6XlJb5NKYFV2c3sNGf1ZFaN0ms+3ByTLJu 3ugEyQmuQuRujEcCp0tD5hqfrUMQfiWXDXDkW/RQbaHxaRqKJRilRI= Received: (qmail 81151 invoked by alias); 31 Mar 2017 21:31:36 -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 81138 invoked by uid 89); 31 Mar 2017 21:31:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.3 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-it0-f51.google.com Received: from mail-it0-f51.google.com (HELO mail-it0-f51.google.com) (209.85.214.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 31 Mar 2017 21:31:34 +0000 Received: by mail-it0-f51.google.com with SMTP id 190so19036713itm.0 for ; Fri, 31 Mar 2017 14:31:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=kr6n5dJZNleH6dsSviMnnphDQ1VO42/ei38BTJCMfsI=; b=CE/FbwSm5L59FyMW3MRKiVldo7wtnG5Cx4iY6eVbfaIdDdHpBSJLDcMRbr5PPTDySe LAU6eHr3i0JARApPtj+LvTRSVQLBqXrzK5v/qMi+is772eT5GxaM5UFXTVf3Tf20R8cD q/2fprRgN4BRqUJiYF+ZaCXqgzgJCS6hjjLPCgxPfi1XNRSGhtvcu6WzrloG7bzcvrdB fXQ7wYo1oBWl0RNwY8kZKqUQFXhgYVSes9bAUwPoiXpxLfWy7iY9sjYJPY6ukMsOMdMR f0FWA0tP7E7XEZ/hsbSAWM3JHwsPNz8uZ7ch393i0vv1T7/x2FNm3CDJwKYOhZ930ntY RJIw== X-Gm-Message-State: AFeK/H1xSqqEkuH+fd6U3YFBK3UNMNTri2tXdEMIzR65oSlfxI6WSpr1a5LQl9bSO8Qb0kZwX9xjzEY7rYpByg== X-Received: by 10.36.252.65 with SMTP id b62mr6410543ith.38.1490995893768; Fri, 31 Mar 2017 14:31:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.31.76 with HTTP; Fri, 31 Mar 2017 14:30:53 -0700 (PDT) In-Reply-To: <8CB9ADFC-78AE-4058-A777-0EBB8D72DC3D@suse.de> References: <8CB9ADFC-78AE-4058-A777-0EBB8D72DC3D@suse.de> From: Sebastian Pop Date: Fri, 31 Mar 2017 16:30:53 -0500 Message-ID: Subject: Re: Fix ICE with -fauto-profile when walking vdefs To: Richard Biener Cc: GCC Patches X-IsSubscribed: yes On Fri, Mar 31, 2017 at 1:50 PM, Richard Biener wrote: > That looks like a workaround rather than the correct fix. Who sets .MEM? It should assign the proper def. > Moving the auto_profile pass above several other passes fixes the problem. The minimal change to fix the problem is by disabling these two passes: It seems to me that early_vrp is the one changing the IR in an inconsistent way. --- a/gcc/passes.def +++ b/gcc/passes.def @@ -86,14 +86,12 @@ along with GCC; see the file COPYING3. If not see NEXT_PASS (pass_ccp, false /* nonzero_p */); /* After CCP we rewrite no longer addressed locals into SSA form if possible. */ - NEXT_PASS (pass_forwprop); NEXT_PASS (pass_early_thread_jumps); NEXT_PASS (pass_sra_early); /* pass_build_ealias is a dummy pass that ensures that we execute TODO_rebuild_alias at this point. */ NEXT_PASS (pass_build_ealias); NEXT_PASS (pass_fre); - NEXT_PASS (pass_early_vrp); NEXT_PASS (pass_merge_phi); NEXT_PASS (pass_dse); NEXT_PASS (pass_cd_dce);