From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 28 15:03:45 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 95D01688 for ; Sat, 28 Feb 2015 15:03:45 +0000 (UTC) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 52A30EDE for ; Sat, 28 Feb 2015 15:03:44 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::516:f95a:89aa:c45e] (unknown [IPv6:2001:7b8:3a7:0:516:f95a:89aa:c45e]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 8EA3C5C47; Sat, 28 Feb 2015 16:03:34 +0100 (CET) Subject: Re: Connection Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_47B52067-457A-44F5-8068-9F7FD407B4A1"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.5b5 From: Dimitry Andric In-Reply-To: <20150228025936.GA1640@p4-bsd> Date: Sat, 28 Feb 2015 16:03:24 +0100 Message-Id: <8567CEA9-55BC-4B36-9C6A-10BE47F74D3F@FreeBSD.org> References: <20150228025936.GA1640@p4-bsd> To: R0B_ROD X-Mailer: Apple Mail (2.2070.6) Cc: freebsd-hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2015 15:03:45 -0000 --Apple-Mail=_47B52067-457A-44F5-8068-9F7FD407B4A1 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 28 Feb 2015, at 03:59, R0B_ROD wrote: > The optimization level -O3 > in "CFLAGS and COPTFLAGS -O3 -pipe -funroll-loops" > options in /etc/make.conf, have any relation to the > CPU having SSE3 and SSE4A features?? This depends on which architecture you are using (e.g. amd64 or i386), and on the specific CPU type you are compiling for. The CPU type, set by CPUTYPE in make.conf, determines the features the compiler can use, such as different levels of SSE. The 'optimization level' selected by -O1, -O2 and -O3 is only a shortcut notation for selecting more and more specific optimization passes, in the hope that the resulting executable will run faster. The tradeoff is slower compilation, and in some cases unexpected side effects. The -pipe option is traditionally added to avoid writing temporary files, but it is mostly ineffective when using clang, since it produces object files directly from source, via internal transformations, instead of the classic model of having a separate preprocessor, compiler and assembler. Lastly, the -funroll-loops option is usually unnecessary with clang, as it is already automatically enabled for -O2 and higher. When it is able to use SSE, it will automatically try to vectorize loops and other parts of the code [1]. > I have built over a dozen kernels for my laptop > with 10.1-STABLE. In case of the kernel, you will not gain anything from SSE, as it is explicitly disabled for building the kernel code. In kernel context, no floating point or SSE instructions are allowed. -Dimitry [1] http://llvm.org/docs/Vectorizers.html --Apple-Mail=_47B52067-457A-44F5-8068-9F7FD407B4A1 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.26 iEYEARECAAYFAlTx2MQACgkQsF6jCi4glqMBjACgl9st1wGecFvEZILCpfh3KZcz irUAoL/pWbIqF7buxSeod95uZi5GRkj9 =fbeO -----END PGP SIGNATURE----- --Apple-Mail=_47B52067-457A-44F5-8068-9F7FD407B4A1--