From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 30 19:43:06 2013 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9A08428B; Sat, 30 Mar 2013 19:43:06 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) by mx1.freebsd.org (Postfix) with ESMTP id 5651A8A9; Sat, 30 Mar 2013 19:43:06 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::e015:1126:f5aa:89a8] (unknown [IPv6:2001:7b8:3a7:0:e015:1126:f5aa:89a8]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 4E9165C44; Sat, 30 Mar 2013 20:42:59 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: Re: clang: -mno-omit-leaf-frame-pointer From: Dimitry Andric In-Reply-To: <51569DFF.5080708@FreeBSD.org> Date: Sat, 30 Mar 2013 20:42:52 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <0F14AC3C-6C38-4041-8775-F5E65C20EEB0@FreeBSD.org> References: <51569DFF.5080708@FreeBSD.org> To: Andriy Gapon X-Mailer: Apple Mail (2.1503) Cc: freebsd-hackers@FreeBSD.org, toolchain@FreeBSD.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Mar 2013 19:43:06 -0000 On Mar 30, 2013, at 09:10, Andriy Gapon wrote: > It seems that, unlike gcc, for clang -fno-omit-frame-pointer does not = imply > -mno-omit-leaf-frame-pointer. This is probably a bug. Yes, this is indeed the case. There is even a rather old unresolved PR for it in LLVM's Bugzilla: http://llvm.org/bugs/show_bug.cgi?id=3D9825 > Meanwhile I would like to propose the following amd64-specific patch. = Perhaps > the same type of change would be useful for powerpc as well. Most likely yes. > I would like this change primarily for DTrace (fbt), but other > debugging/profiling code may benefit from it as well. >=20 > I chose to make -mno-omit-leaf-frame-pointer not conditional on clang, = because > with gcc it is just a nop (i.e. it doesn't hurt anything). The patch looks good to me, please commit.