From patchwork Sat Nov 1 11:51:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Schmidt X-Patchwork-Id: 405787 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 65C1C14010C for ; Sat, 1 Nov 2014 22:52:01 +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 :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=bSJqreNFzlyddLEBl8J6gnIrXX+7JyUJ0FLx6Kw1Hxefnh hg80t/qIxQtIn6TjGbhidBvBT/bWvtXwto+W4ijXbXbFvx7LbnPF4I+qIb0aG+LV Hm/fTZ7zxgp5P5RZHIbvR2q87T6ybJw4YsnI2qh2BRoktgrtLGyOGFgyYWf/U= 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 :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=9OzmFLrk2/LHpmzVElQtBjt69AI=; b=tJg4wvx0Fxcsc4NKeqSj 36BzyiR+ua4FGe4iJRMCeTxHPaVZTe/C2sP1Y9U4lwhlJD4YhEfaAKhmJ2coXIXd UjUgKSsPb+F3/gvAlqjbfZQx8UT3C6EPM4xCjG9epwgA8dz2tVl1v0XQbCKXJIDC vwAJtD1DjhitVc5khWskGUs= Received: (qmail 20500 invoked by alias); 1 Nov 2014 11:51:54 -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 20487 invoked by uid 89); 1 Nov 2014 11:51:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, FROM_12LTRDOM, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 01 Nov 2014 11:51:53 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1XkXDh-0004UE-Ma from Bernd_Schmidt@mentor.com for gcc-patches@gcc.gnu.org; Sat, 01 Nov 2014 04:51:49 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.181.6; Sat, 1 Nov 2014 11:51:48 +0000 Message-ID: <5454C944.4090107@codesourcery.com> Date: Sat, 1 Nov 2014 12:51:32 +0100 From: Bernd Schmidt User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.8.0 MIME-Version: 1.0 To: GCC Patches Subject: nvptx offloading patches [2/n] LTO has a mechanism not to stream out common nodes that are expected to be identical on each run. When using LTO to communicate between compilers for different targets, the va_list_type_node and related ones must be excluded from this. Richard B mentioned in a recent mail that the i386 backend uses direct comparisons to va_list_type_node. After investigating a bit it seems to me that this is not actually a problem: what's being compared is the return value of ix86_canonical_va_list_type, which always chooses one of va_list_type_node or its ABI variants, so the comparison should hold even with this patch. Bootstrapped and tested on x86_64-linux, ok? Bernd * tre-streamer.c (preload_common_nodes): Skip TI_VA_LIST_TYPE and related nodes. Index: gcc/tree-streamer.c =================================================================== --- gcc/tree-streamer.c.orig +++ gcc/tree-streamer.c @@ -309,10 +309,14 @@ preload_common_nodes (struct streamer_tr record_common_node (cache, sizetype_tab[i]); for (i = 0; i < TI_MAX; i++) - /* Skip boolean type and constants, they are frontend dependent. */ + /* Skip boolean type and constants, they are frontend dependent. + Skip va_list types, target dependent and may not survive offloading. */ if (i != TI_BOOLEAN_TYPE && i != TI_BOOLEAN_FALSE - && i != TI_BOOLEAN_TRUE) + && i != TI_BOOLEAN_TRUE + && i != TI_VA_LIST_TYPE + && i != TI_VA_LIST_GPR_COUNTER_FIELD + && i != TI_VA_LIST_FPR_COUNTER_FIELD) record_common_node (cache, global_trees[i]); }