From owner-freebsd-toolchain@FreeBSD.ORG Mon Nov 18 22:04:54 2013 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D3026FD; Mon, 18 Nov 2013 22:04:54 +0000 (UTC) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0E7CC2A69; Mon, 18 Nov 2013 22:04:54 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::1c07:ea96:f4:d9c] (unknown [IPv6:2001:7b8:3a7:0:1c07:ea96:f4:d9c]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id ACE2B5C43; Mon, 18 Nov 2013 23:04:48 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_54762E6D-157F-4FBA-98AF-AC72DCAADFDB"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) Subject: Re: clang++ 3.3 issue (excessively slow compile vs. gcc 4.6 in just one file of a port) From: Dimitry Andric In-Reply-To: <528A8481.9010200@FreeBSD.org> Date: Mon, 18 Nov 2013 23:04:14 +0100 Message-Id: <62194A12-1B41-48F6-8434-BA2181411020@FreeBSD.org> References: <528A8481.9010200@FreeBSD.org> To: Matthias Andree X-Mailer: Apple Mail (2.1822) Cc: freebsd-toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Nov 2013 22:04:54 -0000 --Apple-Mail=_54762E6D-157F-4FBA-98AF-AC72DCAADFDB Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 18 Nov 2013, at 22:20, Matthias Andree wrote: > [Please keep me in Cc:, I am not subscribed.] > > Greetings, > > I have recently spent some efforts getting rawtherapee to compile on > 10-stable. I think I succeeded, and came across something I find worth > investigating. > > For just one of rawtherapee's files, clang++ 3.3's compile time is > excessively long, compared both to the other files, as well as against > gcc 4.6. > > System: FreeBSD 10.0-BETA3 #1 r258178: Fri Nov 15 20:00:11 CET 2013 > toor@vmf10:/usr/obj/usr/src/sys/GENERIC > > Compiler: FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610 > Target: x86_64-unknown-freebsd10.0 > Thread model: posix > > The port as it currently stands hacks the cmake-generated build.make to > compile ipsharpen.cc with only -O1 option. If I remove that patch, so > that the port compiles with -O2 or -O3, compiling that single file takes > too long for me to wait for it, in excess of 10 minutes, on my 2.5 GHz > AMD Phenom II X4. GCC 4.6 does not exhibit such behaviour. > > I have not yet isolated what might cause this, how would I best go about > that so we can pin this issue and possibly fix clang++? In general, first try to reproduce it with top-of-tree clang. If it does not occur there, the problem was fixed in the mean time, so the next question is which revision(s) fixed it, and if it is easy to import the fix on top of 3.3 release. This is usually done through bisection. If it also occurs with top-of-tree clang, either post a preprocessed file (.ii) to llvm.org's bugzilla, with the used optimization flags, or attempt to minimize the testcase yourself. I will have a look at the port meanwhile, I hope it does not pull in too many dependencies? -Dimitry --Apple-Mail=_54762E6D-157F-4FBA-98AF-AC72DCAADFDB Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iEYEARECAAYFAlKKju8ACgkQsF6jCi4glqP1nACfegL0PnH8+fEIh8NrRA5KFDEN P54An3KU+lne1PYh2ITT0fP9H+XbQLV+ =vrBm -----END PGP SIGNATURE----- --Apple-Mail=_54762E6D-157F-4FBA-98AF-AC72DCAADFDB--