From patchwork Tue May 21 11:24:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jambor X-Patchwork-Id: 245284 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 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id A6B322C009A for ; Tue, 21 May 2013 21:25:23 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; q=dns; s=default; b=vY91pAblTufUURrG0n2CyX1hOsltt6me1nXgu08oWF6zKey4mb KaFhabyBMqnS9wqtDrPVClWyvxEmWgbaq0ZGaTT7XluCAync/dMKKxVgMJe7QZuW xRwzLWDP4/4HYNS5mZ40gjL/4f2jhA63iuxh+Ua3p9GDSiJ77WzL7x6ww= 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:date :from:to:cc:subject:message-id:mime-version:content-type; s= default; bh=3ITrsT3Jh0LAW0sxTJgcWJaIgyE=; b=hMSvAPnOSdocHx9b5gsT J9PSNxGKjxgLFsH0W7vRlUqdgYWZYvoM94Rp3K/YDEZKWqvQpPX3ZdRqHzlskC/2 GpqOFfccvoHUwyzmZZ2sYY5GHblIAqnKcO0y2AOhi7CMlppS0IWCwOK06b9Im29O RNNKBtJwZJu9Me7t3ctD+GQ= Received: (qmail 30132 invoked by alias); 21 May 2013 11:25:15 -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 30121 invoked by uid 89); 21 May 2013 11:25:15 -0000 X-Spam-SWARE-Status: No, score=-3.4 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.1 Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 21 May 2013 11:24:34 +0000 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 9C88BA52C6; Tue, 21 May 2013 13:24:32 +0200 (CEST) Date: Tue, 21 May 2013 13:24:32 +0200 From: Martin Jambor To: GCC Patches Cc: Jan Hubicka Subject: [PATCH, PR 57289] Fix streaming order in ipa_read_node_info Message-ID: <20130521112432.GC23266@virgil.suse> Mail-Followup-To: GCC Patches , Jan Hubicka MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Hi, PR 57289 is an LTO streaming issue. We should process the bitpack before moving on to read other stuff in ipa_read_node_info because bp_unpack_value might read from the stream if there are many bits to read. Fixed by the following patch which makes 454.calculix build with -flto again and also passes bootstrap and testing on x86_64-linux. OK for trunk? Thanks, Martin 2013-05-20 Martin Jambor PR lto/57289 * ipa-prop.c (ipa_read_node_info): Process param_used and controlled_uses in the same order as when writing. Index: src/gcc/ipa-prop.c =================================================================== --- src.orig/gcc/ipa-prop.c +++ src/gcc/ipa-prop.c @@ -3849,9 +3849,9 @@ ipa_read_node_info (struct lto_input_blo info->uses_analysis_done = true; info->node_enqueued = false; for (k = 0; k < ipa_get_param_count (info); k++) - ipa_set_controlled_uses (info, k, streamer_read_hwi (ib)); - for (k = 0; k < ipa_get_param_count (info); k++) ipa_set_param_used (info, k, bp_unpack_value (&bp, 1)); + for (k = 0; k < ipa_get_param_count (info); k++) + ipa_set_controlled_uses (info, k, streamer_read_hwi (ib)); for (e = node->callees; e; e = e->next_callee) { struct ipa_edge_args *args = IPA_EDGE_REF (e);