From patchwork Thu Feb 4 12:59:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 578913 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 109141402A1 for ; Thu, 4 Feb 2016 23:59:24 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=jbuxbH5A; 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:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; q=dns; s= default; b=u07ZZFWGyE2WrgVDvieDNWUeho5lpd0KKc/RUMcBxzsZlbRQwcoL7 c/19dFR0+tAdBYgDrfBD838ZzHuu5JAsityV0JUIg5tH1fbpFp7gMYIT75Ce0XbN 1ck2/lwZbdofRslu9gc1km7SxqrRX/zhAwGHWwti4TpHKPuvuvSS8Y= 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:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; s=default; bh=GQ7DtJsQYgjIpgxqNASvvZWDIpU=; b=jbuxbH5ALOcBThE6wJZQeoiEthxV a+i+Lu3f36TrFOYGPxYBriOrL2Q+ZYh6fmYyNHI24q16PaztIQUxQ8nQ6TbdnGzm xHaMVsF1AXHgoK/c2/3QJwk0EbAyFt2Y6jS59yN/Y738biM536Pxcpo3u3Z5BcZw x2v3VM2Hz5H83qI= Received: (qmail 39098 invoked by alias); 4 Feb 2016 12:59:11 -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 39072 invoked by uid 89); 4 Feb 2016 12:59:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=ebotcazouadacorecom, ebotcazou@adacore.com, Hx-languages-length:2199, 2867 X-HELO: mail-yk0-f179.google.com Received: from mail-yk0-f179.google.com (HELO mail-yk0-f179.google.com) (209.85.160.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 04 Feb 2016 12:59:08 +0000 Received: by mail-yk0-f179.google.com with SMTP id r207so40904724ykd.2 for ; Thu, 04 Feb 2016 04:59:08 -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:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=mJnWTG9BYGZ0G9qgBZnuIKthmWbjncM0e5ZsiXqLVQ0=; b=J/J8ZUHtUebk55mtqsNTWVuHnHwrFQCeBGY7nulMDZ3B8pEdDfSgaXDi3wC/K4Jhmx kpaTnmtnJ9ySAZjzWCGqOIz0MIbplQXhga5QABfBOguz8xuWgOQ5zEjM33gcG/rP/Yfj SaK4AmTJEiKeOCM7zTsDy0tGGoRcL80dwpYhweyf9dqzN8xn7r/s1Sejgx77568cy6VF Hw12Y7lFVQd8H+xpp1e31G7myemHnUMAA46C7QbIeqe6XTdTWxSe/XrFI+DYmPG/Iwkj G//0sf/1TjmBcMXQJMpEY7Y6qDDZ2+IPMlgLvXh9C0icCxZPOvltFKMwk+BAc/VaZ/bK JECg== X-Gm-Message-State: AG10YOTv9egG820ZBCLkQP9eOLRCAHm7T8xUqfGz+Rk+FA2EceNbDRx3TzqFiGBGapul8nYci6KOiVOfWgon6Q== MIME-Version: 1.0 X-Received: by 10.37.230.197 with SMTP id d188mr3809934ybh.74.1454590746612; Thu, 04 Feb 2016 04:59:06 -0800 (PST) Received: by 10.37.223.11 with HTTP; Thu, 4 Feb 2016 04:59:06 -0800 (PST) In-Reply-To: References: <1454538638.3232.125.camel@ubuntu-sellcey> <1E4CE37C-986B-4DEB-A936-BA9A6C117A0B@comcast.net> <2455176.3K2QFyxiOu@polaris> Date: Thu, 4 Feb 2016 13:59:06 +0100 Message-ID: Subject: Re: [Patch, MIPS] Fix PR target/68273, passing args in wrong regs From: Richard Biener To: Eric Botcazou Cc: Mike Stump , GCC Patches , sellcey@imgtec.com, "Moore, Catherine" , "Maciej W. Rozycki" , Matthew Fortune , Richard Sandiford X-IsSubscribed: yes On Thu, Feb 4, 2016 at 1:49 PM, Richard Biener wrote: > On Thu, Feb 4, 2016 at 12:09 PM, Eric Botcazou wrote: >>> So this doesn’t fix aarch64, c6x, epiphany, ia64, iq2000, rs6000, rx, sparc, >>> tilegx, tilepro or xtensa. >>> :-( That’s one of the problems by having each port copy and paste swaths of >>> :code from other ports to express the same thing instead of ports sharing >>> :just one copy of code. My port is also broken in the same way >>> :(currently). >> >> Yes, fixing a compiler bug by changing the ABI is a no-no, and the argument of >> the compatibility with LLVM has IMO little merit since it's a GCC extension. > > True, but the compiler bug is in the backends - it just now gets > exposed more easily > (read: w/o user intervention). > >>> I’m curious why the caller of the hook can’t grab the main variant, if it >>> wants. If it did this, then all the ports are fixed wrt this issue. >> >> Or just fix PRE wrt the alignment discrepancy, which looks a lot safer to me. >> It's not because this works on x86 that this is necessarily correct for all >> the other architectures, especially the strict-alignment architectures. > > Doesn't "fix" the same issue popping up in other passes. Btw, one think I noticed is passes creating tempoaries with qualified type which is not necessary. Not knowing enough about the PRE issue, does fix it? I played with sth similar for create_tmp_{reg,var} in the past but don't remember why I dropped the ball on it. At least changing create_tmp_reg would be obvious (though that misses an assert the passed in type is a gimple register type). For create_tmp_var it might not be that easy. Richard. > Richard. > >> -- >> Eric Botcazou Index: gcc/tree-ssanames.c =================================================================== --- gcc/tree-ssanames.c (revision 233136) +++ gcc/tree-ssanames.c (working copy) @@ -286,7 +286,7 @@ make_ssa_name_fn (struct function *fn, t if (TYPE_P (var)) { - TREE_TYPE (t) = var; + TREE_TYPE (t) = TYPE_MAIN_VARIANT (var); SET_SSA_NAME_VAR_OR_IDENTIFIER (t, NULL_TREE); } else