From owner-freebsd-current@FreeBSD.ORG Tue Sep 28 07:49:05 2010 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3DF0106566B; Tue, 28 Sep 2010 07:49:05 +0000 (UTC) (envelope-from olivier@gid0.org) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 75F758FC1A; Tue, 28 Sep 2010 07:49:05 +0000 (UTC) Received: by iwn34 with SMTP id 34so7092987iwn.13 for ; Tue, 28 Sep 2010 00:49:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.146.141 with SMTP id h13mr10300040ibv.1.1285660144725; Tue, 28 Sep 2010 00:49:04 -0700 (PDT) Received: by 10.231.168.202 with HTTP; Tue, 28 Sep 2010 00:49:03 -0700 (PDT) In-Reply-To: References: <4C99A53E.7060707@FreeBSD.org> <4C9A32B8.60204@kkip.pl> <4C9A6A38.4080307@freebsd.org> <4C9A7203.8010701@kkip.pl> <20100923065134.GA31455@freebsd.org> <4C9B3207.2070302@kkip.pl> <4CA0743F.8050408@FreeBSD.org> Date: Tue, 28 Sep 2010 09:49:03 +0200 Message-ID: From: Olivier Smedts To: Dimitry Andric Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Rene Ladan , Roman Divacky , Bartosz Stec , current@freebsd.org Subject: Re: Clang now builds world and kernel, on i386 and amd64 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Sep 2010 07:49:05 -0000 2010/9/27 Olivier Smedts : > 2010/9/27 Olivier Smedts : >> 2010/9/27 Dimitry Andric : >>> On 2010-09-27 09:32, Olivier Smedts wrote: >>>> >>>> 2010/9/23 Bartosz Stec: >>> >>> ... >>>>> >>>>> Assertion failed: (false&& =A0"Ran out of registers during register >>>>> allocation!"), function assignRegOrStackSlotAtInterval, file >>>>> >>>>> /usr/src/lib/clang/libllvmcodegen/../../../contrib/llvm/lib/CodeGen/R= egAllocLinearScan.cpp, >>>>> line 1196. >>> >>> ... >>>> >>>> Same error here with yesterday's -CURRENT, but not at the same time >>>> (the running system was compiled using gcc) : >>> >>> As with Bartosz, could you please remove the CPU-specific flags from >>> make.conf, and try again? >> >> Ok, I'll post the results later (it was the same with -DNDEBUG). > > Was not OK with : > CPUTYPE=3Dathlon-xp > CFLAGS=3D-O2 -pipe -march=3Dnative -fomit-frame-pointer > NO_CPU_CFLAGS=3Dyes > COPTFLAGS=3D-O2 -pipe -march=3Dnative -fomit-frame-pointer > NO_CPU_COPTFLAGS=3Dyes > > Is OK with : > CPUTYPE=3Dathlon-xp > CFLAGS=3D-O2 -pipe -fomit-frame-pointer > NO_CPU_CFLAGS=3Dyes > COPTFLAGS=3D-O2 -pipe -fomit-frame-pointer > NO_CPU_COPTFLAGS=3Dyes > > I'll try with other -march (i686 and athlon) and post results. So, with "-march=3Dathlon", buildworld is ok. With "-march=3Dathlon -msse" or "-march=3Dathlon-xp" or "-march=3Dnative", buildworld fails here : clang -c -O2 -pipe -march=3Dathlon -msse -fomit-frame-pointer -DIN_GCC -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -DHAVE_GTHR_DEFAULT -I/usr/src/gnu/lib/libgcc/../../../contrib/gcclibs/include -I/usr/src/gnu/lib/libgcc/../../../contrib/gcc/config -I/usr/src/gnu/lib/libgcc/../../../contrib/gcc -I. -I/usr/src/gnu/lib/libgcc/../../usr.bin/cc/cc_tools -std=3Dgnu99 -fvisibility=3Dhidden -DHIDE_EXPORTS -fPIC -fexceptions -D__GLIBC__=3D3 -DElfW=3D__ElfN -o unwind-dw2.o /usr/src/gnu/lib/libgcc/../../../contrib/gcc/unwind-dw2.c Assertion failed: (!spillIs.empty() && "No spill intervals?"), function assignRegOrStackSlotAtInterval, file /usr/src/lib/clang/libllvmcodegen/../../../contrib/llvm/lib/CodeGen/RegAllo= cLinearScan.cpp, line 1287. Stack dump: 0. Program arguments: /usr/obj/usr/src/tmp/usr/bin/clang -cc1 -triple i386-undermydesk-freebsd9.0 -S -disable-free -main-file-name unwind-dw2.c -pic-level 2 -mconstructor-aliases -target-cpu athlon -target-feature +sse -resource-dir /usr/obj/usr/src/tmp/usr/lib/clang/2.8 -D IN_GCC -D IN_LIBGCC2 -D __GCC_FLOAT_NOT_NEEDED -D HAVE_GTHR_DEFAULT -D HIDE_EXPORTS -D __GLIBC__=3D3 -D ElfW=3D__ElfN -I /usr/src/gnu/lib/libgcc/../../../contrib/gcclibs/include -I /usr/src/gnu/lib/libgcc/../../../contrib/gcc/config -I /usr/src/gnu/lib/libgcc/../../../contrib/gcc -I . -I /usr/src/gnu/lib/libgcc/../../usr.bin/cc/cc_tools -O2 -std=3Dgnu99 -ferror-limit 19 -fmessage-length 118 -fvisibility hidden -fexceptions -fgnu-runtime -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/cc-CfyzYr.s -x c /usr/src/gnu/lib/libgcc/../../../contrib/gcc/unwind-dw2.c 1. parser at end of file 2. Code generation 3. Running pass 'Linear Scan Register Allocator' on function '@_Unwind_GetGR' clang: error: clang frontend command failed due to signal 6 (use -v to see invocation) *** Error code 250 Stop in /usr/src/gnu/lib/libgcc. But if I # cd /usr/src/gnu/lib/libgcc # make then unwind-dw2.c compiles fine. So the problem seems to be with clang (/usr/obj/usr/src/tmp/usr/bin/clang) when compiled with SSE on Athlon. Can't try with AMD k8 or Intel CPUs, my core2 follows -STABLE. > >>> I guess there is something borked in LLVM's Athlon optimization, so it >>> is probably better to not try to tickly those bugs for now. >>> >>> >>>> # grep -vE '^#|^$' /etc/make.conf >>>> KERNCONF=3DXPC >>>> CPUTYPE=3Dathlon-xp >>>> CFLAGS=3D-O2 -pipe -march=3Dnative -fomit-frame-pointer >>> >>> Using CPUTYPE=3D and -march=3D seems a bit redundant. :) >> >> Not with NO_CPU_CFLAGS=3Dyes and NO_CPU_COPTFLAGS=3Dyes (if you want to >> use -march=3Dnative, that's the best thing to do). >> >>> >>>> clang -c -O2 -pipe -march=3Dnative -fomit-frame-pointer -DIN_GCC >>>> -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED =A0-DHAVE_GTHR_DEFAULT >>>> -I/usr/src/gnu/lib/libgcc/../../../contrib/gcclibs/include >>>> -I/usr/src/gnu/lib/libgcc/../../../contrib/gcc/config >>>> -I/usr/src/gnu/lib/libgcc/../../../contrib/gcc -I. >>>> -I/usr/src/gnu/lib/libgcc/../../usr.bin/cc/cc_tools -std=3Dgnu99 >>>> -fvisibility=3Dhidden -DHIDE_EXPORTS -fPIC -fexceptions -D__GLIBC__=3D= 3 >>>> -DElfW=3D__ElfN -o unwind-dw2.o >>>> /usr/src/gnu/lib/libgcc/../../../contrib/gcc/unwind-dw2.c >>>> Assertion failed: (!spillIs.empty()&& =A0"No spill intervals?"), >>>> function assignRegOrStackSlotAtInterval, file >>>> >>>> /usr/src/lib/clang/libllvmcodegen/../../../contrib/llvm/lib/CodeGen/Re= gAllocLinearScan.cpp, >>>> line 1287. >>> >>> I haven't yet seen this one before. =A0If I can reproduce it, I will >>> report it upstream, and see if they can come up with a fix. > > Anything I can provide to help with that ? > >> >> Thanks ! >> >> -- >> Olivier Smedts > > -- > Olivier Smedts --=20 Olivier Smedts=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0 _ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 ASCII ribbon campaign ( ) e-mail: olivier@gid0.org=A0 =A0 =A0 =A0 - against HTML email & vCards=A0 X www: http://www.gid0.org=A0 =A0 - against proprietary attachments / \ =A0 "Il y a seulement 10 sortes de gens dans le monde : =A0 ceux qui comprennent le binaire, =A0 et ceux qui ne le comprennent pas."