From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by sourceware.org (Postfix) with ESMTPS id 4FCA53858402 for ; Fri, 31 May 2024 18:00:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4FCA53858402 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.intel.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=linux.intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4FCA53858402 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=198.175.65.14 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717178408; cv=none; b=FqOuDrGRW+cmL/HTn3SgRuk0UIO02fQ9tBB9hHRYoToYSzgTe/iJId7IV8gPh49btxcAoLKE15eWg3GWKK3dtCns9R1cFfEHLMuGxqH2ztyrEIzuHxysuFmkEVTv57Y1dexA20O8Bdtlx9dQ0D3piFlob2KfxH0lPm1wWGiMaf8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717178408; c=relaxed/simple; bh=8Db8d7pFobLV+DMGeIsiapBtoaDPontt3Cei6PFDEg0=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=OzBO2uQtbxSxeMRpdtY9vc4QZK1v3KHV3cnwZOASiuCEBxhRZZJA2Ygbuun6FgkwnLFGGXgSNUNw4BtuETLMPSqa4AexwbtGkQm8ydZxUOmTIQr0F14s58ORpxYikauOufAkevycMAWoxg57TLYrLDTySH9mltuQi6YOrq2Hr2s= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717178407; x=1748714407; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=8Db8d7pFobLV+DMGeIsiapBtoaDPontt3Cei6PFDEg0=; b=BsynjydUYWpwP21MRJseU1KJRt+9w6VUneT1gwdBADB2YYBZeDbXr4q3 Nl0+tlqvokci2xuYcGeav5/0GPUOe1ATXx7lN933xxx7moXkf/nOpHXUM KvvyhYe8scWBrSVw/0SuVd/EdCbKyehM0WiEyee/za9qkNaN8Jf9QYN63 oivDU7PC6eZcHVxnRi/QNI4NrZLT9rJZaZQCjo/HDCSiDKOgZxsYxmqsf vv9NH5WHTDcu5XU6HSVw7IwnGjag53HMJu8xvFGHDQjguEhID8Mdz1jcE MmtEeUfNCnPCUFTjZrEuDbQDzSDkGEHx/UDAOrYUD7K4qQURKzUrDO3UD w==; X-CSE-ConnectionGUID: 6NHIZVmWT+mnwYwU72eLeQ== X-CSE-MsgGUID: bLnHHQArTwW4Ikn3C3AzPw== X-IronPort-AV: E=McAfee;i="6600,9927,11089"; a="17564208" X-IronPort-AV: E=Sophos;i="6.08,205,1712646000"; d="scan'208";a="17564208" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 11:00:06 -0700 X-CSE-ConnectionGUID: 9P9WNEyTRWemWx6pxWsxaw== X-CSE-MsgGUID: Py3zvQwZQ/exi7S1YObofA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,205,1712646000"; d="scan'208";a="67075477" Received: from tassilo.jf.intel.com (HELO tassilo) ([10.54.38.190]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 11:00:05 -0700 Date: Fri, 31 May 2024 11:00:03 -0700 From: Andi Kleen To: Michael Matz Cc: gcc-patches@gcc.gnu.org, Richard Biener Subject: Re: [PATCH v6 1/8] Improve must tail in RTL backend Message-ID: References: <20240521143203.2893096-1-ak@linux.intel.com> <20240521143203.2893096-2-ak@linux.intel.com> <357aa546-91d8-8d98-f941-ac2bdafab656@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <357aa546-91d8-8d98-f941-ac2bdafab656@suse.de> X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE,URIBL_BLACK autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > I think the ultimate knowledge if a call can or cannot be implemented as > tail-call lies within calls.cc/expand_call: It is inherently > target and ABI specific how arguments and returns are layed out, how the > stack frame is generated, if arguments are or aren't removed by callers > or callees and so on; all of that being knowledge that tree-tailcall > doesn't have and doesn't want to have. As such tree-tailcall should > not be regarded as ultimate truth, and failures of tree-tailcall to > recognize something as tail-callable shouldn't matter. It's not the ultimate truth, but some of the checks it does are not duplicated at expand time nor the backend. So it's one necessary pre condition with the current code base. Yes maybe the checks could be all moved, but that's a much larger project. -Andi