From baldrick at free.fr Mon Feb 22 03:11:14 2010 From: baldrick at free.fr (Duncan Sands) Date: Mon, 22 Feb 2010 10:11:14 +0100 Subject: [llvm-commits] [llvm] r96781 - /llvm/trunk/test/LLVMC/MultiplePluginPriorities.td In-Reply-To: <20100222055532.C5E7B2A6C124@llvm.org> References: <20100222055532.C5E7B2A6C124@llvm.org> Message-ID: <4B824A32.3090909@free.fr> Hi Daniel, > LLVMC/MultiplePluginPriorities.td: Generally XFAIL this test for now, it is > still failing during (one) llvm-gcc powerpc build, and is also failing on my > x86_64-apple-darwin10. IIRC, this test involves throwing and catching an exception internally. Was LLVM built with itself on these buildbots? This might reflect LLVM eh stuff not working properly (there have been some problems with eh recently). Ciao, Duncan. From edwintorok at gmail.com Mon Feb 22 03:14:25 2010 From: edwintorok at gmail.com (=?ISO-8859-1?Q?T=F6r=F6k_Edwin?=) Date: Mon, 22 Feb 2010 11:14:25 +0200 Subject: [llvm-commits] [llvm] r96598 - /llvm/trunk/docs/AdvancedGetElementPtr.html In-Reply-To: <201002181840.o1IIeUbB008124@zion.cs.uiuc.edu> References: <201002181840.o1IIeUbB008124@zion.cs.uiuc.edu> Message-ID: <4B824AF1.4070605@gmail.com> On 02/18/2010 08:40 PM, Dan Gohman wrote: > Author: djg > Date: Thu Feb 18 12:40:29 2010 > New Revision: 96598 > > URL: http://llvm.org/viewvc/llvm-project?rev=96598&view=rev > Log: > Clarify that ptrtoint+inttoptr are an alternative to GEP which are > not restricted by the GEP rules. > > Modified: > llvm/trunk/docs/AdvancedGetElementPtr.html > > Modified: llvm/trunk/docs/AdvancedGetElementPtr.html > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/AdvancedGetElementPtr.html?rev=96598&r1=96597&r2=96598&view=diff > > ============================================================================== > --- llvm/trunk/docs/AdvancedGetElementPtr.html (original) > +++ llvm/trunk/docs/AdvancedGetElementPtr.html Thu Feb 18 12:40:29 2010 > @@ -200,9 +200,9 @@ > to null? > >
> -

You can compute an address that way, but you can't use that pointer to > - actually access the object if you do, unless the object is managed > - outside of LLVM.

> +

You can compute an address that way, but if you use GEP to do the add, > + you can't use that pointer to actually access the object, unless the > + object is managed outside of LLVM.

> >

The underlying integer computation is sufficiently defined; null has a > defined value -- zero -- and you can add whatever value you want to it.

> @@ -211,6 +211,11 @@ > object with such a pointer. This includes GlobalVariables, Allocas, and > objects pointed to by noalias pointers.

> > +

If you really need this functionality, you can do the arithmetic with > + explicit integer instructions, and use inttoptr to convert the result to > + an address. Most of GEP's special aliasing rules do not apply to pointers > + computed from ptrtoint, arithmetic, and inttoptr sequences.

Won't optimizers convert that back to a GEP? Best regards, --Edwin From arnold.schwaighofer at gmail.com Mon Feb 22 10:18:10 2010 From: arnold.schwaighofer at gmail.com (Arnold Schwaighofer) Date: Mon, 22 Feb 2010 16:18:10 -0000 Subject: [llvm-commits] [llvm] r96783 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/2010-02-19-TailCallRetAddrBug.ll Message-ID: <20100222161810.46DC42A6C124@llvm.org> Author: arnolds Date: Mon Feb 22 10:18:09 2010 New Revision: 96783 URL: http://llvm.org/viewvc/llvm-project?rev=96783&view=rev Log: Mark the return address stack slot as mutable when moving the return address during a tail call. A parameter might overwrite this stack slot during the tail call. The sequence during a tail call is: 1.) load return address to temp reg 2.) move parameters (might involve storing to return address stack slot) 3.) store return address to new location from temp reg If the stack location is marked immutable CodeGen can colocate load (1) with the store (3). This fixes bug 6225. Added: llvm/trunk/test/CodeGen/X86/2010-02-19-TailCallRetAddrBug.ll Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=96783&r1=96782&r2=96783&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Mon Feb 22 10:18:09 2010 @@ -1744,7 +1744,7 @@ // Calculate the new stack slot for the return address. int SlotSize = Is64Bit ? 8 : 4; int NewReturnAddrFI = - MF.getFrameInfo()->CreateFixedObject(SlotSize, FPDiff-SlotSize, true,false); + MF.getFrameInfo()->CreateFixedObject(SlotSize, FPDiff-SlotSize, false, false); EVT VT = Is64Bit ? MVT::i64 : MVT::i32; SDValue NewRetAddrFrIdx = DAG.getFrameIndex(NewReturnAddrFI, VT); Chain = DAG.getStore(Chain, dl, RetAddrFrIdx, NewRetAddrFrIdx, @@ -2377,7 +2377,7 @@ // Set up a frame object for the return address. uint64_t SlotSize = TD->getPointerSize(); ReturnAddrIndex = MF.getFrameInfo()->CreateFixedObject(SlotSize, -SlotSize, - true, false); + false, false); FuncInfo->setRAIndex(ReturnAddrIndex); } Added: llvm/trunk/test/CodeGen/X86/2010-02-19-TailCallRetAddrBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2010-02-19-TailCallRetAddrBug.ll?rev=96783&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/2010-02-19-TailCallRetAddrBug.ll (added) +++ llvm/trunk/test/CodeGen/X86/2010-02-19-TailCallRetAddrBug.ll Mon Feb 22 10:18:09 2010 @@ -0,0 +1,55 @@ +; RUN: llc -mtriple=i386-apple-darwin -tailcallopt < %s | FileCheck %s +; Check that lowered argumens do not overwrite the return address before it is moved. +; Bug 6225 +; +; If a call is a fastcc tail call and tail call optimization is enabled, the +; caller frame is replaced by the callee frame. This can require that arguments are +; placed on the former return address stack slot. Special care needs to be taken +; taken that the return address is moved / or stored in a register before +; lowering of arguments potentially overwrites the value. +; +; Move return address (76(%esp)) to a temporary register (%ebp) +; CHECK: movl 76(%esp), %ebp +; Overwrite return addresss +; CHECK: movl %ecx, 76(%esp) +; Move return address from temporary register (%ebp) to new stack location (60(%esp)) +; CHECK: movl %ebp, 60(%esp) + +%tupl_p = type [9 x i32]* + +declare fastcc void @l297(i32 %r10, i32 %r9, i32 %r8, i32 %r7, i32 %r6, i32 %r5, i32 %r3, i32 %r2) noreturn nounwind +declare fastcc void @l298(i32 %r10, i32 %r9, i32 %r4) noreturn nounwind + +define fastcc void @l186(%tupl_p %r1) noreturn nounwind { +entry: + %ptr1 = getelementptr %tupl_p %r1, i32 0, i32 0 + %r2 = load i32* %ptr1 + %ptr3 = getelementptr %tupl_p %r1, i32 0, i32 1 + %r3 = load i32* %ptr3 + %ptr5 = getelementptr %tupl_p %r1, i32 0, i32 2 + %r4 = load i32* %ptr5 + %ptr7 = getelementptr %tupl_p %r1, i32 0, i32 3 + %r5 = load i32* %ptr7 + %ptr9 = getelementptr %tupl_p %r1, i32 0, i32 4 + %r6 = load i32* %ptr9 + %ptr11 = getelementptr %tupl_p %r1, i32 0, i32 5 + %r7 = load i32* %ptr11 + %ptr13 = getelementptr %tupl_p %r1, i32 0, i32 6 + %r8 = load i32* %ptr13 + %ptr15 = getelementptr %tupl_p %r1, i32 0, i32 7 + %r9 = load i32* %ptr15 + %ptr17 = getelementptr %tupl_p %r1, i32 0, i32 8 + %r10 = load i32* %ptr17 + %cond = icmp eq i32 %r10, 3 + br i1 %cond, label %true, label %false + +true: + tail call fastcc void @l297(i32 %r10, i32 %r9, i32 %r8, i32 %r7, i32 %r6, i32 %r5, i32 %r3, i32 %r2) noreturn nounwind + ret void + +false: + tail call fastcc void @l298(i32 %r10, i32 %r9, i32 %r4) noreturn nounwind + ret void +} + + From daniel at zuster.org Mon Feb 22 11:47:18 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Mon, 22 Feb 2010 17:47:18 -0000 Subject: [llvm-commits] [zorg] r96789 - /zorg/trunk/buildbot/osuosl/master/config/slaves.py Message-ID: <20100222174718.9C97C2A6C124@llvm.org> Author: ddunbar Date: Mon Feb 22 11:47:18 2010 New Revision: 96789 URL: http://llvm.org/viewvc/llvm-project?rev=96789&view=rev Log: Add slave information on adobe1. Modified: zorg/trunk/buildbot/osuosl/master/config/slaves.py Modified: zorg/trunk/buildbot/osuosl/master/config/slaves.py URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/osuosl/master/config/slaves.py?rev=96789&r1=96788&r2=96789&view=diff ============================================================================== --- zorg/trunk/buildbot/osuosl/master/config/slaves.py (original) +++ zorg/trunk/buildbot/osuosl/master/config/slaves.py Mon Feb 22 11:47:18 2010 @@ -9,13 +9,13 @@ def get_build_slaves(): return [ - create_slave("osu1", properties={'jobs' : 4}, max_builds=1), + create_slave("osu1", properties={'jobs' : 4}, max_builds=1), # FreeBSD zero.sajd.net 9.0-CURRENT i386 - create_slave("freebsd1", properties={'jobs' : 1}), + create_slave("freebsd1", properties={'jobs' : 1}), # A PowerPC Linux machine. 900MHz G3 processor with 256MB of RAM. - create_slave("nick1"), + create_slave("nick1"), # Core 2 Due running Ubuntu. create_slave("dunbar1", properties={'jobs' : 2}, max_builds=1), @@ -42,11 +42,12 @@ # Quad Core x86_64, Solaris / AurorAUX create_slave("evocallaghan", properties={'jobs' : 4}, max_builds=1), - # Adobe - create_slave("adobe1", properties={'jobs' : 1}, max_builds=1), + # Adobe Contributed VM + # Win XP SP2, Intel Core2 Duo 2.99GHz -E6850, 2.93 GB + create_slave("adobe1", properties={'jobs' : 2}, max_builds=1), # Defunct. - #create_slave("osu2", properties={'jobs' : 4}, max_builds=2), + #create_slave("osu2", properties={'jobs' : 4}, max_builds=2), #create_slave("andrew1"), #create_slave("danmbp1"), ] From daniel at zuster.org Mon Feb 22 11:47:48 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Mon, 22 Feb 2010 17:47:48 -0000 Subject: [llvm-commits] [zorg] r96790 - /zorg/trunk/buildbot/osuosl/master/config/slaves.py Message-ID: <20100222174748.235B22A6C124@llvm.org> Author: ddunbar Date: Mon Feb 22 11:47:47 2010 New Revision: 96790 URL: http://llvm.org/viewvc/llvm-project?rev=96790&view=rev Log: Fix comment. Modified: zorg/trunk/buildbot/osuosl/master/config/slaves.py Modified: zorg/trunk/buildbot/osuosl/master/config/slaves.py URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/osuosl/master/config/slaves.py?rev=96790&r1=96789&r2=96790&view=diff ============================================================================== --- zorg/trunk/buildbot/osuosl/master/config/slaves.py (original) +++ zorg/trunk/buildbot/osuosl/master/config/slaves.py Mon Feb 22 11:47:47 2010 @@ -17,7 +17,7 @@ # A PowerPC Linux machine. 900MHz G3 processor with 256MB of RAM. create_slave("nick1"), - # Core 2 Due running Ubuntu. + # Core 2 Duo running Ubuntu. create_slave("dunbar1", properties={'jobs' : 2}, max_builds=1), # Athlon 1.2 XP SP 3. From baldrick at free.fr Mon Feb 22 11:50:58 2010 From: baldrick at free.fr (Duncan Sands) Date: Mon, 22 Feb 2010 17:50:58 -0000 Subject: [llvm-commits] [dragonegg] r96791 - /dragonegg/trunk/llvm-backend.cpp Message-ID: <20100222175058.47C5E2A6C124@llvm.org> Author: baldrick Date: Mon Feb 22 11:50:58 2010 New Revision: 96791 URL: http://llvm.org/viewvc/llvm-project?rev=96791&view=rev Log: The GCC bug is fixed. Modified: dragonegg/trunk/llvm-backend.cpp Modified: dragonegg/trunk/llvm-backend.cpp URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-backend.cpp?rev=96791&r1=96790&r2=96791&view=diff ============================================================================== --- dragonegg/trunk/llvm-backend.cpp (original) +++ dragonegg/trunk/llvm-backend.cpp Mon Feb 22 11:50:58 2010 @@ -2423,16 +2423,17 @@ register_callback (plugin_name, PLUGIN_PASS_MANAGER_SETUP, NULL, &pass_info); // Disable pass_cleanup_eh, which runs after LLVM conversion. - // NOTE: This pass is scheduled twice, once before LLVM conversion and once - // after. If GCC optimizations are enabled, then we should only disable the - // second instance, but there doesn't seem to be any convenient and reliable - // way of doing this. FIXME: The following code actually only disables the - // first instance due to a GCC bug! - pass_info.pass = &pass_gimple_null.pass; - pass_info.reference_pass_name = "ehcleanup"; - pass_info.ref_pass_instance_number = 0; - pass_info.pos_op = PASS_POS_REPLACE; - register_callback (plugin_name, PLUGIN_PASS_MANAGER_SETUP, NULL, &pass_info); + // This pass is scheduled twice, once before LLVM conversion and once after. + // If GCC optimizations are enabled, then we should keep the first instance + // and only disable the second. There does not seem to be a good way to do + // this, so just allow both instances to run in this case. + if (!EnableGCCOptimizations) { + pass_info.pass = &pass_gimple_null.pass; + pass_info.reference_pass_name = "ehcleanup"; + pass_info.ref_pass_instance_number = 0; + pass_info.pos_op = PASS_POS_REPLACE; + register_callback (plugin_name, PLUGIN_PASS_MANAGER_SETUP, NULL, &pass_info); + } // Disable pass_lower_resx, which runs after LLVM conversion. pass_info.pass = &pass_gimple_null.pass; From bob.wilson at apple.com Mon Feb 22 12:37:55 2010 From: bob.wilson at apple.com (Bob Wilson) Date: Mon, 22 Feb 2010 18:37:55 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r96794 - in /llvm-gcc-4.2/trunk: libffi/Makefile.in libgomp/Makefile.in libjava/Makefile.in libmudflap/Makefile.in libssp/Makefile.in Message-ID: <20100222183755.44B372A6C124@llvm.org> Author: bwilson Date: Mon Feb 22 12:37:55 2010 New Revision: 96794 URL: http://llvm.org/viewvc/llvm-project?rev=96794&view=rev Log: Fix a race condition in automake-generated makefiles. This was causing occassional buildbot failures. The temporary dependency files for the .o and .lo rules were colliding, so I changed the .lo rules to use a different ".Tplo" suffix instead of ".Tpo". I applied the following patch to automake-1.9.6 and then regenerated these makefiles. diff -ur automake-1.9.6-orig/lib/am/depend2.am automake-1.9.6/lib/am/depend2.am --- automake-1.9.6-orig/lib/am/depend2.am 2005-05-14 13:21:06.000000000 -0700 +++ automake-1.9.6/lib/am/depend2.am 2010-02-19 14:00:20.000000000 -0800 @@ -115,10 +115,10 @@ if %FASTDEP% ## In fast-dep mode, we can always use -o. ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%. -?!GENERIC? if %LTCOMPILE% -MT %LTOBJ% -MD -MP -MF "%DEPBASE%.Tpo" %-c% -o %LTOBJ% `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%; \ +?!GENERIC? if %LTCOMPILE% -MT %LTOBJ% -MD -MP -MF "%DEPBASE%.Tplo" %-c% -o %LTOBJ% `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%; \ ?SUBDIROBJ??GENERIC? depbase=`echo %OBJ% | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`; \ -?GENERIC? if %LTCOMPILE% -MT %LTOBJ% -MD -MP -MF "%DEPBASE%.Tpo" %-c% -o %LTOBJ% %SOURCE%; \ - then mv -f "%DEPBASE%.Tpo" "%DEPBASE%.Plo"; else rm -f "%DEPBASE%.Tpo"; exit 1; fi +?GENERIC? if %LTCOMPILE% -MT %LTOBJ% -MD -MP -MF "%DEPBASE%.Tplo" %-c% -o %LTOBJ% %SOURCE%; \ + then mv -f "%DEPBASE%.Tplo" "%DEPBASE%.Plo"; else rm -f "%DEPBASE%.Tplo"; exit 1; fi else !%FASTDEP% if %AMDEP% source='%SOURCE%' object='%LTOBJ%' libtool=yes @AMDEPBACKSLASH@ Modified: llvm-gcc-4.2/trunk/libffi/Makefile.in llvm-gcc-4.2/trunk/libgomp/Makefile.in llvm-gcc-4.2/trunk/libjava/Makefile.in llvm-gcc-4.2/trunk/libmudflap/Makefile.in llvm-gcc-4.2/trunk/libssp/Makefile.in Modified: llvm-gcc-4.2/trunk/libffi/Makefile.in URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libffi/Makefile.in?rev=96794&r1=96793&r2=96794&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/libffi/Makefile.in (original) +++ llvm-gcc-4.2/trunk/libffi/Makefile.in Mon Feb 22 12:37:55 2010 @@ -872,8 +872,8 @@ .c.lo: @am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`; \ - at am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \ - at am__fastdepCC_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Plo"; else rm -f "$$depbase.Tpo"; exit 1; fi + at am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tplo" -c -o $@ $<; \ + at am__fastdepCC_TRUE@ then mv -f "$$depbase.Tplo" "$$depbase.Plo"; else rm -f "$$depbase.Tplo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< Modified: llvm-gcc-4.2/trunk/libgomp/Makefile.in URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libgomp/Makefile.in?rev=96794&r1=96793&r2=96794&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/libgomp/Makefile.in (original) +++ llvm-gcc-4.2/trunk/libgomp/Makefile.in Mon Feb 22 12:37:55 2010 @@ -442,8 +442,8 @@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: - at am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ - at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi + at am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tplo" -c -o $@ $<; \ + at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tplo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tplo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< Modified: llvm-gcc-4.2/trunk/libjava/Makefile.in URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/Makefile.in?rev=96794&r1=96793&r2=96794&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/libjava/Makefile.in (original) +++ llvm-gcc-4.2/trunk/libjava/Makefile.in Mon Feb 22 12:37:55 2010 @@ -8403,8 +8403,8 @@ .c.lo: @am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`; \ - at am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \ - at am__fastdepCC_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Plo"; else rm -f "$$depbase.Tpo"; exit 1; fi + at am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tplo" -c -o $@ $<; \ + at am__fastdepCC_TRUE@ then mv -f "$$depbase.Tplo" "$$depbase.Plo"; else rm -f "$$depbase.Tplo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< @@ -8427,148 +8427,148 @@ .cc.lo: @am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`; \ - at am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \ - at am__fastdepCXX_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Plo"; else rm -f "$$depbase.Tpo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tplo" -c -o $@ $<; \ + at am__fastdepCXX_TRUE@ then mv -f "$$depbase.Tplo" "$$depbase.Plo"; else rm -f "$$depbase.Tplo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< gnu/gcj/xlib/lib_gnu_awt_xlib_la-natClip.lo: gnu/gcj/xlib/natClip.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natClip.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natClip.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natClip.lo `test -f 'gnu/gcj/xlib/natClip.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natClip.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natClip.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natClip.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natClip.Tpo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natClip.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natClip.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natClip.lo `test -f 'gnu/gcj/xlib/natClip.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natClip.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natClip.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natClip.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natClip.Tplo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natClip.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natClip.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natClip.lo `test -f 'gnu/gcj/xlib/natClip.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natClip.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natColormap.lo: gnu/gcj/xlib/natColormap.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natColormap.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natColormap.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natColormap.lo `test -f 'gnu/gcj/xlib/natColormap.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natColormap.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natColormap.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natColormap.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natColormap.Tpo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natColormap.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natColormap.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natColormap.lo `test -f 'gnu/gcj/xlib/natColormap.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natColormap.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natColormap.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natColormap.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natColormap.Tplo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natColormap.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natColormap.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natColormap.lo `test -f 'gnu/gcj/xlib/natColormap.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natColormap.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natDisplay.lo: gnu/gcj/xlib/natDisplay.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natDisplay.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDisplay.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natDisplay.lo `test -f 'gnu/gcj/xlib/natDisplay.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natDisplay.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDisplay.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDisplay.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDisplay.Tpo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natDisplay.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDisplay.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natDisplay.lo `test -f 'gnu/gcj/xlib/natDisplay.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natDisplay.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDisplay.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDisplay.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDisplay.Tplo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natDisplay.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natDisplay.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natDisplay.lo `test -f 'gnu/gcj/xlib/natDisplay.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natDisplay.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natDrawable.lo: gnu/gcj/xlib/natDrawable.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natDrawable.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDrawable.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natDrawable.lo `test -f 'gnu/gcj/xlib/natDrawable.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natDrawable.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDrawable.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDrawable.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDrawable.Tpo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natDrawable.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDrawable.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natDrawable.lo `test -f 'gnu/gcj/xlib/natDrawable.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natDrawable.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDrawable.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDrawable.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDrawable.Tplo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natDrawable.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natDrawable.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natDrawable.lo `test -f 'gnu/gcj/xlib/natDrawable.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natDrawable.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natFont.lo: gnu/gcj/xlib/natFont.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natFont.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natFont.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natFont.lo `test -f 'gnu/gcj/xlib/natFont.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natFont.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natFont.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natFont.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natFont.Tpo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natFont.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natFont.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natFont.lo `test -f 'gnu/gcj/xlib/natFont.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natFont.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natFont.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natFont.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natFont.Tplo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natFont.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natFont.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natFont.lo `test -f 'gnu/gcj/xlib/natFont.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natFont.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natGC.lo: gnu/gcj/xlib/natGC.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natGC.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natGC.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natGC.lo `test -f 'gnu/gcj/xlib/natGC.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natGC.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natGC.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natGC.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natGC.Tpo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natGC.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natGC.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natGC.lo `test -f 'gnu/gcj/xlib/natGC.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natGC.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natGC.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natGC.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natGC.Tplo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natGC.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natGC.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natGC.lo `test -f 'gnu/gcj/xlib/natGC.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natGC.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natPixmap.lo: gnu/gcj/xlib/natPixmap.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natPixmap.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natPixmap.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natPixmap.lo `test -f 'gnu/gcj/xlib/natPixmap.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natPixmap.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natPixmap.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natPixmap.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natPixmap.Tpo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natPixmap.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natPixmap.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natPixmap.lo `test -f 'gnu/gcj/xlib/natPixmap.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natPixmap.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natPixmap.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natPixmap.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natPixmap.Tplo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natPixmap.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natPixmap.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natPixmap.lo `test -f 'gnu/gcj/xlib/natPixmap.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natPixmap.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natScreen.lo: gnu/gcj/xlib/natScreen.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natScreen.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natScreen.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natScreen.lo `test -f 'gnu/gcj/xlib/natScreen.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natScreen.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natScreen.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natScreen.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natScreen.Tpo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natScreen.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natScreen.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natScreen.lo `test -f 'gnu/gcj/xlib/natScreen.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natScreen.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natScreen.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natScreen.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natScreen.Tplo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natScreen.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natScreen.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natScreen.lo `test -f 'gnu/gcj/xlib/natScreen.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natScreen.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natVisual.lo: gnu/gcj/xlib/natVisual.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natVisual.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natVisual.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natVisual.lo `test -f 'gnu/gcj/xlib/natVisual.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natVisual.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natVisual.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natVisual.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natVisual.Tpo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natVisual.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natVisual.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natVisual.lo `test -f 'gnu/gcj/xlib/natVisual.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natVisual.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natVisual.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natVisual.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natVisual.Tplo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natVisual.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natVisual.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natVisual.lo `test -f 'gnu/gcj/xlib/natVisual.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natVisual.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWMSizeHints.lo: gnu/gcj/xlib/natWMSizeHints.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWMSizeHints.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWMSizeHints.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWMSizeHints.lo `test -f 'gnu/gcj/xlib/natWMSizeHints.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natWMSizeHints.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWMSizeHints.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWMSizeHints.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWMSizeHints.Tpo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWMSizeHints.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWMSizeHints.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWMSizeHints.lo `test -f 'gnu/gcj/xlib/natWMSizeHints.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natWMSizeHints.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWMSizeHints.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWMSizeHints.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWMSizeHints.Tplo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natWMSizeHints.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWMSizeHints.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWMSizeHints.lo `test -f 'gnu/gcj/xlib/natWMSizeHints.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natWMSizeHints.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWindow.lo: gnu/gcj/xlib/natWindow.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWindow.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindow.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWindow.lo `test -f 'gnu/gcj/xlib/natWindow.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natWindow.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindow.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindow.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindow.Tpo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWindow.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindow.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWindow.lo `test -f 'gnu/gcj/xlib/natWindow.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natWindow.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindow.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindow.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindow.Tplo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natWindow.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWindow.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWindow.lo `test -f 'gnu/gcj/xlib/natWindow.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natWindow.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWindowAttributes.lo: gnu/gcj/xlib/natWindowAttributes.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWindowAttributes.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindowAttributes.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWindowAttributes.lo `test -f 'gnu/gcj/xlib/natWindowAttributes.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natWindowAttributes.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindowAttributes.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindowAttributes.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindowAttributes.Tpo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWindowAttributes.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindowAttributes.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWindowAttributes.lo `test -f 'gnu/gcj/xlib/natWindowAttributes.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natWindowAttributes.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindowAttributes.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindowAttributes.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindowAttributes.Tplo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natWindowAttributes.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWindowAttributes.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWindowAttributes.lo `test -f 'gnu/gcj/xlib/natWindowAttributes.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natWindowAttributes.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXAnyEvent.lo: gnu/gcj/xlib/natXAnyEvent.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXAnyEvent.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXAnyEvent.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXAnyEvent.lo `test -f 'gnu/gcj/xlib/natXAnyEvent.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXAnyEvent.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXAnyEvent.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXAnyEvent.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXAnyEvent.Tpo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXAnyEvent.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXAnyEvent.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXAnyEvent.lo `test -f 'gnu/gcj/xlib/natXAnyEvent.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXAnyEvent.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXAnyEvent.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXAnyEvent.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXAnyEvent.Tplo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natXAnyEvent.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXAnyEvent.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXAnyEvent.lo `test -f 'gnu/gcj/xlib/natXAnyEvent.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXAnyEvent.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXButtonEvent.lo: gnu/gcj/xlib/natXButtonEvent.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXButtonEvent.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXButtonEvent.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXButtonEvent.lo `test -f 'gnu/gcj/xlib/natXButtonEvent.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXButtonEvent.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXButtonEvent.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXButtonEvent.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXButtonEvent.Tpo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXButtonEvent.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXButtonEvent.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXButtonEvent.lo `test -f 'gnu/gcj/xlib/natXButtonEvent.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXButtonEvent.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXButtonEvent.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXButtonEvent.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXButtonEvent.Tplo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natXButtonEvent.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXButtonEvent.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXButtonEvent.lo `test -f 'gnu/gcj/xlib/natXButtonEvent.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXButtonEvent.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXColor.lo: gnu/gcj/xlib/natXColor.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXColor.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXColor.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXColor.lo `test -f 'gnu/gcj/xlib/natXColor.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXColor.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXColor.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXColor.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXColor.Tpo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXColor.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXColor.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXColor.lo `test -f 'gnu/gcj/xlib/natXColor.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXColor.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXColor.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXColor.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXColor.Tplo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natXColor.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXColor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXColor.lo `test -f 'gnu/gcj/xlib/natXColor.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXColor.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXConfigureEvent.lo: gnu/gcj/xlib/natXConfigureEvent.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXConfigureEvent.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXConfigureEvent.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXConfigureEvent.lo `test -f 'gnu/gcj/xlib/natXConfigureEvent.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXConfigureEvent.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXConfigureEvent.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXConfigureEvent.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXConfigureEvent.Tpo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXConfigureEvent.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXConfigureEvent.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXConfigureEvent.lo `test -f 'gnu/gcj/xlib/natXConfigureEvent.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXConfigureEvent.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXConfigureEvent.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXConfigureEvent.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXConfigureEvent.Tplo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natXConfigureEvent.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXConfigureEvent.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXConfigureEvent.lo `test -f 'gnu/gcj/xlib/natXConfigureEvent.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXConfigureEvent.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXException.lo: gnu/gcj/xlib/natXException.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXException.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXException.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXException.lo `test -f 'gnu/gcj/xlib/natXException.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXException.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXException.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXException.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXException.Tpo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXException.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXException.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXException.lo `test -f 'gnu/gcj/xlib/natXException.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXException.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXException.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXException.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXException.Tplo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natXException.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXException.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXException.lo `test -f 'gnu/gcj/xlib/natXException.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXException.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXExposeEvent.lo: gnu/gcj/xlib/natXExposeEvent.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXExposeEvent.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXExposeEvent.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXExposeEvent.lo `test -f 'gnu/gcj/xlib/natXExposeEvent.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXExposeEvent.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXExposeEvent.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXExposeEvent.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXExposeEvent.Tpo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXExposeEvent.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXExposeEvent.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXExposeEvent.lo `test -f 'gnu/gcj/xlib/natXExposeEvent.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXExposeEvent.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXExposeEvent.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXExposeEvent.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXExposeEvent.Tplo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natXExposeEvent.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXExposeEvent.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXExposeEvent.lo `test -f 'gnu/gcj/xlib/natXExposeEvent.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXExposeEvent.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXImage.lo: gnu/gcj/xlib/natXImage.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXImage.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXImage.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXImage.lo `test -f 'gnu/gcj/xlib/natXImage.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXImage.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXImage.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXImage.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXImage.Tpo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXImage.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXImage.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXImage.lo `test -f 'gnu/gcj/xlib/natXImage.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXImage.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXImage.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXImage.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXImage.Tplo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natXImage.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXImage.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXImage.lo `test -f 'gnu/gcj/xlib/natXImage.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXImage.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXUnmapEvent.lo: gnu/gcj/xlib/natXUnmapEvent.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXUnmapEvent.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXUnmapEvent.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXUnmapEvent.lo `test -f 'gnu/gcj/xlib/natXUnmapEvent.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXUnmapEvent.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXUnmapEvent.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXUnmapEvent.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXUnmapEvent.Tpo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXUnmapEvent.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXUnmapEvent.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXUnmapEvent.lo `test -f 'gnu/gcj/xlib/natXUnmapEvent.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXUnmapEvent.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXUnmapEvent.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXUnmapEvent.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXUnmapEvent.Tplo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natXUnmapEvent.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXUnmapEvent.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXUnmapEvent.lo `test -f 'gnu/gcj/xlib/natXUnmapEvent.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXUnmapEvent.cc @@ -8591,15 +8591,15 @@ .jar.lo: @am__fastdepGCJ_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`; \ - at am__fastdepGCJ_TRUE@ if $(LTGCJCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \ - at am__fastdepGCJ_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Plo"; else rm -f "$$depbase.Tpo"; exit 1; fi + at am__fastdepGCJ_TRUE@ if $(LTGCJCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tplo" -c -o $@ $<; \ + at am__fastdepGCJ_TRUE@ then mv -f "$$depbase.Tplo" "$$depbase.Plo"; else rm -f "$$depbase.Tplo"; exit 1; fi @AMDEP_TRUE@@am__fastdepGCJ_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepGCJ_FALSE@ DEPDIR=$(DEPDIR) $(GCJDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepGCJ_FALSE@ $(LTGCJCOMPILE) -c -o $@ $< classpath/tools/libgcj_tools_la-tools.lo: classpath/tools/tools.jar - at am__fastdepGCJ_TRUE@ if $(LIBTOOL) --mode=compile $(GCJ) $(libgcj_tools_la_GCJFLAGS) $(GCJFLAGS) -MT classpath/tools/libgcj_tools_la-tools.lo -MD -MP -MF "classpath/tools/$(DEPDIR)/libgcj_tools_la-tools.Tpo" -c -o classpath/tools/libgcj_tools_la-tools.lo `test -f 'classpath/tools/tools.jar' || echo '$(srcdir)/'`classpath/tools/tools.jar; \ - at am__fastdepGCJ_TRUE@ then mv -f "classpath/tools/$(DEPDIR)/libgcj_tools_la-tools.Tpo" "classpath/tools/$(DEPDIR)/libgcj_tools_la-tools.Plo"; else rm -f "classpath/tools/$(DEPDIR)/libgcj_tools_la-tools.Tpo"; exit 1; fi + at am__fastdepGCJ_TRUE@ if $(LIBTOOL) --mode=compile $(GCJ) $(libgcj_tools_la_GCJFLAGS) $(GCJFLAGS) -MT classpath/tools/libgcj_tools_la-tools.lo -MD -MP -MF "classpath/tools/$(DEPDIR)/libgcj_tools_la-tools.Tplo" -c -o classpath/tools/libgcj_tools_la-tools.lo `test -f 'classpath/tools/tools.jar' || echo '$(srcdir)/'`classpath/tools/tools.jar; \ + at am__fastdepGCJ_TRUE@ then mv -f "classpath/tools/$(DEPDIR)/libgcj_tools_la-tools.Tplo" "classpath/tools/$(DEPDIR)/libgcj_tools_la-tools.Plo"; else rm -f "classpath/tools/$(DEPDIR)/libgcj_tools_la-tools.Tplo"; exit 1; fi @AMDEP_TRUE@@am__fastdepGCJ_FALSE@ source='classpath/tools/tools.jar' object='classpath/tools/libgcj_tools_la-tools.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepGCJ_FALSE@ DEPDIR=$(DEPDIR) $(GCJDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepGCJ_FALSE@ $(LIBTOOL) --mode=compile $(GCJ) $(libgcj_tools_la_GCJFLAGS) $(GCJFLAGS) -c -o classpath/tools/libgcj_tools_la-tools.lo `test -f 'classpath/tools/tools.jar' || echo '$(srcdir)/'`classpath/tools/tools.jar @@ -8622,8 +8622,8 @@ .java.lo: @am__fastdepGCJ_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`; \ - at am__fastdepGCJ_TRUE@ if $(LTGCJCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \ - at am__fastdepGCJ_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Plo"; else rm -f "$$depbase.Tpo"; exit 1; fi + at am__fastdepGCJ_TRUE@ if $(LTGCJCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tplo" -c -o $@ $<; \ + at am__fastdepGCJ_TRUE@ then mv -f "$$depbase.Tplo" "$$depbase.Plo"; else rm -f "$$depbase.Tplo"; exit 1; fi @AMDEP_TRUE@@am__fastdepGCJ_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepGCJ_FALSE@ DEPDIR=$(DEPDIR) $(GCJDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepGCJ_FALSE@ $(LTGCJCOMPILE) -c -o $@ $< Modified: llvm-gcc-4.2/trunk/libmudflap/Makefile.in URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libmudflap/Makefile.in?rev=96794&r1=96793&r2=96794&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/libmudflap/Makefile.in (original) +++ llvm-gcc-4.2/trunk/libmudflap/Makefile.in Mon Feb 22 12:37:55 2010 @@ -410,8 +410,8 @@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: - at am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ - at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi + at am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tplo" -c -o $@ $<; \ + at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tplo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tplo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< Modified: llvm-gcc-4.2/trunk/libssp/Makefile.in URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libssp/Makefile.in?rev=96794&r1=96793&r2=96794&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/libssp/Makefile.in (original) +++ llvm-gcc-4.2/trunk/libssp/Makefile.in Mon Feb 22 12:37:55 2010 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.9.5 from Makefile.am. +# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -15,8 +15,6 @@ @SET_MAKE@ -SOURCES = $(libssp_la_SOURCES) $(libssp_nonshared_la_SOURCES) - srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -53,6 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ $(top_srcdir)/../config/depstand.m4 \ $(top_srcdir)/../config/lead-dot.m4 \ + $(top_srcdir)/../config/multi.m4 \ $(top_srcdir)/../config/no-executables.m4 \ $(top_srcdir)/../libtool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -415,15 +414,15 @@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: - at am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ - at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi + at am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tplo" -c -o $@ $<; \ + at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tplo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tplo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libssp_nonshared_la-ssp-local.lo: ssp-local.c - at am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libssp_nonshared_la_CFLAGS) $(CFLAGS) -MT libssp_nonshared_la-ssp-local.lo -MD -MP -MF "$(DEPDIR)/libssp_nonshared_la-ssp-local.Tpo" -c -o libssp_nonshared_la-ssp-local.lo `test -f 'ssp-local.c' || echo '$(srcdir)/'`ssp-local.c; \ - at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libssp_nonshared_la-ssp-local.Tpo" "$(DEPDIR)/libssp_nonshared_la-ssp-local.Plo"; else rm -f "$(DEPDIR)/libssp_nonshared_la-ssp-local.Tpo"; exit 1; fi + at am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libssp_nonshared_la_CFLAGS) $(CFLAGS) -MT libssp_nonshared_la-ssp-local.lo -MD -MP -MF "$(DEPDIR)/libssp_nonshared_la-ssp-local.Tplo" -c -o libssp_nonshared_la-ssp-local.lo `test -f 'ssp-local.c' || echo '$(srcdir)/'`ssp-local.c; \ + at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libssp_nonshared_la-ssp-local.Tplo" "$(DEPDIR)/libssp_nonshared_la-ssp-local.Plo"; else rm -f "$(DEPDIR)/libssp_nonshared_la-ssp-local.Tplo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ssp-local.c' object='libssp_nonshared_la-ssp-local.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libssp_nonshared_la_CFLAGS) $(CFLAGS) -c -o libssp_nonshared_la-ssp-local.lo `test -f 'ssp-local.c' || echo '$(srcdir)/'`ssp-local.c From gohman at apple.com Mon Feb 22 13:06:33 2010 From: gohman at apple.com (Dan Gohman) Date: Mon, 22 Feb 2010 11:06:33 -0800 Subject: [llvm-commits] [llvm] r96598 - /llvm/trunk/docs/AdvancedGetElementPtr.html In-Reply-To: <4B824AF1.4070605@gmail.com> References: <201002181840.o1IIeUbB008124@zion.cs.uiuc.edu> <4B824AF1.4070605@gmail.com> Message-ID: <6FEA2C2E-5417-40E8-92AB-76178B51B870@apple.com> On Feb 22, 2010, at 1:14 AM, T?r?k Edwin wrote: > On 02/18/2010 08:40 PM, Dan Gohman wrote: >> Author: djg >> Date: Thu Feb 18 12:40:29 2010 >> New Revision: 96598 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=96598&view=rev >> Log: >> Clarify that ptrtoint+inttoptr are an alternative to GEP which are >> not restricted by the GEP rules. >> >> Modified: >> llvm/trunk/docs/AdvancedGetElementPtr.html >> >> Modified: llvm/trunk/docs/AdvancedGetElementPtr.html >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/AdvancedGetElementPtr.html?rev=96598&r1=96597&r2=96598&view=diff >> >> ============================================================================== >> --- llvm/trunk/docs/AdvancedGetElementPtr.html (original) >> +++ llvm/trunk/docs/AdvancedGetElementPtr.html Thu Feb 18 12:40:29 2010 >> @@ -200,9 +200,9 @@ >> to null? >>
>>
>> -

You can compute an address that way, but you can't use that pointer to >> - actually access the object if you do, unless the object is managed >> - outside of LLVM.

>> +

You can compute an address that way, but if you use GEP to do the add, >> + you can't use that pointer to actually access the object, unless the >> + object is managed outside of LLVM.

>> >>

The underlying integer computation is sufficiently defined; null has a >> defined value -- zero -- and you can add whatever value you want to it.

>> @@ -211,6 +211,11 @@ >> object with such a pointer. This includes GlobalVariables, Allocas, and >> objects pointed to by noalias pointers.

>> >> +

If you really need this functionality, you can do the arithmetic with >> + explicit integer instructions, and use inttoptr to convert the result to >> + an address. Most of GEP's special aliasing rules do not apply to pointers >> + computed from ptrtoint, arithmetic, and inttoptr sequences.

> > Won't optimizers convert that back to a GEP? No. They may have at one time, but that was fixed a while ago. Dan From gohman at apple.com Mon Feb 22 12:53:26 2010 From: gohman at apple.com (Dan Gohman) Date: Mon, 22 Feb 2010 18:53:26 -0000 Subject: [llvm-commits] [llvm] r96796 - /llvm/trunk/test/CodeGen/X86/sse-minmax.ll Message-ID: <20100222185326.9F5272A6C12E@llvm.org> Author: djg Date: Mon Feb 22 12:53:26 2010 New Revision: 96796 URL: http://llvm.org/viewvc/llvm-project?rev=96796&view=rev Log: Actually enable the -enable-unsafe-fp-math tests. Modified: llvm/trunk/test/CodeGen/X86/sse-minmax.ll Modified: llvm/trunk/test/CodeGen/X86/sse-minmax.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/sse-minmax.ll?rev=96796&r1=96795&r2=96796&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/sse-minmax.ll (original) +++ llvm/trunk/test/CodeGen/X86/sse-minmax.ll Mon Feb 22 12:53:26 2010 @@ -1,5 +1,5 @@ ; RUN: llc < %s -march=x86-64 -asm-verbose=false | FileCheck %s -; RUN: llc < %s -march=x86-64 -asm-verbose=false -enable-unsafe-fp-math | FileCheck -check-prefix=uNSAFE %s +; RUN: llc < %s -march=x86-64 -asm-verbose=false -enable-unsafe-fp-math | FileCheck -check-prefix=UNSAFE %s ; Some of these patterns can be matched as SSE min or max. Some of ; then can be matched provided that the operands are swapped. @@ -13,9 +13,9 @@ ; CHECK: ogt: ; CHECK-NEXT: maxsd %xmm1, %xmm0 ; CHECK-NEXT: ret -; uNSAFE: ogt: -; uNSAFE-NEXT: maxsd %xmm1, %xmm0 -; uNSAFE-NEXT: ret +; UNSAFE: ogt: +; UNSAFE-NEXT: maxsd %xmm1, %xmm0 +; UNSAFE-NEXT: ret define double @ogt(double %x, double %y) nounwind { %c = fcmp ogt double %x, %y %d = select i1 %c, double %x, double %y @@ -25,9 +25,9 @@ ; CHECK: olt: ; CHECK-NEXT: minsd %xmm1, %xmm0 ; CHECK-NEXT: ret -; uNSAFE: olt: -; uNSAFE-NEXT: minsd %xmm1, %xmm0 -; uNSAFE-NEXT: ret +; UNSAFE: olt: +; UNSAFE-NEXT: minsd %xmm1, %xmm0 +; UNSAFE-NEXT: ret define double @olt(double %x, double %y) nounwind { %c = fcmp olt double %x, %y %d = select i1 %c, double %x, double %y @@ -38,10 +38,10 @@ ; CHECK-NEXT: minsd %xmm0, %xmm1 ; CHECK-NEXT: movapd %xmm1, %xmm0 ; CHECK-NEXT: ret -; uNSAFE: ogt_inverse: -; uNSAFE-NEXT: minsd %xmm0, %xmm1 -; uNSAFE-NEXT: movapd %xmm1, %xmm0 -; uNSAFE-NEXT: ret +; UNSAFE: ogt_inverse: +; UNSAFE-NEXT: minsd %xmm0, %xmm1 +; UNSAFE-NEXT: movapd %xmm1, %xmm0 +; UNSAFE-NEXT: ret define double @ogt_inverse(double %x, double %y) nounwind { %c = fcmp ogt double %x, %y %d = select i1 %c, double %y, double %x @@ -52,10 +52,10 @@ ; CHECK-NEXT: maxsd %xmm0, %xmm1 ; CHECK-NEXT: movapd %xmm1, %xmm0 ; CHECK-NEXT: ret -; uNSAFE: olt_inverse: -; uNSAFE-NEXT: maxsd %xmm0, %xmm1 -; uNSAFE-NEXT: movapd %xmm1, %xmm0 -; uNSAFE-NEXT: ret +; UNSAFE: olt_inverse: +; UNSAFE-NEXT: maxsd %xmm0, %xmm1 +; UNSAFE-NEXT: movapd %xmm1, %xmm0 +; UNSAFE-NEXT: ret define double @olt_inverse(double %x, double %y) nounwind { %c = fcmp olt double %x, %y %d = select i1 %c, double %y, double %x @@ -64,9 +64,9 @@ ; CHECK: oge: ; CHECK-NEXT: ucomisd %xmm1, %xmm0 -; uNSAFE: oge: -; uNSAFE-NEXT: maxsd %xmm1, %xmm0 -; uNSAFE-NEXT: ret +; UNSAFE: oge: +; UNSAFE-NEXT: maxsd %xmm1, %xmm0 +; UNSAFE-NEXT: ret define double @oge(double %x, double %y) nounwind { %c = fcmp oge double %x, %y %d = select i1 %c, double %x, double %y @@ -75,8 +75,8 @@ ; CHECK: ole: ; CHECK-NEXT: ucomisd %xmm0, %xmm1 -; uNSAFE: ole: -; uNSAFE-NEXT: minsd %xmm1, %xmm0 +; UNSAFE: ole: +; UNSAFE-NEXT: minsd %xmm1, %xmm0 define double @ole(double %x, double %y) nounwind { %c = fcmp ole double %x, %y %d = select i1 %c, double %x, double %y @@ -85,10 +85,10 @@ ; CHECK: oge_inverse: ; CHECK-NEXT: ucomisd %xmm1, %xmm0 -; uNSAFE: oge_inverse: -; uNSAFE-NEXT: minsd %xmm0, %xmm1 -; uNSAFE-NEXT: movapd %xmm1, %xmm0 -; uNSAFE-NEXT: ret +; UNSAFE: oge_inverse: +; UNSAFE-NEXT: minsd %xmm0, %xmm1 +; UNSAFE-NEXT: movapd %xmm1, %xmm0 +; UNSAFE-NEXT: ret define double @oge_inverse(double %x, double %y) nounwind { %c = fcmp oge double %x, %y %d = select i1 %c, double %y, double %x @@ -97,10 +97,10 @@ ; CHECK: ole_inverse: ; CHECK-NEXT: ucomisd %xmm0, %xmm1 -; uNSAFE: ole_inverse: -; uNSAFE-NEXT: maxsd %xmm0, %xmm1 -; uNSAFE-NEXT: movapd %xmm1, %xmm0 -; uNSAFE-NEXT: ret +; UNSAFE: ole_inverse: +; UNSAFE-NEXT: maxsd %xmm0, %xmm1 +; UNSAFE-NEXT: movapd %xmm1, %xmm0 +; UNSAFE-NEXT: ret define double @ole_inverse(double %x, double %y) nounwind { %c = fcmp ole double %x, %y %d = select i1 %c, double %y, double %x @@ -111,10 +111,10 @@ ; CHECK-NEXT: pxor %xmm1, %xmm1 ; CHECK-NEXT: maxsd %xmm1, %xmm0 ; CHECK-NEXT: ret -; uNSAFE: x_ogt: -; uNSAFE-NEXT: pxor %xmm1, %xmm1 -; uNSAFE-NEXT: maxsd %xmm1, %xmm0 -; uNSAFE-NEXT: ret +; UNSAFE: x_ogt: +; UNSAFE-NEXT: pxor %xmm1, %xmm1 +; UNSAFE-NEXT: maxsd %xmm1, %xmm0 +; UNSAFE-NEXT: ret define double @x_ogt(double %x) nounwind { %c = fcmp ogt double %x, 0.000000e+00 %d = select i1 %c, double %x, double 0.000000e+00 @@ -125,10 +125,10 @@ ; CHECK-NEXT: pxor %xmm1, %xmm1 ; CHECK-NEXT: minsd %xmm1, %xmm0 ; CHECK-NEXT: ret -; uNSAFE: x_olt: -; uNSAFE-NEXT: pxor %xmm1, %xmm1 -; uNSAFE-NEXT: minsd %xmm1, %xmm0 -; uNSAFE-NEXT: ret +; UNSAFE: x_olt: +; UNSAFE-NEXT: pxor %xmm1, %xmm1 +; UNSAFE-NEXT: minsd %xmm1, %xmm0 +; UNSAFE-NEXT: ret define double @x_olt(double %x) nounwind { %c = fcmp olt double %x, 0.000000e+00 %d = select i1 %c, double %x, double 0.000000e+00 @@ -140,11 +140,11 @@ ; CHECK-NEXT: minsd %xmm0, %xmm1 ; CHECK-NEXT: movapd %xmm1, %xmm0 ; CHECK-NEXT: ret -; uNSAFE: x_ogt_inverse: -; uNSAFE-NEXT: pxor %xmm1, %xmm1 -; uNSAFE-NEXT: minsd %xmm0, %xmm1 -; uNSAFE-NEXT: movapd %xmm1, %xmm0 -; uNSAFE-NEXT: ret +; UNSAFE: x_ogt_inverse: +; UNSAFE-NEXT: pxor %xmm1, %xmm1 +; UNSAFE-NEXT: minsd %xmm0, %xmm1 +; UNSAFE-NEXT: movapd %xmm1, %xmm0 +; UNSAFE-NEXT: ret define double @x_ogt_inverse(double %x) nounwind { %c = fcmp ogt double %x, 0.000000e+00 %d = select i1 %c, double 0.000000e+00, double %x @@ -156,11 +156,11 @@ ; CHECK-NEXT: maxsd %xmm0, %xmm1 ; CHECK-NEXT: movapd %xmm1, %xmm0 ; CHECK-NEXT: ret -; uNSAFE: x_olt_inverse: -; uNSAFE-NEXT: pxor %xmm1, %xmm1 -; uNSAFE-NEXT: maxsd %xmm0, %xmm1 -; uNSAFE-NEXT: movapd %xmm1, %xmm0 -; uNSAFE-NEXT: ret +; UNSAFE: x_olt_inverse: +; UNSAFE-NEXT: pxor %xmm1, %xmm1 +; UNSAFE-NEXT: maxsd %xmm0, %xmm1 +; UNSAFE-NEXT: movapd %xmm1, %xmm0 +; UNSAFE-NEXT: ret define double @x_olt_inverse(double %x) nounwind { %c = fcmp olt double %x, 0.000000e+00 %d = select i1 %c, double 0.000000e+00, double %x @@ -169,10 +169,10 @@ ; CHECK: x_oge: ; CHECK: ucomisd %xmm1, %xmm0 -; uNSAFE: x_oge: -; uNSAFE-NEXT: pxor %xmm1, %xmm1 -; uNSAFE-NEXT: maxsd %xmm1, %xmm0 -; uNSAFE-NEXT: ret +; UNSAFE: x_oge: +; UNSAFE-NEXT: pxor %xmm1, %xmm1 +; UNSAFE-NEXT: maxsd %xmm1, %xmm0 +; UNSAFE-NEXT: ret define double @x_oge(double %x) nounwind { %c = fcmp oge double %x, 0.000000e+00 %d = select i1 %c, double %x, double 0.000000e+00 @@ -181,10 +181,10 @@ ; CHECK: x_ole: ; CHECK: ucomisd %xmm0, %xmm1 -; uNSAFE: x_ole: -; uNSAFE-NEXT: pxor %xmm1, %xmm1 -; uNSAFE-NEXT: minsd %xmm1, %xmm0 -; uNSAFE-NEXT: ret +; UNSAFE: x_ole: +; UNSAFE-NEXT: pxor %xmm1, %xmm1 +; UNSAFE-NEXT: minsd %xmm1, %xmm0 +; UNSAFE-NEXT: ret define double @x_ole(double %x) nounwind { %c = fcmp ole double %x, 0.000000e+00 %d = select i1 %c, double %x, double 0.000000e+00 @@ -193,11 +193,11 @@ ; CHECK: x_oge_inverse: ; CHECK: ucomisd %xmm1, %xmm0 -; uNSAFE: x_oge_inverse: -; uNSAFE-NEXT: pxor %xmm1, %xmm1 -; uNSAFE-NEXT: minsd %xmm0, %xmm1 -; uNSAFE-NEXT: movapd %xmm1, %xmm0 -; uNSAFE-NEXT: ret +; UNSAFE: x_oge_inverse: +; UNSAFE-NEXT: pxor %xmm1, %xmm1 +; UNSAFE-NEXT: minsd %xmm0, %xmm1 +; UNSAFE-NEXT: movapd %xmm1, %xmm0 +; UNSAFE-NEXT: ret define double @x_oge_inverse(double %x) nounwind { %c = fcmp oge double %x, 0.000000e+00 %d = select i1 %c, double 0.000000e+00, double %x @@ -206,11 +206,11 @@ ; CHECK: x_ole_inverse: ; CHECK: ucomisd %xmm0, %xmm1 -; uNSAFE: x_ole_inverse: -; uNSAFE-NEXT: pxor %xmm1, %xmm1 -; uNSAFE-NEXT: maxsd %xmm0, %xmm1 -; uNSAFE-NEXT: movapd %xmm1, %xmm0 -; uNSAFE-NEXT: ret +; UNSAFE: x_ole_inverse: +; UNSAFE-NEXT: pxor %xmm1, %xmm1 +; UNSAFE-NEXT: maxsd %xmm0, %xmm1 +; UNSAFE-NEXT: movapd %xmm1, %xmm0 +; UNSAFE-NEXT: ret define double @x_ole_inverse(double %x) nounwind { %c = fcmp ole double %x, 0.000000e+00 %d = select i1 %c, double 0.000000e+00, double %x @@ -219,9 +219,9 @@ ; CHECK: ugt: ; CHECK: ucomisd %xmm0, %xmm1 -; uNSAFE: ugt: -; uNSAFE-NEXT: maxsd %xmm1, %xmm0 -; uNSAFE-NEXT: ret +; UNSAFE: ugt: +; UNSAFE-NEXT: maxsd %xmm1, %xmm0 +; UNSAFE-NEXT: ret define double @ugt(double %x, double %y) nounwind { %c = fcmp ugt double %x, %y %d = select i1 %c, double %x, double %y @@ -230,9 +230,9 @@ ; CHECK: ult: ; CHECK: ucomisd %xmm1, %xmm0 -; uNSAFE: ult: -; uNSAFE-NEXT: minsd %xmm1, %xmm0 -; uNSAFE-NEXT: ret +; UNSAFE: ult: +; UNSAFE-NEXT: minsd %xmm1, %xmm0 +; UNSAFE-NEXT: ret define double @ult(double %x, double %y) nounwind { %c = fcmp ult double %x, %y %d = select i1 %c, double %x, double %y @@ -241,10 +241,10 @@ ; CHECK: ugt_inverse: ; CHECK: ucomisd %xmm0, %xmm1 -; uNSAFE: ugt_inverse: -; uNSAFE-NEXT: minsd %xmm0, %xmm1 -; uNSAFE-NEXT: movapd %xmm1, %xmm0 -; uNSAFE-NEXT: ret +; UNSAFE: ugt_inverse: +; UNSAFE-NEXT: minsd %xmm0, %xmm1 +; UNSAFE-NEXT: movapd %xmm1, %xmm0 +; UNSAFE-NEXT: ret define double @ugt_inverse(double %x, double %y) nounwind { %c = fcmp ugt double %x, %y %d = select i1 %c, double %y, double %x @@ -253,10 +253,10 @@ ; CHECK: ult_inverse: ; CHECK: ucomisd %xmm1, %xmm0 -; uNSAFE: ult_inverse: -; uNSAFE-NEXT: maxsd %xmm0, %xmm1 -; uNSAFE-NEXT: movapd %xmm1, %xmm0 -; uNSAFE-NEXT: ret +; UNSAFE: ult_inverse: +; UNSAFE-NEXT: maxsd %xmm0, %xmm1 +; UNSAFE-NEXT: movapd %xmm1, %xmm0 +; UNSAFE-NEXT: ret define double @ult_inverse(double %x, double %y) nounwind { %c = fcmp ult double %x, %y %d = select i1 %c, double %y, double %x @@ -266,9 +266,9 @@ ; CHECK: uge: ; CHECK-NEXT: maxsd %xmm1, %xmm0 ; CHECK-NEXT: ret -; uNSAFE: uge: -; uNSAFE-NEXT: maxsd %xmm1, %xmm0 -; uNSAFE-NEXT: ret +; UNSAFE: uge: +; UNSAFE-NEXT: maxsd %xmm1, %xmm0 +; UNSAFE-NEXT: ret define double @uge(double %x, double %y) nounwind { %c = fcmp uge double %x, %y %d = select i1 %c, double %x, double %y @@ -278,9 +278,9 @@ ; CHECK: ule: ; CHECK-NEXT: minsd %xmm1, %xmm0 ; CHECK-NEXT: ret -; uNSAFE: ule: -; uNSAFE-NEXT: minsd %xmm1, %xmm0 -; uNSAFE-NEXT: ret +; UNSAFE: ule: +; UNSAFE-NEXT: minsd %xmm1, %xmm0 +; UNSAFE-NEXT: ret define double @ule(double %x, double %y) nounwind { %c = fcmp ule double %x, %y %d = select i1 %c, double %x, double %y @@ -291,10 +291,10 @@ ; CHECK-NEXT: minsd %xmm0, %xmm1 ; CHECK-NEXT: movapd %xmm1, %xmm0 ; CHECK-NEXT: ret -; uNSAFE: uge_inverse: -; uNSAFE-NEXT: minsd %xmm0, %xmm1 -; uNSAFE-NEXT: movapd %xmm1, %xmm0 -; uNSAFE-NEXT: ret +; UNSAFE: uge_inverse: +; UNSAFE-NEXT: minsd %xmm0, %xmm1 +; UNSAFE-NEXT: movapd %xmm1, %xmm0 +; UNSAFE-NEXT: ret define double @uge_inverse(double %x, double %y) nounwind { %c = fcmp uge double %x, %y %d = select i1 %c, double %y, double %x @@ -305,10 +305,10 @@ ; CHECK-NEXT: maxsd %xmm0, %xmm1 ; CHECK-NEXT: movapd %xmm1, %xmm0 ; CHECK-NEXT: ret -; uNSAFE: ule_inverse: -; uNSAFE-NEXT: maxsd %xmm0, %xmm1 -; uNSAFE-NEXT: movapd %xmm1, %xmm0 -; uNSAFE-NEXT: ret +; UNSAFE: ule_inverse: +; UNSAFE-NEXT: maxsd %xmm0, %xmm1 +; UNSAFE-NEXT: movapd %xmm1, %xmm0 +; UNSAFE-NEXT: ret define double @ule_inverse(double %x, double %y) nounwind { %c = fcmp ule double %x, %y %d = select i1 %c, double %y, double %x @@ -317,10 +317,10 @@ ; CHECK: x_ugt: ; CHECK: ucomisd %xmm0, %xmm1 -; uNSAFE: x_ugt: -; uNSAFE-NEXT: pxor %xmm1, %xmm1 -; uNSAFE-NEXT: maxsd %xmm1, %xmm0 -; uNSAFE-NEXT: ret +; UNSAFE: x_ugt: +; UNSAFE-NEXT: pxor %xmm1, %xmm1 +; UNSAFE-NEXT: maxsd %xmm1, %xmm0 +; UNSAFE-NEXT: ret define double @x_ugt(double %x) nounwind { %c = fcmp ugt double %x, 0.000000e+00 %d = select i1 %c, double %x, double 0.000000e+00 @@ -329,10 +329,10 @@ ; CHECK: x_ult: ; CHECK: ucomisd %xmm1, %xmm0 -; uNSAFE: x_ult: -; uNSAFE-NEXT: pxor %xmm1, %xmm1 -; uNSAFE-NEXT: minsd %xmm1, %xmm0 -; uNSAFE-NEXT: ret +; UNSAFE: x_ult: +; UNSAFE-NEXT: pxor %xmm1, %xmm1 +; UNSAFE-NEXT: minsd %xmm1, %xmm0 +; UNSAFE-NEXT: ret define double @x_ult(double %x) nounwind { %c = fcmp ult double %x, 0.000000e+00 %d = select i1 %c, double %x, double 0.000000e+00 @@ -341,11 +341,11 @@ ; CHECK: x_ugt_inverse: ; CHECK: ucomisd %xmm0, %xmm1 -; uNSAFE: x_ugt_inverse: -; uNSAFE-NEXT: pxor %xmm1, %xmm1 -; uNSAFE-NEXT: minsd %xmm0, %xmm1 -; uNSAFE-NEXT: movapd %xmm1, %xmm0 -; uNSAFE-NEXT: ret +; UNSAFE: x_ugt_inverse: +; UNSAFE-NEXT: pxor %xmm1, %xmm1 +; UNSAFE-NEXT: minsd %xmm0, %xmm1 +; UNSAFE-NEXT: movapd %xmm1, %xmm0 +; UNSAFE-NEXT: ret define double @x_ugt_inverse(double %x) nounwind { %c = fcmp ugt double %x, 0.000000e+00 %d = select i1 %c, double 0.000000e+00, double %x @@ -354,11 +354,11 @@ ; CHECK: x_ult_inverse: ; CHECK: ucomisd %xmm1, %xmm0 -; uNSAFE: x_ult_inverse: -; uNSAFE-NEXT: pxor %xmm1, %xmm1 -; uNSAFE-NEXT: maxsd %xmm0, %xmm1 -; uNSAFE-NEXT: movapd %xmm1, %xmm0 -; uNSAFE-NEXT: ret +; UNSAFE: x_ult_inverse: +; UNSAFE-NEXT: pxor %xmm1, %xmm1 +; UNSAFE-NEXT: maxsd %xmm0, %xmm1 +; UNSAFE-NEXT: movapd %xmm1, %xmm0 +; UNSAFE-NEXT: ret define double @x_ult_inverse(double %x) nounwind { %c = fcmp ult double %x, 0.000000e+00 %d = select i1 %c, double 0.000000e+00, double %x @@ -369,10 +369,10 @@ ; CHECK-NEXT: pxor %xmm1, %xmm1 ; CHECK-NEXT: maxsd %xmm1, %xmm0 ; CHECK-NEXT: ret -; uNSAFE: x_uge: -; uNSAFE-NEXT: pxor %xmm1, %xmm1 -; uNSAFE-NEXT: maxsd %xmm1, %xmm0 -; uNSAFE-NEXT: ret +; UNSAFE: x_uge: +; UNSAFE-NEXT: pxor %xmm1, %xmm1 +; UNSAFE-NEXT: maxsd %xmm1, %xmm0 +; UNSAFE-NEXT: ret define double @x_uge(double %x) nounwind { %c = fcmp uge double %x, 0.000000e+00 %d = select i1 %c, double %x, double 0.000000e+00 @@ -383,10 +383,10 @@ ; CHECK-NEXT: pxor %xmm1, %xmm1 ; CHECK-NEXT: minsd %xmm1, %xmm0 ; CHECK-NEXT: ret -; uNSAFE: x_ule: -; uNSAFE-NEXT: pxor %xmm1, %xmm1 -; uNSAFE-NEXT: minsd %xmm1, %xmm0 -; uNSAFE-NEXT: ret +; UNSAFE: x_ule: +; UNSAFE-NEXT: pxor %xmm1, %xmm1 +; UNSAFE-NEXT: minsd %xmm1, %xmm0 +; UNSAFE-NEXT: ret define double @x_ule(double %x) nounwind { %c = fcmp ule double %x, 0.000000e+00 %d = select i1 %c, double %x, double 0.000000e+00 @@ -398,11 +398,11 @@ ; CHECK-NEXT: minsd %xmm0, %xmm1 ; CHECK-NEXT: movapd %xmm1, %xmm0 ; CHECK-NEXT: ret -; uNSAFE: x_uge_inverse: -; uNSAFE-NEXT: pxor %xmm1, %xmm1 -; uNSAFE-NEXT: minsd %xmm0, %xmm1 -; uNSAFE-NEXT: movapd %xmm1, %xmm0 -; uNSAFE-NEXT: ret +; UNSAFE: x_uge_inverse: +; UNSAFE-NEXT: pxor %xmm1, %xmm1 +; UNSAFE-NEXT: minsd %xmm0, %xmm1 +; UNSAFE-NEXT: movapd %xmm1, %xmm0 +; UNSAFE-NEXT: ret define double @x_uge_inverse(double %x) nounwind { %c = fcmp uge double %x, 0.000000e+00 %d = select i1 %c, double 0.000000e+00, double %x @@ -414,11 +414,11 @@ ; CHECK-NEXT: maxsd %xmm0, %xmm1 ; CHECK-NEXT: movapd %xmm1, %xmm0 ; CHECK-NEXT: ret -; uNSAFE: x_ule_inverse: -; uNSAFE-NEXT: pxor %xmm1, %xmm1 -; uNSAFE-NEXT: maxsd %xmm0, %xmm1 -; uNSAFE-NEXT: movapd %xmm1, %xmm0 -; uNSAFE-NEXT: ret +; UNSAFE: x_ule_inverse: +; UNSAFE-NEXT: pxor %xmm1, %xmm1 +; UNSAFE-NEXT: maxsd %xmm0, %xmm1 +; UNSAFE-NEXT: movapd %xmm1, %xmm0 +; UNSAFE-NEXT: ret define double @x_ule_inverse(double %x) nounwind { %c = fcmp ule double %x, 0.000000e+00 %d = select i1 %c, double 0.000000e+00, double %x @@ -429,8 +429,8 @@ ; CHECK: clampTo3k_a: ; CHECK: minsd -; uNSAFE: clampTo3k_a: -; uNSAFE: minsd +; UNSAFE: clampTo3k_a: +; UNSAFE: minsd define double @clampTo3k_a(double %x) nounwind readnone { entry: %0 = fcmp ogt double %x, 3.000000e+03 ; [#uses=1] @@ -440,8 +440,8 @@ ; CHECK: clampTo3k_b: ; CHECK: minsd -; uNSAFE: clampTo3k_b: -; uNSAFE: minsd +; UNSAFE: clampTo3k_b: +; UNSAFE: minsd define double @clampTo3k_b(double %x) nounwind readnone { entry: %0 = fcmp uge double %x, 3.000000e+03 ; [#uses=1] @@ -451,8 +451,8 @@ ; CHECK: clampTo3k_c: ; CHECK: maxsd -; uNSAFE: clampTo3k_c: -; uNSAFE: maxsd +; UNSAFE: clampTo3k_c: +; UNSAFE: maxsd define double @clampTo3k_c(double %x) nounwind readnone { entry: %0 = fcmp olt double %x, 3.000000e+03 ; [#uses=1] @@ -462,8 +462,8 @@ ; CHECK: clampTo3k_d: ; CHECK: maxsd -; uNSAFE: clampTo3k_d: -; uNSAFE: maxsd +; UNSAFE: clampTo3k_d: +; UNSAFE: maxsd define double @clampTo3k_d(double %x) nounwind readnone { entry: %0 = fcmp ule double %x, 3.000000e+03 ; [#uses=1] @@ -473,8 +473,8 @@ ; CHECK: clampTo3k_e: ; CHECK: maxsd -; uNSAFE: clampTo3k_e: -; uNSAFE: maxsd +; UNSAFE: clampTo3k_e: +; UNSAFE: maxsd define double @clampTo3k_e(double %x) nounwind readnone { entry: %0 = fcmp olt double %x, 3.000000e+03 ; [#uses=1] @@ -484,8 +484,8 @@ ; CHECK: clampTo3k_f: ; CHECK: maxsd -; uNSAFE: clampTo3k_f: -; uNSAFE: maxsd +; UNSAFE: clampTo3k_f: +; UNSAFE: maxsd define double @clampTo3k_f(double %x) nounwind readnone { entry: %0 = fcmp ule double %x, 3.000000e+03 ; [#uses=1] @@ -495,8 +495,8 @@ ; CHECK: clampTo3k_g: ; CHECK: minsd -; uNSAFE: clampTo3k_g: -; uNSAFE: minsd +; UNSAFE: clampTo3k_g: +; UNSAFE: minsd define double @clampTo3k_g(double %x) nounwind readnone { entry: %0 = fcmp ogt double %x, 3.000000e+03 ; [#uses=1] @@ -506,8 +506,8 @@ ; CHECK: clampTo3k_h: ; CHECK: minsd -; uNSAFE: clampTo3k_h: -; uNSAFE: minsd +; UNSAFE: clampTo3k_h: +; UNSAFE: minsd define double @clampTo3k_h(double %x) nounwind readnone { entry: %0 = fcmp uge double %x, 3.000000e+03 ; [#uses=1] From johnny.chen at apple.com Mon Feb 22 12:50:54 2010 From: johnny.chen at apple.com (Johnny Chen) Date: Mon, 22 Feb 2010 18:50:54 -0000 Subject: [llvm-commits] [llvm] r96795 - /llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Message-ID: <20100222185232.C5B212A6C396@llvm.org> Author: johnny Date: Mon Feb 22 12:50:54 2010 New Revision: 96795 URL: http://llvm.org/viewvc/llvm-project?rev=96795&view=rev Log: Added a bunch of instructions for disassembly only: o signed/unsigned add/subtract o signed/unsigned halving add/subtract o unsigned sum of absolute difference [and accumulate] o signed/unsigned saturate o signed multiply accumulate/subtract [long] dual Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.td?rev=96795&r1=96794&r2=96795&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Mon Feb 22 12:50:54 2010 @@ -1481,10 +1481,9 @@ // (mul X, 2^n+1) -> (add (X << n), X) // (mul X, 2^n-1) -> (rsb X, (X << n)) -// Saturating adds/subtracts -- for disassembly only - +// ARM Arithmetic Instruction -- for disassembly only // GPR:$dst = GPR:$a op GPR:$b -class AQI op27_20, bits<4> op7_4, string opc> +class AAI op27_20, bits<4> op7_4, string opc> : AI<(outs GPR:$dst), (ins GPR:$a, GPR:$b), DPFrm, IIC_iALUr, opc, "\t$dst, $a, $b", [/* For disassembly only; pattern left blank */]> { @@ -1492,22 +1491,116 @@ let Inst{7-4} = op7_4; } -def QADD : AQI<0b00010000, 0b0101, "qadd">; -def QADD16 : AQI<0b01100010, 0b0001, "qadd16">; -def QADD8 : AQI<0b01100010, 0b1001, "qadd8">; -def QASX : AQI<0b01100010, 0b0011, "qasx">; -def QDADD : AQI<0b00010100, 0b0101, "qdadd">; -def QDSUB : AQI<0b00010110, 0b0101, "qdsub">; -def QSAX : AQI<0b01100010, 0b0101, "qsax">; -def QSUB : AQI<0b00010010, 0b0101, "qsub">; -def QSUB16 : AQI<0b01100010, 0b0111, "qsub16">; -def QSUB8 : AQI<0b01100010, 0b1111, "qsub8">; -def UQADD16 : AQI<0b01100110, 0b0001, "uqadd16">; -def UQADD8 : AQI<0b01100110, 0b1001, "uqadd8">; -def UQASX : AQI<0b01100110, 0b0011, "uqasx">; -def UQSAX : AQI<0b01100110, 0b0101, "uqsax">; -def UQSUB16 : AQI<0b01100110, 0b0111, "uqsub16">; -def UQSUB8 : AQI<0b01100110, 0b1111, "uqsub8">; +// Saturating add/subtract -- for disassembly only + +def QADD : AAI<0b00010000, 0b0101, "qadd">; +def QADD16 : AAI<0b01100010, 0b0001, "qadd16">; +def QADD8 : AAI<0b01100010, 0b1001, "qadd8">; +def QASX : AAI<0b01100010, 0b0011, "qasx">; +def QDADD : AAI<0b00010100, 0b0101, "qdadd">; +def QDSUB : AAI<0b00010110, 0b0101, "qdsub">; +def QSAX : AAI<0b01100010, 0b0101, "qsax">; +def QSUB : AAI<0b00010010, 0b0101, "qsub">; +def QSUB16 : AAI<0b01100010, 0b0111, "qsub16">; +def QSUB8 : AAI<0b01100010, 0b1111, "qsub8">; +def UQADD16 : AAI<0b01100110, 0b0001, "uqadd16">; +def UQADD8 : AAI<0b01100110, 0b1001, "uqadd8">; +def UQASX : AAI<0b01100110, 0b0011, "uqasx">; +def UQSAX : AAI<0b01100110, 0b0101, "uqsax">; +def UQSUB16 : AAI<0b01100110, 0b0111, "uqsub16">; +def UQSUB8 : AAI<0b01100110, 0b1111, "uqsub8">; + +// Signed/Unsigned add/subtract -- for disassembly only + +def SASX : AAI<0b01100001, 0b0011, "sasx">; +def SADD16 : AAI<0b01100001, 0b0001, "sadd16">; +def SADD8 : AAI<0b01100001, 0b1001, "sadd8">; +def SSAX : AAI<0b01100001, 0b0101, "ssax">; +def SSUB16 : AAI<0b01100001, 0b0111, "ssub16">; +def SSUB8 : AAI<0b01100001, 0b1111, "ssub8">; +def UASX : AAI<0b01100101, 0b0011, "uasx">; +def UADD16 : AAI<0b01100101, 0b0001, "uadd16">; +def UADD8 : AAI<0b01100101, 0b1001, "uadd8">; +def USAX : AAI<0b01100101, 0b0101, "usax">; +def USUB16 : AAI<0b01100101, 0b0111, "usub16">; +def USUB8 : AAI<0b01100101, 0b1111, "usub8">; + +// Signed/Unsigned halving add/subtract -- for disassembly only + +def SHASX : AAI<0b01100011, 0b0011, "shasx">; +def SHADD16 : AAI<0b01100011, 0b0001, "shadd16">; +def SHADD8 : AAI<0b01100011, 0b1001, "shadd8">; +def SHSAX : AAI<0b01100011, 0b0101, "shsax">; +def SHSUB16 : AAI<0b01100011, 0b0111, "shsub16">; +def SHSUB8 : AAI<0b01100011, 0b1111, "shsub8">; +def UHASX : AAI<0b01100111, 0b0011, "uhasx">; +def UHADD16 : AAI<0b01100111, 0b0001, "uhadd16">; +def UHADD8 : AAI<0b01100111, 0b1001, "uhadd8">; +def UHSAX : AAI<0b01100111, 0b0101, "uhsax">; +def UHSUB16 : AAI<0b01100111, 0b0111, "uhsub16">; +def UHSUB8 : AAI<0b01100111, 0b1111, "uhsub8">; + +// Unsigned Sum of Absolute Difference [and Accumulate] -- for disassembly only + +def USAD8 : AI<(outs GPR:$dst), (ins GPR:$a, GPR:$b, GPR:$acc), + MulFrm /* for convenience */, NoItinerary, "usad8", + "\t$dst, $a, $b", []>, + Requires<[IsARM, HasV6]> { + let Inst{27-20} = 0b01111000; + let Inst{15-12} = 0b1111; + let Inst{7-4} = 0b0001; +} +def USADA8 : AI<(outs GPR:$dst), (ins GPR:$a, GPR:$b, GPR:$acc), + MulFrm /* for convenience */, NoItinerary, "usada8", + "\t$dst, $a, $b, $acc", []>, + Requires<[IsARM, HasV6]> { + let Inst{27-20} = 0b01111000; + let Inst{7-4} = 0b0001; +} + +// Signed/Unsigned saturate -- for disassembly only + +def SSATlsl : AI<(outs GPR:$dst), (ins i32imm:$bit_pos, GPR:$a, i32imm:$shamt), + DPFrm, NoItinerary, "ssat", "\t$dst, $bit_pos, $a, LSL $shamt", + [/* For disassembly only; pattern left blank */]> { + let Inst{27-21} = 0b0110101; + let Inst{6-4} = 0b001; +} + +def SSATasr : AI<(outs GPR:$dst), (ins i32imm:$bit_pos, GPR:$a, i32imm:$shamt), + DPFrm, NoItinerary, "ssat", "\t$dst, $bit_pos, $a, ASR $shamt", + [/* For disassembly only; pattern left blank */]> { + let Inst{27-21} = 0b0110101; + let Inst{6-4} = 0b101; +} + +def SSAT16 : AI<(outs GPR:$dst), (ins i32imm:$bit_pos, GPR:$a), DPFrm, + NoItinerary, "ssat16", "\t$dst, $bit_pos, $a", + [/* For disassembly only; pattern left blank */]> { + let Inst{27-20} = 0b01101010; + let Inst{7-4} = 0b0011; +} + +def USATlsl : AI<(outs GPR:$dst), (ins i32imm:$bit_pos, GPR:$a, i32imm:$shamt), + DPFrm, NoItinerary, "usat", "\t$dst, $bit_pos, $a, LSL $shamt", + [/* For disassembly only; pattern left blank */]> { + let Inst{27-21} = 0b0110111; + let Inst{6-4} = 0b001; +} + +def USATasr : AI<(outs GPR:$dst), (ins i32imm:$bit_pos, GPR:$a, i32imm:$shamt), + DPFrm, NoItinerary, "usat", "\t$dst, $bit_pos, $a, ASR $shamt", + [/* For disassembly only; pattern left blank */]> { + let Inst{27-21} = 0b0110111; + let Inst{6-4} = 0b101; +} + +def USAT16 : AI<(outs GPR:$dst), (ins i32imm:$bit_pos, GPR:$a), DPFrm, + NoItinerary, "usat16", "\t$dst, $bit_pos, $a", + [/* For disassembly only; pattern left blank */]> { + let Inst{27-20} = 0b01101110; + let Inst{7-4} = 0b0011; +} //===----------------------------------------------------------------------===// // Bitwise Instructions. @@ -1782,7 +1875,40 @@ let Inst{6} = 1; } +// Helper class for AI_smld -- for disassembly only +class AMulDualI + : AI, Requires<[IsARM, HasV6]> { + let Inst{4} = 1; + let Inst{5} = swap; + let Inst{6} = sub; + let Inst{7} = 0; + let Inst{21-20} = 0b00; + let Inst{22} = long; + let Inst{27-23} = 0b01110; +} + +multiclass AI_smld { + + def D : AMulDualI<0, sub, 0, (outs GPR:$dst), (ins GPR:$a, GPR:$b, GPR:$acc), + NoItinerary, !strconcat(opc, "d"), "\t$dst, $a, $b, $acc">; + + def DX : AMulDualI<0, sub, 1, (outs GPR:$dst), (ins GPR:$a, GPR:$b, GPR:$acc), + NoItinerary, !strconcat(opc, "dx"), "\t$dst, $a, $b, $acc">; + + def LD : AMulDualI<1, sub, 0, (outs GPR:$ldst,GPR:$hdst), (ins GPR:$a,GPR:$b), + NoItinerary, !strconcat(opc, "ld"), "\t$ldst, $hdst, $a, $b">; + + def LDX : AMulDualI<1, sub, 1, (outs GPR:$ldst,GPR:$hdst),(ins GPR:$a,GPR:$b), + NoItinerary, !strconcat(opc, "ldx"),"\t$ldst, $hdst, $a, $b">; + +} + +defm SMLA : AI_smld<0, "smla">; +defm SMLS : AI_smld<1, "smls">; + // TODO: Dual halfword multiple: SMUAD, SMUSD, SMLAD, SMLSD, SMLALD, SMLSLD +// Note: SMLAD, SMLSD, SMLALD, SMLSLD have been defined for disassembly only. //===----------------------------------------------------------------------===// // Misc. Arithmetic Instructions. From tonic at nondot.org Mon Feb 22 15:24:29 2010 From: tonic at nondot.org (Tanya Lattner) Date: Mon, 22 Feb 2010 21:24:29 -0000 Subject: [llvm-commits] [www] r96802 - /www/trunk/demo/index.cgi Message-ID: <20100222212429.9FD032A6C12E@llvm.org> Author: tonic Date: Mon Feb 22 15:24:29 2010 New Revision: 96802 URL: http://llvm.org/viewvc/llvm-project?rev=96802&view=rev Log: New llvm/llvm-gcc for demo page Modified: www/trunk/demo/index.cgi Modified: www/trunk/demo/index.cgi URL: http://llvm.org/viewvc/llvm-project/www/trunk/demo/index.cgi?rev=96802&r1=96801&r2=96802&view=diff ============================================================================== --- www/trunk/demo/index.cgi (original) +++ www/trunk/demo/index.cgi Mon Feb 22 15:24:29 2010 @@ -10,7 +10,6 @@ $| = 1; my $ROOT = "/tmp/webcompile"; -#my $ROOT = "/home/vadve/lattner/webcompile"; open( STDERR, ">&STDOUT" ) or die "can't redirect stderr to stdout"; @@ -22,12 +21,11 @@ my $CONTACT_ADDRESS = 'Questions or comments? Email the LLVMdev mailing list.'; my $LOGO_IMAGE_URL = 'cathead.png'; my $TIMEOUTAMOUNT = 20; -$ENV{'LD_LIBRARY_PATH'} = '/home/vadve/shared/localtools/fc1/lib/'; my @PREPENDPATHDIRS = ( - '/home/vadve/shared/llvm-gcc4.2/bin/', - '/home/vadve/shared/llvm-2.5/Release/bin'); + '/opt/llvm-gcc-releases/llvm-gcc/bin', + '/opt/llvm-releases/llvm'); my $defaultsrc = "#include \n#include \n\n" . "int factorial(int X) {\n if (X == 0) return 1;\n" . From tonic at nondot.org Mon Feb 22 15:30:18 2010 From: tonic at nondot.org (Tanya Lattner) Date: Mon, 22 Feb 2010 21:30:18 -0000 Subject: [llvm-commits] [www] r96803 - /www/trunk/demo/index.cgi Message-ID: <20100222213018.E558F2A6C12E@llvm.org> Author: tonic Date: Mon Feb 22 15:30:18 2010 New Revision: 96803 URL: http://llvm.org/viewvc/llvm-project?rev=96803&view=rev Log: Fix demo page. Modified: www/trunk/demo/index.cgi Modified: www/trunk/demo/index.cgi URL: http://llvm.org/viewvc/llvm-project/www/trunk/demo/index.cgi?rev=96803&r1=96802&r2=96803&view=diff ============================================================================== --- www/trunk/demo/index.cgi (original) +++ www/trunk/demo/index.cgi Mon Feb 22 15:30:18 2010 @@ -1,4 +1,4 @@ -#!/usr/dcs/software/supported/bin/perl -w +#!/usr/bin/perl -w # LLVM Web Demo script # @@ -127,7 +127,7 @@
- Try out LLVM 2.5 in your browser! + Try out LLVM 2.6 in your browser!
From bob.wilson at apple.com Mon Feb 22 15:39:41 2010 From: bob.wilson at apple.com (Bob Wilson) Date: Mon, 22 Feb 2010 21:39:41 -0000 Subject: [llvm-commits] [llvm] r96805 - /llvm/trunk/lib/Transforms/Scalar/GVN.cpp Message-ID: <20100222213941.43F482A6C12E@llvm.org> Author: bwilson Date: Mon Feb 22 15:39:41 2010 New Revision: 96805 URL: http://llvm.org/viewvc/llvm-project?rev=96805&view=rev Log: Erase deleted instructions from GVN's ValueTable. This fixes assertion failures from ValueTable::verifyRemoved() when using -debug. Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=96805&r1=96804&r2=96805&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Mon Feb 22 15:39:41 2010 @@ -1497,6 +1497,7 @@ V->takeName(LI); if (V->getType()->isPointerTy()) MD->invalidateCachedPointerInfo(V); + VN.erase(LI); toErase.push_back(LI); NumGVNLoad++; return true; @@ -1716,6 +1717,7 @@ V->takeName(LI); if (V->getType()->isPointerTy()) MD->invalidateCachedPointerInfo(V); + VN.erase(LI); toErase.push_back(LI); NumPRELoad++; return true; @@ -1776,6 +1778,7 @@ L->replaceAllUsesWith(AvailVal); if (AvailVal->getType()->isPointerTy()) MD->invalidateCachedPointerInfo(AvailVal); + VN.erase(L); toErase.push_back(L); NumGVNLoad++; return true; @@ -1821,6 +1824,7 @@ L->replaceAllUsesWith(StoredVal); if (StoredVal->getType()->isPointerTy()) MD->invalidateCachedPointerInfo(StoredVal); + VN.erase(L); toErase.push_back(L); NumGVNLoad++; return true; @@ -1850,6 +1854,7 @@ L->replaceAllUsesWith(AvailableVal); if (DepLI->getType()->isPointerTy()) MD->invalidateCachedPointerInfo(DepLI); + VN.erase(L); toErase.push_back(L); NumGVNLoad++; return true; @@ -1860,6 +1865,7 @@ // intervening stores, for example. if (isa(DepInst) || isMalloc(DepInst)) { L->replaceAllUsesWith(UndefValue::get(L->getType())); + VN.erase(L); toErase.push_back(L); NumGVNLoad++; return true; @@ -1870,6 +1876,7 @@ if (IntrinsicInst* II = dyn_cast(DepInst)) { if (II->getIntrinsicID() == Intrinsic::lifetime_start) { L->replaceAllUsesWith(UndefValue::get(L->getType())); + VN.erase(L); toErase.push_back(L); NumGVNLoad++; return true; From johnny.chen at apple.com Mon Feb 22 15:50:40 2010 From: johnny.chen at apple.com (Johnny Chen) Date: Mon, 22 Feb 2010 21:50:40 -0000 Subject: [llvm-commits] [llvm] r96806 - /llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Message-ID: <20100222215041.067362A6C12F@llvm.org> Author: johnny Date: Mon Feb 22 15:50:40 2010 New Revision: 96806 URL: http://llvm.org/viewvc/llvm-project?rev=96806&view=rev Log: Added SEL, SXTB16, SXTAB16, UXTAB16, SMMULR, SMMLAR, SMMLSR, SMUAD, and SMUSD, for disassembly only. Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.td?rev=96806&r1=96805&r2=96806&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Mon Feb 22 15:50:40 2010 @@ -514,6 +514,22 @@ } } +multiclass AI_unary_rrot_np opcod, string opc> { + def r : AExtI, + Requires<[IsARM, HasV6]> { + let Inst{11-10} = 0b00; + let Inst{19-16} = 0b1111; + } + def r_rot : AExtI, + Requires<[IsARM, HasV6]> { + let Inst{19-16} = 0b1111; + } +} + /// AI_bin_rrot - A binary operation with two forms: one whose operand is a /// register and one whose operand is a register rotated by 8/16/24. multiclass AI_bin_rrot opcod, string opc, PatFrag opnode> { @@ -531,6 +547,21 @@ Requires<[IsARM, HasV6]>; } +// For disassembly only. +multiclass AI_bin_rrot_np opcod, string opc> { + def rr : AExtI, + Requires<[IsARM, HasV6]> { + let Inst{11-10} = 0b00; + } + def rr_rot : AExtI, + Requires<[IsARM, HasV6]>; +} + /// AI1_adde_sube_irs - Define instructions and patterns for adde and sube. let Uses = [CPSR] in { multiclass AI1_adde_sube_irs opcod, string opc, PatFrag opnode, @@ -644,6 +675,14 @@ let Inst{7-0} = 0b00000011; } +def SEL : AI<(outs GPR:$dst), (ins GPR:$a, GPR:$b), DPFrm, NoItinerary, "sel", + "\t$dst, $a, $b", + [/* For disassembly only; pattern left blank */]>, + Requires<[IsARM, HasV6]> { + let Inst{27-20} = 0b01101000; + let Inst{7-4} = 0b1011; +} + def SEV : AI<(outs), (ins), MiscFrm, NoItinerary, "sev", "", [/* For disassembly only; pattern left blank */]>, Requires<[IsARM, HasV6T2]> { @@ -1334,7 +1373,11 @@ defm SXTAH : AI_bin_rrot<0b01101011, "sxtah", BinOpFrag<(add node:$LHS, (sext_inreg node:$RHS,i16))>>; -// TODO: SXT(A){B|H}16 +// For disassembly only +defm SXTB16 : AI_unary_rrot_np<0b01101000, "sxtb16">; + +// For disassembly only +defm SXTAB16 : AI_bin_rrot_np<0b01101000, "sxtab16">; // Zero extenders @@ -1358,9 +1401,9 @@ } // This isn't safe in general, the add is two 16-bit units, not a 32-bit add. -//defm UXTAB16 : xxx<"uxtab16", 0xff00ff>; +// For disassembly only +defm UXTAB16 : AI_bin_rrot_np<0b01101100, "uxtab16">; -// TODO: UXT(A){B|H}16 def SBFX : I<(outs GPR:$dst), (ins GPR:$src, imm0_31:$lsb, imm0_31:$width), @@ -1710,6 +1753,14 @@ let Inst{15-12} = 0b1111; } +def SMMULR : AMul2I <0b0111010, (outs GPR:$dst), (ins GPR:$a, GPR:$b), + IIC_iMUL32, "smmulr", "\t$dst, $a, $b", + [/* For disassembly only; pattern left blank */]>, + Requires<[IsARM, HasV6]> { + let Inst{7-4} = 0b0011; // R = 1 + let Inst{15-12} = 0b1111; +} + def SMMLA : AMul2I <0b0111010, (outs GPR:$dst), (ins GPR:$a, GPR:$b, GPR:$c), IIC_iMAC32, "smmla", "\t$dst, $a, $b, $c", [(set GPR:$dst, (add (mulhs GPR:$a, GPR:$b), GPR:$c))]>, @@ -1717,6 +1768,12 @@ let Inst{7-4} = 0b0001; } +def SMMLAR : AMul2I <0b0111010, (outs GPR:$dst), (ins GPR:$a, GPR:$b, GPR:$c), + IIC_iMAC32, "smmlar", "\t$dst, $a, $b, $c", + [/* For disassembly only; pattern left blank */]>, + Requires<[IsARM, HasV6]> { + let Inst{7-4} = 0b0011; // R = 1 +} def SMMLS : AMul2I <0b0111010, (outs GPR:$dst), (ins GPR:$a, GPR:$b, GPR:$c), IIC_iMAC32, "smmls", "\t$dst, $a, $b, $c", @@ -1725,6 +1782,13 @@ let Inst{7-4} = 0b1101; } +def SMMLSR : AMul2I <0b0111010, (outs GPR:$dst), (ins GPR:$a, GPR:$b, GPR:$c), + IIC_iMAC32, "smmlsr", "\t$dst, $a, $b, $c", + [/* For disassembly only; pattern left blank */]>, + Requires<[IsARM, HasV6]> { + let Inst{7-4} = 0b1111; // R = 1 +} + multiclass AI_smul { def BB : AMulxyI<0b0001011, (outs GPR:$dst), (ins GPR:$a, GPR:$b), IIC_iMUL32, !strconcat(opc, "bb"), "\t$dst, $a, $b", @@ -1907,8 +1971,22 @@ defm SMLA : AI_smld<0, "smla">; defm SMLS : AI_smld<1, "smls">; -// TODO: Dual halfword multiple: SMUAD, SMUSD, SMLAD, SMLSD, SMLALD, SMLSLD -// Note: SMLAD, SMLSD, SMLALD, SMLSLD have been defined for disassembly only. +multiclass AI_sdml { + + def D : AMulDualI<0, sub, 0, (outs GPR:$dst), (ins GPR:$a, GPR:$b), + NoItinerary, !strconcat(opc, "d"), "\t$dst, $a, $b"> { + let Inst{15-12} = 0b1111; + } + + def DX : AMulDualI<0, sub, 1, (outs GPR:$dst), (ins GPR:$a, GPR:$b), + NoItinerary, !strconcat(opc, "dx"), "\t$dst, $a, $b"> { + let Inst{15-12} = 0b1111; + } + +} + +defm SMUA : AI_sdml<0, "smua">; +defm SMUS : AI_sdml<1, "smus">; //===----------------------------------------------------------------------===// // Misc. Arithmetic Instructions. From john at bass-software.com Mon Feb 22 15:56:45 2010 From: john at bass-software.com (John Tytgat) Date: Mon, 22 Feb 2010 22:56:45 +0100 Subject: [llvm-commits] Support for ARMv4 In-Reply-To: <74a934ea50.Jo@hobbes.bass-software.com> References: <698345e950.Jo@hobbes.bass-software.com> <30e333ea50.Jo@hobbes.bass-software.com> <74a934ea50.Jo@hobbes.bass-software.com> Message-ID: <887bc4ed50.Jo@hobbes.bass-software.com> Ping ? After r96360 I had to update the llvm-armv4.patch, so updated version included (as well llvm-gcc-armv4.patch). John. In message <74a934ea50.Jo at hobbes.bass-software.com> John Tytgat wrote: > In message <30e333ea50.Jo at hobbes.bass-software.com> > John Tytgat wrote: > > > In message > > Anton Korobeynikov wrote: > > > > > Hello, John > > > > > > > No regressions for 'make TESTSUITE=CodeGen/ARM check'. > > > This is pretty expected and necessary thing, but not sufficient. > > > > > > Could you please compile llvm-gcc as a cross-compiler for ARMv4? Even > > > better, with newlib compiled at the same time. This will ensure that > > > the v4 support is indeed real. > > > > Sure, and thanks for this useful suggestion. It allowed me to finetune > > a couple of things ;-) Attached two patches, one for llvm and one for > > llvm-gcc: > > > > llvm-armv4.patch: > > [...] > > - test/CodeGen/ARM/armv4.ll: Added test case. > > > > llvm-gcc-armv4.patch: > > Apologies, I just see the armv4.ll testcase wasn't included. Attached > the two patches again with that fixed. > > John. -- John Tytgat BASS John at bass-software.com ARM powered, RISC OS driven -------------- next part -------------- Index: test/CodeGen/ARM/armv4.ll =================================================================== --- test/CodeGen/ARM/armv4.ll (revision 0) +++ test/CodeGen/ARM/armv4.ll (revision 0) @@ -0,0 +1,13 @@ +; RUN: llc < %s -mtriple=arm-unknown-eabi | FileCheck %s -check-prefix=THUMB +; RUN: llc < %s -mtriple=arm-unknown-eabi -mcpu=strongarm | FileCheck %s -check-prefix=ARM +; RUN: llc < %s -mtriple=arm-unknown-eabi -mcpu=cortex-a8 | FileCheck %s -check-prefix=THUMB +; RUN: llc < %s -mtriple=arm-unknown-eabi -mattr=+v6 | FileCheck %s -check-prefix=THUMB +; RUN: llc < %s -mtriple=armv4-unknown-eabi | FileCheck %s -check-prefix=ARM +; RUN: llc < %s -mtriple=armv4t-unknown-eabi | FileCheck %s -check-prefix=THUMB + +define arm_aapcscc i32 @test(i32 %a) nounwind readnone { +entry: +; ARM: mov pc +; THUMB: bx + ret i32 %a +} Index: lib/Target/ARM/ARMSubtarget.cpp =================================================================== --- lib/Target/ARM/ARMSubtarget.cpp (revision 96766) +++ lib/Target/ARM/ARMSubtarget.cpp (working copy) @@ -33,7 +33,7 @@ ARMSubtarget::ARMSubtarget(const std::string &TT, const std::string &FS, bool isT) - : ARMArchVersion(V4T) + : ARMArchVersion(V4) , ARMFPUType(None) , UseNEONForSinglePrecisionFP(UseNEONFP) , IsThumb(isT) @@ -54,6 +54,11 @@ // Parse features string. CPUString = ParseSubtargetFeatures(FS, CPUString); + // When no arch is specified either by CPU or by attributes, make the default + // ARMv4T. + if (CPUString == "generic" && (FS.empty() || FS == "generic")) + ARMArchVersion = V4T; + // Set the boolean corresponding to the current target triple, or the default // if one cannot be determined, to true. unsigned Len = TT.length(); @@ -68,25 +73,28 @@ } if (Idx) { unsigned SubVer = TT[Idx]; - if (SubVer > '4' && SubVer <= '9') { - if (SubVer >= '7') { - ARMArchVersion = V7A; - } else if (SubVer == '6') { - ARMArchVersion = V6; - if (Len >= Idx+3 && TT[Idx+1] == 't' && TT[Idx+2] == '2') - ARMArchVersion = V6T2; - } else if (SubVer == '5') { - ARMArchVersion = V5T; - if (Len >= Idx+3 && TT[Idx+1] == 't' && TT[Idx+2] == 'e') - ARMArchVersion = V5TE; - } - if (ARMArchVersion >= V6T2) - ThumbMode = Thumb2; + if (SubVer >= '7' && SubVer <= '9') { + ARMArchVersion = V7A; + } else if (SubVer == '6') { + ARMArchVersion = V6; + if (Len >= Idx+3 && TT[Idx+1] == 't' && TT[Idx+2] == '2') + ARMArchVersion = V6T2; + } else if (SubVer == '5') { + ARMArchVersion = V5T; + if (Len >= Idx+3 && TT[Idx+1] == 't' && TT[Idx+2] == 'e') + ARMArchVersion = V5TE; + } else if (SubVer == '4') { + if (Len >= Idx+2 && TT[Idx+1] == 't') + ARMArchVersion = V4T; + else + ARMArchVersion = V4; } } // Thumb2 implies at least V6T2. - if (ARMArchVersion < V6T2 && ThumbMode >= Thumb2) + if (ARMArchVersion >= V6T2) + ThumbMode = Thumb2; + else if (ThumbMode >= Thumb2) ARMArchVersion = V6T2; if (Len >= 10) { Index: lib/Target/ARM/ARMInstrInfo.td =================================================================== --- lib/Target/ARM/ARMInstrInfo.td (revision 96766) +++ lib/Target/ARM/ARMInstrInfo.td (working copy) @@ -113,6 +113,8 @@ //===----------------------------------------------------------------------===// // ARM Instruction Predicate Definitions. // +def HasV4T : Predicate<"Subtarget->hasV4TOps()">; +def NoV4T : Predicate<"!Subtarget->hasV4TOps()">; def HasV5T : Predicate<"Subtarget->hasV5TOps()">; def HasV5TE : Predicate<"Subtarget->hasV5TEOps()">; def HasV6 : Predicate<"Subtarget->hasV6Ops()">; @@ -809,24 +811,50 @@ // Control Flow Instructions. // -let isReturn = 1, isTerminator = 1, isBarrier = 1 in +let isReturn = 1, isTerminator = 1, isBarrier = 1 in { + // ARMV4T and above def BX_RET : AI<(outs), (ins), BrMiscFrm, IIC_Br, - "bx", "\tlr", [(ARMretflag)]> { - let Inst{3-0} = 0b1110; - let Inst{7-4} = 0b0001; - let Inst{19-8} = 0b111111111111; - let Inst{27-20} = 0b00010010; + "bx", "\tlr", [(ARMretflag)]>, + Requires<[IsARM, HasV4T]> { + let Inst{3-0} = 0b1110; + let Inst{7-4} = 0b0001; + let Inst{19-8} = 0b111111111111; + let Inst{27-20} = 0b00010010; + } + + // ARMV4 only + def MOVPCLR : AI<(outs), (ins), BrMiscFrm, IIC_Br, + "mov", "\tpc, lr", [(ARMretflag)]>, + Requires<[IsARM, NoV4T]> { + let Inst{11-0} = 0b000000001110; + let Inst{15-12} = 0b1111; + let Inst{19-16} = 0b0000; + let Inst{27-20} = 0b00011010; + } } // Indirect branches let isBranch = 1, isTerminator = 1, isBarrier = 1, isIndirectBranch = 1 in { + // ARMV4T and above def BRIND : AXI<(outs), (ins GPR:$dst), BrMiscFrm, IIC_Br, "bx\t$dst", - [(brind GPR:$dst)]> { + [(brind GPR:$dst)]>, + Requires<[IsARM, HasV4T]> { let Inst{7-4} = 0b0001; let Inst{19-8} = 0b111111111111; let Inst{27-20} = 0b00010010; let Inst{31-28} = 0b1110; } + + // ARMV4 only + def MOVPCRX : AXI<(outs), (ins GPR:$dst), BrMiscFrm, IIC_Br, "mov\tpc, $dst", + [(brind GPR:$dst)]>, + Requires<[IsARM, NoV4T]> { + let Inst{11-4} = 0b00000000; + let Inst{15-12} = 0b1111; + let Inst{19-16} = 0b0000; + let Inst{27-20} = 0b00011010; + let Inst{31-28} = 0b1110; + } } // FIXME: remove when we have a way to marking a MI with these properties. @@ -871,11 +899,22 @@ def BX : ABXIx2<(outs), (ins tGPR:$func, variable_ops), IIC_Br, "mov\tlr, pc\n\tbx\t$func", [(ARMcall_nolink tGPR:$func)]>, - Requires<[IsARM, IsNotDarwin]> { + Requires<[IsARM, HasV4T, IsNotDarwin]> { let Inst{7-4} = 0b0001; let Inst{19-8} = 0b111111111111; let Inst{27-20} = 0b00010010; } + + // ARMv4 + def BMOVPCRX : ABXIx2<(outs), (ins tGPR:$func, variable_ops), + IIC_Br, "mov\tlr, pc\n\tmov\tpc, $func", + [(ARMcall_nolink tGPR:$func)]>, + Requires<[IsARM, NoV4T, IsNotDarwin]> { + let Inst{11-4} = 0b00000000; + let Inst{15-12} = 0b1111; + let Inst{19-16} = 0b0000; + let Inst{27-20} = 0b00011010; + } } // On Darwin R9 is call-clobbered. @@ -908,11 +947,23 @@ // Note: Restrict $func to the tGPR regclass to prevent it being in LR. def BXr9 : ABXIx2<(outs), (ins tGPR:$func, variable_ops), IIC_Br, "mov\tlr, pc\n\tbx\t$func", - [(ARMcall_nolink tGPR:$func)]>, Requires<[IsARM, IsDarwin]> { + [(ARMcall_nolink tGPR:$func)]>, + Requires<[IsARM, HasV4T, IsDarwin]> { let Inst{7-4} = 0b0001; let Inst{19-8} = 0b111111111111; let Inst{27-20} = 0b00010010; } + + // ARMv4 + def BMOVPCRXr9 : ABXIx2<(outs), (ins tGPR:$func, variable_ops), + IIC_Br, "mov\tlr, pc\n\tmov\tpc, $func", + [(ARMcall_nolink tGPR:$func)]>, + Requires<[IsARM, NoV4T, IsDarwin]> { + let Inst{11-4} = 0b00000000; + let Inst{15-12} = 0b1111; + let Inst{19-16} = 0b0000; + let Inst{27-20} = 0b00011010; + } } let isBranch = 1, isTerminator = 1 in { Index: lib/Target/ARM/ARMCodeEmitter.cpp =================================================================== --- lib/Target/ARM/ARMCodeEmitter.cpp (revision 96766) +++ lib/Target/ARM/ARMCodeEmitter.cpp (working copy) @@ -1138,7 +1138,7 @@ // Set the conditional execution predicate Binary |= II->getPredicate(&MI) << ARMII::CondShift; - if (TID.Opcode == ARM::BX_RET) + if (TID.Opcode == (Subtarget->hasV4TOps() ? ARM::BX_RET : ARM::MOVPCLR)) // The return register is LR. Binary |= ARMRegisterInfo::getRegisterNumbering(ARM::LR); else Index: lib/Target/ARM/ARMSubtarget.h =================================================================== --- lib/Target/ARM/ARMSubtarget.h (revision 96766) +++ lib/Target/ARM/ARMSubtarget.h (working copy) @@ -26,7 +26,7 @@ class ARMSubtarget : public TargetSubtarget { protected: enum ARMArchEnum { - V4T, V5T, V5TE, V6, V6T2, V7A + V4, V4T, V5T, V5TE, V6, V6T2, V7A }; enum ARMFPEnum { @@ -38,7 +38,7 @@ Thumb2 }; - /// ARMArchVersion - ARM architecture version: V4T (base), V5T, V5TE, + /// ARMArchVersion - ARM architecture version: V4, V4T (base), V5T, V5TE, /// V6, V6T2, V7A. ARMArchEnum ARMArchVersion; Index: lib/Target/ARM/ARMBaseInstrInfo.h =================================================================== --- lib/Target/ARM/ARMBaseInstrInfo.h (revision 96766) +++ lib/Target/ARM/ARMBaseInstrInfo.h (working copy) @@ -332,7 +332,7 @@ static inline bool isIndirectBranchOpcode(int Opc) { - return Opc == ARM::BRIND || Opc == ARM::tBRIND; + return Opc == ARM::BRIND || Opc == ARM::MOVPCRX || Opc == ARM::tBRIND; } /// getInstrPredicate - If instruction is predicated, returns its predicate -------------- next part -------------- Index: gcc/config/arm/arm.h =================================================================== --- gcc/config/arm/arm.h (revision 96176) +++ gcc/config/arm/arm.h (working copy) @@ -3519,7 +3519,9 @@ : (arm_arch5 \ ? "armv5" \ : (arm_arch4t \ - ? "armv4t" : ""))))))) + ? "armv4t" \ + : (arm_arch4 \ + ? "armv4" : "")))))))) #define LLVM_SET_MACHINE_OPTIONS(argvec) \ if (TARGET_SOFT_FLOAT) \ Index: gcc/config/arm/libunwind.S =================================================================== --- gcc/config/arm/libunwind.S (revision 96176) +++ gcc/config/arm/libunwind.S (working copy) @@ -167,21 +167,37 @@ RET ARM_FUNC_START gnu_Unwind_Restore_WMMXC +#if __ARM_ARCH__ > 4 /* Use the generic coprocessor form so that gas doesn't complain on non-iWMMXt targets. */ ldc2 p1, cr8, [r0], #4 /* wldrw wcgr0, [r0], #4 */ ldc2 p1, cr9, [r0], #4 /* wldrw wcgr1, [r0], #4 */ ldc2 p1, cr10, [r0], #4 /* wldrw wcgr2, [r0], #4 */ ldc2 p1, cr11, [r0], #4 /* wldrw wcgr3, [r0], #4 */ +#else + /* ldc2 is not valid pre-ARMv5 */ + .word 0xfcb08101 + .word 0xfcb09101 + .word 0xfcb0a101 + .word 0xfcb0b101 +#endif RET ARM_FUNC_START gnu_Unwind_Save_WMMXC +#if __ARM_ARCH__ > 4 /* Use the generic coprocessor form so that gas doesn't complain on non-iWMMXt targets. */ stc2 p1, cr8, [r0], #4 /* wstrw wcgr0, [r0], #4 */ stc2 p1, cr9, [r0], #4 /* wstrw wcgr1, [r0], #4 */ stc2 p1, cr10, [r0], #4 /* wstrw wcgr2, [r0], #4 */ stc2 p1, cr11, [r0], #4 /* wstrw wcgr3, [r0], #4 */ +#else + /* stc2 is not valid pre-ARMv5 */ + .word 0xfca08101 + .word 0xfca09101 + .word 0xfca0a101 + .word 0xfca0b101 +#endif RET /* APPLE LOCAL end v7 support. Merge from Codesourcery */ From gohman at apple.com Mon Feb 22 16:05:18 2010 From: gohman at apple.com (Dan Gohman) Date: Mon, 22 Feb 2010 22:05:18 -0000 Subject: [llvm-commits] [llvm] r96807 - /llvm/trunk/lib/VMCore/ConstantFold.cpp Message-ID: <20100222220518.48B322A6C12E@llvm.org> Author: djg Date: Mon Feb 22 16:05:18 2010 New Revision: 96807 URL: http://llvm.org/viewvc/llvm-project?rev=96807&view=rev Log: Use Instruction::isCommutative instead of duplicating it. Modified: llvm/trunk/lib/VMCore/ConstantFold.cpp Modified: llvm/trunk/lib/VMCore/ConstantFold.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ConstantFold.cpp?rev=96807&r1=96806&r2=96807&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/ConstantFold.cpp (original) +++ llvm/trunk/lib/VMCore/ConstantFold.cpp Mon Feb 22 16:05:18 2010 @@ -1364,31 +1364,8 @@ } else if (isa(C2)) { // If C2 is a constant expr and C1 isn't, flop them around and fold the // other way if possible. - switch (Opcode) { - case Instruction::Add: - case Instruction::FAdd: - case Instruction::Mul: - case Instruction::FMul: - case Instruction::And: - case Instruction::Or: - case Instruction::Xor: - // No change of opcode required. + if (Instruction::isCommutative(Opcode)) return ConstantFoldBinaryInstruction(Opcode, C2, C1); - - case Instruction::Shl: - case Instruction::LShr: - case Instruction::AShr: - case Instruction::Sub: - case Instruction::FSub: - case Instruction::SDiv: - case Instruction::UDiv: - case Instruction::FDiv: - case Instruction::URem: - case Instruction::SRem: - case Instruction::FRem: - default: // These instructions cannot be flopped around. - break; - } } // i1 can be simplified in many cases. From gohman at apple.com Mon Feb 22 16:07:27 2010 From: gohman at apple.com (Dan Gohman) Date: Mon, 22 Feb 2010 22:07:27 -0000 Subject: [llvm-commits] [llvm] r96808 - /llvm/trunk/lib/Analysis/ConstantFolding.cpp Message-ID: <20100222220727.3660D2A6C12E@llvm.org> Author: djg Date: Mon Feb 22 16:07:27 2010 New Revision: 96808 URL: http://llvm.org/viewvc/llvm-project?rev=96808&view=rev Log: Minor formatting cleanup. Modified: llvm/trunk/lib/Analysis/ConstantFolding.cpp Modified: llvm/trunk/lib/Analysis/ConstantFolding.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ConstantFolding.cpp?rev=96808&r1=96807&r2=96808&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ConstantFolding.cpp (original) +++ llvm/trunk/lib/Analysis/ConstantFolding.cpp Mon Feb 22 16:07:27 2010 @@ -814,8 +814,7 @@ Constant::getNullValue(CE->getType()), ConstantInt::get(ElTy->getContext(), ElemIdx) }; - return - ConstantExpr::getGetElementPtr(GV, &Index[0], 2); + return ConstantExpr::getGetElementPtr(GV, &Index[0], 2); } } } From daniel at zuster.org Mon Feb 22 16:08:57 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Mon, 22 Feb 2010 22:08:57 -0000 Subject: [llvm-commits] [llvm] r96809 - /llvm/trunk/lib/MC/MCMachOStreamer.cpp Message-ID: <20100222220857.760272A6C12E@llvm.org> Author: ddunbar Date: Mon Feb 22 16:08:57 2010 New Revision: 96809 URL: http://llvm.org/viewvc/llvm-project?rev=96809&view=rev Log: MC/Mach-O: Remove non-sensical comment, and add a missing AddValueSymbols call. Modified: llvm/trunk/lib/MC/MCMachOStreamer.cpp Modified: llvm/trunk/lib/MC/MCMachOStreamer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCMachOStreamer.cpp?rev=96809&r1=96808&r2=96809&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCMachOStreamer.cpp (original) +++ llvm/trunk/lib/MC/MCMachOStreamer.cpp Mon Feb 22 16:08:57 2010 @@ -333,15 +333,13 @@ void MCMachOStreamer::EmitValue(const MCExpr *Value, unsigned Size, unsigned AddrSpace) { - // Assume the front-end will have evaluate things absolute expressions, so - // just create data + fixup. MCDataFragment *DF = dyn_cast_or_null(getCurrentFragment()); if (!DF) DF = new MCDataFragment(CurSectionData); // Avoid fixups when possible. int64_t AbsValue; - if (Value->EvaluateAsAbsolute(AbsValue)) { + if (AddValueSymbols(Value)->EvaluateAsAbsolute(AbsValue)) { // FIXME: Endianness assumption. for (unsigned i = 0; i != Size; ++i) DF->getContents().push_back(uint8_t(AbsValue >> (i * 8))); From sabre at nondot.org Mon Feb 22 16:14:47 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 22 Feb 2010 22:14:47 -0000 Subject: [llvm-commits] [llvm] r96810 - in /llvm/trunk/lib/Target/PIC16: PIC16ISelDAGToDAG.cpp PIC16ISelDAGToDAG.h Message-ID: <20100222221447.503742A6C12E@llvm.org> Author: lattner Date: Mon Feb 22 16:14:47 2010 New Revision: 96810 URL: http://llvm.org/viewvc/llvm-project?rev=96810&view=rev Log: move #includes earlier. Modified: llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.h Modified: llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp?rev=96810&r1=96809&r2=96810&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp Mon Feb 22 16:14:47 2010 @@ -15,9 +15,8 @@ #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" -#include "PIC16ISelDAGToDAG.h" #include "llvm/Support/Debug.h" - +#include "PIC16ISelDAGToDAG.h" using namespace llvm; /// createPIC16ISelDag - This pass converts a legalized DAG into a Modified: llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.h?rev=96810&r1=96809&r2=96810&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.h (original) +++ llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.h Mon Feb 22 16:14:47 2010 @@ -19,6 +19,8 @@ #include "PIC16TargetMachine.h" #include "llvm/CodeGen/SelectionDAGISel.h" #include "llvm/Support/Compiler.h" +#include "llvm/Support/raw_ostream.h" +#include "llvm/Support/Debug.h" #include "llvm/Intrinsics.h" using namespace llvm; From sabre at nondot.org Mon Feb 22 16:15:05 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 22 Feb 2010 22:15:05 -0000 Subject: [llvm-commits] [llvm] r96811 - /llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp Message-ID: <20100222221505.32C5F2A6C12E@llvm.org> Author: lattner Date: Mon Feb 22 16:15:05 2010 New Revision: 96811 URL: http://llvm.org/viewvc/llvm-project?rev=96811&view=rev Log: remove dupes now. Modified: llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp Modified: llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp?rev=96811&r1=96810&r2=96811&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp Mon Feb 22 16:15:05 2010 @@ -14,8 +14,6 @@ #define DEBUG_TYPE "pic16-isel" #include "llvm/Support/ErrorHandling.h" -#include "llvm/Support/raw_ostream.h" -#include "llvm/Support/Debug.h" #include "PIC16ISelDAGToDAG.h" using namespace llvm; From sabre at nondot.org Mon Feb 22 16:15:39 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 22 Feb 2010 22:15:39 -0000 Subject: [llvm-commits] [llvm] r96812 - /llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Message-ID: <20100222221539.79D882A6C12E@llvm.org> Author: lattner Date: Mon Feb 22 16:15:39 2010 New Revision: 96812 URL: http://llvm.org/viewvc/llvm-project?rev=96812&view=rev Log: add some debug hooks for tracking the behavior of the isel. Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h?rev=96812&r1=96811&r2=96812&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h (original) +++ llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Mon Feb 22 16:15:39 2010 @@ -336,6 +336,10 @@ // update the chain results when the pattern is complete. SmallVector ChainNodesMatched; + DEBUG(errs() << "ISEL: Starting pattern match on root node: "; + NodeToMatch->dump(CurDAG); + errs() << '\n'); + // Interpreter starts at opcode #0. unsigned MatcherIndex = 0; while (1) { @@ -722,6 +726,8 @@ std::copy(MatchedMemRefs.begin(), MatchedMemRefs.end(), MemRefs); Res->setMemRefs(MemRefs, MemRefs + MatchedMemRefs.size()); } + + DEBUG(errs() << " Created node: "; Res->dump(CurDAG); errs() << "\n"); continue; } @@ -777,6 +783,9 @@ assert(NodeToMatch->use_empty() && "Didn't replace all uses of the node?"); + + DEBUG(errs() << "ISEL: Match complete!\n"); + // FIXME: We just return here, which interacts correctly with SelectRoot // above. We should fix this to not return an SDNode* anymore. return 0; @@ -794,6 +803,9 @@ RecordedNodes.resize(LastScope.NumRecordedNodes); NodeStack.resize(LastScope.NodeStackSize); N = NodeStack.back(); + + DEBUG(errs() << " Match failed at index " << MatcherIndex + << " continuing at " << LastScope.FailIndex << "\n"); if (LastScope.NumMatchedMemRefs != MatchedMemRefs.size()) MatchedMemRefs.resize(LastScope.NumMatchedMemRefs); From sabre at nondot.org Mon Feb 22 16:18:06 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 22 Feb 2010 22:18:06 -0000 Subject: [llvm-commits] [llvm] r96813 - /llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Message-ID: <20100222221806.0CA032A6C12E@llvm.org> Author: lattner Date: Mon Feb 22 16:18:05 2010 New Revision: 96813 URL: http://llvm.org/viewvc/llvm-project?rev=96813&view=rev Log: When matching patterns that have a complex pattern as their root, make sure to only run the complex pattern on nodes where the target opts in. This patch only handles targets with one opcode specified so far, but fixes 16 failures, only 34 left. Modified: llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Modified: llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp?rev=96813&r1=96812&r2=96813&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Mon Feb 22 16:18:05 2010 @@ -239,9 +239,24 @@ errs() << "We expect complex pattern uses to have names: " << *N << "\n"; exit(1); } - + // Handle complex pattern. const ComplexPattern &CP = CGP.getComplexPattern(LeafRec); + + // If we're at the root of the pattern, we have to check that the opcode + // is a one of the ones requested to be matched. + if (N == Pattern.getSrcPattern()) { + const std::vector &OpNodes = CP.getRootNodes(); + if (OpNodes.size() == 1) { + StringRef OpName = CGP.getSDNodeInfo(OpNodes[0]).getEnumName(); + AddMatcherNode(new CheckOpcodeMatcherNode(OpName)); + } else if (!OpNodes.empty()) { + for (unsigned j = 0, e = OpNodes.size(); j != e; j++) { + // .getOpcodeName(OpNodes[j], CGP) + } + } + } + AddMatcherNode(new CheckComplexPatMatcherNode(CP)); // If the complex pattern has a chain, then we need to keep track of the From sabre at nondot.org Mon Feb 22 16:30:38 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 22 Feb 2010 22:30:38 -0000 Subject: [llvm-commits] [llvm] r96814 - in /llvm/trunk: include/llvm/CodeGen/DAGISelHeader.h utils/TableGen/DAGISelMatcher.cpp utils/TableGen/DAGISelMatcher.h utils/TableGen/DAGISelMatcherEmitter.cpp utils/TableGen/DAGISelMatcherGen.cpp Message-ID: <20100222223038.18A7D2A6C12E@llvm.org> Author: lattner Date: Mon Feb 22 16:30:37 2010 New Revision: 96814 URL: http://llvm.org/viewvc/llvm-project?rev=96814&view=rev Log: add a new CheckMultiOpcode opcode for checking that a node has one of the list of acceptable opcodes for a complex pattern. This fixes 4 regtest failures. Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h llvm/trunk/utils/TableGen/DAGISelMatcher.cpp llvm/trunk/utils/TableGen/DAGISelMatcher.h llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h?rev=96814&r1=96813&r2=96814&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h (original) +++ llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Mon Feb 22 16:30:37 2010 @@ -211,6 +211,7 @@ OPC_CheckPatternPredicate, OPC_CheckPredicate, OPC_CheckOpcode, + OPC_CheckMultiOpcode, OPC_CheckType, OPC_CheckInteger1, OPC_CheckInteger2, OPC_CheckInteger4, OPC_CheckInteger8, OPC_CheckCondCode, @@ -410,6 +411,16 @@ case OPC_CheckOpcode: if (N->getOpcode() != MatcherTable[MatcherIndex++]) break; continue; + + case OPC_CheckMultiOpcode: { + unsigned NumOps = MatcherTable[MatcherIndex++]; + bool OpcodeEquals = false; + for (unsigned i = 0; i != NumOps; ++i) + OpcodeEquals |= N->getOpcode() == MatcherTable[MatcherIndex++]; + if (!OpcodeEquals) break; + continue; + } + case OPC_CheckType: { MVT::SimpleValueType VT = (MVT::SimpleValueType)MatcherTable[MatcherIndex++]; Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.cpp?rev=96814&r1=96813&r2=96814&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcher.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcher.cpp Mon Feb 22 16:30:37 2010 @@ -76,6 +76,11 @@ printNext(OS, indent); } +void CheckMultiOpcodeMatcherNode::print(raw_ostream &OS, unsigned indent) const { + OS.indent(indent) << "CheckMultiOpcode \n"; + printNext(OS, indent); +} + void CheckTypeMatcherNode::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckType " << getEnumName(Type) << '\n'; printNext(OS, indent); Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.h?rev=96814&r1=96813&r2=96814&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcher.h (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcher.h Mon Feb 22 16:30:37 2010 @@ -51,6 +51,7 @@ CheckPatternPredicate, CheckPredicate, // Fail if node predicate fails. CheckOpcode, // Fail if not opcode. + CheckMultiOpcode, // Fail if not in opcode list. CheckType, // Fail if not correct type. CheckInteger, // Fail if wrong val. CheckCondCode, // Fail if not condcode. @@ -262,6 +263,26 @@ virtual void print(raw_ostream &OS, unsigned indent = 0) const; }; +/// CheckMultiOpcodeMatcherNode - This checks to see if the current node has one +/// of the specified opcode, if not it fails to match. +class CheckMultiOpcodeMatcherNode : public MatcherNode { + SmallVector OpcodeNames; +public: + CheckMultiOpcodeMatcherNode(const StringRef *opcodes, unsigned numops) + : MatcherNode(CheckMultiOpcode), OpcodeNames(opcodes, opcodes+numops) {} + + unsigned getNumOpcodeNames() const { return OpcodeNames.size(); } + StringRef getOpcodeName(unsigned i) const { return OpcodeNames[i]; } + + static inline bool classof(const MatcherNode *N) { + return N->getKind() == CheckMultiOpcode; + } + + virtual void print(raw_ostream &OS, unsigned indent = 0) const; +}; + + + /// CheckTypeMatcherNode - This checks to see if the current node has the /// specified type, if not it fails to match. class CheckTypeMatcherNode : public MatcherNode { Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp?rev=96814&r1=96813&r2=96814&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Mon Feb 22 16:30:37 2010 @@ -181,6 +181,15 @@ << cast(N)->getOpcodeName() << ",\n"; return 2; + case MatcherNode::CheckMultiOpcode: { + const CheckMultiOpcodeMatcherNode *CMO=cast(N); + OS << "OPC_CheckMultiOpcode, " << CMO->getNumOpcodeNames() << ", "; + for (unsigned i = 0, e = CMO->getNumOpcodeNames(); i != e; ++i) + OS << CMO->getOpcodeName(i) << ", "; + OS << '\n'; + return 2 + CMO->getNumOpcodeNames(); + } + case MatcherNode::CheckType: OS << "OPC_CheckType, " << getEnumName(cast(N)->getType()) << ",\n"; Modified: llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp?rev=96814&r1=96813&r2=96814&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Mon Feb 22 16:30:37 2010 @@ -251,9 +251,11 @@ StringRef OpName = CGP.getSDNodeInfo(OpNodes[0]).getEnumName(); AddMatcherNode(new CheckOpcodeMatcherNode(OpName)); } else if (!OpNodes.empty()) { - for (unsigned j = 0, e = OpNodes.size(); j != e; j++) { - // .getOpcodeName(OpNodes[j], CGP) - } + SmallVector OpNames; + for (unsigned i = 0, e = OpNodes.size(); i != e; i++) + OpNames.push_back(CGP.getSDNodeInfo(OpNodes[i]).getEnumName()); + AddMatcherNode(new CheckMultiOpcodeMatcherNode(OpNames.data(), + OpNames.size())); } } From sabre at nondot.org Mon Feb 22 16:37:11 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 22 Feb 2010 22:37:11 -0000 Subject: [llvm-commits] [llvm] r96815 - /llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Message-ID: <20100222223711.5AD2D2A6C12E@llvm.org> Author: lattner Date: Mon Feb 22 16:37:11 2010 New Revision: 96815 URL: http://llvm.org/viewvc/llvm-project?rev=96815&view=rev Log: expand my hack to work with nodes that have flags but no chains and the isel doesn't know the correct # results. This fixes 8 codegen tests, down to 22 failures. Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h?rev=96815&r1=96814&r2=96815&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h (original) +++ llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Mon Feb 22 16:37:11 2010 @@ -758,7 +758,8 @@ // allow us to stop encoding #results in OPC_CompleteMatch's table // entry. if (NodeToMatch->getNumValues() <= i || - NodeToMatch->getValueType(i) == MVT::Other) + NodeToMatch->getValueType(i) == MVT::Other || + NodeToMatch->getValueType(i) == MVT::Flag) break; assert((NodeToMatch->getValueType(i) == Res.getValueType() || NodeToMatch->getValueType(i) == MVT::iPTR || From gohman at apple.com Mon Feb 22 16:43:24 2010 From: gohman at apple.com (Dan Gohman) Date: Mon, 22 Feb 2010 22:43:24 -0000 Subject: [llvm-commits] [llvm] r96816 - in /llvm/trunk: lib/Analysis/ConstantFolding.cpp lib/VMCore/ConstantFold.cpp test/CodeGen/X86/ptrtoint-constexpr.ll Message-ID: <20100222224324.2EBFA2A6C12E@llvm.org> Author: djg Date: Mon Feb 22 16:43:23 2010 New Revision: 96816 URL: http://llvm.org/viewvc/llvm-project?rev=96816&view=rev Log: Canonicalize ConstantInts to the right operand of commutative operators. The test difference is just due to the multiplication operands being commuted (and thus requiring a more elaborate match). In optimized code, that expression would be folded. Modified: llvm/trunk/lib/Analysis/ConstantFolding.cpp llvm/trunk/lib/VMCore/ConstantFold.cpp llvm/trunk/test/CodeGen/X86/ptrtoint-constexpr.ll Modified: llvm/trunk/lib/Analysis/ConstantFolding.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ConstantFolding.cpp?rev=96816&r1=96815&r2=96816&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ConstantFolding.cpp (original) +++ llvm/trunk/lib/Analysis/ConstantFolding.cpp Mon Feb 22 16:43:23 2010 @@ -794,8 +794,8 @@ // it is casted back to a pointer, see if the expression can be // converted into a GEP. if (CE->getOpcode() == Instruction::Add) - if (ConstantInt *L = dyn_cast(CE->getOperand(0))) - if (ConstantExpr *R = dyn_cast(CE->getOperand(1))) + if (ConstantInt *L = dyn_cast(CE->getOperand(1))) + if (ConstantExpr *R = dyn_cast(CE->getOperand(0))) if (R->getOpcode() == Instruction::PtrToInt) if (GlobalVariable *GV = dyn_cast(R->getOperand(0))) { Modified: llvm/trunk/lib/VMCore/ConstantFold.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ConstantFold.cpp?rev=96816&r1=96815&r2=96816&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/ConstantFold.cpp (original) +++ llvm/trunk/lib/VMCore/ConstantFold.cpp Mon Feb 22 16:43:23 2010 @@ -1105,6 +1105,10 @@ return ConstantExpr::getLShr(C1, C2); break; } + } else if (isa(C1)) { + // If C1 is a ConstantInt and C2 is not, swap the operands. + if (Instruction::isCommutative(Opcode)) + return ConstantExpr::get(Opcode, C2, C1); } // At this point we know neither constant is an UndefValue. Modified: llvm/trunk/test/CodeGen/X86/ptrtoint-constexpr.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/ptrtoint-constexpr.ll?rev=96816&r1=96815&r2=96816&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/ptrtoint-constexpr.ll (original) +++ llvm/trunk/test/CodeGen/X86/ptrtoint-constexpr.ll Mon Feb 22 16:43:23 2010 @@ -9,6 +9,6 @@ ; CHECK: .globl x ; CHECK: x: -; CHECK: .quad 3 +; CHECK: .quad ((0+1)&4294967295)*3 @x = global i64 mul (i64 3, i64 ptrtoint (i2* getelementptr (i2* null, i64 1) to i64)) From grosbach at apple.com Mon Feb 22 16:47:47 2010 From: grosbach at apple.com (Jim Grosbach) Date: Mon, 22 Feb 2010 22:47:47 -0000 Subject: [llvm-commits] [llvm] r96817 - /llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp Message-ID: <20100222224747.282E62A6C12F@llvm.org> Author: grosbach Date: Mon Feb 22 16:47:46 2010 New Revision: 96817 URL: http://llvm.org/viewvc/llvm-project?rev=96817&view=rev Log: The predicate index isn't fixed, so scan for it to make sure we get the proper value. Thumb2 uses the tADJCALLSTACK* instructions, and doesn't need t2 versions, so remove the FIXME entry. Modified: llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp Modified: llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp?rev=96817&r1=96816&r2=96817&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp Mon Feb 22 16:47:46 2010 @@ -1124,8 +1124,9 @@ // Replace the pseudo instruction with a new instruction... unsigned Opc = Old->getOpcode(); - ARMCC::CondCodes Pred = (ARMCC::CondCodes)Old->getOperand(1).getImm(); - // FIXME: Thumb2 version of ADJCALLSTACKUP and ADJCALLSTACKDOWN? + int PIdx = Old->findFirstPredOperandIdx(); + ARMCC::CondCodes Pred = (PIdx == -1) + ? ARMCC::AL : (ARMCC::CondCodes)Old->getOperand(PIdx).getImm(); if (Opc == ARM::ADJCALLSTACKDOWN || Opc == ARM::tADJCALLSTACKDOWN) { // Note: PredReg is operand 2 for ADJCALLSTACKDOWN. unsigned PredReg = Old->getOperand(2).getReg(); From grosbach at apple.com Mon Feb 22 16:54:55 2010 From: grosbach at apple.com (Jim Grosbach) Date: Mon, 22 Feb 2010 22:54:55 -0000 Subject: [llvm-commits] [llvm] r96818 - /llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp Message-ID: <20100222225456.020A82A6C12F@llvm.org> Author: grosbach Date: Mon Feb 22 16:54:55 2010 New Revision: 96818 URL: http://llvm.org/viewvc/llvm-project?rev=96818&view=rev Log: Clean up a bit and fix for when SPAdj != 0 Modified: llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp Modified: llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp?rev=96818&r1=96817&r2=96818&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp Mon Feb 22 16:54:55 2010 @@ -1150,7 +1150,6 @@ MachineInstr &MI = *II; MachineBasicBlock &MBB = *MI.getParent(); MachineFunction &MF = *MBB.getParent(); - const MachineFrameInfo *MFI = MF.getFrameInfo(); ARMFunctionInfo *AFI = MF.getInfo(); assert(!AFI->isThumb1OnlyFunction() && "This eliminateFrameIndex does not support Thumb1!"); @@ -1161,12 +1160,12 @@ } int FrameIndex = MI.getOperand(i).getIndex(); - int Offset = MFI->getObjectOffset(FrameIndex) + MFI->getStackSize() + SPAdj; unsigned FrameReg; - Offset = getFrameIndexReference(MF, FrameIndex, FrameReg); + int Offset = getFrameIndexReference(MF, FrameIndex, FrameReg); if (FrameReg != ARM::SP) SPAdj = 0; + Offset += SPAdj; // Modify MI as necessary to handle as much of 'Offset' as possible bool Done = false; From gohman at apple.com Mon Feb 22 17:07:52 2010 From: gohman at apple.com (Dan Gohman) Date: Mon, 22 Feb 2010 23:07:52 -0000 Subject: [llvm-commits] [llvm] r96820 - /llvm/trunk/test/Transforms/InstCombine/constant-fold-ptr-casts.ll Message-ID: <20100222230752.5D1BC2A6C12E@llvm.org> Author: djg Date: Mon Feb 22 17:07:52 2010 New Revision: 96820 URL: http://llvm.org/viewvc/llvm-project?rev=96820&view=rev Log: Add a test for canonicalizing ConstantExpr operands. Modified: llvm/trunk/test/Transforms/InstCombine/constant-fold-ptr-casts.ll Modified: llvm/trunk/test/Transforms/InstCombine/constant-fold-ptr-casts.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/constant-fold-ptr-casts.ll?rev=96820&r1=96819&r2=96820&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/constant-fold-ptr-casts.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/constant-fold-ptr-casts.ll Mon Feb 22 17:07:52 2010 @@ -1,4 +1,4 @@ -; RUN: opt < %s -instcombine -S | grep {ret i32 2143034560} +; RUN: opt < %s -instcombine -S | grep {ret i32 2143034560} | count 2 ; Instcombine should be able to completely fold this code. @@ -16,3 +16,12 @@ ret i32 %t1 } +define i32 @goo() nounwind { +entry: + %tmp87.2 = load i64* inttoptr (i32 add (i32 ptrtoint ([3 x i64]* @bar to i32), i32 16) to i64*), align 8 + %t0 = bitcast i64 %tmp87.2 to double + %tmp9192.2 = fptrunc double %t0 to float + %t1 = bitcast float %tmp9192.2 to i32 + ret i32 %t1 +} + From grosbach at apple.com Mon Feb 22 17:10:38 2010 From: grosbach at apple.com (Jim Grosbach) Date: Mon, 22 Feb 2010 23:10:38 -0000 Subject: [llvm-commits] [llvm] r96822 - in /llvm/trunk: include/llvm/Target/TargetRegisterInfo.h lib/CodeGen/PrologEpilogInserter.cpp lib/Target/ARM/ARMBaseRegisterInfo.cpp lib/Target/ARM/ARMBaseRegisterInfo.h lib/Target/ARM/ARMInstrInfo.td lib/Target/ARM/ARMInstrThumb.td Message-ID: <20100222231038.C534C2A6C12E@llvm.org> Author: grosbach Date: Mon Feb 22 17:10:38 2010 New Revision: 96822 URL: http://llvm.org/viewvc/llvm-project?rev=96822&view=rev Log: Updated version of r96634 (which was reverted due to failing 176.gcc and 126.gcc nightly tests. These failures uncovered latent bugs that machine DCE could remove one half of a stack adjust down/up pair, causing PEI to assert. This update fixes that, and the tests now pass. Modified: llvm/trunk/include/llvm/Target/TargetRegisterInfo.h llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.h llvm/trunk/lib/Target/ARM/ARMInstrInfo.td llvm/trunk/lib/Target/ARM/ARMInstrThumb.td Modified: llvm/trunk/include/llvm/Target/TargetRegisterInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetRegisterInfo.h?rev=96822&r1=96821&r2=96822&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetRegisterInfo.h (original) +++ llvm/trunk/include/llvm/Target/TargetRegisterInfo.h Mon Feb 22 17:10:38 2010 @@ -587,6 +587,17 @@ return !hasFP(MF); } + /// canSimplifyCallFramePseudos - When possible, it's best to simplify the + /// call frame pseudo ops before doing frame index elimination. This is + /// possible only when frame index references between the pseudos won't + /// need adjusted for the call frame adjustments. Normally, that's true + /// if the function has a reserved call frame or a frame pointer. Some + /// targets (Thumb2, for example) may have more complicated criteria, + /// however, and can override this behavior. + virtual bool canSimplifyCallFramePseudos(MachineFunction &MF) const { + return hasReservedCallFrame(MF) || hasFP(MF); + } + /// hasReservedSpillSlot - Return true if target has reserved a spill slot in /// the stack frame of the given function for the specified register. e.g. On /// x86, if the frame register is required, the first fixed stack object is Modified: llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp?rev=96822&r1=96821&r2=96822&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp (original) +++ llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp Mon Feb 22 17:10:38 2010 @@ -175,9 +175,10 @@ MachineBasicBlock::iterator I = *i; // If call frames are not being included as part of the stack frame, and - // there is no dynamic allocation (therefore referencing frame slots off - // sp), leave the pseudo ops alone. We'll eliminate them later. - if (RegInfo->hasReservedCallFrame(Fn) || RegInfo->hasFP(Fn)) + // the target doesn't indicate otherwise, remove the call frame pseudos + // here. The sub/add sp instruction pairs are still inserted, but we don't + // need to track the SP adjustment for frame index elimination. + if (RegInfo->canSimplifyCallFramePseudos(Fn)) RegInfo->eliminateCallFramePseudoInstr(Fn, *I->getParent(), I); } } Modified: llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp?rev=96822&r1=96821&r2=96822&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp Mon Feb 22 17:10:38 2010 @@ -1085,6 +1085,16 @@ return !MF.getFrameInfo()->hasVarSizedObjects(); } +// canSimplifyCallFramePseudos - If there is a reserved call frame, the +// call frame pseudos can be simplified. Unlike most targets, having a FP +// is not sufficient here since we still may reference some objects via SP +// even when FP is available in Thumb2 mode. +bool ARMBaseRegisterInfo:: +canSimplifyCallFramePseudos(MachineFunction &MF) const { + ARMFunctionInfo *AFI = MF.getInfo(); + return hasReservedCallFrame(MF) || (AFI->isThumb1OnlyFunction() && hasFP(MF)); +} + static void emitSPUpdate(bool isARM, MachineBasicBlock &MBB, MachineBasicBlock::iterator &MBBI, Modified: llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.h?rev=96822&r1=96821&r2=96822&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.h (original) +++ llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.h Mon Feb 22 17:10:38 2010 @@ -138,6 +138,7 @@ virtual bool requiresFrameIndexScavenging(const MachineFunction &MF) const; virtual bool hasReservedCallFrame(MachineFunction &MF) const; + virtual bool canSimplifyCallFramePseudos(MachineFunction &MF) const; virtual void eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.td?rev=96822&r1=96821&r2=96822&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Mon Feb 22 17:10:38 2010 @@ -635,7 +635,10 @@ i32imm:$size), NoItinerary, "${instid:label} ${cpidx:cpentry}", []>; -let Defs = [SP], Uses = [SP] in { +// FIXME: Marking these as hasSideEffects is necessary to prevent machine DCE +// from removing one half of the matched pairs. That breaks PEI, which assumes +// these will always be in pairs, and asserts if it finds otherwise. Better way? +let Defs = [SP], Uses = [SP], hasSideEffects = 1 in { def ADJCALLSTACKUP : PseudoInst<(outs), (ins i32imm:$amt1, i32imm:$amt2, pred:$p), NoItinerary, "@ ADJCALLSTACKUP $amt1", Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb.td?rev=96822&r1=96821&r2=96822&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrThumb.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrThumb.td Mon Feb 22 17:10:38 2010 @@ -120,7 +120,10 @@ // Miscellaneous Instructions. // -let Defs = [SP], Uses = [SP] in { +// FIXME: Marking these as hasSideEffects is necessary to prevent machine DCE +// from removing one half of the matched pairs. That breaks PEI, which assumes +// these will always be in pairs, and asserts if it finds otherwise. Better way? +let Defs = [SP], Uses = [SP], hasSideEffects = 1 in { def tADJCALLSTACKUP : PseudoInst<(outs), (ins i32imm:$amt1, i32imm:$amt2), NoItinerary, "@ tADJCALLSTACKUP $amt1", From sabre at nondot.org Mon Feb 22 17:33:44 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 22 Feb 2010 23:33:44 -0000 Subject: [llvm-commits] [llvm] r96824 - /llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Message-ID: <20100222233344.3AB7D2A6C12E@llvm.org> Author: lattner Date: Mon Feb 22 17:33:44 2010 New Revision: 96824 URL: http://llvm.org/viewvc/llvm-project?rev=96824&view=rev Log: Change ComplexPattern handling to push the node being matched as well as the operands produced when the pattern is matched. This allows CheckSame to work correctly when matching replicated names involving ComplexPatterns. This fixes a bunch of MSP430 failures, we're down to 13 failures, two of which are due to a sched bug. Modified: llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Modified: llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp?rev=96824&r1=96823&r2=96824&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Mon Feb 22 17:33:44 2010 @@ -259,8 +259,15 @@ } } + // Emit a CheckComplexPat operation, which does the match (aborting if it + // fails) and pushes the matched operands onto the recorded nodes list. AddMatcherNode(new CheckComplexPatMatcherNode(CP)); + // Record the right number of operands. + NextRecordedOperandNo += CP.getNumOperands(); + if (CP.hasProperty(SDNPHasChain)) + ++NextRecordedOperandNo; // Chained node operand. + // If the complex pattern has a chain, then we need to keep track of the // fact that we just recorded a chain input. The chain input will be // matched as the last operand of the predicate if it was successful. @@ -442,26 +449,9 @@ if (!N->getName().empty()) { unsigned &VarMapEntry = VariableMap[N->getName()]; if (VarMapEntry == 0) { - VarMapEntry = NextRecordedOperandNo+1; - - unsigned NumRecorded; - - // If this is a complex pattern, the match operation for it will - // implicitly record all of the outputs of it (which may be more than - // one). - if (const ComplexPattern *CP = N->getComplexPatternInfo(CGP)) { - // Record the right number of operands. - NumRecorded = CP->getNumOperands(); - - if (CP->hasProperty(SDNPHasChain)) - ++NumRecorded; // Chained node operand. - } else { - // If it is a normal named node, we must emit a 'Record' opcode. - AddMatcherNode(new RecordMatcherNode("$" + N->getName())); - NumRecorded = 1; - } - NextRecordedOperandNo += NumRecorded; - + // If it is a named node, we must emit a 'Record' opcode. + VarMapEntry = ++NextRecordedOperandNo; + AddMatcherNode(new RecordMatcherNode("$" + N->getName())); } else { // If we get here, this is a second reference to a specific name. Since // we already have checked that the first reference is valid, we don't @@ -503,8 +493,10 @@ // A reference to a complex pattern gets all of the results of the complex // pattern's match. if (const ComplexPattern *CP = N->getComplexPatternInfo(CGP)) { + // The first slot entry is the node itself, the subsequent entries are the + // matched values. for (unsigned i = 0, e = CP->getNumOperands(); i != e; ++i) - ResultOps.push_back(SlotNo+i); + ResultOps.push_back(SlotNo+i+1); return; } From evan.cheng at apple.com Mon Feb 22 17:34:01 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 22 Feb 2010 23:34:01 -0000 Subject: [llvm-commits] [llvm] r96825 - in /llvm/trunk: lib/Transforms/InstCombine/InstCombineCalls.cpp test/CodeGen/X86/critical-edge-split.ll test/CodeGen/X86/ins_subreg_coalesce-3.ll test/CodeGen/X86/trunc-to-bool.ll test/CodeGen/X86/xor-icmp.ll test/Transforms/InstCombine/objsize.ll Message-ID: <20100222233401.23BEE2A6C12E@llvm.org> Author: evancheng Date: Mon Feb 22 17:34:00 2010 New Revision: 96825 URL: http://llvm.org/viewvc/llvm-project?rev=96825&view=rev Log: Instcombine constant folding can normalize gep with negative index to index with large offset. When instcombine objsize checking transformation sees these geps where the offset seemingly point out of bound, it should just return "i don't know" rather than asserting. Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp llvm/trunk/test/CodeGen/X86/critical-edge-split.ll llvm/trunk/test/CodeGen/X86/ins_subreg_coalesce-3.ll llvm/trunk/test/CodeGen/X86/trunc-to-bool.ll llvm/trunk/test/CodeGen/X86/xor-icmp.ll llvm/trunk/test/Transforms/InstCombine/objsize.ll Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp?rev=96825&r1=96824&r2=96825&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp (original) +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp Mon Feb 22 17:34:00 2010 @@ -319,7 +319,7 @@ if (GlobalVariable *GV = dyn_cast(Op1)) { if (GV->hasDefinitiveInitializer()) { Constant *C = GV->getInitializer(); - size_t globalSize = TD->getTypeAllocSize(C->getType()); + uint64_t globalSize = TD->getTypeAllocSize(C->getType()); return ReplaceInstUsesWith(CI, ConstantInt::get(ReturnTy, globalSize)); } else { Constant *RetVal = ConstantInt::get(ReturnTy, Min ? 0 : -1ULL); @@ -341,16 +341,21 @@ // Get what we're pointing to and its size. const PointerType *BaseType = cast(Operand->getType()); - size_t Size = TD->getTypeAllocSize(BaseType->getElementType()); + uint64_t Size = TD->getTypeAllocSize(BaseType->getElementType()); // Get the current byte offset into the thing. Use the original // operand in case we're looking through a bitcast. SmallVector Ops(CE->op_begin()+1, CE->op_end()); const PointerType *OffsetType = cast(GEP->getPointerOperand()->getType()); - size_t Offset = TD->getIndexedOffset(OffsetType, &Ops[0], Ops.size()); + uint64_t Offset = TD->getIndexedOffset(OffsetType, &Ops[0], Ops.size()); - assert(Size >= Offset); + if (Size < Offset) { + // Out of bound reference? Negative index normalized to large + // index? Just return "I don't know". + Constant *RetVal = ConstantInt::get(ReturnTy, Min ? 0 : -1ULL); + return ReplaceInstUsesWith(CI, RetVal); + } Constant *RetVal = ConstantInt::get(ReturnTy, Size-Offset); return ReplaceInstUsesWith(CI, RetVal); Modified: llvm/trunk/test/CodeGen/X86/critical-edge-split.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/critical-edge-split.ll?rev=96825&r1=96824&r2=96825&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/critical-edge-split.ll (original) +++ llvm/trunk/test/CodeGen/X86/critical-edge-split.ll Mon Feb 22 17:34:00 2010 @@ -1,4 +1,4 @@ -; RUN: llc < %s -mtriple=i386-apple-darwin -tailcallopt=false -stats -info-output-file - | grep asm-printer | grep 31 +; RUN: llc < %s -mtriple=i386-apple-darwin -stats -info-output-file - | grep asm-printer | grep 29 %CC = type { %Register } %II = type { %"struct.XX::II::$_74" } Modified: llvm/trunk/test/CodeGen/X86/ins_subreg_coalesce-3.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/ins_subreg_coalesce-3.ll?rev=96825&r1=96824&r2=96825&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/ins_subreg_coalesce-3.ll (original) +++ llvm/trunk/test/CodeGen/X86/ins_subreg_coalesce-3.ll Mon Feb 22 17:34:00 2010 @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=x86-64 | grep mov | count 5 +; RUN: llc < %s -march=x86-64 | grep mov | count 3 %struct.COMPOSITE = type { i8, i16, i16 } %struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 } Modified: llvm/trunk/test/CodeGen/X86/trunc-to-bool.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/trunc-to-bool.ll?rev=96825&r1=96824&r2=96825&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/trunc-to-bool.ll (original) +++ llvm/trunk/test/CodeGen/X86/trunc-to-bool.ll Mon Feb 22 17:34:00 2010 @@ -3,13 +3,14 @@ ; value and as the operand of a branch. ; RUN: llc < %s -march=x86 | FileCheck %s -define i1 @test1(i32 %X) zeroext { +define i1 @test1(i32 %X) zeroext nounwind { %Y = trunc i32 %X to i1 ret i1 %Y } +; CHECK: test1: ; CHECK: andl $1, %eax -define i1 @test2(i32 %val, i32 %mask) { +define i1 @test2(i32 %val, i32 %mask) nounwind { entry: %shifted = ashr i32 %val, %mask %anded = and i32 %shifted, 1 @@ -20,9 +21,10 @@ ret_false: ret i1 false } -; CHECK: testb $1, %al +; CHECK: test2: +; CHECK: btl %eax -define i32 @test3(i8* %ptr) { +define i32 @test3(i8* %ptr) nounwind { %val = load i8* %ptr %tmp = trunc i8 %val to i1 br i1 %tmp, label %cond_true, label %cond_false @@ -31,9 +33,10 @@ cond_false: ret i32 42 } -; CHECK: testb $1, %al +; CHECK: test3: +; CHECK: testb $1, (%eax) -define i32 @test4(i8* %ptr) { +define i32 @test4(i8* %ptr) nounwind { %tmp = ptrtoint i8* %ptr to i1 br i1 %tmp, label %cond_true, label %cond_false cond_true: @@ -41,9 +44,10 @@ cond_false: ret i32 42 } -; CHECK: testb $1, %al +; CHECK: test4: +; CHECK: testb $1, 4(%esp) -define i32 @test6(double %d) { +define i32 @test5(double %d) nounwind { %tmp = fptosi double %d to i1 br i1 %tmp, label %cond_true, label %cond_false cond_true: @@ -51,4 +55,5 @@ cond_false: ret i32 42 } +; CHECK: test5: ; CHECK: testb $1 Modified: llvm/trunk/test/CodeGen/X86/xor-icmp.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/xor-icmp.ll?rev=96825&r1=96824&r2=96825&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/xor-icmp.ll (original) +++ llvm/trunk/test/CodeGen/X86/xor-icmp.ll Mon Feb 22 17:34:00 2010 @@ -1,5 +1,6 @@ ; RUN: llc < %s -march=x86 | FileCheck %s -check-prefix=X32 ; RUN: llc < %s -march=x86-64 | FileCheck %s -check-prefix=X64 +; rdar://7367229 define i32 @t(i32 %a, i32 %b) nounwind ssp { entry: @@ -34,3 +35,33 @@ declare i32 @foo(...) declare i32 @bar(...) + +define i32 @t2(i32 %x, i32 %y) nounwind ssp { +; X32: t2: +; X32: cmpl +; X32: sete +; X32: cmpl +; X32: sete +; X32-NOT: xor +; X32: je + +; X64: t2: +; X64: testl +; X64: sete +; X64: testl +; X64: sete +; X64-NOT: xor +; X64: je +entry: + %0 = icmp eq i32 %x, 0 ; [#uses=1] + %1 = icmp eq i32 %y, 0 ; [#uses=1] + %2 = xor i1 %1, %0 ; [#uses=1] + br i1 %2, label %bb, label %return + +bb: ; preds = %entry + %3 = tail call i32 (...)* @foo() nounwind ; [#uses=0] + ret i32 undef + +return: ; preds = %entry + ret i32 undef +} Modified: llvm/trunk/test/Transforms/InstCombine/objsize.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/objsize.ll?rev=96825&r1=96824&r2=96825&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/objsize.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/objsize.ll Mon Feb 22 17:34:00 2010 @@ -72,4 +72,34 @@ ret i32 %1 } -declare i32 @llvm.objectsize.i32(i8*, i1) nounwind readonly \ No newline at end of file +; rdar://7674946 + at array = internal global [480 x float] zeroinitializer ; <[480 x float]*> [#uses=1] + +declare i8* @__memcpy_chk(i8*, i8*, i32, i32) nounwind + +declare i32 @llvm.objectsize.i32(i8*, i1) nounwind readonly + +declare i8* @__inline_memcpy_chk(i8*, i8*, i32) nounwind inlinehint + +define void @test3() nounwind { +; CHECK: @test3 +entry: + br i1 undef, label %bb11, label %bb12 + +bb11: + %0 = getelementptr inbounds float* getelementptr inbounds ([480 x float]* @array, i32 0, i32 128), i32 -127 ; [#uses=1] + %1 = bitcast float* %0 to i8* ; [#uses=1] + %2 = call i32 @llvm.objectsize.i32(i8* %1, i1 false) ; [#uses=1] + %3 = call i8* @__memcpy_chk(i8* undef, i8* undef, i32 512, i32 %2) nounwind ; [#uses=0] +; CHECK: @__memcpy_chk + unreachable + +bb12: + %4 = getelementptr inbounds float* getelementptr inbounds ([480 x float]* @array, i32 0, i32 128), i32 -127 ; [#uses=1] + %5 = bitcast float* %4 to i8* ; [#uses=1] + %6 = call i8* @__inline_memcpy_chk(i8* %5, i8* undef, i32 512) nounwind inlinehint ; [#uses=0] +; CHECK: @__inline_memcpy_chk + unreachable +} + +declare i32 @llvm.objectsize.i32(i8*, i1) nounwind readonly From sabre at nondot.org Mon Feb 22 17:34:12 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 22 Feb 2010 23:34:12 -0000 Subject: [llvm-commits] [llvm] r96826 - in /llvm/trunk/test/CodeGen/MSP430: AddrMode-bis-rx.ll AddrMode-bis-xr.ll AddrMode-mov-rx.ll AddrMode-mov-xr.ll bit.ll Message-ID: <20100222233412.CEEFE2A6C12E@llvm.org> Author: lattner Date: Mon Feb 22 17:34:12 2010 New Revision: 96826 URL: http://llvm.org/viewvc/llvm-project?rev=96826&view=rev Log: no need to run llvm-as here. Modified: llvm/trunk/test/CodeGen/MSP430/AddrMode-bis-rx.ll llvm/trunk/test/CodeGen/MSP430/AddrMode-bis-xr.ll llvm/trunk/test/CodeGen/MSP430/AddrMode-mov-rx.ll llvm/trunk/test/CodeGen/MSP430/AddrMode-mov-xr.ll llvm/trunk/test/CodeGen/MSP430/bit.ll Modified: llvm/trunk/test/CodeGen/MSP430/AddrMode-bis-rx.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MSP430/AddrMode-bis-rx.ll?rev=96826&r1=96825&r2=96826&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/MSP430/AddrMode-bis-rx.ll (original) +++ llvm/trunk/test/CodeGen/MSP430/AddrMode-bis-rx.ll Mon Feb 22 17:34:12 2010 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -march=msp430 | FileCheck %s +; RUN: llc < %s -march=msp430 | FileCheck %s target datalayout = "e-p:16:16:16-i1:8:8-i8:8:8-i16:16:16-i32:16:16" target triple = "msp430-generic-generic" Modified: llvm/trunk/test/CodeGen/MSP430/AddrMode-bis-xr.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MSP430/AddrMode-bis-xr.ll?rev=96826&r1=96825&r2=96826&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/MSP430/AddrMode-bis-xr.ll (original) +++ llvm/trunk/test/CodeGen/MSP430/AddrMode-bis-xr.ll Mon Feb 22 17:34:12 2010 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -march=msp430 | FileCheck %s +; RUN: llc < %s -march=msp430 | FileCheck %s target datalayout = "e-p:16:16:16-i8:8:8-i16:16:16-i32:16:16" target triple = "msp430-generic-generic" Modified: llvm/trunk/test/CodeGen/MSP430/AddrMode-mov-rx.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MSP430/AddrMode-mov-rx.ll?rev=96826&r1=96825&r2=96826&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/MSP430/AddrMode-mov-rx.ll (original) +++ llvm/trunk/test/CodeGen/MSP430/AddrMode-mov-rx.ll Mon Feb 22 17:34:12 2010 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -march=msp430 | FileCheck %s +; RUN: llc < %s -march=msp430 | FileCheck %s target datalayout = "e-p:16:16:16-i1:8:8-i8:8:8-i16:16:16-i32:16:16" target triple = "msp430-generic-generic" Modified: llvm/trunk/test/CodeGen/MSP430/AddrMode-mov-xr.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MSP430/AddrMode-mov-xr.ll?rev=96826&r1=96825&r2=96826&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/MSP430/AddrMode-mov-xr.ll (original) +++ llvm/trunk/test/CodeGen/MSP430/AddrMode-mov-xr.ll Mon Feb 22 17:34:12 2010 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -march=msp430 | FileCheck %s +; RUN: llc < %s -march=msp430 | FileCheck %s target datalayout = "e-p:16:16:16-i1:8:8-i8:8:8-i16:16:16-i32:16:16" target triple = "msp430-generic-generic" Modified: llvm/trunk/test/CodeGen/MSP430/bit.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MSP430/bit.ll?rev=96826&r1=96825&r2=96826&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/MSP430/bit.ll (original) +++ llvm/trunk/test/CodeGen/MSP430/bit.ll Mon Feb 22 17:34:12 2010 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -march=msp430 | FileCheck %s +; RUN: llc < %s -march=msp430 | FileCheck %s target datalayout = "e-p:16:16:16-i1:8:8-i8:8:8-i16:16:16-i32:16:32" target triple = "msp430-generic-generic" From evan.cheng at apple.com Mon Feb 22 17:37:48 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 22 Feb 2010 23:37:48 -0000 Subject: [llvm-commits] [llvm] r96827 - in /llvm/trunk/test/CodeGen/X86: critical-edge-split.ll ins_subreg_coalesce-3.ll trunc-to-bool.ll xor-icmp.ll Message-ID: <20100222233748.389C12A6C12E@llvm.org> Author: evancheng Date: Mon Feb 22 17:37:48 2010 New Revision: 96827 URL: http://llvm.org/viewvc/llvm-project?rev=96827&view=rev Log: These should not have been committed. Modified: llvm/trunk/test/CodeGen/X86/critical-edge-split.ll llvm/trunk/test/CodeGen/X86/ins_subreg_coalesce-3.ll llvm/trunk/test/CodeGen/X86/trunc-to-bool.ll llvm/trunk/test/CodeGen/X86/xor-icmp.ll Modified: llvm/trunk/test/CodeGen/X86/critical-edge-split.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/critical-edge-split.ll?rev=96827&r1=96826&r2=96827&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/critical-edge-split.ll (original) +++ llvm/trunk/test/CodeGen/X86/critical-edge-split.ll Mon Feb 22 17:37:48 2010 @@ -1,4 +1,4 @@ -; RUN: llc < %s -mtriple=i386-apple-darwin -stats -info-output-file - | grep asm-printer | grep 29 +; RUN: llc < %s -mtriple=i386-apple-darwin -tailcallopt=false -stats -info-output-file - | grep asm-printer | grep 31 %CC = type { %Register } %II = type { %"struct.XX::II::$_74" } Modified: llvm/trunk/test/CodeGen/X86/ins_subreg_coalesce-3.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/ins_subreg_coalesce-3.ll?rev=96827&r1=96826&r2=96827&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/ins_subreg_coalesce-3.ll (original) +++ llvm/trunk/test/CodeGen/X86/ins_subreg_coalesce-3.ll Mon Feb 22 17:37:48 2010 @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=x86-64 | grep mov | count 3 +; RUN: llc < %s -march=x86-64 | grep mov | count 5 %struct.COMPOSITE = type { i8, i16, i16 } %struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 } Modified: llvm/trunk/test/CodeGen/X86/trunc-to-bool.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/trunc-to-bool.ll?rev=96827&r1=96826&r2=96827&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/trunc-to-bool.ll (original) +++ llvm/trunk/test/CodeGen/X86/trunc-to-bool.ll Mon Feb 22 17:37:48 2010 @@ -3,14 +3,13 @@ ; value and as the operand of a branch. ; RUN: llc < %s -march=x86 | FileCheck %s -define i1 @test1(i32 %X) zeroext nounwind { +define i1 @test1(i32 %X) zeroext { %Y = trunc i32 %X to i1 ret i1 %Y } -; CHECK: test1: ; CHECK: andl $1, %eax -define i1 @test2(i32 %val, i32 %mask) nounwind { +define i1 @test2(i32 %val, i32 %mask) { entry: %shifted = ashr i32 %val, %mask %anded = and i32 %shifted, 1 @@ -21,10 +20,9 @@ ret_false: ret i1 false } -; CHECK: test2: -; CHECK: btl %eax +; CHECK: testb $1, %al -define i32 @test3(i8* %ptr) nounwind { +define i32 @test3(i8* %ptr) { %val = load i8* %ptr %tmp = trunc i8 %val to i1 br i1 %tmp, label %cond_true, label %cond_false @@ -33,10 +31,9 @@ cond_false: ret i32 42 } -; CHECK: test3: -; CHECK: testb $1, (%eax) +; CHECK: testb $1, %al -define i32 @test4(i8* %ptr) nounwind { +define i32 @test4(i8* %ptr) { %tmp = ptrtoint i8* %ptr to i1 br i1 %tmp, label %cond_true, label %cond_false cond_true: @@ -44,10 +41,9 @@ cond_false: ret i32 42 } -; CHECK: test4: -; CHECK: testb $1, 4(%esp) +; CHECK: testb $1, %al -define i32 @test5(double %d) nounwind { +define i32 @test6(double %d) { %tmp = fptosi double %d to i1 br i1 %tmp, label %cond_true, label %cond_false cond_true: @@ -55,5 +51,4 @@ cond_false: ret i32 42 } -; CHECK: test5: ; CHECK: testb $1 Modified: llvm/trunk/test/CodeGen/X86/xor-icmp.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/xor-icmp.ll?rev=96827&r1=96826&r2=96827&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/xor-icmp.ll (original) +++ llvm/trunk/test/CodeGen/X86/xor-icmp.ll Mon Feb 22 17:37:48 2010 @@ -1,6 +1,5 @@ ; RUN: llc < %s -march=x86 | FileCheck %s -check-prefix=X32 ; RUN: llc < %s -march=x86-64 | FileCheck %s -check-prefix=X64 -; rdar://7367229 define i32 @t(i32 %a, i32 %b) nounwind ssp { entry: @@ -35,33 +34,3 @@ declare i32 @foo(...) declare i32 @bar(...) - -define i32 @t2(i32 %x, i32 %y) nounwind ssp { -; X32: t2: -; X32: cmpl -; X32: sete -; X32: cmpl -; X32: sete -; X32-NOT: xor -; X32: je - -; X64: t2: -; X64: testl -; X64: sete -; X64: testl -; X64: sete -; X64-NOT: xor -; X64: je -entry: - %0 = icmp eq i32 %x, 0 ; [#uses=1] - %1 = icmp eq i32 %y, 0 ; [#uses=1] - %2 = xor i1 %1, %0 ; [#uses=1] - br i1 %2, label %bb, label %return - -bb: ; preds = %entry - %3 = tail call i32 (...)* @foo() nounwind ; [#uses=0] - ret i32 undef - -return: ; preds = %entry - ret i32 undef -} From jyasskin at gmail.com Mon Feb 22 17:48:07 2010 From: jyasskin at gmail.com (jyasskin at gmail.com) Date: Mon, 22 Feb 2010 23:48:07 +0000 Subject: [llvm-commits] [PATCH] Shared library for LLVM (issue198059) Message-ID: <00151750ee2aa8859d0480391058@google.com> I think this should fix both arm and darwin8. Xerxes, could you check ARM? I used -lgcc and avoided linking the problematic unittest against the library without --enable-shared. http://codereview.appspot.com/198059/diff/9002/10008 File Makefile.rules (right): http://codereview.appspot.com/198059/diff/9002/10008#newcode616 Makefile.rules:616: LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib' On 2010/02/18 21:52:02, nlewycky1 wrote: > We should give packagers a flag to tune the rpath path to work around any > problems -- or more importantly, turn it off entirely. The libraries should be > findable through normal ldconfig lookup once installed. This isn't a regression (the below lines always included an absolute rpath), so I'll do it in a separate patch, if the packagers need it at all. Note that they can already patch the Makefile to remove the RPATH; a flag would just make it a bit easier. http://codereview.appspot.com/198059/diff/9002/10008#newcode962 Makefile.rules:962: LLVMLibsPaths += $(LibDir)/libLLVM-$(LLVMVersion)$(SHLIBEXT) On 2010/02/18 21:52:02, nlewycky1 wrote: > I don't follow; examples are linked shared even when shared library is off? Yes, per Chris's suggestion. The idea is to test the shared library unconditionally, but not make the tools do it until it's tested better. However, not all the examples can link against the .so on arm, so I've enabled particular ones individually. http://codereview.appspot.com/198059/diff/9002/10004 File configure (right): http://codereview.appspot.com/198059/diff/9002/10004#newcode1406 configure:1406: --enable-shared Link LLVM tools shared (default is NO) On 2010/02/18 21:52:02, nlewycky1 wrote: > This sounds independent of whether it builds shared at all. If so, is there a > control for that? There's no control for that. Do we need one? What's it hurt to build the shared library if we don't use it? http://codereview.appspot.com/198059/diff/9002/10006 File tools/llvm-shlib/Makefile (right): http://codereview.appspot.com/198059/diff/9002/10006#newcode59 tools/llvm-shlib/Makefile:59: ifneq ($(ARCH), ARM) On 2010/02/18 23:23:20, xranby wrote: > I tested this workaround on ARM linux using gcc 4.3.3 on ubuntu jaunty > The shared library libLLVM2.7svn.so links +1 > But the examples unfortunately fails to link against the shared library: > llvm[1]: Linking Release executable BrainF (without symbols) > /usr/bin/ld: /media/disk/llvm-configure/Release/examples/BrainF: hidden symbol > `__sync_val_compare_and_swap_4' in > /usr/lib/gcc/arm-linux-gnueabi/4.3.3/libgcc.a(linux-atomic.o) is referenced by > DSO http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20100215/096473.html Darn. I see you tested -lgcc, and it worked better, but not perfectly. I'll try linking only a specific example against the shared library, so that I can get this in. Then we can try to get arm shared exception handling working later. http://codereview.appspot.com/198059/diff/9002/10006#newcode64 tools/llvm-shlib/Makefile:64: # at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40133. On 2010/02/18 21:52:02, nlewycky1 wrote: > FYI, gcc prefers 'http://gcc.gnu.org/PR40133' style links. They have switched > bug database software once before. Done. http://codereview.appspot.com/198059/diff/9002/10007 File unittests/Makefile.unittest (right): http://codereview.appspot.com/198059/diff/9002/10007#newcode32 unittests/Makefile.unittest:32: Run.Shared := $(SHLIBPATH_VAR)="$(LibDir)$${$(SHLIBPATH_VAR):+:}$$$(SHLIBPATH_VAR)" On 2010/02/18 21:52:02, nlewycky1 wrote: > Oh, it's either this or try modifying the rpath, huh? And if you make the rpath > configurable you're stuck not knowing whether it's relative or absolute. Well, > please add a comment here explaining why you don't just fix up the rpath. I can make the rpath absolute for unittests, but OSX seems to still need the DYLD_LIBRARY_PATH. It'll help linux anyway. http://codereview.appspot.com/198059/diff/9002/10007#newcode45 unittests/Makefile.unittest:45: $(Run.Shared) $(LLVMUnitTestExe) On 2010/02/18 21:52:02, nlewycky1 wrote: > The nasty part is that this makes it harder for me to run the unit tests, or to > just run the binary under gdb, etc. Without fixing up rpath, there's nothing you > can do about that. > Then again, you don't really want to install unit tests, and you are very > unlikely to want to run them against the installed libraries... maybe we could > clobber the rpath instead? Yep, see above. http://codereview.appspot.com/198059/show From sabre at nondot.org Mon Feb 22 17:55:39 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 22 Feb 2010 23:55:39 -0000 Subject: [llvm-commits] [llvm] r96833 - in /llvm/trunk: include/llvm/CodeGen/DAGISelHeader.h utils/TableGen/DAGISelMatcherEmitter.cpp Message-ID: <20100222235539.AD93F2A6C12E@llvm.org> Author: lattner Date: Mon Feb 22 17:55:39 2010 New Revision: 96833 URL: http://llvm.org/viewvc/llvm-project?rev=96833&view=rev Log: add a new Push2 opcode for targets (like cellspu) which have ridiculously ginormous patterns and need more than one byte of displacement for encodings. This fixes CellSPU/fdiv.ll. SPU is still doing something else ridiculous though. Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h?rev=96833&r1=96832&r2=96833&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h (original) +++ llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Mon Feb 22 17:55:39 2010 @@ -201,7 +201,7 @@ } enum BuiltinOpcodes { - OPC_Push, + OPC_Push, OPC_Push2, OPC_RecordNode, OPC_RecordMemRef, OPC_CaptureFlagInput, @@ -359,6 +359,19 @@ MatchScopes.push_back(NewEntry); continue; } + case OPC_Push2: { + unsigned NumToSkip = GetInt2(MatcherTable, MatcherIndex); + MatchScope NewEntry; + NewEntry.FailIndex = MatcherIndex+NumToSkip; + NewEntry.NodeStackSize = NodeStack.size(); + NewEntry.NumRecordedNodes = RecordedNodes.size(); + NewEntry.NumMatchedMemRefs = MatchedMemRefs.size(); + NewEntry.InputChain = InputChain; + NewEntry.InputFlag = InputFlag; + NewEntry.HasChainNodesMatched = !ChainNodesMatched.empty(); + MatchScopes.push_back(NewEntry); + continue; + } case OPC_RecordNode: // Remember this node, it may end up being an operand in the pattern. RecordedNodes.push_back(N); Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp?rev=96833&r1=96832&r2=96833&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Mon Feb 22 17:55:39 2010 @@ -350,16 +350,29 @@ NextSize = EmitMatcherList(cast(N)->getNext(), Indent+1, CurrentIdx+2, FOS); } - + + // In the unlikely event that we have something too big to emit with a + // one byte offset, regenerate it with a two-byte one. if (NextSize > 255) { - errs() << - "Tblgen internal error: can't handle predicate this complex yet\n"; - // FIXME: exit(1); + TmpBuf.clear(); + raw_svector_ostream OS(TmpBuf); + formatted_raw_ostream FOS(OS); + NextSize = EmitMatcherList(cast(N)->getNext(), + Indent+1, CurrentIdx+3, FOS); + if (NextSize > 65535) { + errs() << + "Tblgen internal error: can't handle pattern this complex yet\n"; + exit(1); + } } OS << "/*" << CurrentIdx << "*/"; OS.PadToColumn(Indent*2); - OS << "OPC_Push, " << NextSize << ",\n"; + + if (NextSize < 256) + OS << "OPC_Push, " << NextSize << ",\n"; + else + OS << "OPC_Push2, " << (NextSize&255) << ", " << (NextSize>>8) << ",\n"; OS << TmpBuf.str(); Size += 2+NextSize; From jyasskin at google.com Mon Feb 22 18:04:53 2010 From: jyasskin at google.com (Jeffrey Yasskin) Date: Tue, 23 Feb 2010 00:04:53 -0000 Subject: [llvm-commits] [llvm] r96834 - /llvm/trunk/lib/Support/GraphWriter.cpp Message-ID: <20100223000453.7E04C2A6C12E@llvm.org> Author: jyasskin Date: Mon Feb 22 18:04:53 2010 New Revision: 96834 URL: http://llvm.org/viewvc/llvm-project?rev=96834&view=rev Log: Fix viewCFG on Linux. Modified: llvm/trunk/lib/Support/GraphWriter.cpp Modified: llvm/trunk/lib/Support/GraphWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/GraphWriter.cpp?rev=96834&r1=96833&r2=96834&view=diff ============================================================================== --- llvm/trunk/lib/Support/GraphWriter.cpp (original) +++ llvm/trunk/lib/Support/GraphWriter.cpp Mon Feb 22 18:04:53 2010 @@ -137,7 +137,7 @@ args.clear(); args.push_back(gv.c_str()); args.push_back(PSFilename.c_str()); - args.push_back("-spartan"); + args.push_back("--spartan"); args.push_back(0); ErrMsg.clear(); From stoklund at 2pi.dk Mon Feb 22 18:28:53 2010 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Tue, 23 Feb 2010 00:28:53 -0000 Subject: [llvm-commits] [llvm] r96837 - in /llvm/trunk/lib/CodeGen: PHIElimination.cpp PHIElimination.h Message-ID: <20100223002854.0937B2A6C12C@llvm.org> Author: stoklund Date: Mon Feb 22 18:28:53 2010 New Revision: 96837 URL: http://llvm.org/viewvc/llvm-project?rev=96837&view=rev Log: Dead code elimination Modified: llvm/trunk/lib/CodeGen/PHIElimination.cpp llvm/trunk/lib/CodeGen/PHIElimination.h Modified: llvm/trunk/lib/CodeGen/PHIElimination.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PHIElimination.cpp?rev=96837&r1=96836&r2=96837&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/PHIElimination.cpp (original) +++ llvm/trunk/lib/CodeGen/PHIElimination.cpp Mon Feb 22 18:28:53 2010 @@ -55,7 +55,6 @@ bool llvm::PHIElimination::runOnMachineFunction(MachineFunction &Fn) { MRI = &Fn.getRegInfo(); - PHIDefs.clear(); bool Changed = false; // Split critical edges to help the coalescer @@ -214,10 +213,6 @@ TII->copyRegToReg(MBB, AfterPHIsIt, DestReg, IncomingReg, RC, RC); } - // Record PHI def. - assert(!hasPHIDef(DestReg) && "Vreg has multiple phi-defs?"); - PHIDefs[DestReg] = &MBB; - // Update live variable information if there is any. LiveVariables *LV = getAnalysisIfAvailable(); if (LV) { Modified: llvm/trunk/lib/CodeGen/PHIElimination.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PHIElimination.h?rev=96837&r1=96836&r2=96837&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/PHIElimination.h (original) +++ llvm/trunk/lib/CodeGen/PHIElimination.h Mon Feb 22 18:28:53 2010 @@ -22,10 +22,8 @@ /// Lower PHI instructions to copies. class PHIElimination : public MachineFunctionPass { MachineRegisterInfo *MRI; // Machine register information - typedef DenseMap PHIDefMap; public: - static char ID; // Pass identification, replacement for typeid PHIElimination() : MachineFunctionPass(&ID) {} @@ -33,12 +31,6 @@ virtual void getAnalysisUsage(AnalysisUsage &AU) const; - /// Return true if the given vreg was defined by a PHI intsr prior to - /// lowering. - bool hasPHIDef(unsigned vreg) const { - return PHIDefs.count(vreg); - } - private: /// EliminatePHINodes - Eliminate phi nodes by inserting copy instructions /// in predecessor basic blocks. @@ -106,7 +98,6 @@ typedef DenseMap VRegPHIUse; VRegPHIUse VRegPHIUseCount; - PHIDefMap PHIDefs; // Defs of PHI sources which are implicit_def. SmallPtrSet ImpDefs; From johnny.chen at apple.com Mon Feb 22 18:33:12 2010 From: johnny.chen at apple.com (Johnny Chen) Date: Tue, 23 Feb 2010 00:33:12 -0000 Subject: [llvm-commits] [llvm] r96838 - /llvm/trunk/lib/Target/ARM/ARMInstrNEON.td Message-ID: <20100223003312.CD4752A6C12C@llvm.org> Author: johnny Date: Mon Feb 22 18:33:12 2010 New Revision: 96838 URL: http://llvm.org/viewvc/llvm-project?rev=96838&view=rev Log: Added VCEQ (immediate #0) NEON instruction for disassembly only. A8.6.281 Modified: llvm/trunk/lib/Target/ARM/ARMInstrNEON.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrNEON.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrNEON.td?rev=96838&r1=96837&r2=96838&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrNEON.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrNEON.td Mon Feb 22 18:33:12 2010 @@ -1113,6 +1113,44 @@ // S = single int (32 bit) elements // D = double int (64 bit) elements +// Neon 2-register vector operations -- for disassembly only. + +// First with only element sizes of 8, 16 and 32 bits: +multiclass N2V_QHS_np op24_23, bits<2> op21_20, bits<2> op17_16, + bits<5> op11_7, bit op4, string opc, string asm> { + // 64-bit vector types. + def v8i8 : N2V; + def v4i16 : N2V; + def v2i32 : N2V; + def v2f32 : N2V { + let Inst{10} = 1; // overwrite F = 1 + } + + // 128-bit vector types. + def v16i8 : N2V; + def v8i16 : N2V; + def v4i32 : N2V; + def v4f32 : N2V { + let Inst{10} = 1; // overwrite F = 1 + } +} + // Neon 3-register vector operations. // First with only element sizes of 8, 16 and 32 bits: @@ -1951,6 +1989,9 @@ NEONvceq, 1>; def VCEQfq : N3VQ<0,0,0b00,0b1110,0, IIC_VBINQ, "vceq", "f32", v4i32, v4f32, NEONvceq, 1>; +// For disassembly only. +defm VCEQz : N2V_QHS_np<0b11,0b11,0b01,0b00010,0, "vceq", "$dst, $src, #0">; + // VCGE : Vector Compare Greater Than or Equal defm VCGEs : N3V_QHS<0, 0, 0b0011, 1, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, IIC_VBINi4Q, "vcge", "s", NEONvcge, 0>; From sabre at nondot.org Mon Feb 22 18:59:59 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 23 Feb 2010 00:59:59 -0000 Subject: [llvm-commits] [llvm] r96843 - in /llvm/trunk: include/llvm/CodeGen/DAGISelHeader.h utils/TableGen/DAGISelMatcherEmitter.cpp Message-ID: <20100223005959.DA9032A6C12C@llvm.org> Author: lattner Date: Mon Feb 22 18:59:59 2010 New Revision: 96843 URL: http://llvm.org/viewvc/llvm-project?rev=96843&view=rev Log: switch the value# in OPC_CompleteMatch and OPC_EmitNode to use a VBR encoding for the insanity being perpetrated by the spu backend. Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h?rev=96843&r1=96842&r2=96843&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h (original) +++ llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Mon Feb 22 18:59:59 2010 @@ -200,6 +200,24 @@ return Val; } +/// GetVBR - decode a vbr encoding whose top bit is set. +ALWAYS_INLINE static unsigned +GetVBR(unsigned Val, const unsigned char *MatcherTable, unsigned &Idx) { + assert(Val >= 128 && "Not a VBR"); + Val &= 127; // Remove first vbr bit. + + unsigned Shift = 7; + unsigned NextBits; + do { + NextBits = GetInt1(MatcherTable, Idx); + Val |= (NextBits&127) << Shift; + Shift += 7; + } while (NextBits & 128); + + return Val; +} + + enum BuiltinOpcodes { OPC_Push, OPC_Push2, OPC_RecordNode, @@ -691,6 +709,9 @@ SmallVector Ops; for (unsigned i = 0; i != NumOps; ++i) { unsigned RecNo = MatcherTable[MatcherIndex++]; + if (RecNo & 128) + RecNo = GetVBR(RecNo, MatcherTable, MatcherIndex); + assert(RecNo < RecordedNodes.size() && "Invalid CheckSame"); Ops.push_back(RecordedNodes[RecNo]); } @@ -763,6 +784,9 @@ for (unsigned i = 0; i != NumResults; ++i) { unsigned ResSlot = MatcherTable[MatcherIndex++]; + if (ResSlot & 128) + ResSlot = GetVBR(ResSlot, MatcherTable, MatcherIndex); + assert(ResSlot < RecordedNodes.size() && "Invalid CheckSame"); SDValue Res = RecordedNodes[ResSlot]; Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp?rev=96843&r1=96842&r2=96843&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Mon Feb 22 18:59:59 2010 @@ -127,6 +127,25 @@ }; } // end anonymous namespace. +/// EmitVBRValue - Emit the specified value as a VBR, returning the number of +/// bytes emitted. +static unsigned EmitVBRValue(unsigned Val, raw_ostream &OS) { + if (Val <= 127) { + OS << Val << ", "; + return 1; + } + + unsigned InVal = Val; + unsigned NumBytes = 0; + while (Val > 128) { + OS << (Val&127) << "|128,"; + Val >>= 7; + ++NumBytes; + } + OS << Val << "/*" << InVal << "*/, "; + return NumBytes+1; +} + /// EmitMatcherOpcodes - Emit bytes for the specified matcher and return /// the number of bytes emitted. unsigned MatcherTableEmitter:: @@ -309,22 +328,27 @@ OS << getEnumName(EN->getVT(i)) << ", "; OS << EN->getNumOperands() << "/*#Ops*/, "; - for (unsigned i = 0, e = EN->getNumOperands(); i != e; ++i) - OS << EN->getOperand(i) << ", "; + unsigned NumOperandBytes = 0; + for (unsigned i = 0, e = EN->getNumOperands(); i != e; ++i) { + // We emit the operand numbers in VBR encoded format, in case the number + // is too large to represent with a byte. + NumOperandBytes += EmitVBRValue(EN->getOperand(i), OS); + } OS << '\n'; - return 6+EN->getNumVTs()+EN->getNumOperands(); + return 6+EN->getNumVTs()+NumOperandBytes; } case MatcherNode::CompleteMatch: { const CompleteMatchMatcherNode *CM = cast(N); OS << "OPC_CompleteMatch, " << CM->getNumResults() << ", "; + unsigned NumResultBytes = 0; for (unsigned i = 0, e = CM->getNumResults(); i != e; ++i) - OS << CM->getResult(i) << ", "; + NumResultBytes += EmitVBRValue(CM->getResult(i), OS); OS << '\n'; OS.PadToColumn(Indent*2) << "// Src: " << *CM->getPattern().getSrcPattern() << '\n'; OS.PadToColumn(Indent*2) << "// Dst: " << *CM->getPattern().getDstPattern() << '\n'; - return 2+CM->getNumResults(); + return 2 + NumResultBytes; } } assert(0 && "Unreachable"); From sabre at nondot.org Mon Feb 22 19:07:09 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 23 Feb 2010 01:07:09 -0000 Subject: [llvm-commits] [llvm] r96844 - /llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Message-ID: <20100223010709.DD76F2A6C12C@llvm.org> Author: lattner Date: Mon Feb 22 19:07:09 2010 New Revision: 96844 URL: http://llvm.org/viewvc/llvm-project?rev=96844&view=rev Log: fix an off-by-one error. Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h?rev=96844&r1=96843&r2=96844&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h (original) +++ llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Mon Feb 22 19:07:09 2010 @@ -712,7 +712,7 @@ if (RecNo & 128) RecNo = GetVBR(RecNo, MatcherTable, MatcherIndex); - assert(RecNo < RecordedNodes.size() && "Invalid CheckSame"); + assert(RecNo < RecordedNodes.size() && "Invalid EmitNode"); Ops.push_back(RecordedNodes[RecNo]); } From sabre at nondot.org Mon Feb 22 19:07:40 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 23 Feb 2010 01:07:40 -0000 Subject: [llvm-commits] [llvm] r96845 - /llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Message-ID: <20100223010740.1F4E82A6C12C@llvm.org> Author: lattner Date: Mon Feb 22 19:07:39 2010 New Revision: 96845 URL: http://llvm.org/viewvc/llvm-project?rev=96845&view=rev Log: really fix an off-by-one error Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp?rev=96845&r1=96844&r2=96845&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Mon Feb 22 19:07:39 2010 @@ -137,7 +137,7 @@ unsigned InVal = Val; unsigned NumBytes = 0; - while (Val > 128) { + while (Val >= 128) { OS << (Val&127) << "|128,"; Val >>= 7; ++NumBytes; From sabre at nondot.org Mon Feb 22 19:20:00 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 23 Feb 2010 01:20:00 -0000 Subject: [llvm-commits] [llvm] r96849 - /llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp Message-ID: <20100223012000.D8CE82A6C12C@llvm.org> Author: lattner Date: Mon Feb 22 19:20:00 2010 New Revision: 96849 URL: http://llvm.org/viewvc/llvm-project?rev=96849&view=rev Log: the cell backend is making all sorts of unsafe and incorrect assumptions about ownership and update policies. It isn't clear why it is doing all this lowering at isel time instead of in legalize. This fixes fcmp64.ll Modified: llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp Modified: llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp?rev=96849&r1=96848&r2=96849&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp Mon Feb 22 19:20:00 2010 @@ -294,15 +294,18 @@ ((vecVT == MVT::v2i64) && ((SPU::get_vec_i16imm(bvNode, *CurDAG, MVT::i64).getNode() != 0) || (SPU::get_ILHUvec_imm(bvNode, *CurDAG, MVT::i64).getNode() != 0) || - (SPU::get_vec_u18imm(bvNode, *CurDAG, MVT::i64).getNode() != 0)))) - return Select(bvNode); + (SPU::get_vec_u18imm(bvNode, *CurDAG, MVT::i64).getNode() != 0)))) { + HandleSDNode Dummy(SDValue(bvNode, 0)); + Select(bvNode); + return Dummy.getValue().getNode(); + } // No, need to emit a constant pool spill: std::vector CV; for (size_t i = 0; i < bvNode->getNumOperands(); ++i) { ConstantSDNode *V = dyn_cast (bvNode->getOperand(i)); - CV.push_back(const_cast (V->getConstantIntValue())); + CV.push_back(const_cast(V->getConstantIntValue())); } Constant *CP = ConstantVector::get(CV); @@ -311,10 +314,14 @@ SDValue CGPoolOffset = SPU::LowerConstantPool(CPIdx, *CurDAG, SPUtli.getSPUTargetMachine()); - return SelectCode(CurDAG->getLoad(vecVT, dl, - CurDAG->getEntryNode(), CGPoolOffset, - PseudoSourceValue::getConstantPool(), 0, - false, false, Alignment).getNode()); + + HandleSDNode Dummy(CurDAG->getLoad(vecVT, dl, + CurDAG->getEntryNode(), CGPoolOffset, + PseudoSourceValue::getConstantPool(),0, + false, false, Alignment)); + CurDAG->ReplaceAllUsesWith(SDValue(bvNode, 0), Dummy.getValue()); + SelectCode(Dummy.getValue().getNode()); + return Dummy.getValue().getNode(); } /// Select - Convert the specified operand from a target-independent to a @@ -692,9 +699,8 @@ SDValue Ops[8]; DebugLoc dl = N->getDebugLoc(); - if (N->isMachineOpcode()) { + if (N->isMachineOpcode()) return NULL; // Already selected. - } if (Opc == ISD::FrameIndex) { int FI = cast(N)->getIndex(); @@ -773,29 +779,44 @@ // re-use it in the VEC2PREFSLOT selection without needing to explicitly // call SelectCode (it's already done for us.) SelectCode(CurDAG->getNode(ISD::BIT_CONVERT, dl, OpVecVT, zextShuffle).getNode()); - return SelectCode(CurDAG->getNode(SPUISD::VEC2PREFSLOT, dl, OpVT, - zextShuffle).getNode()); + HandleSDNode Dummy(CurDAG->getNode(SPUISD::VEC2PREFSLOT, dl, OpVT, + zextShuffle)); + + CurDAG->ReplaceAllUsesWith(N, Dummy.getValue().getNode()); + SelectCode(Dummy.getValue().getNode()); + return Dummy.getValue().getNode(); } else if (Opc == ISD::ADD && (OpVT == MVT::i64 || OpVT == MVT::v2i64)) { SDNode *CGLoad = emitBuildVector(getCarryGenerateShufMask(*CurDAG, dl).getNode()); - return SelectCode(CurDAG->getNode(SPUISD::ADD64_MARKER, dl, OpVT, - N->getOperand(0), N->getOperand(1), - SDValue(CGLoad, 0)).getNode()); + HandleSDNode Dummy(CurDAG->getNode(SPUISD::ADD64_MARKER, dl, OpVT, + N->getOperand(0), N->getOperand(1), + SDValue(CGLoad, 0))); + + CurDAG->ReplaceAllUsesWith(N, Dummy.getValue().getNode()); + SelectCode(Dummy.getValue().getNode()); + return Dummy.getValue().getNode(); } else if (Opc == ISD::SUB && (OpVT == MVT::i64 || OpVT == MVT::v2i64)) { SDNode *CGLoad = emitBuildVector(getBorrowGenerateShufMask(*CurDAG, dl).getNode()); - return SelectCode(CurDAG->getNode(SPUISD::SUB64_MARKER, dl, OpVT, - N->getOperand(0), N->getOperand(1), - SDValue(CGLoad, 0)).getNode()); + HandleSDNode Dummy(CurDAG->getNode(SPUISD::SUB64_MARKER, dl, OpVT, + N->getOperand(0), N->getOperand(1), + SDValue(CGLoad, 0))); + + CurDAG->ReplaceAllUsesWith(N, Dummy.getValue().getNode()); + SelectCode(Dummy.getValue().getNode()); + return Dummy.getValue().getNode(); } else if (Opc == ISD::MUL && (OpVT == MVT::i64 || OpVT == MVT::v2i64)) { SDNode *CGLoad = emitBuildVector(getCarryGenerateShufMask(*CurDAG, dl).getNode()); - return SelectCode(CurDAG->getNode(SPUISD::MUL64_MARKER, dl, OpVT, - N->getOperand(0), N->getOperand(1), - SDValue(CGLoad, 0)).getNode()); + HandleSDNode Dummy(CurDAG->getNode(SPUISD::MUL64_MARKER, dl, OpVT, + N->getOperand(0), N->getOperand(1), + SDValue(CGLoad, 0))); + CurDAG->ReplaceAllUsesWith(N, Dummy.getValue().getNode()); + SelectCode(Dummy.getValue().getNode()); + return Dummy.getValue().getNode(); } else if (Opc == ISD::TRUNCATE) { SDValue Op0 = N->getOperand(0); if ((Op0.getOpcode() == ISD::SRA || Op0.getOpcode() == ISD::SRL) @@ -832,17 +853,14 @@ } } } else if (Opc == ISD::SHL) { - if (OpVT == MVT::i64) { + if (OpVT == MVT::i64) return SelectSHLi64(N, OpVT); - } } else if (Opc == ISD::SRL) { - if (OpVT == MVT::i64) { + if (OpVT == MVT::i64) return SelectSRLi64(N, OpVT); - } } else if (Opc == ISD::SRA) { - if (OpVT == MVT::i64) { + if (OpVT == MVT::i64) return SelectSRAi64(N, OpVT); - } } else if (Opc == ISD::FNEG && (OpVT == MVT::f64 || OpVT == MVT::v2f64)) { DebugLoc dl = N->getDebugLoc(); From gohman at apple.com Mon Feb 22 19:28:09 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 23 Feb 2010 01:28:09 -0000 Subject: [llvm-commits] [llvm] r96851 - /llvm/trunk/test/Transforms/InstCombine/ptr-int-cast.ll Message-ID: <20100223012809.E9D2D2A6C12C@llvm.org> Author: djg Date: Mon Feb 22 19:28:09 2010 New Revision: 96851 URL: http://llvm.org/viewvc/llvm-project?rev=96851&view=rev Log: Convert this test to FileCheck and add a testcase for PR3574. Modified: llvm/trunk/test/Transforms/InstCombine/ptr-int-cast.ll Modified: llvm/trunk/test/Transforms/InstCombine/ptr-int-cast.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/ptr-int-cast.ll?rev=96851&r1=96850&r2=96851&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/ptr-int-cast.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/ptr-int-cast.ll Mon Feb 22 19:28:09 2010 @@ -1,17 +1,29 @@ -; RUN: opt < %s -instcombine -S > %t +; RUN: opt < %s -instcombine -S | FileCheck %s target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" define i1 @test1(i32 *%x) nounwind { entry: -; RUN: grep {ptrtoint i32\\* %x to i64} %t +; CHECK: test1 +; CHECK: ptrtoint i32* %x to i64 %tmp = ptrtoint i32* %x to i1 ret i1 %tmp } define i32* @test2(i128 %x) nounwind { entry: -; RUN: grep {inttoptr i64 %.mp1 to i32\\*} %t +; CHECK: test2 +; CHECK: inttoptr i64 %tmp1 to i32* %tmp = inttoptr i128 %x to i32* ret i32* %tmp } +; PR3574 +; CHECK: f0 +; CHECK: %tmp = zext i32 %a0 to i64 +; CHECK: ret i64 %tmp +define i64 @f0(i32 %a0) nounwind { + %t0 = inttoptr i32 %a0 to i8* + %t1 = ptrtoint i8* %t0 to i64 + ret i64 %t1 +} + From sabre at nondot.org Mon Feb 22 19:33:17 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 23 Feb 2010 01:33:17 -0000 Subject: [llvm-commits] [llvm] r96852 - /llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp Message-ID: <20100223013317.684072A6C12C@llvm.org> Author: lattner Date: Mon Feb 22 19:33:17 2010 New Revision: 96852 URL: http://llvm.org/viewvc/llvm-project?rev=96852&view=rev Log: hack around more crimes in instruction selection. Modified: llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp Modified: llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp?rev=96852&r1=96851&r2=96852&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp Mon Feb 22 19:33:17 2010 @@ -296,7 +296,8 @@ (SPU::get_ILHUvec_imm(bvNode, *CurDAG, MVT::i64).getNode() != 0) || (SPU::get_vec_u18imm(bvNode, *CurDAG, MVT::i64).getNode() != 0)))) { HandleSDNode Dummy(SDValue(bvNode, 0)); - Select(bvNode); + if (SDNode *N = Select(bvNode)) + return N; return Dummy.getValue().getNode(); } @@ -320,7 +321,8 @@ PseudoSourceValue::getConstantPool(),0, false, false, Alignment)); CurDAG->ReplaceAllUsesWith(SDValue(bvNode, 0), Dummy.getValue()); - SelectCode(Dummy.getValue().getNode()); + if (SDNode *N = SelectCode(Dummy.getValue().getNode())) + return N; return Dummy.getValue().getNode(); } @@ -765,9 +767,8 @@ } SDNode *shufMaskLoad = emitBuildVector(shufMask.getNode()); - SDNode *PromoteScalar = - SelectCode(CurDAG->getNode(SPUISD::PREFSLOT2VEC, dl, - Op0VecVT, Op0).getNode()); + SDNode *PromoteScalar = CurDAG->getNode(SPUISD::PREFSLOT2VEC, dl, + Op0VecVT, Op0).getNode(); SDValue zextShuffle = CurDAG->getNode(SPUISD::SHUFB, dl, OpVecVT, @@ -778,9 +779,13 @@ // N.B.: BIT_CONVERT replaces and updates the zextShuffle node, so we // re-use it in the VEC2PREFSLOT selection without needing to explicitly // call SelectCode (it's already done for us.) - SelectCode(CurDAG->getNode(ISD::BIT_CONVERT, dl, OpVecVT, zextShuffle).getNode()); + HandleSDNode Dummy2(zextShuffle); //CurDAG->getNode(ISD::BIT_CONVERT, dl, OpVecVT, + // zextShuffle)); + + if (SDNode *N = SelectCode(Dummy2.getValue().getNode())) + return N; HandleSDNode Dummy(CurDAG->getNode(SPUISD::VEC2PREFSLOT, dl, OpVT, - zextShuffle)); + Dummy2.getValue())); CurDAG->ReplaceAllUsesWith(N, Dummy.getValue().getNode()); SelectCode(Dummy.getValue().getNode()); @@ -794,7 +799,8 @@ SDValue(CGLoad, 0))); CurDAG->ReplaceAllUsesWith(N, Dummy.getValue().getNode()); - SelectCode(Dummy.getValue().getNode()); + if (SDNode *N = SelectCode(Dummy.getValue().getNode())) + return N; return Dummy.getValue().getNode(); } else if (Opc == ISD::SUB && (OpVT == MVT::i64 || OpVT == MVT::v2i64)) { SDNode *CGLoad = @@ -805,7 +811,8 @@ SDValue(CGLoad, 0))); CurDAG->ReplaceAllUsesWith(N, Dummy.getValue().getNode()); - SelectCode(Dummy.getValue().getNode()); + if (SDNode *N = SelectCode(Dummy.getValue().getNode())) + return N; return Dummy.getValue().getNode(); } else if (Opc == ISD::MUL && (OpVT == MVT::i64 || OpVT == MVT::v2i64)) { SDNode *CGLoad = @@ -815,7 +822,8 @@ N->getOperand(0), N->getOperand(1), SDValue(CGLoad, 0))); CurDAG->ReplaceAllUsesWith(N, Dummy.getValue().getNode()); - SelectCode(Dummy.getValue().getNode()); + if (SDNode *N = SelectCode(Dummy.getValue().getNode())) + return N; return Dummy.getValue().getNode(); } else if (Opc == ISD::TRUNCATE) { SDValue Op0 = N->getOperand(0); @@ -1242,13 +1250,15 @@ ? shufmask.getNode() : emitBuildVector(shufmask.getNode())); - SDNode *shufNode = - Select(CurDAG->getNode(SPUISD::SHUFB, dl, OpVecVT, + SDValue shufNode = + CurDAG->getNode(SPUISD::SHUFB, dl, OpVecVT, SDValue(lhsNode, 0), SDValue(rhsNode, 0), - SDValue(shufMaskNode, 0)).getNode()); - - return CurDAG->getMachineNode(SPU::ORi64_v2i64, dl, OpVT, - SDValue(shufNode, 0)); + SDValue(shufMaskNode, 0)); + HandleSDNode Dummy(shufNode); + SDNode *SN = SelectCode(Dummy.getValue().getNode()); + if (SN == 0) SN = Dummy.getValue().getNode(); + + return CurDAG->getMachineNode(SPU::ORi64_v2i64, dl, OpVT, SDValue(SN, 0)); } else if (i64vec.getOpcode() == ISD::BUILD_VECTOR) { return CurDAG->getMachineNode(SPU::ORi64_v2i64, dl, OpVT, SDValue(emitBuildVector(i64vec.getNode()), 0)); From sabre at nondot.org Mon Feb 22 19:37:39 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 23 Feb 2010 01:37:39 -0000 Subject: [llvm-commits] [llvm] r96854 - /llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp Message-ID: <20100223013739.70C9C2A6C12C@llvm.org> Author: lattner Date: Mon Feb 22 19:37:39 2010 New Revision: 96854 URL: http://llvm.org/viewvc/llvm-project?rev=96854&view=rev Log: fix hte last cellspu failure. Modified: llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp Modified: llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp?rev=96854&r1=96853&r2=96854&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp Mon Feb 22 19:37:39 2010 @@ -767,21 +767,22 @@ } SDNode *shufMaskLoad = emitBuildVector(shufMask.getNode()); - SDNode *PromoteScalar = CurDAG->getNode(SPUISD::PREFSLOT2VEC, dl, - Op0VecVT, Op0).getNode(); - + + HandleSDNode PromoteScalar(CurDAG->getNode(SPUISD::PREFSLOT2VEC, dl, + Op0VecVT, Op0)); + + SDValue PromScalar; + if (SDNode *N = SelectCode(PromoteScalar.getValue().getNode())) + PromScalar = SDValue(N, 0); + else + PromScalar = PromoteScalar.getValue(); + SDValue zextShuffle = CurDAG->getNode(SPUISD::SHUFB, dl, OpVecVT, - SDValue(PromoteScalar, 0), - SDValue(PromoteScalar, 0), + PromScalar, PromScalar, SDValue(shufMaskLoad, 0)); - // N.B.: BIT_CONVERT replaces and updates the zextShuffle node, so we - // re-use it in the VEC2PREFSLOT selection without needing to explicitly - // call SelectCode (it's already done for us.) - HandleSDNode Dummy2(zextShuffle); //CurDAG->getNode(ISD::BIT_CONVERT, dl, OpVecVT, - // zextShuffle)); - + HandleSDNode Dummy2(zextShuffle); if (SDNode *N = SelectCode(Dummy2.getValue().getNode())) return N; HandleSDNode Dummy(CurDAG->getNode(SPUISD::VEC2PREFSLOT, dl, OpVT, From johnny.chen at apple.com Mon Feb 22 19:42:58 2010 From: johnny.chen at apple.com (Johnny Chen) Date: Tue, 23 Feb 2010 01:42:58 -0000 Subject: [llvm-commits] [llvm] r96856 - /llvm/trunk/lib/Target/ARM/ARMInstrNEON.td Message-ID: <20100223014258.E73772A6C12C@llvm.org> Author: johnny Date: Mon Feb 22 19:42:58 2010 New Revision: 96856 URL: http://llvm.org/viewvc/llvm-project?rev=96856&view=rev Log: Added versions of VCGE, VCGT, VCLE, and VCLT NEON instructions which compare to (immediate #0) for disassembly only. A8.6.283, A8.6.285, A8.6.287, A8.6.290 Modified: llvm/trunk/lib/Target/ARM/ARMInstrNEON.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrNEON.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrNEON.td?rev=96856&r1=96855&r2=96856&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrNEON.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrNEON.td Mon Feb 22 19:42:58 2010 @@ -1116,18 +1116,19 @@ // Neon 2-register vector operations -- for disassembly only. // First with only element sizes of 8, 16 and 32 bits: -multiclass N2V_QHS_np op24_23, bits<2> op21_20, bits<2> op17_16, - bits<5> op11_7, bit op4, string opc, string asm> { +multiclass N2V_QHS_cmp op24_23, bits<2> op21_20, bits<2> op17_16, + bits<5> op11_7, bit op4, string opc, string Dt, + string asm> { // 64-bit vector types. def v8i8 : N2V; + opc, !strconcat(Dt, "8"), asm, "", []>; def v4i16 : N2V; + opc, !strconcat(Dt, "16"), asm, "", []>; def v2i32 : N2V; + opc, !strconcat(Dt, "32"), asm, "", []>; def v2f32 : N2V { @@ -1137,13 +1138,13 @@ // 128-bit vector types. def v16i8 : N2V; + opc, !strconcat(Dt, "8"), asm, "", []>; def v8i16 : N2V; + opc, !strconcat(Dt, "16"), asm, "", []>; def v4i32 : N2V; + opc, !strconcat(Dt, "32"), asm, "", []>; def v4f32 : N2V { @@ -1990,7 +1991,8 @@ def VCEQfq : N3VQ<0,0,0b00,0b1110,0, IIC_VBINQ, "vceq", "f32", v4i32, v4f32, NEONvceq, 1>; // For disassembly only. -defm VCEQz : N2V_QHS_np<0b11,0b11,0b01,0b00010,0, "vceq", "$dst, $src, #0">; +defm VCEQz : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00010, 0, "vceq", "i", + "$dst, $src, #0">; // VCGE : Vector Compare Greater Than or Equal defm VCGEs : N3V_QHS<0, 0, 0b0011, 1, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, @@ -2001,6 +2003,13 @@ v2i32, v2f32, NEONvcge, 0>; def VCGEfq : N3VQ<1,0,0b00,0b1110,0, IIC_VBINQ, "vcge", "f32", v4i32, v4f32, NEONvcge, 0>; +// For disassembly only. +defm VCGEz : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00001, 0, "vcge", "s", + "$dst, $src, #0">; +// For disassembly only. +defm VCLEz : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00011, 0, "vcle", "s", + "$dst, $src, #0">; + // VCGT : Vector Compare Greater Than defm VCGTs : N3V_QHS<0, 0, 0b0011, 0, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, IIC_VBINi4Q, "vcgt", "s", NEONvcgt, 0>; @@ -2010,6 +2019,13 @@ NEONvcgt, 0>; def VCGTfq : N3VQ<1,0,0b10,0b1110,0, IIC_VBINQ, "vcgt", "f32", v4i32, v4f32, NEONvcgt, 0>; +// For disassembly only. +defm VCGTz : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00000, 0, "vcgt", "s", + "$dst, $src, #0">; +// For disassembly only. +defm VCLTz : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00100, 0, "vclt", "s", + "$dst, $src, #0">; + // VACGE : Vector Absolute Compare Greater Than or Equal (aka VCAGE) def VACGEd : N3VDInt<1, 0, 0b00, 0b1110, 1, IIC_VBIND, "vacge", "f32", v2i32, v2f32, int_arm_neon_vacged, 0>; From sabre at nondot.org Mon Feb 22 20:07:48 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 23 Feb 2010 02:07:48 -0000 Subject: [llvm-commits] [llvm] r96859 - in /llvm/trunk/lib/Target/X86: X86ISelLowering.cpp X86ISelLowering.h X86InstrMMX.td Message-ID: <20100223020749.1A4D92A6C12C@llvm.org> Author: lattner Date: Mon Feb 22 20:07:48 2010 New Revision: 96859 URL: http://llvm.org/viewvc/llvm-project?rev=96859&view=rev Log: X86InstrInfoSSE.td declares PINSRW as having type v8i16, don't alis it in the MMX .td file with a different width, split into two X86ISD opcodes. This fixes an x86 testcase. Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp llvm/trunk/lib/Target/X86/X86ISelLowering.h llvm/trunk/lib/Target/X86/X86InstrMMX.td Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=96859&r1=96858&r2=96859&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Mon Feb 22 20:07:48 2010 @@ -4817,8 +4817,16 @@ if ((EltVT.getSizeInBits() == 8 || EltVT.getSizeInBits() == 16) && isa(N2)) { - unsigned Opc = (EltVT.getSizeInBits() == 8) ? X86ISD::PINSRB - : X86ISD::PINSRW; + unsigned Opc; + if (VT == MVT::v8i16) + Opc = X86ISD::PINSRW; + else if (VT == MVT::v4i16) + Opc = X86ISD::MMX_PINSRW; + else if (VT == MVT::v16i8) + Opc = X86ISD::PINSRB; + else + Opc = X86ISD::PINSRB; + // Transform it so it match pinsr{b,w} which expects a GR32 as its second // argument. if (N1.getValueType() != MVT::i32) @@ -4869,7 +4877,8 @@ N1 = DAG.getNode(ISD::ANY_EXTEND, dl, MVT::i32, N1); if (N2.getValueType() != MVT::i32) N2 = DAG.getIntPtrConstant(cast(N2)->getZExtValue()); - return DAG.getNode(X86ISD::PINSRW, dl, VT, N0, N1, N2); + return DAG.getNode(VT == MVT::v8i16 ? X86ISD::PINSRW : X86ISD::MMX_PINSRW, + dl, VT, N0, N1, N2); } return SDValue(); } @@ -7663,6 +7672,7 @@ case X86ISD::INSERTPS: return "X86ISD::INSERTPS"; case X86ISD::PINSRB: return "X86ISD::PINSRB"; case X86ISD::PINSRW: return "X86ISD::PINSRW"; + case X86ISD::MMX_PINSRW: return "X86ISD::MMX_PINSRW"; case X86ISD::PSHUFB: return "X86ISD::PSHUFB"; case X86ISD::FMAX: return "X86ISD::FMAX"; case X86ISD::FMIN: return "X86ISD::FMIN"; Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.h?rev=96859&r1=96858&r2=96859&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.h (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.h Mon Feb 22 20:07:48 2010 @@ -180,7 +180,7 @@ /// PINSRW - Insert the lower 16-bits of a 32-bit value to a vector, /// corresponds to X86::PINSRW. - PINSRW, + PINSRW, MMX_PINSRW, /// PSHUFB - Shuffle 16 8-bit values within a vector. PSHUFB, Modified: llvm/trunk/lib/Target/X86/X86InstrMMX.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrMMX.td?rev=96859&r1=96858&r2=96859&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrMMX.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrMMX.td Mon Feb 22 20:07:48 2010 @@ -426,13 +426,15 @@ // Extract / Insert -def MMX_X86pextrw : SDNode<"X86ISD::PEXTRW", SDTypeProfile<1, 2, []>, []>; -def MMX_X86pinsrw : SDNode<"X86ISD::PINSRW", SDTypeProfile<1, 3, []>, []>; +def MMX_X86pinsrw : SDNode<"X86ISD::MMX_PINSRW", + SDTypeProfile<1, 3, [SDTCisVT<0, v4i16>, SDTCisSameAs<0,1>, + SDTCisVT<2, i32>, SDTCisPtrTy<3>]>>; + def MMX_PEXTRWri : MMXIi8<0xC5, MRMSrcReg, (outs GR32:$dst), (ins VR64:$src1, i16i8imm:$src2), "pextrw\t{$src2, $src1, $dst|$dst, $src1, $src2}", - [(set GR32:$dst, (MMX_X86pextrw (v4i16 VR64:$src1), + [(set GR32:$dst, (X86pextrw (v4i16 VR64:$src1), (iPTR imm:$src2)))]>; let Constraints = "$src1 = $dst" in { def MMX_PINSRWrri : MMXIi8<0xC4, MRMSrcReg, From daniel at zuster.org Mon Feb 22 20:09:27 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 02:09:27 -0000 Subject: [llvm-commits] [test-suite] r96860 - /test-suite/trunk/MultiSource/Applications/Burg/main.c Message-ID: <20100223020927.4654A2A6C12C@llvm.org> Author: ddunbar Date: Mon Feb 22 20:09:27 2010 New Revision: 96860 URL: http://llvm.org/viewvc/llvm-project?rev=96860&view=rev Log: main() should return int. Modified: test-suite/trunk/MultiSource/Applications/Burg/main.c Modified: test-suite/trunk/MultiSource/Applications/Burg/main.c URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Applications/Burg/main.c?rev=96860&r1=96859&r2=96860&view=diff ============================================================================== --- test-suite/trunk/MultiSource/Applications/Burg/main.c (original) +++ test-suite/trunk/MultiSource/Applications/Burg/main.c Mon Feb 22 20:09:27 2010 @@ -15,9 +15,9 @@ static char version[] = "BURG, Version 1.0"; -extern void main ARGS((int argc, char **argv)); +extern int main ARGS((int argc, char **argv)); -void +int main(argc, argv) int argc; char **argv; { int i; @@ -179,4 +179,5 @@ yypurge(); exit(0); + return 0; } From daniel at zuster.org Mon Feb 22 20:09:29 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 02:09:29 -0000 Subject: [llvm-commits] [test-suite] r96861 - in /test-suite/trunk: Makefile.rules Makefile.tests Message-ID: <20100223020929.A7FB72A6C12D@llvm.org> Author: ddunbar Date: Mon Feb 22 20:09:29 2010 New Revision: 96861 URL: http://llvm.org/viewvc/llvm-project?rev=96861&view=rev Log: Switch to using LCC_PROGRAMS Makefile variable for the LCC subprograms (for having proper dependencies on the compiler changing); which is more generic than expecting a cc1 executable. Modified: test-suite/trunk/Makefile.rules test-suite/trunk/Makefile.tests Modified: test-suite/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Makefile.rules?rev=96861&r1=96860&r2=96861&view=diff ============================================================================== --- test-suite/trunk/Makefile.rules (original) +++ test-suite/trunk/Makefile.rules Mon Feb 22 20:09:29 2010 @@ -814,9 +814,7 @@ endif -LCC1 := $(LLVMCC1) -LCC1XX := $(LLVMCC1PLUS) - +LCC_PROGRAMS := $(LLVMCC1) $(LLVMCC1PLUS) #--------------------------------------------------------- .PRECIOUS: $(PROJ_OBJ_DIR)/Depend/.dir $(PROJ_OBJ_DIR)/BytecodeObj/.dir @@ -842,10 +840,10 @@ $(PROJ_OBJ_DIR)/Debug/%.lo: %.c $(PROJ_OBJ_DIR)/Debug/.dir $(CompileCG) $< -o $@ -$(PROJ_OBJ_DIR)/BytecodeObj/%.bc: %.cpp $(PROJ_OBJ_DIR)/BytecodeObj/.dir $(LCC1XX) +$(PROJ_OBJ_DIR)/BytecodeObj/%.bc: %.cpp $(PROJ_OBJ_DIR)/BytecodeObj/.dir $(LCC_PROGRAMS) $(LLVMGXX) $(CPPFLAGS) -c $< -o $@ -$(PROJ_OBJ_DIR)/BytecodeObj/%.bc: %.c $(PROJ_OBJ_DIR)/BytecodeObj/.dir $(LCC1) +$(PROJ_OBJ_DIR)/BytecodeObj/%.bc: %.c $(PROJ_OBJ_DIR)/BytecodeObj/.dir $(LCC_PROGRAMS) $(LLVMGCC) $(CPPFLAGS) -c $< -o $@ $(PROJ_OBJ_DIR)/BytecodeObj/%.bc: %.ll $(PROJ_OBJ_DIR)/BytecodeObj/.dir $(LLVMAS) Modified: test-suite/trunk/Makefile.tests URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Makefile.tests?rev=96861&r1=96860&r2=96861&view=diff ============================================================================== --- test-suite/trunk/Makefile.tests (original) +++ test-suite/trunk/Makefile.tests Mon Feb 22 20:09:29 2010 @@ -38,27 +38,27 @@ $(RM) -rf Output/ # Compile from X.c to Output/X.bc -Output/%.bc: %.c $(LCC1) Output/.dir $(INCLUDES) +Output/%.bc: %.c $(LCC_PROGRAMS) Output/.dir $(INCLUDES) -$(LLVMGCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -c $< -o $@ -emit-llvm # Compile from X.cpp to Output/X.bc -Output/%.bc: %.cpp $(LCC1XX) Output/.dir $(INCLUDES) +Output/%.bc: %.cpp $(LCC_PROGRAMS) Output/.dir $(INCLUDES) -$(LLVMGXX) $(CPPFLAGS) $(CXXFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -c $< -o $@ -emit-llvm # Compile from X.cc to Output/X.bc -Output/%.bc: %.cc $(LCC1XX) Output/.dir $(INCLUDES) +Output/%.bc: %.cc $(LCC_PROGRAMS) Output/.dir $(INCLUDES) -$(LLVMGXX) $(CPPFLAGS) $(CXXFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -c $< -o $@ -emit-llvm # Compile from X.C to Output/X.bc -Output/%.bc: %.C $(LCC1XX) Output/.dir $(INCLUDES) +Output/%.bc: %.C $(LCC_PROGRAMS) Output/.dir $(INCLUDES) -$(LLVMGXX) $(CPPFLAGS) $(CXXFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -c $< -o $@ -emit-llvm # Compile from X.m to Output/X.bc -Output/%.bc: %.m $(LCC1) Output/.dir $(INCLUDES) +Output/%.bc: %.m $(LCC_PROGRAMS) Output/.dir $(INCLUDES) -$(LLVMGCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -c $< -o $@ -emit-llvm # Compile from X.mm to Output/X.bc -Output/%.bc: %.mm $(LCC1XX) Output/.dir $(INCLUDES) +Output/%.bc: %.mm $(LCC_PROGRAMS) Output/.dir $(INCLUDES) -$(LLVMGXX) $(CPPFLAGS) $(CXXFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -c $< -o $@ -emit-llvm # LLVM Assemble from X.ll to Output/X.bc. Because we are coming directly from From daniel at zuster.org Mon Feb 22 20:09:31 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 02:09:31 -0000 Subject: [llvm-commits] [test-suite] r96862 - /test-suite/trunk/Makefile.rules Message-ID: <20100223020931.6AE5C2A6C12E@llvm.org> Author: ddunbar Date: Mon Feb 22 20:09:31 2010 New Revision: 96862 URL: http://llvm.org/viewvc/llvm-project?rev=96862&view=rev Log: Remove unused make variables. Modified: test-suite/trunk/Makefile.rules Modified: test-suite/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Makefile.rules?rev=96862&r1=96861&r2=96862&view=diff ============================================================================== --- test-suite/trunk/Makefile.rules (original) +++ test-suite/trunk/Makefile.rules Mon Feb 22 20:09:31 2010 @@ -135,8 +135,6 @@ # Variables derived from configuration options... #-------------------------------------------------------------------- -BURG_OPTS = -I - ifeq ($(ENABLE_PROFILING),1) ENABLE_OPTIMIZED = 1 CONFIGURATION := Profile @@ -259,9 +257,6 @@ #-------------------------------------------------------------------------- # Utilities used while building the LLVM tree, which live in the utils dir # -BURG := $(LLVMTOOLCURRENT)/burg$(EXEEXT) -RunBurg := $(BURG) $(BURG_OPTS) -TBLGEN := $(LLVMTOOLCURRENT)/tblgen$(EXEEXT) LLVMLDPROG := $(LLVMTOOLCURRENT)/llvm-ld$(EXEEXT) #-------------------------------------------------------------------------- @@ -290,7 +285,6 @@ LPROF = $(LLVMTOOLCURRENT)/llvm-prof$(EXEEXT) LBUGPOINT = $(LLVMTOOLCURRENT)/bugpoint$(EXEEXT) LFINDMISOPT= $(LLVM_SRC_ROOT)/utils/findmisopt -LLVMC = $(LLVMTOOLCURRENT)/llvmc$(EXEEXT) From daniel at zuster.org Mon Feb 22 20:09:33 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 02:09:33 -0000 Subject: [llvm-commits] [test-suite] r96863 - /test-suite/trunk/Makefile.rules Message-ID: <20100223020933.1F6882A6C12F@llvm.org> Author: ddunbar Date: Mon Feb 22 20:09:32 2010 New Revision: 96863 URL: http://llvm.org/viewvc/llvm-project?rev=96863&view=rev Log: Stop passing -L...libgccdirpath... to llvm-ld, this shouldn't be needed (and if it is, this isn't the right solution). Modified: test-suite/trunk/Makefile.rules Modified: test-suite/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Makefile.rules?rev=96863&r1=96862&r2=96863&view=diff ============================================================================== --- test-suite/trunk/Makefile.rules (original) +++ test-suite/trunk/Makefile.rules Mon Feb 22 20:09:32 2010 @@ -278,7 +278,7 @@ # Makefile.rules) LLI = $(LLVMTOOLCURRENT)/lli$(EXEEXT) LLC = $(LLVMTOOLCURRENT)/llc$(EXEEXT) -LLVMLD = $(LLVMLDPROG) -L$(LLVMGCCLIBDIR) -L$(LLVMGCCDIR)/lib +LLVMLD = $(LLVMLDPROG) LDIS = $(LLVMTOOLCURRENT)/llvm-dis$(EXEEXT) LOPT = $(LLVMTOOLCURRENT)/opt$(EXEEXT) LLINK = $(LLVMTOOLCURRENT)/llvm-link$(EXEEXT) From daniel at zuster.org Mon Feb 22 20:09:35 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 02:09:35 -0000 Subject: [llvm-commits] [test-suite] r96864 - in /test-suite/trunk: Makefile.dummylib Makefile.programs Makefile.rules MultiSource/Makefile.multisrc Message-ID: <20100223020935.883D32A6C12C@llvm.org> Author: ddunbar Date: Mon Feb 22 20:09:35 2010 New Revision: 96864 URL: http://llvm.org/viewvc/llvm-project?rev=96864&view=rev Log: Inline LLVMLDPROG into LLVMLD. Modified: test-suite/trunk/Makefile.dummylib test-suite/trunk/Makefile.programs test-suite/trunk/Makefile.rules test-suite/trunk/MultiSource/Makefile.multisrc Modified: test-suite/trunk/Makefile.dummylib URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Makefile.dummylib?rev=96864&r1=96863&r2=96864&view=diff ============================================================================== --- test-suite/trunk/Makefile.dummylib (original) +++ test-suite/trunk/Makefile.dummylib Mon Feb 22 20:09:35 2010 @@ -20,4 +20,4 @@ LINKED_PROGS := $(PROGRAMS_TO_TEST:%=Output/%.lib.bc) $(LINKED_PROGS): Output/%.lib.bc: Output/%.llvm.bc $(DUMMYLIB) - $(LLVMLDPROG) --link-as-library $< $(DUMMYLIB) -o $@ + $(LLVMLD) --link-as-library $< $(DUMMYLIB) -o $@ Modified: test-suite/trunk/Makefile.programs URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Makefile.programs?rev=96864&r1=96863&r2=96864&view=diff ============================================================================== --- test-suite/trunk/Makefile.programs (original) +++ test-suite/trunk/Makefile.programs Mon Feb 22 20:09:35 2010 @@ -283,7 +283,7 @@ endif $(PROGRAMS_TO_TEST:%=Output/%.llvm): \ -Output/%.llvm: Output/%.linked.bc $(LLVMLDPROG) +Output/%.llvm: Output/%.linked.bc $(LLVMLD) $(RUNTOOLSAFELY) $(LLVMLD) -info-output-file=$(CURDIR)/$@.info $(STATS) $< \ $(EXTRA_LINKTIME_OPT_FLAGS) $(LLVMLD_FLAGS) -lc $(LIBS) -o Output/$*.llvm ifneq ($(OPTPASSES),) @@ -292,33 +292,33 @@ endif $(PROGRAMS_TO_TEST:%=Output/%.llvm.optbeta.bc): \ -Output/%.llvm.optbeta.bc: Output/%.linked.optbeta.bc $(LLVMLDPROG) +Output/%.llvm.optbeta.bc: Output/%.linked.optbeta.bc $(LLVMLD) $(RUNTOOLSAFELY) $(LLVMLD) -info-output-file=$(CURDIR)/$@.info $(STATS) $< \ $(EXTRA_LINKTIME_OPT_FLAGS) $(LLVMLD_FLAGS) -lc $(LIBS) -o Output/$*.llvm.optbeta $(PROGRAMS_TO_TEST:%=Output/%.llvm.optbeta): \ -Output/%.llvm.optbeta: Output/%.linked.optbeta.bc $(LLVMLDPROG) +Output/%.llvm.optbeta: Output/%.linked.optbeta.bc $(LLVMLD) $(RUNTOOLSAFELY) $(LLVMLD) -info-output-file=$(CURDIR)/$@.info $(STATS) $< \ $(EXTRA_LINKTIME_OPT_FLAGS) $(LLVMLD_FLAGS) -lc $(LIBS) -o Output/$*.llvm.optbeta $(PROGRAMS_TO_TEST:%=Output/%.noopt-llvm.bc): \ -Output/%.noopt-llvm.bc: Output/%.linked.rbc $(LLVMLDPROG) +Output/%.noopt-llvm.bc: Output/%.linked.rbc $(LLVMLD) $(RUNTOOLSAFELY) $(LLVMLD) -disable-opt -info-output-file=$(CURDIR)/$@.info $(STATS) $< \ $(LLVMLD_FLAGS) -lc $(LIBS) -o Output/$*.noopt-llvm $(PROGRAMS_TO_TEST:%=Output/%.noopt-llvm): \ -Output/%.noopt-llvm: Output/%.linked.rbc $(LLVMLDPROG) +Output/%.noopt-llvm: Output/%.linked.rbc $(LLVMLD) $(RUNTOOLSAFELY) $(LLVMLD) -disable-opt -info-output-file=$(CURDIR)/$@.info $(STATS) $< \ $(LLVMLD_FLAGS) -lc $(LIBS) -o Output/$*.noopt-llvm $(PROGRAMS_TO_TEST:%=Output/%.nollvm-ldopt-llvm.bc): \ -Output/%.nollvm-ldopt-llvm.bc: Output/%.linked.bc $(LLVMLDPROG) +Output/%.nollvm-ldopt-llvm.bc: Output/%.linked.bc $(LLVMLD) $(RUNTOOLSAFELY) $(LLVMLD) -disable-opt -info-output-file=$(CURDIR)/$@.info $(STATS) $< \ $(LLVMLD_FLAGS) -lc $(LIBS) -o Output/$*.nollvm-ldopt-llvm $(PROGRAMS_TO_TEST:%=Output/%.nollvm-ldopt-llvm): \ -Output/%.nollvm-ldopt-llvm: Output/%.linked.rbc $(LLVMLDPROG) +Output/%.nollvm-ldopt-llvm: Output/%.linked.rbc $(LLVMLD) $(RUNTOOLSAFELY) $(LLVMLD) -disable-opt -info-output-file=$(CURDIR)/$@.info $(STATS) $< \ $(LLVMLD_FLAGS) -lc $(LIBS) -o Output/$*.nollvm-ldopt-llvm Modified: test-suite/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Makefile.rules?rev=96864&r1=96863&r2=96864&view=diff ============================================================================== --- test-suite/trunk/Makefile.rules (original) +++ test-suite/trunk/Makefile.rules Mon Feb 22 20:09:35 2010 @@ -255,11 +255,6 @@ ########################################################################### #-------------------------------------------------------------------------- -# Utilities used while building the LLVM tree, which live in the utils dir -# -LLVMLDPROG := $(LLVMTOOLCURRENT)/llvm-ld$(EXEEXT) - -#-------------------------------------------------------------------------- # The LLVM GCC front-end in C and C++ flavors # ifeq ($(LLVMGCC_MAJVERS),3) @@ -278,7 +273,7 @@ # Makefile.rules) LLI = $(LLVMTOOLCURRENT)/lli$(EXEEXT) LLC = $(LLVMTOOLCURRENT)/llc$(EXEEXT) -LLVMLD = $(LLVMLDPROG) +LLVMLD = $(LLVMTOOLCURRENT)/llvm-ld$(EXEEXT) LDIS = $(LLVMTOOLCURRENT)/llvm-dis$(EXEEXT) LOPT = $(LLVMTOOLCURRENT)/opt$(EXEEXT) LLINK = $(LLVMTOOLCURRENT)/llvm-link$(EXEEXT) Modified: test-suite/trunk/MultiSource/Makefile.multisrc URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Makefile.multisrc?rev=96864&r1=96863&r2=96864&view=diff ============================================================================== --- test-suite/trunk/MultiSource/Makefile.multisrc (original) +++ test-suite/trunk/MultiSource/Makefile.multisrc Mon Feb 22 20:09:35 2010 @@ -53,8 +53,8 @@ ifndef USE_PRECOMPILED_BYTECODE $(PROGRAMS_TO_TEST:%=Output/%.linked.rbc): \ -Output/%.linked.rbc: $(LObjects) $(LLVMLDPROG) - -$(LLVMLDPROG) -link-as-library -disable-opt $(LObjects) -o $@ +Output/%.linked.rbc: $(LObjects) $(LLVMLD) + -$(LLVMLD) -link-as-library -disable-opt $(LObjects) -o $@ $(PROGRAMS_TO_TEST:%=Output/%.LOC.txt): \ Output/%.LOC.txt: $(Source) From daniel at zuster.org Mon Feb 22 20:09:43 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 02:09:43 -0000 Subject: [llvm-commits] [test-suite] r96868 - in /test-suite/trunk: TEST.fourway-debuginfo.Makefile TEST.fourway-debuginfo.report TEST.fourway-time.Makefile TEST.fourway-time.report TEST.fourway.Makefile TEST.fourway.report fourway.Makefile Message-ID: <20100223020943.883CD2A6C12C@llvm.org> Author: ddunbar Date: Mon Feb 22 20:09:43 2010 New Revision: 96868 URL: http://llvm.org/viewvc/llvm-project?rev=96868&view=rev Log: Remove TEST=fourway, no one uses this. Removed: test-suite/trunk/TEST.fourway-debuginfo.Makefile test-suite/trunk/TEST.fourway-debuginfo.report test-suite/trunk/TEST.fourway-time.Makefile test-suite/trunk/TEST.fourway-time.report test-suite/trunk/TEST.fourway.Makefile test-suite/trunk/TEST.fourway.report test-suite/trunk/fourway.Makefile Removed: test-suite/trunk/TEST.fourway-debuginfo.Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/TEST.fourway-debuginfo.Makefile?rev=96867&view=auto ============================================================================== --- test-suite/trunk/TEST.fourway-debuginfo.Makefile (original) +++ test-suite/trunk/TEST.fourway-debuginfo.Makefile (removed) @@ -1,22 +0,0 @@ -##===- TEST.fourway.Makefile -------------------------------*- Makefile -*-===## -# -# This test tries running the gcc and llvm-gcc compilers on all of the programs -# with and without debuginfo and reports on resulting sizes. -# -##===----------------------------------------------------------------------===## - -include $(LEVEL)/fourway.Makefile - -$(PROGRAMS_TO_TEST:%=test.$(TEST).%): \ -test.$(TEST).%: $(LLVMGCC) $(LLVMGXX) \ -Output/%.report.$(TEST).txt \ -Output/%.gcc.nodebug.size \ -Output/%.gcc.debug.size \ -Output/%.llvmgcc.nodebug.size \ -Output/%.llvmgcc.debug.size - @-cat Output/$*.gcc.nodebug.size - @-cat Output/$*.gcc.debug.size - @-cat Output/$*.llvmgcc.nodebug.size - @-cat Output/$*.llvmgcc.debug.size - - Removed: test-suite/trunk/TEST.fourway-debuginfo.report URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/TEST.fourway-debuginfo.report?rev=96867&view=auto ============================================================================== --- test-suite/trunk/TEST.fourway-debuginfo.report (original) +++ test-suite/trunk/TEST.fourway-debuginfo.report (removed) @@ -1,50 +0,0 @@ -##=== TEST.fourway.report - Report description for llc tests ---*- perl -*-===## -# -# This file defines a report to be generated for the fourway-debuginfo test. -# -##===----------------------------------------------------------------------===## - -# Sort by name -$SortCol = 1; -$TrimRepeatedPrefix = 1; -my $ExtTextSize = '(\d+)\s+\d+\s+\d+\s+\d+\s+\d+\s+[0-9a-fA-F]+'; -my $ExtDataSize = '\d+\s+(\d+)\s+\d+\s+\d+\s+\d+\s+[0-9a-fA-F]+'; -my $ExtObjSize = '\d+\s+\d+\s+(\d+)\s+\d+\s+\d+\s+[0-9a-fA-F]+'; -my $ExtOtherSize = '\d+\s+\d+\s+\d+\s+(\d+)\s+\d+\s+[0-9a-fA-F]+'; -my $ExtTotalSize = '\d+\s+\d+\s+\d+\s+\d+\s+(\d+)\s+[0-9a-fA-F]+'; - -sub Percentage { - my ($Cols, $Col) = @_; - my $GCC = $Cols->[$Col-2]; - my $LLVMGCC = $Cols->[$Col-1]; - return "n/a" if ($GCC eq "*" or $LLVMGCC eq "*"); - return sprintf("%5.1f%%", $LLVMGCC / $GCC * 100) - if ($GCC > 0 and $LLVMGCC > 0); - return " -"; -} - -# These are the columns for the report. The first entry is the header for the -# column, the second is the regex to use to match the value. Empty list create -# seperators, and closures may be put in for custom processing. -( -# Name - ["Name:" , '\'([^\']+)\' Program'], - [], -# Text Sizes - ["Text GND", "${ExtTextSize}gcc.nodebug"], - ["Text GD", "${ExtTextSize}gcc.debug"], - ["Text LND", "${ExtTextSize}llvmgcc.nodebug"], - ["Text LD", "${ExtTextSize}llvmgcc.debug"], - [], -# Other Sizes - ["Debug* GCC", "${ExtOtherSize}gcc.debug"], - ["Debug* LLVM-GCC", "${ExtOtherSize}llvmgcc.debug"], - ["Debug* %", \&Percentage], - [], -# Total Sizes - ["Total GND", "${ExtTotalSize}gcc.nodebug"], - ["Total GD", "${ExtTotalSize}gcc.debug"], - ["Total LND", "${ExtTotalSize}llvmgcc.nodebug"], - ["Total LD", "${ExtTotalSize}llvmgcc.debug"], - [], - ); Removed: test-suite/trunk/TEST.fourway-time.Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/TEST.fourway-time.Makefile?rev=96867&view=auto ============================================================================== --- test-suite/trunk/TEST.fourway-time.Makefile (original) +++ test-suite/trunk/TEST.fourway-time.Makefile (removed) @@ -1,22 +0,0 @@ -##===- TEST.fourway.Makefile -------------------------------*- Makefile -*-===## -# -# This test tries running the gcc and llvm-gcc compilers on all of the programs -# with and without debuginfo and reports on compile time. -# -##===----------------------------------------------------------------------===## - -include $(LEVEL)/fourway.Makefile - -$(PROGRAMS_TO_TEST:%=test.$(TEST).%): \ -test.$(TEST).%: $(LLVMGCC) $(LLVMGXX) \ -Output/%.report.$(TEST).txt \ -Output/%.gcc.nodebug.time \ -Output/%.gcc.debug.time \ -Output/%.llvmgcc.nodebug.time \ -Output/%.llvmgcc.debug.time - @-cat Output/$*.gcc.nodebug.time - @-cat Output/$*.gcc.debug.time - @-cat Output/$*.llvmgcc.nodebug.time - @-cat Output/$*.llvmgcc.debug.time - - Removed: test-suite/trunk/TEST.fourway-time.report URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/TEST.fourway-time.report?rev=96867&view=auto ============================================================================== --- test-suite/trunk/TEST.fourway-time.report (original) +++ test-suite/trunk/TEST.fourway-time.report (removed) @@ -1,38 +0,0 @@ -##=== TEST.fourway.report - Report description for llc tests ---*- perl -*-===## -# -# This file defines a report to be generated for the fourway-time test. -# -##===----------------------------------------------------------------------===## - -# Sort by name -$SortCol = 1; -$TrimRepeatedPrefix = 1; - -sub Percentage { - my ($Cols, $Col) = @_; - my $GCC = $Cols->[$Col-5]; - my $LLVMGCC = $Cols->[$Col-4]; - return "n/a" if ($GCC eq "*" or $LLVMGCC eq "*"); - return sprintf("%5.1f%%", $LLVMGCC / $GCC * 100) - if ($GCC >= 0.01 and $LLVMGCC >= 0.01); - return " -"; -} - -# These are the columns for the report. The first entry is the header for the -# column, the second is the regex to use to match the value. Empty list create -# seperators, and closures may be put in for custom processing. -( -# Name - ["Name:" , '\'([^\']+)\' Program'], - [], -# Times - ["Time GND", 'real ([0-9.]+)gcc\.nodebug'], - ["Time GD", 'real ([0-9.]+)gcc\.debug'], - ["Time LND", 'real ([0-9.]+)llvmgcc\.nodebug'], - ["Time LD", 'real ([0-9.]+)llvmgcc\.debug'], - [], -# Time Ratios - ["No Debug", \&Percentage], - ["Debug", \&Percentage], - [], - ); Removed: test-suite/trunk/TEST.fourway.Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/TEST.fourway.Makefile?rev=96867&view=auto ============================================================================== --- test-suite/trunk/TEST.fourway.Makefile (original) +++ test-suite/trunk/TEST.fourway.Makefile (removed) @@ -1,30 +0,0 @@ -##===- TEST.fourway.Makefile -------------------------------*- Makefile -*-===## -# -# This test tries running the gcc and llvm-gcc compilers on all of the programs -# with and without debuginfo and reports on compile time and resulting sizes. -# -##===----------------------------------------------------------------------===## - -include $(LEVEL)/fourway.Makefile - -$(PROGRAMS_TO_TEST:%=test.$(TEST).%): \ -test.$(TEST).%: $(LLVMGCC) $(LLVMGXX) \ -Output/%.report.$(TEST).txt \ -Output/%.gcc.nodebug.time \ -Output/%.gcc.debug.time \ -Output/%.llvmgcc.nodebug.time \ -Output/%.llvmgcc.debug.time \ -Output/%.gcc.nodebug.size \ -Output/%.gcc.debug.size \ -Output/%.llvmgcc.nodebug.size \ -Output/%.llvmgcc.debug.size - @-cat Output/$*.gcc.nodebug.time - @-cat Output/$*.gcc.debug.time - @-cat Output/$*.llvmgcc.nodebug.time - @-cat Output/$*.llvmgcc.debug.time - @-cat Output/$*.gcc.nodebug.size - @-cat Output/$*.gcc.debug.size - @-cat Output/$*.llvmgcc.nodebug.size - @-cat Output/$*.llvmgcc.debug.size - - Removed: test-suite/trunk/TEST.fourway.report URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/TEST.fourway.report?rev=96867&view=auto ============================================================================== --- test-suite/trunk/TEST.fourway.report (original) +++ test-suite/trunk/TEST.fourway.report (removed) @@ -1,49 +0,0 @@ -##=== TEST.fourway.report - Report description for llc tests ---*- perl -*-===## -# -# This file defines a report to be generated for the fourway test. -# -##===----------------------------------------------------------------------===## - -# Sort by name -$SortCol = 1; -$TrimRepeatedPrefix = 1; -my $ExtTextSize = '(\d+)\s+\d+\s+\d+\s+\d+\s+\d+\s+[0-9a-fA-F]+'; -my $ExtDataSize = '\d+\s+(\d+)\s+\d+\s+\d+\s+\d+\s+[0-9a-fA-F]+'; -my $ExtObjSize = '\d+\s+\d+\s+(\d+)\s+\d+\s+\d+\s+[0-9a-fA-F]+'; -my $ExtOtherSize = '\d+\s+\d+\s+\d+\s+(\d+)\s+\d+\s+[0-9a-fA-F]+'; -my $ExtTotalSize = '\d+\s+\d+\s+\d+\s+\d+\s+(\d+)\s+[0-9a-fA-F]+'; - -# These are the columns for the report. The first entry is the header for the -# column, the second is the regex to use to match the value. Empty list create -# seperators, and closures may be put in for custom processing. -( -# Name - ["Name:" , '\'([^\']+)\' Program'], - [], -# Times - ["Time GND", 'real ([0-9.]+)gcc\.nodebug'], - ["Time GD", 'real ([0-9.]+)gcc\.debug'], - ["Time LND", 'real ([0-9.]+)llvmgcc\.nodebug'], - ["Time LD", 'real ([0-9.]+)llvmgcc\.debug'], - [], -# Text Sizes - ["Text GND", "${ExtTextSize}gcc.nodebug"], - ["Text GD", "${ExtTextSize}gcc.debug"], - ["Text LND", "${ExtTextSize}llvmgcc.nodebug"], - ["Text LD", "${ExtTextSize}llvmgcc.debug"], - [], -# Data Sizes - ["Data GCC", "${ExtDataSize}gcc.nodebug"], - ["Data LLVM-GCC", "${ExtDataSize}llvmgcc.nodebug"], - [], -# Other Sizes - ["Other(Debug) GCC", "${ExtOtherSize}gcc.debug"], - ["Other(Debug) LLVM-GCC", "${ExtOtherSize}llvmgcc.debug"], - [], -# Total Sizes - ["Total GND", "${ExtTotalSize}gcc.nodebug"], - ["Total GD", "${ExtTotalSize}gcc.debug"], - ["Total LND", "${ExtTotalSize}llvmgcc.nodebug"], - ["Total LD", "${ExtTotalSize}llvmgcc.debug"], - [], - ); Removed: test-suite/trunk/fourway.Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/fourway.Makefile?rev=96867&view=auto ============================================================================== --- test-suite/trunk/fourway.Makefile (original) +++ test-suite/trunk/fourway.Makefile (removed) @@ -1,73 +0,0 @@ -##===- fourway.Makefile ------------------------------------*- Makefile -*-===## -# -# This file is intended to be included in four-way (gcc vs. llvm-gcc by -# debug vs. non-debug) reports, to provide raw data generating targets. -# -##===----------------------------------------------------------------------===## - -Output/%.report.$(TEST).txt: - @echo "---------------------------------------------------------------" - @echo ">>> ========= '$*' Program" - @echo "---------------------------------------------------------------" - - -Output/%.gcc.nodebug.o: %.cpp Output/.dir - @-(time -p $(CXX) $*.cpp -O0 -c -o $@) 2>&1 | \ - sed -e s/$$/gcc.nodebug/ > Output/$*.gcc.nodebug.time - -Output/%.gcc.debug.o: %.cpp Output/.dir - @-(time -p $(CXX) $*.cpp -O0 -gdwarf-2 -c -o $@) 2>&1 | \ - sed -e s/$$/gcc.debug/ > Output/$*.gcc.debug.time - -Output/%.llvmgcc.nodebug.o: %.cpp Output/.dir $(LLVMGXX) - @-(time -p $(LLVMGXX) $*.cpp -O0 -c -o $@) 2>&1 | \ - sed -e s/$$/llvmgcc.nodebug/ > Output/$*.llvmgcc.nodebug.time - -Output/%.llvmgcc.debug.o: %.cpp Output/.dir $(LLVMGXX) - @-(time -p $(LLVMGXX) $*.cpp -O0 -g -c -o $@) 2>&1 | \ - sed -e s/$$/llvmgcc.debug/ > Output/$*.llvmgcc.debug.time - -Output/%.gcc.nodebug.o: %.c Output/.dir - @-(time -p $(CC) $*.c -O0 -c -o $@) 2>&1 | \ - sed -e s/$$/gcc.nodebug/ > Output/$*.gcc.nodebug.time - -Output/%.gcc.debug.o: %.c Output/.dir - @-(time -p $(CC) $*.c -O0 -gdwarf-2 -c -o $@) 2>&1 | \ - sed -e s/$$/gcc.debug/ > Output/$*.gcc.debug.time - -Output/%.llvmgcc.nodebug.o: %.c Output/.dir $(LLVMGCC) - @-(time -p $(LLVMGCC) $*.c -O0 -c -o $@) 2>&1 | \ - sed -e s/$$/llvmgcc.nodebug/ > Output/$*.llvmgcc.nodebug.time - -Output/%.llvmgcc.debug.o: %.c Output/.dir $(LLVMGCC) - @-(time -p $(LLVMGCC) $*.c -O0 -g -c -o $@) 2>&1 | \ - sed -e s/$$/llvmgcc.debug/ > Output/$*.llvmgcc.debug.time - - -Output/%.time: Output/%.o - @echo "" > /dev/null - - -Output/%.gcc.nodebug.size: Output/%.gcc.nodebug.o - @-size Output/$*.gcc.nodebug.o 2>&1 | \ - sed -e s/$$/gcc.nodebug/ > $@ - @-size -m Output/$*.gcc.nodebug.o 2>&1 | \ - sed -e s/$$/gcc.nodebug/ >> $@ - -Output/%.gcc.debug.size: Output/%.gcc.debug.o - @-size Output/$*.gcc.debug.o 2>&1 | \ - sed -e s/$$/gcc.debug/ > $@ - @-size -m Output/$*.gcc.debug.o 2>&1 | \ - sed -e s/$$/gcc.debug/ >> $@ - -Output/%.llvmgcc.nodebug.size: Output/%.llvmgcc.nodebug.o - @-size Output/$*.llvmgcc.nodebug.o 2>&1 | \ - sed -e s/$$/llvmgcc.nodebug/ > $@ - @-size -m Output/$*.llvmgcc.nodebug.o 2>&1 | \ - sed -e s/$$/llvmgcc.nodebug/ >> $@ - -Output/%.llvmgcc.debug.size: Output/%.llvmgcc.debug.o - @-size Output/$*.llvmgcc.debug.o 2>&1 | \ - sed -e s/$$/llvmgcc.debug/ > $@ - @-size -m Output/$*.llvmgcc.debug.o 2>&1 | \ - sed -e s/$$/llvmgcc.debug/ >> $@ From daniel at zuster.org Mon Feb 22 20:09:37 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 02:09:37 -0000 Subject: [llvm-commits] [test-suite] r96865 - in /test-suite/trunk: Makefile.rules SingleSource/UnitTests/Makefile Message-ID: <20100223020937.CF15C2A6C12D@llvm.org> Author: ddunbar Date: Mon Feb 22 20:09:37 2010 New Revision: 96865 URL: http://llvm.org/viewvc/llvm-project?rev=96865&view=rev Log: Kill crufty llvm-gcc3 checks. Modified: test-suite/trunk/Makefile.rules test-suite/trunk/SingleSource/UnitTests/Makefile Modified: test-suite/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Makefile.rules?rev=96865&r1=96864&r2=96865&view=diff ============================================================================== --- test-suite/trunk/Makefile.rules (original) +++ test-suite/trunk/Makefile.rules Mon Feb 22 20:09:37 2010 @@ -255,14 +255,6 @@ ########################################################################### #-------------------------------------------------------------------------- -# The LLVM GCC front-end in C and C++ flavors -# -ifeq ($(LLVMGCC_MAJVERS),3) -LLVMGCC := PATH="$(LLVMTOOLCURRENT):$(PATH)" $(LLVMGCC) -LLVMGXX := PATH="$(LLVMTOOLCURRENT):$(PATH)" $(LLVMGXX) -endif - -#-------------------------------------------------------------------------- # The compiled LLVM tools # Modified: test-suite/trunk/SingleSource/UnitTests/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/Makefile?rev=96865&r1=96864&r2=96865&view=diff ============================================================================== --- test-suite/trunk/SingleSource/UnitTests/Makefile (original) +++ test-suite/trunk/SingleSource/UnitTests/Makefile Mon Feb 22 20:09:37 2010 @@ -4,14 +4,10 @@ DIRS := SetjmpLongjmp -# llvm-gcc3 does not support any vector tests. -ifneq ($(LLVMGCC_MAJVERS),3) - # FIXME: Disable SJLJ tests for now, until EH edges are represented. DIRS := DIRS += Vector -endif DIRS += SignlessTypes Threads From daniel at zuster.org Mon Feb 22 20:09:39 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 02:09:39 -0000 Subject: [llvm-commits] [test-suite] r96866 - in /test-suite/trunk: Makefile.config.in Makefile.rules Message-ID: <20100223020939.C0B5F2A6C12E@llvm.org> Author: ddunbar Date: Mon Feb 22 20:09:39 2010 New Revision: 96866 URL: http://llvm.org/viewvc/llvm-project?rev=96866&view=rev Log: Drop LLVMGCC*DIR variables. Modified: test-suite/trunk/Makefile.config.in test-suite/trunk/Makefile.rules Modified: test-suite/trunk/Makefile.config.in URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Makefile.config.in?rev=96866&r1=96865&r2=96866&view=diff ============================================================================== --- test-suite/trunk/Makefile.config.in (original) +++ test-suite/trunk/Makefile.config.in Mon Feb 22 20:09:39 2010 @@ -51,14 +51,6 @@ LLVMGXX := $(TARGET_LLVMGXX) endif -ifdef TARGET_LLVMGCCDIR -LLVMGCCDIR := $(TARGET_LLVMGCCDIR) -endif - -ifdef TARGET_LLVMGCCLIBDIR -LLVMGCCLIBDIR := $(TARGET_LLVMGCCLIBDIR) -endif - ifeq ($(ARCH),THUMB) TARGET_FLAGS += -mthumb endif Modified: test-suite/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Makefile.rules?rev=96866&r1=96865&r2=96866&view=diff ============================================================================== --- test-suite/trunk/Makefile.rules (original) +++ test-suite/trunk/Makefile.rules Mon Feb 22 20:09:39 2010 @@ -259,8 +259,6 @@ # LLVMAS := $(LLVMTOOLCURRENT)/llvm-as$(EXEEXT) -# Find the location of the platform specific LLVM GCC libraries -LLVMGCCLIBDIR=$(LLVMGCCDIR)/lib/gcc/$(LLVMGCCARCH) # LLVM Tool Definitions (LLVMGCC, LLVMGXX, LLVMAS are provided by # Makefile.rules) LLI = $(LLVMTOOLCURRENT)/lli$(EXEEXT) From daniel at zuster.org Mon Feb 22 20:09:41 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 02:09:41 -0000 Subject: [llvm-commits] [test-suite] r96867 - /test-suite/trunk/Makefile.programs Message-ID: <20100223020941.7964F2A6C12F@llvm.org> Author: ddunbar Date: Mon Feb 22 20:09:41 2010 New Revision: 96867 URL: http://llvm.org/viewvc/llvm-project?rev=96867&view=rev Log: Rename LLVMGCCLD to PROGRAMLD to reflect its intent a bit better. Modified: test-suite/trunk/Makefile.programs Modified: test-suite/trunk/Makefile.programs URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Makefile.programs?rev=96867&r1=96866&r2=96867&view=diff ============================================================================== --- test-suite/trunk/Makefile.programs (original) +++ test-suite/trunk/Makefile.programs Mon Feb 22 20:09:41 2010 @@ -357,13 +357,13 @@ endif # It is important to link C++ programs with G++ so look for -lstdc++ in LDFLAGS -# and set the LLVMGCCLD variable to the correct compiler interface to use. +# and set the PROGRAMLD variable to the correct compiler interface to use. # Note that LDFLAGS must already be defined at the time this file is included, # or this will not work. ifneq ($(filter -lstdc++,$(LDFLAGS)),) -LLVMGCCLD := $(CXX) +PROGRAMLD := $(CXX) else -LLVMGCCLD := $(CC) +PROGRAMLD := $(CC) endif # @@ -409,15 +409,15 @@ # $(PROGRAMS_TO_TEST:%=Output/%.llc): \ Output/%.llc: Output/%.llc.s - -$(LLVMGCCLD) $< -o $@ $(LLCLIBS) $(LLCASSEMBLERFLAGS) $(TARGET_FLAGS) $(LDFLAGS) + -$(PROGRAMLD) $< -o $@ $(LLCLIBS) $(LLCASSEMBLERFLAGS) $(TARGET_FLAGS) $(LDFLAGS) $(PROGRAMS_TO_TEST:%=Output/%.llc-beta): \ Output/%.llc-beta: Output/%.llc-beta.s - -$(LLVMGCCLD) $< -o $@ $(LLCLIBS) $(LLCASSEMBLERFLAGS) $(TARGET_FLAGS) $(LDFLAGS) + -$(PROGRAMLD) $< -o $@ $(LLCLIBS) $(LLCASSEMBLERFLAGS) $(TARGET_FLAGS) $(LDFLAGS) $(PROGRAMS_TO_TEST:%=Output/%.opt-beta): \ Output/%.opt-beta: Output/%.opt-beta.s - -$(LLVMGCCLD) $< -o $@ $(LLCLIBS) $(LLCASSEMBLERFLAGS) $(TARGET_FLAGS) $(LDFLAGS) + -$(PROGRAMLD) $< -o $@ $(LLCLIBS) $(LLCASSEMBLERFLAGS) $(TARGET_FLAGS) $(LDFLAGS) # From daniel at zuster.org Mon Feb 22 20:09:46 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 02:09:46 -0000 Subject: [llvm-commits] [test-suite] r96869 - /test-suite/trunk/External/SPEC/CINT2000/252.eon/Makefile Message-ID: <20100223020946.2B6642A6C12C@llvm.org> Author: ddunbar Date: Mon Feb 22 20:09:46 2010 New Revision: 96869 URL: http://llvm.org/viewvc/llvm-project?rev=96869&view=rev Log: Remove some random unused make variable. Modified: test-suite/trunk/External/SPEC/CINT2000/252.eon/Makefile Modified: test-suite/trunk/External/SPEC/CINT2000/252.eon/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT2000/252.eon/Makefile?rev=96869&r1=96868&r2=96869&view=diff ============================================================================== --- test-suite/trunk/External/SPEC/CINT2000/252.eon/Makefile (original) +++ test-suite/trunk/External/SPEC/CINT2000/252.eon/Makefile Mon Feb 22 20:09:46 2010 @@ -3,7 +3,6 @@ STDOUT_FILENAME = cook_log.out STDERR_FILENAME = cook_log.err FP_ABSTOLERANCE := 0.005 -LINK_WITH_LLVMGCC_LIBS := 1 CPPFLAGS = -include errno.h -DHAS_ERRLIST -DUSE_STRERROR -DSPEC_STDCPP -DNDEBUG From jyasskin at google.com Mon Feb 22 20:32:01 2010 From: jyasskin at google.com (Jeffrey Yasskin) Date: Mon, 22 Feb 2010 21:32:01 -0500 Subject: [llvm-commits] [llvm] r96834 - /llvm/trunk/lib/Support/GraphWriter.cpp In-Reply-To: <20100223000453.7E04C2A6C12E@llvm.org> References: <20100223000453.7E04C2A6C12E@llvm.org> Message-ID: This patch was by Collin Winter. I keep forgetting to give him credit. On Mon, Feb 22, 2010 at 7:04 PM, Jeffrey Yasskin wrote: > Author: jyasskin > Date: Mon Feb 22 18:04:53 2010 > New Revision: 96834 > > URL: http://llvm.org/viewvc/llvm-project?rev=96834&view=rev > Log: > Fix viewCFG on Linux. > > Modified: > ? ?llvm/trunk/lib/Support/GraphWriter.cpp > > Modified: llvm/trunk/lib/Support/GraphWriter.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/GraphWriter.cpp?rev=96834&r1=96833&r2=96834&view=diff > ============================================================================== > --- llvm/trunk/lib/Support/GraphWriter.cpp (original) > +++ llvm/trunk/lib/Support/GraphWriter.cpp Mon Feb 22 18:04:53 2010 > @@ -137,7 +137,7 @@ > ? ? args.clear(); > ? ? args.push_back(gv.c_str()); > ? ? args.push_back(PSFilename.c_str()); > - ? ?args.push_back("-spartan"); > + ? ?args.push_back("--spartan"); > ? ? args.push_back(0); > > ? ? ErrMsg.clear(); > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > From gohman at apple.com Mon Feb 22 20:33:29 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 23 Feb 2010 02:33:29 -0000 Subject: [llvm-commits] [llvm] r96871 - /llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp Message-ID: <20100223023329.7813B2A6C12C@llvm.org> Author: djg Date: Mon Feb 22 20:33:29 2010 New Revision: 96871 URL: http://llvm.org/viewvc/llvm-project?rev=96871&view=rev Log: Revert 96854, 96852, and 96849, unbreaking test/CodeGen/CellSPU/i64ops.ll. Modified: llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp Modified: llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp?rev=96871&r1=96870&r2=96871&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp Mon Feb 22 20:33:29 2010 @@ -294,19 +294,15 @@ ((vecVT == MVT::v2i64) && ((SPU::get_vec_i16imm(bvNode, *CurDAG, MVT::i64).getNode() != 0) || (SPU::get_ILHUvec_imm(bvNode, *CurDAG, MVT::i64).getNode() != 0) || - (SPU::get_vec_u18imm(bvNode, *CurDAG, MVT::i64).getNode() != 0)))) { - HandleSDNode Dummy(SDValue(bvNode, 0)); - if (SDNode *N = Select(bvNode)) - return N; - return Dummy.getValue().getNode(); - } + (SPU::get_vec_u18imm(bvNode, *CurDAG, MVT::i64).getNode() != 0)))) + return Select(bvNode); // No, need to emit a constant pool spill: std::vector CV; for (size_t i = 0; i < bvNode->getNumOperands(); ++i) { ConstantSDNode *V = dyn_cast (bvNode->getOperand(i)); - CV.push_back(const_cast(V->getConstantIntValue())); + CV.push_back(const_cast (V->getConstantIntValue())); } Constant *CP = ConstantVector::get(CV); @@ -315,15 +311,10 @@ SDValue CGPoolOffset = SPU::LowerConstantPool(CPIdx, *CurDAG, SPUtli.getSPUTargetMachine()); - - HandleSDNode Dummy(CurDAG->getLoad(vecVT, dl, - CurDAG->getEntryNode(), CGPoolOffset, - PseudoSourceValue::getConstantPool(),0, - false, false, Alignment)); - CurDAG->ReplaceAllUsesWith(SDValue(bvNode, 0), Dummy.getValue()); - if (SDNode *N = SelectCode(Dummy.getValue().getNode())) - return N; - return Dummy.getValue().getNode(); + return SelectCode(CurDAG->getLoad(vecVT, dl, + CurDAG->getEntryNode(), CGPoolOffset, + PseudoSourceValue::getConstantPool(), 0, + false, false, Alignment).getNode()); } /// Select - Convert the specified operand from a target-independent to a @@ -701,8 +692,9 @@ SDValue Ops[8]; DebugLoc dl = N->getDebugLoc(); - if (N->isMachineOpcode()) + if (N->isMachineOpcode()) { return NULL; // Already selected. + } if (Opc == ISD::FrameIndex) { int FI = cast(N)->getIndex(); @@ -767,65 +759,43 @@ } SDNode *shufMaskLoad = emitBuildVector(shufMask.getNode()); - - HandleSDNode PromoteScalar(CurDAG->getNode(SPUISD::PREFSLOT2VEC, dl, - Op0VecVT, Op0)); - - SDValue PromScalar; - if (SDNode *N = SelectCode(PromoteScalar.getValue().getNode())) - PromScalar = SDValue(N, 0); - else - PromScalar = PromoteScalar.getValue(); - + SDNode *PromoteScalar = + SelectCode(CurDAG->getNode(SPUISD::PREFSLOT2VEC, dl, + Op0VecVT, Op0).getNode()); + SDValue zextShuffle = CurDAG->getNode(SPUISD::SHUFB, dl, OpVecVT, - PromScalar, PromScalar, + SDValue(PromoteScalar, 0), + SDValue(PromoteScalar, 0), SDValue(shufMaskLoad, 0)); - HandleSDNode Dummy2(zextShuffle); - if (SDNode *N = SelectCode(Dummy2.getValue().getNode())) - return N; - HandleSDNode Dummy(CurDAG->getNode(SPUISD::VEC2PREFSLOT, dl, OpVT, - Dummy2.getValue())); - - CurDAG->ReplaceAllUsesWith(N, Dummy.getValue().getNode()); - SelectCode(Dummy.getValue().getNode()); - return Dummy.getValue().getNode(); + // N.B.: BIT_CONVERT replaces and updates the zextShuffle node, so we + // re-use it in the VEC2PREFSLOT selection without needing to explicitly + // call SelectCode (it's already done for us.) + SelectCode(CurDAG->getNode(ISD::BIT_CONVERT, dl, OpVecVT, zextShuffle).getNode()); + return SelectCode(CurDAG->getNode(SPUISD::VEC2PREFSLOT, dl, OpVT, + zextShuffle).getNode()); } else if (Opc == ISD::ADD && (OpVT == MVT::i64 || OpVT == MVT::v2i64)) { SDNode *CGLoad = emitBuildVector(getCarryGenerateShufMask(*CurDAG, dl).getNode()); - HandleSDNode Dummy(CurDAG->getNode(SPUISD::ADD64_MARKER, dl, OpVT, - N->getOperand(0), N->getOperand(1), - SDValue(CGLoad, 0))); - - CurDAG->ReplaceAllUsesWith(N, Dummy.getValue().getNode()); - if (SDNode *N = SelectCode(Dummy.getValue().getNode())) - return N; - return Dummy.getValue().getNode(); + return SelectCode(CurDAG->getNode(SPUISD::ADD64_MARKER, dl, OpVT, + N->getOperand(0), N->getOperand(1), + SDValue(CGLoad, 0)).getNode()); } else if (Opc == ISD::SUB && (OpVT == MVT::i64 || OpVT == MVT::v2i64)) { SDNode *CGLoad = emitBuildVector(getBorrowGenerateShufMask(*CurDAG, dl).getNode()); - HandleSDNode Dummy(CurDAG->getNode(SPUISD::SUB64_MARKER, dl, OpVT, - N->getOperand(0), N->getOperand(1), - SDValue(CGLoad, 0))); - - CurDAG->ReplaceAllUsesWith(N, Dummy.getValue().getNode()); - if (SDNode *N = SelectCode(Dummy.getValue().getNode())) - return N; - return Dummy.getValue().getNode(); + return SelectCode(CurDAG->getNode(SPUISD::SUB64_MARKER, dl, OpVT, + N->getOperand(0), N->getOperand(1), + SDValue(CGLoad, 0)).getNode()); } else if (Opc == ISD::MUL && (OpVT == MVT::i64 || OpVT == MVT::v2i64)) { SDNode *CGLoad = emitBuildVector(getCarryGenerateShufMask(*CurDAG, dl).getNode()); - HandleSDNode Dummy(CurDAG->getNode(SPUISD::MUL64_MARKER, dl, OpVT, - N->getOperand(0), N->getOperand(1), - SDValue(CGLoad, 0))); - CurDAG->ReplaceAllUsesWith(N, Dummy.getValue().getNode()); - if (SDNode *N = SelectCode(Dummy.getValue().getNode())) - return N; - return Dummy.getValue().getNode(); + return SelectCode(CurDAG->getNode(SPUISD::MUL64_MARKER, dl, OpVT, + N->getOperand(0), N->getOperand(1), + SDValue(CGLoad, 0)).getNode()); } else if (Opc == ISD::TRUNCATE) { SDValue Op0 = N->getOperand(0); if ((Op0.getOpcode() == ISD::SRA || Op0.getOpcode() == ISD::SRL) @@ -862,14 +832,17 @@ } } } else if (Opc == ISD::SHL) { - if (OpVT == MVT::i64) + if (OpVT == MVT::i64) { return SelectSHLi64(N, OpVT); + } } else if (Opc == ISD::SRL) { - if (OpVT == MVT::i64) + if (OpVT == MVT::i64) { return SelectSRLi64(N, OpVT); + } } else if (Opc == ISD::SRA) { - if (OpVT == MVT::i64) + if (OpVT == MVT::i64) { return SelectSRAi64(N, OpVT); + } } else if (Opc == ISD::FNEG && (OpVT == MVT::f64 || OpVT == MVT::v2f64)) { DebugLoc dl = N->getDebugLoc(); @@ -1251,15 +1224,13 @@ ? shufmask.getNode() : emitBuildVector(shufmask.getNode())); - SDValue shufNode = - CurDAG->getNode(SPUISD::SHUFB, dl, OpVecVT, + SDNode *shufNode = + Select(CurDAG->getNode(SPUISD::SHUFB, dl, OpVecVT, SDValue(lhsNode, 0), SDValue(rhsNode, 0), - SDValue(shufMaskNode, 0)); - HandleSDNode Dummy(shufNode); - SDNode *SN = SelectCode(Dummy.getValue().getNode()); - if (SN == 0) SN = Dummy.getValue().getNode(); - - return CurDAG->getMachineNode(SPU::ORi64_v2i64, dl, OpVT, SDValue(SN, 0)); + SDValue(shufMaskNode, 0)).getNode()); + + return CurDAG->getMachineNode(SPU::ORi64_v2i64, dl, OpVT, + SDValue(shufNode, 0)); } else if (i64vec.getOpcode() == ISD::BUILD_VECTOR) { return CurDAG->getMachineNode(SPU::ORi64_v2i64, dl, OpVT, SDValue(emitBuildVector(i64vec.getNode()), 0)); From gohman at apple.com Mon Feb 22 20:44:03 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 23 Feb 2010 02:44:03 -0000 Subject: [llvm-commits] [llvm] r96873 - /llvm/trunk/docs/LangRef.html Message-ID: <20100223024403.759E92A6C12C@llvm.org> Author: djg Date: Mon Feb 22 20:44:03 2010 New Revision: 96873 URL: http://llvm.org/viewvc/llvm-project?rev=96873&view=rev Log: Update LangRef to match the code; pointers default to being 64-bit. Modified: llvm/trunk/docs/LangRef.html Modified: llvm/trunk/docs/LangRef.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=96873&r1=96872&r2=96873&view=diff ============================================================================== --- llvm/trunk/docs/LangRef.html (original) +++ llvm/trunk/docs/LangRef.html Mon Feb 22 20:44:03 2010 @@ -1277,7 +1277,7 @@
  • E - big endian
  • -
  • p:32:64:64 - 32-bit pointers with 64-bit alignment
  • +
  • p:64:64:64 - 64-bit pointers with 64-bit alignment
  • i1:8:8 - i1 is 8-bit (byte) aligned
  • i8:8:8 - i8 is 8-bit (byte) aligned
  • i16:16:16 - i16 is 16-bit aligned
  • From daniel at zuster.org Mon Feb 22 21:20:27 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 03:20:27 -0000 Subject: [llvm-commits] [test-suite] r96878 - /test-suite/trunk/SingleSource/Regression/C/2003-05-21-UnionBitfields.c Message-ID: <20100223032027.D70BB2A6C12C@llvm.org> Author: ddunbar Date: Mon Feb 22 21:20:27 2010 New Revision: 96878 URL: http://llvm.org/viewvc/llvm-project?rev=96878&view=rev Log: Rewrite test in a C99 compliant way. Modified: test-suite/trunk/SingleSource/Regression/C/2003-05-21-UnionBitfields.c Modified: test-suite/trunk/SingleSource/Regression/C/2003-05-21-UnionBitfields.c URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/2003-05-21-UnionBitfields.c?rev=96878&r1=96877&r2=96878&view=diff ============================================================================== --- test-suite/trunk/SingleSource/Regression/C/2003-05-21-UnionBitfields.c (original) +++ test-suite/trunk/SingleSource/Regression/C/2003-05-21-UnionBitfields.c Mon Feb 22 21:20:27 2010 @@ -17,6 +17,6 @@ } int main() { - printf("%d %d\n", target_isinf(1234.42), target_isinf(1.0/1.0e-1000)); + printf("%d %d\n", target_isinf(1234.42), target_isinf(1.0/5.0e-324)); return 0; } From alenhar2 at llvm.org Mon Feb 22 11:02:53 2010 From: alenhar2 at llvm.org (alenhar2 at llvm.org) Date: Mon, 22 Feb 2010 17:02:53 -0000 Subject: [llvm-commits] [poolalloc] r96786 - in /poolalloc/trunk/lib/DSA: DataStructure.cpp Local.cpp Message-ID: <20100222170253.B15F12A6C124@llvm.org> Author: alenhar2 Date: Mon Feb 22 11:02:53 2010 New Revision: 96786 URL: http://llvm.org/viewvc/llvm-project?rev=96786&view=rev Log: remove DOUT Modified: poolalloc/trunk/lib/DSA/DataStructure.cpp poolalloc/trunk/lib/DSA/Local.cpp Modified: poolalloc/trunk/lib/DSA/DataStructure.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DataStructure.cpp?rev=96786&r1=96785&r2=96786&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/DataStructure.cpp (original) +++ poolalloc/trunk/lib/DSA/DataStructure.cpp Mon Feb 22 11:02:53 2010 @@ -150,7 +150,7 @@ // // Remove all references to this node from the Pool Descriptor Map. // - DOUT << "LLVA: Removing " << this << "\n"; + DEBUG(errs() << "LLVA: Removing " << this << "\n"); if (ParentGraph) { hash_map &pdm=ParentGraph->getPoolDescriptorsMap(); pdm.erase (this); @@ -609,7 +609,7 @@ // try merge with NewTy: struct {t1, t2, stuff...} if offset lands exactly // on a field in Ty if (isa(NewTy) && isa(Ty)) { - DOUT << "Ty: " << *Ty << "\nNewTy: " << *NewTy << "@" << Offset << "\n"; + DEBUG(errs() << "Ty: " << *Ty << "\nNewTy: " << *NewTy << "@" << Offset << "\n"); const StructType *STy = cast(Ty); const StructLayout &SL = *TD.getStructLayout(STy); unsigned i = SL.getElementContainingOffset(Offset); @@ -625,7 +625,7 @@ nt.insert(nt.end(), STy->element_begin(), STy->element_end()); //and merge STy = StructType::get(STy->getContext(), nt); - DOUT << "Trying with: " << *STy << "\n"; + DEBUG(errs() << "Trying with: " << *STy << "\n"); return mergeTypeInfo(STy, 0); } @@ -634,7 +634,7 @@ //try merge with NewTy: struct : {t1, t2, T} if offset lands on a field //in Ty if (isa(Ty)) { - DOUT << "Ty: " << *Ty << "\nNewTy: " << *NewTy << "@" << Offset << "\n"; + DEBUG(errs() << "Ty: " << *Ty << "\nNewTy: " << *NewTy << "@" << Offset << "\n"); const StructType *STy = cast(Ty); const StructLayout &SL = *TD.getStructLayout(STy); unsigned i = SL.getElementContainingOffset(Offset); @@ -649,7 +649,7 @@ nt.push_back(NewTy); //and merge STy = StructType::get(STy->getContext(), nt); - DOUT << "Trying with: " << *STy << "\n"; + DEBUG(errs() << "Trying with: " << *STy << "\n"); return mergeTypeInfo(STy, 0); } @@ -813,7 +813,7 @@ if (getParentGraph()->retnodes_begin() != getParentGraph()->retnodes_end()) M = getParentGraph()->retnodes_begin()->first->getParent(); - DOUT << "MergeTypeInfo Folding OrigTy: "; + DEBUG(errs() << "MergeTypeInfo Folding OrigTy: "); raw_stderr_ostream stream; DEBUG(WriteTypeSymbolic(stream, Ty, M); stream << "\n due to:"; @@ -909,7 +909,7 @@ //do nothing (common case) } else { if (pdm[NNode]) { - DOUT << "LLVA: 1: currNode (" << currNode << ") becomes " << pdm[NNode]->getName() << "(" << NNode << ")\n"; + DEBUG(errs() << "LLVA: 1: currNode (" << currNode << ") becomes " << pdm[NNode]->getName() << "(" << NNode << ")\n"); pdm[currNode] = pdm[NNode]; } } @@ -921,9 +921,9 @@ // Verify that this is correct. I believe it is; it seems to make sense // since either node can be used after the merge. // - DOUT << "LLVA: MergeNodes: currnode has something, newnode has nothing\n"; - DOUT << "LLVA: 2: currNode (" << currNode << ") becomes " - << "(" << NNode << ")\n"; + DEBUG(errs() << "LLVA: MergeNodes: currnode has something, newnode has nothing\n" + << "LLVA: 2: currNode (" << currNode << ") becomes " + << "(" << NNode << ")\n"); pdm[NNode] = pdm[currNode]; #endif //do nothing @@ -1046,7 +1046,7 @@ if (N == this) { // We cannot merge two pieces of the same node together, collapse the node // completely. - DOUT << "Attempting to merge two chunks of the same node together!\n"; + DEBUG(errs() << "Attempting to merge two chunks of the same node together!\n"); foldNodeCompletely(); return; } @@ -1305,7 +1305,7 @@ //do nothing (common case) } else { if (srcpdm[SN]) { - DOUT << "DN becomes " << srcpdm[SN]->getName() << std::endl; + DEBUG(errs() << "DN becomes " << srcpdm[SN]->getName() << std::endl); destpdm[DN] = srcpdm[SN]; } } @@ -2085,7 +2085,7 @@ // eliminate it. if (Callee->getNumReferrers() == 1 && Callee->isCompleteNode() && Callee->isEmptyGlobals()) { // No useful info? - DOUT << "WARNING: Useless call site found.\n"; + DEBUG(errs() << "WARNING: Useless call site found.\n"); Calls.erase(OldIt); ++NumDeleted; continue; @@ -2194,7 +2194,7 @@ // If this call site is now the same as the previous one, we can delete it // as a duplicate. if (*OldIt == *CI) { - DOUT << "Deleteing " << CI->getCallSite().getInstruction() << "\n"; + DEBUG(errs() << "Deleteing " << CI->getCallSite().getInstruction() << "\n"); Calls.erase(CI); CI = OldIt; ++NumDeleted; @@ -2207,7 +2207,7 @@ NumCallNodesMerged += NumDeleted; if (NumDeleted) - DOUT << "Merged " << NumDeleted << " call nodes.\n"; + DEBUG(errs() << "Merged " << NumDeleted << " call nodes.\n"); } @@ -2532,7 +2532,7 @@ #if 0 if (CS.getNumPtrArgs() && CS.getCalleeNode() == CS.getPtrArg(0).getNode() && CS.getCalleeNode() && CS.getCalleeNode()->getGlobals().empty()) - DOUT << "WARNING: WEIRD CALL SITE FOUND!\n"; + DEBUG(errs() << "WARNING: WEIRD CALL SITE FOUND!\n"); #endif } AssertNodeInGraph(CS.getRetVal().getNode()); @@ -2805,7 +2805,7 @@ std::set ECGlobals; buildGlobalECs(ECGlobals); if (!ECGlobals.empty()) { - DOUT << "Eliminating " << ECGlobals.size() << " EC Globals!\n"; + DEBUG(errs() << "Eliminating " << ECGlobals.size() << " EC Globals!\n"); for (DSInfoTy::iterator I = DSInfo.begin(), E = DSInfo.end(); I != E; ++I) eliminateUsesOfECGlobals(*I->second, ECGlobals); Modified: poolalloc/trunk/lib/DSA/Local.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/Local.cpp?rev=96786&r1=96785&r2=96786&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/Local.cpp (original) +++ poolalloc/trunk/lib/DSA/Local.cpp Mon Feb 22 11:02:53 2010 @@ -837,7 +837,7 @@ DSNodeHandle NewNH(NHN, NH.getOffset()+(unsigned)SL->getElementOffset(i)); MergeConstantInitIntoNode(NewNH, cast(Ty)->getElementType(i), cast(CS->getOperand(i))); } else if (SL->getElementOffset(i) == SL->getSizeInBytes()) { - DOUT << "Zero size element at end of struct\n"; + DEBUG(errs() << "Zero size element at end of struct\n" ); NHN->foldNodeCompletely(); } else { assert(0 && "type was smaller than offsets of of struct layout indicate"); From llvm at llvm.org Mon Feb 22 19:47:21 2010 From: llvm at llvm.org (llvm at llvm.org) Date: Tue, 23 Feb 2010 01:47:21 -0000 Subject: [llvm-commits] [www] r96857 - /www/trunk/header.incl Message-ID: <20100223014721.39DB22A6C12C@llvm.org> Author: llvm Date: Mon Feb 22 19:47:21 2010 New Revision: 96857 URL: http://llvm.org/viewvc/llvm-project?rev=96857&view=rev Log: Remove nightly tester link. Modified: www/trunk/header.incl Modified: www/trunk/header.incl URL: http://llvm.org/viewvc/llvm-project/www/trunk/header.incl?rev=96857&r1=96856&r2=96857&view=diff ============================================================================== --- www/trunk/header.incl (original) +++ www/trunk/header.incl Mon Feb 22 19:47:21 2010 @@ -127,7 +127,7 @@ Dev. Resources:
    doxygen ViewVC
    - Nightly Tester
    + LLVM Bugzilla
    Buildbot From alenhar2 at llvm.org Mon Feb 22 22:07:38 2010 From: alenhar2 at llvm.org (alenhar2 at llvm.org) Date: Tue, 23 Feb 2010 04:07:38 -0000 Subject: [llvm-commits] [poolalloc] r96882 - /poolalloc/trunk/lib/DSA/Local.cpp Message-ID: <20100223040738.979EC2A6C12C@llvm.org> Author: alenhar2 Date: Mon Feb 22 22:07:38 2010 New Revision: 96882 URL: http://llvm.org/viewvc/llvm-project?rev=96882&view=rev Log: Only track address taken functions Modified: poolalloc/trunk/lib/DSA/Local.cpp Modified: poolalloc/trunk/lib/DSA/Local.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/Local.cpp?rev=96882&r1=96881&r2=96882&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/Local.cpp (original) +++ poolalloc/trunk/lib/DSA/Local.cpp Mon Feb 22 22:07:38 2010 @@ -873,7 +873,7 @@ GGB.mergeInGlobalInitializer(I); // Add Functions to the globals graph. for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) - if (!I->isDeclaration()) + if (!I->isDeclaration() && I->hasAddressTaken()) GGB.mergeFunction(*I); } From sabre at nondot.org Mon Feb 22 23:30:43 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 23 Feb 2010 05:30:43 -0000 Subject: [llvm-commits] [llvm] r96885 - /llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp Message-ID: <20100223053043.CD75F2A6C12C@llvm.org> Author: lattner Date: Mon Feb 22 23:30:43 2010 New Revision: 96885 URL: http://llvm.org/viewvc/llvm-project?rev=96885&view=rev Log: reapply my cellspu changes with a fix to not break the old isel. Modified: llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp Modified: llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp?rev=96885&r1=96884&r2=96885&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp Mon Feb 22 23:30:43 2010 @@ -294,15 +294,19 @@ ((vecVT == MVT::v2i64) && ((SPU::get_vec_i16imm(bvNode, *CurDAG, MVT::i64).getNode() != 0) || (SPU::get_ILHUvec_imm(bvNode, *CurDAG, MVT::i64).getNode() != 0) || - (SPU::get_vec_u18imm(bvNode, *CurDAG, MVT::i64).getNode() != 0)))) - return Select(bvNode); + (SPU::get_vec_u18imm(bvNode, *CurDAG, MVT::i64).getNode() != 0)))) { + HandleSDNode Dummy(SDValue(bvNode, 0)); + if (SDNode *N = Select(bvNode)) + return N; + return Dummy.getValue().getNode(); + } // No, need to emit a constant pool spill: std::vector CV; for (size_t i = 0; i < bvNode->getNumOperands(); ++i) { ConstantSDNode *V = dyn_cast (bvNode->getOperand(i)); - CV.push_back(const_cast (V->getConstantIntValue())); + CV.push_back(const_cast(V->getConstantIntValue())); } Constant *CP = ConstantVector::get(CV); @@ -311,10 +315,15 @@ SDValue CGPoolOffset = SPU::LowerConstantPool(CPIdx, *CurDAG, SPUtli.getSPUTargetMachine()); - return SelectCode(CurDAG->getLoad(vecVT, dl, - CurDAG->getEntryNode(), CGPoolOffset, - PseudoSourceValue::getConstantPool(), 0, - false, false, Alignment).getNode()); + + HandleSDNode Dummy(CurDAG->getLoad(vecVT, dl, + CurDAG->getEntryNode(), CGPoolOffset, + PseudoSourceValue::getConstantPool(),0, + false, false, Alignment)); + CurDAG->ReplaceAllUsesWith(SDValue(bvNode, 0), Dummy.getValue()); + if (SDNode *N = SelectCode(Dummy.getValue().getNode())) + return N; + return Dummy.getValue().getNode(); } /// Select - Convert the specified operand from a target-independent to a @@ -692,9 +701,8 @@ SDValue Ops[8]; DebugLoc dl = N->getDebugLoc(); - if (N->isMachineOpcode()) { + if (N->isMachineOpcode()) return NULL; // Already selected. - } if (Opc == ISD::FrameIndex) { int FI = cast(N)->getIndex(); @@ -759,43 +767,67 @@ } SDNode *shufMaskLoad = emitBuildVector(shufMask.getNode()); - SDNode *PromoteScalar = - SelectCode(CurDAG->getNode(SPUISD::PREFSLOT2VEC, dl, - Op0VecVT, Op0).getNode()); - + + HandleSDNode PromoteScalar(CurDAG->getNode(SPUISD::PREFSLOT2VEC, dl, + Op0VecVT, Op0)); + + SDValue PromScalar; + if (SDNode *N = SelectCode(PromoteScalar.getValue().getNode())) + PromScalar = SDValue(N, 0); + else + PromScalar = PromoteScalar.getValue(); + SDValue zextShuffle = CurDAG->getNode(SPUISD::SHUFB, dl, OpVecVT, - SDValue(PromoteScalar, 0), - SDValue(PromoteScalar, 0), + PromScalar, PromScalar, SDValue(shufMaskLoad, 0)); - // N.B.: BIT_CONVERT replaces and updates the zextShuffle node, so we - // re-use it in the VEC2PREFSLOT selection without needing to explicitly - // call SelectCode (it's already done for us.) - SelectCode(CurDAG->getNode(ISD::BIT_CONVERT, dl, OpVecVT, zextShuffle).getNode()); - return SelectCode(CurDAG->getNode(SPUISD::VEC2PREFSLOT, dl, OpVT, - zextShuffle).getNode()); + HandleSDNode Dummy2(zextShuffle); + if (SDNode *N = SelectCode(Dummy2.getValue().getNode())) + zextShuffle = SDValue(N, 0); + else + zextShuffle = Dummy2.getValue(); + HandleSDNode Dummy(CurDAG->getNode(SPUISD::VEC2PREFSLOT, dl, OpVT, + zextShuffle)); + + CurDAG->ReplaceAllUsesWith(N, Dummy.getValue().getNode()); + SelectCode(Dummy.getValue().getNode()); + return Dummy.getValue().getNode(); } else if (Opc == ISD::ADD && (OpVT == MVT::i64 || OpVT == MVT::v2i64)) { SDNode *CGLoad = emitBuildVector(getCarryGenerateShufMask(*CurDAG, dl).getNode()); - return SelectCode(CurDAG->getNode(SPUISD::ADD64_MARKER, dl, OpVT, - N->getOperand(0), N->getOperand(1), - SDValue(CGLoad, 0)).getNode()); + HandleSDNode Dummy(CurDAG->getNode(SPUISD::ADD64_MARKER, dl, OpVT, + N->getOperand(0), N->getOperand(1), + SDValue(CGLoad, 0))); + + CurDAG->ReplaceAllUsesWith(N, Dummy.getValue().getNode()); + if (SDNode *N = SelectCode(Dummy.getValue().getNode())) + return N; + return Dummy.getValue().getNode(); } else if (Opc == ISD::SUB && (OpVT == MVT::i64 || OpVT == MVT::v2i64)) { SDNode *CGLoad = emitBuildVector(getBorrowGenerateShufMask(*CurDAG, dl).getNode()); - return SelectCode(CurDAG->getNode(SPUISD::SUB64_MARKER, dl, OpVT, - N->getOperand(0), N->getOperand(1), - SDValue(CGLoad, 0)).getNode()); + HandleSDNode Dummy(CurDAG->getNode(SPUISD::SUB64_MARKER, dl, OpVT, + N->getOperand(0), N->getOperand(1), + SDValue(CGLoad, 0))); + + CurDAG->ReplaceAllUsesWith(N, Dummy.getValue().getNode()); + if (SDNode *N = SelectCode(Dummy.getValue().getNode())) + return N; + return Dummy.getValue().getNode(); } else if (Opc == ISD::MUL && (OpVT == MVT::i64 || OpVT == MVT::v2i64)) { SDNode *CGLoad = emitBuildVector(getCarryGenerateShufMask(*CurDAG, dl).getNode()); - return SelectCode(CurDAG->getNode(SPUISD::MUL64_MARKER, dl, OpVT, - N->getOperand(0), N->getOperand(1), - SDValue(CGLoad, 0)).getNode()); + HandleSDNode Dummy(CurDAG->getNode(SPUISD::MUL64_MARKER, dl, OpVT, + N->getOperand(0), N->getOperand(1), + SDValue(CGLoad, 0))); + CurDAG->ReplaceAllUsesWith(N, Dummy.getValue().getNode()); + if (SDNode *N = SelectCode(Dummy.getValue().getNode())) + return N; + return Dummy.getValue().getNode(); } else if (Opc == ISD::TRUNCATE) { SDValue Op0 = N->getOperand(0); if ((Op0.getOpcode() == ISD::SRA || Op0.getOpcode() == ISD::SRL) @@ -832,17 +864,14 @@ } } } else if (Opc == ISD::SHL) { - if (OpVT == MVT::i64) { + if (OpVT == MVT::i64) return SelectSHLi64(N, OpVT); - } } else if (Opc == ISD::SRL) { - if (OpVT == MVT::i64) { + if (OpVT == MVT::i64) return SelectSRLi64(N, OpVT); - } } else if (Opc == ISD::SRA) { - if (OpVT == MVT::i64) { + if (OpVT == MVT::i64) return SelectSRAi64(N, OpVT); - } } else if (Opc == ISD::FNEG && (OpVT == MVT::f64 || OpVT == MVT::v2f64)) { DebugLoc dl = N->getDebugLoc(); @@ -1224,13 +1253,15 @@ ? shufmask.getNode() : emitBuildVector(shufmask.getNode())); - SDNode *shufNode = - Select(CurDAG->getNode(SPUISD::SHUFB, dl, OpVecVT, + SDValue shufNode = + CurDAG->getNode(SPUISD::SHUFB, dl, OpVecVT, SDValue(lhsNode, 0), SDValue(rhsNode, 0), - SDValue(shufMaskNode, 0)).getNode()); - - return CurDAG->getMachineNode(SPU::ORi64_v2i64, dl, OpVT, - SDValue(shufNode, 0)); + SDValue(shufMaskNode, 0)); + HandleSDNode Dummy(shufNode); + SDNode *SN = SelectCode(Dummy.getValue().getNode()); + if (SN == 0) SN = Dummy.getValue().getNode(); + + return CurDAG->getMachineNode(SPU::ORi64_v2i64, dl, OpVT, SDValue(SN, 0)); } else if (i64vec.getOpcode() == ISD::BUILD_VECTOR) { return CurDAG->getMachineNode(SPU::ORi64_v2i64, dl, OpVT, SDValue(emitBuildVector(i64vec.getNode()), 0)); From daniel at zuster.org Mon Feb 22 23:33:42 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 05:33:42 -0000 Subject: [llvm-commits] [test-suite] r96886 - in /test-suite/trunk: Makefile.rules Makefile.tests TEST.dbgopt.Makefile Message-ID: <20100223053342.D6F2D2A6C12C@llvm.org> Author: ddunbar Date: Mon Feb 22 23:33:42 2010 New Revision: 96886 URL: http://llvm.org/viewvc/llvm-project?rev=96886&view=rev Log: Introduce L{CC,CXX} replacements for LLVM{GCC,GXX}. Modified: test-suite/trunk/Makefile.rules test-suite/trunk/Makefile.tests test-suite/trunk/TEST.dbgopt.Makefile Modified: test-suite/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Makefile.rules?rev=96886&r1=96885&r2=96886&view=diff ============================================================================== --- test-suite/trunk/Makefile.rules (original) +++ test-suite/trunk/Makefile.rules Mon Feb 22 23:33:42 2010 @@ -271,6 +271,9 @@ LBUGPOINT = $(LLVMTOOLCURRENT)/bugpoint$(EXEEXT) LFINDMISOPT= $(LLVM_SRC_ROOT)/utils/findmisopt +LCC := $(LLVMGCC) +LCXX := $(LLVMGXX) +LCC_PROGRAMS := $(LCC) $(LCXX) $(LLVMCC1) $(LLVMCC1PLUS) ########################################################################### @@ -597,7 +600,7 @@ # Rules for building libraries #-------------------------------------------------------------------- -LinkBCLib := $(LLVMGCC) -shared -nostdlib +LinkBCLib := $(LCC) -shared -nostdlib ifdef EXPORTED_SYMBOL_LIST LinkBCLib += -Xlinker -internalize-public-api-list=$(EXPORTED_SYMBOL_LIST) else @@ -793,8 +796,6 @@ endif -LCC_PROGRAMS := $(LLVMCC1) $(LLVMCC1PLUS) - #--------------------------------------------------------- .PRECIOUS: $(PROJ_OBJ_DIR)/Depend/.dir $(PROJ_OBJ_DIR)/BytecodeObj/.dir .PRECIOUS: $(PROJ_OBJ_DIR)/Debug/.dir $(PROJ_OBJ_DIR)/Release/.dir @@ -820,10 +821,10 @@ $(CompileCG) $< -o $@ $(PROJ_OBJ_DIR)/BytecodeObj/%.bc: %.cpp $(PROJ_OBJ_DIR)/BytecodeObj/.dir $(LCC_PROGRAMS) - $(LLVMGXX) $(CPPFLAGS) -c $< -o $@ + $(LCXX) $(CPPFLAGS) -c $< -o $@ $(PROJ_OBJ_DIR)/BytecodeObj/%.bc: %.c $(PROJ_OBJ_DIR)/BytecodeObj/.dir $(LCC_PROGRAMS) - $(LLVMGCC) $(CPPFLAGS) -c $< -o $@ + $(LCC) $(CPPFLAGS) -c $< -o $@ $(PROJ_OBJ_DIR)/BytecodeObj/%.bc: %.ll $(PROJ_OBJ_DIR)/BytecodeObj/.dir $(LLVMAS) $(LLVMAS) $< -o $@ @@ -951,3 +952,11 @@ endif endif # ifndef DISABLE_AUTO_DEPENDENCIES + +### +# Debugging + +# General debugging rule, use 'make dbg-print-XXX' to print the +# definition, value and origin of XXX. +make-print-%: + $(error PRINT: $(value $*) = "$($*)" (from $(origin $*))) Modified: test-suite/trunk/Makefile.tests URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Makefile.tests?rev=96886&r1=96885&r2=96886&view=diff ============================================================================== --- test-suite/trunk/Makefile.tests (original) +++ test-suite/trunk/Makefile.tests Mon Feb 22 23:33:42 2010 @@ -39,27 +39,27 @@ # Compile from X.c to Output/X.bc Output/%.bc: %.c $(LCC_PROGRAMS) Output/.dir $(INCLUDES) - -$(LLVMGCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -c $< -o $@ -emit-llvm + -$(LCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -c $< -o $@ -emit-llvm # Compile from X.cpp to Output/X.bc Output/%.bc: %.cpp $(LCC_PROGRAMS) Output/.dir $(INCLUDES) - -$(LLVMGXX) $(CPPFLAGS) $(CXXFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -c $< -o $@ -emit-llvm + -$(LCXX) $(CPPFLAGS) $(CXXFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -c $< -o $@ -emit-llvm # Compile from X.cc to Output/X.bc Output/%.bc: %.cc $(LCC_PROGRAMS) Output/.dir $(INCLUDES) - -$(LLVMGXX) $(CPPFLAGS) $(CXXFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -c $< -o $@ -emit-llvm + -$(LCXX) $(CPPFLAGS) $(CXXFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -c $< -o $@ -emit-llvm # Compile from X.C to Output/X.bc Output/%.bc: %.C $(LCC_PROGRAMS) Output/.dir $(INCLUDES) - -$(LLVMGXX) $(CPPFLAGS) $(CXXFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -c $< -o $@ -emit-llvm + -$(LCXX) $(CPPFLAGS) $(CXXFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -c $< -o $@ -emit-llvm # Compile from X.m to Output/X.bc Output/%.bc: %.m $(LCC_PROGRAMS) Output/.dir $(INCLUDES) - -$(LLVMGCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -c $< -o $@ -emit-llvm + -$(LCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -c $< -o $@ -emit-llvm # Compile from X.mm to Output/X.bc Output/%.bc: %.mm $(LCC_PROGRAMS) Output/.dir $(INCLUDES) - -$(LLVMGXX) $(CPPFLAGS) $(CXXFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -c $< -o $@ -emit-llvm + -$(LCXX) $(CPPFLAGS) $(CXXFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -c $< -o $@ -emit-llvm # LLVM Assemble from X.ll to Output/X.bc. Because we are coming directly from # LLVM source, use the non-transforming assembler. Modified: test-suite/trunk/TEST.dbgopt.Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/TEST.dbgopt.Makefile?rev=96886&r1=96885&r2=96886&view=diff ============================================================================== --- test-suite/trunk/TEST.dbgopt.Makefile (original) +++ test-suite/trunk/TEST.dbgopt.Makefile Mon Feb 22 23:33:42 2010 @@ -17,8 +17,8 @@ $(PROGRAMS_TO_TEST:%=test.$(TEST).%): \ test.$(TEST).%: Output/%.diff -Output/%.diff: %.cpp Output/.dir $(LLVMGXX) $(LOPT) $(LDIS) - $(LLVMGXX) $*.cpp -g --emit-llvm -c -o Output/$*.bc +Output/%.diff: %.cpp Output/.dir $(LCC_PROGRAMS) $(LOPT) $(LDIS) + $(LCXX) $*.cpp -g --emit-llvm -c -o Output/$*.bc $(LOPT) Output/$*.bc -strip-nondebug -strip-debug | $(LOPT) -std-compile-opts | $(LOPT) -strip -f -o Output/$*.t.bc $(LDIS) Output/$*.t.bc -f -o Output/$*.first.ll $(LOPT) Output/$*.bc -strip-nondebug | $(LOPT) -std-compile-opts | $(LOPT) -strip-debug -strip -f -o Output/$*.t.bc @@ -30,8 +30,8 @@ fi -Output/%.diff: %.c Output/.dir $(LLVMGCC) $(LOPT) $(LDIS) - $(LLVMGCC) $*.c -g --emit-llvm -c -o Output/$*.bc +Output/%.diff: %.c Output/.dir $(LCC_PROGRAMS) $(LOPT) $(LDIS) + $(LCC) $*.c -g --emit-llvm -c -o Output/$*.bc $(LOPT) Output/$*.bc -strip-nondebug -strip-debug | $(LOPT) -std-compile-opts | $(LOPT) -strip -f -o Output/$*.t.bc $(LDIS) Output/$*.t.bc -f -o Output/$*.first.ll $(LOPT) Output/$*.bc -strip-nondebug | $(LOPT) -std-compile-opts | $(LOPT) -strip-debug -strip -f -o Output/$*.t.bc From daniel at zuster.org Mon Feb 22 23:33:45 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 05:33:45 -0000 Subject: [llvm-commits] [test-suite] r96887 - /test-suite/trunk/External/SPEC/CINT95/Makefile Message-ID: <20100223053345.8B3392A6C12D@llvm.org> Author: ddunbar Date: Mon Feb 22 23:33:45 2010 New Revision: 96887 URL: http://llvm.org/viewvc/llvm-project?rev=96887&view=rev Log: Make sure to include Makefile.config before using ARCH. Modified: test-suite/trunk/External/SPEC/CINT95/Makefile Modified: test-suite/trunk/External/SPEC/CINT95/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT95/Makefile?rev=96887&r1=96886&r2=96887&view=diff ============================================================================== --- test-suite/trunk/External/SPEC/CINT95/Makefile (original) +++ test-suite/trunk/External/SPEC/CINT95/Makefile Mon Feb 22 23:33:45 2010 @@ -9,6 +9,9 @@ 134.perl \ 147.vortex +# Get the $(ARCH) setting +include $(LEVEL)/Makefile.config + ifeq ($(ARCH),x86_64) PARALLEL_DIRS := $(filter-out 126.gcc, $(PARALLEL_DIRS)) PARALLEL_DIRS := $(filter-out 147.vortex, $(PARALLEL_DIRS)) From sabre at nondot.org Mon Feb 22 23:51:07 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 23 Feb 2010 05:51:07 -0000 Subject: [llvm-commits] [llvm] r96889 - /llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Message-ID: <20100223055107.8678D2A6C12C@llvm.org> Author: lattner Date: Mon Feb 22 23:51:07 2010 New Revision: 96889 URL: http://llvm.org/viewvc/llvm-project?rev=96889&view=rev Log: reduce indentation by eliminating 'else after return' Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp?rev=96889&r1=96888&r2=96889&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp (original) +++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Mon Feb 22 23:51:07 2010 @@ -956,19 +956,25 @@ MadeChange |= UpdateNodeType(MVT::isVoid, TP); } return MadeChange; - } else if (getOperator()->getName() == "implicit" || - getOperator()->getName() == "parallel") { + } + + if (getOperator()->getName() == "implicit" || + getOperator()->getName() == "parallel") { bool MadeChange = false; for (unsigned i = 0; i < getNumChildren(); ++i) MadeChange = getChild(i)->ApplyTypeConstraints(TP, NotRegisters); MadeChange |= UpdateNodeType(MVT::isVoid, TP); return MadeChange; - } else if (getOperator()->getName() == "COPY_TO_REGCLASS") { + } + + if (getOperator()->getName() == "COPY_TO_REGCLASS") { bool MadeChange = false; MadeChange |= getChild(0)->ApplyTypeConstraints(TP, NotRegisters); MadeChange |= getChild(1)->ApplyTypeConstraints(TP, NotRegisters); return MadeChange; - } else if (const CodeGenIntrinsic *Int = getIntrinsicInfo(CDP)) { + } + + if (const CodeGenIntrinsic *Int = getIntrinsicInfo(CDP)) { bool MadeChange = false; // Apply the result type to the node. @@ -992,7 +998,9 @@ MadeChange |= getChild(i)->ApplyTypeConstraints(TP, NotRegisters); } return MadeChange; - } else if (getOperator()->isSubClassOf("SDNode")) { + } + + if (getOperator()->isSubClassOf("SDNode")) { const SDNodeInfo &NI = CDP.getSDNodeInfo(getOperator()); bool MadeChange = NI.ApplyTypeConstraints(this, TP); @@ -1004,7 +1012,9 @@ MadeChange |= UpdateNodeType(MVT::isVoid, TP); return MadeChange; - } else if (getOperator()->isSubClassOf("Instruction")) { + } + + if (getOperator()->isSubClassOf("Instruction")) { const DAGInstruction &Inst = CDP.getInstruction(getOperator()); bool MadeChange = false; unsigned NumResults = Inst.getNumResults(); @@ -1080,24 +1090,24 @@ "' was provided too many operands!"); return MadeChange; - } else { - assert(getOperator()->isSubClassOf("SDNodeXForm") && "Unknown node type!"); - - // Node transforms always take one operand. - if (getNumChildren() != 1) - TP.error("Node transform '" + getOperator()->getName() + - "' requires one operand!"); - - // If either the output or input of the xform does not have exact - // type info. We assume they must be the same. Otherwise, it is perfectly - // legal to transform from one type to a completely different type. - if (!hasTypeSet() || !getChild(0)->hasTypeSet()) { - bool MadeChange = UpdateNodeType(getChild(0)->getExtTypes(), TP); - MadeChange |= getChild(0)->UpdateNodeType(getExtTypes(), TP); - return MadeChange; - } - return false; } + + assert(getOperator()->isSubClassOf("SDNodeXForm") && "Unknown node type!"); + + // Node transforms always take one operand. + if (getNumChildren() != 1) + TP.error("Node transform '" + getOperator()->getName() + + "' requires one operand!"); + + // If either the output or input of the xform does not have exact + // type info. We assume they must be the same. Otherwise, it is perfectly + // legal to transform from one type to a completely different type. + if (!hasTypeSet() || !getChild(0)->hasTypeSet()) { + bool MadeChange = UpdateNodeType(getChild(0)->getExtTypes(), TP); + MadeChange |= getChild(0)->UpdateNodeType(getExtTypes(), TP); + return MadeChange; + } + return false; } /// OnlyOnRHSOfCommutative - Return true if this value is only allowed on the From bob.wilson at apple.com Mon Feb 22 23:55:00 2010 From: bob.wilson at apple.com (Bob Wilson) Date: Tue, 23 Feb 2010 05:55:00 -0000 Subject: [llvm-commits] [llvm] r96890 - /llvm/trunk/lib/Transforms/Scalar/GVN.cpp Message-ID: <20100223055500.CBF142A6C12C@llvm.org> Author: bwilson Date: Mon Feb 22 23:55:00 2010 New Revision: 96890 URL: http://llvm.org/viewvc/llvm-project?rev=96890&view=rev Log: Update memdep when load PRE inserts a new load, and add some debug output. I don't have a small testcase for this. Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=96890&r1=96889&r2=96890&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Mon Feb 22 23:55:00 2010 @@ -1707,6 +1707,8 @@ // Add the newly created load. ValuesPerBlock.push_back(AvailableValueInBlock::get(UnavailablePred, NewLoad)); + MD->invalidateCachedPointerInfo(LoadPtr); + DEBUG(dbgs() << "GVN INSERTED " << *NewLoad << '\n'); } // Perform PHI construction. From sabre at nondot.org Mon Feb 22 23:59:11 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 23 Feb 2010 05:59:11 -0000 Subject: [llvm-commits] [llvm] r96891 - /llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Message-ID: <20100223055911.226042A6C12C@llvm.org> Author: lattner Date: Mon Feb 22 23:59:10 2010 New Revision: 96891 URL: http://llvm.org/viewvc/llvm-project?rev=96891&view=rev Log: more tidying up Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp?rev=96891&r1=96890&r2=96891&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp (original) +++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Mon Feb 22 23:59:10 2010 @@ -1579,10 +1579,10 @@ if (TPN->ContainsUnresolvedType()) { if (iter == 0) throw "Value #" + utostr(i) + " of PredicateOperand '" + - DefaultOps[iter][i]->getName() + "' doesn't have a concrete type!"; + DefaultOps[iter][i]->getName() +"' doesn't have a concrete type!"; else throw "Value #" + utostr(i) + " of OptionalDefOperand '" + - DefaultOps[iter][i]->getName() + "' doesn't have a concrete type!"; + DefaultOps[iter][i]->getName() +"' doesn't have a concrete type!"; } DefaultOpInfo.DefaultOps.push_back(TPN); } @@ -1626,21 +1626,21 @@ TreePatternNode *&Slot = InstInputs[Pat->getName()]; if (!Slot) { Slot = Pat; + return true; + } + Record *SlotRec; + if (Slot->isLeaf()) { + SlotRec = dynamic_cast(Slot->getLeafValue())->getDef(); } else { - Record *SlotRec; - if (Slot->isLeaf()) { - SlotRec = dynamic_cast(Slot->getLeafValue())->getDef(); - } else { - assert(Slot->getNumChildren() == 0 && "can't be a use with children!"); - SlotRec = Slot->getOperator(); - } - - // Ensure that the inputs agree if we've already seen this input. - if (Rec != SlotRec) - I->error("All $" + Pat->getName() + " inputs must agree with each other"); - if (Slot->getExtTypes() != Pat->getExtTypes()) - I->error("All $" + Pat->getName() + " inputs must agree with each other"); + assert(Slot->getNumChildren() == 0 && "can't be a use with children!"); + SlotRec = Slot->getOperator(); } + + // Ensure that the inputs agree if we've already seen this input. + if (Rec != SlotRec) + I->error("All $" + Pat->getName() + " inputs must agree with each other"); + if (Slot->getExtTypes() != Pat->getExtTypes()) + I->error("All $" + Pat->getName() + " inputs must agree with each other"); return true; } From sabre at nondot.org Tue Feb 23 00:09:57 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 23 Feb 2010 06:09:57 -0000 Subject: [llvm-commits] [llvm] r96894 - /llvm/trunk/lib/Target/X86/X86Instr64bit.td Message-ID: <20100223060957.588892A6C12C@llvm.org> Author: lattner Date: Tue Feb 23 00:09:57 2010 New Revision: 96894 URL: http://llvm.org/viewvc/llvm-project?rev=96894&view=rev Log: fix a type mismatch in this pattern, where we were using an i64 imm in a place where an i32 imm was required, the old isel just got lucky. This fixes CodeGen/X86/x86-64-and-mask.ll Modified: llvm/trunk/lib/Target/X86/X86Instr64bit.td Modified: llvm/trunk/lib/Target/X86/X86Instr64bit.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Instr64bit.td?rev=96894&r1=96893&r2=96894&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86Instr64bit.td (original) +++ llvm/trunk/lib/Target/X86/X86Instr64bit.td Tue Feb 23 00:09:57 2010 @@ -65,12 +65,18 @@ return (int64_t)N->getZExtValue() == (int8_t)N->getZExtValue(); }]>; +def GetLo32XForm : SDNodeXFormgetZExtValue()); +}]>; + def i64immSExt32 : PatLeaf<(i64 imm), [{ // i64immSExt32 predicate - True if the 64-bit immediate fits in a 32-bit // sign extended field. return (int64_t)N->getZExtValue() == (int32_t)N->getZExtValue(); }]>; + def i64immZExt32 : PatLeaf<(i64 imm), [{ // i64immZExt32 predicate - True if the 64-bit immediate fits in a 32-bit // unsignedsign extended field. @@ -1981,7 +1987,7 @@ (i64 0), (AND32ri (EXTRACT_SUBREG GR64:$src, x86_subreg_32bit), - imm:$imm), + (i32 (GetLo32XForm imm:$imm))), x86_subreg_32bit)>; // r & (2^32-1) ==> movz From sabre at nondot.org Tue Feb 23 00:16:51 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 23 Feb 2010 06:16:51 -0000 Subject: [llvm-commits] [llvm] r96896 - in /llvm/trunk/utils/TableGen: CodeGenDAGPatterns.cpp CodeGenDAGPatterns.h Message-ID: <20100223061651.7CC6B2A6C12C@llvm.org> Author: lattner Date: Tue Feb 23 00:16:51 2010 New Revision: 96896 URL: http://llvm.org/viewvc/llvm-project?rev=96896&view=rev Log: merge some code. Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp?rev=96896&r1=96895&r2=96896&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp (original) +++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Tue Feb 23 00:16:51 2010 @@ -2077,19 +2077,26 @@ SrcPattern = Pattern; } - std::string Reason; - if (!SrcPattern->canPatternMatch(Reason, *this)) - I->error("Instruction can never match: " + Reason); - Record *Instr = II->first; TreePatternNode *DstPattern = TheInst.getResultPattern(); - PatternsToMatch. - push_back(PatternToMatch(Instr->getValueAsListInit("Predicates"), - SrcPattern, DstPattern, TheInst.getImpResults(), - Instr->getValueAsInt("AddedComplexity"))); + AddPatternToMatch(I, + PatternToMatch(Instr->getValueAsListInit("Predicates"), + SrcPattern, DstPattern, + TheInst.getImpResults(), + Instr->getValueAsInt("AddedComplexity"))); } } +void CodeGenDAGPatterns::AddPatternToMatch(const TreePattern *Pattern, + const PatternToMatch &PTM) { + std::string Reason; + if (!PTM.getSrcPattern()->canPatternMatch(Reason, *this)) + Pattern->error("Instruction can never match: " + Reason); + + PatternsToMatch.push_back(PTM); +} + + void CodeGenDAGPatterns::InferInstructionFlags() { std::map &InstrDescs = @@ -2218,15 +2225,12 @@ TreePattern Temp(Result->getRecord(), DstPattern, false, *this); Temp.InferAllTypes(); - std::string Reason; - if (!Pattern->getTree(0)->canPatternMatch(Reason, *this)) - Pattern->error("Pattern can never match: " + Reason); - - PatternsToMatch. - push_back(PatternToMatch(Patterns[i]->getValueAsListInit("Predicates"), - Pattern->getTree(0), - Temp.getOnlyTree(), InstImpResults, - Patterns[i]->getValueAsInt("AddedComplexity"))); + + AddPatternToMatch(Pattern, + PatternToMatch(Patterns[i]->getValueAsListInit("Predicates"), + Pattern->getTree(0), + Temp.getOnlyTree(), InstImpResults, + Patterns[i]->getValueAsInt("AddedComplexity"))); } } Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h?rev=96896&r1=96895&r2=96896&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h (original) +++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h Tue Feb 23 00:16:51 2010 @@ -625,6 +625,7 @@ void InferInstructionFlags(); void GenerateVariants(); + void AddPatternToMatch(const TreePattern *Pattern, const PatternToMatch &PTM); void FindPatternInputsAndOutputs(TreePattern *I, TreePatternNode *Pat, std::map &InstInputs, From sabre at nondot.org Tue Feb 23 00:35:46 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 23 Feb 2010 06:35:46 -0000 Subject: [llvm-commits] [llvm] r96898 - /llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Message-ID: <20100223063546.1805B2A6C12C@llvm.org> Author: lattner Date: Tue Feb 23 00:35:45 2010 New Revision: 96898 URL: http://llvm.org/viewvc/llvm-project?rev=96898&view=rev Log: reject patterns that mention a name in the destination pattern but not in the input. Previously, this would trigger an abort late in the isel logic. Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp?rev=96898&r1=96897&r2=96898&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp (original) +++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Tue Feb 23 00:35:45 2010 @@ -2078,21 +2078,47 @@ } Record *Instr = II->first; - TreePatternNode *DstPattern = TheInst.getResultPattern(); AddPatternToMatch(I, PatternToMatch(Instr->getValueAsListInit("Predicates"), - SrcPattern, DstPattern, + SrcPattern, + TheInst.getResultPattern(), TheInst.getImpResults(), Instr->getValueAsInt("AddedComplexity"))); } } +static void FindNames(const TreePatternNode *P, + std::map &Names) { + if (!P->getName().empty()) + Names[P->getName()] = P; + + if (!P->isLeaf()) { + for (unsigned i = 0, e = P->getNumChildren(); i != e; ++i) + FindNames(P->getChild(i), Names); + } +} + void CodeGenDAGPatterns::AddPatternToMatch(const TreePattern *Pattern, const PatternToMatch &PTM) { + // Do some sanity checking on the pattern we're about to match. std::string Reason; if (!PTM.getSrcPattern()->canPatternMatch(Reason, *this)) - Pattern->error("Instruction can never match: " + Reason); + Pattern->error("Pattern can never match: " + Reason); + // Find all of the named values in the input and output, ensure they have the + // same type. + std::map SrcNames, DstNames; + FindNames(PTM.getSrcPattern(), SrcNames); + FindNames(PTM.getDstPattern(), DstNames); + + // Scan all of the named values in the destination pattern, rejecting them if + // they don't exist in the input pattern. + for (std::map::iterator + I = DstNames.begin(), E = DstNames.end(); I != E; ++I) + if (SrcNames[I->first] == 0) + Pattern->error("Pattern has input without matching name in output: $" + + I->first); + PatternsToMatch.push_back(PTM); } From sabre at nondot.org Tue Feb 23 00:54:29 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 23 Feb 2010 06:54:29 -0000 Subject: [llvm-commits] [llvm] r96899 - in /llvm/trunk/lib/Target: Alpha/AlphaInstrInfo.td PowerPC/PPCInstrInfo.td X86/X86Instr64bit.td X86/X86InstrInfo.td X86/X86InstrSSE.td Message-ID: <20100223065429.5F5D02A6C12C@llvm.org> Author: lattner Date: Tue Feb 23 00:54:29 2010 New Revision: 96899 URL: http://llvm.org/viewvc/llvm-project?rev=96899&view=rev Log: remove a bunch of dead named arguments in input patterns, though some look dubious afaict, these are all ok. Modified: llvm/trunk/lib/Target/Alpha/AlphaInstrInfo.td llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td llvm/trunk/lib/Target/X86/X86Instr64bit.td llvm/trunk/lib/Target/X86/X86InstrInfo.td llvm/trunk/lib/Target/X86/X86InstrSSE.td Modified: llvm/trunk/lib/Target/Alpha/AlphaInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaInstrInfo.td?rev=96899&r1=96898&r2=96899&view=diff ============================================================================== --- llvm/trunk/lib/Target/Alpha/AlphaInstrInfo.td (original) +++ llvm/trunk/lib/Target/Alpha/AlphaInstrInfo.td Tue Feb 23 00:54:29 2010 @@ -92,7 +92,7 @@ ((int64_t)N->getZExtValue() << 32) >> 32; }], SExt16>; -def zappat : PatFrag<(ops node:$LHS), (and node:$LHS, imm:$L), [{ +def zappat : PatFrag<(ops node:$LHS), (and node:$LHS, imm), [{ ConstantSDNode *RHS = dyn_cast(N->getOperand(1)); if (!RHS) return 0; uint64_t build = get_zapImm(N->getOperand(0), (uint64_t)RHS->getZExtValue()); @@ -602,9 +602,9 @@ def MB : MfcPForm<0x18, 0x4000, "mb", s_imisc>; //memory barrier def WMB : MfcPForm<0x18, 0x4400, "wmb", s_imisc>; //write memory barrier -def : Pat<(membarrier (i64 imm:$ll), (i64 imm:$ls), (i64 imm:$sl), (i64 1), (i64 imm:$dev)), +def : Pat<(membarrier (i64 imm), (i64 imm), (i64 imm), (i64 1), (i64 imm)), (WMB)>; -def : Pat<(membarrier (i64 imm:$ll), (i64 imm:$ls), (i64 imm:$sl), (i64 imm:$ss), (i64 imm:$dev)), +def : Pat<(membarrier (i64 imm), (i64 imm), (i64 imm), (i64 imm), (i64 imm)), (MB)>; //Basic Floating point ops Modified: llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td?rev=96899&r1=96898&r2=96899&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td (original) +++ llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td Tue Feb 23 00:54:29 2010 @@ -1480,11 +1480,11 @@ (FMRSD (LFSX xaddr:$src))>; // Memory barriers -def : Pat<(membarrier (i32 imm:$ll), - (i32 imm:$ls), - (i32 imm:$sl), - (i32 imm:$ss), - (i32 imm:$device)), +def : Pat<(membarrier (i32 imm /*ll*/), + (i32 imm /*ls*/), + (i32 imm /*sl*/), + (i32 imm /*ss*/), + (i32 imm /*device*/)), (SYNC)>; include "PPCInstrAltivec.td" Modified: llvm/trunk/lib/Target/X86/X86Instr64bit.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Instr64bit.td?rev=96899&r1=96898&r2=96899&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86Instr64bit.td (original) +++ llvm/trunk/lib/Target/X86/X86Instr64bit.td Tue Feb 23 00:54:29 2010 @@ -2111,34 +2111,34 @@ def : Pat<(shl GR64:$src1, (i8 1)), (ADD64rr GR64:$src1, GR64:$src1)>; // (shl x (and y, 63)) ==> (shl x, y) -def : Pat<(shl GR64:$src1, (and CL:$amt, 63)), +def : Pat<(shl GR64:$src1, (and CL, 63)), (SHL64rCL GR64:$src1)>; -def : Pat<(store (shl (loadi64 addr:$dst), (and CL:$amt, 63)), addr:$dst), +def : Pat<(store (shl (loadi64 addr:$dst), (and CL, 63)), addr:$dst), (SHL64mCL addr:$dst)>; -def : Pat<(srl GR64:$src1, (and CL:$amt, 63)), +def : Pat<(srl GR64:$src1, (and CL, 63)), (SHR64rCL GR64:$src1)>; -def : Pat<(store (srl (loadi64 addr:$dst), (and CL:$amt, 63)), addr:$dst), +def : Pat<(store (srl (loadi64 addr:$dst), (and CL, 63)), addr:$dst), (SHR64mCL addr:$dst)>; -def : Pat<(sra GR64:$src1, (and CL:$amt, 63)), +def : Pat<(sra GR64:$src1, (and CL, 63)), (SAR64rCL GR64:$src1)>; -def : Pat<(store (sra (loadi64 addr:$dst), (and CL:$amt, 63)), addr:$dst), +def : Pat<(store (sra (loadi64 addr:$dst), (and CL, 63)), addr:$dst), (SAR64mCL addr:$dst)>; // Double shift patterns -def : Pat<(shrd GR64:$src1, (i8 imm:$amt1), GR64:$src2, (i8 imm:$amt2)), +def : Pat<(shrd GR64:$src1, (i8 imm:$amt1), GR64:$src2, (i8 imm)), (SHRD64rri8 GR64:$src1, GR64:$src2, (i8 imm:$amt1))>; def : Pat<(store (shrd (loadi64 addr:$dst), (i8 imm:$amt1), - GR64:$src2, (i8 imm:$amt2)), addr:$dst), + GR64:$src2, (i8 imm)), addr:$dst), (SHRD64mri8 addr:$dst, GR64:$src2, (i8 imm:$amt1))>; -def : Pat<(shld GR64:$src1, (i8 imm:$amt1), GR64:$src2, (i8 imm:$amt2)), +def : Pat<(shld GR64:$src1, (i8 imm:$amt1), GR64:$src2, (i8 imm)), (SHLD64rri8 GR64:$src1, GR64:$src2, (i8 imm:$amt1))>; def : Pat<(store (shld (loadi64 addr:$dst), (i8 imm:$amt1), - GR64:$src2, (i8 imm:$amt2)), addr:$dst), + GR64:$src2, (i8 imm)), addr:$dst), (SHLD64mri8 addr:$dst, GR64:$src2, (i8 imm:$amt1))>; // (or x1, x2) -> (add x1, x2) if two operands are known not to share bits. Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=96899&r1=96898&r2=96899&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Tue Feb 23 00:54:29 2010 @@ -4543,43 +4543,43 @@ def : Pat<(shl GR32:$src1, (i8 1)), (ADD32rr GR32:$src1, GR32:$src1)>; // (shl x (and y, 31)) ==> (shl x, y) -def : Pat<(shl GR8:$src1, (and CL:$amt, 31)), +def : Pat<(shl GR8:$src1, (and CL, 31)), (SHL8rCL GR8:$src1)>; -def : Pat<(shl GR16:$src1, (and CL:$amt, 31)), +def : Pat<(shl GR16:$src1, (and CL, 31)), (SHL16rCL GR16:$src1)>; -def : Pat<(shl GR32:$src1, (and CL:$amt, 31)), +def : Pat<(shl GR32:$src1, (and CL, 31)), (SHL32rCL GR32:$src1)>; -def : Pat<(store (shl (loadi8 addr:$dst), (and CL:$amt, 31)), addr:$dst), +def : Pat<(store (shl (loadi8 addr:$dst), (and CL, 31)), addr:$dst), (SHL8mCL addr:$dst)>; -def : Pat<(store (shl (loadi16 addr:$dst), (and CL:$amt, 31)), addr:$dst), +def : Pat<(store (shl (loadi16 addr:$dst), (and CL, 31)), addr:$dst), (SHL16mCL addr:$dst)>; -def : Pat<(store (shl (loadi32 addr:$dst), (and CL:$amt, 31)), addr:$dst), +def : Pat<(store (shl (loadi32 addr:$dst), (and CL, 31)), addr:$dst), (SHL32mCL addr:$dst)>; -def : Pat<(srl GR8:$src1, (and CL:$amt, 31)), +def : Pat<(srl GR8:$src1, (and CL, 31)), (SHR8rCL GR8:$src1)>; -def : Pat<(srl GR16:$src1, (and CL:$amt, 31)), +def : Pat<(srl GR16:$src1, (and CL, 31)), (SHR16rCL GR16:$src1)>; -def : Pat<(srl GR32:$src1, (and CL:$amt, 31)), +def : Pat<(srl GR32:$src1, (and CL, 31)), (SHR32rCL GR32:$src1)>; -def : Pat<(store (srl (loadi8 addr:$dst), (and CL:$amt, 31)), addr:$dst), +def : Pat<(store (srl (loadi8 addr:$dst), (and CL, 31)), addr:$dst), (SHR8mCL addr:$dst)>; -def : Pat<(store (srl (loadi16 addr:$dst), (and CL:$amt, 31)), addr:$dst), +def : Pat<(store (srl (loadi16 addr:$dst), (and CL, 31)), addr:$dst), (SHR16mCL addr:$dst)>; -def : Pat<(store (srl (loadi32 addr:$dst), (and CL:$amt, 31)), addr:$dst), +def : Pat<(store (srl (loadi32 addr:$dst), (and CL, 31)), addr:$dst), (SHR32mCL addr:$dst)>; -def : Pat<(sra GR8:$src1, (and CL:$amt, 31)), +def : Pat<(sra GR8:$src1, (and CL, 31)), (SAR8rCL GR8:$src1)>; -def : Pat<(sra GR16:$src1, (and CL:$amt, 31)), +def : Pat<(sra GR16:$src1, (and CL, 31)), (SAR16rCL GR16:$src1)>; -def : Pat<(sra GR32:$src1, (and CL:$amt, 31)), +def : Pat<(sra GR32:$src1, (and CL, 31)), (SAR32rCL GR32:$src1)>; -def : Pat<(store (sra (loadi8 addr:$dst), (and CL:$amt, 31)), addr:$dst), +def : Pat<(store (sra (loadi8 addr:$dst), (and CL, 31)), addr:$dst), (SAR8mCL addr:$dst)>; -def : Pat<(store (sra (loadi16 addr:$dst), (and CL:$amt, 31)), addr:$dst), +def : Pat<(store (sra (loadi16 addr:$dst), (and CL, 31)), addr:$dst), (SAR16mCL addr:$dst)>; -def : Pat<(store (sra (loadi32 addr:$dst), (and CL:$amt, 31)), addr:$dst), +def : Pat<(store (sra (loadi32 addr:$dst), (and CL, 31)), addr:$dst), (SAR32mCL addr:$dst)>; // (or (x >> c) | (y << (32 - c))) ==> (shrd32 x, y, c) @@ -4600,11 +4600,11 @@ addr:$dst), (SHRD32mrCL addr:$dst, GR32:$src2)>; -def : Pat<(shrd GR32:$src1, (i8 imm:$amt1), GR32:$src2, (i8 imm:$amt2)), +def : Pat<(shrd GR32:$src1, (i8 imm:$amt1), GR32:$src2, (i8 imm/*:$amt2*/)), (SHRD32rri8 GR32:$src1, GR32:$src2, (i8 imm:$amt1))>; def : Pat<(store (shrd (loadi32 addr:$dst), (i8 imm:$amt1), - GR32:$src2, (i8 imm:$amt2)), addr:$dst), + GR32:$src2, (i8 imm/*:$amt2*/)), addr:$dst), (SHRD32mri8 addr:$dst, GR32:$src2, (i8 imm:$amt1))>; // (or (x << c) | (y >> (32 - c))) ==> (shld32 x, y, c) @@ -4625,11 +4625,11 @@ addr:$dst), (SHLD32mrCL addr:$dst, GR32:$src2)>; -def : Pat<(shld GR32:$src1, (i8 imm:$amt1), GR32:$src2, (i8 imm:$amt2)), +def : Pat<(shld GR32:$src1, (i8 imm:$amt1), GR32:$src2, (i8 imm/*:$amt2*/)), (SHLD32rri8 GR32:$src1, GR32:$src2, (i8 imm:$amt1))>; def : Pat<(store (shld (loadi32 addr:$dst), (i8 imm:$amt1), - GR32:$src2, (i8 imm:$amt2)), addr:$dst), + GR32:$src2, (i8 imm/*:$amt2*/)), addr:$dst), (SHLD32mri8 addr:$dst, GR32:$src2, (i8 imm:$amt1))>; // (or (x >> c) | (y << (16 - c))) ==> (shrd16 x, y, c) @@ -4650,11 +4650,11 @@ addr:$dst), (SHRD16mrCL addr:$dst, GR16:$src2)>; -def : Pat<(shrd GR16:$src1, (i8 imm:$amt1), GR16:$src2, (i8 imm:$amt2)), +def : Pat<(shrd GR16:$src1, (i8 imm:$amt1), GR16:$src2, (i8 imm/*:$amt2*/)), (SHRD16rri8 GR16:$src1, GR16:$src2, (i8 imm:$amt1))>; def : Pat<(store (shrd (loadi16 addr:$dst), (i8 imm:$amt1), - GR16:$src2, (i8 imm:$amt2)), addr:$dst), + GR16:$src2, (i8 imm/*:$amt2*/)), addr:$dst), (SHRD16mri8 addr:$dst, GR16:$src2, (i8 imm:$amt1))>; // (or (x << c) | (y >> (16 - c))) ==> (shld16 x, y, c) @@ -4675,11 +4675,11 @@ addr:$dst), (SHLD16mrCL addr:$dst, GR16:$src2)>; -def : Pat<(shld GR16:$src1, (i8 imm:$amt1), GR16:$src2, (i8 imm:$amt2)), +def : Pat<(shld GR16:$src1, (i8 imm:$amt1), GR16:$src2, (i8 imm/*:$amt2*/)), (SHLD16rri8 GR16:$src1, GR16:$src2, (i8 imm:$amt1))>; def : Pat<(store (shld (loadi16 addr:$dst), (i8 imm:$amt1), - GR16:$src2, (i8 imm:$amt2)), addr:$dst), + GR16:$src2, (i8 imm/*:$amt2*/)), addr:$dst), (SHLD16mri8 addr:$dst, GR16:$src2, (i8 imm:$amt1))>; // (anyext (setcc_carry)) -> (setcc_carry) Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=96899&r1=96898&r2=96899&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Tue Feb 23 00:54:29 2010 @@ -2383,11 +2383,11 @@ "mfence", [(int_x86_sse2_mfence)]>, TB, Requires<[HasSSE2]>; //TODO: custom lower this so as to never even generate the noop -def : Pat<(membarrier (i8 imm:$ll), (i8 imm:$ls), (i8 imm:$sl), (i8 imm:$ss), +def : Pat<(membarrier (i8 imm), (i8 imm), (i8 imm), (i8 imm), (i8 0)), (NOOP)>; def : Pat<(membarrier (i8 0), (i8 0), (i8 0), (i8 1), (i8 1)), (SFENCE)>; def : Pat<(membarrier (i8 1), (i8 0), (i8 0), (i8 0), (i8 1)), (LFENCE)>; -def : Pat<(membarrier (i8 imm:$ll), (i8 imm:$ls), (i8 imm:$sl), (i8 imm:$ss), +def : Pat<(membarrier (i8 imm), (i8 imm), (i8 imm), (i8 imm), (i8 1)), (MFENCE)>; // Alias instructions that map zero vector to pxor / xorp* for sse. From sabre at nondot.org Tue Feb 23 00:55:24 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 23 Feb 2010 06:55:24 -0000 Subject: [llvm-commits] [llvm] r96900 - /llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Message-ID: <20100223065524.37A8D2A6C12C@llvm.org> Author: lattner Date: Tue Feb 23 00:55:24 2010 New Revision: 96900 URL: http://llvm.org/viewvc/llvm-project?rev=96900&view=rev Log: reject patterns that have dead named arguments in the input pattern this is tidier and can find bugs. Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp?rev=96900&r1=96899&r2=96900&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp (original) +++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Tue Feb 23 00:55:24 2010 @@ -2087,10 +2087,20 @@ } } + +typedef std::pair NameRecord; + static void FindNames(const TreePatternNode *P, - std::map &Names) { - if (!P->getName().empty()) - Names[P->getName()] = P; + std::map &Names) { + if (!P->getName().empty()) { + NameRecord &Rec = Names[P->getName()]; + // If this is the first instance of the name, remember the node. + if (Rec.second++ == 0) + Rec.first = P; +// else +// assert(Rec.first->getExtTypes() == P->getExtTypes() && +// "Type mismatch on name repetition"); + } if (!P->isLeaf()) { for (unsigned i = 0, e = P->getNumChildren(); i != e; ++i) @@ -2107,18 +2117,25 @@ // Find all of the named values in the input and output, ensure they have the // same type. - std::map SrcNames, DstNames; + std::map SrcNames, DstNames; FindNames(PTM.getSrcPattern(), SrcNames); FindNames(PTM.getDstPattern(), DstNames); // Scan all of the named values in the destination pattern, rejecting them if // they don't exist in the input pattern. - for (std::map::iterator + for (std::map::iterator I = DstNames.begin(), E = DstNames.end(); I != E; ++I) - if (SrcNames[I->first] == 0) + if (SrcNames[I->first].first == 0) Pattern->error("Pattern has input without matching name in output: $" + I->first); - + + // Scan all of the named values in the source pattern, rejecting them if the + // name isn't used in the dest, and isn't used to tie two values together. + for (std::map::iterator + I = SrcNames.begin(), E = SrcNames.end(); I != E; ++I) + if (DstNames[I->first].first == 0 && SrcNames[I->first].second == 1) + Pattern->error("Pattern has dead named input: $" + I->first); + PatternsToMatch.push_back(PTM); } From sabre at nondot.org Tue Feb 23 01:16:12 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 23 Feb 2010 07:16:12 -0000 Subject: [llvm-commits] [llvm] r96901 - /llvm/trunk/lib/Target/X86/X86InstrMMX.td Message-ID: <20100223071612.B59332A6C12C@llvm.org> Author: lattner Date: Tue Feb 23 01:16:12 2010 New Revision: 96901 URL: http://llvm.org/viewvc/llvm-project?rev=96901&view=rev Log: remove a confused pattern that is trying to match an address then use it as an MMX register (!?). Modified: llvm/trunk/lib/Target/X86/X86InstrMMX.td Modified: llvm/trunk/lib/Target/X86/X86InstrMMX.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrMMX.td?rev=96901&r1=96900&r2=96901&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrMMX.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrMMX.td Tue Feb 23 01:16:12 2010 @@ -599,13 +599,6 @@ (MMX_PUNPCKHDQrr VR64:$src, VR64:$src)>; } -// Patterns to perform vector shuffling with a zeroed out vector. -let AddedComplexity = 20 in { - def : Pat<(bc_v2i32 (mmx_unpckl immAllZerosV, - (v2i32 (scalar_to_vector (load_mmx addr:$src))))), - (MMX_PUNPCKLDQrm VR64:$src, VR64:$src)>; -} - // Some special case PANDN patterns. // FIXME: Get rid of these. def : Pat<(v1i64 (and (xor VR64:$src1, (bc_v1i64 (v2i32 immAllOnesV))), From sabre at nondot.org Tue Feb 23 01:21:16 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 23 Feb 2010 07:21:16 -0000 Subject: [llvm-commits] [llvm] r96903 - /llvm/trunk/lib/Target/CellSPU/SPU64InstrInfo.td Message-ID: <20100223072116.1D9552A6C12C@llvm.org> Author: lattner Date: Tue Feb 23 01:21:15 2010 New Revision: 96903 URL: http://llvm.org/viewvc/llvm-project?rev=96903&view=rev Log: disable two patterns that are using non-sensical result pattern types. Modified: llvm/trunk/lib/Target/CellSPU/SPU64InstrInfo.td Modified: llvm/trunk/lib/Target/CellSPU/SPU64InstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPU64InstrInfo.td?rev=96903&r1=96902&r2=96903&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/SPU64InstrInfo.td (original) +++ llvm/trunk/lib/Target/CellSPU/SPU64InstrInfo.td Tue Feb 23 01:21:15 2010 @@ -123,8 +123,8 @@ defm I64LGT: CompareLogicalGreaterThan64; def : Pat<(setugt R64C:$rA, R64C:$rB), I64LGTr64.Fragment>; -def : Pat<(setugt (v2i64 VECREG:$rA), (v2i64 VECREG:$rB)), - I64LGTv2i64.Fragment>; +//def : Pat<(setugt (v2i64 VECREG:$rA), (v2i64 VECREG:$rB)), +// I64LGTv2i64.Fragment>; // i64 setult: def : I64SETCCNegCond; @@ -201,8 +201,8 @@ defm I64GT: CompareLogicalGreaterThan64; def : Pat<(setgt R64C:$rA, R64C:$rB), I64GTr64.Fragment>; -def : Pat<(setgt (v2i64 VECREG:$rA), (v2i64 VECREG:$rB)), - I64GTv2i64.Fragment>; +//def : Pat<(setgt (v2i64 VECREG:$rA), (v2i64 VECREG:$rB)), +// I64GTv2i64.Fragment>; // i64 setult: def : I64SETCCNegCond; From sabre at nondot.org Tue Feb 23 01:22:28 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 23 Feb 2010 07:22:28 -0000 Subject: [llvm-commits] [llvm] r96904 - /llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Message-ID: <20100223072228.A52182A6C12C@llvm.org> Author: lattner Date: Tue Feb 23 01:22:28 2010 New Revision: 96904 URL: http://llvm.org/viewvc/llvm-project?rev=96904&view=rev Log: Reject patterns that use a name multiple times in the src or result of a pattern and where the uses have different types. Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp?rev=96904&r1=96903&r2=96904&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp (original) +++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Tue Feb 23 01:22:28 2010 @@ -2091,20 +2091,21 @@ typedef std::pair NameRecord; static void FindNames(const TreePatternNode *P, - std::map &Names) { + std::map &Names, + const TreePattern *PatternTop) { if (!P->getName().empty()) { NameRecord &Rec = Names[P->getName()]; // If this is the first instance of the name, remember the node. if (Rec.second++ == 0) Rec.first = P; -// else -// assert(Rec.first->getExtTypes() == P->getExtTypes() && -// "Type mismatch on name repetition"); + else if (Rec.first->getExtTypes() != P->getExtTypes()) + PatternTop->error("repetition of value: $" + P->getName() + + " where different uses have different types!"); } if (!P->isLeaf()) { for (unsigned i = 0, e = P->getNumChildren(); i != e; ++i) - FindNames(P->getChild(i), Names); + FindNames(P->getChild(i), Names, PatternTop); } } @@ -2118,8 +2119,8 @@ // Find all of the named values in the input and output, ensure they have the // same type. std::map SrcNames, DstNames; - FindNames(PTM.getSrcPattern(), SrcNames); - FindNames(PTM.getDstPattern(), DstNames); + FindNames(PTM.getSrcPattern(), SrcNames, Pattern); + FindNames(PTM.getDstPattern(), DstNames, Pattern); // Scan all of the named values in the destination pattern, rejecting them if // they don't exist in the input pattern. From sabre at nondot.org Tue Feb 23 01:50:58 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 23 Feb 2010 07:50:58 -0000 Subject: [llvm-commits] [llvm] r96905 - /llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Message-ID: <20100223075058.E7EE62A6C12C@llvm.org> Author: lattner Date: Tue Feb 23 01:50:58 2010 New Revision: 96905 URL: http://llvm.org/viewvc/llvm-project?rev=96905&view=rev Log: add some #if 0'd out code for checking that named values in input/output patterns have the same type. It turns out that this triggers all the time because we don't infer types between these boundaries. Until we do, don't turn this on. Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp?rev=96905&r1=96904&r2=96905&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp (original) +++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Tue Feb 23 01:50:58 2010 @@ -568,33 +568,36 @@ return true; // unreachable } +static std::string GetTypeName(unsigned char TypeID) { + switch (TypeID) { + case MVT::Other: return "Other"; + case MVT::iAny: return "iAny"; + case MVT::fAny: return "fAny"; + case MVT::vAny: return "vAny"; + case EEVT::isUnknown: return "isUnknown"; + case MVT::iPTR: return "iPTR"; + case MVT::iPTRAny: return "iPTRAny"; + default: + std::string VTName = llvm::getName((MVT::SimpleValueType)TypeID); + // Strip off EVT:: prefix if present. + if (VTName.substr(0,5) == "MVT::") + VTName = VTName.substr(5); + return VTName; + } +} + void TreePatternNode::print(raw_ostream &OS) const { if (isLeaf()) { OS << *getLeafValue(); } else { - OS << "(" << getOperator()->getName(); + OS << '(' << getOperator()->getName(); } // FIXME: At some point we should handle printing all the value types for // nodes that are multiply typed. - switch (getExtTypeNum(0)) { - case MVT::Other: OS << ":Other"; break; - case MVT::iAny: OS << ":iAny"; break; - case MVT::fAny : OS << ":fAny"; break; - case MVT::vAny: OS << ":vAny"; break; - case EEVT::isUnknown: ; /*OS << ":?";*/ break; - case MVT::iPTR: OS << ":iPTR"; break; - case MVT::iPTRAny: OS << ":iPTRAny"; break; - default: { - std::string VTName = llvm::getName(getTypeNum(0)); - // Strip off EVT:: prefix if present. - if (VTName.substr(0,5) == "MVT::") - VTName = VTName.substr(5); - OS << ":" << VTName; - break; - } - } + if (getExtTypeNum(0) != EEVT::isUnknown) + OS << ':' << GetTypeName(getExtTypeNum(0)); if (!isLeaf()) { if (getNumChildren() != 0) { @@ -2125,10 +2128,29 @@ // Scan all of the named values in the destination pattern, rejecting them if // they don't exist in the input pattern. for (std::map::iterator - I = DstNames.begin(), E = DstNames.end(); I != E; ++I) + I = DstNames.begin(), E = DstNames.end(); I != E; ++I) { if (SrcNames[I->first].first == 0) Pattern->error("Pattern has input without matching name in output: $" + I->first); + +#if 0 + const std::vector &SrcTypeVec = + SrcNames[I->first].first->getExtTypes(); + const std::vector &DstTypeVec = + I->second.first->getExtTypes(); + if (SrcTypeVec == DstTypeVec) continue; + + std::string SrcType, DstType; + for (unsigned i = 0, e = SrcTypeVec.size(); i != e; ++i) + SrcType += ":" + GetTypeName(SrcTypeVec[i]); + for (unsigned i = 0, e = DstTypeVec.size(); i != e; ++i) + DstType += ":" + GetTypeName(DstTypeVec[i]); + + Pattern->error("Variable $" + I->first + + " has different types in source (" + SrcType + + ") and dest (" + DstType + ") pattern!"); +#endif + } // Scan all of the named values in the source pattern, rejecting them if the // name isn't used in the dest, and isn't used to tie two values together. From daniel at zuster.org Tue Feb 23 01:56:18 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 07:56:18 -0000 Subject: [llvm-commits] [llvm] r96906 - in /llvm/trunk: docs/TestingGuide.html test/Makefile test/lib/llvm.exp test/site.exp.in utils/lit/lit/ExampleTests/LLVM.InTree/test/site.exp utils/lit/lit/ExampleTests/LLVM.OutOfTree/obj/test/site.exp Message-ID: <20100223075618.D23BC2A6C12C@llvm.org> Author: ddunbar Date: Tue Feb 23 01:56:18 2010 New Revision: 96906 URL: http://llvm.org/viewvc/llvm-project?rev=96906&view=rev Log: Kill unused llvmgccmajvers testing variable. Modified: llvm/trunk/docs/TestingGuide.html llvm/trunk/test/Makefile llvm/trunk/test/lib/llvm.exp llvm/trunk/test/site.exp.in llvm/trunk/utils/lit/lit/ExampleTests/LLVM.InTree/test/site.exp llvm/trunk/utils/lit/lit/ExampleTests/LLVM.OutOfTree/obj/test/site.exp Modified: llvm/trunk/docs/TestingGuide.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/TestingGuide.html?rev=96906&r1=96905&r2=96906&view=diff ============================================================================== --- llvm/trunk/docs/TestingGuide.html (original) +++ llvm/trunk/docs/TestingGuide.html Tue Feb 23 01:56:18 2010 @@ -764,9 +764,6 @@
    llvmgcc_version (%llvmgcc_version)
    The full version number of the llvm-gcc executable.
    -
    llvmgccmajvers (%llvmgccmajvers)
    -
    The major version number of the llvm-gcc executable.
    -
    gccpath
    The full path to the C compiler used to build LLVM. Note that this might not be gcc.
    Modified: llvm/trunk/test/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Makefile?rev=96906&r1=96905&r2=96906&view=diff ============================================================================== --- llvm/trunk/test/Makefile (original) +++ llvm/trunk/test/Makefile Tue Feb 23 01:56:18 2010 @@ -170,7 +170,6 @@ @echo 'set link "' $(CXX) $(CPP.Flags) $(CXX.Flags) $(TargetCommonOpts) $(CompileCommonOpts) $(LD.Flags) '"' >>site.tmp @echo 'set llvmgcc "$(LLVMGCC) $(TargetCommonOpts) $(EXTRA_OPTIONS)"' >> site.tmp @echo 'set llvmgxx "$(LLVMGCC) $(TargetCommonOpts) $(EXTRA_OPTIONS)"' >> site.tmp - @echo 'set llvmgccmajvers "$(LLVMGCC_MAJVERS)"' >> site.tmp @echo 'set bugpoint_topts $(BUGPOINT_TOPTS)' >> site.tmp @echo 'set shlibext "$(SHLIBEXT)"' >> site.tmp @echo 'set ocamlopt "$(OCAMLOPT) -cc \"$(CXX_FOR_OCAMLOPT)\" -I $(LibDir)/ocaml"' >> site.tmp Modified: llvm/trunk/test/lib/llvm.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lib/llvm.exp?rev=96906&r1=96905&r2=96906&view=diff ============================================================================== --- llvm/trunk/test/lib/llvm.exp (original) +++ llvm/trunk/test/lib/llvm.exp Tue Feb 23 01:56:18 2010 @@ -47,7 +47,7 @@ # cases. proc substitute { line test tmpFile } { global srcroot objroot srcdir objdir subdir target_triplet - global llvmgcc llvmgxx llvmgcc_version llvmgccmajvers ocamlopt + global llvmgcc llvmgxx llvmgcc_version ocamlopt global gccpath gxxpath compile_c compile_cxx link shlibext llvmlibsdir global llvmdsymutil valgrind grep gas bugpoint_topts set path [file join $srcdir $subdir] Modified: llvm/trunk/test/site.exp.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/site.exp.in?rev=96906&r1=96905&r2=96906&view=diff ============================================================================== --- llvm/trunk/test/site.exp.in (original) +++ llvm/trunk/test/site.exp.in Tue Feb 23 01:56:18 2010 @@ -18,7 +18,6 @@ set link "@TEST_LINK_CMD@" set llvmgcc "@LLVMGCC@" set llvmgxx "@LLVMGXX@" -set llvmgccmajvers "@LLVMGCCMAJVERS@" set bugpoint_topts "@BUGPOINT_TOPTS@" set shlibext "@SHLIBEXT@" set ocamlopt "@OCAMLOPT@" Modified: llvm/trunk/utils/lit/lit/ExampleTests/LLVM.InTree/test/site.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/ExampleTests/LLVM.InTree/test/site.exp?rev=96906&r1=96905&r2=96906&view=diff ============================================================================== --- llvm/trunk/utils/lit/lit/ExampleTests/LLVM.InTree/test/site.exp (original) +++ llvm/trunk/utils/lit/lit/ExampleTests/LLVM.InTree/test/site.exp Tue Feb 23 01:56:18 2010 @@ -19,7 +19,6 @@ set link " /usr/bin/g++ -arch x86_64 -I/Users/ddunbar/llvm.obj.64/include -I/Users/ddunbar/llvm.obj.64/test -I/Volumes/Data/ddunbar/llvm.obj.64/include -I/Volumes/Data/ddunbar/llvm/include -I/Volumes/Data/ddunbar/llvm/test -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -g -fno-exceptions -fno-common -Woverloaded-virtual -m64 -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -g -L/Users/ddunbar/llvm.obj.64/Debug/lib -L/Volumes/Data/ddunbar/llvm.obj.64/Debug/lib " set llvmgcc "/Users/ddunbar/llvm-gcc/install/bin/llvm-gcc -m64 " set llvmgxx "/Users/ddunbar/llvm-gcc/install/bin/llvm-gcc -m64 " -set llvmgccmajvers "4" set bugpoint_topts "-gcc-tool-args -m64" set shlibext ".dylib" set ocamlopt "/sw/bin/ocamlopt -cc \"g++ -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT\" -I /Users/ddunbar/llvm.obj.64/Debug/lib/ocaml" Modified: llvm/trunk/utils/lit/lit/ExampleTests/LLVM.OutOfTree/obj/test/site.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/ExampleTests/LLVM.OutOfTree/obj/test/site.exp?rev=96906&r1=96905&r2=96906&view=diff ============================================================================== --- llvm/trunk/utils/lit/lit/ExampleTests/LLVM.OutOfTree/obj/test/site.exp (original) +++ llvm/trunk/utils/lit/lit/ExampleTests/LLVM.OutOfTree/obj/test/site.exp Tue Feb 23 01:56:18 2010 @@ -19,7 +19,6 @@ set link " /usr/bin/g++ -arch x86_64 -I/Users/ddunbar/llvm.obj.64/include -I/Users/ddunbar/llvm.obj.64/test -I/Volumes/Data/ddunbar/llvm.obj.64/include -I/Volumes/Data/ddunbar/llvm/include -I/Volumes/Data/ddunbar/llvm/test -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -g -fno-exceptions -fno-common -Woverloaded-virtual -m64 -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -g -L/Users/ddunbar/llvm.obj.64/Debug/lib -L/Volumes/Data/ddunbar/llvm.obj.64/Debug/lib " set llvmgcc "/Users/ddunbar/llvm-gcc/install/bin/llvm-gcc -m64 " set llvmgxx "/Users/ddunbar/llvm-gcc/install/bin/llvm-gcc -m64 " -set llvmgccmajvers "4" set bugpoint_topts "-gcc-tool-args -m64" set shlibext ".dylib" set ocamlopt "/sw/bin/ocamlopt -cc \"g++ -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT\" -I /Users/ddunbar/llvm.obj.64/Debug/lib/ocaml" From daniel at zuster.org Tue Feb 23 01:56:22 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 07:56:22 -0000 Subject: [llvm-commits] [llvm] r96907 - in /llvm/trunk: Makefile Makefile.config.in Makefile.rules autoconf/configure.ac configure tools/llvm-config/CMakeLists.txt Message-ID: <20100223075622.7E1A82A6C12D@llvm.org> Author: ddunbar Date: Tue Feb 23 01:56:22 2010 New Revision: 96907 URL: http://llvm.org/viewvc/llvm-project?rev=96907&view=rev Log: Kill off LLVMGCC_MAJVERS make variable. Modified: llvm/trunk/Makefile llvm/trunk/Makefile.config.in llvm/trunk/Makefile.rules llvm/trunk/autoconf/configure.ac llvm/trunk/configure llvm/trunk/tools/llvm-config/CMakeLists.txt Modified: llvm/trunk/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile?rev=96907&r1=96906&r2=96907&view=diff ============================================================================== --- llvm/trunk/Makefile (original) +++ llvm/trunk/Makefile Tue Feb 23 01:56:22 2010 @@ -43,13 +43,6 @@ include $(LEVEL)/Makefile.config -# llvm-gcc4 doesn't need runtime libs. llvm-gcc4 is the only supported one. -# FIXME: Remove runtime entirely once we have an understanding of where -# libprofile etc should go. -#ifeq ($(LLVMGCC_MAJVERS),4) -# DIRS := $(filter-out runtime, $(DIRS)) -#endif - ifeq ($(MAKECMDGOALS),libs-only) DIRS := $(filter-out tools runtime docs, $(DIRS)) OPTIONAL_DIRS := Modified: llvm/trunk/Makefile.config.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.config.in?rev=96907&r1=96906&r2=96907&view=diff ============================================================================== --- llvm/trunk/Makefile.config.in (original) +++ llvm/trunk/Makefile.config.in Tue Feb 23 01:56:22 2010 @@ -184,11 +184,7 @@ LLVMGCCDIR := @LLVMGCCDIR@ # Determine the target for which LLVM should generate code. -ifeq (@LLVMGCC_MAJVERS@,3) -LLVMGCCARCH := @target@/3.4-llvm -else LLVMGCCARCH := @target@/@LLVMGCC_VERSION@ -endif # Determine the path where the library executables are LLVMGCCLIBEXEC := @LLVMGCCLIBEXEC@ @@ -199,7 +195,6 @@ LLVMCC1 := @LLVMCC1@ LLVMCC1PLUS := @LLVMCC1PLUS@ LLVMGCC_VERSION := @LLVMGCC_VERSION@ -LLVMGCC_MAJVERS := @LLVMGCC_MAJVERS@ LLVMGCC_LANGS := @LLVMGCC_LANGS@ # Path to directory where object files should be stored during a build. Modified: llvm/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=96907&r1=96906&r2=96907&view=diff ============================================================================== --- llvm/trunk/Makefile.rules (original) +++ llvm/trunk/Makefile.rules Tue Feb 23 01:56:22 2010 @@ -532,13 +532,8 @@ ifndef LUPGRADE LUPGRADE := $(LLVMToolDir)/llvm-upgrade$(EXEEXT) endif -ifeq ($(LLVMGCC_MAJVERS),3) -LLVMGCCWITHPATH := PATH="$(LLVMToolDir):$(PATH)" $(LLVMGCC) -LLVMGXXWITHPATH := PATH="$(LLVMToolDir):$(PATH)" $(LLVMGXX) -else LLVMGCCWITHPATH := $(LLVMGCC) LLVMGXXWITHPATH := $(LLVMGXX) -endif #-------------------------------------------------------------------- # Adjust to user's request Modified: llvm/trunk/autoconf/configure.ac URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=96907&r1=96906&r2=96907&view=diff ============================================================================== --- llvm/trunk/autoconf/configure.ac (original) +++ llvm/trunk/autoconf/configure.ac Tue Feb 23 01:56:22 2010 @@ -1255,7 +1255,6 @@ llvmgccversion=[`"$LLVMGCC" -dumpversion 2>&1 | sed 's/^\([0-9.]*\).*/\1/'`] llvmgccmajvers=[`echo $llvmgccversion | sed 's/^\([0-9]\).*/\1/'`] AC_SUBST(LLVMGCC_VERSION,$llvmgccversion) - AC_SUBST(LLVMGCC_MAJVERS,$llvmgccmajvers) llvmgcclangs=[`"$LLVMGCC" -v --help 2>&1 | grep '^Configured with:' | sed 's/^.*--enable-languages=\([^ ]*\).*/\1/'`] AC_SUBST(LLVMGCC_LANGS,$llvmgcclangs) AC_MSG_RESULT([ok]) Modified: llvm/trunk/configure URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=96907&r1=96906&r2=96907&view=diff ============================================================================== --- llvm/trunk/configure (original) +++ llvm/trunk/configure Tue Feb 23 01:56:22 2010 @@ -766,7 +766,6 @@ LLVMGCCDIR LLVMGCCLIBEXEC LLVMGCC_VERSION -LLVMGCC_MAJVERS LLVMGCC_LANGS SHLIBEXT LLVM_PREFIX @@ -11035,7 +11034,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&1 | grep '^Configured with:' | sed 's/^.*--enable-languages=\([^ ]*\).*/\1/'` LLVMGCC_LANGS=$llvmgcclangs @@ -20770,7 +20767,6 @@ LLVMGCCDIR!$LLVMGCCDIR$ac_delim LLVMGCCLIBEXEC!$LLVMGCCLIBEXEC$ac_delim LLVMGCC_VERSION!$LLVMGCC_VERSION$ac_delim -LLVMGCC_MAJVERS!$LLVMGCC_MAJVERS$ac_delim LLVMGCC_LANGS!$LLVMGCC_LANGS$ac_delim SHLIBEXT!$SHLIBEXT$ac_delim LLVM_PREFIX!$LLVM_PREFIX$ac_delim @@ -20793,7 +20789,7 @@ LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 88; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 87; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 Modified: llvm/trunk/tools/llvm-config/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-config/CMakeLists.txt?rev=96907&r1=96906&r2=96907&view=diff ============================================================================== --- llvm/trunk/tools/llvm-config/CMakeLists.txt (original) +++ llvm/trunk/tools/llvm-config/CMakeLists.txt Tue Feb 23 01:56:22 2010 @@ -19,7 +19,6 @@ #set(LLVMGCC "") #set(LLVMGXX "") #set(LLVMGCC_VERSION "") -#set(LLVMGCC_MAJVERS "") test_big_endian(IS_BIG_ENDIAN) if( IS_BIG_ENDIAN ) set(ENDIAN "big") From daniel at zuster.org Tue Feb 23 01:56:28 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 07:56:28 -0000 Subject: [llvm-commits] [llvm] r96908 - in /llvm/trunk: docs/TestingGuide.html test/FrontendC/2007-09-17-WeakRef.c test/Makefile test/lib/llvm.exp test/site.exp.in utils/lit/lit/ExampleTests/LLVM.InTree/test/site.exp utils/lit/lit/ExampleTests/LLVM.OutOfTree/obj/test/site.exp Message-ID: <20100223075628.944A22A6C12C@llvm.org> Author: ddunbar Date: Tue Feb 23 01:56:28 2010 New Revision: 96908 URL: http://llvm.org/viewvc/llvm-project?rev=96908&view=rev Log: Eliminate llvmgcc_version testing variable. Modified: llvm/trunk/docs/TestingGuide.html llvm/trunk/test/FrontendC/2007-09-17-WeakRef.c llvm/trunk/test/Makefile llvm/trunk/test/lib/llvm.exp llvm/trunk/test/site.exp.in llvm/trunk/utils/lit/lit/ExampleTests/LLVM.InTree/test/site.exp llvm/trunk/utils/lit/lit/ExampleTests/LLVM.OutOfTree/obj/test/site.exp Modified: llvm/trunk/docs/TestingGuide.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/TestingGuide.html?rev=96908&r1=96907&r2=96908&view=diff ============================================================================== --- llvm/trunk/docs/TestingGuide.html (original) +++ llvm/trunk/docs/TestingGuide.html Tue Feb 23 01:56:28 2010 @@ -761,9 +761,6 @@
    The full path to the llvm-gxx executable as specified in the configured LLVM environment
    -
    llvmgcc_version (%llvmgcc_version)
    -
    The full version number of the llvm-gcc executable.
    -
    gccpath
    The full path to the C compiler used to build LLVM. Note that this might not be gcc.
    @@ -821,22 +818,20 @@

    Sometimes it is necessary to mark a test case as "expected fail" or XFAIL. - You can easily mark a test as XFAIL just by including XFAIL: on a + You can easily mark a test as XFAIL just by including XFAIL: on a line near the top of the file. This signals that the test case should succeed if the test fails. Such test cases are counted separately by DejaGnu. To specify an expected fail, use the XFAIL keyword in the comments of the test program followed by a colon and one or more regular expressions (separated by - a comma). The regular expressions allow you to XFAIL the test conditionally - by host platform. The regular expressions following the : are matched against - the target triplet or llvmgcc version number for the host machine. If there is - a match, the test is expected to fail. If not, the test is expected to - succeed. To XFAIL everywhere just specify XFAIL: *. When matching - the llvm-gcc version, you can specify the major (e.g. 3) or full version - (i.e. 3.4) number. Here is an example of an XFAIL line:

    + a comma). The regular expressions allow you to XFAIL the test conditionally by + host platform. The regular expressions following the : are matched against the + target triplet for the host machine. If there is a match, the test is expected + to fail. If not, the test is expected to succeed. To XFAIL everywhere just + specify XFAIL: *. Here is an example of an XFAIL line:

    -; XFAIL: darwin,sun,llvmgcc4
    +; XFAIL: darwin,sun
     
    Modified: llvm/trunk/test/FrontendC/2007-09-17-WeakRef.c URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendC/2007-09-17-WeakRef.c?rev=96908&r1=96907&r2=96908&view=diff ============================================================================== --- llvm/trunk/test/FrontendC/2007-09-17-WeakRef.c (original) +++ llvm/trunk/test/FrontendC/2007-09-17-WeakRef.c Tue Feb 23 01:56:28 2010 @@ -1,6 +1,6 @@ // RUN: %llvmgcc -O1 -S %s -o - | grep icmp // PR1678 -// XFAIL: llvmgcc4.0.1 + extern void B (void); static __typeof(B) A __attribute__ ((__weakref__("B"))); int active (void) Modified: llvm/trunk/test/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Makefile?rev=96908&r1=96907&r2=96908&view=diff ============================================================================== --- llvm/trunk/test/Makefile (original) +++ llvm/trunk/test/Makefile Tue Feb 23 01:56:28 2010 @@ -155,7 +155,6 @@ @echo 'set target_triplet "$(TARGET_TRIPLE)"' >> site.tmp @echo 'set TARGETS_TO_BUILD "$(TARGETS_TO_BUILD)"' >> site.tmp @echo 'set llvmgcc_langs "$(LLVMGCC_LANGS)"' >> site.tmp - @echo 'set llvmgcc_version "$(LLVMGCC_VERSION)"' >> site.tmp @echo 'set llvmtoolsdir "$(ToolDir)"' >>site.tmp @echo 'set llvmlibsdir "$(LibDir)"' >>site.tmp @echo 'set llvm_bindings "$(BINDINGS_TO_BUILD)"' >> site.tmp Modified: llvm/trunk/test/lib/llvm.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lib/llvm.exp?rev=96908&r1=96907&r2=96908&view=diff ============================================================================== --- llvm/trunk/test/lib/llvm.exp (original) +++ llvm/trunk/test/lib/llvm.exp Tue Feb 23 01:56:28 2010 @@ -47,7 +47,7 @@ # cases. proc substitute { line test tmpFile } { global srcroot objroot srcdir objdir subdir target_triplet - global llvmgcc llvmgxx llvmgcc_version ocamlopt + global llvmgcc llvmgxx ocamlopt global gccpath gxxpath compile_c compile_cxx link shlibext llvmlibsdir global llvmdsymutil valgrind grep gas bugpoint_topts set path [file join $srcdir $subdir] @@ -119,7 +119,7 @@ # This procedure runs the set of tests for the test_source_files array. proc RunLLVMTests { test_source_files } { - global srcroot objroot srcdir objdir subdir target_triplet llvmgcc_version + global srcroot objroot srcdir objdir subdir target_triplet set timeout 60 set path [file join $objdir $subdir] @@ -194,12 +194,6 @@ if {$targetPASS != 1} { set outcome XFAIL } - } elseif { [regexp {llvmgcc(([0-9]+)|([0-9]+[.][0-9]+))} $target match submatch submatch2] } { - if { [regexp ^($submatch)$|^(($submatch)(\.)) $llvmgcc_version match] } { - if {$targetPASS != 1} { - set outcome XFAIL - } - } } } } elseif {[regexp {XTARGET:[ *](.+)} $line match targets]} { @@ -213,11 +207,6 @@ } elseif { [regexp $target $target_triplet match] } { set targetPASS 1 set outcome PASS - } elseif { [regexp {llvmgcc(([0-9]+)|([0-9]+[.][0-9]+))} $target match submatch submatch2] } { - if { [regexp ^($submatch)$|^(($submatch)(\.)) $llvmgcc_version match] } { - set targetPASS 1 - set outcome PASS - } } } } Modified: llvm/trunk/test/site.exp.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/site.exp.in?rev=96908&r1=96907&r2=96908&view=diff ============================================================================== --- llvm/trunk/test/site.exp.in (original) +++ llvm/trunk/test/site.exp.in Tue Feb 23 01:56:28 2010 @@ -3,7 +3,6 @@ set target_triplet "@TARGET_TRIPLE@" set TARGETS_TO_BUILD "@TARGETS_TO_BUILD@" set llvmgcc_langs "@LLVMGCC_LANGS@" -set llvmgcc_version "@LLVMGCC_VERSION@" set llvmtoolsdir "@LLVM_TOOLS_DIR@" set llvmlibsdir "@LLVM_LIBS_DIR@" set llvm_bindings "@LLVM_BINDINGS@" Modified: llvm/trunk/utils/lit/lit/ExampleTests/LLVM.InTree/test/site.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/ExampleTests/LLVM.InTree/test/site.exp?rev=96908&r1=96907&r2=96908&view=diff ============================================================================== --- llvm/trunk/utils/lit/lit/ExampleTests/LLVM.InTree/test/site.exp (original) +++ llvm/trunk/utils/lit/lit/ExampleTests/LLVM.InTree/test/site.exp Tue Feb 23 01:56:28 2010 @@ -4,7 +4,6 @@ set target_triplet "x86_64-apple-darwin10" set TARGETS_TO_BUILD "X86 Sparc PowerPC Alpha ARM Mips CellSPU PIC16 XCore MSP430 SystemZ Blackfin CBackend MSIL CppBackend" set llvmgcc_langs "c,c++,objc,obj-c++" -set llvmgcc_version "4.2.1" set prcontext "/usr/bin/tclsh8.4 /Volumes/Data/ddunbar/llvm/test/Scripts/prcontext.tcl" set llvmtoolsdir "/Users/ddunbar/llvm.obj.64/Debug/bin" set llvmlibsdir "/Users/ddunbar/llvm.obj.64/Debug/lib" Modified: llvm/trunk/utils/lit/lit/ExampleTests/LLVM.OutOfTree/obj/test/site.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/ExampleTests/LLVM.OutOfTree/obj/test/site.exp?rev=96908&r1=96907&r2=96908&view=diff ============================================================================== --- llvm/trunk/utils/lit/lit/ExampleTests/LLVM.OutOfTree/obj/test/site.exp (original) +++ llvm/trunk/utils/lit/lit/ExampleTests/LLVM.OutOfTree/obj/test/site.exp Tue Feb 23 01:56:28 2010 @@ -4,7 +4,6 @@ set target_triplet "x86_64-apple-darwin10" set TARGETS_TO_BUILD "X86 Sparc PowerPC Alpha ARM Mips CellSPU PIC16 XCore MSP430 SystemZ Blackfin CBackend MSIL CppBackend" set llvmgcc_langs "c,c++,objc,obj-c++" -set llvmgcc_version "4.2.1" set prcontext "/usr/bin/tclsh8.4 /Volumes/Data/ddunbar/llvm/test/Scripts/prcontext.tcl" set llvmtoolsdir "/Users/ddunbar/llvm.obj.64/Debug/bin" set llvmlibsdir "/Users/ddunbar/llvm.obj.64/Debug/lib" From daniel at zuster.org Tue Feb 23 01:56:31 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 07:56:31 -0000 Subject: [llvm-commits] [llvm] r96909 - in /llvm/trunk: Makefile.config.in autoconf/configure.ac configure tools/llvm-config/CMakeLists.txt Message-ID: <20100223075631.D39142A6C12D@llvm.org> Author: ddunbar Date: Tue Feb 23 01:56:31 2010 New Revision: 96909 URL: http://llvm.org/viewvc/llvm-project?rev=96909&view=rev Log: Kill off LLVMGCCARCH and LLVMGCC_VERSION make variables. Modified: llvm/trunk/Makefile.config.in llvm/trunk/autoconf/configure.ac llvm/trunk/configure llvm/trunk/tools/llvm-config/CMakeLists.txt Modified: llvm/trunk/Makefile.config.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.config.in?rev=96909&r1=96908&r2=96909&view=diff ============================================================================== --- llvm/trunk/Makefile.config.in (original) +++ llvm/trunk/Makefile.config.in Tue Feb 23 01:56:31 2010 @@ -183,9 +183,6 @@ # want to override the value set by configure. LLVMGCCDIR := @LLVMGCCDIR@ -# Determine the target for which LLVM should generate code. -LLVMGCCARCH := @target@/@LLVMGCC_VERSION@ - # Determine the path where the library executables are LLVMGCCLIBEXEC := @LLVMGCCLIBEXEC@ @@ -194,7 +191,6 @@ LLVMGXX := @LLVMGXX@ LLVMCC1 := @LLVMCC1@ LLVMCC1PLUS := @LLVMCC1PLUS@ -LLVMGCC_VERSION := @LLVMGCC_VERSION@ LLVMGCC_LANGS := @LLVMGCC_LANGS@ # Path to directory where object files should be stored during a build. Modified: llvm/trunk/autoconf/configure.ac URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=96909&r1=96908&r2=96909&view=diff ============================================================================== --- llvm/trunk/autoconf/configure.ac (original) +++ llvm/trunk/autoconf/configure.ac Tue Feb 23 01:56:31 2010 @@ -1252,9 +1252,6 @@ AC_SUBST(LLVMGCCDIR,$llvmgccdir) llvmgcclibexec=`echo "$llvmcc1path" | sed 's,/cc1,,'` AC_SUBST(LLVMGCCLIBEXEC,$llvmgcclibexec) - llvmgccversion=[`"$LLVMGCC" -dumpversion 2>&1 | sed 's/^\([0-9.]*\).*/\1/'`] - llvmgccmajvers=[`echo $llvmgccversion | sed 's/^\([0-9]\).*/\1/'`] - AC_SUBST(LLVMGCC_VERSION,$llvmgccversion) llvmgcclangs=[`"$LLVMGCC" -v --help 2>&1 | grep '^Configured with:' | sed 's/^.*--enable-languages=\([^ ]*\).*/\1/'`] AC_SUBST(LLVMGCC_LANGS,$llvmgcclangs) AC_MSG_RESULT([ok]) Modified: llvm/trunk/configure URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=96909&r1=96908&r2=96909&view=diff ============================================================================== --- llvm/trunk/configure (original) +++ llvm/trunk/configure Tue Feb 23 01:56:31 2010 @@ -765,7 +765,6 @@ LLVMCC1PLUS LLVMGCCDIR LLVMGCCLIBEXEC -LLVMGCC_VERSION LLVMGCC_LANGS SHLIBEXT LLVM_PREFIX @@ -11034,7 +11033,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&1 | sed 's/^\([0-9.]*\).*/\1/'` - llvmgccmajvers=`echo $llvmgccversion | sed 's/^\([0-9]\).*/\1/'` - LLVMGCC_VERSION=$llvmgccversion - llvmgcclangs=`"$LLVMGCC" -v --help 2>&1 | grep '^Configured with:' | sed 's/^.*--enable-languages=\([^ ]*\).*/\1/'` LLVMGCC_LANGS=$llvmgcclangs @@ -20766,7 +20761,6 @@ LLVMCC1PLUS!$LLVMCC1PLUS$ac_delim LLVMGCCDIR!$LLVMGCCDIR$ac_delim LLVMGCCLIBEXEC!$LLVMGCCLIBEXEC$ac_delim -LLVMGCC_VERSION!$LLVMGCC_VERSION$ac_delim LLVMGCC_LANGS!$LLVMGCC_LANGS$ac_delim SHLIBEXT!$SHLIBEXT$ac_delim LLVM_PREFIX!$LLVM_PREFIX$ac_delim @@ -20789,7 +20783,7 @@ LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 87; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 86; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 Modified: llvm/trunk/tools/llvm-config/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-config/CMakeLists.txt?rev=96909&r1=96908&r2=96909&view=diff ============================================================================== --- llvm/trunk/tools/llvm-config/CMakeLists.txt (original) +++ llvm/trunk/tools/llvm-config/CMakeLists.txt Tue Feb 23 01:56:31 2010 @@ -18,7 +18,6 @@ #set(LLVMGCCDIR "") #set(LLVMGCC "") #set(LLVMGXX "") -#set(LLVMGCC_VERSION "") test_big_endian(IS_BIG_ENDIAN) if( IS_BIG_ENDIAN ) set(ENDIAN "big") From daniel at zuster.org Tue Feb 23 01:56:34 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 07:56:34 -0000 Subject: [llvm-commits] [llvm] r96910 - in /llvm/trunk: Makefile.config.in autoconf/configure.ac configure Message-ID: <20100223075634.A53BD2A6C12E@llvm.org> Author: ddunbar Date: Tue Feb 23 01:56:34 2010 New Revision: 96910 URL: http://llvm.org/viewvc/llvm-project?rev=96910&view=rev Log: Kill off unused LLVMGCCLIBEXEC make variable. Modified: llvm/trunk/Makefile.config.in llvm/trunk/autoconf/configure.ac llvm/trunk/configure Modified: llvm/trunk/Makefile.config.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.config.in?rev=96910&r1=96909&r2=96910&view=diff ============================================================================== --- llvm/trunk/Makefile.config.in (original) +++ llvm/trunk/Makefile.config.in Tue Feb 23 01:56:34 2010 @@ -183,9 +183,6 @@ # want to override the value set by configure. LLVMGCCDIR := @LLVMGCCDIR@ -# Determine the path where the library executables are -LLVMGCCLIBEXEC := @LLVMGCCLIBEXEC@ - # Full pathnames of LLVM C/C++ front-end 'cc1' and 'cc1plus' binaries: LLVMGCC := @LLVMGCC@ LLVMGXX := @LLVMGXX@ Modified: llvm/trunk/autoconf/configure.ac URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=96910&r1=96909&r2=96910&view=diff ============================================================================== --- llvm/trunk/autoconf/configure.ac (original) +++ llvm/trunk/autoconf/configure.ac Tue Feb 23 01:56:34 2010 @@ -1250,8 +1250,6 @@ AC_SUBST(LLVMCC1PLUS,$llvmcc1pluspath) llvmgccdir=`echo "$llvmcc1path" | sed 's,/libexec/.*,,'` AC_SUBST(LLVMGCCDIR,$llvmgccdir) - llvmgcclibexec=`echo "$llvmcc1path" | sed 's,/cc1,,'` - AC_SUBST(LLVMGCCLIBEXEC,$llvmgcclibexec) llvmgcclangs=[`"$LLVMGCC" -v --help 2>&1 | grep '^Configured with:' | sed 's/^.*--enable-languages=\([^ ]*\).*/\1/'`] AC_SUBST(LLVMGCC_LANGS,$llvmgcclangs) AC_MSG_RESULT([ok]) Modified: llvm/trunk/configure URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=96910&r1=96909&r2=96910&view=diff ============================================================================== --- llvm/trunk/configure (original) +++ llvm/trunk/configure Tue Feb 23 01:56:34 2010 @@ -764,7 +764,6 @@ LLVMCC1 LLVMCC1PLUS LLVMGCCDIR -LLVMGCCLIBEXEC LLVMGCC_LANGS SHLIBEXT LLVM_PREFIX @@ -11033,7 +11032,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&1 | grep '^Configured with:' | sed 's/^.*--enable-languages=\([^ ]*\).*/\1/'` LLVMGCC_LANGS=$llvmgcclangs @@ -20760,7 +20756,6 @@ LLVMCC1!$LLVMCC1$ac_delim LLVMCC1PLUS!$LLVMCC1PLUS$ac_delim LLVMGCCDIR!$LLVMGCCDIR$ac_delim -LLVMGCCLIBEXEC!$LLVMGCCLIBEXEC$ac_delim LLVMGCC_LANGS!$LLVMGCC_LANGS$ac_delim SHLIBEXT!$SHLIBEXT$ac_delim LLVM_PREFIX!$LLVM_PREFIX$ac_delim @@ -20783,7 +20778,7 @@ LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 86; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 85; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 From daniel at zuster.org Tue Feb 23 01:56:36 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 07:56:36 -0000 Subject: [llvm-commits] [llvm] r96911 - /llvm/trunk/Makefile.rules Message-ID: <20100223075636.9910B2A6C12C@llvm.org> Author: ddunbar Date: Tue Feb 23 01:56:36 2010 New Revision: 96911 URL: http://llvm.org/viewvc/llvm-project?rev=96911&view=rev Log: Remove dead LUPGRADE make variable. Modified: llvm/trunk/Makefile.rules Modified: llvm/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=96911&r1=96910&r2=96911&view=diff ============================================================================== --- llvm/trunk/Makefile.rules (original) +++ llvm/trunk/Makefile.rules Tue Feb 23 01:56:36 2010 @@ -529,9 +529,6 @@ ifndef LBUGPOINT LBUGPOINT := $(LLVMToolDir)/bugpoint$(EXEEXT) endif -ifndef LUPGRADE -LUPGRADE := $(LLVMToolDir)/llvm-upgrade$(EXEEXT) -endif LLVMGCCWITHPATH := $(LLVMGCC) LLVMGXXWITHPATH := $(LLVMGXX) From daniel at zuster.org Tue Feb 23 01:56:41 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 07:56:41 -0000 Subject: [llvm-commits] [llvm] r96913 - in /llvm/trunk: Makefile.rules test/Makefile.tests Message-ID: <20100223075641.778612A6C12E@llvm.org> Author: ddunbar Date: Tue Feb 23 01:56:41 2010 New Revision: 96913 URL: http://llvm.org/viewvc/llvm-project?rev=96913&view=rev Log: Inline and eliminate LLVMG{CC,XX}WITHPATH. Modified: llvm/trunk/Makefile.rules llvm/trunk/test/Makefile.tests Modified: llvm/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=96913&r1=96912&r2=96913&view=diff ============================================================================== --- llvm/trunk/Makefile.rules (original) +++ llvm/trunk/Makefile.rules Tue Feb 23 01:56:41 2010 @@ -529,8 +529,6 @@ ifndef LBUGPOINT LBUGPOINT := $(LLVMToolDir)/bugpoint$(EXEEXT) endif -LLVMGCCWITHPATH := $(LLVMGCC) -LLVMGXXWITHPATH := $(LLVMGXX) #-------------------------------------------------------------------- # Adjust to user's request @@ -702,14 +700,12 @@ $(TargetCommonOpts) $(CompileCommonOpts) $(LD.Flags) $(Strip) endif -BCCompile.C = $(LLVMGCCWITHPATH) $(CPP.Flags) $(C.Flags) $(CFLAGS) \ - $(CPPFLAGS) \ +BCCompile.C = $(LLVMGCC) $(CPP.Flags) $(C.Flags) $(CFLAGS) $(CPPFLAGS) \ $(TargetCommonOpts) $(CompileCommonOpts) Preprocess.C = $(CC) $(CPP.Flags) $(C.Flags) $(CPPFLAGS) \ $(TargetCommonOpts) $(CompileCommonOpts) -E -BCCompile.CXX = $(LLVMGXXWITHPATH) $(CPP.Flags) $(CXX.Flags) $(CXXFLAGS) \ - $(CPPFLAGS) \ +BCCompile.CXX = $(LLVMGXX) $(CPP.Flags) $(CXX.Flags) $(CXXFLAGS) $(CPPFLAGS) \ $(TargetCommonOpts) $(CompileCommonOpts) ProgInstall = $(INSTALL) $(Install.StripFlag) -m 0755 Modified: llvm/trunk/test/Makefile.tests URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Makefile.tests?rev=96913&r1=96912&r2=96913&view=diff ============================================================================== --- llvm/trunk/test/Makefile.tests (original) +++ llvm/trunk/test/Makefile.tests Tue Feb 23 01:56:41 2010 @@ -49,15 +49,15 @@ # Compile from X.c to Output/X.ll Output/%.ll: %.c $(LCC1) Output/.dir $(INCLUDES) - -$(LLVMGCCWITHPATH) $(CPPFLAGS) $(LCCFLAGS) -S $< -o $@ + -$(LLVMGCC) $(CPPFLAGS) $(LCCFLAGS) -S $< -o $@ # Compile from X.cpp to Output/X.ll Output/%.ll: %.cpp $(LCC1XX) Output/.dir $(INCLUDES) - -$(LLVMGXXWITHPATH) $(CPPFLAGS) $(LCXXFLAGS) -S $< -o $@ + -$(LLVMGXX) $(CPPFLAGS) $(LCXXFLAGS) -S $< -o $@ # Compile from X.cc to Output/X.ll Output/%.ll: %.cc $(LCC1XX) Output/.dir $(INCLUDES) - -$(LLVMGXXWITHPATH) $(CPPFLAGS) $(LCXXFLAGS) -S $< -o $@ + -$(LLVMGXX) $(CPPFLAGS) $(LCXXFLAGS) -S $< -o $@ # LLVM Assemble from Output/X.ll to Output/X.bc. Output/X.ll must have come # from GCC output, so use GCCAS. From daniel at zuster.org Tue Feb 23 01:56:39 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 07:56:39 -0000 Subject: [llvm-commits] [llvm] r96912 - in /llvm/trunk/Xcode: LLVM.xcodeproj/project.pbxproj README.txt Message-ID: <20100223075639.30D332A6C12D@llvm.org> Author: ddunbar Date: Tue Feb 23 01:56:38 2010 New Revision: 96912 URL: http://llvm.org/viewvc/llvm-project?rev=96912&view=rev Log: Remove ancient Xcode project, replaced by CMake project. Removed: llvm/trunk/Xcode/LLVM.xcodeproj/project.pbxproj llvm/trunk/Xcode/README.txt Removed: llvm/trunk/Xcode/LLVM.xcodeproj/project.pbxproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Xcode/LLVM.xcodeproj/project.pbxproj?rev=96911&view=auto ============================================================================== --- llvm/trunk/Xcode/LLVM.xcodeproj/project.pbxproj (original) +++ llvm/trunk/Xcode/LLVM.xcodeproj/project.pbxproj (removed) @@ -1,3303 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 42; - objects = { - -/* Begin PBXAggregateTarget section */ - CF0329BC08D1BE8E0030FD33 /* LLVM full llc */ = { - isa = PBXAggregateTarget; - buildConfigurationList = CF0329C708D1BEC40030FD33 /* Build configuration list for PBXAggregateTarget "LLVM full llc" */; - buildPhases = ( - ); - dependencies = ( - CF0329BE08D1BE970030FD33 /* PBXTargetDependency */, - CF0329C008D1BE9B0030FD33 /* PBXTargetDependency */, - ); - name = "LLVM full llc"; - productName = "LLVM full llc"; - }; - CFDF86D00ADE820000D40A3D /* LLVM full llc release */ = { - isa = PBXAggregateTarget; - buildConfigurationList = CFDF86D50ADE820000D40A3D /* Build configuration list for PBXAggregateTarget "LLVM full llc release" */; - buildPhases = ( - ); - dependencies = ( - CFDF86DA0ADE822100D40A3D /* PBXTargetDependency */, - CFDF86DC0ADE822100D40A3D /* PBXTargetDependency */, - ); - name = "LLVM full llc release"; - productName = "LLVM full llc"; - }; -/* End PBXAggregateTarget section */ - -/* Begin PBXContainerItemProxy section */ - CF0329BD08D1BE970030FD33 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; - proxyType = 1; - remoteGlobalIDString = CF0329B608D1BE110030FD33; - remoteInfo = "LLVM lib"; - }; - CF0329BF08D1BE9B0030FD33 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; - proxyType = 1; - remoteGlobalIDString = CF0329BB08D1BE5D0030FD33; - remoteInfo = "LLVM llc"; - }; - CFDF86D90ADE822100D40A3D /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; - proxyType = 1; - remoteGlobalIDString = CFDF86BD0ADE819D00D40A3D; - remoteInfo = "LLVM lib release"; - }; - CFDF86DB0ADE822100D40A3D /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; - proxyType = 1; - remoteGlobalIDString = CFDF86C60ADE81D000D40A3D; - remoteInfo = "LLVM llc release"; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 354CF6D10CD299440059AF3E /* DeserializeAPInt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeserializeAPInt.cpp; sourceTree = ""; }; - 354CF6D20CD2994D0059AF3E /* SerializeAPInt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SerializeAPInt.cpp; sourceTree = ""; }; - 35A9CDED0CD0F6AF008ABC1D /* Deserialize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Deserialize.h; sourceTree = ""; }; - 35A9CDEE0CD0F6AF008ABC1D /* Serialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Serialization.h; sourceTree = ""; }; - 35A9CDEF0CD0F6AF008ABC1D /* Serialize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Serialize.h; sourceTree = ""; }; - 35A9CDF00CD0F6D5008ABC1D /* Deserialize.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Deserialize.cpp; sourceTree = ""; }; - 35A9CDF10CD0F6E1008ABC1D /* Serialize.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Serialize.cpp; sourceTree = ""; }; - 35E98A830CBC2ED300C5CDC1 /* DenseSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DenseSet.h; sourceTree = ""; }; - 35E98A840CBC2ED300C5CDC1 /* ImmutableMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImmutableMap.h; sourceTree = ""; }; - 35E98A850CBC2ED300C5CDC1 /* ImmutableSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImmutableSet.h; sourceTree = ""; }; - 754221420D171DFC00DDB61B /* MachineLICM.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MachineLICM.cpp; sourceTree = ""; }; - 84115FFE0B66D87400E1293E /* TargetMachOWriterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TargetMachOWriterInfo.cpp; sourceTree = ""; }; - 84115FFF0B66D89B00E1293E /* PPCMachOWriterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PPCMachOWriterInfo.cpp; sourceTree = ""; }; - 841160000B66D8AC00E1293E /* PPCMachOWriterInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PPCMachOWriterInfo.h; sourceTree = ""; }; - 8443EF210B66B62D00959964 /* TargetMachOWriterInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetMachOWriterInfo.h; sourceTree = ""; }; - 9F4B0E5E0D0E02580061F270 /* bitreader_ocaml.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bitreader_ocaml.c; sourceTree = ""; }; - 9F4B0E5F0D0E02580061F270 /* llvm_bitreader.ml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = llvm_bitreader.ml; sourceTree = ""; }; - 9F4B0E600D0E02580061F270 /* llvm_bitreader.mli */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = llvm_bitreader.mli; sourceTree = ""; }; - 9F4B0E8C0D0E05ED0061F270 /* BitReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BitReader.cpp; sourceTree = ""; }; - 9F4B0E8D0D0E05ED0061F270 /* DeserializeAPFloat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeserializeAPFloat.cpp; sourceTree = ""; }; - 9F502ADB0D1D8CA3007939DF /* executionengine_ocaml.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = executionengine_ocaml.c; sourceTree = ""; }; - 9F502ADC0D1D8CA3007939DF /* llvm_executionengine.ml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = llvm_executionengine.ml; sourceTree = ""; }; - 9F502ADD0D1D8CA3007939DF /* llvm_executionengine.mli */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = llvm_executionengine.mli; sourceTree = ""; }; - 9F502AEC0D1D8CF8007939DF /* executionengine.ml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = executionengine.ml; sourceTree = ""; }; - 9F502B090D1D8D8D007939DF /* ExecutionEngineBindings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExecutionEngineBindings.cpp; sourceTree = ""; }; - 9F5B90CB0D0CE87100CDFDEA /* StringPool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StringPool.cpp; sourceTree = ""; }; - 9F5B90CE0D0CE89300CDFDEA /* AlignOf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlignOf.h; sourceTree = ""; }; - 9F5B90CF0D0CE89300CDFDEA /* Registry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Registry.h; sourceTree = ""; }; - 9F5B90D00D0CE89300CDFDEA /* StringPool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringPool.h; sourceTree = ""; }; - 9F5B90E70D0DF19100CDFDEA /* BitReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BitReader.h; sourceTree = ""; }; - 9F68EB010C77AD02004AA152 /* LoopPass.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LoopPass.cpp; sourceTree = ""; }; - 9F68EB020C77AD02004AA152 /* MemoryDependenceAnalysis.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryDependenceAnalysis.cpp; sourceTree = ""; }; - 9F68EB060C77AD2C004AA152 /* BitcodeReader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BitcodeReader.cpp; sourceTree = ""; }; - 9F68EB070C77AD2C004AA152 /* BitcodeReader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = BitcodeReader.h; sourceTree = ""; }; - 9F68EB120C77AD2C004AA152 /* BitcodeWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BitcodeWriter.cpp; sourceTree = ""; }; - 9F68EB130C77AD2C004AA152 /* BitcodeWriterPass.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BitcodeWriterPass.cpp; sourceTree = ""; }; - 9F68EB250C77AD2C004AA152 /* ValueEnumerator.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ValueEnumerator.cpp; sourceTree = ""; }; - 9F68EB260C77AD2C004AA152 /* ValueEnumerator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ValueEnumerator.h; sourceTree = ""; }; - 9F6B2CC00D0F6E56000F00FD /* bitreader.ml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = bitreader.ml; sourceTree = ""; }; - 9F70401A0D8D732400FD06FF /* llvm_scalar_opts.ml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = llvm_scalar_opts.ml; path = transforms/scalar/llvm_scalar_opts.ml; sourceTree = ""; }; - 9F70401B0D8D732400FD06FF /* llvm_scalar_opts.mli */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = llvm_scalar_opts.mli; path = transforms/scalar/llvm_scalar_opts.mli; sourceTree = ""; }; - 9F70401E0D8D735E00FD06FF /* scalar_opts_ocaml.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = scalar_opts_ocaml.c; path = transforms/scalar/scalar_opts_ocaml.c; sourceTree = ""; }; - 9F7793460C73BC2000551F9C /* CodeGenPrepare.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CodeGenPrepare.cpp; sourceTree = ""; }; - 9F7793470C73BC2000551F9C /* GVN.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GVN.cpp; sourceTree = ""; }; - 9F7793480C73BC2000551F9C /* GVNPRE.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GVNPRE.cpp; sourceTree = ""; }; - 9F7793490C73BC2000551F9C /* LoopIndexSplit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LoopIndexSplit.cpp; sourceTree = ""; }; - 9F77934A0C73BC2000551F9C /* LoopRotation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LoopRotation.cpp; sourceTree = ""; }; - 9F7793500C73BD1500551F9C /* ELFWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ELFWriter.h; sourceTree = ""; }; - 9F7793510C73BD1500551F9C /* IfConversion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IfConversion.cpp; sourceTree = ""; }; - 9F7793520C73BD1500551F9C /* LowerSubregs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LowerSubregs.cpp; sourceTree = ""; }; - 9F7793530C73BD1500551F9C /* MachOWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MachOWriter.h; sourceTree = ""; }; - 9F7793540C73BD1500551F9C /* PostRASchedulerList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PostRASchedulerList.cpp; sourceTree = ""; }; - 9F7793550C73BD1500551F9C /* RegAllocBigBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegAllocBigBlock.cpp; sourceTree = ""; }; - 9F7793560C73BD1500551F9C /* RegisterScavenging.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterScavenging.cpp; sourceTree = ""; }; - 9F7793570C73BD1500551F9C /* SimpleRegisterCoalescing.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SimpleRegisterCoalescing.cpp; sourceTree = ""; }; - 9F7793770C73C48A00551F9C /* StripDeadPrototypes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StripDeadPrototypes.cpp; sourceTree = ""; }; - 9F7793780C73C49A00551F9C /* BasicInliner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BasicInliner.cpp; sourceTree = ""; }; - 9F7793790C73C49A00551F9C /* CloneLoop.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CloneLoop.cpp; sourceTree = ""; }; - 9F77937A0C73C49A00551F9C /* InlineCost.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InlineCost.cpp; sourceTree = ""; }; - 9F77937B0C73C4F400551F9C /* AutoUpgrade.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AutoUpgrade.cpp; path = ../lib/VMCore/AutoUpgrade.cpp; sourceTree = SOURCE_ROOT; }; - 9F77937C0C73C4F400551F9C /* ConstantFold.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ConstantFold.cpp; path = ../lib/VMCore/ConstantFold.cpp; sourceTree = SOURCE_ROOT; }; - 9F77937D0C73C4F400551F9C /* ConstantFold.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ConstantFold.h; path = ../lib/VMCore/ConstantFold.h; sourceTree = SOURCE_ROOT; }; - 9F77937E0C73C53000551F9C /* ParameterAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParameterAttributes.h; sourceTree = ""; }; - 9F7793800C73C54C00551F9C /* Archive.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Archive.h; sourceTree = ""; }; - 9F7793810C73C54C00551F9C /* BitCodes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BitCodes.h; sourceTree = ""; }; - 9F7793820C73C54C00551F9C /* BitstreamReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BitstreamReader.h; sourceTree = ""; }; - 9F7793830C73C54C00551F9C /* BitstreamWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BitstreamWriter.h; sourceTree = ""; }; - 9F7793840C73C54C00551F9C /* LLVMBitCodes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LLVMBitCodes.h; sourceTree = ""; }; - 9F7793850C73C54C00551F9C /* ReaderWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReaderWriter.h; sourceTree = ""; }; - 9F7793860C73C57100551F9C /* CallingConvLower.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallingConvLower.h; sourceTree = ""; }; - 9F7793870C73C57100551F9C /* ELFRelocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ELFRelocation.h; sourceTree = ""; }; - 9F7793880C73C57100551F9C /* FileWriters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileWriters.h; sourceTree = ""; }; - 9F7793890C73C57100551F9C /* MachORelocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MachORelocation.h; sourceTree = ""; }; - 9F77938A0C73C57100551F9C /* RegisterScavenging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterScavenging.h; sourceTree = ""; }; - 9F7794140C73CB6100551F9C /* Mips.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Mips.h; sourceTree = ""; }; - 9F7794150C73CB6100551F9C /* Mips.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Mips.td; sourceTree = ""; }; - 9F7794160C73CB6100551F9C /* MipsAsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MipsAsmPrinter.cpp; sourceTree = ""; }; - 9F7794170C73CB6100551F9C /* MipsCallingConv.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MipsCallingConv.td; sourceTree = ""; }; - 9F7794180C73CB6100551F9C /* MipsInstrFormats.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MipsInstrFormats.td; sourceTree = ""; }; - 9F7794190C73CB6100551F9C /* MipsInstrInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MipsInstrInfo.cpp; sourceTree = ""; }; - 9F77941A0C73CB6100551F9C /* MipsInstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MipsInstrInfo.h; sourceTree = ""; }; - 9F77941B0C73CB6100551F9C /* MipsInstrInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MipsInstrInfo.td; sourceTree = ""; }; - 9F77941C0C73CB6100551F9C /* MipsISelDAGToDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MipsISelDAGToDAG.cpp; sourceTree = ""; }; - 9F77941D0C73CB6100551F9C /* MipsISelLowering.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MipsISelLowering.cpp; sourceTree = ""; }; - 9F77941E0C73CB6100551F9C /* MipsISelLowering.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MipsISelLowering.h; sourceTree = ""; }; - 9F77941F0C73CB6100551F9C /* MipsMachineFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MipsMachineFunction.h; sourceTree = ""; }; - 9F7794200C73CB6100551F9C /* MipsRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MipsRegisterInfo.cpp; sourceTree = ""; }; - 9F7794210C73CB6100551F9C /* MipsRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MipsRegisterInfo.h; sourceTree = ""; }; - 9F7794220C73CB6100551F9C /* MipsRegisterInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MipsRegisterInfo.td; sourceTree = ""; }; - 9F7794230C73CB6100551F9C /* MipsSubtarget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MipsSubtarget.cpp; sourceTree = ""; }; - 9F7794240C73CB6100551F9C /* MipsSubtarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MipsSubtarget.h; sourceTree = ""; }; - 9F7794250C73CB6100551F9C /* MipsTargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MipsTargetAsmInfo.cpp; sourceTree = ""; }; - 9F7794260C73CB6100551F9C /* MipsTargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MipsTargetAsmInfo.h; sourceTree = ""; }; - 9F7794270C73CB6100551F9C /* MipsTargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MipsTargetMachine.cpp; sourceTree = ""; }; - 9F7794280C73CB6100551F9C /* MipsTargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MipsTargetMachine.h; sourceTree = ""; }; - 9F77942F0C73CB7900551F9C /* MSILWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MSILWriter.cpp; sourceTree = ""; }; - 9F7794300C73CB7900551F9C /* MSILWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MSILWriter.h; sourceTree = ""; }; - 9F7794880C73D51000551F9C /* MemoryBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryBuffer.h; sourceTree = ""; }; - 9F7794890C73D51000551F9C /* Streams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Streams.h; sourceTree = ""; }; - 9F7C23E50CB81C2100498408 /* Analysis.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Analysis.h; sourceTree = ""; }; - 9F7C23E60CB81C2B00498408 /* Analysis.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Analysis.cpp; sourceTree = ""; }; - 9F7C240C0CB81ECD00498408 /* analysis_ocaml.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = analysis_ocaml.c; sourceTree = ""; }; - 9F7C240D0CB81ECD00498408 /* llvm_analysis.ml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = llvm_analysis.ml; sourceTree = ""; }; - 9F7C240E0CB81ECD00498408 /* llvm_analysis.mli */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = llvm_analysis.mli; sourceTree = ""; }; - 9F7C2C4F0CB9496C00498408 /* analysis.ml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = analysis.ml; sourceTree = ""; }; - 9F7C2C520CB9496C00498408 /* bitwriter.ml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = bitwriter.ml; sourceTree = ""; }; - 9F7C2C5D0CB9496C00498408 /* vmcore.ml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = vmcore.ml; sourceTree = ""; }; - 9FA638D90C77B184007F12AE /* AutoUpgrade.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AutoUpgrade.h; sourceTree = ""; }; - 9FA638DA0C77B184007F12AE /* GlobalAlias.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GlobalAlias.h; sourceTree = ""; }; - 9FA638DB0C77B1AB007F12AE /* APInt.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = APInt.h; sourceTree = ""; }; - 9FA638DC0C77B1AB007F12AE /* APSInt.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = APSInt.h; sourceTree = ""; }; - 9FA638DD0C77B1AB007F12AE /* BitVector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = BitVector.h; sourceTree = ""; }; - 9FA638E00C77B1AB007F12AE /* IndexedMap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IndexedMap.h; sourceTree = ""; }; - 9FA638E20C77B1AB007F12AE /* SmallPtrSet.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SmallPtrSet.h; sourceTree = ""; }; - 9FA638E30C77B1AB007F12AE /* SmallSet.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SmallSet.h; sourceTree = ""; }; - 9FA638E40C77B1AB007F12AE /* StringMap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = StringMap.h; sourceTree = ""; }; - 9FA638E50C77B203007F12AE /* LoopPass.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = LoopPass.h; sourceTree = ""; }; - 9FA638E60C77B203007F12AE /* MemoryDependenceAnalysis.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MemoryDependenceAnalysis.h; sourceTree = ""; }; - 9FA638E70C77B222007F12AE /* Disassembler.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Disassembler.h; sourceTree = ""; }; - 9FA638E80C77B231007F12AE /* TargetELFWriterInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetELFWriterInfo.h; sourceTree = ""; }; - 9FA638EA0C77B252007F12AE /* InlinerPass.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = InlinerPass.h; sourceTree = ""; }; - 9FA638EB0C77B26B007F12AE /* BasicInliner.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = BasicInliner.h; sourceTree = ""; }; - 9FA638EC0C77B26B007F12AE /* InlineCost.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = InlineCost.h; sourceTree = ""; }; - 9FD3E5710CA0116100E54D15 /* bitwriter_ocaml.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = bitwriter_ocaml.c; sourceTree = ""; }; - 9FD3E5720CA0116100E54D15 /* llvm_bitwriter.ml */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = llvm_bitwriter.ml; sourceTree = ""; }; - 9FD3E5730CA0116100E54D15 /* llvm_bitwriter.mli */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = llvm_bitwriter.mli; sourceTree = ""; }; - 9FD3E57B0CA0116100E54D15 /* llvm.ml */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = llvm.ml; sourceTree = ""; }; - 9FD3E57C0CA0116100E54D15 /* llvm.mli */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = llvm.mli; sourceTree = ""; }; - 9FD3E57D0CA0116100E54D15 /* llvm_ocaml.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = llvm_ocaml.c; sourceTree = ""; }; - 9FD3E58D0CA0125F00E54D15 /* BitWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = BitWriter.h; sourceTree = ""; }; - 9FD3E58E0CA0125F00E54D15 /* Core.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Core.h; sourceTree = ""; }; - 9FD3E5900CA0129D00E54D15 /* Core.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Core.cpp; path = ../lib/VMCore/Core.cpp; sourceTree = SOURCE_ROOT; }; - 9FD3E5920CA012B300E54D15 /* BitWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BitWriter.cpp; sourceTree = ""; }; - 9FE25D900CAB166D005383FC /* APFloat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APFloat.h; sourceTree = ""; }; - 9FE25D910CAB166D005383FC /* SparseBitVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SparseBitVector.h; sourceTree = ""; }; - 9FE25D920CAB169F005383FC /* RegisterCoalescer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterCoalescer.h; sourceTree = ""; }; - 9FE25D940CAB16FB005383FC /* RegisterCoalescer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterCoalescer.cpp; sourceTree = ""; }; - 9FE25D950CAB1724005383FC /* APFloat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = APFloat.cpp; sourceTree = ""; }; - 9FE25D960CAB1759005383FC /* TargetCallingConv.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TargetCallingConv.td; sourceTree = ""; }; - 9FE4508B0C77A77000C4FEA4 /* ARMCodeEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ARMCodeEmitter.cpp; sourceTree = ""; }; - 9FE4508C0C77A77000C4FEA4 /* ARMGenAsmWriter.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.pascal; path = ARMGenAsmWriter.inc; sourceTree = ""; }; - 9FE4508D0C77A77000C4FEA4 /* ARMGenDAGISel.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.pascal; path = ARMGenDAGISel.inc; sourceTree = ""; }; - 9FE4508E0C77A77100C4FEA4 /* ARMGenInstrInfo.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.pascal; path = ARMGenInstrInfo.inc; sourceTree = ""; }; - 9FE4508F0C77A77100C4FEA4 /* ARMGenInstrNames.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.pascal; path = ARMGenInstrNames.inc; sourceTree = ""; }; - 9FE450900C77A77100C4FEA4 /* ARMGenRegisterInfo.h.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.pascal; path = ARMGenRegisterInfo.h.inc; sourceTree = ""; }; - 9FE450910C77A77100C4FEA4 /* ARMGenRegisterInfo.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.pascal; path = ARMGenRegisterInfo.inc; sourceTree = ""; }; - 9FE450920C77A77100C4FEA4 /* ARMGenRegisterNames.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.pascal; path = ARMGenRegisterNames.inc; sourceTree = ""; }; - 9FE450930C77A77100C4FEA4 /* ARMGenSubtarget.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.pascal; path = ARMGenSubtarget.inc; sourceTree = ""; }; - 9FE450940C77A77100C4FEA4 /* ARMJITInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ARMJITInfo.cpp; sourceTree = ""; }; - 9FE450950C77A77100C4FEA4 /* ARMJITInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ARMJITInfo.h; sourceTree = ""; }; - 9FE450960C77A77100C4FEA4 /* ARMRelocations.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ARMRelocations.h; sourceTree = ""; }; - 9FE450970C77A77100C4FEA4 /* README-Thumb.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "README-Thumb.txt"; sourceTree = ""; }; - 9FE450980C77A77100C4FEA4 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = README.txt; sourceTree = ""; }; - 9FE4509A0C77A79C00C4FEA4 /* PPCCallingConv.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = PPCCallingConv.td; sourceTree = ""; }; - 9FE4509B0C77A79C00C4FEA4 /* PPCGenCallingConv.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.pascal; path = PPCGenCallingConv.inc; sourceTree = ""; }; - 9FE4509C0C77A7BC00C4FEA4 /* README-MMX.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "README-MMX.txt"; sourceTree = ""; }; - 9FE4509D0C77A7BC00C4FEA4 /* X86CallingConv.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = X86CallingConv.td; sourceTree = ""; }; - 9FE4509F0C77A7BC00C4FEA4 /* X86ELFWriterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86ELFWriterInfo.cpp; sourceTree = ""; }; - 9FE450A00C77A7BC00C4FEA4 /* X86ELFWriterInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86ELFWriterInfo.h; sourceTree = ""; }; - 9FE450A10C77A7BC00C4FEA4 /* X86GenCallingConv.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.pascal; path = X86GenCallingConv.inc; sourceTree = ""; }; - 9FE450A20C77A7BC00C4FEA4 /* X86InstrFormats.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = X86InstrFormats.td; sourceTree = ""; }; - 9FE450A50C77AAF000C4FEA4 /* Disassembler.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Disassembler.cpp; sourceTree = ""; }; - 9FE450A60C77AB3200C4FEA4 /* APInt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = APInt.cpp; sourceTree = ""; }; - 9FE450A70C77AB3200C4FEA4 /* ConstantRange.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ConstantRange.cpp; sourceTree = ""; }; - 9FE450A80C77AB3200C4FEA4 /* MemoryBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryBuffer.cpp; sourceTree = ""; }; - 9FE450A90C77AB3200C4FEA4 /* SmallPtrSet.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SmallPtrSet.cpp; sourceTree = ""; }; - 9FE450AA0C77AB3200C4FEA4 /* StringMap.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = StringMap.cpp; sourceTree = ""; }; - 9FE450AB0C77AB6100C4FEA4 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = README.txt; sourceTree = ""; }; - 9FE450AC0C77AB6E00C4FEA4 /* CallingConvLower.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CallingConvLower.cpp; sourceTree = ""; }; - 9FE450DF0C77ABE400C4FEA4 /* Archive.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Archive.cpp; sourceTree = ""; }; - 9FE450E00C77ABE400C4FEA4 /* ArchiveInternals.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ArchiveInternals.h; sourceTree = ""; }; - 9FE450E10C77ABE400C4FEA4 /* ArchiveReader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ArchiveReader.cpp; sourceTree = ""; }; - 9FE450E20C77ABE400C4FEA4 /* ArchiveWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ArchiveWriter.cpp; sourceTree = ""; }; - 9FEB8C550D1CD1E200EE46BC /* ExecutionEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExecutionEngine.h; sourceTree = ""; }; - 9FEDD5F10D8D73AB009F6DF1 /* Scalar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Scalar.h; sourceTree = ""; }; - 9FEDD5F70D8D797D009F6DF1 /* Scalar.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Scalar.cpp; sourceTree = ""; }; - 9FEDD6140D8D7C3B009F6DF1 /* scalar_opts.ml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = scalar_opts.ml; sourceTree = ""; }; - 9FEDD6B60D8D83D0009F6DF1 /* Target.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Target.cpp; sourceTree = ""; }; - 9FEDD6B80D8D83EC009F6DF1 /* Target.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Target.h; sourceTree = ""; }; - 9FEDD6BB0D8D8408009F6DF1 /* lto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lto.h; sourceTree = ""; }; - 9FEDD6BD0D8D8426009F6DF1 /* target.ml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = target.ml; sourceTree = ""; }; - 9FEDD6C10D8D844E009F6DF1 /* llvm_target.ml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = llvm_target.ml; sourceTree = ""; }; - 9FEDD6C20D8D844E009F6DF1 /* llvm_target.mli */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = llvm_target.mli; sourceTree = ""; }; - 9FEDD6C40D8D844E009F6DF1 /* target_ocaml.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = target_ocaml.c; sourceTree = ""; }; - CF1ACC9709C9DE4400D3C5EB /* IntrinsicInst.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IntrinsicInst.cpp; path = ../lib/VMCore/IntrinsicInst.cpp; sourceTree = ""; }; - CF26835B09178F5500C5F253 /* TargetInstrItineraries.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TargetInstrItineraries.h; sourceTree = ""; }; - CF32AF5C0AEE6A4E00D24CD4 /* LLVMTargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LLVMTargetMachine.cpp; sourceTree = ""; }; - CF33BE160AF62B4200E93805 /* SmallString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SmallString.h; sourceTree = ""; }; - CF341DAD0AB07A8B0099B064 /* AlphaTargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlphaTargetAsmInfo.h; sourceTree = ""; }; - CF341DAE0AB07A8B0099B064 /* AlphaTargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaTargetAsmInfo.cpp; sourceTree = ""; }; - CF341E010AB080220099B064 /* PPCTargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCTargetAsmInfo.h; sourceTree = ""; }; - CF341E020AB080220099B064 /* PPCTargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCTargetAsmInfo.cpp; sourceTree = ""; }; - CF341E220AB0814B0099B064 /* SparcTargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SparcTargetAsmInfo.h; sourceTree = ""; }; - CF341E230AB0814B0099B064 /* SparcTargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SparcTargetAsmInfo.cpp; sourceTree = ""; }; - CF341E320AB082D60099B064 /* X86TargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = X86TargetAsmInfo.h; sourceTree = ""; }; - CF341E330AB082D60099B064 /* X86TargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = X86TargetAsmInfo.cpp; sourceTree = ""; }; - CF42B6BF0AF24F5300D5D47C /* FoldingSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FoldingSet.h; sourceTree = ""; }; - CF42B6C40AF2512000D5D47C /* FoldingSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FoldingSet.cpp; sourceTree = ""; }; - CF47BD380AAF40BC00A8B13E /* TargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TargetAsmInfo.h; sourceTree = ""; }; - CF47BD860AAF487E00A8B13E /* TargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TargetAsmInfo.cpp; sourceTree = ""; }; - CF490D14090541D30072DB1C /* TargetSchedule.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TargetSchedule.td; sourceTree = ""; }; - CF490D15090541D30072DB1C /* TargetSelectionDAG.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TargetSelectionDAG.td; sourceTree = ""; }; - CF490E2F0907BBF80072DB1C /* SubtargetEmitter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SubtargetEmitter.h; sourceTree = ""; }; - CF490E300907BBF80072DB1C /* SubtargetEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SubtargetEmitter.cpp; sourceTree = ""; }; - CF4F27E60A7B6E23004359F6 /* MachinePassRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MachinePassRegistry.h; sourceTree = ""; }; - CF4F27F60A7B6FA3004359F6 /* MachinePassRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MachinePassRegistry.cpp; sourceTree = ""; }; - CF65223409CA39B800C4B521 /* Intrinsics.gen */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Intrinsics.gen; sourceTree = ""; }; - CF6527D909D1A53400C4B521 /* MachineLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MachineLocation.h; sourceTree = ""; }; - CF6527FA09D1BA3800C4B521 /* DelaySlotFiller.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DelaySlotFiller.cpp; path = ../lib/Target/Sparc/DelaySlotFiller.cpp; sourceTree = SOURCE_ROOT; }; - CF6527FB09D1BA3800C4B521 /* FPMover.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FPMover.cpp; path = ../lib/Target/Sparc/FPMover.cpp; sourceTree = SOURCE_ROOT; }; - CF6527FC09D1BA3800C4B521 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; name = Makefile; path = ../lib/Target/Sparc/Makefile; sourceTree = SOURCE_ROOT; }; - CF6527FD09D1BA3800C4B521 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = README.txt; path = ../lib/Target/Sparc/README.txt; sourceTree = SOURCE_ROOT; }; - CF6527FE09D1BA3800C4B521 /* Sparc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Sparc.h; path = ../lib/Target/Sparc/Sparc.h; sourceTree = SOURCE_ROOT; }; - CF6527FF09D1BA3800C4B521 /* Sparc.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Sparc.td; path = ../lib/Target/Sparc/Sparc.td; sourceTree = SOURCE_ROOT; }; - CF65280009D1BA3800C4B521 /* SparcAsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SparcAsmPrinter.cpp; path = ../lib/Target/Sparc/SparcAsmPrinter.cpp; sourceTree = SOURCE_ROOT; }; - CF65280109D1BA3800C4B521 /* SparcGenAsmWriter.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = SparcGenAsmWriter.inc; path = ../lib/Target/Sparc/SparcGenAsmWriter.inc; sourceTree = SOURCE_ROOT; }; - CF65280209D1BA3800C4B521 /* SparcGenDAGISel.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = SparcGenDAGISel.inc; path = ../lib/Target/Sparc/SparcGenDAGISel.inc; sourceTree = SOURCE_ROOT; }; - CF65280309D1BA3800C4B521 /* SparcGenInstrInfo.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = SparcGenInstrInfo.inc; path = ../lib/Target/Sparc/SparcGenInstrInfo.inc; sourceTree = SOURCE_ROOT; }; - CF65280409D1BA3800C4B521 /* SparcGenInstrNames.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = SparcGenInstrNames.inc; path = ../lib/Target/Sparc/SparcGenInstrNames.inc; sourceTree = SOURCE_ROOT; }; - CF65280509D1BA3800C4B521 /* SparcGenRegisterInfo.h.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = SparcGenRegisterInfo.h.inc; path = ../lib/Target/Sparc/SparcGenRegisterInfo.h.inc; sourceTree = SOURCE_ROOT; }; - CF65280609D1BA3800C4B521 /* SparcGenRegisterInfo.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = SparcGenRegisterInfo.inc; path = ../lib/Target/Sparc/SparcGenRegisterInfo.inc; sourceTree = SOURCE_ROOT; }; - CF65280709D1BA3800C4B521 /* SparcGenRegisterNames.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = SparcGenRegisterNames.inc; path = ../lib/Target/Sparc/SparcGenRegisterNames.inc; sourceTree = SOURCE_ROOT; }; - CF65280809D1BA3800C4B521 /* SparcGenSubtarget.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = SparcGenSubtarget.inc; path = ../lib/Target/Sparc/SparcGenSubtarget.inc; sourceTree = SOURCE_ROOT; }; - CF65280909D1BA3800C4B521 /* SparcInstrFormats.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = SparcInstrFormats.td; path = ../lib/Target/Sparc/SparcInstrFormats.td; sourceTree = SOURCE_ROOT; }; - CF65280A09D1BA3800C4B521 /* SparcInstrInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SparcInstrInfo.cpp; path = ../lib/Target/Sparc/SparcInstrInfo.cpp; sourceTree = SOURCE_ROOT; }; - CF65280B09D1BA3800C4B521 /* SparcInstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SparcInstrInfo.h; path = ../lib/Target/Sparc/SparcInstrInfo.h; sourceTree = SOURCE_ROOT; }; - CF65280C09D1BA3800C4B521 /* SparcInstrInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = SparcInstrInfo.td; path = ../lib/Target/Sparc/SparcInstrInfo.td; sourceTree = SOURCE_ROOT; }; - CF65280D09D1BA3800C4B521 /* SparcISelDAGToDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SparcISelDAGToDAG.cpp; path = ../lib/Target/Sparc/SparcISelDAGToDAG.cpp; sourceTree = SOURCE_ROOT; }; - CF65280E09D1BA3800C4B521 /* SparcRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SparcRegisterInfo.cpp; path = ../lib/Target/Sparc/SparcRegisterInfo.cpp; sourceTree = SOURCE_ROOT; }; - CF65280F09D1BA3800C4B521 /* SparcRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SparcRegisterInfo.h; path = ../lib/Target/Sparc/SparcRegisterInfo.h; sourceTree = SOURCE_ROOT; }; - CF65281009D1BA3800C4B521 /* SparcRegisterInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = SparcRegisterInfo.td; path = ../lib/Target/Sparc/SparcRegisterInfo.td; sourceTree = SOURCE_ROOT; }; - CF65281109D1BA3800C4B521 /* SparcSubtarget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SparcSubtarget.cpp; path = ../lib/Target/Sparc/SparcSubtarget.cpp; sourceTree = SOURCE_ROOT; }; - CF65281209D1BA3800C4B521 /* SparcSubtarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SparcSubtarget.h; path = ../lib/Target/Sparc/SparcSubtarget.h; sourceTree = SOURCE_ROOT; }; - CF65281309D1BA3800C4B521 /* SparcTargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SparcTargetMachine.cpp; path = ../lib/Target/Sparc/SparcTargetMachine.cpp; sourceTree = SOURCE_ROOT; }; - CF65281409D1BA3800C4B521 /* SparcTargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SparcTargetMachine.h; path = ../lib/Target/Sparc/SparcTargetMachine.h; sourceTree = SOURCE_ROOT; }; - CF6529A6095B21A8007F884E /* MachineModuleInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MachineModuleInfo.cpp; sourceTree = ""; }; - CF6B5AFD095C82C300D1EA42 /* DAGCombiner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DAGCombiner.cpp; sourceTree = ""; }; - CF6F487109505E1500BC9E82 /* MachineModuleInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MachineModuleInfo.h; sourceTree = ""; }; - CF71B60F0AC45EDA0007F57C /* SmallVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SmallVector.h; sourceTree = ""; }; - CF73C0A2098A4FDF00627152 /* InlineAsm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InlineAsm.h; sourceTree = ""; }; - CF73C0A3098A4FDF00627152 /* TypeSymbolTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypeSymbolTable.h; sourceTree = ""; }; - CF73C0A4098A4FDF00627152 /* ValueSymbolTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ValueSymbolTable.h; sourceTree = ""; }; - CF73C0A5098A507300627152 /* ConstantFolding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConstantFolding.h; sourceTree = ""; }; - CF73C0A9098A50FD00627152 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = ""; }; - CF73C0AD098A519400627152 /* DataTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataTypes.h; sourceTree = ""; }; - CF73C0AE098A51AD00627152 /* Alarm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Alarm.h; sourceTree = ""; }; - CF73C0AF098A51DD00627152 /* RSProfiling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RSProfiling.h; sourceTree = ""; }; - CF73C0B0098A523C00627152 /* ConstantFolding.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ConstantFolding.cpp; sourceTree = ""; }; - CF73C0B7098A546000627152 /* RSProfiling.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RSProfiling.cpp; sourceTree = ""; }; - CF73C0B8098A546000627152 /* RSProfiling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RSProfiling.h; sourceTree = ""; }; - CF73C0B9098A546000627152 /* Reg2Mem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Reg2Mem.cpp; sourceTree = ""; }; - CF73C0BD098A551F00627152 /* InlineAsm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InlineAsm.cpp; path = ../lib/VMCore/InlineAsm.cpp; sourceTree = SOURCE_ROOT; }; - CF73C0BE098A551F00627152 /* TypeSymbolTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TypeSymbolTable.cpp; path = ../lib/VMCore/TypeSymbolTable.cpp; sourceTree = SOURCE_ROOT; }; - CF73C0BF098A551F00627152 /* ValueSymbolTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueSymbolTable.cpp; path = ../lib/VMCore/ValueSymbolTable.cpp; sourceTree = SOURCE_ROOT; }; - CF79495D09B326D4005ADFCA /* Dwarf.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Dwarf.cpp; sourceTree = ""; }; - CF7FFA1F0985081C008B0087 /* ScheduleDAGList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScheduleDAGList.cpp; sourceTree = ""; }; - CF7FFA2109850864008B0087 /* ScheduleDAG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScheduleDAG.h; sourceTree = ""; }; - CF8D62FA09C2226F006017BA /* Intrinsics.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Intrinsics.td; sourceTree = ""; }; - CF8E00490989162500DA2399 /* Dwarf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Dwarf.h; sourceTree = ""; }; - CF8F1B410B64F6D100BB4199 /* RuntimeLibcalls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RuntimeLibcalls.h; sourceTree = ""; }; - CF8F1B420B64F70B00BB4199 /* PassManagers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PassManagers.h; sourceTree = ""; }; - CF8F1B430B64F74400BB4199 /* Allocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Allocator.h; sourceTree = ""; }; - CF8F1B440B64F74400BB4199 /* Compiler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Compiler.h; sourceTree = ""; }; - CF8F1B460B64F74400BB4199 /* ManagedStatic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ManagedStatic.h; sourceTree = ""; }; - CF8F1B470B64F74400BB4199 /* OutputBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OutputBuffer.h; sourceTree = ""; }; - CF8F1B490B64F7AB00BB4199 /* LinkTimeOptimizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkTimeOptimizer.h; sourceTree = ""; }; - CF8F1B4D0B64F80700BB4199 /* AliasDebugger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AliasDebugger.cpp; sourceTree = ""; }; - CF8F1B500B64F86A00BB4199 /* ManagedStatic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ManagedStatic.cpp; sourceTree = ""; }; - CF8F1B510B64F86A00BB4199 /* Streams.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Streams.cpp; sourceTree = ""; }; - CF8F1B530B64F8C000BB4199 /* IncludeFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IncludeFile.cpp; sourceTree = ""; }; - CF8F1B540B64F90F00BB4199 /* AlphaBranchSelector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaBranchSelector.cpp; sourceTree = ""; }; - CF8F1B550B64F90F00BB4199 /* AlphaLLRP.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaLLRP.cpp; sourceTree = ""; }; - CF8F1B560B64F98900BB4199 /* CBackend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CBackend.cpp; sourceTree = ""; }; - CF8F1B570B64F9AC00BB4199 /* PPCPredicates.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCPredicates.cpp; sourceTree = ""; }; - CF8F1B580B64F9AC00BB4199 /* PPCPredicates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCPredicates.h; sourceTree = ""; }; - CF8F1B590B64F9E100BB4199 /* X86COFF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = X86COFF.h; sourceTree = ""; }; - CF8F1B5B0B64FA2F00BB4199 /* PredicateSimplifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PredicateSimplifier.cpp; sourceTree = ""; }; - CF8F1B5C0B64FA7300BB4199 /* PassManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PassManager.cpp; path = ../lib/VMCore/PassManager.cpp; sourceTree = SOURCE_ROOT; }; - CF8F1B680B64FADA00BB4199 /* llvm-upgrade.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "llvm-upgrade.cpp"; sourceTree = ""; }; - CF8F1B720B64FADA00BB4199 /* UpgradeInternals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UpgradeInternals.h; sourceTree = ""; }; - CF8F1B750B64FADA00BB4199 /* UpgradeLexer.l */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.lex; path = UpgradeLexer.l; sourceTree = ""; }; - CF8F1B7C0B64FADA00BB4199 /* UpgradeParser.y */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.yacc; path = UpgradeParser.y; sourceTree = ""; }; - CF8F1B7F0B64FADA00BB4199 /* CppWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CppWriter.cpp; sourceTree = ""; }; - CF8F1B800B64FADA00BB4199 /* CppWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CppWriter.h; sourceTree = ""; }; - CF8F1B870B64FADA00BB4199 /* llvm2cpp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = llvm2cpp.cpp; sourceTree = ""; }; - CF8F1B950B64FB5000BB4199 /* ConfigLexer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ConfigLexer.cpp; sourceTree = ""; }; - CF8F1B9D0B64FB7F00BB4199 /* lto-c.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "lto-c.cpp"; sourceTree = ""; }; - CF8F1B9E0B64FB7F00BB4199 /* lto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lto.cpp; sourceTree = ""; }; - CF8F1BAC0B64FB8000BB4199 /* AnalysisWrappers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AnalysisWrappers.cpp; sourceTree = ""; }; - CF8F1BB70B64FB8000BB4199 /* GraphPrinters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphPrinters.cpp; sourceTree = ""; }; - CF8F1BB90B64FB8000BB4199 /* opt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = opt.cpp; sourceTree = ""; }; - CF8F1BBA0B64FB8000BB4199 /* PrintSCC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PrintSCC.cpp; sourceTree = ""; }; - CF8F1BC90B64FBD500BB4199 /* CodeGenIntrinsics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CodeGenIntrinsics.h; sourceTree = ""; }; - CF8F1BD10B64FC8A00BB4199 /* ARM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARM.h; sourceTree = ""; }; - CF8F1BD20B64FC8A00BB4199 /* ARM.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ARM.td; sourceTree = ""; }; - CF8F1BD30B64FC8A00BB4199 /* ARMAddressingModes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMAddressingModes.h; sourceTree = ""; }; - CF8F1BD40B64FC8A00BB4199 /* ARMAsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMAsmPrinter.cpp; sourceTree = ""; }; - CF8F1BD50B64FC8A00BB4199 /* ARMConstantIslandPass.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMConstantIslandPass.cpp; sourceTree = ""; }; - CF8F1BD60B64FC8A00BB4199 /* ARMConstantPoolValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMConstantPoolValue.cpp; sourceTree = ""; }; - CF8F1BD70B64FC8A00BB4199 /* ARMConstantPoolValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMConstantPoolValue.h; sourceTree = ""; }; - CF8F1BD80B64FC8A00BB4199 /* ARMFrameInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMFrameInfo.h; sourceTree = ""; }; - CF8F1BD90B64FC8A00BB4199 /* ARMInstrInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMInstrInfo.cpp; sourceTree = ""; }; - CF8F1BDA0B64FC8A00BB4199 /* ARMInstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMInstrInfo.h; sourceTree = ""; }; - CF8F1BDB0B64FC8A00BB4199 /* ARMInstrInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ARMInstrInfo.td; sourceTree = ""; }; - CF8F1BDC0B64FC8A00BB4199 /* ARMInstrThumb.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ARMInstrThumb.td; sourceTree = ""; }; - CF8F1BDD0B64FC8A00BB4199 /* ARMInstrVFP.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ARMInstrVFP.td; sourceTree = ""; }; - CF8F1BDE0B64FC8A00BB4199 /* ARMISelDAGToDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMISelDAGToDAG.cpp; sourceTree = ""; }; - CF8F1BDF0B64FC8A00BB4199 /* ARMISelLowering.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMISelLowering.cpp; sourceTree = ""; }; - CF8F1BE00B64FC8A00BB4199 /* ARMISelLowering.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMISelLowering.h; sourceTree = ""; }; - CF8F1BE10B64FC8A00BB4199 /* ARMLoadStoreOptimizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMLoadStoreOptimizer.cpp; sourceTree = ""; }; - CF8F1BE20B64FC8A00BB4199 /* ARMMachineFunctionInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMMachineFunctionInfo.h; sourceTree = ""; }; - CF8F1BE30B64FC8A00BB4199 /* ARMRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMRegisterInfo.cpp; sourceTree = ""; }; - CF8F1BE40B64FC8A00BB4199 /* ARMRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMRegisterInfo.h; sourceTree = ""; }; - CF8F1BE50B64FC8A00BB4199 /* ARMRegisterInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ARMRegisterInfo.td; sourceTree = ""; }; - CF8F1BE60B64FC8A00BB4199 /* ARMSubtarget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMSubtarget.cpp; sourceTree = ""; }; - CF8F1BE70B64FC8A00BB4199 /* ARMSubtarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMSubtarget.h; sourceTree = ""; }; - CF8F1BE80B64FC8A00BB4199 /* ARMTargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMTargetAsmInfo.cpp; sourceTree = ""; }; - CF8F1BE90B64FC8A00BB4199 /* ARMTargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMTargetAsmInfo.h; sourceTree = ""; }; - CF8F1BEA0B64FC8A00BB4199 /* ARMTargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMTargetMachine.cpp; sourceTree = ""; }; - CF8F1BEB0B64FC8A00BB4199 /* ARMTargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMTargetMachine.h; sourceTree = ""; }; - CF9720260A9F39B9002CEEDD /* LinkAllPasses.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkAllPasses.h; sourceTree = ""; }; - CF9720270A9F39B9002CEEDD /* LinkTimeOptimizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkTimeOptimizer.h; sourceTree = ""; }; - CF9720340A9F3A41002CEEDD /* IncludeFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IncludeFile.h; sourceTree = ""; }; - CF9720350A9F3ADC002CEEDD /* MachOWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MachOWriter.cpp; sourceTree = ""; }; - CF9720370A9F3B1C002CEEDD /* TargetLowering.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TargetLowering.cpp; sourceTree = ""; }; - CF97208A0A9F3C6F002CEEDD /* LCSSA.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LCSSA.cpp; sourceTree = ""; }; - CF97208B0A9F3C6F002CEEDD /* LowerAllocations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LowerAllocations.cpp; sourceTree = ""; }; - CF97208C0A9F3C6F002CEEDD /* LowerInvoke.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LowerInvoke.cpp; sourceTree = ""; }; - CF97208E0A9F3C6F002CEEDD /* LowerSwitch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LowerSwitch.cpp; sourceTree = ""; }; - CF97208F0A9F3C6F002CEEDD /* Mem2Reg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Mem2Reg.cpp; sourceTree = ""; }; - CF9720900A9F3CA2002CEEDD /* ValueTypes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueTypes.cpp; path = ../lib/VMCore/ValueTypes.cpp; sourceTree = SOURCE_ROOT; }; - CF9720910A9F3CC7002CEEDD /* FindBugs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FindBugs.cpp; sourceTree = ""; }; - CF9720920A9F3CC7002CEEDD /* ToolRunner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ToolRunner.cpp; sourceTree = ""; }; - CF9720930A9F3CC7002CEEDD /* ToolRunner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ToolRunner.h; sourceTree = ""; }; - CF9720970A9F3D4D002CEEDD /* IntrinsicEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IntrinsicEmitter.cpp; sourceTree = ""; }; - CF9720980A9F3D4D002CEEDD /* IntrinsicEmitter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IntrinsicEmitter.h; sourceTree = ""; }; - CF9BCD0808C74DE0001E7011 /* SubtargetFeature.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SubtargetFeature.h; sourceTree = ""; }; - CF9BCD1508C75070001E7011 /* SubtargetFeature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SubtargetFeature.cpp; sourceTree = ""; }; - CFA702BB0A6FA85F0006009A /* AlphaGenAsmWriter.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = AlphaGenAsmWriter.inc; sourceTree = ""; }; - CFA702BC0A6FA85F0006009A /* AlphaGenCodeEmitter.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = AlphaGenCodeEmitter.inc; sourceTree = ""; }; - CFA702BD0A6FA85F0006009A /* AlphaGenDAGISel.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = AlphaGenDAGISel.inc; sourceTree = ""; }; - CFA702BE0A6FA85F0006009A /* AlphaGenInstrInfo.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = AlphaGenInstrInfo.inc; sourceTree = ""; }; - CFA702BF0A6FA85F0006009A /* AlphaGenInstrNames.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = AlphaGenInstrNames.inc; sourceTree = ""; }; - CFA702C00A6FA85F0006009A /* AlphaGenRegisterInfo.h.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = AlphaGenRegisterInfo.h.inc; sourceTree = ""; }; - CFA702C10A6FA85F0006009A /* AlphaGenRegisterInfo.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = AlphaGenRegisterInfo.inc; sourceTree = ""; }; - CFA702C20A6FA85F0006009A /* AlphaGenRegisterNames.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = AlphaGenRegisterNames.inc; sourceTree = ""; }; - CFA702C30A6FA85F0006009A /* AlphaGenSubtarget.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = AlphaGenSubtarget.inc; sourceTree = ""; }; - CFA702CB0A6FA8AD0006009A /* PPCGenAsmWriter.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenAsmWriter.inc; sourceTree = ""; }; - CFA702CC0A6FA8AD0006009A /* PPCGenCodeEmitter.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenCodeEmitter.inc; sourceTree = ""; }; - CFA702CD0A6FA8AD0006009A /* PPCGenDAGISel.inc */ = {isa = PBXFileReference; explicitFileType = sourcecode.pascal; fileEncoding = 4; path = PPCGenDAGISel.inc; sourceTree = ""; }; - CFA702CE0A6FA8AD0006009A /* PPCGenInstrInfo.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenInstrInfo.inc; sourceTree = ""; }; - CFA702CF0A6FA8AD0006009A /* PPCGenInstrNames.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenInstrNames.inc; sourceTree = ""; }; - CFA702D00A6FA8AD0006009A /* PPCGenRegisterInfo.h.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenRegisterInfo.h.inc; sourceTree = ""; }; - CFA702D10A6FA8AD0006009A /* PPCGenRegisterInfo.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenRegisterInfo.inc; sourceTree = ""; }; - CFA702D20A6FA8AD0006009A /* PPCGenRegisterNames.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenRegisterNames.inc; sourceTree = ""; }; - CFA702D30A6FA8AD0006009A /* PPCGenSubtarget.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenSubtarget.inc; sourceTree = ""; }; - CFA702D40A6FA8DD0006009A /* X86GenAsmWriter.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = X86GenAsmWriter.inc; sourceTree = ""; }; - CFA702D50A6FA8DD0006009A /* X86GenAsmWriter1.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = X86GenAsmWriter1.inc; sourceTree = ""; }; - CFA702D60A6FA8DD0006009A /* X86GenDAGISel.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = X86GenDAGISel.inc; sourceTree = ""; }; - CFA702D70A6FA8DD0006009A /* X86GenInstrInfo.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = X86GenInstrInfo.inc; sourceTree = ""; }; - CFA702D80A6FA8DD0006009A /* X86GenInstrNames.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = X86GenInstrNames.inc; sourceTree = ""; }; - CFA702D90A6FA8DD0006009A /* X86GenRegisterInfo.h.inc */ = {isa = PBXFileReference; fileEncoding = 4; languageSpecificationIdentifier = c.cpp; lastKnownFileType = sourcecode.pascal; path = X86GenRegisterInfo.h.inc; sourceTree = ""; }; - CFA702DA0A6FA8DD0006009A /* X86GenRegisterInfo.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = X86GenRegisterInfo.inc; sourceTree = ""; }; - CFA702DB0A6FA8DD0006009A /* X86GenRegisterNames.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = X86GenRegisterNames.inc; sourceTree = ""; }; - CFA702DC0A6FA8DD0006009A /* X86GenSubtarget.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = X86GenSubtarget.inc; sourceTree = ""; }; - CFABD0A20B09E342003EB061 /* PPCMachineFunctionInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCMachineFunctionInfo.h; sourceTree = ""; }; - CFBD8B1A090E76540020B107 /* AlphaISelDAGToDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaISelDAGToDAG.cpp; sourceTree = ""; }; - CFBD8B1B090E76540020B107 /* AlphaISelLowering.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaISelLowering.cpp; sourceTree = ""; }; - CFBD8B1C090E76540020B107 /* AlphaISelLowering.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlphaISelLowering.h; sourceTree = ""; }; - CFBD8B1D090E76540020B107 /* AlphaSubtarget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaSubtarget.cpp; sourceTree = ""; }; - CFBD8B1E090E76540020B107 /* AlphaSubtarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlphaSubtarget.h; sourceTree = ""; }; - CFC244570959DEF2009F8C47 /* DwarfWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DwarfWriter.cpp; sourceTree = ""; }; - CFC244BB0959F24C009F8C47 /* X86ISelDAGToDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = X86ISelDAGToDAG.cpp; sourceTree = ""; }; - CFC244BC0959F24C009F8C47 /* X86ISelLowering.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = X86ISelLowering.cpp; sourceTree = ""; }; - CFC244BD0959F24C009F8C47 /* X86ISelLowering.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = X86ISelLowering.h; sourceTree = ""; }; - CFD7E4F30A798FC3000C7379 /* LinkAllCodegenComponents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkAllCodegenComponents.h; sourceTree = ""; }; - CFD99AA80AFE827B0068D19C /* LICENSE.TXT */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = LICENSE.TXT; path = ../LICENSE.TXT; sourceTree = SOURCE_ROOT; }; - CFD99AAD0AFE827B0068D19C /* README.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = README.txt; path = ../README.txt; sourceTree = SOURCE_ROOT; }; - CFD99AB70AFE848A0068D19C /* Allocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Allocator.cpp; sourceTree = ""; }; - CFD99ABA0AFE84D70068D19C /* IncludeFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IncludeFile.cpp; sourceTree = ""; }; - CFD99ABB0AFE84EF0068D19C /* Alarm.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = Alarm.inc; sourceTree = ""; }; - CFD99ABE0AFE857A0068D19C /* README-X86-64.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "README-X86-64.txt"; sourceTree = ""; }; - CFD99ADA0AFE87650068D19C /* lto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = lto.cpp; path = lto/lto.cpp; sourceTree = ""; }; - CFD99ADB0AFE87870068D19C /* AnalysisWrappers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AnalysisWrappers.cpp; path = opt/AnalysisWrappers.cpp; sourceTree = ""; }; - CFD99ADC0AFE87870068D19C /* GraphPrinters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GraphPrinters.cpp; path = opt/GraphPrinters.cpp; sourceTree = ""; }; - CFD99ADD0AFE87870068D19C /* opt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = opt.cpp; path = opt/opt.cpp; sourceTree = ""; }; - CFD99ADE0AFE87870068D19C /* PrintSCC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PrintSCC.cpp; path = opt/PrintSCC.cpp; sourceTree = ""; }; - CFE21C780A80CC0600D3E908 /* RegAllocRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegAllocRegistry.h; sourceTree = ""; }; - CFE21C7B0A80CC1C00D3E908 /* SchedulerRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SchedulerRegistry.h; sourceTree = ""; }; - CFE420FB0A66F67300AB4BF6 /* MachineJumpTableInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MachineJumpTableInfo.h; sourceTree = ""; }; - CFE420FC0A66F67300AB4BF6 /* ValueTypes.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ValueTypes.td; sourceTree = ""; }; - CFE420FD0A66F67300AB4BF6 /* Interpreter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Interpreter.h; sourceTree = ""; }; - CFE420FE0A66F67300AB4BF6 /* JIT.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JIT.h; sourceTree = ""; }; - CFE420FF0A66F67300AB4BF6 /* IntrinsicsPowerPC.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IntrinsicsPowerPC.td; sourceTree = ""; }; - CFE421000A66F67300AB4BF6 /* IntrinsicsX86.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IntrinsicsX86.td; sourceTree = ""; }; - CFE421010A66F67300AB4BF6 /* LinkAllVMCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkAllVMCore.h; sourceTree = ""; }; - CFE421060A66F86D00AB4BF6 /* ScheduleDAGRRList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScheduleDAGRRList.cpp; sourceTree = ""; }; - CFE421070A66F8DC00AB4BF6 /* GraphWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphWriter.cpp; sourceTree = ""; }; - CFE421090A66F93300AB4BF6 /* Alarm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Alarm.cpp; sourceTree = ""; }; - CFE4210A0A66F93300AB4BF6 /* Alarm.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = Alarm.inc; sourceTree = ""; }; - CFE4210B0A66F96400AB4BF6 /* AlphaSchedule.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AlphaSchedule.td; sourceTree = ""; }; - CFE421140A66FA2D00AB4BF6 /* PPC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPC.h; sourceTree = ""; }; - CFE421150A66FA2D00AB4BF6 /* PPC.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPC.td; sourceTree = ""; }; - CFE421160A66FA2D00AB4BF6 /* PPCAsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCAsmPrinter.cpp; sourceTree = ""; }; - CFE421170A66FA2D00AB4BF6 /* PPCBranchSelector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCBranchSelector.cpp; sourceTree = ""; }; - CFE421180A66FA2D00AB4BF6 /* PPCCodeEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCCodeEmitter.cpp; sourceTree = ""; }; - CFE421190A66FA2D00AB4BF6 /* PPCFrameInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCFrameInfo.h; sourceTree = ""; }; - CFE4211A0A66FA2D00AB4BF6 /* PPCHazardRecognizers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCHazardRecognizers.cpp; sourceTree = ""; }; - CFE4211B0A66FA2D00AB4BF6 /* PPCHazardRecognizers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCHazardRecognizers.h; sourceTree = ""; }; - CFE4211C0A66FA2D00AB4BF6 /* PPCInstr64Bit.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCInstr64Bit.td; sourceTree = ""; }; - CFE4211D0A66FA2D00AB4BF6 /* PPCInstrAltivec.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCInstrAltivec.td; sourceTree = ""; }; - CFE4211E0A66FA2D00AB4BF6 /* PPCInstrBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCInstrBuilder.h; sourceTree = ""; }; - CFE4211F0A66FA2D00AB4BF6 /* PPCInstrFormats.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCInstrFormats.td; sourceTree = ""; }; - CFE421200A66FA2D00AB4BF6 /* PPCInstrInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCInstrInfo.cpp; sourceTree = ""; }; - CFE421210A66FA2D00AB4BF6 /* PPCInstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCInstrInfo.h; sourceTree = ""; }; - CFE421220A66FA2D00AB4BF6 /* PPCInstrInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCInstrInfo.td; sourceTree = ""; }; - CFE421230A66FA2D00AB4BF6 /* PPCISelDAGToDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCISelDAGToDAG.cpp; sourceTree = ""; }; - CFE421240A66FA2D00AB4BF6 /* PPCISelLowering.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCISelLowering.cpp; sourceTree = ""; }; - CFE421250A66FA2D00AB4BF6 /* PPCISelLowering.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCISelLowering.h; sourceTree = ""; }; - CFE421260A66FA2D00AB4BF6 /* PPCJITInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCJITInfo.cpp; sourceTree = ""; }; - CFE421270A66FA2D00AB4BF6 /* PPCJITInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCJITInfo.h; sourceTree = ""; }; - CFE421280A66FA2D00AB4BF6 /* PPCPerfectShuffle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCPerfectShuffle.h; sourceTree = ""; }; - CFE421290A66FA2D00AB4BF6 /* PPCRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCRegisterInfo.cpp; sourceTree = ""; }; - CFE4212A0A66FA2D00AB4BF6 /* PPCRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCRegisterInfo.h; sourceTree = ""; }; - CFE4212B0A66FA2D00AB4BF6 /* PPCRegisterInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCRegisterInfo.td; sourceTree = ""; }; - CFE4212C0A66FA2D00AB4BF6 /* PPCRelocations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCRelocations.h; sourceTree = ""; }; - CFE4212D0A66FA2D00AB4BF6 /* PPCSchedule.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCSchedule.td; sourceTree = ""; }; - CFE4212E0A66FA2D00AB4BF6 /* PPCScheduleG3.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCScheduleG3.td; sourceTree = ""; }; - CFE4212F0A66FA2D00AB4BF6 /* PPCScheduleG4.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCScheduleG4.td; sourceTree = ""; }; - CFE421300A66FA2D00AB4BF6 /* PPCScheduleG4Plus.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCScheduleG4Plus.td; sourceTree = ""; }; - CFE421310A66FA2D00AB4BF6 /* PPCScheduleG5.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCScheduleG5.td; sourceTree = ""; }; - CFE421320A66FA2E00AB4BF6 /* PPCSubtarget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCSubtarget.cpp; sourceTree = ""; }; - CFE421330A66FA2E00AB4BF6 /* PPCSubtarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCSubtarget.h; sourceTree = ""; }; - CFE421340A66FA2E00AB4BF6 /* PPCTargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCTargetMachine.cpp; sourceTree = ""; }; - CFE421350A66FA2E00AB4BF6 /* PPCTargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCTargetMachine.h; sourceTree = ""; }; - CFE421360A66FA2E00AB4BF6 /* README_ALTIVEC.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README_ALTIVEC.txt; sourceTree = ""; }; - CFE421370A66FA2E00AB4BF6 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.txt; sourceTree = ""; }; - CFE421380A66FA8000AB4BF6 /* README-FPStack.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "README-FPStack.txt"; sourceTree = ""; }; - CFE421390A66FA8000AB4BF6 /* README-SSE.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "README-SSE.txt"; sourceTree = ""; }; - CFE4213A0A66FA8000AB4BF6 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.txt; sourceTree = ""; }; - CFE4213B0A66FA8000AB4BF6 /* X86MachineFunctionInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = X86MachineFunctionInfo.h; sourceTree = ""; }; - CFE4213D0A66FAE100AB4BF6 /* Hello.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Hello.cpp; sourceTree = ""; }; - CFE4213F0A66FB5E00AB4BF6 /* IndMemRemoval.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IndMemRemoval.cpp; sourceTree = ""; }; - CFF0DE6309BF6C360031957F /* X86InstrFPStack.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = X86InstrFPStack.td; sourceTree = ""; }; - CFF0DE6409BF6C360031957F /* X86InstrMMX.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = X86InstrMMX.td; sourceTree = ""; }; - CFF0DE6509BF6C360031957F /* X86InstrSSE.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = X86InstrSSE.td; sourceTree = ""; }; - CFF8B434097C605F0047F72A /* UniqueVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UniqueVector.h; sourceTree = ""; }; - DE4DA0390911476D0012D44B /* LoopSimplify.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = LoopSimplify.cpp; path = ../lib/Transforms/Utils/LoopSimplify.cpp; sourceTree = SOURCE_ROOT; }; - DE4DA03C091147920012D44B /* LiveInterval.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = LiveInterval.h; path = ../include/llvm/CodeGen/LiveInterval.h; sourceTree = SOURCE_ROOT; }; - DE4DA03D091147920012D44B /* LiveIntervalAnalysis.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = LiveIntervalAnalysis.h; path = ../include/llvm/CodeGen/LiveIntervalAnalysis.h; sourceTree = SOURCE_ROOT; }; - DE4DA065091148520012D44B /* SubtargetEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = SubtargetEmitter.cpp; path = ../utils/TableGen/SubtargetEmitter.cpp; sourceTree = SOURCE_ROOT; }; - DE4DA066091148520012D44B /* SubtargetEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SubtargetEmitter.h; path = ../utils/TableGen/SubtargetEmitter.h; sourceTree = SOURCE_ROOT; }; - DE66EC5B08ABE86900323D32 /* AsmWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = AsmWriter.cpp; path = ../lib/VMCore/AsmWriter.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC5C08ABE86A00323D32 /* BasicBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = BasicBlock.cpp; path = ../lib/VMCore/BasicBlock.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC6008ABE86A00323D32 /* Constants.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Constants.cpp; path = ../lib/VMCore/Constants.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC6108ABE86A00323D32 /* Dominators.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Dominators.cpp; path = ../lib/VMCore/Dominators.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC6208ABE86A00323D32 /* Function.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Function.cpp; path = ../lib/VMCore/Function.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC6308ABE86A00323D32 /* Globals.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Globals.cpp; path = ../lib/VMCore/Globals.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC6408ABE86A00323D32 /* Instruction.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Instruction.cpp; path = ../lib/VMCore/Instruction.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC6508ABE86A00323D32 /* Instructions.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Instructions.cpp; path = ../lib/VMCore/Instructions.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC6608ABE86A00323D32 /* LeakDetector.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = LeakDetector.cpp; path = ../lib/VMCore/LeakDetector.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC6708ABE86A00323D32 /* Mangler.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Mangler.cpp; path = ../lib/VMCore/Mangler.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC6808ABE86A00323D32 /* Module.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Module.cpp; path = ../lib/VMCore/Module.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC6908ABE86A00323D32 /* ModuleProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ModuleProvider.cpp; path = ../lib/VMCore/ModuleProvider.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC6A08ABE86A00323D32 /* Pass.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Pass.cpp; path = ../lib/VMCore/Pass.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC6D08ABE86A00323D32 /* SymbolTableListTraitsImpl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SymbolTableListTraitsImpl.h; path = ../lib/VMCore/SymbolTableListTraitsImpl.h; sourceTree = SOURCE_ROOT; }; - DE66EC6E08ABE86A00323D32 /* Type.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Type.cpp; path = ../lib/VMCore/Type.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC6F08ABE86A00323D32 /* Value.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Value.cpp; path = ../lib/VMCore/Value.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC7008ABE86A00323D32 /* Verifier.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Verifier.cpp; path = ../lib/VMCore/Verifier.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC8E08ABEAF000323D32 /* llvmAsmParser.y */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.yacc; name = llvmAsmParser.y; path = ../lib/AsmParser/llvmAsmParser.y; sourceTree = SOURCE_ROOT; }; - DE66EC8F08ABEAF000323D32 /* Parser.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Parser.cpp; path = ../lib/AsmParser/Parser.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC9008ABEAF000323D32 /* ParserInternals.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ParserInternals.h; path = ../lib/AsmParser/ParserInternals.h; sourceTree = SOURCE_ROOT; }; - DE66ECBE08ABEC0700323D32 /* AliasAnalysis.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AliasAnalysis.cpp; sourceTree = ""; }; - DE66ECBF08ABEC0700323D32 /* AliasAnalysisCounter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AliasAnalysisCounter.cpp; sourceTree = ""; }; - DE66ECC008ABEC0700323D32 /* AliasAnalysisEvaluator.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AliasAnalysisEvaluator.cpp; sourceTree = ""; }; - DE66ECC108ABEC0700323D32 /* AliasSetTracker.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AliasSetTracker.cpp; sourceTree = ""; }; - DE66ECC208ABEC0700323D32 /* BasicAliasAnalysis.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BasicAliasAnalysis.cpp; sourceTree = ""; }; - DE66ECC308ABEC0700323D32 /* CFGPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CFGPrinter.cpp; sourceTree = ""; }; - DE66ED1708ABEC0800323D32 /* InstCount.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = InstCount.cpp; sourceTree = ""; }; - DE66ED1808ABEC0800323D32 /* Interval.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Interval.cpp; sourceTree = ""; }; - DE66ED1908ABEC0800323D32 /* IntervalPartition.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IntervalPartition.cpp; sourceTree = ""; }; - DE66ED1B08ABEC0800323D32 /* Andersens.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Andersens.cpp; sourceTree = ""; }; - DE66ED1C08ABEC0800323D32 /* CallGraph.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CallGraph.cpp; sourceTree = ""; }; - DE66ED1D08ABEC0800323D32 /* CallGraphSCCPass.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CallGraphSCCPass.cpp; sourceTree = ""; }; - DE66ED2F08ABEC0800323D32 /* FindUsedTypes.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FindUsedTypes.cpp; sourceTree = ""; }; - DE66ED3008ABEC0800323D32 /* GlobalsModRef.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GlobalsModRef.cpp; sourceTree = ""; }; - DE66ED3308ABEC0800323D32 /* LoadValueNumbering.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LoadValueNumbering.cpp; sourceTree = ""; }; - DE66ED3408ABEC0800323D32 /* LoopInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LoopInfo.cpp; sourceTree = ""; }; - DE66ED3608ABEC0800323D32 /* PostDominators.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PostDominators.cpp; sourceTree = ""; }; - DE66ED3708ABEC0800323D32 /* ProfileInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ProfileInfo.cpp; sourceTree = ""; }; - DE66ED3808ABEC0800323D32 /* ProfileInfoLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ProfileInfoLoader.cpp; sourceTree = ""; }; - DE66ED3908ABEC0800323D32 /* ProfileInfoLoaderPass.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ProfileInfoLoaderPass.cpp; sourceTree = ""; }; - DE66ED3A08ABEC0800323D32 /* ScalarEvolution.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ScalarEvolution.cpp; sourceTree = ""; }; - DE66ED3B08ABEC0800323D32 /* ScalarEvolutionExpander.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ScalarEvolutionExpander.cpp; sourceTree = ""; }; - DE66ED3C08ABEC0800323D32 /* Trace.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Trace.cpp; sourceTree = ""; }; - DE66ED3D08ABEC0800323D32 /* ValueNumbering.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ValueNumbering.cpp; sourceTree = ""; }; - DE66ED3F08ABEC2A00323D32 /* AsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AsmPrinter.cpp; sourceTree = ""; }; - DE66ED4008ABEC2A00323D32 /* BranchFolding.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BranchFolding.cpp; sourceTree = ""; }; - DE66ED6F08ABEC2B00323D32 /* ELFWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ELFWriter.cpp; sourceTree = ""; }; - DE66ED7008ABEC2B00323D32 /* IntrinsicLowering.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IntrinsicLowering.cpp; sourceTree = ""; }; - DE66ED7108ABEC2B00323D32 /* LiveInterval.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LiveInterval.cpp; sourceTree = ""; }; - DE66ED7308ABEC2B00323D32 /* LiveIntervalAnalysis.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LiveIntervalAnalysis.cpp; sourceTree = ""; }; - DE66ED7508ABEC2B00323D32 /* LiveVariables.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LiveVariables.cpp; sourceTree = ""; }; - DE66ED7608ABEC2B00323D32 /* MachineBasicBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MachineBasicBlock.cpp; sourceTree = ""; }; - DE66ED7808ABEC2B00323D32 /* MachineFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MachineFunction.cpp; sourceTree = ""; }; - DE66ED7908ABEC2B00323D32 /* MachineInstr.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MachineInstr.cpp; sourceTree = ""; }; - DE66ED7B08ABEC2B00323D32 /* Passes.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Passes.cpp; sourceTree = ""; }; - DE66ED7C08ABEC2B00323D32 /* PHIElimination.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PHIElimination.cpp; sourceTree = ""; }; - DE66ED7D08ABEC2B00323D32 /* PhysRegTracker.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PhysRegTracker.h; sourceTree = ""; }; - DE66ED7E08ABEC2B00323D32 /* PrologEpilogInserter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PrologEpilogInserter.cpp; sourceTree = ""; }; - DE66ED8008ABEC2B00323D32 /* RegAllocLinearScan.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RegAllocLinearScan.cpp; sourceTree = ""; }; - DE66ED8108ABEC2B00323D32 /* RegAllocLocal.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RegAllocLocal.cpp; sourceTree = ""; }; - DE66ED8208ABEC2B00323D32 /* RegAllocSimple.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RegAllocSimple.cpp; sourceTree = ""; }; - DE66ED9008ABEC2B00323D32 /* LegalizeDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LegalizeDAG.cpp; sourceTree = ""; }; - DE66ED9208ABEC2B00323D32 /* SelectionDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SelectionDAG.cpp; sourceTree = ""; }; - DE66ED9308ABEC2B00323D32 /* SelectionDAGISel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SelectionDAGISel.cpp; sourceTree = ""; }; - DE66ED9408ABEC2B00323D32 /* SelectionDAGPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SelectionDAGPrinter.cpp; sourceTree = ""; }; - DE66ED9508ABEC2B00323D32 /* TwoAddressInstructionPass.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TwoAddressInstructionPass.cpp; sourceTree = ""; }; - DE66ED9608ABEC2B00323D32 /* UnreachableBlockElim.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = UnreachableBlockElim.cpp; sourceTree = ""; }; - DE66ED9808ABEC2B00323D32 /* VirtRegMap.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = VirtRegMap.cpp; sourceTree = ""; }; - DE66ED9908ABEC2B00323D32 /* VirtRegMap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = VirtRegMap.h; sourceTree = ""; }; - DE66EDB108ABEC7300323D32 /* Debugger.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Debugger.cpp; sourceTree = ""; }; - DE66EDB508ABEC7300323D32 /* ProgramInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ProgramInfo.cpp; sourceTree = ""; }; - DE66EDB608ABEC7300323D32 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = README.txt; sourceTree = ""; }; - DE66EDB708ABEC7300323D32 /* RuntimeInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RuntimeInfo.cpp; sourceTree = ""; }; - DE66EDB808ABEC7300323D32 /* SourceFile.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SourceFile.cpp; sourceTree = ""; }; - DE66EDB908ABEC7300323D32 /* SourceLanguage-CFamily.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = "SourceLanguage-CFamily.cpp"; sourceTree = ""; }; - DE66EDBA08ABEC7300323D32 /* SourceLanguage-CPlusPlus.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = "SourceLanguage-CPlusPlus.cpp"; sourceTree = ""; }; - DE66EDBB08ABEC7300323D32 /* SourceLanguage-Unknown.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = "SourceLanguage-Unknown.cpp"; sourceTree = ""; }; - DE66EDBC08ABEC7300323D32 /* SourceLanguage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SourceLanguage.cpp; sourceTree = ""; }; - DE66EDC408ABEC9000323D32 /* ExecutionEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ExecutionEngine.cpp; sourceTree = ""; }; - DE66EDCE08ABEC9000323D32 /* Execution.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Execution.cpp; sourceTree = ""; }; - DE66EDCF08ABEC9000323D32 /* ExternalFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ExternalFunctions.cpp; sourceTree = ""; }; - DE66EDD008ABEC9000323D32 /* Interpreter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Interpreter.cpp; sourceTree = ""; }; - DE66EDD108ABEC9000323D32 /* Interpreter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Interpreter.h; sourceTree = ""; }; - DE66EDDE08ABEC9100323D32 /* Intercept.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Intercept.cpp; sourceTree = ""; }; - DE66EDDF08ABEC9100323D32 /* JIT.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JIT.cpp; sourceTree = ""; }; - DE66EDE008ABEC9100323D32 /* JIT.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JIT.h; sourceTree = ""; }; - DE66EDE108ABEC9100323D32 /* JITEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JITEmitter.cpp; sourceTree = ""; }; - DE66EDE308ABEC9100323D32 /* TargetSelect.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TargetSelect.cpp; sourceTree = ""; }; - DE66EDF608ABEDD300323D32 /* LinkArchives.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LinkArchives.cpp; sourceTree = ""; }; - DE66EDF708ABEDD300323D32 /* Linker.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Linker.cpp; sourceTree = ""; }; - DE66EDF808ABEDD300323D32 /* LinkItems.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LinkItems.cpp; sourceTree = ""; }; - DE66EDF908ABEDD300323D32 /* LinkModules.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LinkModules.cpp; sourceTree = ""; }; - DE66EDFC08ABEDE600323D32 /* Annotation.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Annotation.cpp; sourceTree = ""; }; - DE66EE1D08ABEDE600323D32 /* CommandLine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CommandLine.cpp; sourceTree = ""; }; - DE66EE3D08ABEDE600323D32 /* Debug.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Debug.cpp; sourceTree = ""; }; - DE66EE3E08ABEDE600323D32 /* FileUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FileUtilities.cpp; sourceTree = ""; }; - DE66EE3F08ABEDE600323D32 /* IsInf.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IsInf.cpp; sourceTree = ""; }; - DE66EE4008ABEDE600323D32 /* IsNAN.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IsNAN.cpp; sourceTree = ""; }; - DE66EE4208ABEDE600323D32 /* PluginLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PluginLoader.cpp; sourceTree = ""; }; - DE66EE4308ABEDE600323D32 /* SlowOperationInformer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SlowOperationInformer.cpp; sourceTree = ""; }; - DE66EE4408ABEDE600323D32 /* Statistic.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Statistic.cpp; sourceTree = ""; }; - DE66EE4508ABEDE700323D32 /* StringExtras.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = StringExtras.cpp; sourceTree = ""; }; - DE66EE4608ABEDE700323D32 /* SystemUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SystemUtils.cpp; sourceTree = ""; }; - DE66EE4708ABEDE700323D32 /* Timer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Timer.cpp; sourceTree = ""; }; - DE66EE6008ABEE3400323D32 /* DynamicLibrary.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DynamicLibrary.cpp; sourceTree = ""; }; - DE66EE6108ABEE3400323D32 /* LICENSE.TXT */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = LICENSE.TXT; sourceTree = ""; }; - DE66EE6508ABEE3400323D32 /* MappedFile.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MappedFile.cpp; sourceTree = ""; }; - DE66EE6608ABEE3400323D32 /* Memory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Memory.cpp; sourceTree = ""; }; - DE66EE6708ABEE3400323D32 /* Mutex.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Mutex.cpp; sourceTree = ""; }; - DE66EE6808ABEE3400323D32 /* Path.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Path.cpp; sourceTree = ""; }; - DE66EE6908ABEE3400323D32 /* Process.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Process.cpp; sourceTree = ""; }; - DE66EE6A08ABEE3400323D32 /* Program.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Program.cpp; sourceTree = ""; }; - DE66EE6B08ABEE3400323D32 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = README.txt; sourceTree = ""; }; - DE66EE7C08ABEE3400323D32 /* Signals.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Signals.cpp; sourceTree = ""; }; - DE66EE7D08ABEE3400323D32 /* TimeValue.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TimeValue.cpp; sourceTree = ""; }; - DE66EE7F08ABEE3500323D32 /* MappedFile.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = MappedFile.inc; sourceTree = ""; }; - DE66EE8008ABEE3500323D32 /* Memory.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Memory.inc; sourceTree = ""; }; - DE66EE8108ABEE3500323D32 /* Mutex.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Mutex.inc; sourceTree = ""; }; - DE66EE8208ABEE3500323D32 /* Path.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Path.inc; sourceTree = ""; }; - DE66EE8308ABEE3500323D32 /* Process.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Process.inc; sourceTree = ""; }; - DE66EE8408ABEE3500323D32 /* Program.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Program.inc; sourceTree = ""; }; - DE66EE8508ABEE3500323D32 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = README.txt; sourceTree = ""; }; - DE66EE8608ABEE3500323D32 /* Signals.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Signals.inc; sourceTree = ""; }; - DE66EE8908ABEE3500323D32 /* TimeValue.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = TimeValue.inc; sourceTree = ""; }; - DE66EE8A08ABEE3500323D32 /* Unix.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Unix.h; sourceTree = ""; }; - DE66EE8C08ABEE3500323D32 /* DynamicLibrary.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = DynamicLibrary.inc; sourceTree = ""; }; - DE66EE8D08ABEE3500323D32 /* MappedFile.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = MappedFile.inc; sourceTree = ""; }; - DE66EE8E08ABEE3500323D32 /* Memory.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Memory.inc; sourceTree = ""; }; - DE66EE8F08ABEE3500323D32 /* Mutex.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Mutex.inc; sourceTree = ""; }; - DE66EE9008ABEE3500323D32 /* Path.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Path.inc; sourceTree = ""; }; - DE66EE9108ABEE3500323D32 /* Process.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Process.inc; sourceTree = ""; }; - DE66EE9208ABEE3500323D32 /* Program.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Program.inc; sourceTree = ""; }; - DE66EE9308ABEE3500323D32 /* Signals.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Signals.inc; sourceTree = ""; }; - DE66EE9408ABEE3500323D32 /* TimeValue.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = TimeValue.inc; sourceTree = ""; }; - DE66EE9508ABEE3500323D32 /* Win32.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Win32.h; sourceTree = ""; }; - DE66EE9808ABEE5E00323D32 /* Alpha.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Alpha.h; sourceTree = ""; }; - DE66EE9908ABEE5E00323D32 /* Alpha.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Alpha.td; sourceTree = ""; }; - DE66EE9A08ABEE5E00323D32 /* AlphaAsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaAsmPrinter.cpp; sourceTree = ""; }; - DE66EE9B08ABEE5E00323D32 /* AlphaCodeEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaCodeEmitter.cpp; sourceTree = ""; }; - DE66EEA308ABEE5E00323D32 /* AlphaInstrFormats.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = AlphaInstrFormats.td; sourceTree = ""; }; - DE66EEA408ABEE5E00323D32 /* AlphaInstrInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaInstrInfo.cpp; sourceTree = ""; }; - DE66EEA508ABEE5E00323D32 /* AlphaInstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AlphaInstrInfo.h; sourceTree = ""; }; - DE66EEA608ABEE5E00323D32 /* AlphaInstrInfo.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = AlphaInstrInfo.td; sourceTree = ""; }; - DE66EEA908ABEE5E00323D32 /* AlphaJITInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaJITInfo.cpp; sourceTree = ""; }; - DE66EEAA08ABEE5E00323D32 /* AlphaJITInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AlphaJITInfo.h; sourceTree = ""; }; - DE66EEAB08ABEE5E00323D32 /* AlphaRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaRegisterInfo.cpp; sourceTree = ""; }; - DE66EEAC08ABEE5E00323D32 /* AlphaRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AlphaRegisterInfo.h; sourceTree = ""; }; - DE66EEAD08ABEE5E00323D32 /* AlphaRegisterInfo.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = AlphaRegisterInfo.td; sourceTree = ""; }; - DE66EEAE08ABEE5E00323D32 /* AlphaRelocations.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AlphaRelocations.h; sourceTree = ""; }; - DE66EEAF08ABEE5E00323D32 /* AlphaTargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaTargetMachine.cpp; sourceTree = ""; }; - DE66EEB008ABEE5E00323D32 /* AlphaTargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AlphaTargetMachine.h; sourceTree = ""; }; - DE66EECA08ABEE5E00323D32 /* CTargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CTargetMachine.h; sourceTree = ""; }; - DE66EF0E08ABEE5E00323D32 /* README */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = README; sourceTree = ""; }; - DE66EF1008ABEE5E00323D32 /* TargetRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TargetRegisterInfo.cpp; sourceTree = ""; }; - DE66F08A08ABEE6000323D32 /* Target.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Target.td; sourceTree = ""; }; - DE66F08B08ABEE6000323D32 /* TargetData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TargetData.cpp; sourceTree = ""; }; - DE66F08C08ABEE6000323D32 /* TargetFrameInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TargetFrameInfo.cpp; sourceTree = ""; }; - DE66F08D08ABEE6000323D32 /* TargetInstrInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TargetInstrInfo.cpp; sourceTree = ""; }; - DE66F08F08ABEE6000323D32 /* TargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TargetMachine.cpp; sourceTree = ""; }; - DE66F09008ABEE6000323D32 /* TargetMachineRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TargetMachineRegistry.cpp; sourceTree = ""; }; - DE66F09208ABEE6000323D32 /* TargetSubtarget.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TargetSubtarget.cpp; sourceTree = ""; }; - DE66F0BC08ABEE6000323D32 /* X86.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86.h; sourceTree = ""; }; - DE66F0BD08ABEE6000323D32 /* X86.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = X86.td; sourceTree = ""; }; - DE66F0BE08ABEE6000323D32 /* X86AsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86AsmPrinter.cpp; sourceTree = ""; }; - DE66F0BF08ABEE6000323D32 /* X86AsmPrinter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86AsmPrinter.h; sourceTree = ""; }; - DE66F0C008ABEE6000323D32 /* X86ATTAsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86ATTAsmPrinter.cpp; sourceTree = ""; }; - DE66F0C108ABEE6000323D32 /* X86ATTAsmPrinter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86ATTAsmPrinter.h; sourceTree = ""; }; - DE66F0C208ABEE6000323D32 /* X86CodeEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86CodeEmitter.cpp; sourceTree = ""; }; - DE66F0C408ABEE6000323D32 /* X86FloatingPoint.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86FloatingPoint.cpp; sourceTree = ""; }; - DE66F0CC08ABEE6000323D32 /* X86InstrBuilder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86InstrBuilder.h; sourceTree = ""; }; - DE66F0CD08ABEE6000323D32 /* X86InstrInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86InstrInfo.cpp; sourceTree = ""; }; - DE66F0CE08ABEE6000323D32 /* X86InstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86InstrInfo.h; sourceTree = ""; }; - DE66F0CF08ABEE6100323D32 /* X86InstrInfo.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = X86InstrInfo.td; sourceTree = ""; }; - DE66F0D008ABEE6100323D32 /* X86IntelAsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86IntelAsmPrinter.cpp; sourceTree = ""; }; - DE66F0D108ABEE6100323D32 /* X86IntelAsmPrinter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86IntelAsmPrinter.h; sourceTree = ""; }; - DE66F0D508ABEE6100323D32 /* X86JITInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86JITInfo.cpp; sourceTree = ""; }; - DE66F0D608ABEE6100323D32 /* X86JITInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86JITInfo.h; sourceTree = ""; }; - DE66F0D808ABEE6100323D32 /* X86RegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86RegisterInfo.cpp; sourceTree = ""; }; - DE66F0D908ABEE6100323D32 /* X86RegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86RegisterInfo.h; sourceTree = ""; }; - DE66F0DA08ABEE6100323D32 /* X86RegisterInfo.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = X86RegisterInfo.td; sourceTree = ""; }; - DE66F0DB08ABEE6100323D32 /* X86Relocations.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86Relocations.h; sourceTree = ""; }; - DE66F0DC08ABEE6100323D32 /* X86Subtarget.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86Subtarget.cpp; sourceTree = ""; }; - DE66F0DD08ABEE6100323D32 /* X86Subtarget.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86Subtarget.h; sourceTree = ""; }; - DE66F0DE08ABEE6100323D32 /* X86TargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86TargetMachine.cpp; sourceTree = ""; }; - DE66F0DF08ABEE6100323D32 /* X86TargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86TargetMachine.h; sourceTree = ""; }; - DE66F0EF08ABEFB300323D32 /* BlockProfiling.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BlockProfiling.cpp; sourceTree = ""; }; - DE66F0FE08ABEFB300323D32 /* EdgeProfiling.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = EdgeProfiling.cpp; sourceTree = ""; }; - DE66F11B08ABEFB300323D32 /* ProfilingUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ProfilingUtils.cpp; sourceTree = ""; }; - DE66F11C08ABEFB300323D32 /* ProfilingUtils.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ProfilingUtils.h; sourceTree = ""; }; - DE66F12008ABEFB300323D32 /* ArgumentPromotion.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ArgumentPromotion.cpp; sourceTree = ""; }; - DE66F12108ABEFB300323D32 /* ConstantMerge.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ConstantMerge.cpp; sourceTree = ""; }; - DE66F12208ABEFB300323D32 /* DeadArgumentElimination.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DeadArgumentElimination.cpp; sourceTree = ""; }; - DE66F12308ABEFB300323D32 /* DeadTypeElimination.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DeadTypeElimination.cpp; sourceTree = ""; }; - DE66F14C08ABEFB400323D32 /* GlobalDCE.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GlobalDCE.cpp; sourceTree = ""; }; - DE66F14D08ABEFB400323D32 /* GlobalOpt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GlobalOpt.cpp; sourceTree = ""; }; - DE66F14E08ABEFB400323D32 /* Inliner.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Inliner.cpp; sourceTree = ""; }; - DE66F15008ABEFB400323D32 /* InlineSimple.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = InlineSimple.cpp; sourceTree = ""; }; - DE66F15108ABEFB400323D32 /* Internalize.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Internalize.cpp; sourceTree = ""; }; - DE66F15208ABEFB400323D32 /* IPConstantPropagation.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IPConstantPropagation.cpp; sourceTree = ""; }; - DE66F15308ABEFB400323D32 /* LoopExtractor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LoopExtractor.cpp; sourceTree = ""; }; - DE66F15408ABEFB400323D32 /* LowerSetJmp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LowerSetJmp.cpp; sourceTree = ""; }; - DE66F15608ABEFB400323D32 /* PruneEH.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PruneEH.cpp; sourceTree = ""; }; - DE66F15708ABEFB400323D32 /* RaiseAllocations.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RaiseAllocations.cpp; sourceTree = ""; }; - DE66F15808ABEFB400323D32 /* SimplifyLibCalls.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SimplifyLibCalls.cpp; sourceTree = ""; }; - DE66F15908ABEFB400323D32 /* StripSymbols.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = StripSymbols.cpp; sourceTree = ""; }; - DE66F15E08ABEFB400323D32 /* ADCE.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ADCE.cpp; sourceTree = ""; }; - DE66F15F08ABEFB400323D32 /* BasicBlockPlacement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BasicBlockPlacement.cpp; sourceTree = ""; }; - DE66F16008ABEFB400323D32 /* CondPropagate.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CondPropagate.cpp; sourceTree = ""; }; - DE66F16108ABEFB400323D32 /* ConstantProp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ConstantProp.cpp; sourceTree = ""; }; - DE66F16308ABEFB400323D32 /* DCE.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DCE.cpp; sourceTree = ""; }; - DE66F16408ABEFB400323D32 /* DeadStoreElimination.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DeadStoreElimination.cpp; sourceTree = ""; }; - DE66F1A308ABEFB400323D32 /* GCSE.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GCSE.cpp; sourceTree = ""; }; - DE66F1A408ABEFB400323D32 /* IndVarSimplify.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IndVarSimplify.cpp; sourceTree = ""; }; - DE66F1A508ABEFB400323D32 /* InstructionCombining.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = InstructionCombining.cpp; sourceTree = ""; }; - DE66F1A608ABEFB400323D32 /* LICM.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LICM.cpp; sourceTree = ""; }; - DE66F1A808ABEFB400323D32 /* LoopStrengthReduce.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LoopStrengthReduce.cpp; sourceTree = ""; }; - DE66F1A908ABEFB400323D32 /* LoopUnroll.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LoopUnroll.cpp; sourceTree = ""; }; - DE66F1AA08ABEFB400323D32 /* LoopUnswitch.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LoopUnswitch.cpp; sourceTree = ""; }; - DE66F1B508ABEFB400323D32 /* Reassociate.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Reassociate.cpp; sourceTree = ""; }; - DE66F1B608ABEFB400323D32 /* ScalarReplAggregates.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ScalarReplAggregates.cpp; sourceTree = ""; }; - DE66F1B708ABEFB400323D32 /* SCCP.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SCCP.cpp; sourceTree = ""; }; - DE66F1B808ABEFB400323D32 /* SimplifyCFG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SimplifyCFG.cpp; sourceTree = ""; }; - DE66F1B908ABEFB400323D32 /* TailDuplication.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TailDuplication.cpp; sourceTree = ""; }; - DE66F1BA08ABEFB400323D32 /* TailRecursionElimination.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TailRecursionElimination.cpp; sourceTree = ""; }; - DE66F1BE08ABEFB400323D32 /* BasicBlockUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BasicBlockUtils.cpp; sourceTree = ""; }; - DE66F1BF08ABEFB400323D32 /* BreakCriticalEdges.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BreakCriticalEdges.cpp; sourceTree = ""; }; - DE66F1C008ABEFB400323D32 /* CloneFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CloneFunction.cpp; sourceTree = ""; }; - DE66F1C108ABEFB400323D32 /* CloneModule.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CloneModule.cpp; sourceTree = ""; }; - DE66F1C208ABEFB400323D32 /* CloneTrace.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CloneTrace.cpp; sourceTree = ""; }; - DE66F1C308ABEFB400323D32 /* CodeExtractor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CodeExtractor.cpp; sourceTree = ""; }; - DE66F1E008ABEFB400323D32 /* DemoteRegToStack.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DemoteRegToStack.cpp; sourceTree = ""; }; - DE66F1E108ABEFB400323D32 /* InlineFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = InlineFunction.cpp; sourceTree = ""; }; - DE66F1E208ABEFB400323D32 /* Local.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Local.cpp; sourceTree = ""; }; - DE66F1E408ABEFB400323D32 /* PromoteMemoryToRegister.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PromoteMemoryToRegister.cpp; sourceTree = ""; }; - DE66F1E508ABEFB400323D32 /* SimplifyCFG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SimplifyCFG.cpp; sourceTree = ""; }; - DE66F1E608ABEFB400323D32 /* UnifyFunctionExitNodes.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = UnifyFunctionExitNodes.cpp; sourceTree = ""; }; - DE66F1E708ABEFB400323D32 /* ValueMapper.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ValueMapper.cpp; sourceTree = ""; }; - DE66F1EA08ABF03100323D32 /* AbstractTypeUser.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AbstractTypeUser.h; sourceTree = ""; }; - DE66F1EE08ABF03100323D32 /* DenseMap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DenseMap.h; sourceTree = ""; }; - DE66F1EF08ABF03100323D32 /* DepthFirstIterator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DepthFirstIterator.h; sourceTree = ""; }; - DE66F1F008ABF03100323D32 /* EquivalenceClasses.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = EquivalenceClasses.h; sourceTree = ""; }; - DE66F1F108ABF03100323D32 /* GraphTraits.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GraphTraits.h; sourceTree = ""; }; - DE66F1F308ABF03100323D32 /* hash_map.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = hash_map.in; sourceTree = ""; }; - DE66F1F508ABF03100323D32 /* hash_set.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = hash_set.in; sourceTree = ""; }; - DE66F1F608ABF03100323D32 /* HashExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HashExtras.h; sourceTree = ""; }; - DE66F1F708ABF03100323D32 /* ilist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ilist; sourceTree = ""; }; - DE66F1F908ABF03100323D32 /* iterator.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = iterator.in; sourceTree = ""; }; - DE66F1FA08ABF03100323D32 /* PostOrderIterator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PostOrderIterator.h; sourceTree = ""; }; - DE66F1FB08ABF03100323D32 /* SCCIterator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SCCIterator.h; sourceTree = ""; }; - DE66F1FC08ABF03100323D32 /* SetOperations.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SetOperations.h; sourceTree = ""; }; - DE66F1FD08ABF03100323D32 /* SetVector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SetVector.h; sourceTree = ""; }; - DE66F1FE08ABF03100323D32 /* Statistic.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Statistic.h; sourceTree = ""; }; - DE66F1FF08ABF03100323D32 /* STLExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = STLExtras.h; sourceTree = ""; }; - DE66F20008ABF03100323D32 /* StringExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = StringExtras.h; sourceTree = ""; }; - DE66F20108ABF03100323D32 /* Tree.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Tree.h; sourceTree = ""; }; - DE66F20208ABF03100323D32 /* VectorExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = VectorExtras.h; sourceTree = ""; }; - DE66F20408ABF03100323D32 /* AliasAnalysis.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AliasAnalysis.h; sourceTree = ""; }; - DE66F20508ABF03100323D32 /* AliasSetTracker.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AliasSetTracker.h; sourceTree = ""; }; - DE66F20608ABF03100323D32 /* CallGraph.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CallGraph.h; sourceTree = ""; }; - DE66F20708ABF03100323D32 /* CFGPrinter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CFGPrinter.h; sourceTree = ""; }; - DE66F20808ABF03100323D32 /* ConstantsScanner.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ConstantsScanner.h; sourceTree = ""; }; - DE66F20F08ABF03100323D32 /* Dominators.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Dominators.h; sourceTree = ""; }; - DE66F21208ABF03100323D32 /* FindUsedTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FindUsedTypes.h; sourceTree = ""; }; - DE66F21308ABF03100323D32 /* Interval.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Interval.h; sourceTree = ""; }; - DE66F21408ABF03100323D32 /* IntervalIterator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IntervalIterator.h; sourceTree = ""; }; - DE66F21508ABF03100323D32 /* IntervalPartition.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IntervalPartition.h; sourceTree = ""; }; - DE66F21608ABF03100323D32 /* LoadValueNumbering.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = LoadValueNumbering.h; sourceTree = ""; }; - DE66F21708ABF03100323D32 /* LoopInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = LoopInfo.h; sourceTree = ""; }; - DE66F21808ABF03100323D32 /* Passes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Passes.h; sourceTree = ""; }; - DE66F21908ABF03100323D32 /* PostDominators.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PostDominators.h; sourceTree = ""; }; - DE66F21A08ABF03100323D32 /* ProfileInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ProfileInfo.h; sourceTree = ""; }; - DE66F21B08ABF03100323D32 /* ProfileInfoLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ProfileInfoLoader.h; sourceTree = ""; }; - DE66F21C08ABF03100323D32 /* ProfileInfoTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ProfileInfoTypes.h; sourceTree = ""; }; - DE66F21D08ABF03100323D32 /* ScalarEvolution.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ScalarEvolution.h; sourceTree = ""; }; - DE66F21E08ABF03100323D32 /* ScalarEvolutionExpander.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ScalarEvolutionExpander.h; sourceTree = ""; }; - DE66F21F08ABF03100323D32 /* ScalarEvolutionExpressions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ScalarEvolutionExpressions.h; sourceTree = ""; }; - DE66F22008ABF03100323D32 /* Trace.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Trace.h; sourceTree = ""; }; - DE66F22108ABF03100323D32 /* ValueNumbering.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ValueNumbering.h; sourceTree = ""; }; - DE66F22208ABF03100323D32 /* Verifier.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Verifier.h; sourceTree = ""; }; - DE66F22308ABF03100323D32 /* Argument.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Argument.h; sourceTree = ""; }; - DE66F22508ABF03100323D32 /* AsmAnnotationWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AsmAnnotationWriter.h; sourceTree = ""; }; - DE66F22708ABF03100323D32 /* Parser.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Parser.h; sourceTree = ""; }; - DE66F22808ABF03100323D32 /* PrintModulePass.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PrintModulePass.h; sourceTree = ""; }; - DE66F22908ABF03100323D32 /* Writer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Writer.h; sourceTree = ""; }; - DE66F22A08ABF03100323D32 /* BasicBlock.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = BasicBlock.h; sourceTree = ""; }; - DE66F23308ABF03100323D32 /* CallGraphSCCPass.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CallGraphSCCPass.h; sourceTree = ""; }; - DE66F23408ABF03100323D32 /* CallingConv.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CallingConv.h; sourceTree = ""; }; - DE66F23608ABF03100323D32 /* AsmPrinter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AsmPrinter.h; sourceTree = ""; }; - DE66F23908ABF03100323D32 /* IntrinsicLowering.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IntrinsicLowering.h; sourceTree = ""; }; - DE66F23A08ABF03100323D32 /* LiveVariables.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = LiveVariables.h; sourceTree = ""; }; - DE66F23B08ABF03100323D32 /* MachineBasicBlock.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachineBasicBlock.h; sourceTree = ""; }; - DE66F23C08ABF03100323D32 /* MachineCodeEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachineCodeEmitter.h; sourceTree = ""; }; - DE66F23D08ABF03100323D32 /* MachineConstantPool.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachineConstantPool.h; sourceTree = ""; }; - DE66F23E08ABF03100323D32 /* MachineFrameInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachineFrameInfo.h; sourceTree = ""; }; - DE66F23F08ABF03100323D32 /* MachineFunction.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachineFunction.h; sourceTree = ""; }; - DE66F24008ABF03100323D32 /* MachineFunctionPass.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachineFunctionPass.h; sourceTree = ""; }; - DE66F24108ABF03100323D32 /* MachineInstr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachineInstr.h; sourceTree = ""; }; - DE66F24208ABF03100323D32 /* MachineInstrBuilder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachineInstrBuilder.h; sourceTree = ""; }; - DE66F24308ABF03100323D32 /* MachineRelocation.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachineRelocation.h; sourceTree = ""; }; - DE66F24408ABF03100323D32 /* Passes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Passes.h; sourceTree = ""; }; - DE66F24508ABF03100323D32 /* SchedGraphCommon.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SchedGraphCommon.h; sourceTree = ""; }; - DE66F24608ABF03100323D32 /* SelectionDAG.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SelectionDAG.h; sourceTree = ""; }; - DE66F24708ABF03100323D32 /* SelectionDAGISel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SelectionDAGISel.h; sourceTree = ""; }; - DE66F24808ABF03100323D32 /* SelectionDAGNodes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SelectionDAGNodes.h; sourceTree = ""; }; - DE66F24B08ABF03100323D32 /* ValueTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ValueTypes.h; sourceTree = ""; }; - DE66F24E08ABF03100323D32 /* alloca.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = alloca.h; sourceTree = ""; }; - DE66F25008ABF03100323D32 /* config.h.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = config.h.in; sourceTree = ""; }; - DE66F25108ABF03100323D32 /* Constant.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Constant.h; sourceTree = ""; }; - DE66F25208ABF03100323D32 /* Constants.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Constants.h; sourceTree = ""; }; - DE66F25408ABF03100323D32 /* Debugger.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Debugger.h; sourceTree = ""; }; - DE66F25508ABF03100323D32 /* InferiorProcess.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = InferiorProcess.h; sourceTree = ""; }; - DE66F25608ABF03100323D32 /* ProgramInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ProgramInfo.h; sourceTree = ""; }; - DE66F25708ABF03100323D32 /* RuntimeInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RuntimeInfo.h; sourceTree = ""; }; - DE66F25808ABF03100323D32 /* SourceFile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SourceFile.h; sourceTree = ""; }; - DE66F25908ABF03100323D32 /* SourceLanguage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SourceLanguage.h; sourceTree = ""; }; - DE66F25A08ABF03100323D32 /* DerivedTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DerivedTypes.h; sourceTree = ""; }; - DE66F25C08ABF03100323D32 /* ExecutionEngine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ExecutionEngine.h; sourceTree = ""; }; - DE66F25D08ABF03100323D32 /* GenericValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GenericValue.h; sourceTree = ""; }; - DE66F25E08ABF03100323D32 /* Function.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Function.h; sourceTree = ""; }; - DE66F25F08ABF03100323D32 /* GlobalValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GlobalValue.h; sourceTree = ""; }; - DE66F26008ABF03100323D32 /* GlobalVariable.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GlobalVariable.h; sourceTree = ""; }; - DE66F26108ABF03100323D32 /* InstrTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = InstrTypes.h; sourceTree = ""; }; - DE66F26208ABF03100323D32 /* Instruction.def */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Instruction.def; sourceTree = ""; }; - DE66F26308ABF03100323D32 /* Instruction.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Instruction.h; sourceTree = ""; }; - DE66F26408ABF03100323D32 /* Instructions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Instructions.h; sourceTree = ""; }; - DE66F26508ABF03100323D32 /* IntrinsicInst.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IntrinsicInst.h; sourceTree = ""; }; - DE66F26608ABF03100323D32 /* Intrinsics.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Intrinsics.h; sourceTree = ""; }; - DE66F26708ABF03100323D32 /* Linker.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Linker.h; sourceTree = ""; }; - DE66F26808ABF03100323D32 /* Module.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Module.h; sourceTree = ""; }; - DE66F26908ABF03200323D32 /* ModuleProvider.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ModuleProvider.h; sourceTree = ""; }; - DE66F26A08ABF03200323D32 /* Pass.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Pass.h; sourceTree = ""; }; - DE66F26B08ABF03200323D32 /* PassAnalysisSupport.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PassAnalysisSupport.h; sourceTree = ""; }; - DE66F26C08ABF03200323D32 /* PassManager.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PassManager.h; sourceTree = ""; }; - DE66F26D08ABF03200323D32 /* PassSupport.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PassSupport.h; sourceTree = ""; }; - DE66F27008ABF03200323D32 /* AIXDataTypesFix.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AIXDataTypesFix.h; sourceTree = ""; }; - DE66F27108ABF03200323D32 /* Annotation.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Annotation.h; sourceTree = ""; }; - DE66F27208ABF03200323D32 /* CallSite.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CallSite.h; sourceTree = ""; }; - DE66F27308ABF03200323D32 /* Casting.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Casting.h; sourceTree = ""; }; - DE66F27408ABF03200323D32 /* CFG.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CFG.h; sourceTree = ""; }; - DE66F27508ABF03200323D32 /* CommandLine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CommandLine.h; sourceTree = ""; }; - DE66F27708ABF03200323D32 /* ConstantRange.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ConstantRange.h; sourceTree = ""; }; - DE66F27908ABF03200323D32 /* DataTypes.h.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = DataTypes.h.in; sourceTree = ""; }; - DE66F27A08ABF03200323D32 /* Debug.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Debug.h; sourceTree = ""; }; - DE66F27B08ABF03200323D32 /* DOTGraphTraits.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOTGraphTraits.h; sourceTree = ""; }; - DE66F27C08ABF03200323D32 /* DynamicLinker.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DynamicLinker.h; sourceTree = ""; }; - DE66F27D08ABF03200323D32 /* ELF.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ELF.h; sourceTree = ""; }; - DE66F27E08ABF03200323D32 /* FileUtilities.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FileUtilities.h; sourceTree = ""; }; - DE66F27F08ABF03200323D32 /* GetElementPtrTypeIterator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GetElementPtrTypeIterator.h; sourceTree = ""; }; - DE66F28008ABF03200323D32 /* GraphWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GraphWriter.h; sourceTree = ""; }; - DE66F28108ABF03200323D32 /* InstIterator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = InstIterator.h; sourceTree = ""; }; - DE66F28208ABF03200323D32 /* InstVisitor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = InstVisitor.h; sourceTree = ""; }; - DE66F28308ABF03200323D32 /* LeakDetector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = LeakDetector.h; sourceTree = ""; }; - DE66F28408ABF03200323D32 /* Mangler.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Mangler.h; sourceTree = ""; }; - DE66F28508ABF03200323D32 /* MathExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MathExtras.h; sourceTree = ""; }; - DE66F28608ABF03200323D32 /* MutexGuard.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MutexGuard.h; sourceTree = ""; }; - DE66F28708ABF03200323D32 /* PassNameParser.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PassNameParser.h; sourceTree = ""; }; - DE66F28808ABF03200323D32 /* PatternMatch.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PatternMatch.h; sourceTree = ""; }; - DE66F28908ABF03200323D32 /* PluginLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PluginLoader.h; sourceTree = ""; }; - DE66F28A08ABF03200323D32 /* SlowOperationInformer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SlowOperationInformer.h; sourceTree = ""; }; - DE66F28B08ABF03200323D32 /* StableBasicBlockNumbering.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = StableBasicBlockNumbering.h; sourceTree = ""; }; - DE66F28C08ABF03200323D32 /* SystemUtils.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SystemUtils.h; sourceTree = ""; }; - DE66F28E08ABF03200323D32 /* Timer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Timer.h; sourceTree = ""; }; - DE66F29008ABF03200323D32 /* type_traits.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = type_traits.h; sourceTree = ""; }; - DE66F29308ABF03200323D32 /* SymbolTableListTraits.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SymbolTableListTraits.h; sourceTree = ""; }; - DE66F29508ABF03200323D32 /* DynamicLibrary.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DynamicLibrary.h; sourceTree = ""; }; - DE66F29608ABF03200323D32 /* LICENSE.TXT */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = LICENSE.TXT; sourceTree = ""; }; - DE66F29708ABF03200323D32 /* MappedFile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MappedFile.h; sourceTree = ""; }; - DE66F29808ABF03200323D32 /* Memory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Memory.h; sourceTree = ""; }; - DE66F29908ABF03200323D32 /* Mutex.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Mutex.h; sourceTree = ""; }; - DE66F29A08ABF03200323D32 /* Path.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Path.h; sourceTree = ""; }; - DE66F29B08ABF03200323D32 /* Process.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Process.h; sourceTree = ""; }; - DE66F29C08ABF03200323D32 /* Program.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Program.h; sourceTree = ""; }; - DE66F29D08ABF03200323D32 /* Signals.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Signals.h; sourceTree = ""; }; - DE66F29E08ABF03200323D32 /* TimeValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TimeValue.h; sourceTree = ""; }; - DE66F2A008ABF03200323D32 /* TargetRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetRegisterInfo.h; sourceTree = ""; }; - DE66F2A108ABF03200323D32 /* TargetData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetData.h; sourceTree = ""; }; - DE66F2A208ABF03200323D32 /* TargetFrameInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetFrameInfo.h; sourceTree = ""; }; - DE66F2A308ABF03200323D32 /* TargetInstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetInstrInfo.h; sourceTree = ""; }; - DE66F2A408ABF03200323D32 /* TargetJITInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetJITInfo.h; sourceTree = ""; }; - DE66F2A508ABF03200323D32 /* TargetLowering.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetLowering.h; sourceTree = ""; }; - DE66F2A608ABF03200323D32 /* TargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetMachine.h; sourceTree = ""; }; - DE66F2A708ABF03200323D32 /* TargetMachineRegistry.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetMachineRegistry.h; sourceTree = ""; }; - DE66F2A808ABF03200323D32 /* TargetOptions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetOptions.h; sourceTree = ""; }; - DE66F2AA08ABF03200323D32 /* TargetSubtarget.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetSubtarget.h; sourceTree = ""; }; - DE66F2AC08ABF03200323D32 /* Instrumentation.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Instrumentation.h; sourceTree = ""; }; - DE66F2AD08ABF03200323D32 /* IPO.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IPO.h; sourceTree = ""; }; - DE66F2AF08ABF03200323D32 /* Scalar.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Scalar.h; sourceTree = ""; }; - DE66F2B108ABF03200323D32 /* BasicBlockUtils.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = BasicBlockUtils.h; sourceTree = ""; }; - DE66F2B208ABF03200323D32 /* Cloning.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Cloning.h; sourceTree = ""; }; - DE66F2B308ABF03200323D32 /* FunctionUtils.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FunctionUtils.h; sourceTree = ""; }; - DE66F2B408ABF03200323D32 /* Local.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Local.h; sourceTree = ""; }; - DE66F2B508ABF03200323D32 /* PromoteMemToReg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PromoteMemToReg.h; sourceTree = ""; }; - DE66F2B608ABF03200323D32 /* UnifyFunctionExitNodes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = UnifyFunctionExitNodes.h; sourceTree = ""; }; - DE66F2B708ABF03200323D32 /* Type.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Type.h; sourceTree = ""; }; - DE66F2B808ABF03200323D32 /* Use.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Use.h; sourceTree = ""; }; - DE66F2B908ABF03200323D32 /* User.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = User.h; sourceTree = ""; }; - DE66F2BA08ABF03200323D32 /* Value.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Value.h; sourceTree = ""; }; - DE66F2CC08ABF14400323D32 /* BugDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BugDriver.cpp; sourceTree = ""; }; - DE66F2CD08ABF14400323D32 /* BugDriver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = BugDriver.h; sourceTree = ""; }; - DE66F2CE08ABF14400323D32 /* bugpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = bugpoint.cpp; sourceTree = ""; }; - DE66F2CF08ABF14400323D32 /* CrashDebugger.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CrashDebugger.cpp; sourceTree = ""; }; - DE66F2E208ABF14400323D32 /* ExecutionDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ExecutionDriver.cpp; sourceTree = ""; }; - DE66F2E308ABF14400323D32 /* ExtractFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ExtractFunction.cpp; sourceTree = ""; }; - DE66F2E408ABF14400323D32 /* ListReducer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ListReducer.h; sourceTree = ""; }; - DE66F2E608ABF14400323D32 /* Miscompilation.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Miscompilation.cpp; sourceTree = ""; }; - DE66F2E708ABF14400323D32 /* OptimizerDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = OptimizerDriver.cpp; sourceTree = ""; }; - DE66F2E808ABF14400323D32 /* TestPasses.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TestPasses.cpp; sourceTree = ""; }; - DE66F30008ABF14400323D32 /* llc.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = llc.cpp; path = llc/llc.cpp; sourceTree = ""; }; - DE66F30708ABF14400323D32 /* lli.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = lli.cpp; path = lli/lli.cpp; sourceTree = ""; }; - DE66F30E08ABF14400323D32 /* llvm-ar.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = "llvm-ar.cpp"; path = "llvm-ar/llvm-ar.cpp"; sourceTree = ""; }; - DE66F31508ABF14400323D32 /* llvm-as.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = "llvm-as.cpp"; path = "llvm-as/llvm-as.cpp"; sourceTree = ""; }; - DE66F31C08ABF14400323D32 /* llvm-bcanalyzer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = "llvm-bcanalyzer.cpp"; path = "llvm-bcanalyzer/llvm-bcanalyzer.cpp"; sourceTree = ""; }; - DE66F31F08ABF14400323D32 /* CLICommand.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CLICommand.h; sourceTree = ""; }; - DE66F32008ABF14400323D32 /* CLIDebugger.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CLIDebugger.cpp; sourceTree = ""; }; - DE66F32108ABF14400323D32 /* CLIDebugger.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CLIDebugger.h; sourceTree = ""; }; - DE66F32208ABF14400323D32 /* Commands.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Commands.cpp; sourceTree = ""; }; - DE66F32B08ABF14400323D32 /* llvm-db.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = "llvm-db.cpp"; sourceTree = ""; }; - DE66F33208ABF14400323D32 /* llvm-dis.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = "llvm-dis.cpp"; path = "llvm-dis/llvm-dis.cpp"; sourceTree = ""; }; - DE66F33908ABF14400323D32 /* llvm-extract.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = "llvm-extract.cpp"; path = "llvm-extract/llvm-extract.cpp"; sourceTree = ""; }; - DE66F34208ABF14400323D32 /* llvm-ld.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = "llvm-ld.cpp"; sourceTree = ""; }; - DE66F34408ABF14400323D32 /* Optimize.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Optimize.cpp; sourceTree = ""; }; - DE66F34A08ABF14400323D32 /* llvm-link.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = "llvm-link.cpp"; path = "llvm-link/llvm-link.cpp"; sourceTree = ""; }; - DE66F35108ABF14400323D32 /* llvm-nm.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = "llvm-nm.cpp"; path = "llvm-nm/llvm-nm.cpp"; sourceTree = ""; }; - DE66F35808ABF14500323D32 /* llvm-prof.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = "llvm-prof.cpp"; path = "llvm-prof/llvm-prof.cpp"; sourceTree = ""; }; - DE66F35F08ABF14500323D32 /* llvm-ranlib.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = "llvm-ranlib.cpp"; path = "llvm-ranlib/llvm-ranlib.cpp"; sourceTree = ""; }; - DE66F36908ABF14500323D32 /* c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = c; sourceTree = ""; }; - DE66F36A08ABF14500323D32 /* CompilerDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CompilerDriver.cpp; sourceTree = ""; }; - DE66F36B08ABF14500323D32 /* CompilerDriver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CompilerDriver.h; sourceTree = ""; }; - DE66F36D08ABF14500323D32 /* ConfigLexer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ConfigLexer.h; sourceTree = ""; }; - DE66F36E08ABF14500323D32 /* ConfigLexer.l */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.lex; path = ConfigLexer.l; sourceTree = ""; }; - DE66F36F08ABF14500323D32 /* Configuration.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Configuration.cpp; sourceTree = ""; }; - DE66F37008ABF14500323D32 /* Configuration.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Configuration.h; sourceTree = ""; }; - DE66F37108ABF14500323D32 /* cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = cpp; sourceTree = ""; }; - DE66F37D08ABF14500323D32 /* ll */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ll; sourceTree = ""; }; - DE66F37E08ABF14500323D32 /* llvmc.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llvmc.cpp; sourceTree = ""; }; - DE66F38C08ABF35300323D32 /* CREDITS.TXT */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = CREDITS.TXT; path = ../CREDITS.TXT; sourceTree = SOURCE_ROOT; }; - DE66F38F08ABF35C00323D32 /* AliasAnalysis.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = AliasAnalysis.html; sourceTree = ""; }; - DE66F39008ABF35C00323D32 /* Bugpoint.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = Bugpoint.html; sourceTree = ""; }; - DE66F39208ABF35C00323D32 /* GCCFEBuildInstrs.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = GCCFEBuildInstrs.html; sourceTree = ""; }; - DE66F39308ABF35C00323D32 /* CodeGenerator.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = CodeGenerator.html; sourceTree = ""; }; - DE66F39408ABF35C00323D32 /* CodingStandards.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = CodingStandards.html; sourceTree = ""; }; - DE66F39808ABF35C00323D32 /* bugpoint.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = bugpoint.pod; sourceTree = ""; }; - DE66F39E08ABF35C00323D32 /* index.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = index.html; sourceTree = ""; }; - DE66F39F08ABF35C00323D32 /* llc.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = llc.pod; sourceTree = ""; }; - DE66F3A008ABF35C00323D32 /* lli.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = lli.pod; sourceTree = ""; }; - DE66F3A108ABF35C00323D32 /* llvm-ar.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-ar.pod"; sourceTree = ""; }; - DE66F3A208ABF35C00323D32 /* llvm-as.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-as.pod"; sourceTree = ""; }; - DE66F3A308ABF35C00323D32 /* llvm-bcanalyzer.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-bcanalyzer.pod"; sourceTree = ""; }; - DE66F3A408ABF35C00323D32 /* llvm-db.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-db.pod"; sourceTree = ""; }; - DE66F3A508ABF35C00323D32 /* llvm-dis.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-dis.pod"; sourceTree = ""; }; - DE66F3A608ABF35C00323D32 /* llvm-extract.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-extract.pod"; sourceTree = ""; }; - DE66F3A708ABF35C00323D32 /* llvm-ld.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-ld.pod"; sourceTree = ""; }; - DE66F3A808ABF35C00323D32 /* llvm-link.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-link.pod"; sourceTree = ""; }; - DE66F3A908ABF35C00323D32 /* llvm-nm.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-nm.pod"; sourceTree = ""; }; - DE66F3AA08ABF35C00323D32 /* llvm-prof.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-prof.pod"; sourceTree = ""; }; - DE66F3AB08ABF35C00323D32 /* llvm-ranlib.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-ranlib.pod"; sourceTree = ""; }; - DE66F3AC08ABF35C00323D32 /* llvmc.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = llvmc.pod; sourceTree = ""; }; - DE66F3AD08ABF35C00323D32 /* llvmgcc.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = llvmgcc.pod; sourceTree = ""; }; - DE66F3AE08ABF35C00323D32 /* llvmgxx.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = llvmgxx.pod; sourceTree = ""; }; - DE66F3AF08ABF35C00323D32 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; - DE66F3B408ABF35D00323D32 /* manpage.css */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = manpage.css; sourceTree = ""; }; - DE66F3B508ABF35D00323D32 /* opt.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = opt.pod; sourceTree = ""; }; - DE66F3B808ABF35D00323D32 /* stkrc.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = stkrc.pod; sourceTree = ""; }; - DE66F3B908ABF35D00323D32 /* CommandLine.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = CommandLine.html; sourceTree = ""; }; - DE66F3BA08ABF35D00323D32 /* CompilerDriver.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = CompilerDriver.html; sourceTree = ""; }; - DE66F3BB08ABF35D00323D32 /* CompilerWriterInfo.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = CompilerWriterInfo.html; sourceTree = ""; }; - DE66F3BD08ABF35D00323D32 /* doxygen.cfg.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = doxygen.cfg.in; sourceTree = ""; }; - DE66F3BE08ABF35D00323D32 /* doxygen.css */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = doxygen.css; sourceTree = ""; }; - DE66F3BF08ABF35D00323D32 /* doxygen.footer */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = doxygen.footer; sourceTree = ""; }; - DE66F3C008ABF35D00323D32 /* doxygen.header */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = doxygen.header; sourceTree = ""; }; - DE66F3C108ABF35D00323D32 /* doxygen.intro */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = doxygen.intro; sourceTree = ""; }; - DE66F3C208ABF35D00323D32 /* ExtendingLLVM.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = ExtendingLLVM.html; sourceTree = ""; }; - DE66F3C308ABF35D00323D32 /* FAQ.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = FAQ.html; sourceTree = ""; }; - DE66F3C408ABF35D00323D32 /* GarbageCollection.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = GarbageCollection.html; sourceTree = ""; }; - DE66F3C508ABF35D00323D32 /* GettingStarted.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = GettingStarted.html; sourceTree = ""; }; - DE66F3C608ABF35D00323D32 /* GettingStartedVS.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = GettingStartedVS.html; sourceTree = ""; }; - DE66F3E408ABF35D00323D32 /* HowToSubmitABug.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = HowToSubmitABug.html; sourceTree = ""; }; - DE66F3E608ABF35D00323D32 /* Debugging.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = Debugging.gif; sourceTree = ""; }; - DE66F3E708ABF35D00323D32 /* libdeps.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = libdeps.gif; sourceTree = ""; }; - DE66F3E808ABF35D00323D32 /* lines.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = lines.gif; sourceTree = ""; }; - DE66F3E908ABF35D00323D32 /* objdeps.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = objdeps.gif; sourceTree = ""; }; - DE66F3EA08ABF35D00323D32 /* venusflytrap.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = venusflytrap.jpg; sourceTree = ""; }; - DE66F3EB08ABF35D00323D32 /* index.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = index.html; sourceTree = ""; }; - DE66F3EC08ABF35D00323D32 /* LangRef.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = LangRef.html; sourceTree = ""; }; - DE66F3ED08ABF35D00323D32 /* Lexicon.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = Lexicon.html; sourceTree = ""; }; - DE66F3EE08ABF35D00323D32 /* llvm.css */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = llvm.css; sourceTree = ""; }; - DE66F3F108ABF35D00323D32 /* MakefileGuide.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = MakefileGuide.html; sourceTree = ""; }; - DE66F3F208ABF35D00323D32 /* ProgrammersManual.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = ProgrammersManual.html; sourceTree = ""; }; - DE66F3F308ABF35D00323D32 /* Projects.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = Projects.html; sourceTree = ""; }; - DE66F3F408ABF35D00323D32 /* ReleaseNotes.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = ReleaseNotes.html; sourceTree = ""; }; - DE66F3F508ABF35D00323D32 /* SourceLevelDebugging.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = SourceLevelDebugging.html; sourceTree = ""; }; - DE66F3F708ABF35D00323D32 /* SystemLibrary.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = SystemLibrary.html; sourceTree = ""; }; - DE66F3F808ABF35D00323D32 /* TableGenFundamentals.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = TableGenFundamentals.html; sourceTree = ""; }; - DE66F3F908ABF35D00323D32 /* TestingGuide.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = TestingGuide.html; sourceTree = ""; }; - DE66F3FA08ABF35D00323D32 /* UsingLibraries.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = UsingLibraries.html; sourceTree = ""; }; - DE66F3FB08ABF35D00323D32 /* WritingAnLLVMBackend.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = WritingAnLLVMBackend.html; sourceTree = ""; }; - DE66F3FC08ABF35D00323D32 /* WritingAnLLVMPass.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = WritingAnLLVMPass.html; sourceTree = ""; }; - DE66F40E08ABF37000323D32 /* fibonacci.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = fibonacci.cpp; path = Fibonacci/fibonacci.cpp; sourceTree = ""; }; - DE66F41508ABF37000323D32 /* HowToUseJIT.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = HowToUseJIT.cpp; path = HowToUseJIT/HowToUseJIT.cpp; sourceTree = ""; }; - DE66F41E08ABF37000323D32 /* ModuleMaker.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ModuleMaker.cpp; path = ModuleMaker/ModuleMaker.cpp; sourceTree = ""; }; - DE66F42608ABF37000323D32 /* ParallelJIT.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ParallelJIT.cpp; path = ParallelJIT/ParallelJIT.cpp; sourceTree = ""; }; - DE694D9F08B51E0C0039C106 /* ScheduleDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ScheduleDAG.cpp; sourceTree = ""; }; - DE81704008CFB44D0093BDEF /* fpcmp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = fpcmp.cpp; path = fpcmp/fpcmp.cpp; sourceTree = ""; }; - DE81704F08CFB44D0093BDEF /* NightlyTest.gnuplot */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = NightlyTest.gnuplot; sourceTree = ""; }; - DE81705108CFB44D0093BDEF /* NightlyTestTemplate.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = NightlyTestTemplate.html; sourceTree = ""; }; - DE81705908CFB44D0093BDEF /* AsmWriterEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AsmWriterEmitter.cpp; sourceTree = ""; }; - DE81705A08CFB44D0093BDEF /* AsmWriterEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AsmWriterEmitter.h; sourceTree = ""; }; - DE81705B08CFB44D0093BDEF /* CodeEmitterGen.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CodeEmitterGen.cpp; sourceTree = ""; }; - DE81705C08CFB44D0093BDEF /* CodeEmitterGen.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CodeEmitterGen.h; sourceTree = ""; }; - DE81705D08CFB44D0093BDEF /* CodeGenInstruction.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CodeGenInstruction.h; sourceTree = ""; }; - DE81705E08CFB44D0093BDEF /* CodeGenRegisters.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CodeGenRegisters.h; sourceTree = ""; }; - DE81705F08CFB44D0093BDEF /* CodeGenTarget.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CodeGenTarget.cpp; sourceTree = ""; }; - DE81706008CFB44D0093BDEF /* CodeGenTarget.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CodeGenTarget.h; sourceTree = ""; }; - DE81706708CFB44D0093BDEF /* DAGISelEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DAGISelEmitter.cpp; sourceTree = ""; }; - DE81706808CFB44D0093BDEF /* DAGISelEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DAGISelEmitter.h; sourceTree = ""; }; - DE81708908CFB44D0093BDEF /* InstrInfoEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = InstrInfoEmitter.cpp; sourceTree = ""; }; - DE81708A08CFB44D0093BDEF /* InstrInfoEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = InstrInfoEmitter.h; sourceTree = ""; }; - DE81708E08CFB44D0093BDEF /* Record.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Record.cpp; sourceTree = ""; }; - DE81708F08CFB44D0093BDEF /* Record.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Record.h; sourceTree = ""; }; - DE81709008CFB44D0093BDEF /* RegisterInfoEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterInfoEmitter.cpp; sourceTree = ""; }; - DE81709108CFB44D0093BDEF /* RegisterInfoEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RegisterInfoEmitter.h; sourceTree = ""; }; - DE8170AA08CFB44D0093BDEF /* TableGen.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TableGen.cpp; sourceTree = ""; }; - DE8170AB08CFB44D0093BDEF /* TableGenBackend.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TableGenBackend.cpp; sourceTree = ""; }; - DE8170AC08CFB44D0093BDEF /* TableGenBackend.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TableGenBackend.h; sourceTree = ""; }; - DEFAB19D0959E9A100E0AB42 /* DwarfWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = DwarfWriter.h; path = ../include/llvm/CodeGen/DwarfWriter.h; sourceTree = SOURCE_ROOT; }; - F22627320DAE34D10008F441 /* index.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = index.html; sourceTree = ""; }; - F22627330DAE34D20008F441 /* JITTutorial1.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = JITTutorial1.html; sourceTree = ""; }; - F22627340DAE34D20008F441 /* JITTutorial2-1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "JITTutorial2-1.png"; sourceTree = ""; }; - F22627350DAE34D20008F441 /* JITTutorial2.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = JITTutorial2.html; sourceTree = ""; }; - F22627360DAE34D20008F441 /* LangImpl1.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = LangImpl1.html; sourceTree = ""; }; - F22627370DAE34D20008F441 /* LangImpl2.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = LangImpl2.html; sourceTree = ""; }; - F22627380DAE34D20008F441 /* LangImpl3.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = LangImpl3.html; sourceTree = ""; }; - F22627390DAE34D20008F441 /* LangImpl4.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = LangImpl4.html; sourceTree = ""; }; - F226273A0DAE34D20008F441 /* LangImpl5-cfg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "LangImpl5-cfg.png"; sourceTree = ""; }; - F226273B0DAE34D20008F441 /* LangImpl5.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = LangImpl5.html; sourceTree = ""; }; - F226273C0DAE34D20008F441 /* LangImpl6.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = LangImpl6.html; sourceTree = ""; }; - F226273D0DAE34D20008F441 /* LangImpl7.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = LangImpl7.html; sourceTree = ""; }; - F226273E0DAE34D20008F441 /* LangImpl8.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = LangImpl8.html; sourceTree = ""; }; - F226273F0DAE34D20008F441 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; - F22627400DAE34D20008F441 /* OCamlLangImpl1.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = OCamlLangImpl1.html; sourceTree = ""; }; - F22627410DAE34D20008F441 /* OCamlLangImpl2.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = OCamlLangImpl2.html; sourceTree = ""; }; - F22627420DAE34D20008F441 /* OCamlLangImpl3.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = OCamlLangImpl3.html; sourceTree = ""; }; - F22627430DAE34D20008F441 /* OCamlLangImpl4.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = OCamlLangImpl4.html; sourceTree = ""; }; - F22627440DAE34D20008F441 /* OCamlLangImpl5.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = OCamlLangImpl5.html; sourceTree = ""; }; - F22627450DAE34D20008F441 /* OCamlLangImpl6.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = OCamlLangImpl6.html; sourceTree = ""; }; - F22627460DAE34D20008F441 /* OCamlLangImpl7.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = OCamlLangImpl7.html; sourceTree = ""; }; - F22761DF0DAD09CD003D8065 /* BrainF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BrainF.cpp; path = BrainF/BrainF.cpp; sourceTree = ""; }; - F22761E00DAD09CD003D8065 /* BrainF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BrainF.h; path = BrainF/BrainF.h; sourceTree = ""; }; - F22761E10DAD09CD003D8065 /* BrainFDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BrainFDriver.cpp; path = BrainF/BrainFDriver.cpp; sourceTree = ""; }; - F27C8CE90DAD2EF900A33844 /* IRBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IRBuilder.h; sourceTree = ""; }; - F27C8CFF0DAD307700A33844 /* ShadowStackCollector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ShadowStackCollector.cpp; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXGroup section */ - 08FB7794FE84155DC02AAC07 /* LLVM */ = { - isa = PBXGroup; - children = ( - DE66F1E908ABF03100323D32 /* include/llvm */, - CF8F1B480B64F7AB00BB4199 /* include/llvm-c */, - DE66ECBD08ABEC0700323D32 /* lib/Analysis */, - 9FE450DE0C77ABE400C4FEA4 /* lib/Archive */, - DE66EC8808ABEAC900323D32 /* lib/AsmParser */, - 9F68EB030C77AD2C004AA152 /* lib/Bitcode */, - DE66ED3E08ABEC2A00323D32 /* lib/CodeGen */, - DE66ED9A08ABEC7200323D32 /* lib/Debugger */, - DE66EDBF08ABEC8F00323D32 /* lib/ExecutionEngine */, - DE66EDEB08ABEDD300323D32 /* lib/Linker */, - DE66EDFB08ABEDE600323D32 /* lib/Support */, - DE66EE4908ABEE3400323D32 /* lib/System */, - DE66EE9608ABEE5D00323D32 /* lib/Target */, - DE66F0E108ABEFB300323D32 /* lib/Transforms */, - DE66EC7508ABE8EF00323D32 /* lib/VMCore */, - DE66F2BD08ABF14400323D32 /* tools */, - DE816FAC08CFB44C0093BDEF /* utils */, - DE66F38D08ABF35C00323D32 /* docs */, - 9FD3E56D0CA0116100E54D15 /* bindings */, - 9F7C2B690CB9496B00498408 /* test */, - DE66F3FD08ABF37000323D32 /* examples */, - DE66F38C08ABF35300323D32 /* CREDITS.TXT */, - CFD99AA80AFE827B0068D19C /* LICENSE.TXT */, - CFD99AAD0AFE827B0068D19C /* README.txt */, - 721CA1750D0B44D200D5004F /* Products */, - ); - name = LLVM; - sourceTree = ""; - }; - 721CA1750D0B44D200D5004F /* Products */ = { - isa = PBXGroup; - children = ( - ); - name = Products; - sourceTree = ""; - }; - 9F4B0E5D0D0E02580061F270 /* bitreader */ = { - isa = PBXGroup; - children = ( - 9F4B0E5E0D0E02580061F270 /* bitreader_ocaml.c */, - 9F4B0E5F0D0E02580061F270 /* llvm_bitreader.ml */, - 9F4B0E600D0E02580061F270 /* llvm_bitreader.mli */, - ); - path = bitreader; - sourceTree = ""; - }; - 9F502ACD0D1D8CA3007939DF /* executionengine */ = { - isa = PBXGroup; - children = ( - 9F502ADB0D1D8CA3007939DF /* executionengine_ocaml.c */, - 9F502ADC0D1D8CA3007939DF /* llvm_executionengine.ml */, - 9F502ADD0D1D8CA3007939DF /* llvm_executionengine.mli */, - ); - path = executionengine; - sourceTree = ""; - }; - 9F68EB030C77AD2C004AA152 /* lib/Bitcode */ = { - isa = PBXGroup; - children = ( - 9F68EB050C77AD2C004AA152 /* Reader */, - 9F68EB110C77AD2C004AA152 /* Writer */, - ); - name = lib/Bitcode; - path = ../lib/Bitcode; - sourceTree = SOURCE_ROOT; - }; - 9F68EB050C77AD2C004AA152 /* Reader */ = { - isa = PBXGroup; - children = ( - 35A9CDF00CD0F6D5008ABC1D /* Deserialize.cpp */, - 9F4B0E8D0D0E05ED0061F270 /* DeserializeAPFloat.cpp */, - 354CF6D10CD299440059AF3E /* DeserializeAPInt.cpp */, - 9F68EB060C77AD2C004AA152 /* BitcodeReader.cpp */, - 9F68EB070C77AD2C004AA152 /* BitcodeReader.h */, - 9F4B0E8C0D0E05ED0061F270 /* BitReader.cpp */, - ); - path = Reader; - sourceTree = ""; - }; - 9F68EB110C77AD2C004AA152 /* Writer */ = { - isa = PBXGroup; - children = ( - 354CF6D20CD2994D0059AF3E /* SerializeAPInt.cpp */, - 9FD3E5920CA012B300E54D15 /* BitWriter.cpp */, - 9F68EB120C77AD2C004AA152 /* BitcodeWriter.cpp */, - 9F68EB130C77AD2C004AA152 /* BitcodeWriterPass.cpp */, - 9F68EB250C77AD2C004AA152 /* ValueEnumerator.cpp */, - 9F68EB260C77AD2C004AA152 /* ValueEnumerator.h */, - 35A9CDF10CD0F6E1008ABC1D /* Serialize.cpp */, - ); - path = Writer; - sourceTree = ""; - }; - 9F7040170D8D72FF00FD06FF /* transforms */ = { - isa = PBXGroup; - children = ( - 9F7040190D8D730A00FD06FF /* scalar */, - ); - name = transforms; - sourceTree = ""; - }; - 9F7040190D8D730A00FD06FF /* scalar */ = { - isa = PBXGroup; - children = ( - 9F70401A0D8D732400FD06FF /* llvm_scalar_opts.ml */, - 9F70401B0D8D732400FD06FF /* llvm_scalar_opts.mli */, - 9F70401E0D8D735E00FD06FF /* scalar_opts_ocaml.c */, - ); - name = scalar; - sourceTree = ""; - }; - 9F77937F0C73C54C00551F9C /* Bitcode */ = { - isa = PBXGroup; - children = ( - 9F7793800C73C54C00551F9C /* Archive.h */, - 9F7793810C73C54C00551F9C /* BitCodes.h */, - 9F7793820C73C54C00551F9C /* BitstreamReader.h */, - 9F7793830C73C54C00551F9C /* BitstreamWriter.h */, - 9F7793840C73C54C00551F9C /* LLVMBitCodes.h */, - 9F7793850C73C54C00551F9C /* ReaderWriter.h */, - 35A9CDEE0CD0F6AF008ABC1D /* Serialization.h */, - 35A9CDEF0CD0F6AF008ABC1D /* Serialize.h */, - 35A9CDED0CD0F6AF008ABC1D /* Deserialize.h */, - ); - path = Bitcode; - sourceTree = ""; - }; - 9F7794120C73CB6100551F9C /* Mips */ = { - isa = PBXGroup; - children = ( - 9F7794140C73CB6100551F9C /* Mips.h */, - 9F7794150C73CB6100551F9C /* Mips.td */, - 9F7794160C73CB6100551F9C /* MipsAsmPrinter.cpp */, - 9F7794170C73CB6100551F9C /* MipsCallingConv.td */, - 9F7794180C73CB6100551F9C /* MipsInstrFormats.td */, - 9F7794190C73CB6100551F9C /* MipsInstrInfo.cpp */, - 9F77941A0C73CB6100551F9C /* MipsInstrInfo.h */, - 9F77941B0C73CB6100551F9C /* MipsInstrInfo.td */, - 9F77941C0C73CB6100551F9C /* MipsISelDAGToDAG.cpp */, - 9F77941D0C73CB6100551F9C /* MipsISelLowering.cpp */, - 9F77941E0C73CB6100551F9C /* MipsISelLowering.h */, - 9F77941F0C73CB6100551F9C /* MipsMachineFunction.h */, - 9F7794200C73CB6100551F9C /* MipsRegisterInfo.cpp */, - 9F7794210C73CB6100551F9C /* MipsRegisterInfo.h */, - 9F7794220C73CB6100551F9C /* MipsRegisterInfo.td */, - 9F7794230C73CB6100551F9C /* MipsSubtarget.cpp */, - 9F7794240C73CB6100551F9C /* MipsSubtarget.h */, - 9F7794250C73CB6100551F9C /* MipsTargetAsmInfo.cpp */, - 9F7794260C73CB6100551F9C /* MipsTargetAsmInfo.h */, - 9F7794270C73CB6100551F9C /* MipsTargetMachine.cpp */, - 9F7794280C73CB6100551F9C /* MipsTargetMachine.h */, - ); - path = Mips; - sourceTree = ""; - }; - 9F7794290C73CB7900551F9C /* MSIL */ = { - isa = PBXGroup; - children = ( - 9F77942F0C73CB7900551F9C /* MSILWriter.cpp */, - 9F7794300C73CB7900551F9C /* MSILWriter.h */, - ); - path = MSIL; - sourceTree = ""; - }; - 9F7C240B0CB81ECD00498408 /* analysis */ = { - isa = PBXGroup; - children = ( - 9F7C240C0CB81ECD00498408 /* analysis_ocaml.c */, - 9F7C240D0CB81ECD00498408 /* llvm_analysis.ml */, - 9F7C240E0CB81ECD00498408 /* llvm_analysis.mli */, - ); - path = analysis; - sourceTree = ""; - }; - 9F7C2B690CB9496B00498408 /* test */ = { - isa = PBXGroup; - children = ( - 9F7C2C4B0CB9496C00498408 /* Bindings */, - ); - name = test; - path = ../test; - sourceTree = SOURCE_ROOT; - }; - 9F7C2C4B0CB9496C00498408 /* Bindings */ = { - isa = PBXGroup; - children = ( - 9F7C2C4C0CB9496C00498408 /* Ocaml */, - ); - path = Bindings; - sourceTree = ""; - }; - 9F7C2C4C0CB9496C00498408 /* Ocaml */ = { - isa = PBXGroup; - children = ( - 9F7C2C4F0CB9496C00498408 /* analysis.ml */, - 9F6B2CC00D0F6E56000F00FD /* bitreader.ml */, - 9F7C2C520CB9496C00498408 /* bitwriter.ml */, - 9F502AEC0D1D8CF8007939DF /* executionengine.ml */, - 9FEDD6140D8D7C3B009F6DF1 /* scalar_opts.ml */, - 9FEDD6BD0D8D8426009F6DF1 /* target.ml */, - 9F7C2C5D0CB9496C00498408 /* vmcore.ml */, - ); - path = Ocaml; - sourceTree = ""; - }; - 9FA638E90C77B252007F12AE /* IPO */ = { - isa = PBXGroup; - children = ( - 9FA638EA0C77B252007F12AE /* InlinerPass.h */, - ); - path = IPO; - sourceTree = ""; - }; - 9FD3E56D0CA0116100E54D15 /* bindings */ = { - isa = PBXGroup; - children = ( - 9FD3E56F0CA0116100E54D15 /* ocaml */, - ); - name = bindings; - path = ../bindings; - sourceTree = SOURCE_ROOT; - }; - 9FD3E56F0CA0116100E54D15 /* ocaml */ = { - isa = PBXGroup; - children = ( - 9F502ACD0D1D8CA3007939DF /* executionengine */, - 9F7C240B0CB81ECD00498408 /* analysis */, - 9F4B0E5D0D0E02580061F270 /* bitreader */, - 9FD3E5700CA0116100E54D15 /* bitwriter */, - 9FD3E57A0CA0116100E54D15 /* llvm */, - 9FEDD6C00D8D844E009F6DF1 /* target */, - 9F7040170D8D72FF00FD06FF /* transforms */, - ); - path = ocaml; - sourceTree = ""; - }; - 9FD3E5700CA0116100E54D15 /* bitwriter */ = { - isa = PBXGroup; - children = ( - 9FD3E5710CA0116100E54D15 /* bitwriter_ocaml.c */, - 9FD3E5720CA0116100E54D15 /* llvm_bitwriter.ml */, - 9FD3E5730CA0116100E54D15 /* llvm_bitwriter.mli */, - ); - path = bitwriter; - sourceTree = ""; - }; - 9FD3E57A0CA0116100E54D15 /* llvm */ = { - isa = PBXGroup; - children = ( - 9FD3E57B0CA0116100E54D15 /* llvm.ml */, - 9FD3E57C0CA0116100E54D15 /* llvm.mli */, - 9FD3E57D0CA0116100E54D15 /* llvm_ocaml.c */, - ); - path = llvm; - sourceTree = ""; - }; - 9FE450DE0C77ABE400C4FEA4 /* lib/Archive */ = { - isa = PBXGroup; - children = ( - 9FE450DF0C77ABE400C4FEA4 /* Archive.cpp */, - 9FE450E00C77ABE400C4FEA4 /* ArchiveInternals.h */, - 9FE450E10C77ABE400C4FEA4 /* ArchiveReader.cpp */, - 9FE450E20C77ABE400C4FEA4 /* ArchiveWriter.cpp */, - ); - name = lib/Archive; - path = ../lib/Archive; - sourceTree = SOURCE_ROOT; - }; - 9FEDD5F00D8D73AB009F6DF1 /* Transforms */ = { - isa = PBXGroup; - children = ( - 9FEDD5F10D8D73AB009F6DF1 /* Scalar.h */, - ); - path = Transforms; - sourceTree = ""; - }; - 9FEDD6C00D8D844E009F6DF1 /* target */ = { - isa = PBXGroup; - children = ( - 9FEDD6C10D8D844E009F6DF1 /* llvm_target.ml */, - 9FEDD6C20D8D844E009F6DF1 /* llvm_target.mli */, - 9FEDD6C40D8D844E009F6DF1 /* target_ocaml.c */, - ); - path = target; - sourceTree = ""; - }; - CF8F1B480B64F7AB00BB4199 /* include/llvm-c */ = { - isa = PBXGroup; - children = ( - 9F7C23E50CB81C2100498408 /* Analysis.h */, - 9F5B90E70D0DF19100CDFDEA /* BitReader.h */, - 9FD3E58D0CA0125F00E54D15 /* BitWriter.h */, - 9FD3E58E0CA0125F00E54D15 /* Core.h */, - 9FEB8C550D1CD1E200EE46BC /* ExecutionEngine.h */, - CF8F1B490B64F7AB00BB4199 /* LinkTimeOptimizer.h */, - 9FEDD6BB0D8D8408009F6DF1 /* lto.h */, - 9FEDD6B80D8D83EC009F6DF1 /* Target.h */, - 9FEDD5F00D8D73AB009F6DF1 /* Transforms */, - ); - name = "include/llvm-c"; - path = "../include/llvm-c"; - sourceTree = SOURCE_ROOT; - }; - CF8F1B5E0B64FADA00BB4199 /* llvm-upgrade */ = { - isa = PBXGroup; - children = ( - CF8F1B680B64FADA00BB4199 /* llvm-upgrade.cpp */, - CF8F1B720B64FADA00BB4199 /* UpgradeInternals.h */, - CF8F1B750B64FADA00BB4199 /* UpgradeLexer.l */, - CF8F1B7C0B64FADA00BB4199 /* UpgradeParser.y */, - ); - path = "llvm-upgrade"; - sourceTree = ""; - }; - CF8F1B7E0B64FADA00BB4199 /* llvm2cpp */ = { - isa = PBXGroup; - children = ( - CF8F1B7F0B64FADA00BB4199 /* CppWriter.cpp */, - CF8F1B800B64FADA00BB4199 /* CppWriter.h */, - CF8F1B870B64FADA00BB4199 /* llvm2cpp.cpp */, - ); - path = llvm2cpp; - sourceTree = ""; - }; - CF8F1B960B64FB7F00BB4199 /* lto */ = { - isa = PBXGroup; - children = ( - CF8F1B9D0B64FB7F00BB4199 /* lto-c.cpp */, - CF8F1B9E0B64FB7F00BB4199 /* lto.cpp */, - ); - path = lto; - sourceTree = ""; - }; - CF8F1BAB0B64FB8000BB4199 /* opt */ = { - isa = PBXGroup; - children = ( - CF8F1BAC0B64FB8000BB4199 /* AnalysisWrappers.cpp */, - CF8F1BB70B64FB8000BB4199 /* GraphPrinters.cpp */, - CF8F1BB90B64FB8000BB4199 /* opt.cpp */, - CF8F1BBA0B64FB8000BB4199 /* PrintSCC.cpp */, - ); - path = opt; - sourceTree = ""; - }; - CF8F1BCF0B64FC8A00BB4199 /* ARM */ = { - isa = PBXGroup; - children = ( - 9FE4508B0C77A77000C4FEA4 /* ARMCodeEmitter.cpp */, - 9FE4508C0C77A77000C4FEA4 /* ARMGenAsmWriter.inc */, - 9FE4508D0C77A77000C4FEA4 /* ARMGenDAGISel.inc */, - 9FE4508E0C77A77100C4FEA4 /* ARMGenInstrInfo.inc */, - 9FE4508F0C77A77100C4FEA4 /* ARMGenInstrNames.inc */, - 9FE450900C77A77100C4FEA4 /* ARMGenRegisterInfo.h.inc */, - 9FE450910C77A77100C4FEA4 /* ARMGenRegisterInfo.inc */, - 9FE450920C77A77100C4FEA4 /* ARMGenRegisterNames.inc */, - 9FE450930C77A77100C4FEA4 /* ARMGenSubtarget.inc */, - 9FE450940C77A77100C4FEA4 /* ARMJITInfo.cpp */, - 9FE450950C77A77100C4FEA4 /* ARMJITInfo.h */, - 9FE450960C77A77100C4FEA4 /* ARMRelocations.h */, - 9FE450970C77A77100C4FEA4 /* README-Thumb.txt */, - 9FE450980C77A77100C4FEA4 /* README.txt */, - CF8F1BD10B64FC8A00BB4199 /* ARM.h */, - CF8F1BD20B64FC8A00BB4199 /* ARM.td */, - CF8F1BD30B64FC8A00BB4199 /* ARMAddressingModes.h */, - CF8F1BD40B64FC8A00BB4199 /* ARMAsmPrinter.cpp */, - CF8F1BD50B64FC8A00BB4199 /* ARMConstantIslandPass.cpp */, - CF8F1BD60B64FC8A00BB4199 /* ARMConstantPoolValue.cpp */, - CF8F1BD70B64FC8A00BB4199 /* ARMConstantPoolValue.h */, - CF8F1BD80B64FC8A00BB4199 /* ARMFrameInfo.h */, - CF8F1BD90B64FC8A00BB4199 /* ARMInstrInfo.cpp */, - CF8F1BDA0B64FC8A00BB4199 /* ARMInstrInfo.h */, - CF8F1BDB0B64FC8A00BB4199 /* ARMInstrInfo.td */, - CF8F1BDC0B64FC8A00BB4199 /* ARMInstrThumb.td */, - CF8F1BDD0B64FC8A00BB4199 /* ARMInstrVFP.td */, - CF8F1BDE0B64FC8A00BB4199 /* ARMISelDAGToDAG.cpp */, - CF8F1BDF0B64FC8A00BB4199 /* ARMISelLowering.cpp */, - CF8F1BE00B64FC8A00BB4199 /* ARMISelLowering.h */, - CF8F1BE10B64FC8A00BB4199 /* ARMLoadStoreOptimizer.cpp */, - CF8F1BE20B64FC8A00BB4199 /* ARMMachineFunctionInfo.h */, - CF8F1BE30B64FC8A00BB4199 /* ARMRegisterInfo.cpp */, - CF8F1BE40B64FC8A00BB4199 /* ARMRegisterInfo.h */, - CF8F1BE50B64FC8A00BB4199 /* ARMRegisterInfo.td */, - CF8F1BE60B64FC8A00BB4199 /* ARMSubtarget.cpp */, - CF8F1BE70B64FC8A00BB4199 /* ARMSubtarget.h */, - CF8F1BE80B64FC8A00BB4199 /* ARMTargetAsmInfo.cpp */, - CF8F1BE90B64FC8A00BB4199 /* ARMTargetAsmInfo.h */, - CF8F1BEA0B64FC8A00BB4199 /* ARMTargetMachine.cpp */, - CF8F1BEB0B64FC8A00BB4199 /* ARMTargetMachine.h */, - ); - path = ARM; - sourceTree = ""; - }; - CFD99ADF0AFE878F0068D19C /* opt */ = { - isa = PBXGroup; - children = ( - CFD99ADB0AFE87870068D19C /* AnalysisWrappers.cpp */, - CFD99ADC0AFE87870068D19C /* GraphPrinters.cpp */, - CFD99ADD0AFE87870068D19C /* opt.cpp */, - CFD99ADE0AFE87870068D19C /* PrintSCC.cpp */, - ); - name = opt; - sourceTree = ""; - }; - CFE4213C0A66FAE100AB4BF6 /* Hello */ = { - isa = PBXGroup; - children = ( - CFE4213D0A66FAE100AB4BF6 /* Hello.cpp */, - ); - path = Hello; - sourceTree = ""; - }; - DE66EC7508ABE8EF00323D32 /* lib/VMCore */ = { - isa = PBXGroup; - children = ( - DE66EC5B08ABE86900323D32 /* AsmWriter.cpp */, - 9F77937B0C73C4F400551F9C /* AutoUpgrade.cpp */, - DE66EC5C08ABE86A00323D32 /* BasicBlock.cpp */, - 9F77937C0C73C4F400551F9C /* ConstantFold.cpp */, - 9F77937D0C73C4F400551F9C /* ConstantFold.h */, - DE66EC6008ABE86A00323D32 /* Constants.cpp */, - 9FD3E5900CA0129D00E54D15 /* Core.cpp */, - DE66EC6108ABE86A00323D32 /* Dominators.cpp */, - DE66EC6208ABE86A00323D32 /* Function.cpp */, - DE66EC6308ABE86A00323D32 /* Globals.cpp */, - CF73C0BD098A551F00627152 /* InlineAsm.cpp */, - DE66EC6408ABE86A00323D32 /* Instruction.cpp */, - DE66EC6508ABE86A00323D32 /* Instructions.cpp */, - CF1ACC9709C9DE4400D3C5EB /* IntrinsicInst.cpp */, - DE66EC6608ABE86A00323D32 /* LeakDetector.cpp */, - DE66EC6708ABE86A00323D32 /* Mangler.cpp */, - DE66EC6808ABE86A00323D32 /* Module.cpp */, - DE66EC6908ABE86A00323D32 /* ModuleProvider.cpp */, - DE66EC6A08ABE86A00323D32 /* Pass.cpp */, - CF8F1B5C0B64FA7300BB4199 /* PassManager.cpp */, - DE66EC6D08ABE86A00323D32 /* SymbolTableListTraitsImpl.h */, - DE66EC6E08ABE86A00323D32 /* Type.cpp */, - CF73C0BE098A551F00627152 /* TypeSymbolTable.cpp */, - DE66EC6F08ABE86A00323D32 /* Value.cpp */, - CF73C0BF098A551F00627152 /* ValueSymbolTable.cpp */, - CF9720900A9F3CA2002CEEDD /* ValueTypes.cpp */, - DE66EC7008ABE86A00323D32 /* Verifier.cpp */, - ); - name = lib/VMCore; - sourceTree = ""; - }; - DE66EC8808ABEAC900323D32 /* lib/AsmParser */ = { - isa = PBXGroup; - children = ( - DE66EC8E08ABEAF000323D32 /* llvmAsmParser.y */, - DE66EC8F08ABEAF000323D32 /* Parser.cpp */, - DE66EC9008ABEAF000323D32 /* ParserInternals.h */, - ); - name = lib/AsmParser; - sourceTree = ""; - }; - DE66ECBD08ABEC0700323D32 /* lib/Analysis */ = { - isa = PBXGroup; - children = ( - DE66ED1A08ABEC0800323D32 /* IPA */, - DE66ECBE08ABEC0700323D32 /* AliasAnalysis.cpp */, - DE66ECBF08ABEC0700323D32 /* AliasAnalysisCounter.cpp */, - DE66ECC008ABEC0700323D32 /* AliasAnalysisEvaluator.cpp */, - CF8F1B4D0B64F80700BB4199 /* AliasDebugger.cpp */, - DE66ECC108ABEC0700323D32 /* AliasSetTracker.cpp */, - 9F7C23E60CB81C2B00498408 /* Analysis.cpp */, - DE66ECC208ABEC0700323D32 /* BasicAliasAnalysis.cpp */, - DE66ECC308ABEC0700323D32 /* CFGPrinter.cpp */, - CF73C0B0098A523C00627152 /* ConstantFolding.cpp */, - DE66ED1708ABEC0800323D32 /* InstCount.cpp */, - DE66ED1808ABEC0800323D32 /* Interval.cpp */, - DE66ED1908ABEC0800323D32 /* IntervalPartition.cpp */, - DE66ED3308ABEC0800323D32 /* LoadValueNumbering.cpp */, - DE66ED3408ABEC0800323D32 /* LoopInfo.cpp */, - 9F68EB010C77AD02004AA152 /* LoopPass.cpp */, - 9F68EB020C77AD02004AA152 /* MemoryDependenceAnalysis.cpp */, - DE66ED3608ABEC0800323D32 /* PostDominators.cpp */, - DE66ED3708ABEC0800323D32 /* ProfileInfo.cpp */, - DE66ED3808ABEC0800323D32 /* ProfileInfoLoader.cpp */, - DE66ED3908ABEC0800323D32 /* ProfileInfoLoaderPass.cpp */, - DE66ED3A08ABEC0800323D32 /* ScalarEvolution.cpp */, - DE66ED3B08ABEC0800323D32 /* ScalarEvolutionExpander.cpp */, - DE66ED3C08ABEC0800323D32 /* Trace.cpp */, - DE66ED3D08ABEC0800323D32 /* ValueNumbering.cpp */, - ); - name = lib/Analysis; - path = ../lib/Analysis; - sourceTree = SOURCE_ROOT; - }; - DE66ED1A08ABEC0800323D32 /* IPA */ = { - isa = PBXGroup; - children = ( - DE66ED1B08ABEC0800323D32 /* Andersens.cpp */, - DE66ED1C08ABEC0800323D32 /* CallGraph.cpp */, - DE66ED1D08ABEC0800323D32 /* CallGraphSCCPass.cpp */, - DE66ED2F08ABEC0800323D32 /* FindUsedTypes.cpp */, - DE66ED3008ABEC0800323D32 /* GlobalsModRef.cpp */, - ); - path = IPA; - sourceTree = ""; - }; - DE66ED3E08ABEC2A00323D32 /* lib/CodeGen */ = { - isa = PBXGroup; - children = ( - F27C8CFF0DAD307700A33844 /* ShadowStackCollector.cpp */, - 754221420D171DFC00DDB61B /* MachineLICM.cpp */, - 9FE450AB0C77AB6100C4FEA4 /* README.txt */, - DE66ED8308ABEC2B00323D32 /* SelectionDAG */, - DE66ED3F08ABEC2A00323D32 /* AsmPrinter.cpp */, - DE66ED4008ABEC2A00323D32 /* BranchFolding.cpp */, - CFC244570959DEF2009F8C47 /* DwarfWriter.cpp */, - 9F7793500C73BD1500551F9C /* ELFWriter.h */, - DE66ED6F08ABEC2B00323D32 /* ELFWriter.cpp */, - 9F7793510C73BD1500551F9C /* IfConversion.cpp */, - DE66ED7008ABEC2B00323D32 /* IntrinsicLowering.cpp */, - DE66ED7108ABEC2B00323D32 /* LiveInterval.cpp */, - DE66ED7308ABEC2B00323D32 /* LiveIntervalAnalysis.cpp */, - DE66ED7508ABEC2B00323D32 /* LiveVariables.cpp */, - CF32AF5C0AEE6A4E00D24CD4 /* LLVMTargetMachine.cpp */, - 9F7793520C73BD1500551F9C /* LowerSubregs.cpp */, - DE66ED7608ABEC2B00323D32 /* MachineBasicBlock.cpp */, - CF6529A6095B21A8007F884E /* MachineModuleInfo.cpp */, - DE66ED7808ABEC2B00323D32 /* MachineFunction.cpp */, - DE66ED7908ABEC2B00323D32 /* MachineInstr.cpp */, - CF4F27F60A7B6FA3004359F6 /* MachinePassRegistry.cpp */, - 9F7793530C73BD1500551F9C /* MachOWriter.h */, - CF9720350A9F3ADC002CEEDD /* MachOWriter.cpp */, - DE66ED7B08ABEC2B00323D32 /* Passes.cpp */, - DE66ED7C08ABEC2B00323D32 /* PHIElimination.cpp */, - 9F7793540C73BD1500551F9C /* PostRASchedulerList.cpp */, - DE66ED7D08ABEC2B00323D32 /* PhysRegTracker.h */, - DE66ED7E08ABEC2B00323D32 /* PrologEpilogInserter.cpp */, - 9F7793550C73BD1500551F9C /* RegAllocBigBlock.cpp */, - DE66ED8008ABEC2B00323D32 /* RegAllocLinearScan.cpp */, - DE66ED8108ABEC2B00323D32 /* RegAllocLocal.cpp */, - 9FE25D940CAB16FB005383FC /* RegisterCoalescer.cpp */, - 9F7793560C73BD1500551F9C /* RegisterScavenging.cpp */, - DE66ED8208ABEC2B00323D32 /* RegAllocSimple.cpp */, - 9F7793570C73BD1500551F9C /* SimpleRegisterCoalescing.cpp */, - DE66ED9508ABEC2B00323D32 /* TwoAddressInstructionPass.cpp */, - DE66ED9608ABEC2B00323D32 /* UnreachableBlockElim.cpp */, - DE66ED9808ABEC2B00323D32 /* VirtRegMap.cpp */, - DE66ED9908ABEC2B00323D32 /* VirtRegMap.h */, - ); - name = lib/CodeGen; - path = ../lib/CodeGen; - sourceTree = SOURCE_ROOT; - }; - DE66ED8308ABEC2B00323D32 /* SelectionDAG */ = { - isa = PBXGroup; - children = ( - 9FE450AC0C77AB6E00C4FEA4 /* CallingConvLower.cpp */, - CF6B5AFD095C82C300D1EA42 /* DAGCombiner.cpp */, - DE66ED9008ABEC2B00323D32 /* LegalizeDAG.cpp */, - CF7FFA1F0985081C008B0087 /* ScheduleDAGList.cpp */, - DE694D9F08B51E0C0039C106 /* ScheduleDAG.cpp */, - DE66ED9208ABEC2B00323D32 /* SelectionDAG.cpp */, - DE66ED9308ABEC2B00323D32 /* SelectionDAGISel.cpp */, - DE66ED9408ABEC2B00323D32 /* SelectionDAGPrinter.cpp */, - CFE421060A66F86D00AB4BF6 /* ScheduleDAGRRList.cpp */, - CF9720370A9F3B1C002CEEDD /* TargetLowering.cpp */, - ); - path = SelectionDAG; - sourceTree = ""; - }; - DE66ED9A08ABEC7200323D32 /* lib/Debugger */ = { - isa = PBXGroup; - children = ( - DE66EDB108ABEC7300323D32 /* Debugger.cpp */, - DE66EDB508ABEC7300323D32 /* ProgramInfo.cpp */, - DE66EDB608ABEC7300323D32 /* README.txt */, - DE66EDB708ABEC7300323D32 /* RuntimeInfo.cpp */, - DE66EDB808ABEC7300323D32 /* SourceFile.cpp */, - DE66EDB908ABEC7300323D32 /* SourceLanguage-CFamily.cpp */, - DE66EDBA08ABEC7300323D32 /* SourceLanguage-CPlusPlus.cpp */, - DE66EDBB08ABEC7300323D32 /* SourceLanguage-Unknown.cpp */, - DE66EDBC08ABEC7300323D32 /* SourceLanguage.cpp */, - ); - name = lib/Debugger; - path = ../lib/Debugger; - sourceTree = SOURCE_ROOT; - }; - DE66EDBF08ABEC8F00323D32 /* lib/ExecutionEngine */ = { - isa = PBXGroup; - children = ( - DE66EDC508ABEC9000323D32 /* Interpreter */, - DE66EDD308ABEC9000323D32 /* JIT */, - DE66EDC408ABEC9000323D32 /* ExecutionEngine.cpp */, - 9F502B090D1D8D8D007939DF /* ExecutionEngineBindings.cpp */, - ); - name = lib/ExecutionEngine; - path = ../lib/ExecutionEngine; - sourceTree = SOURCE_ROOT; - }; - DE66EDC508ABEC9000323D32 /* Interpreter */ = { - isa = PBXGroup; - children = ( - DE66EDCE08ABEC9000323D32 /* Execution.cpp */, - DE66EDCF08ABEC9000323D32 /* ExternalFunctions.cpp */, - DE66EDD008ABEC9000323D32 /* Interpreter.cpp */, - DE66EDD108ABEC9000323D32 /* Interpreter.h */, - ); - path = Interpreter; - sourceTree = ""; - }; - DE66EDD308ABEC9000323D32 /* JIT */ = { - isa = PBXGroup; - children = ( - DE66EDDE08ABEC9100323D32 /* Intercept.cpp */, - DE66EDDF08ABEC9100323D32 /* JIT.cpp */, - DE66EDE008ABEC9100323D32 /* JIT.h */, - DE66EDE108ABEC9100323D32 /* JITEmitter.cpp */, - DE66EDE308ABEC9100323D32 /* TargetSelect.cpp */, - ); - path = JIT; - sourceTree = ""; - }; - DE66EDEB08ABEDD300323D32 /* lib/Linker */ = { - isa = PBXGroup; - children = ( - DE66EDF608ABEDD300323D32 /* LinkArchives.cpp */, - DE66EDF708ABEDD300323D32 /* Linker.cpp */, - DE66EDF808ABEDD300323D32 /* LinkItems.cpp */, - DE66EDF908ABEDD300323D32 /* LinkModules.cpp */, - ); - name = lib/Linker; - path = ../lib/Linker; - sourceTree = SOURCE_ROOT; - }; - DE66EDFB08ABEDE600323D32 /* lib/Support */ = { - isa = PBXGroup; - children = ( - 9FE25D950CAB1724005383FC /* APFloat.cpp */, - 9FE450A60C77AB3200C4FEA4 /* APInt.cpp */, - 9FE450A70C77AB3200C4FEA4 /* ConstantRange.cpp */, - 9FE450A80C77AB3200C4FEA4 /* MemoryBuffer.cpp */, - 9FE450A90C77AB3200C4FEA4 /* SmallPtrSet.cpp */, - 9FE450AA0C77AB3200C4FEA4 /* StringMap.cpp */, - CFD99AB70AFE848A0068D19C /* Allocator.cpp */, - DE66EDFC08ABEDE600323D32 /* Annotation.cpp */, - DE66EE1D08ABEDE600323D32 /* CommandLine.cpp */, - DE66EE3D08ABEDE600323D32 /* Debug.cpp */, - CF79495D09B326D4005ADFCA /* Dwarf.cpp */, - DE66EE3E08ABEDE600323D32 /* FileUtilities.cpp */, - CF42B6C40AF2512000D5D47C /* FoldingSet.cpp */, - CFE421070A66F8DC00AB4BF6 /* GraphWriter.cpp */, - DE66EE3F08ABEDE600323D32 /* IsInf.cpp */, - DE66EE4008ABEDE600323D32 /* IsNAN.cpp */, - CF8F1B500B64F86A00BB4199 /* ManagedStatic.cpp */, - DE66EE4208ABEDE600323D32 /* PluginLoader.cpp */, - DE66EE4308ABEDE600323D32 /* SlowOperationInformer.cpp */, - DE66EE4408ABEDE600323D32 /* Statistic.cpp */, - CF8F1B510B64F86A00BB4199 /* Streams.cpp */, - DE66EE4508ABEDE700323D32 /* StringExtras.cpp */, - 9F5B90CB0D0CE87100CDFDEA /* StringPool.cpp */, - DE66EE4608ABEDE700323D32 /* SystemUtils.cpp */, - DE66EE4708ABEDE700323D32 /* Timer.cpp */, - ); - name = lib/Support; - path = ../lib/Support; - sourceTree = SOURCE_ROOT; - }; - DE66EE4908ABEE3400323D32 /* lib/System */ = { - isa = PBXGroup; - children = ( - 9FE450A50C77AAF000C4FEA4 /* Disassembler.cpp */, - DE66EE7E08ABEE3500323D32 /* Unix */, - DE66EE8B08ABEE3500323D32 /* Win32 */, - CFE421090A66F93300AB4BF6 /* Alarm.cpp */, - DE66EE6008ABEE3400323D32 /* DynamicLibrary.cpp */, - CF8F1B530B64F8C000BB4199 /* IncludeFile.cpp */, - DE66EE6108ABEE3400323D32 /* LICENSE.TXT */, - CFD99ABA0AFE84D70068D19C /* IncludeFile.cpp */, - DE66EE6508ABEE3400323D32 /* MappedFile.cpp */, - DE66EE6608ABEE3400323D32 /* Memory.cpp */, - DE66EE6708ABEE3400323D32 /* Mutex.cpp */, - DE66EE6808ABEE3400323D32 /* Path.cpp */, - DE66EE6908ABEE3400323D32 /* Process.cpp */, - DE66EE6A08ABEE3400323D32 /* Program.cpp */, - DE66EE6B08ABEE3400323D32 /* README.txt */, - DE66EE7C08ABEE3400323D32 /* Signals.cpp */, - DE66EE7D08ABEE3400323D32 /* TimeValue.cpp */, - ); - name = lib/System; - path = ../lib/System; - sourceTree = SOURCE_ROOT; - }; - DE66EE7E08ABEE3500323D32 /* Unix */ = { - isa = PBXGroup; - children = ( - CFD99ABB0AFE84EF0068D19C /* Alarm.inc */, - DE66EE7F08ABEE3500323D32 /* MappedFile.inc */, - DE66EE8008ABEE3500323D32 /* Memory.inc */, - DE66EE8108ABEE3500323D32 /* Mutex.inc */, - DE66EE8208ABEE3500323D32 /* Path.inc */, - DE66EE8308ABEE3500323D32 /* Process.inc */, - DE66EE8408ABEE3500323D32 /* Program.inc */, - DE66EE8508ABEE3500323D32 /* README.txt */, - DE66EE8608ABEE3500323D32 /* Signals.inc */, - DE66EE8908ABEE3500323D32 /* TimeValue.inc */, - DE66EE8A08ABEE3500323D32 /* Unix.h */, - ); - path = Unix; - sourceTree = ""; - }; - DE66EE8B08ABEE3500323D32 /* Win32 */ = { - isa = PBXGroup; - children = ( - CFE4210A0A66F93300AB4BF6 /* Alarm.inc */, - DE66EE8C08ABEE3500323D32 /* DynamicLibrary.inc */, - DE66EE8D08ABEE3500323D32 /* MappedFile.inc */, - DE66EE8E08ABEE3500323D32 /* Memory.inc */, - DE66EE8F08ABEE3500323D32 /* Mutex.inc */, - DE66EE9008ABEE3500323D32 /* Path.inc */, - DE66EE9108ABEE3500323D32 /* Process.inc */, - DE66EE9208ABEE3500323D32 /* Program.inc */, - DE66EE9308ABEE3500323D32 /* Signals.inc */, - DE66EE9408ABEE3500323D32 /* TimeValue.inc */, - DE66EE9508ABEE3500323D32 /* Win32.h */, - ); - path = Win32; - sourceTree = ""; - }; - DE66EE9608ABEE5D00323D32 /* lib/Target */ = { - isa = PBXGroup; - children = ( - 9F7794290C73CB7900551F9C /* MSIL */, - DE66EE9708ABEE5D00323D32 /* Alpha */, - CF8F1BCF0B64FC8A00BB4199 /* ARM */, - DE66EEC908ABEE5E00323D32 /* CBackend */, - 9F7794120C73CB6100551F9C /* Mips */, - DE66EF1108ABEE5E00323D32 /* PowerPC */, - DE66EF7008ABEE5F00323D32 /* Sparc */, - DE66F09308ABEE6000323D32 /* X86 */, - DE66EF1008ABEE5E00323D32 /* TargetRegisterInfo.cpp */, - CF9BCD1508C75070001E7011 /* SubtargetFeature.cpp */, - 9FEDD6B60D8D83D0009F6DF1 /* Target.cpp */, - DE66F08A08ABEE6000323D32 /* Target.td */, - CF47BD860AAF487E00A8B13E /* TargetAsmInfo.cpp */, - 9FE25D960CAB1759005383FC /* TargetCallingConv.td */, - DE66F08B08ABEE6000323D32 /* TargetData.cpp */, - DE66F08C08ABEE6000323D32 /* TargetFrameInfo.cpp */, - DE66F08D08ABEE6000323D32 /* TargetInstrInfo.cpp */, - DE66F08F08ABEE6000323D32 /* TargetMachine.cpp */, - DE66F09008ABEE6000323D32 /* TargetMachineRegistry.cpp */, - 84115FFE0B66D87400E1293E /* TargetMachOWriterInfo.cpp */, - CF490D14090541D30072DB1C /* TargetSchedule.td */, - CF490D15090541D30072DB1C /* TargetSelectionDAG.td */, - DE66F09208ABEE6000323D32 /* TargetSubtarget.cpp */, - ); - name = lib/Target; - path = ../lib/Target; - sourceTree = SOURCE_ROOT; - }; - DE66EE9708ABEE5D00323D32 /* Alpha */ = { - isa = PBXGroup; - children = ( - DE66EE9808ABEE5E00323D32 /* Alpha.h */, - DE66EE9908ABEE5E00323D32 /* Alpha.td */, - DE66EE9A08ABEE5E00323D32 /* AlphaAsmPrinter.cpp */, - CF8F1B540B64F90F00BB4199 /* AlphaBranchSelector.cpp */, - DE66EE9B08ABEE5E00323D32 /* AlphaCodeEmitter.cpp */, - CFA702BB0A6FA85F0006009A /* AlphaGenAsmWriter.inc */, - CFA702BC0A6FA85F0006009A /* AlphaGenCodeEmitter.inc */, - CFA702BD0A6FA85F0006009A /* AlphaGenDAGISel.inc */, - CFA702BE0A6FA85F0006009A /* AlphaGenInstrInfo.inc */, - CFA702BF0A6FA85F0006009A /* AlphaGenInstrNames.inc */, - CFA702C00A6FA85F0006009A /* AlphaGenRegisterInfo.h.inc */, - CFA702C10A6FA85F0006009A /* AlphaGenRegisterInfo.inc */, - CFA702C20A6FA85F0006009A /* AlphaGenRegisterNames.inc */, - CFA702C30A6FA85F0006009A /* AlphaGenSubtarget.inc */, - DE66EEA308ABEE5E00323D32 /* AlphaInstrFormats.td */, - DE66EEA408ABEE5E00323D32 /* AlphaInstrInfo.cpp */, - DE66EEA508ABEE5E00323D32 /* AlphaInstrInfo.h */, - DE66EEA608ABEE5E00323D32 /* AlphaInstrInfo.td */, - CFBD8B1A090E76540020B107 /* AlphaISelDAGToDAG.cpp */, - CFBD8B1B090E76540020B107 /* AlphaISelLowering.cpp */, - CFBD8B1C090E76540020B107 /* AlphaISelLowering.h */, - DE66EEA908ABEE5E00323D32 /* AlphaJITInfo.cpp */, - DE66EEAA08ABEE5E00323D32 /* AlphaJITInfo.h */, - CF8F1B550B64F90F00BB4199 /* AlphaLLRP.cpp */, - DE66EEAB08ABEE5E00323D32 /* AlphaRegisterInfo.cpp */, - DE66EEAC08ABEE5E00323D32 /* AlphaRegisterInfo.h */, - DE66EEAD08ABEE5E00323D32 /* AlphaRegisterInfo.td */, - DE66EEAE08ABEE5E00323D32 /* AlphaRelocations.h */, - CFE4210B0A66F96400AB4BF6 /* AlphaSchedule.td */, - CFBD8B1D090E76540020B107 /* AlphaSubtarget.cpp */, - CFBD8B1E090E76540020B107 /* AlphaSubtarget.h */, - CF341DAE0AB07A8B0099B064 /* AlphaTargetAsmInfo.cpp */, - CF341DAD0AB07A8B0099B064 /* AlphaTargetAsmInfo.h */, - DE66EEAF08ABEE5E00323D32 /* AlphaTargetMachine.cpp */, - DE66EEB008ABEE5E00323D32 /* AlphaTargetMachine.h */, - ); - path = Alpha; - sourceTree = ""; - }; - DE66EEC908ABEE5E00323D32 /* CBackend */ = { - isa = PBXGroup; - children = ( - CF8F1B560B64F98900BB4199 /* CBackend.cpp */, - DE66EECA08ABEE5E00323D32 /* CTargetMachine.h */, - ); - path = CBackend; - sourceTree = ""; - }; - DE66EF1108ABEE5E00323D32 /* PowerPC */ = { - isa = PBXGroup; - children = ( - 9FE4509A0C77A79C00C4FEA4 /* PPCCallingConv.td */, - 9FE4509B0C77A79C00C4FEA4 /* PPCGenCallingConv.inc */, - 841160000B66D8AC00E1293E /* PPCMachOWriterInfo.h */, - 84115FFF0B66D89B00E1293E /* PPCMachOWriterInfo.cpp */, - CFA702CB0A6FA8AD0006009A /* PPCGenAsmWriter.inc */, - CFA702CC0A6FA8AD0006009A /* PPCGenCodeEmitter.inc */, - CFA702CD0A6FA8AD0006009A /* PPCGenDAGISel.inc */, - CFA702CE0A6FA8AD0006009A /* PPCGenInstrInfo.inc */, - CFA702CF0A6FA8AD0006009A /* PPCGenInstrNames.inc */, - CFA702D00A6FA8AD0006009A /* PPCGenRegisterInfo.h.inc */, - CFA702D10A6FA8AD0006009A /* PPCGenRegisterInfo.inc */, - CFA702D20A6FA8AD0006009A /* PPCGenRegisterNames.inc */, - CFA702D30A6FA8AD0006009A /* PPCGenSubtarget.inc */, - CFE421140A66FA2D00AB4BF6 /* PPC.h */, - CFE421150A66FA2D00AB4BF6 /* PPC.td */, - CFE421160A66FA2D00AB4BF6 /* PPCAsmPrinter.cpp */, - CFE421170A66FA2D00AB4BF6 /* PPCBranchSelector.cpp */, - CFE421180A66FA2D00AB4BF6 /* PPCCodeEmitter.cpp */, - CFE421190A66FA2D00AB4BF6 /* PPCFrameInfo.h */, - CFE4211A0A66FA2D00AB4BF6 /* PPCHazardRecognizers.cpp */, - CFE4211B0A66FA2D00AB4BF6 /* PPCHazardRecognizers.h */, - CFE4211C0A66FA2D00AB4BF6 /* PPCInstr64Bit.td */, - CFE4211D0A66FA2D00AB4BF6 /* PPCInstrAltivec.td */, - CFE4211E0A66FA2D00AB4BF6 /* PPCInstrBuilder.h */, - CFE4211F0A66FA2D00AB4BF6 /* PPCInstrFormats.td */, - CFE421200A66FA2D00AB4BF6 /* PPCInstrInfo.cpp */, - CFE421210A66FA2D00AB4BF6 /* PPCInstrInfo.h */, - CFE421220A66FA2D00AB4BF6 /* PPCInstrInfo.td */, - CFE421230A66FA2D00AB4BF6 /* PPCISelDAGToDAG.cpp */, - CFE421240A66FA2D00AB4BF6 /* PPCISelLowering.cpp */, - CFE421250A66FA2D00AB4BF6 /* PPCISelLowering.h */, - CFE421260A66FA2D00AB4BF6 /* PPCJITInfo.cpp */, - CFE421270A66FA2D00AB4BF6 /* PPCJITInfo.h */, - CFABD0A20B09E342003EB061 /* PPCMachineFunctionInfo.h */, - CFE421280A66FA2D00AB4BF6 /* PPCPerfectShuffle.h */, - CF8F1B570B64F9AC00BB4199 /* PPCPredicates.cpp */, - CF8F1B580B64F9AC00BB4199 /* PPCPredicates.h */, - CFE421290A66FA2D00AB4BF6 /* PPCRegisterInfo.cpp */, - CFE4212A0A66FA2D00AB4BF6 /* PPCRegisterInfo.h */, - CFE4212B0A66FA2D00AB4BF6 /* PPCRegisterInfo.td */, - CFE4212C0A66FA2D00AB4BF6 /* PPCRelocations.h */, - CFE4212D0A66FA2D00AB4BF6 /* PPCSchedule.td */, - CFE4212E0A66FA2D00AB4BF6 /* PPCScheduleG3.td */, - CFE4212F0A66FA2D00AB4BF6 /* PPCScheduleG4.td */, - CFE421300A66FA2D00AB4BF6 /* PPCScheduleG4Plus.td */, - CFE421310A66FA2D00AB4BF6 /* PPCScheduleG5.td */, - CFE421320A66FA2E00AB4BF6 /* PPCSubtarget.cpp */, - CFE421330A66FA2E00AB4BF6 /* PPCSubtarget.h */, - CF341E020AB080220099B064 /* PPCTargetAsmInfo.cpp */, - CF341E010AB080220099B064 /* PPCTargetAsmInfo.h */, - CFE421340A66FA2E00AB4BF6 /* PPCTargetMachine.cpp */, - CFE421350A66FA2E00AB4BF6 /* PPCTargetMachine.h */, - CFE421360A66FA2E00AB4BF6 /* README_ALTIVEC.txt */, - CFE421370A66FA2E00AB4BF6 /* README.txt */, - ); - path = PowerPC; - sourceTree = ""; - }; - DE66EF7008ABEE5F00323D32 /* Sparc */ = { - isa = PBXGroup; - children = ( - CF65280109D1BA3800C4B521 /* SparcGenAsmWriter.inc */, - CF65280209D1BA3800C4B521 /* SparcGenDAGISel.inc */, - CF65280309D1BA3800C4B521 /* SparcGenInstrInfo.inc */, - CF65280409D1BA3800C4B521 /* SparcGenInstrNames.inc */, - CF65280509D1BA3800C4B521 /* SparcGenRegisterInfo.h.inc */, - CF65280609D1BA3800C4B521 /* SparcGenRegisterInfo.inc */, - CF65280709D1BA3800C4B521 /* SparcGenRegisterNames.inc */, - CF65280809D1BA3800C4B521 /* SparcGenSubtarget.inc */, - CF6527FA09D1BA3800C4B521 /* DelaySlotFiller.cpp */, - CF6527FB09D1BA3800C4B521 /* FPMover.cpp */, - CF6527FC09D1BA3800C4B521 /* Makefile */, - CF6527FD09D1BA3800C4B521 /* README.txt */, - CF6527FE09D1BA3800C4B521 /* Sparc.h */, - CF6527FF09D1BA3800C4B521 /* Sparc.td */, - CF65280009D1BA3800C4B521 /* SparcAsmPrinter.cpp */, - CF65280909D1BA3800C4B521 /* SparcInstrFormats.td */, - CF65280A09D1BA3800C4B521 /* SparcInstrInfo.cpp */, - CF65280B09D1BA3800C4B521 /* SparcInstrInfo.h */, - CF65280C09D1BA3800C4B521 /* SparcInstrInfo.td */, - CF65280D09D1BA3800C4B521 /* SparcISelDAGToDAG.cpp */, - CF65280E09D1BA3800C4B521 /* SparcRegisterInfo.cpp */, - CF65280F09D1BA3800C4B521 /* SparcRegisterInfo.h */, - CF65281009D1BA3800C4B521 /* SparcRegisterInfo.td */, - CF65281109D1BA3800C4B521 /* SparcSubtarget.cpp */, - CF65281209D1BA3800C4B521 /* SparcSubtarget.h */, - CF341E230AB0814B0099B064 /* SparcTargetAsmInfo.cpp */, - CF341E220AB0814B0099B064 /* SparcTargetAsmInfo.h */, - CF65281309D1BA3800C4B521 /* SparcTargetMachine.cpp */, - CF65281409D1BA3800C4B521 /* SparcTargetMachine.h */, - ); - path = Sparc; - sourceTree = ""; - }; - DE66F09308ABEE6000323D32 /* X86 */ = { - isa = PBXGroup; - children = ( - 9FE4509C0C77A7BC00C4FEA4 /* README-MMX.txt */, - 9FE4509D0C77A7BC00C4FEA4 /* X86CallingConv.td */, - 9FE4509F0C77A7BC00C4FEA4 /* X86ELFWriterInfo.cpp */, - 9FE450A00C77A7BC00C4FEA4 /* X86ELFWriterInfo.h */, - 9FE450A10C77A7BC00C4FEA4 /* X86GenCallingConv.inc */, - 9FE450A20C77A7BC00C4FEA4 /* X86InstrFormats.td */, - CFA702D40A6FA8DD0006009A /* X86GenAsmWriter.inc */, - CFA702D50A6FA8DD0006009A /* X86GenAsmWriter1.inc */, - CFA702D60A6FA8DD0006009A /* X86GenDAGISel.inc */, - CFA702D70A6FA8DD0006009A /* X86GenInstrInfo.inc */, - CFA702D80A6FA8DD0006009A /* X86GenInstrNames.inc */, - CFA702D90A6FA8DD0006009A /* X86GenRegisterInfo.h.inc */, - CFA702DA0A6FA8DD0006009A /* X86GenRegisterInfo.inc */, - CFA702DB0A6FA8DD0006009A /* X86GenRegisterNames.inc */, - CFA702DC0A6FA8DD0006009A /* X86GenSubtarget.inc */, - CFE421380A66FA8000AB4BF6 /* README-FPStack.txt */, - CFE421390A66FA8000AB4BF6 /* README-SSE.txt */, - CFD99ABE0AFE857A0068D19C /* README-X86-64.txt */, - CFE4213A0A66FA8000AB4BF6 /* README.txt */, - CFF0DE6309BF6C360031957F /* X86InstrFPStack.td */, - CFF0DE6409BF6C360031957F /* X86InstrMMX.td */, - CFF0DE6509BF6C360031957F /* X86InstrSSE.td */, - DE66F0BC08ABEE6000323D32 /* X86.h */, - DE66F0BD08ABEE6000323D32 /* X86.td */, - DE66F0BE08ABEE6000323D32 /* X86AsmPrinter.cpp */, - DE66F0BF08ABEE6000323D32 /* X86AsmPrinter.h */, - DE66F0C008ABEE6000323D32 /* X86ATTAsmPrinter.cpp */, - DE66F0C108ABEE6000323D32 /* X86ATTAsmPrinter.h */, - DE66F0C208ABEE6000323D32 /* X86CodeEmitter.cpp */, - CF8F1B590B64F9E100BB4199 /* X86COFF.h */, - DE66F0C408ABEE6000323D32 /* X86FloatingPoint.cpp */, - DE66F0CC08ABEE6000323D32 /* X86InstrBuilder.h */, - DE66F0CD08ABEE6000323D32 /* X86InstrInfo.cpp */, - DE66F0CE08ABEE6000323D32 /* X86InstrInfo.h */, - DE66F0CF08ABEE6100323D32 /* X86InstrInfo.td */, - DE66F0D008ABEE6100323D32 /* X86IntelAsmPrinter.cpp */, - DE66F0D108ABEE6100323D32 /* X86IntelAsmPrinter.h */, - DE66F0D508ABEE6100323D32 /* X86JITInfo.cpp */, - DE66F0D608ABEE6100323D32 /* X86JITInfo.h */, - CFE4213B0A66FA8000AB4BF6 /* X86MachineFunctionInfo.h */, - DE66F0D808ABEE6100323D32 /* X86RegisterInfo.cpp */, - DE66F0D908ABEE6100323D32 /* X86RegisterInfo.h */, - DE66F0DA08ABEE6100323D32 /* X86RegisterInfo.td */, - DE66F0DB08ABEE6100323D32 /* X86Relocations.h */, - CFC244BB0959F24C009F8C47 /* X86ISelDAGToDAG.cpp */, - CFC244BC0959F24C009F8C47 /* X86ISelLowering.cpp */, - CFC244BD0959F24C009F8C47 /* X86ISelLowering.h */, - DE66F0DC08ABEE6100323D32 /* X86Subtarget.cpp */, - DE66F0DD08ABEE6100323D32 /* X86Subtarget.h */, - CF341E330AB082D60099B064 /* X86TargetAsmInfo.cpp */, - CF341E320AB082D60099B064 /* X86TargetAsmInfo.h */, - DE66F0DE08ABEE6100323D32 /* X86TargetMachine.cpp */, - DE66F0DF08ABEE6100323D32 /* X86TargetMachine.h */, - ); - path = X86; - sourceTree = ""; - }; - DE66F0E108ABEFB300323D32 /* lib/Transforms */ = { - isa = PBXGroup; - children = ( - DE66F0EE08ABEFB300323D32 /* Instrumentation */, - CFE4213C0A66FAE100AB4BF6 /* Hello */, - DE66F11F08ABEFB300323D32 /* IPO */, - DE66F15C08ABEFB400323D32 /* Scalar */, - DE66F1BD08ABEFB400323D32 /* Utils */, - ); - name = lib/Transforms; - path = ../lib/Transforms; - sourceTree = SOURCE_ROOT; - }; - DE66F0EE08ABEFB300323D32 /* Instrumentation */ = { - isa = PBXGroup; - children = ( - DE66F0EF08ABEFB300323D32 /* BlockProfiling.cpp */, - DE66F0FE08ABEFB300323D32 /* EdgeProfiling.cpp */, - DE66F11B08ABEFB300323D32 /* ProfilingUtils.cpp */, - DE66F11C08ABEFB300323D32 /* ProfilingUtils.h */, - CF73C0B7098A546000627152 /* RSProfiling.cpp */, - CF73C0B8098A546000627152 /* RSProfiling.h */, - ); - path = Instrumentation; - sourceTree = ""; - }; - DE66F11F08ABEFB300323D32 /* IPO */ = { - isa = PBXGroup; - children = ( - 9F7793770C73C48A00551F9C /* StripDeadPrototypes.cpp */, - DE66F12008ABEFB300323D32 /* ArgumentPromotion.cpp */, - DE66F12108ABEFB300323D32 /* ConstantMerge.cpp */, - DE66F12208ABEFB300323D32 /* DeadArgumentElimination.cpp */, - DE66F12308ABEFB300323D32 /* DeadTypeElimination.cpp */, - DE66F14C08ABEFB400323D32 /* GlobalDCE.cpp */, - DE66F14D08ABEFB400323D32 /* GlobalOpt.cpp */, - CFE4213F0A66FB5E00AB4BF6 /* IndMemRemoval.cpp */, - DE66F14E08ABEFB400323D32 /* Inliner.cpp */, - DE66F15008ABEFB400323D32 /* InlineSimple.cpp */, - DE66F15108ABEFB400323D32 /* Internalize.cpp */, - DE66F15208ABEFB400323D32 /* IPConstantPropagation.cpp */, - DE66F15308ABEFB400323D32 /* LoopExtractor.cpp */, - DE66F15408ABEFB400323D32 /* LowerSetJmp.cpp */, - DE66F15608ABEFB400323D32 /* PruneEH.cpp */, - DE66F15708ABEFB400323D32 /* RaiseAllocations.cpp */, - DE66F15808ABEFB400323D32 /* SimplifyLibCalls.cpp */, - DE66F15908ABEFB400323D32 /* StripSymbols.cpp */, - ); - path = IPO; - sourceTree = ""; - }; - DE66F15C08ABEFB400323D32 /* Scalar */ = { - isa = PBXGroup; - children = ( - DE66F15E08ABEFB400323D32 /* ADCE.cpp */, - DE66F15F08ABEFB400323D32 /* BasicBlockPlacement.cpp */, - 9F7793460C73BC2000551F9C /* CodeGenPrepare.cpp */, - DE66F16008ABEFB400323D32 /* CondPropagate.cpp */, - DE66F16108ABEFB400323D32 /* ConstantProp.cpp */, - DE66F16308ABEFB400323D32 /* DCE.cpp */, - DE66F16408ABEFB400323D32 /* DeadStoreElimination.cpp */, - DE66F1A308ABEFB400323D32 /* GCSE.cpp */, - 9F7793470C73BC2000551F9C /* GVN.cpp */, - 9F7793480C73BC2000551F9C /* GVNPRE.cpp */, - DE66F1A408ABEFB400323D32 /* IndVarSimplify.cpp */, - DE66F1A508ABEFB400323D32 /* InstructionCombining.cpp */, - DE66F1A608ABEFB400323D32 /* LICM.cpp */, - 9F77934A0C73BC2000551F9C /* LoopRotation.cpp */, - 9F7793490C73BC2000551F9C /* LoopIndexSplit.cpp */, - DE66F1A808ABEFB400323D32 /* LoopStrengthReduce.cpp */, - DE66F1A908ABEFB400323D32 /* LoopUnroll.cpp */, - DE66F1AA08ABEFB400323D32 /* LoopUnswitch.cpp */, - CF8F1B5B0B64FA2F00BB4199 /* PredicateSimplifier.cpp */, - DE66F1B508ABEFB400323D32 /* Reassociate.cpp */, - CF73C0B9098A546000627152 /* Reg2Mem.cpp */, - 9FEDD5F70D8D797D009F6DF1 /* Scalar.cpp */, - DE66F1B608ABEFB400323D32 /* ScalarReplAggregates.cpp */, - DE66F1B708ABEFB400323D32 /* SCCP.cpp */, - DE66F1B808ABEFB400323D32 /* SimplifyCFG.cpp */, - DE66F1B908ABEFB400323D32 /* TailDuplication.cpp */, - DE66F1BA08ABEFB400323D32 /* TailRecursionElimination.cpp */, - ); - path = Scalar; - sourceTree = ""; - }; - DE66F1BD08ABEFB400323D32 /* Utils */ = { - isa = PBXGroup; - children = ( - DE66F1BE08ABEFB400323D32 /* BasicBlockUtils.cpp */, - 9F7793780C73C49A00551F9C /* BasicInliner.cpp */, - DE66F1BF08ABEFB400323D32 /* BreakCriticalEdges.cpp */, - DE66F1C008ABEFB400323D32 /* CloneFunction.cpp */, - 9F7793790C73C49A00551F9C /* CloneLoop.cpp */, - DE66F1C108ABEFB400323D32 /* CloneModule.cpp */, - DE66F1C208ABEFB400323D32 /* CloneTrace.cpp */, - DE66F1C308ABEFB400323D32 /* CodeExtractor.cpp */, - DE66F1E008ABEFB400323D32 /* DemoteRegToStack.cpp */, - 9F77937A0C73C49A00551F9C /* InlineCost.cpp */, - DE66F1E108ABEFB400323D32 /* InlineFunction.cpp */, - CF97208A0A9F3C6F002CEEDD /* LCSSA.cpp */, - DE66F1E208ABEFB400323D32 /* Local.cpp */, - DE4DA0390911476D0012D44B /* LoopSimplify.cpp */, - CF97208B0A9F3C6F002CEEDD /* LowerAllocations.cpp */, - CF97208C0A9F3C6F002CEEDD /* LowerInvoke.cpp */, - CF97208E0A9F3C6F002CEEDD /* LowerSwitch.cpp */, - CF97208F0A9F3C6F002CEEDD /* Mem2Reg.cpp */, - DE66F1E408ABEFB400323D32 /* PromoteMemoryToRegister.cpp */, - DE66F1E508ABEFB400323D32 /* SimplifyCFG.cpp */, - DE66F1E608ABEFB400323D32 /* UnifyFunctionExitNodes.cpp */, - DE66F1E708ABEFB400323D32 /* ValueMapper.cpp */, - ); - path = Utils; - sourceTree = ""; - }; - DE66F1E908ABF03100323D32 /* include/llvm */ = { - isa = PBXGroup; - children = ( - DE66F1EB08ABF03100323D32 /* ADT */, - DE66F20308ABF03100323D32 /* Analysis */, - DE66F22408ABF03100323D32 /* Assembly */, - 9F77937F0C73C54C00551F9C /* Bitcode */, - DE66F23508ABF03100323D32 /* CodeGen */, - DE66F24C08ABF03100323D32 /* Config */, - DE66F25308ABF03100323D32 /* Debugger */, - DE66F25B08ABF03100323D32 /* ExecutionEngine */, - DE66F26E08ABF03200323D32 /* Support */, - DE66F29408ABF03200323D32 /* System */, - DE66F29F08ABF03200323D32 /* Target */, - DE66F2AB08ABF03200323D32 /* Transforms */, - DE66F1EA08ABF03100323D32 /* AbstractTypeUser.h */, - DE66F22308ABF03100323D32 /* Argument.h */, - 9FA638D90C77B184007F12AE /* AutoUpgrade.h */, - DE66F22A08ABF03100323D32 /* BasicBlock.h */, - DE66F23308ABF03100323D32 /* CallGraphSCCPass.h */, - DE66F23408ABF03100323D32 /* CallingConv.h */, - DE66F25108ABF03100323D32 /* Constant.h */, - DE66F25208ABF03100323D32 /* Constants.h */, - DE66F25A08ABF03100323D32 /* DerivedTypes.h */, - DE66F25E08ABF03100323D32 /* Function.h */, - 9FA638DA0C77B184007F12AE /* GlobalAlias.h */, - DE66F25F08ABF03100323D32 /* GlobalValue.h */, - DE66F26008ABF03100323D32 /* GlobalVariable.h */, - CF73C0A2098A4FDF00627152 /* InlineAsm.h */, - DE66F26108ABF03100323D32 /* InstrTypes.h */, - DE66F26208ABF03100323D32 /* Instruction.def */, - DE66F26308ABF03100323D32 /* Instruction.h */, - DE66F26408ABF03100323D32 /* Instructions.h */, - DE66F26508ABF03100323D32 /* IntrinsicInst.h */, - DE66F26608ABF03100323D32 /* Intrinsics.h */, - CF65223409CA39B800C4B521 /* Intrinsics.gen */, - CFE420FF0A66F67300AB4BF6 /* IntrinsicsPowerPC.td */, - CFE421000A66F67300AB4BF6 /* IntrinsicsX86.td */, - CF8D62FA09C2226F006017BA /* Intrinsics.td */, - CF9720260A9F39B9002CEEDD /* LinkAllPasses.h */, - CFE421010A66F67300AB4BF6 /* LinkAllVMCore.h */, - CF9720270A9F39B9002CEEDD /* LinkTimeOptimizer.h */, - DE66F26708ABF03100323D32 /* Linker.h */, - DE66F26808ABF03100323D32 /* Module.h */, - DE66F26908ABF03200323D32 /* ModuleProvider.h */, - 9F77937E0C73C53000551F9C /* ParameterAttributes.h */, - DE66F26A08ABF03200323D32 /* Pass.h */, - DE66F26B08ABF03200323D32 /* PassAnalysisSupport.h */, - DE66F26C08ABF03200323D32 /* PassManager.h */, - CF8F1B420B64F70B00BB4199 /* PassManagers.h */, - DE66F26D08ABF03200323D32 /* PassSupport.h */, - DE66F29308ABF03200323D32 /* SymbolTableListTraits.h */, - DE66F2B708ABF03200323D32 /* Type.h */, - CF73C0A3098A4FDF00627152 /* TypeSymbolTable.h */, - DE66F2B808ABF03200323D32 /* Use.h */, - DE66F2B908ABF03200323D32 /* User.h */, - DE66F2BA08ABF03200323D32 /* Value.h */, - CF73C0A4098A4FDF00627152 /* ValueSymbolTable.h */, - ); - name = include/llvm; - path = ../include/llvm; - sourceTree = SOURCE_ROOT; - }; - DE66F1EB08ABF03100323D32 /* ADT */ = { - isa = PBXGroup; - children = ( - 35E98A830CBC2ED300C5CDC1 /* DenseSet.h */, - 35E98A840CBC2ED300C5CDC1 /* ImmutableMap.h */, - 35E98A850CBC2ED300C5CDC1 /* ImmutableSet.h */, - 9FA638DD0C77B1AB007F12AE /* BitVector.h */, - DE66F1EE08ABF03100323D32 /* DenseMap.h */, - DE66F1EF08ABF03100323D32 /* DepthFirstIterator.h */, - DE66F1F008ABF03100323D32 /* EquivalenceClasses.h */, - CF42B6BF0AF24F5300D5D47C /* FoldingSet.h */, - CF42B6BF0AF24F5300D5D47C /* FoldingSet.h */, - DE66F1F108ABF03100323D32 /* GraphTraits.h */, - DE66F1F308ABF03100323D32 /* hash_map.in */, - DE66F1F508ABF03100323D32 /* hash_set.in */, - DE66F1F608ABF03100323D32 /* HashExtras.h */, - DE66F1F708ABF03100323D32 /* ilist */, - 9FA638E00C77B1AB007F12AE /* IndexedMap.h */, - 9FE25D900CAB166D005383FC /* APFloat.h */, - 9FA638DB0C77B1AB007F12AE /* APInt.h */, - 9FA638DC0C77B1AB007F12AE /* APSInt.h */, - DE66F1F908ABF03100323D32 /* iterator.in */, - DE66F1FA08ABF03100323D32 /* PostOrderIterator.h */, - DE66F1FB08ABF03100323D32 /* SCCIterator.h */, - DE66F1FC08ABF03100323D32 /* SetOperations.h */, - DE66F1FD08ABF03100323D32 /* SetVector.h */, - 9FA638E20C77B1AB007F12AE /* SmallPtrSet.h */, - 9FA638E30C77B1AB007F12AE /* SmallSet.h */, - CF33BE160AF62B4200E93805 /* SmallString.h */, - CF71B60F0AC45EDA0007F57C /* SmallVector.h */, - 9FE25D910CAB166D005383FC /* SparseBitVector.h */, - 9FA638E40C77B1AB007F12AE /* StringMap.h */, - DE66F1FE08ABF03100323D32 /* Statistic.h */, - DE66F1FF08ABF03100323D32 /* STLExtras.h */, - DE66F20008ABF03100323D32 /* StringExtras.h */, - DE66F20108ABF03100323D32 /* Tree.h */, - CFF8B434097C605F0047F72A /* UniqueVector.h */, - DE66F20208ABF03100323D32 /* VectorExtras.h */, - ); - path = ADT; - sourceTree = ""; - }; - DE66F20308ABF03100323D32 /* Analysis */ = { - isa = PBXGroup; - children = ( - 9FA638E50C77B203007F12AE /* LoopPass.h */, - 9FA638E60C77B203007F12AE /* MemoryDependenceAnalysis.h */, - DE66F20408ABF03100323D32 /* AliasAnalysis.h */, - DE66F20508ABF03100323D32 /* AliasSetTracker.h */, - DE66F20608ABF03100323D32 /* CallGraph.h */, - DE66F20708ABF03100323D32 /* CFGPrinter.h */, - CF73C0A5098A507300627152 /* ConstantFolding.h */, - DE66F20808ABF03100323D32 /* ConstantsScanner.h */, - DE66F20F08ABF03100323D32 /* Dominators.h */, - DE66F21208ABF03100323D32 /* FindUsedTypes.h */, - DE66F21308ABF03100323D32 /* Interval.h */, - DE66F21408ABF03100323D32 /* IntervalIterator.h */, - DE66F21508ABF03100323D32 /* IntervalPartition.h */, - DE66F21608ABF03100323D32 /* LoadValueNumbering.h */, - DE66F21708ABF03100323D32 /* LoopInfo.h */, - DE66F21808ABF03100323D32 /* Passes.h */, - DE66F21908ABF03100323D32 /* PostDominators.h */, - DE66F21A08ABF03100323D32 /* ProfileInfo.h */, - DE66F21B08ABF03100323D32 /* ProfileInfoLoader.h */, - DE66F21C08ABF03100323D32 /* ProfileInfoTypes.h */, - DE66F21D08ABF03100323D32 /* ScalarEvolution.h */, - DE66F21E08ABF03100323D32 /* ScalarEvolutionExpander.h */, - DE66F21F08ABF03100323D32 /* ScalarEvolutionExpressions.h */, - DE66F22008ABF03100323D32 /* Trace.h */, - DE66F22108ABF03100323D32 /* ValueNumbering.h */, - DE66F22208ABF03100323D32 /* Verifier.h */, - ); - path = Analysis; - sourceTree = ""; - }; - DE66F22408ABF03100323D32 /* Assembly */ = { - isa = PBXGroup; - children = ( - DE66F22508ABF03100323D32 /* AsmAnnotationWriter.h */, - DE66F22708ABF03100323D32 /* Parser.h */, - DE66F22808ABF03100323D32 /* PrintModulePass.h */, - DE66F22908ABF03100323D32 /* Writer.h */, - ); - path = Assembly; - sourceTree = ""; - }; - DE66F23508ABF03100323D32 /* CodeGen */ = { - isa = PBXGroup; - children = ( - DE66F23608ABF03100323D32 /* AsmPrinter.h */, - 9F7793860C73C57100551F9C /* CallingConvLower.h */, - DEFAB19D0959E9A100E0AB42 /* DwarfWriter.h */, - 9F7793870C73C57100551F9C /* ELFRelocation.h */, - 9F7793880C73C57100551F9C /* FileWriters.h */, - DE66F23908ABF03100323D32 /* IntrinsicLowering.h */, - CFD7E4F30A798FC3000C7379 /* LinkAllCodegenComponents.h */, - DE4DA03C091147920012D44B /* LiveInterval.h */, - DE4DA03D091147920012D44B /* LiveIntervalAnalysis.h */, - DE66F23A08ABF03100323D32 /* LiveVariables.h */, - DE66F23B08ABF03100323D32 /* MachineBasicBlock.h */, - DE66F23C08ABF03100323D32 /* MachineCodeEmitter.h */, - DE66F23D08ABF03100323D32 /* MachineConstantPool.h */, - CF6F487109505E1500BC9E82 /* MachineModuleInfo.h */, - DE66F23E08ABF03100323D32 /* MachineFrameInfo.h */, - DE66F23F08ABF03100323D32 /* MachineFunction.h */, - DE66F24008ABF03100323D32 /* MachineFunctionPass.h */, - DE66F24108ABF03100323D32 /* MachineInstr.h */, - DE66F24208ABF03100323D32 /* MachineInstrBuilder.h */, - CFE420FB0A66F67300AB4BF6 /* MachineJumpTableInfo.h */, - CF6527D909D1A53400C4B521 /* MachineLocation.h */, - CF4F27E60A7B6E23004359F6 /* MachinePassRegistry.h */, - DE66F24308ABF03100323D32 /* MachineRelocation.h */, - 9F7793890C73C57100551F9C /* MachORelocation.h */, - DE66F24408ABF03100323D32 /* Passes.h */, - CFE21C780A80CC0600D3E908 /* RegAllocRegistry.h */, - 9FE25D920CAB169F005383FC /* RegisterCoalescer.h */, - 9F77938A0C73C57100551F9C /* RegisterScavenging.h */, - CF8F1B410B64F6D100BB4199 /* RuntimeLibcalls.h */, - DE66F24508ABF03100323D32 /* SchedGraphCommon.h */, - CF7FFA2109850864008B0087 /* ScheduleDAG.h */, - CFE21C7B0A80CC1C00D3E908 /* SchedulerRegistry.h */, - DE66F24608ABF03100323D32 /* SelectionDAG.h */, - DE66F24708ABF03100323D32 /* SelectionDAGISel.h */, - DE66F24808ABF03100323D32 /* SelectionDAGNodes.h */, - DE66F24B08ABF03100323D32 /* ValueTypes.h */, - CFE420FC0A66F67300AB4BF6 /* ValueTypes.td */, - ); - path = CodeGen; - sourceTree = ""; - }; - DE66F24C08ABF03100323D32 /* Config */ = { - isa = PBXGroup; - children = ( - DE66F24E08ABF03100323D32 /* alloca.h */, - CF73C0A9098A50FD00627152 /* config.h */, - DE66F25008ABF03100323D32 /* config.h.in */, - ); - path = Config; - sourceTree = ""; - }; - DE66F25308ABF03100323D32 /* Debugger */ = { - isa = PBXGroup; - children = ( - DE66F25408ABF03100323D32 /* Debugger.h */, - DE66F25508ABF03100323D32 /* InferiorProcess.h */, - DE66F25608ABF03100323D32 /* ProgramInfo.h */, - DE66F25708ABF03100323D32 /* RuntimeInfo.h */, - DE66F25808ABF03100323D32 /* SourceFile.h */, - DE66F25908ABF03100323D32 /* SourceLanguage.h */, - ); - path = Debugger; - sourceTree = ""; - }; - DE66F25B08ABF03100323D32 /* ExecutionEngine */ = { - isa = PBXGroup; - children = ( - DE66F25C08ABF03100323D32 /* ExecutionEngine.h */, - DE66F25D08ABF03100323D32 /* GenericValue.h */, - CFE420FD0A66F67300AB4BF6 /* Interpreter.h */, - CFE420FE0A66F67300AB4BF6 /* JIT.h */, - ); - path = ExecutionEngine; - sourceTree = ""; - }; - DE66F26E08ABF03200323D32 /* Support */ = { - isa = PBXGroup; - children = ( - F27C8CE90DAD2EF900A33844 /* IRBuilder.h */, - DE66F27008ABF03200323D32 /* AIXDataTypesFix.h */, - 9F5B90CE0D0CE89300CDFDEA /* AlignOf.h */, - CF8F1B430B64F74400BB4199 /* Allocator.h */, - DE66F27108ABF03200323D32 /* Annotation.h */, - DE66F27208ABF03200323D32 /* CallSite.h */, - DE66F27308ABF03200323D32 /* Casting.h */, - DE66F27408ABF03200323D32 /* CFG.h */, - DE66F27508ABF03200323D32 /* CommandLine.h */, - CF8F1B440B64F74400BB4199 /* Compiler.h */, - DE66F27708ABF03200323D32 /* ConstantRange.h */, - CF73C0AD098A519400627152 /* DataTypes.h */, - DE66F27908ABF03200323D32 /* DataTypes.h.in */, - DE66F27A08ABF03200323D32 /* Debug.h */, - DE66F27B08ABF03200323D32 /* DOTGraphTraits.h */, - DE66F27C08ABF03200323D32 /* DynamicLinker.h */, - DE66F27D08ABF03200323D32 /* ELF.h */, - CF8E00490989162500DA2399 /* Dwarf.h */, - DE66F27E08ABF03200323D32 /* FileUtilities.h */, - DE66F27F08ABF03200323D32 /* GetElementPtrTypeIterator.h */, - DE66F28008ABF03200323D32 /* GraphWriter.h */, - DE66F28108ABF03200323D32 /* InstIterator.h */, - DE66F28208ABF03200323D32 /* InstVisitor.h */, - DE66F28308ABF03200323D32 /* LeakDetector.h */, - CF8F1B460B64F74400BB4199 /* ManagedStatic.h */, - DE66F28408ABF03200323D32 /* Mangler.h */, - DE66F28508ABF03200323D32 /* MathExtras.h */, - 9F7794880C73D51000551F9C /* MemoryBuffer.h */, - DE66F28608ABF03200323D32 /* MutexGuard.h */, - CF8F1B470B64F74400BB4199 /* OutputBuffer.h */, - DE66F28708ABF03200323D32 /* PassNameParser.h */, - DE66F28808ABF03200323D32 /* PatternMatch.h */, - DE66F28908ABF03200323D32 /* PluginLoader.h */, - 9F5B90CF0D0CE89300CDFDEA /* Registry.h */, - DE66F28A08ABF03200323D32 /* SlowOperationInformer.h */, - DE66F28B08ABF03200323D32 /* StableBasicBlockNumbering.h */, - 9F7794890C73D51000551F9C /* Streams.h */, - 9F5B90D00D0CE89300CDFDEA /* StringPool.h */, - DE66F28C08ABF03200323D32 /* SystemUtils.h */, - DE66F28E08ABF03200323D32 /* Timer.h */, - DE66F29008ABF03200323D32 /* type_traits.h */, - ); - path = Support; - sourceTree = ""; - }; - DE66F29408ABF03200323D32 /* System */ = { - isa = PBXGroup; - children = ( - CF73C0AE098A51AD00627152 /* Alarm.h */, - 9FA638E70C77B222007F12AE /* Disassembler.h */, - DE66F29508ABF03200323D32 /* DynamicLibrary.h */, - CF9720340A9F3A41002CEEDD /* IncludeFile.h */, - DE66F29608ABF03200323D32 /* LICENSE.TXT */, - DE66F29708ABF03200323D32 /* MappedFile.h */, - DE66F29808ABF03200323D32 /* Memory.h */, - DE66F29908ABF03200323D32 /* Mutex.h */, - DE66F29A08ABF03200323D32 /* Path.h */, - DE66F29B08ABF03200323D32 /* Process.h */, - DE66F29C08ABF03200323D32 /* Program.h */, - DE66F29D08ABF03200323D32 /* Signals.h */, - DE66F29E08ABF03200323D32 /* TimeValue.h */, - ); - path = System; - sourceTree = ""; - }; - DE66F29F08ABF03200323D32 /* Target */ = { - isa = PBXGroup; - children = ( - DE66F2A008ABF03200323D32 /* TargetRegisterInfo.h */, - CF9BCD0808C74DE0001E7011 /* SubtargetFeature.h */, - CF47BD380AAF40BC00A8B13E /* TargetAsmInfo.h */, - DE66F2A108ABF03200323D32 /* TargetData.h */, - 9FA638E80C77B231007F12AE /* TargetELFWriterInfo.h */, - DE66F2A208ABF03200323D32 /* TargetFrameInfo.h */, - DE66F2A308ABF03200323D32 /* TargetInstrInfo.h */, - CF26835B09178F5500C5F253 /* TargetInstrItineraries.h */, - DE66F2A408ABF03200323D32 /* TargetJITInfo.h */, - DE66F2A508ABF03200323D32 /* TargetLowering.h */, - DE66F2A608ABF03200323D32 /* TargetMachine.h */, - DE66F2A708ABF03200323D32 /* TargetMachineRegistry.h */, - 8443EF210B66B62D00959964 /* TargetMachOWriterInfo.h */, - DE66F2A808ABF03200323D32 /* TargetOptions.h */, - DE66F2AA08ABF03200323D32 /* TargetSubtarget.h */, - ); - path = Target; - sourceTree = ""; - }; - DE66F2AB08ABF03200323D32 /* Transforms */ = { - isa = PBXGroup; - children = ( - DE66F2AC08ABF03200323D32 /* Instrumentation.h */, - 9FA638E90C77B252007F12AE /* IPO */, - DE66F2AD08ABF03200323D32 /* IPO.h */, - CF73C0AF098A51DD00627152 /* RSProfiling.h */, - DE66F2AF08ABF03200323D32 /* Scalar.h */, - DE66F2B008ABF03200323D32 /* Utils */, - ); - path = Transforms; - sourceTree = ""; - }; - DE66F2B008ABF03200323D32 /* Utils */ = { - isa = PBXGroup; - children = ( - DE66F2B108ABF03200323D32 /* BasicBlockUtils.h */, - 9FA638EB0C77B26B007F12AE /* BasicInliner.h */, - DE66F2B208ABF03200323D32 /* Cloning.h */, - DE66F2B308ABF03200323D32 /* FunctionUtils.h */, - 9FA638EC0C77B26B007F12AE /* InlineCost.h */, - DE66F2B408ABF03200323D32 /* Local.h */, - DE66F2B508ABF03200323D32 /* PromoteMemToReg.h */, - DE66F2B608ABF03200323D32 /* UnifyFunctionExitNodes.h */, - ); - path = Utils; - sourceTree = ""; - }; - DE66F2BD08ABF14400323D32 /* tools */ = { - isa = PBXGroup; - children = ( - CFD99ADF0AFE878F0068D19C /* opt */, - DE66F2CB08ABF14400323D32 /* bugpoint */, - DE66F2F008ABF14400323D32 /* gccld */, - DE66F31E08ABF14400323D32 /* llvm-db */, - DE66F33B08ABF14400323D32 /* llvm-ld */, - DE66F36808ABF14500323D32 /* llvmc */, - CF8F1B5E0B64FADA00BB4199 /* llvm-upgrade */, - CF8F1B7E0B64FADA00BB4199 /* llvm2cpp */, - CFD99ADA0AFE87650068D19C /* lto.cpp */, - DE66F30008ABF14400323D32 /* llc.cpp */, - DE66F30708ABF14400323D32 /* lli.cpp */, - DE66F30E08ABF14400323D32 /* llvm-ar.cpp */, - DE66F31508ABF14400323D32 /* llvm-as.cpp */, - DE66F31C08ABF14400323D32 /* llvm-bcanalyzer.cpp */, - DE66F33208ABF14400323D32 /* llvm-dis.cpp */, - DE66F33908ABF14400323D32 /* llvm-extract.cpp */, - DE66F34A08ABF14400323D32 /* llvm-link.cpp */, - DE66F35108ABF14400323D32 /* llvm-nm.cpp */, - DE66F35808ABF14500323D32 /* llvm-prof.cpp */, - DE66F35F08ABF14500323D32 /* llvm-ranlib.cpp */, - CF8F1B960B64FB7F00BB4199 /* lto */, - CF8F1BAB0B64FB8000BB4199 /* opt */, - ); - name = tools; - path = ../tools; - sourceTree = SOURCE_ROOT; - }; - DE66F2CB08ABF14400323D32 /* bugpoint */ = { - isa = PBXGroup; - children = ( - DE66F2CC08ABF14400323D32 /* BugDriver.cpp */, - DE66F2CD08ABF14400323D32 /* BugDriver.h */, - DE66F2CE08ABF14400323D32 /* bugpoint.cpp */, - DE66F2CF08ABF14400323D32 /* CrashDebugger.cpp */, - DE66F2E208ABF14400323D32 /* ExecutionDriver.cpp */, - DE66F2E308ABF14400323D32 /* ExtractFunction.cpp */, - CF9720910A9F3CC7002CEEDD /* FindBugs.cpp */, - DE66F2E408ABF14400323D32 /* ListReducer.h */, - DE66F2E608ABF14400323D32 /* Miscompilation.cpp */, - DE66F2E708ABF14400323D32 /* OptimizerDriver.cpp */, - DE66F2E808ABF14400323D32 /* TestPasses.cpp */, - CF9720920A9F3CC7002CEEDD /* ToolRunner.cpp */, - CF9720930A9F3CC7002CEEDD /* ToolRunner.h */, - ); - path = bugpoint; - sourceTree = ""; - }; - DE66F2F008ABF14400323D32 /* gccld */ = { - isa = PBXGroup; - children = ( - ); - path = gccld; - sourceTree = ""; - }; - DE66F31E08ABF14400323D32 /* llvm-db */ = { - isa = PBXGroup; - children = ( - DE66F31F08ABF14400323D32 /* CLICommand.h */, - DE66F32008ABF14400323D32 /* CLIDebugger.cpp */, - DE66F32108ABF14400323D32 /* CLIDebugger.h */, - DE66F32208ABF14400323D32 /* Commands.cpp */, - DE66F32B08ABF14400323D32 /* llvm-db.cpp */, - ); - path = "llvm-db"; - sourceTree = ""; - }; - DE66F33B08ABF14400323D32 /* llvm-ld */ = { - isa = PBXGroup; - children = ( - DE66F34208ABF14400323D32 /* llvm-ld.cpp */, - DE66F34408ABF14400323D32 /* Optimize.cpp */, - ); - path = "llvm-ld"; - sourceTree = ""; - }; - DE66F36808ABF14500323D32 /* llvmc */ = { - isa = PBXGroup; - children = ( - DE66F36908ABF14500323D32 /* c */, - DE66F36A08ABF14500323D32 /* CompilerDriver.cpp */, - DE66F36B08ABF14500323D32 /* CompilerDriver.h */, - CF8F1B950B64FB5000BB4199 /* ConfigLexer.cpp */, - DE66F36D08ABF14500323D32 /* ConfigLexer.h */, - DE66F36E08ABF14500323D32 /* ConfigLexer.l */, - DE66F36F08ABF14500323D32 /* Configuration.cpp */, - DE66F37008ABF14500323D32 /* Configuration.h */, - DE66F37108ABF14500323D32 /* cpp */, - DE66F37D08ABF14500323D32 /* ll */, - DE66F37E08ABF14500323D32 /* llvmc.cpp */, - ); - path = llvmc; - sourceTree = ""; - }; - DE66F38D08ABF35C00323D32 /* docs */ = { - isa = PBXGroup; - children = ( - F22627310DAE34D10008F441 /* tutorial */, - DE66F38F08ABF35C00323D32 /* AliasAnalysis.html */, - DE66F39008ABF35C00323D32 /* Bugpoint.html */, - DE66F39208ABF35C00323D32 /* GCCFEBuildInstrs.html */, - DE66F39308ABF35C00323D32 /* CodeGenerator.html */, - DE66F39408ABF35C00323D32 /* CodingStandards.html */, - DE66F39508ABF35C00323D32 /* CommandGuide */, - DE66F3B908ABF35D00323D32 /* CommandLine.html */, - DE66F3BA08ABF35D00323D32 /* CompilerDriver.html */, - DE66F3BB08ABF35D00323D32 /* CompilerWriterInfo.html */, - DE66F3BD08ABF35D00323D32 /* doxygen.cfg.in */, - DE66F3BE08ABF35D00323D32 /* doxygen.css */, - DE66F3BF08ABF35D00323D32 /* doxygen.footer */, - DE66F3C008ABF35D00323D32 /* doxygen.header */, - DE66F3C108ABF35D00323D32 /* doxygen.intro */, - DE66F3C208ABF35D00323D32 /* ExtendingLLVM.html */, - DE66F3C308ABF35D00323D32 /* FAQ.html */, - DE66F3C408ABF35D00323D32 /* GarbageCollection.html */, - DE66F3C508ABF35D00323D32 /* GettingStarted.html */, - DE66F3C608ABF35D00323D32 /* GettingStartedVS.html */, - DE66F3E408ABF35D00323D32 /* HowToSubmitABug.html */, - DE66F3E508ABF35D00323D32 /* img */, - DE66F3EB08ABF35D00323D32 /* index.html */, - DE66F3EC08ABF35D00323D32 /* LangRef.html */, - DE66F3ED08ABF35D00323D32 /* Lexicon.html */, - DE66F3EE08ABF35D00323D32 /* llvm.css */, - DE66F3F108ABF35D00323D32 /* MakefileGuide.html */, - DE66F3F208ABF35D00323D32 /* ProgrammersManual.html */, - DE66F3F308ABF35D00323D32 /* Projects.html */, - DE66F3F408ABF35D00323D32 /* ReleaseNotes.html */, - DE66F3F508ABF35D00323D32 /* SourceLevelDebugging.html */, - DE66F3F708ABF35D00323D32 /* SystemLibrary.html */, - DE66F3F808ABF35D00323D32 /* TableGenFundamentals.html */, - DE66F3F908ABF35D00323D32 /* TestingGuide.html */, - DE66F3FA08ABF35D00323D32 /* UsingLibraries.html */, - DE66F3FB08ABF35D00323D32 /* WritingAnLLVMBackend.html */, - DE66F3FC08ABF35D00323D32 /* WritingAnLLVMPass.html */, - ); - name = docs; - path = ../docs; - sourceTree = SOURCE_ROOT; - }; - DE66F39508ABF35C00323D32 /* CommandGuide */ = { - isa = PBXGroup; - children = ( - DE66F39808ABF35C00323D32 /* bugpoint.pod */, - DE66F39E08ABF35C00323D32 /* index.html */, - DE66F39F08ABF35C00323D32 /* llc.pod */, - DE66F3A008ABF35C00323D32 /* lli.pod */, - DE66F3A108ABF35C00323D32 /* llvm-ar.pod */, - DE66F3A208ABF35C00323D32 /* llvm-as.pod */, - DE66F3A308ABF35C00323D32 /* llvm-bcanalyzer.pod */, - DE66F3A408ABF35C00323D32 /* llvm-db.pod */, - DE66F3A508ABF35C00323D32 /* llvm-dis.pod */, - DE66F3A608ABF35C00323D32 /* llvm-extract.pod */, - DE66F3A708ABF35C00323D32 /* llvm-ld.pod */, - DE66F3A808ABF35C00323D32 /* llvm-link.pod */, - DE66F3A908ABF35C00323D32 /* llvm-nm.pod */, - DE66F3AA08ABF35C00323D32 /* llvm-prof.pod */, - DE66F3AB08ABF35C00323D32 /* llvm-ranlib.pod */, - DE66F3AC08ABF35C00323D32 /* llvmc.pod */, - DE66F3AD08ABF35C00323D32 /* llvmgcc.pod */, - DE66F3AE08ABF35C00323D32 /* llvmgxx.pod */, - DE66F3AF08ABF35C00323D32 /* Makefile */, - DE66F3B408ABF35D00323D32 /* manpage.css */, - DE66F3B508ABF35D00323D32 /* opt.pod */, - DE66F3B808ABF35D00323D32 /* stkrc.pod */, - ); - path = CommandGuide; - sourceTree = ""; - }; - DE66F3E508ABF35D00323D32 /* img */ = { - isa = PBXGroup; - children = ( - DE66F3E608ABF35D00323D32 /* Debugging.gif */, - DE66F3E708ABF35D00323D32 /* libdeps.gif */, - DE66F3E808ABF35D00323D32 /* lines.gif */, - DE66F3E908ABF35D00323D32 /* objdeps.gif */, - DE66F3EA08ABF35D00323D32 /* venusflytrap.jpg */, - ); - path = img; - sourceTree = ""; - }; - DE66F3FD08ABF37000323D32 /* examples */ = { - isa = PBXGroup; - children = ( - F22761DF0DAD09CD003D8065 /* BrainF.cpp */, - F22761E00DAD09CD003D8065 /* BrainF.h */, - F22761E10DAD09CD003D8065 /* BrainFDriver.cpp */, - DE66F40E08ABF37000323D32 /* fibonacci.cpp */, - DE66F41508ABF37000323D32 /* HowToUseJIT.cpp */, - DE66F41E08ABF37000323D32 /* ModuleMaker.cpp */, - DE66F42608ABF37000323D32 /* ParallelJIT.cpp */, - ); - name = examples; - path = ../examples; - sourceTree = SOURCE_ROOT; - }; - DE816FAC08CFB44C0093BDEF /* utils */ = { - isa = PBXGroup; - children = ( - DE81705708CFB44D0093BDEF /* TableGen */, - DE81704008CFB44D0093BDEF /* fpcmp.cpp */, - DE81704F08CFB44D0093BDEF /* NightlyTest.gnuplot */, - DE81705108CFB44D0093BDEF /* NightlyTestTemplate.html */, - ); - name = utils; - path = ../utils; - sourceTree = SOURCE_ROOT; - }; - DE81705708CFB44D0093BDEF /* TableGen */ = { - isa = PBXGroup; - children = ( - DE81705908CFB44D0093BDEF /* AsmWriterEmitter.cpp */, - DE81705A08CFB44D0093BDEF /* AsmWriterEmitter.h */, - DE81705B08CFB44D0093BDEF /* CodeEmitterGen.cpp */, - DE81705C08CFB44D0093BDEF /* CodeEmitterGen.h */, - DE81705D08CFB44D0093BDEF /* CodeGenInstruction.h */, - CF8F1BC90B64FBD500BB4199 /* CodeGenIntrinsics.h */, - DE81705E08CFB44D0093BDEF /* CodeGenRegisters.h */, - DE81705F08CFB44D0093BDEF /* CodeGenTarget.cpp */, - DE81706008CFB44D0093BDEF /* CodeGenTarget.h */, - DE81706708CFB44D0093BDEF /* DAGISelEmitter.cpp */, - DE81706808CFB44D0093BDEF /* DAGISelEmitter.h */, - CF9720970A9F3D4D002CEEDD /* IntrinsicEmitter.cpp */, - CF9720980A9F3D4D002CEEDD /* IntrinsicEmitter.h */, - DE81708908CFB44D0093BDEF /* InstrInfoEmitter.cpp */, - DE81708A08CFB44D0093BDEF /* InstrInfoEmitter.h */, - DE81708E08CFB44D0093BDEF /* Record.cpp */, - DE81708F08CFB44D0093BDEF /* Record.h */, - DE81709008CFB44D0093BDEF /* RegisterInfoEmitter.cpp */, - DE81709108CFB44D0093BDEF /* RegisterInfoEmitter.h */, - DE4DA065091148520012D44B /* SubtargetEmitter.cpp */, - DE4DA066091148520012D44B /* SubtargetEmitter.h */, - DE8170AA08CFB44D0093BDEF /* TableGen.cpp */, - DE8170AB08CFB44D0093BDEF /* TableGenBackend.cpp */, - DE8170AC08CFB44D0093BDEF /* TableGenBackend.h */, - CF490E300907BBF80072DB1C /* SubtargetEmitter.cpp */, - CF490E2F0907BBF80072DB1C /* SubtargetEmitter.h */, - ); - path = TableGen; - sourceTree = ""; - }; - F22627310DAE34D10008F441 /* tutorial */ = { - isa = PBXGroup; - children = ( - F22627320DAE34D10008F441 /* index.html */, - F22627330DAE34D20008F441 /* JITTutorial1.html */, - F22627340DAE34D20008F441 /* JITTutorial2-1.png */, - F22627350DAE34D20008F441 /* JITTutorial2.html */, - F22627360DAE34D20008F441 /* LangImpl1.html */, - F22627370DAE34D20008F441 /* LangImpl2.html */, - F22627380DAE34D20008F441 /* LangImpl3.html */, - F22627390DAE34D20008F441 /* LangImpl4.html */, - F226273A0DAE34D20008F441 /* LangImpl5-cfg.png */, - F226273B0DAE34D20008F441 /* LangImpl5.html */, - F226273C0DAE34D20008F441 /* LangImpl6.html */, - F226273D0DAE34D20008F441 /* LangImpl7.html */, - F226273E0DAE34D20008F441 /* LangImpl8.html */, - F226273F0DAE34D20008F441 /* Makefile */, - F22627400DAE34D20008F441 /* OCamlLangImpl1.html */, - F22627410DAE34D20008F441 /* OCamlLangImpl2.html */, - F22627420DAE34D20008F441 /* OCamlLangImpl3.html */, - F22627430DAE34D20008F441 /* OCamlLangImpl4.html */, - F22627440DAE34D20008F441 /* OCamlLangImpl5.html */, - F22627450DAE34D20008F441 /* OCamlLangImpl6.html */, - F22627460DAE34D20008F441 /* OCamlLangImpl7.html */, - ); - path = tutorial; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXLegacyTarget section */ - CF0329B608D1BE110030FD33 /* LLVM lib */ = { - isa = PBXLegacyTarget; - buildArgumentsString = "$(ACTION) -j 2"; - buildConfigurationList = CF0329B708D1BE530030FD33 /* Build configuration list for PBXLegacyTarget "LLVM lib" */; - buildPhases = ( - ); - buildToolPath = /usr/bin/make; - buildWorkingDirectory = "$(SRCROOT)/../lib"; - dependencies = ( - ); - name = "LLVM lib"; - passBuildSettingsInEnvironment = 0; - productName = "LLVM lib"; - }; - CF0329BB08D1BE5D0030FD33 /* LLVM llc */ = { - isa = PBXLegacyTarget; - buildArgumentsString = "$(ACTION) -j 2"; - buildConfigurationList = CF0329C308D1BEC40030FD33 /* Build configuration list for PBXLegacyTarget "LLVM llc" */; - buildPhases = ( - ); - buildToolPath = /usr/bin/make; - buildWorkingDirectory = "$(SRCROOT)/../tools/llc"; - dependencies = ( - ); - name = "LLVM llc"; - passBuildSettingsInEnvironment = 0; - productName = "LLVM llc"; - }; - CF490E830907CDAB0072DB1C /* LLVM TableGen */ = { - isa = PBXLegacyTarget; - buildArgumentsString = "$(ACTION) -j 2"; - buildConfigurationList = CF490E840907CDAB0072DB1C /* Build configuration list for PBXLegacyTarget "LLVM TableGen" */; - buildPhases = ( - ); - buildToolPath = /usr/bin/make; - buildWorkingDirectory = "${SRCROOT}/../utils/TableGen"; - dependencies = ( - ); - name = "LLVM TableGen"; - passBuildSettingsInEnvironment = 0; - productName = "LLVM llc"; - }; - CFDF86BD0ADE819D00D40A3D /* LLVM lib release */ = { - isa = PBXLegacyTarget; - buildArgumentsString = "$(ACTION) -j 2 ENABLE_OPTIMIZED=1 DISABLE_ASSERTIONS=1"; - buildConfigurationList = CFDF86BE0ADE819D00D40A3D /* Build configuration list for PBXLegacyTarget "LLVM lib release" */; - buildPhases = ( - ); - buildToolPath = /usr/bin/make; - buildWorkingDirectory = "$(SRCROOT)/../lib"; - dependencies = ( - ); - name = "LLVM lib release"; - passBuildSettingsInEnvironment = 0; - productName = "LLVM lib"; - }; - CFDF86C60ADE81D000D40A3D /* LLVM llc release */ = { - isa = PBXLegacyTarget; - buildArgumentsString = "$(ACTION) -j 2 ENABLE_OPTIMIZED=1 DISABLE_ASSERTIONS=1"; - buildConfigurationList = CFDF86C70ADE81D000D40A3D /* Build configuration list for PBXLegacyTarget "LLVM llc release" */; - buildPhases = ( - ); - buildToolPath = /usr/bin/make; - buildWorkingDirectory = "$(SRCROOT)/../tools/llc"; - dependencies = ( - ); - name = "LLVM llc release"; - passBuildSettingsInEnvironment = 0; - productName = "LLVM llc"; - }; - D28A88AD04BDD90700651E21 /* LLVM */ = { - isa = PBXLegacyTarget; - buildArgumentsString = "$(ACTION) -j 2"; - buildConfigurationList = DE66EC4C08ABE78900323D32 /* Build configuration list for PBXLegacyTarget "LLVM" */; - buildPhases = ( - ); - buildToolPath = /usr/bin/make; - buildWorkingDirectory = "$(SRCROOT)/../"; - dependencies = ( - ); - name = LLVM; - passBuildSettingsInEnvironment = 0; - productName = LLVM; - }; -/* End PBXLegacyTarget section */ - -/* Begin PBXProject section */ - 08FB7793FE84155DC02AAC07 /* Project object */ = { - isa = PBXProject; - buildConfigurationList = DE66EC5008ABE78900323D32 /* Build configuration list for PBXProject "LLVM" */; - compatibilityVersion = "Xcode 2.4"; - hasScannedForEncodings = 1; - mainGroup = 08FB7794FE84155DC02AAC07 /* LLVM */; - productRefGroup = 721CA1750D0B44D200D5004F /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - D28A88AD04BDD90700651E21 /* LLVM */, - CF0329B608D1BE110030FD33 /* LLVM lib */, - CF0329BB08D1BE5D0030FD33 /* LLVM llc */, - CF0329BC08D1BE8E0030FD33 /* LLVM full llc */, - CF490E830907CDAB0072DB1C /* LLVM TableGen */, - CFDF86BD0ADE819D00D40A3D /* LLVM lib release */, - CFDF86C60ADE81D000D40A3D /* LLVM llc release */, - CFDF86D00ADE820000D40A3D /* LLVM full llc release */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXTargetDependency section */ - CF0329BE08D1BE970030FD33 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = CF0329B608D1BE110030FD33 /* LLVM lib */; - targetProxy = CF0329BD08D1BE970030FD33 /* PBXContainerItemProxy */; - }; - CF0329C008D1BE9B0030FD33 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = CF0329BB08D1BE5D0030FD33 /* LLVM llc */; - targetProxy = CF0329BF08D1BE9B0030FD33 /* PBXContainerItemProxy */; - }; - CFDF86DA0ADE822100D40A3D /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = CFDF86BD0ADE819D00D40A3D /* LLVM lib release */; - targetProxy = CFDF86D90ADE822100D40A3D /* PBXContainerItemProxy */; - }; - CFDF86DC0ADE822100D40A3D /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = CFDF86C60ADE81D000D40A3D /* LLVM llc release */; - targetProxy = CFDF86DB0ADE822100D40A3D /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - CF0329B808D1BE530030FD33 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM lib"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Debug; - }; - CF0329B908D1BE530030FD33 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM lib"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Release; - }; - CF0329C408D1BEC40030FD33 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM llc"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Debug; - }; - CF0329C508D1BEC40030FD33 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM llc"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Release; - }; - CF0329C808D1BEC40030FD33 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM full llc"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Debug; - }; - CF0329C908D1BEC40030FD33 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM full llc"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Release; - }; - CF490E850907CDAB0072DB1C /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM TableGen"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Debug; - }; - CF490E860907CDAB0072DB1C /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM llc"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Release; - }; - CFDF86BF0ADE819D00D40A3D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM lib"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Debug; - }; - CFDF86C00ADE819D00D40A3D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM lib"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Release; - }; - CFDF86C80ADE81D000D40A3D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM llc"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Debug; - }; - CFDF86C90ADE81D000D40A3D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM llc"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Release; - }; - CFDF86D60ADE820000D40A3D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM full llc"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Debug; - }; - CFDF86D70ADE820000D40A3D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM full llc"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Release; - }; - DE66EC4D08ABE78900323D32 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - DEBUGGING_SYMBOLS = YES; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - PRODUCT_NAME = LLVM; - ZERO_LINK = YES; - }; - name = Debug; - }; - DE66EC4E08ABE78900323D32 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - ENABLE_OPTIMIZED = 1; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - PRODUCT_NAME = LLVM; - ZERO_LINK = NO; - }; - name = Release; - }; - DE66EC5108ABE78900323D32 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - DEBUG_INFORMATION_FORMAT = dwarf; - GCC_OPTIMIZATION_LEVEL = 0; - USER_HEADER_SEARCH_PATHS = "../include/**"; - }; - name = Debug; - }; - DE66EC5208ABE78900323D32 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - DEBUG_INFORMATION_FORMAT = dwarf; - USER_HEADER_SEARCH_PATHS = "../include/**"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - CF0329B708D1BE530030FD33 /* Build configuration list for PBXLegacyTarget "LLVM lib" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - CF0329B808D1BE530030FD33 /* Debug */, - CF0329B908D1BE530030FD33 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - CF0329C308D1BEC40030FD33 /* Build configuration list for PBXLegacyTarget "LLVM llc" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - CF0329C408D1BEC40030FD33 /* Debug */, - CF0329C508D1BEC40030FD33 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - CF0329C708D1BEC40030FD33 /* Build configuration list for PBXAggregateTarget "LLVM full llc" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - CF0329C808D1BEC40030FD33 /* Debug */, - CF0329C908D1BEC40030FD33 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - CF490E840907CDAB0072DB1C /* Build configuration list for PBXLegacyTarget "LLVM TableGen" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - CF490E850907CDAB0072DB1C /* Debug */, - CF490E860907CDAB0072DB1C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - CFDF86BE0ADE819D00D40A3D /* Build configuration list for PBXLegacyTarget "LLVM lib release" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - CFDF86BF0ADE819D00D40A3D /* Debug */, - CFDF86C00ADE819D00D40A3D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - CFDF86C70ADE81D000D40A3D /* Build configuration list for PBXLegacyTarget "LLVM llc release" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - CFDF86C80ADE81D000D40A3D /* Debug */, - CFDF86C90ADE81D000D40A3D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - CFDF86D50ADE820000D40A3D /* Build configuration list for PBXAggregateTarget "LLVM full llc release" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - CFDF86D60ADE820000D40A3D /* Debug */, - CFDF86D70ADE820000D40A3D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - DE66EC4C08ABE78900323D32 /* Build configuration list for PBXLegacyTarget "LLVM" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DE66EC4D08ABE78900323D32 /* Debug */, - DE66EC4E08ABE78900323D32 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - DE66EC5008ABE78900323D32 /* Build configuration list for PBXProject "LLVM" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DE66EC5108ABE78900323D32 /* Debug */, - DE66EC5208ABE78900323D32 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; -/* End XCConfigurationList section */ - }; - rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; -} Removed: llvm/trunk/Xcode/README.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Xcode/README.txt?rev=96911&view=auto ============================================================================== --- llvm/trunk/Xcode/README.txt (original) +++ llvm/trunk/Xcode/README.txt (removed) @@ -1 +0,0 @@ -Xcode project files for LLVM, for Xcode 2.1 From foldr at codedgers.com Tue Feb 23 03:04:13 2010 From: foldr at codedgers.com (Mikhail Glushenkov) Date: Tue, 23 Feb 2010 09:04:13 -0000 Subject: [llvm-commits] [llvm] r96916 - in /llvm/trunk: include/llvm/CompilerDriver/Common.td utils/TableGen/LLVMCConfigurationEmitter.cpp Message-ID: <20100223090413.B02F02A6C12C@llvm.org> Author: foldr Date: Tue Feb 23 03:04:13 2010 New Revision: 96916 URL: http://llvm.org/viewvc/llvm-project?rev=96916&view=rev Log: Add a way to enable '-opt=foo' forwarding. Modified: llvm/trunk/include/llvm/CompilerDriver/Common.td llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp Modified: llvm/trunk/include/llvm/CompilerDriver/Common.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CompilerDriver/Common.td?rev=96916&r1=96915&r2=96916&view=diff ============================================================================== --- llvm/trunk/include/llvm/CompilerDriver/Common.td (original) +++ llvm/trunk/include/llvm/CompilerDriver/Common.td Tue Feb 23 03:04:13 2010 @@ -46,6 +46,7 @@ def really_hidden; def required; def comma_separated; +def forward_not_split; // The 'case' construct. def case; Modified: llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp?rev=96916&r1=96915&r2=96916&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp Tue Feb 23 03:04:13 2010 @@ -229,7 +229,7 @@ enum OptionDescriptionFlags { Required = 0x1, Hidden = 0x2, ReallyHidden = 0x4, Extern = 0x8, OneOrMore = 0x10, Optional = 0x20, - CommaSeparated = 0x40 }; + CommaSeparated = 0x40, ForwardNotSplit = 0x80 }; } /// OptionDescription - Represents data contained in a single @@ -271,6 +271,9 @@ bool isExtern() const; void setExtern(); + bool isForwardNotSplit() const; + void setForwardNotSplit(); + bool isRequired() const; void setRequired(); @@ -327,6 +330,13 @@ Flags |= OptionDescriptionFlags::CommaSeparated; } +bool OptionDescription::isForwardNotSplit() const { + return Flags & OptionDescriptionFlags::ForwardNotSplit; +} +void OptionDescription::setForwardNotSplit() { + Flags |= OptionDescriptionFlags::ForwardNotSplit; +} + bool OptionDescription::isExtern() const { return Flags & OptionDescriptionFlags::Extern; } @@ -586,6 +596,8 @@ AddHandler("required", &CollectOptionProperties::onRequired); AddHandler("optional", &CollectOptionProperties::onOptional); AddHandler("comma_separated", &CollectOptionProperties::onCommaSeparated); + AddHandler("forward_not_split", + &CollectOptionProperties::onForwardNotSplit); staticMembersInitialized_ = true; } @@ -629,6 +641,13 @@ optDesc_.setCommaSeparated(); } + void onForwardNotSplit (const DagInit& d) { + CheckNumberOfArguments(d, 0); + if (!optDesc_.isParameter()) + throw "'forward_not_split' is valid only for parameter options!"; + optDesc_.setForwardNotSplit(); + } + void onRequired (const DagInit& d) { CheckNumberOfArguments(d, 0); if (optDesc_.isOneOrMore() || optDesc_.isOptional()) @@ -1792,8 +1811,16 @@ O.indent(IndentLevel) << "vec.push_back(\"" << Name << "\");\n"; break; case OptionType::Parameter: - O.indent(IndentLevel) << "vec.push_back(\"" << Name << "\");\n"; - O.indent(IndentLevel) << "vec.push_back(" << D.GenVariableName() << ");\n"; + O.indent(IndentLevel) << "vec.push_back(\"" << Name; + + if (!D.isForwardNotSplit()) { + O << "\");\n"; + O.indent(IndentLevel) << "vec.push_back(" + << D.GenVariableName() << ");\n"; + } + else { + O << "=\" + " << D.GenVariableName() << ");\n"; + } break; case OptionType::Prefix: O.indent(IndentLevel) << "vec.push_back(\"" << Name << "\" + " From foldr at codedgers.com Tue Feb 23 03:04:18 2010 From: foldr at codedgers.com (Mikhail Glushenkov) Date: Tue, 23 Feb 2010 09:04:18 -0000 Subject: [llvm-commits] [llvm] r96917 - /llvm/trunk/tools/llvmc/plugins/Base/Base.td.in Message-ID: <20100223090418.B89612A6C12D@llvm.org> Author: foldr Date: Tue Feb 23 03:04:18 2010 New Revision: 96917 URL: http://llvm.org/viewvc/llvm-project?rev=96917&view=rev Log: Support '-install_name'. Modified: llvm/trunk/tools/llvmc/plugins/Base/Base.td.in Modified: llvm/trunk/tools/llvmc/plugins/Base/Base.td.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/plugins/Base/Base.td.in?rev=96917&r1=96916&r2=96917&view=diff ============================================================================== --- llvm/trunk/tools/llvmc/plugins/Base/Base.td.in (original) +++ llvm/trunk/tools/llvmc/plugins/Base/Base.td.in Tue Feb 23 03:04:18 2010 @@ -105,6 +105,8 @@ (help "Remove unreachable blocks of code")), (switch_option "single_module", (hidden), (help "Build the library so it contains only one module")), + (parameter_option "install_name", (hidden), + (help "File name the library will be installed in")), (parameter_option "compatibility_version", (hidden), (help "Compatibility version number")), (parameter_option "current_version", (hidden), @@ -258,8 +260,8 @@ (switch_on "single_module"), (forward "single_module"), (not_empty "compatibility_version"), (forward "compatibility_version"), - (not_empty "current_version"), - (forward "current_version"))) + (not_empty "current_version"), (forward "current_version"), + (not_empty "install_name"), (forward "install_name"))) ]>; // Default linker From foldr at codedgers.com Tue Feb 23 03:04:28 2010 From: foldr at codedgers.com (Mikhail Glushenkov) Date: Tue, 23 Feb 2010 09:04:28 -0000 Subject: [llvm-commits] [llvm] r96918 - in /llvm/trunk: include/llvm/CompilerDriver/Common.td include/llvm/CompilerDriver/Tool.h lib/CompilerDriver/CompilationGraph.cpp lib/CompilerDriver/Main.cpp tools/llvmc/plugins/Base/Base.td.in utils/TableGen/LLVMCConfigurationEmitter.cpp Message-ID: <20100223090428.B67FD2A6C12C@llvm.org> Author: foldr Date: Tue Feb 23 03:04:28 2010 New Revision: 96918 URL: http://llvm.org/viewvc/llvm-project?rev=96918&view=rev Log: New experimental/undocumented feature: 'works_on_empty'. For now, just enough support to make -filelist work. Modified: llvm/trunk/include/llvm/CompilerDriver/Common.td llvm/trunk/include/llvm/CompilerDriver/Tool.h llvm/trunk/lib/CompilerDriver/CompilationGraph.cpp llvm/trunk/lib/CompilerDriver/Main.cpp llvm/trunk/tools/llvmc/plugins/Base/Base.td.in llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp Modified: llvm/trunk/include/llvm/CompilerDriver/Common.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CompilerDriver/Common.td?rev=96918&r1=96917&r2=96918&view=diff ============================================================================== --- llvm/trunk/include/llvm/CompilerDriver/Common.td (original) +++ llvm/trunk/include/llvm/CompilerDriver/Common.td Tue Feb 23 03:04:28 2010 @@ -23,6 +23,7 @@ def cmd_line; def join; def sink; +def works_on_empty; def actions; // Possible option types. Modified: llvm/trunk/include/llvm/CompilerDriver/Tool.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CompilerDriver/Tool.h?rev=96918&r1=96917&r2=96918&view=diff ============================================================================== --- llvm/trunk/include/llvm/CompilerDriver/Tool.h (original) +++ llvm/trunk/include/llvm/CompilerDriver/Tool.h Tue Feb 23 03:04:28 2010 @@ -28,7 +28,7 @@ typedef std::vector PathVector; typedef llvm::StringSet<> InputLanguagesSet; - /// Tool - A class + /// Tool - Represents a single tool. class Tool : public llvm::RefCountedBaseVPTR { public: @@ -51,6 +51,7 @@ virtual const char* OutputLanguage() const = 0; virtual bool IsJoin() const = 0; + virtual bool WorksOnEmpty() const = 0; protected: /// OutFileName - Generate the output file name. Modified: llvm/trunk/lib/CompilerDriver/CompilationGraph.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CompilerDriver/CompilationGraph.cpp?rev=96918&r1=96917&r2=96918&view=diff ============================================================================== --- llvm/trunk/lib/CompilerDriver/CompilationGraph.cpp (original) +++ llvm/trunk/lib/CompilerDriver/CompilationGraph.cpp Tue Feb 23 03:04:28 2010 @@ -313,7 +313,7 @@ JoinTool* JT = &dynamic_cast(*CurNode->ToolPtr.getPtr()); // Are there any files in the join list? - if (JT->JoinListEmpty()) + if (JT->JoinListEmpty() && !(JT->WorksOnEmpty() && InputFilenames.empty())) continue; Action CurAction = JT->GenerateAction(CurNode->HasChildren(), Modified: llvm/trunk/lib/CompilerDriver/Main.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CompilerDriver/Main.cpp?rev=96918&r1=96917&r2=96918&view=diff ============================================================================== --- llvm/trunk/lib/CompilerDriver/Main.cpp (original) +++ llvm/trunk/lib/CompilerDriver/Main.cpp Tue Feb 23 03:04:28 2010 @@ -126,10 +126,6 @@ return 0; } - if (InputFilenames.empty()) { - throw std::runtime_error("no input files"); - } - if (Time) { GlobalTimeLog = new std::stringstream; GlobalTimeLog->precision(2); Modified: llvm/trunk/tools/llvmc/plugins/Base/Base.td.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/plugins/Base/Base.td.in?rev=96918&r1=96917&r2=96918&view=diff ============================================================================== --- llvm/trunk/tools/llvmc/plugins/Base/Base.td.in (original) +++ llvm/trunk/tools/llvmc/plugins/Base/Base.td.in Tue Feb 23 03:04:28 2010 @@ -76,6 +76,8 @@ (help "Specifies a framework to link against")), (parameter_list_option "weak_framework", (help "Specifies a framework to weakly link against"), (hidden)), + (parameter_option "filelist", (hidden), + (help "Link the files listed in file")), (prefix_list_option "F", (help "Add a directory to framework search path")), (prefix_list_option "I", @@ -242,6 +244,8 @@ (out_language "executable"), (output_suffix "out"), (cmd_line !strconcat(cmd_prefix, " $INFILE -o $OUTFILE")), + (works_on_empty (case (not_empty "filelist"), true, + (default), false)), (join), (actions (case (switch_on "pthread"), (append_cmd "-lpthread"), @@ -250,6 +254,7 @@ (not_empty "arch"), (forward "arch"), (not_empty "framework"), (forward "framework"), (not_empty "weak_framework"), (forward "weak_framework"), + (not_empty "filelist"), (forward "filelist"), (switch_on "m32"), (forward "m32"), (switch_on "m64"), (forward "m64"), (not_empty "l"), (forward "l"), Modified: llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp?rev=96918&r1=96917&r2=96918&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp Tue Feb 23 03:04:28 2010 @@ -783,6 +783,7 @@ std::string OutLanguage; std::string OutputSuffix; unsigned Flags; + const Init* OnEmpty; // Various boolean properties void setSink() { Flags |= ToolFlags::Sink; } @@ -792,9 +793,9 @@ // Default ctor here is needed because StringMap can only store // DefaultConstructible objects - ToolDescription() : CmdLine(0), Actions(0), Flags(0) {} + ToolDescription() : CmdLine(0), Actions(0), Flags(0), OnEmpty(0) {} ToolDescription (const std::string& n) - : Name(n), CmdLine(0), Actions(0), Flags(0) + : Name(n), CmdLine(0), Actions(0), Flags(0), OnEmpty(0) {} }; @@ -831,6 +832,7 @@ AddHandler("out_language", &CollectToolProperties::onOutLanguage); AddHandler("output_suffix", &CollectToolProperties::onOutputSuffix); AddHandler("sink", &CollectToolProperties::onSink); + AddHandler("works_on_empty", &CollectToolProperties::onWorksOnEmpty); staticMembersInitialized_ = true; } @@ -907,6 +909,10 @@ toolDesc_.setSink(); } + void onWorksOnEmpty (const DagInit& d) { + toolDesc_.OnEmpty = d.getArg(0); + } + }; /// CollectToolDescriptions - Gather information about tool properties @@ -1509,7 +1515,7 @@ /// EmitCaseConstructHandler - Emit code that handles the 'case' /// construct. Takes a function object that should emit code for every case /// clause. Implemented on top of WalkCase. -/// Callback's type is void F(Init* Statement, unsigned IndentLevel, +/// Callback's type is void F(const Init* Statement, unsigned IndentLevel, /// raw_ostream& O). /// EmitElseIf parameter controls the type of condition that is emitted ('if /// (..) {..} else if (..) {} .. else {..}' vs. 'if (..) {..} if(..) {..} @@ -2221,6 +2227,29 @@ O.indent(Indent1) << "}\n\n"; } +/// EmitWorksOnEmptyCallback - Callback used by EmitWorksOnEmptyMethod in +/// conjunction with EmitCaseConstructHandler. +void EmitWorksOnEmptyCallback (const Init* Value, + unsigned IndentLevel, raw_ostream& O) { + CheckBooleanConstant(Value); + O.indent(IndentLevel) << "return " << Value->getAsString() << ";\n"; +} + +/// EmitWorksOnEmptyMethod - Emit the WorksOnEmpty() method for a given Tool +/// class. +void EmitWorksOnEmptyMethod (const ToolDescription& D, + const OptionDescriptions& OptDescs, + raw_ostream& O) +{ + O.indent(Indent1) << "bool WorksOnEmpty() const {\n"; + if (D.OnEmpty == 0) + O.indent(Indent2) << "return false;\n"; + else + EmitCaseConstructHandler(D.OnEmpty, Indent2, EmitWorksOnEmptyCallback, + /*EmitElseIf = */ true, OptDescs, O); + O.indent(Indent1) << "}\n\n"; +} + /// EmitStaticMemberDefinitions - Emit static member definitions for a /// given Tool class. void EmitStaticMemberDefinitions(const ToolDescription& D, raw_ostream& O) { @@ -2255,6 +2284,7 @@ EmitNameMethod(D, O); EmitInOutLanguageMethods(D, O); EmitIsJoinMethod(D, O); + EmitWorksOnEmptyMethod(D, OptDescs, O); EmitGenerateActionMethods(D, OptDescs, O); // Close class definition From foldr at codedgers.com Tue Feb 23 03:04:33 2010 From: foldr at codedgers.com (Mikhail Glushenkov) Date: Tue, 23 Feb 2010 09:04:33 -0000 Subject: [llvm-commits] [llvm] r96919 - /llvm/trunk/tools/llvmc/plugins/Base/Base.td.in Message-ID: <20100223090433.A24532A6C12D@llvm.org> Author: foldr Date: Tue Feb 23 03:04:33 2010 New Revision: 96919 URL: http://llvm.org/viewvc/llvm-project?rev=96919&view=rev Log: Precompiled headers: initial support. Modified: llvm/trunk/tools/llvmc/plugins/Base/Base.td.in Modified: llvm/trunk/tools/llvmc/plugins/Base/Base.td.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/plugins/Base/Base.td.in?rev=96919&r1=96918&r2=96919&view=diff ============================================================================== --- llvm/trunk/tools/llvmc/plugins/Base/Base.td.in (original) +++ llvm/trunk/tools/llvmc/plugins/Base/Base.td.in Tue Feb 23 03:04:33 2010 @@ -130,10 +130,11 @@ // Tools -class llvm_gcc_based : Tool< +class llvm_gcc_based : Tool< [(in_language in_lang), (out_language "llvm-bitcode"), - (output_suffix "bc"), + (output_suffix out_lang), (cmd_line (case (switch_on "E"), (case (not_empty "o"), @@ -180,12 +181,24 @@ (sink) ]>; -def llvm_gcc_c : llvm_gcc_based<"@LLVMGCCCOMMAND@ -x c", "c", "i">; -def llvm_gcc_cpp : llvm_gcc_based<"@LLVMGXXCOMMAND@ -x c++", "c++", "i">; +def llvm_gcc_c : llvm_gcc_based<"@LLVMGCCCOMMAND@ -x c", "c", "i", "bc">; +def llvm_gcc_cpp : llvm_gcc_based<"@LLVMGXXCOMMAND@ -x c++", "c++", "i", "bc">; def llvm_gcc_m : llvm_gcc_based<"@LLVMGCCCOMMAND@ -x objective-c", - "objective-c", "mi">; + "objective-c", "mi", "bc">; def llvm_gcc_mxx : llvm_gcc_based<"@LLVMGCCCOMMAND@ -x objective-c++", - "objective-c++", "mi">; + "objective-c++", "mi", "bc">; + +def llvm_gcc_c_pch : llvm_gcc_based<"@LLVMGCCCOMMAND@ -x c-header", + "c-header", "i", "gch">; +def llvm_gcc_cpp_pch : llvm_gcc_based<"@LLVMGXXCOMMAND@ -x c++-header", + "c++-header", + "i", "gch">; +def llvm_gcc_m_pch : llvm_gcc_based<"@LLVMGCCCOMMAND@ -x objective-c-header", + "objective-c-header", + "mi", "gch">; +def llvm_gcc_mxx_pch + : llvm_gcc_based<"@LLVMGCCCOMMAND@ -x objective-c++-header", + "objective-c++-header", "mi", "gch">; def opt : Tool< [(in_language "llvm-bitcode"), @@ -278,11 +291,15 @@ def LanguageMap : LanguageMap< [LangToSuffixes<"c++", ["cc", "cp", "cxx", "cpp", "CPP", "c++", "C"]>, + LangToSuffixes<"c++-header", ["hpp"]>, LangToSuffixes<"c", ["c"]>, + LangToSuffixes<"c-header", ["h"]>, LangToSuffixes<"c-cpp-output", ["i"]>, LangToSuffixes<"objective-c-cpp-output", ["mi"]>, LangToSuffixes<"objective-c++", ["mm"]>, + LangToSuffixes<"objective-c++-header", ["hmm"]>, LangToSuffixes<"objective-c", ["m"]>, + LangToSuffixes<"objective-c-header", ["hm"]>, LangToSuffixes<"assembler", ["s"]>, LangToSuffixes<"assembler-with-cpp", ["S"]>, LangToSuffixes<"llvm-assembler", ["ll"]>, @@ -301,6 +318,11 @@ Edge<"root", "llvm_gcc_mxx">, Edge<"root", "llc">, + Edge<"root", "llvm_gcc_c_pch">, + Edge<"root", "llvm_gcc_cpp_pch">, + Edge<"root", "llvm_gcc_m_pch">, + Edge<"root", "llvm_gcc_mxx_pch">, + Edge<"llvm_gcc_c", "llc">, Edge<"llvm_gcc_cpp", "llc">, Edge<"llvm_gcc_m", "llc">, From foldr at codedgers.com Tue Feb 23 03:04:44 2010 From: foldr at codedgers.com (Mikhail Glushenkov) Date: Tue, 23 Feb 2010 09:04:44 -0000 Subject: [llvm-commits] [llvm] r96920 - in /llvm/trunk: include/llvm/CompilerDriver/Common.td include/llvm/CompilerDriver/Tool.h lib/CompilerDriver/Tool.cpp tools/llvmc/Makefile tools/llvmc/plugins/Base/Base.td.in tools/llvmc/plugins/Clang/Clang.td utils/TableGen/LLVMCConfigurationEmitter.cpp Message-ID: <20100223090444.722732A6C12C@llvm.org> Author: foldr Date: Tue Feb 23 03:04:44 2010 New Revision: 96920 URL: http://llvm.org/viewvc/llvm-project?rev=96920&view=rev Log: Correct option forwarding: initial implementation. Does not work, but the infrastructure changes are in place. Modified: llvm/trunk/include/llvm/CompilerDriver/Common.td llvm/trunk/include/llvm/CompilerDriver/Tool.h llvm/trunk/lib/CompilerDriver/Tool.cpp llvm/trunk/tools/llvmc/Makefile llvm/trunk/tools/llvmc/plugins/Base/Base.td.in llvm/trunk/tools/llvmc/plugins/Clang/Clang.td llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp Modified: llvm/trunk/include/llvm/CompilerDriver/Common.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CompilerDriver/Common.td?rev=96920&r1=96919&r2=96920&view=diff ============================================================================== --- llvm/trunk/include/llvm/CompilerDriver/Common.td (original) +++ llvm/trunk/include/llvm/CompilerDriver/Common.td Tue Feb 23 03:04:44 2010 @@ -20,7 +20,9 @@ def in_language; def out_language; def output_suffix; -def cmd_line; +def command; +def out_file_option; +def in_file_option; def join; def sink; def works_on_empty; @@ -83,6 +85,7 @@ def forward_value; def forward_transformed_value; def stop_compilation; +def no_out_file; def unpack_values; def warning; def error; Modified: llvm/trunk/include/llvm/CompilerDriver/Tool.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CompilerDriver/Tool.h?rev=96920&r1=96919&r2=96920&view=diff ============================================================================== --- llvm/trunk/include/llvm/CompilerDriver/Tool.h (original) +++ llvm/trunk/include/llvm/CompilerDriver/Tool.h Tue Feb 23 03:04:44 2010 @@ -20,12 +20,16 @@ #include "llvm/ADT/StringSet.h" #include "llvm/System/Path.h" +#include #include +#include namespace llvmc { class LanguageMap; + typedef std::vector > ArgsVector; typedef std::vector PathVector; + typedef std::vector StrVector; typedef llvm::StringSet<> InputLanguagesSet; /// Tool - Represents a single tool. @@ -59,6 +63,8 @@ const llvm::sys::Path& TempDir, bool StopCompilation, const char* OutputSuffix) const; + + StrVector SortArgs(ArgsVector& Args) const; }; /// JoinTool - A Tool that has an associated input file list. Modified: llvm/trunk/lib/CompilerDriver/Tool.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CompilerDriver/Tool.cpp?rev=96920&r1=96919&r2=96920&view=diff ============================================================================== --- llvm/trunk/lib/CompilerDriver/Tool.cpp (original) +++ llvm/trunk/lib/CompilerDriver/Tool.cpp Tue Feb 23 03:04:44 2010 @@ -71,3 +71,12 @@ } return Out; } + +StrVector Tool::SortArgs(ArgsVector& Args) const { + StrVector Out; + + for (ArgsVector::iterator B = Args.begin(), E = Args.end(); B != E; ++B) + Out.push_back(B->second); + + return Out; +} Modified: llvm/trunk/tools/llvmc/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/Makefile?rev=96920&r1=96919&r2=96920&view=diff ============================================================================== --- llvm/trunk/tools/llvmc/Makefile (original) +++ llvm/trunk/tools/llvmc/Makefile Tue Feb 23 03:04:44 2010 @@ -10,7 +10,7 @@ LEVEL = ../.. export LLVMC_BASED_DRIVER_NAME = llvmc -export LLVMC_BUILTIN_PLUGINS = Base Clang +export LLVMC_BUILTIN_PLUGINS = Base REQUIRES_RTTI = 1 DIRS = plugins driver Modified: llvm/trunk/tools/llvmc/plugins/Base/Base.td.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/plugins/Base/Base.td.in?rev=96920&r1=96919&r2=96920&view=diff ============================================================================== --- llvm/trunk/tools/llvmc/plugins/Base/Base.td.in (original) +++ llvm/trunk/tools/llvmc/plugins/Base/Base.td.in Tue Feb 23 03:04:44 2010 @@ -134,28 +134,26 @@ string E_ext, string out_lang> : Tool< [(in_language in_lang), (out_language "llvm-bitcode"), - (output_suffix out_lang), - (cmd_line (case - (switch_on "E"), - (case (not_empty "o"), - !strconcat(cmd_prefix, " -E $INFILE -o $OUTFILE"), - (default), - !strconcat(cmd_prefix, " -E $INFILE")), - (switch_on "fsyntax-only"), - !strconcat(cmd_prefix, " -fsyntax-only $INFILE"), - (and (switch_on "S"), (switch_on "emit-llvm")), - !strconcat(cmd_prefix, " -S $INFILE -o $OUTFILE -emit-llvm"), - (default), - !strconcat(cmd_prefix, " -c $INFILE -o $OUTFILE -emit-llvm"))), + (output_suffix "bc"), + (command cmd_prefix), (actions (case - (and (multiple_input_files), (or (switch_on "S"), (switch_on "c"))), + (and (not_empty "o"), + (multiple_input_files), (or (switch_on "S"), (switch_on "c"))), (error "cannot specify -o with -c or -S with multiple files"), - (switch_on "E"), [(stop_compilation), (output_suffix E_ext)], + (switch_on "E"), + [(forward "E"), (stop_compilation), (output_suffix E_ext)], + (and (switch_on "E"), (empty "o")), (no_out_file), (switch_on ["emit-llvm", "S"]), [(output_suffix "ll"), (stop_compilation)], (switch_on ["emit-llvm", "c"]), (stop_compilation), - (switch_on "fsyntax-only"), (stop_compilation), + (switch_on "fsyntax-only"), [(forward "fsyntax-only"), + (no_out_file), (stop_compilation)], + (switch_on ["S", "emit-llvm"]), [(forward "S"), (forward "emit-llvm")], + (not (or (switch_on ["S", "emit-llvm"]), (switch_on "fsyntax-only"))), + [(append_cmd "-c"), (append_cmd "-emit-llvm")], + + // Forwards (not_empty "include"), (forward "include"), (not_empty "iquote"), (forward "iquote"), (not_empty "save-temps"), (append_cmd "-save-temps"), @@ -208,14 +206,14 @@ (switch_on "O1"), (forward "O1"), (switch_on "O2"), (forward "O2"), (switch_on "O3"), (forward "O3"))), - (cmd_line "opt -f $INFILE -o $OUTFILE") + (command "opt -f") ]>; def llvm_as : Tool< [(in_language "llvm-assembler"), (out_language "llvm-bitcode"), (output_suffix "bc"), - (cmd_line "llvm-as $INFILE -o $OUTFILE"), + (command "llvm-as"), (actions (case (switch_on "emit-llvm"), (stop_compilation))) ]>; @@ -223,7 +221,7 @@ [(in_language "assembler"), (out_language "object-code"), (output_suffix "o"), - (cmd_line "@LLVMGCCCOMMAND@ -c -x assembler $INFILE -o $OUTFILE"), + (command "@LLVMGCCCOMMAND@ -c -x assembler"), (actions (case (switch_on "c"), (stop_compilation), (not_empty "arch"), (forward "arch"), @@ -234,7 +232,7 @@ [(in_language ["llvm-bitcode", "llvm-assembler"]), (out_language "assembler"), (output_suffix "s"), - (cmd_line "llc -f $INFILE -o $OUTFILE"), + (command "llc -f"), (actions (case (switch_on "S"), (stop_compilation), (switch_on "O0"), (forward "O0"), @@ -256,7 +254,7 @@ [(in_language "object-code"), (out_language "executable"), (output_suffix "out"), - (cmd_line !strconcat(cmd_prefix, " $INFILE -o $OUTFILE")), + (command cmd_prefix), (works_on_empty (case (not_empty "filelist"), true, (default), false)), (join), Modified: llvm/trunk/tools/llvmc/plugins/Clang/Clang.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/plugins/Clang/Clang.td?rev=96920&r1=96919&r2=96920&view=diff ============================================================================== --- llvm/trunk/tools/llvmc/plugins/Clang/Clang.td (original) +++ llvm/trunk/tools/llvmc/plugins/Clang/Clang.td Tue Feb 23 03:04:44 2010 @@ -1,12 +1,3 @@ -// A replacement for the Clang's ccc script. -// Depends on the Base plugin. -// To compile, use this command: -// -// cd $LLVMC2_DIR -// make DRIVER_NAME=ccc2 BUILTIN_PLUGINS=Clang -// -// Or just use the default llvmc, which now has this plugin enabled. - include "llvm/CompilerDriver/Common.td" def Priority : PluginPriority<1>; Modified: llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp?rev=96920&r1=96919&r2=96920&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp Tue Feb 23 03:04:44 2010 @@ -43,6 +43,7 @@ const unsigned Indent1 = TabWidth*1; const unsigned Indent2 = TabWidth*2; const unsigned Indent3 = TabWidth*3; +const unsigned Indent4 = TabWidth*4; // Default help string. const char * const DefaultHelpString = "NO HELP MESSAGE PROVIDED"; @@ -780,6 +781,8 @@ Init* CmdLine; Init* Actions; StrVector InLanguage; + std::string InFileOption; + std::string OutFileOption; std::string OutLanguage; std::string OutputSuffix; unsigned Flags; @@ -793,9 +796,13 @@ // Default ctor here is needed because StringMap can only store // DefaultConstructible objects - ToolDescription() : CmdLine(0), Actions(0), Flags(0), OnEmpty(0) {} + ToolDescription () + : CmdLine(0), Actions(0), OutFileOption("-o"), + Flags(0), OnEmpty(0) + {} ToolDescription (const std::string& n) - : Name(n), CmdLine(0), Actions(0), Flags(0), OnEmpty(0) + : Name(n), CmdLine(0), Actions(0), OutFileOption("-o"), + Flags(0), OnEmpty(0) {} }; @@ -826,10 +833,14 @@ if (!staticMembersInitialized_) { AddHandler("actions", &CollectToolProperties::onActions); - AddHandler("cmd_line", &CollectToolProperties::onCmdLine); + AddHandler("command", &CollectToolProperties::onCommand); AddHandler("in_language", &CollectToolProperties::onInLanguage); AddHandler("join", &CollectToolProperties::onJoin); AddHandler("out_language", &CollectToolProperties::onOutLanguage); + + AddHandler("out_file_option", &CollectToolProperties::onOutFileOption); + AddHandler("in_file_option", &CollectToolProperties::onInFileOption); + AddHandler("output_suffix", &CollectToolProperties::onOutputSuffix); AddHandler("sink", &CollectToolProperties::onSink); AddHandler("works_on_empty", &CollectToolProperties::onWorksOnEmpty); @@ -857,7 +868,7 @@ toolDesc_.Actions = Case; } - void onCmdLine (const DagInit& d) { + void onCommand (const DagInit& d) { CheckNumberOfArguments(d, 1); toolDesc_.CmdLine = d.getArg(0); } @@ -899,6 +910,16 @@ toolDesc_.OutLanguage = InitPtrToString(d.getArg(0)); } + void onOutFileOption (const DagInit& d) { + CheckNumberOfArguments(d, 1); + toolDesc_.OutFileOption = InitPtrToString(d.getArg(0)); + } + + void onInFileOption (const DagInit& d) { + CheckNumberOfArguments(d, 1); + toolDesc_.InFileOption = InitPtrToString(d.getArg(0)); + } + void onOutputSuffix (const DagInit& d) { CheckNumberOfArguments(d, 1); toolDesc_.OutputSuffix = InitPtrToString(d.getArg(0)); @@ -1724,82 +1745,41 @@ if (StrVec.empty()) throw "Tool '" + ToolName + "' has empty command line!"; - StrVector::const_iterator I = StrVec.begin(), E = StrVec.end(); + StrVector::const_iterator B = StrVec.begin(), E = StrVec.end(); - // If there is a hook invocation on the place of the first command, skip it. + // Emit the command itself. assert(!StrVec[0].empty()); + O.indent(IndentLevel) << "cmd = "; if (StrVec[0][0] == '$') { - while (I != E && (*I)[0] != ')' ) - ++I; - - // Skip the ')' symbol. - ++I; + B = SubstituteSpecialCommands(B, E, IsJoin, O); + ++B; } else { - ++I; + O << '"' << StrVec[0] << '"'; + ++B; } + O << ";\n"; - bool hasINFILE = false; + // Go through the command arguments. + assert(B <= E); + for (; B != E; ++B) { + const std::string& cmd = *B; - for (; I != E; ++I) { - const std::string& cmd = *I; assert(!cmd.empty()); O.indent(IndentLevel); + if (cmd.at(0) == '$') { - if (cmd == "$INFILE") { - hasINFILE = true; - if (IsJoin) { - O << "for (PathVector::const_iterator B = inFiles.begin()" - << ", E = inFiles.end();\n"; - O.indent(IndentLevel) << "B != E; ++B)\n"; - O.indent(IndentLevel + Indent1) << "vec.push_back(B->str());\n"; - } - else { - O << "vec.push_back(inFile.str());\n"; - } - } - else if (cmd == "$OUTFILE") { - O << "vec.push_back(\"\");\n"; - O.indent(IndentLevel) << "out_file_index = vec.size()-1;\n"; - } - else { - O << "vec.push_back("; - I = SubstituteSpecialCommands(I, E, IsJoin, O); - O << ");\n"; - } + O << "vec.push_back(std::make_pair(0, "; + B = SubstituteSpecialCommands(B, E, IsJoin, O); + O << "));\n"; } else { - O << "vec.push_back(\"" << cmd << "\");\n"; + O << "vec.push_back(std::make_pair(0, \"" << cmd << "\"));\n"; } } - if (!hasINFILE) - throw "Tool '" + ToolName + "' doesn't take any input!"; - O.indent(IndentLevel) << "cmd = "; - if (StrVec[0][0] == '$') - SubstituteSpecialCommands(StrVec.begin(), StrVec.end(), IsJoin, O); - else - O << '"' << StrVec[0] << '"'; - O << ";\n"; } -/// EmitCmdLineVecFillCallback - A function object wrapper around -/// EmitCmdLineVecFill(). Used by EmitGenerateActionMethod() as an -/// argument to EmitCaseConstructHandler(). -class EmitCmdLineVecFillCallback { - bool IsJoin; - const std::string& ToolName; - public: - EmitCmdLineVecFillCallback(bool J, const std::string& TN) - : IsJoin(J), ToolName(TN) {} - - void operator()(const Init* Statement, unsigned IndentLevel, - raw_ostream& O) const - { - EmitCmdLineVecFill(Statement, ToolName, IsJoin, IndentLevel, O); - } -}; - /// EmitForwardOptionPropertyHandlingCode - Helper function used to /// implement EmitActionHandler. Emits code for /// handling the (forward) and (forward_as) option properties. @@ -1814,23 +1794,25 @@ switch (D.Type) { case OptionType::Switch: - O.indent(IndentLevel) << "vec.push_back(\"" << Name << "\");\n"; + O.indent(IndentLevel) + << "vec.push_back(std::make_pair(0, \"" << Name << "\"));\n"; break; case OptionType::Parameter: - O.indent(IndentLevel) << "vec.push_back(\"" << Name; + O.indent(IndentLevel) << "vec.push_back(std::make_pair(0, \"" << Name; if (!D.isForwardNotSplit()) { - O << "\");\n"; - O.indent(IndentLevel) << "vec.push_back(" - << D.GenVariableName() << ");\n"; + O << "\"));\n"; + O.indent(IndentLevel) << "vec.push_back(std::make_pair(0, " + << D.GenVariableName() << "));\n"; } else { - O << "=\" + " << D.GenVariableName() << ");\n"; + O << "=\" + " << D.GenVariableName() << "));\n"; } break; case OptionType::Prefix: - O.indent(IndentLevel) << "vec.push_back(\"" << Name << "\" + " - << D.GenVariableName() << ");\n"; + O.indent(IndentLevel) << "vec.push_back(std::make_pair(0, \"" + << Name << "\" + " + << D.GenVariableName() << "));\n"; break; case OptionType::PrefixList: O.indent(IndentLevel) @@ -1838,11 +1820,12 @@ << "::iterator B = " << D.GenVariableName() << ".begin(),\n"; O.indent(IndentLevel) << "E = " << D.GenVariableName() << ".end(); B != E;) {\n"; - O.indent(IndentLevel1) << "vec.push_back(\"" << Name << "\" + " << "*B);\n"; + O.indent(IndentLevel1) << "vec.push_back(std::make_pair(0, \"" + << Name << "\" + " << "*B));\n"; O.indent(IndentLevel1) << "++B;\n"; for (int i = 1, j = D.MultiVal; i < j; ++i) { - O.indent(IndentLevel1) << "vec.push_back(*B);\n"; + O.indent(IndentLevel1) << "vec.push_back(std::make_pair(0, *B));\n"; O.indent(IndentLevel1) << "++B;\n"; } @@ -1854,10 +1837,11 @@ << D.GenVariableName() << ".begin(),\n"; O.indent(IndentLevel) << "E = " << D.GenVariableName() << ".end() ; B != E;) {\n"; - O.indent(IndentLevel1) << "vec.push_back(\"" << Name << "\");\n"; + O.indent(IndentLevel1) << "vec.push_back(std::make_pair(0, \"" + << Name << "\"));\n"; for (int i = 0, j = D.MultiVal; i < j; ++i) { - O.indent(IndentLevel1) << "vec.push_back(*B);\n"; + O.indent(IndentLevel1) << "vec.push_back(std::make_pair(0, *B));\n"; O.indent(IndentLevel1) << "++B;\n"; } @@ -1939,7 +1923,8 @@ { CheckNumberOfArguments(Dag, 1); this->EmitHookInvocation(InitPtrToString(Dag.getArg(0)), - "vec.push_back(", ");\n", IndentLevel, O); + "vec.push_back(std::make_pair(0, ", "));\n", + IndentLevel, O); } void onForward (const DagInit& Dag, @@ -1969,13 +1954,18 @@ const OptionDescription& D = OptDescs.FindListOrParameter(Name); if (D.isParameter()) { - O.indent(IndentLevel) << "vec.push_back(" - << D.GenVariableName() << ");\n"; + O.indent(IndentLevel) << "vec.push_back(std::make_pair(0, " + << D.GenVariableName() << "));\n"; } else { - O.indent(IndentLevel) << "std::copy(" << D.GenVariableName() - << ".begin(), " << D.GenVariableName() - << ".end(), std::back_inserter(vec));\n"; + O.indent(IndentLevel) << "for (cl::list::iterator B = " + << D.GenVariableName() << ".begin(), \n"; + O.indent(IndentLevel + Indent1) << " E = " << D.GenVariableName() + << ".end(); B != E; ++B)\n"; + O.indent(IndentLevel) << "{\n"; + O.indent(IndentLevel + Indent1) + << "vec.push_back(std::make_pair(0, *B));\n"; + O.indent(IndentLevel) << "}\n"; } } @@ -1987,9 +1977,16 @@ const std::string& Hook = InitPtrToString(Dag.getArg(1)); const OptionDescription& D = OptDescs.FindListOrParameter(Name); - O.indent(IndentLevel) << "vec.push_back(" << "hooks::" + O.indent(IndentLevel) << "vec.push_back(std::make_pair(0, " << "hooks::" << Hook << "(" << D.GenVariableName() - << (D.isParameter() ? ".c_str()" : "") << "));\n"; + << (D.isParameter() ? ".c_str()" : "") << ")));\n"; + } + + void onNoOutFile (const DagInit& Dag, + unsigned IndentLevel, raw_ostream& O) const + { + CheckNumberOfArguments(Dag, 0); + O.indent(IndentLevel) << "no_out_file = true;\n"; } void onOutputSuffix (const DagInit& Dag, @@ -2028,12 +2025,15 @@ AddHandler("forward_value", &EmitActionHandlersCallback::onForwardValue); AddHandler("forward_transformed_value", &EmitActionHandlersCallback::onForwardTransformedValue); + AddHandler("no_out_file", + &EmitActionHandlersCallback::onNoOutFile); AddHandler("output_suffix", &EmitActionHandlersCallback::onOutputSuffix); AddHandler("stop_compilation", &EmitActionHandlersCallback::onStopCompilation); AddHandler("unpack_values", &EmitActionHandlersCallback::onUnpackValues); + staticMembersInitialized_ = true; } } @@ -2045,58 +2045,6 @@ } }; -bool IsOutFileIndexCheckRequiredStr (const Init* CmdLine) { - StrVector StrVec; - TokenizeCmdLine(InitPtrToString(CmdLine), StrVec); - - for (StrVector::const_iterator I = StrVec.begin(), E = StrVec.end(); - I != E; ++I) { - if (*I == "$OUTFILE") - return false; - } - - return true; -} - -class IsOutFileIndexCheckRequiredStrCallback { - bool* ret_; - -public: - IsOutFileIndexCheckRequiredStrCallback(bool* ret) : ret_(ret) - {} - - void operator()(const Init* CmdLine) { - // Ignore nested 'case' DAG. - if (typeid(*CmdLine) == typeid(DagInit)) - return; - - if (IsOutFileIndexCheckRequiredStr(CmdLine)) - *ret_ = true; - } - - void operator()(const DagInit* Test, unsigned, bool) { - this->operator()(Test); - } - void operator()(const Init* Statement, unsigned) { - this->operator()(Statement); - } -}; - -bool IsOutFileIndexCheckRequiredCase (Init* CmdLine) { - bool ret = false; - WalkCase(CmdLine, Id(), IsOutFileIndexCheckRequiredStrCallback(&ret)); - return ret; -} - -/// IsOutFileIndexCheckRequired - Should we emit an "out_file_index != -1" check -/// in EmitGenerateActionMethod() ? -bool IsOutFileIndexCheckRequired (Init* CmdLine) { - if (typeid(*CmdLine) == typeid(StringInit)) - return IsOutFileIndexCheckRequiredStr(CmdLine); - else - return IsOutFileIndexCheckRequiredCase(CmdLine); -} - void EmitGenerateActionMethodHeader(const ToolDescription& D, bool IsJoin, raw_ostream& O) { @@ -2111,8 +2059,10 @@ O.indent(Indent2) << "const LanguageMap& LangMap) const\n"; O.indent(Indent1) << "{\n"; O.indent(Indent2) << "std::string cmd;\n"; - O.indent(Indent2) << "std::vector vec;\n"; + O.indent(Indent2) << "std::string out_file;\n"; + O.indent(Indent2) << "std::vector > vec;\n"; O.indent(Indent2) << "bool stop_compilation = !HasChildren;\n"; + O.indent(Indent2) << "bool no_out_file = false;\n"; O.indent(Indent2) << "const char* output_suffix = \"" << D.OutputSuffix << "\";\n"; } @@ -2128,46 +2078,61 @@ if (!D.CmdLine) throw "Tool " + D.Name + " has no cmd_line property!"; - bool IndexCheckRequired = IsOutFileIndexCheckRequired(D.CmdLine); - O.indent(Indent2) << "int out_file_index" - << (IndexCheckRequired ? " = -1" : "") - << ";\n\n"; - - // Process the cmd_line property. - if (typeid(*D.CmdLine) == typeid(StringInit)) - EmitCmdLineVecFill(D.CmdLine, D.Name, IsJoin, Indent2, O); - else - EmitCaseConstructHandler(D.CmdLine, Indent2, - EmitCmdLineVecFillCallback(IsJoin, D.Name), - true, OptDescs, O); + // Process the 'command' property. + O << '\n'; + EmitCmdLineVecFill(D.CmdLine, D.Name, IsJoin, Indent2, O); + O << '\n'; - // For every understood option, emit handling code. + // Process the 'actions' list of this tool. if (D.Actions) EmitCaseConstructHandler(D.Actions, Indent2, EmitActionHandlersCallback(OptDescs), false, OptDescs, O); - O << '\n'; - O.indent(Indent2) - << "std::string out_file = OutFilename(" - << (IsJoin ? "sys::Path(),\n" : "inFile,\n"); - O.indent(Indent3) << "TempDir, stop_compilation, output_suffix).str();\n\n"; - - if (IndexCheckRequired) - O.indent(Indent2) << "if (out_file_index != -1)\n"; - O.indent(IndexCheckRequired ? Indent3 : Indent2) - << "vec[out_file_index] = out_file;\n"; + + // Input file (s) + if (!D.InFileOption.empty()) { + O.indent(Indent2) << "vec.push_back(std::make_pair(0, \"" + << D.InFileOption << "\");\n"; + } + + if (IsJoin) { + O.indent(Indent2) + << "for (PathVector::const_iterator B = inFiles.begin(),\n"; + O.indent(Indent3) << "E = inFiles.end(); B != E; ++B)\n"; + O.indent(Indent2) << "{\n"; + O.indent(Indent3) << "vec.push_back(std::make_pair(0, B->str()));\n"; + O.indent(Indent2) << "}\n"; + } + else { + O.indent(Indent2) << "vec.push_back(std::make_pair(0, inFile.str()));\n"; + } + + // Output file + O.indent(Indent2) << "if (!no_out_file) {\n"; + if (!D.OutFileOption.empty()) + O.indent(Indent3) << "vec.push_back(std::make_pair(0, \"" + << D.OutFileOption << "\"));\n"; + + O.indent(Indent3) << "out_file = this->OutFilename(" + << (IsJoin ? "sys::Path(),\n" : "inFile,\n"); + O.indent(Indent4) << "TempDir, stop_compilation, output_suffix).str();\n\n"; + O.indent(Indent3) << "vec.push_back(std::make_pair(0, out_file));\n"; + + O.indent(Indent2) << "}\n\n"; // Handle the Sink property. if (D.isSink()) { O.indent(Indent2) << "if (!" << SinkOptionName << ".empty()) {\n"; - O.indent(Indent3) << "vec.insert(vec.end(), " - << SinkOptionName << ".begin(), " << SinkOptionName - << ".end());\n"; + O.indent(Indent3) << "for (cl::list::iterator B = " + << SinkOptionName << ".begin(), E = " << SinkOptionName + << ".end(); B != E; ++B)\n"; + O.indent(Indent4) << "vec.push_back(std::make_pair(0, *B));\n"; O.indent(Indent2) << "}\n"; } - O.indent(Indent2) << "return Action(cmd, vec, stop_compilation, out_file);\n"; + O.indent(Indent2) << "return Action(cmd, this->SortArgs(vec), " + << "stop_compilation, out_file);\n"; O.indent(Indent1) << "}\n\n"; } @@ -3038,7 +3003,7 @@ CollectPluginData(Records, Data); CheckPluginData(Data); - EmitSourceFileHeader("LLVMC Configuration Library", O); + this->EmitSourceFileHeader("LLVMC Configuration Library", O); EmitPluginCode(Data, O); } catch (std::exception& Error) { From foldr at codedgers.com Tue Feb 23 03:04:52 2010 From: foldr at codedgers.com (Mikhail Glushenkov) Date: Tue, 23 Feb 2010 09:04:52 -0000 Subject: [llvm-commits] [llvm] r96921 - in /llvm/trunk/test/LLVMC: AppendCmdHook.td EnvParentheses.td ExternOptions.td ForwardAs.td ForwardTransformedValue.td ForwardValue.td HookWithArguments.td HookWithInFile.td Init.td MultiValuedOption.td NoActions.td OneOrMore.td OptionPreprocessor.td Message-ID: <20100223090452.2B3912A6C12C@llvm.org> Author: foldr Date: Tue Feb 23 03:04:51 2010 New Revision: 96921 URL: http://llvm.org/viewvc/llvm-project?rev=96921&view=rev Log: Update the test suite. Modified: llvm/trunk/test/LLVMC/AppendCmdHook.td llvm/trunk/test/LLVMC/EnvParentheses.td llvm/trunk/test/LLVMC/ExternOptions.td llvm/trunk/test/LLVMC/ForwardAs.td llvm/trunk/test/LLVMC/ForwardTransformedValue.td llvm/trunk/test/LLVMC/ForwardValue.td llvm/trunk/test/LLVMC/HookWithArguments.td llvm/trunk/test/LLVMC/HookWithInFile.td llvm/trunk/test/LLVMC/Init.td llvm/trunk/test/LLVMC/MultiValuedOption.td llvm/trunk/test/LLVMC/NoActions.td llvm/trunk/test/LLVMC/OneOrMore.td llvm/trunk/test/LLVMC/OptionPreprocessor.td Modified: llvm/trunk/test/LLVMC/AppendCmdHook.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/AppendCmdHook.td?rev=96921&r1=96920&r2=96921&view=diff ============================================================================== --- llvm/trunk/test/LLVMC/AppendCmdHook.td (original) +++ llvm/trunk/test/LLVMC/AppendCmdHook.td Tue Feb 23 03:04:51 2010 @@ -13,14 +13,14 @@ ]>; def dummy_tool : Tool<[ -(cmd_line "dummy_cmd $INFILE"), +(command "dummy_cmd"), (in_language "dummy_lang"), (out_language "dummy_lang"), (actions (case - // CHECK: push_back("-arg1") - // CHECK: push_back("-arg2") + // CHECK: , "-arg1")); + // CHECK: , "-arg2")); (switch_on "dummy1"), (append_cmd "-arg1 -arg2"), - // CHECK: push_back("-arg3") + // CHECK: , "-arg3")); // CHECK: hooks::MyHook() (switch_on "dummy2"), (append_cmd "-arg3 $CALL(MyHook)"))) ]>; Modified: llvm/trunk/test/LLVMC/EnvParentheses.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/EnvParentheses.td?rev=96921&r1=96920&r2=96921&view=diff ============================================================================== --- llvm/trunk/test/LLVMC/EnvParentheses.td (original) +++ llvm/trunk/test/LLVMC/EnvParentheses.td Tue Feb 23 03:04:51 2010 @@ -1,13 +1,13 @@ // Check the fix for PR4157. // http://llvm.org/bugs/show_bug.cgi?id=4157 // RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t -// RUN: not grep {)));} %t +// RUN: not grep {FOO")));} %t // RUN: %compile_cxx -fexceptions -x c++ %t include "llvm/CompilerDriver/Common.td" def dummy_tool : Tool<[ -(cmd_line "gcc -o $OUTFILE $INFILE $ENV(FOO)/bar"), +(command "gcc $ENV(FOO)/bar"), (in_language "dummy"), (out_language "dummy") ]>; Modified: llvm/trunk/test/LLVMC/ExternOptions.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/ExternOptions.td?rev=96921&r1=96920&r2=96921&view=diff ============================================================================== --- llvm/trunk/test/LLVMC/ExternOptions.td (original) +++ llvm/trunk/test/LLVMC/ExternOptions.td Tue Feb 23 03:04:51 2010 @@ -13,7 +13,7 @@ (prefix_list_option "L", (extern))]>; def dummy_tool : Tool<[ -(cmd_line "dummy_cmd $INFILE"), +(command "dummy_cmd"), (in_language "dummy"), (out_language "dummy"), (actions (case Modified: llvm/trunk/test/LLVMC/ForwardAs.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/ForwardAs.td?rev=96921&r1=96920&r2=96921&view=diff ============================================================================== --- llvm/trunk/test/LLVMC/ForwardAs.td (original) +++ llvm/trunk/test/LLVMC/ForwardAs.td Tue Feb 23 03:04:51 2010 @@ -9,11 +9,11 @@ def OptList : OptionList<[(parameter_option "dummy", (extern))]>; def dummy_tool : Tool<[ -(cmd_line "dummy_cmd $INFILE"), +(command "dummy_cmd"), (in_language "dummy"), (out_language "dummy"), (actions (case - // CHECK: vec.push_back("unique_name") + // CHECK: "unique_name")); (not_empty "dummy"), (forward_as "dummy", "unique_name"))) ]>; Modified: llvm/trunk/test/LLVMC/ForwardTransformedValue.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/ForwardTransformedValue.td?rev=96921&r1=96920&r2=96921&view=diff ============================================================================== --- llvm/trunk/test/LLVMC/ForwardTransformedValue.td (original) +++ llvm/trunk/test/LLVMC/ForwardTransformedValue.td Tue Feb 23 03:04:51 2010 @@ -13,7 +13,7 @@ // CHECK: std::string HookB def dummy_tool : Tool<[ -(cmd_line "dummy_cmd $INFILE"), +(command "dummy_cmd"), (in_language "dummy"), (out_language "dummy"), (actions (case Modified: llvm/trunk/test/LLVMC/ForwardValue.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/ForwardValue.td?rev=96921&r1=96920&r2=96921&view=diff ============================================================================== --- llvm/trunk/test/LLVMC/ForwardValue.td (original) +++ llvm/trunk/test/LLVMC/ForwardValue.td Tue Feb 23 03:04:51 2010 @@ -10,13 +10,13 @@ (prefix_list_option "b", (extern))]>; def dummy_tool : Tool<[ -(cmd_line "dummy_cmd $INFILE"), +(command "dummy_cmd"), (in_language "dummy"), (out_language "dummy"), (actions (case - // CHECK: vec.push_back(AutoGeneratedParameter_a) + // CHECK: , AutoGeneratedParameter_a)); (not_empty "a"), (forward_value "a"), - // CHECK: std::copy(AutoGeneratedList_b.begin() + // CHECK: B = AutoGeneratedList_b.begin() (not_empty "b"), (forward_value "b"))) ]>; Modified: llvm/trunk/test/LLVMC/HookWithArguments.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/HookWithArguments.td?rev=96921&r1=96920&r2=96921&view=diff ============================================================================== --- llvm/trunk/test/LLVMC/HookWithArguments.td (original) +++ llvm/trunk/test/LLVMC/HookWithArguments.td Tue Feb 23 03:04:51 2010 @@ -6,12 +6,12 @@ include "llvm/CompilerDriver/Common.td" // CHECK: Hook(const char* Arg0, const char* Arg1, const char* Arg2); +// CHECK: "/path" // CHECK: std::getenv("VARIABLE") // CHECK: "/2path" -// CHECK: "/path" def dummy_tool : Tool<[ -(cmd_line "$CALL(Hook, 'Arg1', 'Arg2', 'Arg3 Arg3Cont')/path arg1 $ENV(VARIABLE)/2path arg2 $INFILE"), +(command "$CALL(Hook, 'Arg1', 'Arg2', 'Arg3 Arg3Cont')/path arg1 $ENV(VARIABLE)/2path arg2"), (in_language "dummy"), (out_language "dummy") ]>; Modified: llvm/trunk/test/LLVMC/HookWithInFile.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/HookWithInFile.td?rev=96921&r1=96920&r2=96921&view=diff ============================================================================== --- llvm/trunk/test/LLVMC/HookWithInFile.td (original) +++ llvm/trunk/test/LLVMC/HookWithInFile.td Tue Feb 23 03:04:51 2010 @@ -7,7 +7,7 @@ def dummy_tool : Tool<[ // CHECK: Hook(inFile.c_str()) -(cmd_line "$CALL(Hook, '$INFILE')/path $INFILE"), +(command "$CALL(Hook, '$INFILE')/path"), (in_language "dummy"), (out_language "dummy") ]>; Modified: llvm/trunk/test/LLVMC/Init.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/Init.td?rev=96921&r1=96920&r2=96921&view=diff ============================================================================== --- llvm/trunk/test/LLVMC/Init.td (original) +++ llvm/trunk/test/LLVMC/Init.td Tue Feb 23 03:04:51 2010 @@ -13,7 +13,7 @@ ]>; def dummy_tool : Tool<[ -(cmd_line "dummy_cmd $INFILE"), +(command "dummy_cmd"), (in_language "dummy_lang"), (out_language "dummy_lang"), (actions (case Modified: llvm/trunk/test/LLVMC/MultiValuedOption.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/MultiValuedOption.td?rev=96921&r1=96920&r2=96921&view=diff ============================================================================== --- llvm/trunk/test/LLVMC/MultiValuedOption.td (original) +++ llvm/trunk/test/LLVMC/MultiValuedOption.td Tue Feb 23 03:04:51 2010 @@ -12,7 +12,7 @@ (parameter_list_option "baz", (multi_val 2), (extern))]>; def dummy_tool : Tool<[ -(cmd_line "dummy_cmd $INFILE"), +(command "dummy_cmd"), (in_language "dummy"), (out_language "dummy"), (actions (case Modified: llvm/trunk/test/LLVMC/NoActions.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/NoActions.td?rev=96921&r1=96920&r2=96921&view=diff ============================================================================== --- llvm/trunk/test/LLVMC/NoActions.td (original) +++ llvm/trunk/test/LLVMC/NoActions.td Tue Feb 23 03:04:51 2010 @@ -7,7 +7,7 @@ // CHECK: class dummy_tool : public Tool { def dummy_tool : Tool<[ -(cmd_line "dummy_cmd $INFILE"), +(command "dummy_cmd"), (in_language "dummy"), (out_language "dummy") ]>; Modified: llvm/trunk/test/LLVMC/OneOrMore.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/OneOrMore.td?rev=96921&r1=96920&r2=96921&view=diff ============================================================================== --- llvm/trunk/test/LLVMC/OneOrMore.td (original) +++ llvm/trunk/test/LLVMC/OneOrMore.td Tue Feb 23 03:04:51 2010 @@ -13,7 +13,7 @@ (parameter_list_option "baz", (optional))]>; def dummy_tool : Tool<[ -(cmd_line "dummy_cmd $INFILE"), +(command "dummy_cmd"), (in_language "dummy"), (out_language "dummy"), (actions (case Modified: llvm/trunk/test/LLVMC/OptionPreprocessor.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/OptionPreprocessor.td?rev=96921&r1=96920&r2=96921&view=diff ============================================================================== --- llvm/trunk/test/LLVMC/OptionPreprocessor.td (original) +++ llvm/trunk/test/LLVMC/OptionPreprocessor.td Tue Feb 23 03:04:51 2010 @@ -52,7 +52,7 @@ [(in_language "dummy"), (out_language "dummy"), (output_suffix "d"), - (cmd_line "dummy $INFILE -o $OUTFILE"), + (command "dummy"), (actions (case (switch_on "foo"), (error), (switch_on "bar"), (error), (switch_on "baz"), (error), From foldr at codedgers.com Tue Feb 23 03:04:57 2010 From: foldr at codedgers.com (Mikhail Glushenkov) Date: Tue, 23 Feb 2010 09:04:57 -0000 Subject: [llvm-commits] [llvm] r96922 - in /llvm/trunk: lib/CompilerDriver/Tool.cpp utils/TableGen/LLVMCConfigurationEmitter.cpp Message-ID: <20100223090457.689932A6C12D@llvm.org> Author: foldr Date: Tue Feb 23 03:04:57 2010 New Revision: 96922 URL: http://llvm.org/viewvc/llvm-project?rev=96922&view=rev Log: Implement order-preserving option forwarding. Needed to correctly handle things like 'llvmc -framework Foo foo.o -framework Bar bar.o' - before this commit all '-framework' options would've been grouped together in the beginning. Due to our dependence on CommandLine this turned out to be a giant hack; we will migrate away from CommandLine eventually. Modified: llvm/trunk/lib/CompilerDriver/Tool.cpp llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp Modified: llvm/trunk/lib/CompilerDriver/Tool.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CompilerDriver/Tool.cpp?rev=96922&r1=96921&r2=96922&view=diff ============================================================================== --- llvm/trunk/lib/CompilerDriver/Tool.cpp (original) +++ llvm/trunk/lib/CompilerDriver/Tool.cpp Tue Feb 23 03:04:57 2010 @@ -17,6 +17,8 @@ #include "llvm/ADT/StringExtras.h" #include "llvm/System/Path.h" +#include + using namespace llvm; using namespace llvmc; @@ -72,11 +74,21 @@ return Out; } +namespace { + template + bool CompareFirst (std::pair p1, std::pair p2) { + return std::less()(p1.first, p2.first); + } +} + StrVector Tool::SortArgs(ArgsVector& Args) const { StrVector Out; - for (ArgsVector::iterator B = Args.begin(), E = Args.end(); B != E; ++B) + // HACK: this won't be needed when we'll migrate away from CommandLine. + std::stable_sort(Args.begin(), Args.end(), &CompareFirst); + for (ArgsVector::iterator B = Args.begin(), E = Args.end(); B != E; ++B) { Out.push_back(B->second); + } return Out; } Modified: llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp?rev=96922&r1=96921&r2=96922&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp Tue Feb 23 03:04:57 2010 @@ -1795,14 +1795,18 @@ switch (D.Type) { case OptionType::Switch: O.indent(IndentLevel) - << "vec.push_back(std::make_pair(0, \"" << Name << "\"));\n"; + << "vec.push_back(std::make_pair(" << D.GenVariableName() + << ".getPosition(), \"" << Name << "\"));\n"; break; case OptionType::Parameter: - O.indent(IndentLevel) << "vec.push_back(std::make_pair(0, \"" << Name; + O.indent(IndentLevel) << "vec.push_back(std::make_pair(" + << D.GenVariableName() + <<".getPosition(), \"" << Name; if (!D.isForwardNotSplit()) { O << "\"));\n"; - O.indent(IndentLevel) << "vec.push_back(std::make_pair(0, " + O.indent(IndentLevel) << "vec.push_back(std::make_pair(" + << D.GenVariableName() << ".getPosition(), " << D.GenVariableName() << "));\n"; } else { @@ -1810,7 +1814,8 @@ } break; case OptionType::Prefix: - O.indent(IndentLevel) << "vec.push_back(std::make_pair(0, \"" + O.indent(IndentLevel) << "vec.push_back(std::make_pair(" + << D.GenVariableName() << ".getPosition(), \"" << Name << "\" + " << D.GenVariableName() << "));\n"; break; @@ -1820,12 +1825,15 @@ << "::iterator B = " << D.GenVariableName() << ".begin(),\n"; O.indent(IndentLevel) << "E = " << D.GenVariableName() << ".end(); B != E;) {\n"; - O.indent(IndentLevel1) << "vec.push_back(std::make_pair(0, \"" + O.indent(IndentLevel1) << "unsigned pos = " << D.GenVariableName() + << ".getPosition(B - " << D.GenVariableName() + << ".begin());\n"; + O.indent(IndentLevel1) << "vec.push_back(std::make_pair(pos, \"" << Name << "\" + " << "*B));\n"; O.indent(IndentLevel1) << "++B;\n"; for (int i = 1, j = D.MultiVal; i < j; ++i) { - O.indent(IndentLevel1) << "vec.push_back(std::make_pair(0, *B));\n"; + O.indent(IndentLevel1) << "vec.push_back(std::make_pair(pos, *B));\n"; O.indent(IndentLevel1) << "++B;\n"; } @@ -1837,11 +1845,14 @@ << D.GenVariableName() << ".begin(),\n"; O.indent(IndentLevel) << "E = " << D.GenVariableName() << ".end() ; B != E;) {\n"; - O.indent(IndentLevel1) << "vec.push_back(std::make_pair(0, \"" + O.indent(IndentLevel1) << "unsigned pos = " << D.GenVariableName() + << ".getPosition(B - " << D.GenVariableName() + << ".begin());\n"; + O.indent(IndentLevel1) << "vec.push_back(std::make_pair(pos, \"" << Name << "\"));\n"; for (int i = 0, j = D.MultiVal; i < j; ++i) { - O.indent(IndentLevel1) << "vec.push_back(std::make_pair(0, *B));\n"; + O.indent(IndentLevel1) << "vec.push_back(std::make_pair(pos, *B));\n"; O.indent(IndentLevel1) << "++B;\n"; } @@ -1923,7 +1934,7 @@ { CheckNumberOfArguments(Dag, 1); this->EmitHookInvocation(InitPtrToString(Dag.getArg(0)), - "vec.push_back(std::make_pair(0, ", "));\n", + "vec.push_back(std::make_pair(65536, ", "));\n", IndentLevel, O); } @@ -1954,7 +1965,8 @@ const OptionDescription& D = OptDescs.FindListOrParameter(Name); if (D.isParameter()) { - O.indent(IndentLevel) << "vec.push_back(std::make_pair(0, " + O.indent(IndentLevel) << "vec.push_back(std::make_pair(" + << D.GenVariableName() << ".getPosition(), " << D.GenVariableName() << "));\n"; } else { @@ -1964,7 +1976,11 @@ << ".end(); B != E; ++B)\n"; O.indent(IndentLevel) << "{\n"; O.indent(IndentLevel + Indent1) - << "vec.push_back(std::make_pair(0, *B));\n"; + << "unsigned pos = " << D.GenVariableName() + << ".getPosition(B - " << D.GenVariableName() + << ".begin());\n"; + O.indent(IndentLevel + Indent1) + << "vec.push_back(std::make_pair(pos, *B));\n"; O.indent(IndentLevel) << "}\n"; } } @@ -1977,8 +1993,10 @@ const std::string& Hook = InitPtrToString(Dag.getArg(1)); const OptionDescription& D = OptDescs.FindListOrParameter(Name); - O.indent(IndentLevel) << "vec.push_back(std::make_pair(0, " << "hooks::" - << Hook << "(" << D.GenVariableName() + O.indent(IndentLevel) << "vec.push_back(std::make_pair(" + << D.GenVariableName() << ".getPosition(" + << (D.isList() ? "0" : "") << "), " + << "hooks::" << Hook << "(" << D.GenVariableName() << (D.isParameter() ? ".c_str()" : "") << ")));\n"; } @@ -2092,8 +2110,9 @@ // Input file (s) if (!D.InFileOption.empty()) { - O.indent(Indent2) << "vec.push_back(std::make_pair(0, \"" - << D.InFileOption << "\");\n"; + O.indent(Indent2) + << "vec.push_back(std::make_pair(InputFilenames.getPosition(0), \"" + << D.InFileOption << "\");\n"; } if (IsJoin) { @@ -2101,23 +2120,26 @@ << "for (PathVector::const_iterator B = inFiles.begin(),\n"; O.indent(Indent3) << "E = inFiles.end(); B != E; ++B)\n"; O.indent(Indent2) << "{\n"; - O.indent(Indent3) << "vec.push_back(std::make_pair(0, B->str()));\n"; + O.indent(Indent3) << "vec.push_back(std::make_pair(" + << "InputFilenames.getPosition(B - inFiles.begin()), " + << "B->str()));\n"; O.indent(Indent2) << "}\n"; } else { - O.indent(Indent2) << "vec.push_back(std::make_pair(0, inFile.str()));\n"; + O.indent(Indent2) << "vec.push_back(std::make_pair(" + << "InputFilenames.getPosition(0), inFile.str()));\n"; } // Output file O.indent(Indent2) << "if (!no_out_file) {\n"; if (!D.OutFileOption.empty()) - O.indent(Indent3) << "vec.push_back(std::make_pair(0, \"" + O.indent(Indent3) << "vec.push_back(std::make_pair(65536, \"" << D.OutFileOption << "\"));\n"; O.indent(Indent3) << "out_file = this->OutFilename(" << (IsJoin ? "sys::Path(),\n" : "inFile,\n"); O.indent(Indent4) << "TempDir, stop_compilation, output_suffix).str();\n\n"; - O.indent(Indent3) << "vec.push_back(std::make_pair(0, out_file));\n"; + O.indent(Indent3) << "vec.push_back(std::make_pair(65536, out_file));\n"; O.indent(Indent2) << "}\n\n"; @@ -2127,7 +2149,9 @@ O.indent(Indent3) << "for (cl::list::iterator B = " << SinkOptionName << ".begin(), E = " << SinkOptionName << ".end(); B != E; ++B)\n"; - O.indent(Indent4) << "vec.push_back(std::make_pair(0, *B));\n"; + O.indent(Indent4) << "vec.push_back(std::make_pair(" << SinkOptionName + << ".getPosition(B - " << SinkOptionName + << ".begin()), *B));\n"; O.indent(Indent2) << "}\n"; } From foldr at codedgers.com Tue Feb 23 03:05:01 2010 From: foldr at codedgers.com (Mikhail Glushenkov) Date: Tue, 23 Feb 2010 09:05:01 -0000 Subject: [llvm-commits] [llvm] r96923 - /llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp Message-ID: <20100223090501.BB9D22A6C12C@llvm.org> Author: foldr Date: Tue Feb 23 03:05:01 2010 New Revision: 96923 URL: http://llvm.org/viewvc/llvm-project?rev=96923&view=rev Log: Trailing whitespace. Modified: llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp Modified: llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp?rev=96923&r1=96922&r2=96923&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp Tue Feb 23 03:05:01 2010 @@ -797,7 +797,7 @@ // Default ctor here is needed because StringMap can only store // DefaultConstructible objects ToolDescription () - : CmdLine(0), Actions(0), OutFileOption("-o"), + : CmdLine(0), Actions(0), OutFileOption("-o"), Flags(0), OnEmpty(0) {} ToolDescription (const std::string& n) From foldr at codedgers.com Tue Feb 23 03:05:06 2010 From: foldr at codedgers.com (Mikhail Glushenkov) Date: Tue, 23 Feb 2010 09:05:06 -0000 Subject: [llvm-commits] [llvm] r96924 - /llvm/trunk/tools/llvmc/plugins/Base/Base.td.in Message-ID: <20100223090506.9E01E2A6C12D@llvm.org> Author: foldr Date: Tue Feb 23 03:05:06 2010 New Revision: 96924 URL: http://llvm.org/viewvc/llvm-project?rev=96924&view=rev Log: Typo. Modified: llvm/trunk/tools/llvmc/plugins/Base/Base.td.in Modified: llvm/trunk/tools/llvmc/plugins/Base/Base.td.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/plugins/Base/Base.td.in?rev=96924&r1=96923&r2=96924&view=diff ============================================================================== --- llvm/trunk/tools/llvmc/plugins/Base/Base.td.in (original) +++ llvm/trunk/tools/llvmc/plugins/Base/Base.td.in Tue Feb 23 03:05:06 2010 @@ -134,7 +134,7 @@ string E_ext, string out_lang> : Tool< [(in_language in_lang), (out_language "llvm-bitcode"), - (output_suffix "bc"), + (output_suffix out_lang), (command cmd_prefix), (actions (case From foldr at codedgers.com Tue Feb 23 03:05:10 2010 From: foldr at codedgers.com (Mikhail Glushenkov) Date: Tue, 23 Feb 2010 09:05:10 -0000 Subject: [llvm-commits] [llvm] r96925 - /llvm/trunk/lib/CompilerDriver/Main.cpp Message-ID: <20100223090510.9A0C52A6C12C@llvm.org> Author: foldr Date: Tue Feb 23 03:05:10 2010 New Revision: 96925 URL: http://llvm.org/viewvc/llvm-project?rev=96925&view=rev Log: Temporary disable response files. They are giving us problems on Mac. Modified: llvm/trunk/lib/CompilerDriver/Main.cpp Modified: llvm/trunk/lib/CompilerDriver/Main.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CompilerDriver/Main.cpp?rev=96925&r1=96924&r2=96925&view=diff ============================================================================== --- llvm/trunk/lib/CompilerDriver/Main.cpp (original) +++ llvm/trunk/lib/CompilerDriver/Main.cpp Tue Feb 23 03:05:10 2010 @@ -100,7 +100,8 @@ ProgramName = argv[0]; cl::ParseCommandLineOptions - (argc, argv, "LLVM Compiler Driver (Work In Progress)", true); + (argc, argv, "LLVM Compiler Driver (Work In Progress)", + /* ReadResponseFiles = */ false); PluginLoader Plugins; Plugins.RunInitialization(langMap, graph); From foldr at codedgers.com Tue Feb 23 03:05:15 2010 From: foldr at codedgers.com (Mikhail Glushenkov) Date: Tue, 23 Feb 2010 09:05:15 -0000 Subject: [llvm-commits] [llvm] r96926 - /llvm/trunk/tools/llvmc/plugins/Base/Base.td.in Message-ID: <20100223090515.CA2072A6C12D@llvm.org> Author: foldr Date: Tue Feb 23 03:05:15 2010 New Revision: 96926 URL: http://llvm.org/viewvc/llvm-project?rev=96926&view=rev Log: Support -Xlinker et al. Modified: llvm/trunk/tools/llvmc/plugins/Base/Base.td.in Modified: llvm/trunk/tools/llvmc/plugins/Base/Base.td.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/plugins/Base/Base.td.in?rev=96926&r1=96925&r2=96926&view=diff ============================================================================== --- llvm/trunk/tools/llvmc/plugins/Base/Base.td.in (original) +++ llvm/trunk/tools/llvmc/plugins/Base/Base.td.in Tue Feb 23 03:05:15 2010 @@ -84,8 +84,12 @@ (help "Add a directory to include path")), (prefix_list_option "D", (help "Define a macro")), + (parameter_list_option "Xpreprocessor", (hidden), + (help "Pass options to preprocessor")), (prefix_list_option "Wa,", (comma_separated), (help "Pass options to assembler")), + (parameter_list_option "Xassembler", (hidden), + (help "Pass options to assembler")), (prefix_list_option "Wllc,", (comma_separated), (help "Pass options to llc")), (prefix_list_option "L", @@ -94,6 +98,8 @@ (help "Search a library when linking")), (prefix_list_option "Wl,", (help "Pass options to linker")), + (parameter_list_option "Xlinker", (hidden), + (help "Pass options to linker")), (prefix_list_option "Wo,", (comma_separated), (help "Pass options to opt")), (prefix_list_option "m", @@ -154,6 +160,7 @@ [(append_cmd "-c"), (append_cmd "-emit-llvm")], // Forwards + (not_empty "Xpreprocessor"), (forward "Xpreprocessor"), (not_empty "include"), (forward "include"), (not_empty "iquote"), (forward "iquote"), (not_empty "save-temps"), (append_cmd "-save-temps"), @@ -225,7 +232,8 @@ (actions (case (switch_on "c"), (stop_compilation), (not_empty "arch"), (forward "arch"), - (not_empty "Wa,"), (forward_value "Wa,"))) + (not_empty "Xassembler"), (forward "Xassembler"), + (not_empty "Wa,"), (forward "Wa,"))) ]>; def llc : Tool< @@ -269,6 +277,7 @@ (switch_on "m32"), (forward "m32"), (switch_on "m64"), (forward "m64"), (not_empty "l"), (forward "l"), + (not_empty "Xlinker"), (forward "Xlinker"), (not_empty "Wl,"), (forward "Wl,"), (switch_on "dynamiclib"), (forward "dynamiclib"), (switch_on "prebind"), (forward "prebind"), From foldr at codedgers.com Tue Feb 23 03:05:21 2010 From: foldr at codedgers.com (Mikhail Glushenkov) Date: Tue, 23 Feb 2010 09:05:21 -0000 Subject: [llvm-commits] [llvm] r96927 - in /llvm/trunk: lib/CompilerDriver/CompilationGraph.cpp tools/llvmc/plugins/Base/Base.td.in Message-ID: <20100223090521.E4CB32A6C12C@llvm.org> Author: foldr Date: Tue Feb 23 03:05:21 2010 New Revision: 96927 URL: http://llvm.org/viewvc/llvm-project?rev=96927&view=rev Log: Input files with empty suffixes must be passed to linker. Modified: llvm/trunk/lib/CompilerDriver/CompilationGraph.cpp llvm/trunk/tools/llvmc/plugins/Base/Base.td.in Modified: llvm/trunk/lib/CompilerDriver/CompilationGraph.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CompilerDriver/CompilationGraph.cpp?rev=96927&r1=96926&r2=96927&view=diff ============================================================================== --- llvm/trunk/lib/CompilerDriver/CompilationGraph.cpp (original) +++ llvm/trunk/lib/CompilerDriver/CompilationGraph.cpp Tue Feb 23 03:05:21 2010 @@ -34,7 +34,8 @@ const std::string& LanguageMap::GetLanguage(const sys::Path& File) const { StringRef suf = File.getSuffix(); - LanguageMap::const_iterator Lang = this->find(suf); + LanguageMap::const_iterator Lang = + this->find(suf.empty() ? "*empty*" : suf); if (Lang == this->end()) throw std::runtime_error("File '" + File.str() + "' has unknown suffix '" + suf.str() + '\''); Modified: llvm/trunk/tools/llvmc/plugins/Base/Base.td.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/plugins/Base/Base.td.in?rev=96927&r1=96926&r2=96927&view=diff ============================================================================== --- llvm/trunk/tools/llvmc/plugins/Base/Base.td.in (original) +++ llvm/trunk/tools/llvmc/plugins/Base/Base.td.in Tue Feb 23 03:05:21 2010 @@ -311,7 +311,7 @@ LangToSuffixes<"assembler-with-cpp", ["S"]>, LangToSuffixes<"llvm-assembler", ["ll"]>, LangToSuffixes<"llvm-bitcode", ["bc"]>, - LangToSuffixes<"object-code", ["o"]>, + LangToSuffixes<"object-code", ["o", "*empty*"]>, LangToSuffixes<"executable", ["out"]> ]>; From daniel at zuster.org Tue Feb 23 03:28:48 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 09:28:48 -0000 Subject: [llvm-commits] [llvm] r96931 - /llvm/trunk/test/lit.cfg Message-ID: <20100223092848.9F0CF2A6C12C@llvm.org> Author: ddunbar Date: Tue Feb 23 03:28:48 2010 New Revision: 96931 URL: http://llvm.org/viewvc/llvm-project?rev=96931&view=rev Log: Fix a thinko in the lit.cfg. Modified: llvm/trunk/test/lit.cfg Modified: llvm/trunk/test/lit.cfg URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lit.cfg?rev=96931&r1=96930&r2=96931&view=diff ============================================================================== --- llvm/trunk/test/lit.cfg (original) +++ llvm/trunk/test/lit.cfg Tue Feb 23 03:28:48 2010 @@ -40,7 +40,7 @@ config.environment['PATH'] = path llvmgcc_dir = getattr(config, 'llvmgcc_dir', None) - if not llvm_tools_dir: + if not llvmgcc_dir: lit.fatal('No llvm-gcc dir set!') if llvmgcc_dir: path = os.path.pathsep.join((os.path.join(llvmgcc_dir, 'bin'), From daniel at zuster.org Tue Feb 23 03:28:50 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 09:28:50 -0000 Subject: [llvm-commits] [llvm] r96932 - /llvm/trunk/Makefile.rules Message-ID: <20100223092850.BC73B2A6C12D@llvm.org> Author: ddunbar Date: Tue Feb 23 03:28:50 2010 New Revision: 96932 URL: http://llvm.org/viewvc/llvm-project?rev=96932&view=rev Log: Eliminate CFERuntimeLibDir make variable, this shouldn't be needed. Modified: llvm/trunk/Makefile.rules Modified: llvm/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=96932&r1=96931&r2=96932&view=diff ============================================================================== --- llvm/trunk/Makefile.rules (original) +++ llvm/trunk/Makefile.rules Tue Feb 23 03:28:50 2010 @@ -493,7 +493,6 @@ LLVMLibDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/lib LLVMToolDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/bin LLVMExmplDir:= $(LLVM_OBJ_ROOT)/$(BuildMode)/examples -CFERuntimeLibDir := $(LLVMGCCDIR)/lib #-------------------------------------------------------------------- # Full Paths To Compiled Tools and Utilities @@ -964,7 +963,7 @@ else Module := $(LibDir)/$(MODULE_NAME).bc -LinkModule := $(LLVMLD) -L$(CFERuntimeLibDir) -r +LinkModule := $(LLVMLD) -r ifdef EXPORTED_SYMBOL_FILE @@ -1092,8 +1091,7 @@ all-local:: $(LibName.BCA) ifdef EXPORTED_SYMBOL_FILE -BCLinkLib = $(LLVMLD) -L$(CFERuntimeLibDir) \ - -internalize-public-api-file=$(EXPORTED_SYMBOL_FILE) +BCLinkLib = $(LLVMLD) -internalize-public-api-file=$(EXPORTED_SYMBOL_FILE) $(LibName.BCA): $(ObjectsBC) $(LibDir)/.dir $(LLVMLD) \ $(LLVMToolDir)/llvm-ar From foldr at codedgers.com Tue Feb 23 03:59:30 2010 From: foldr at codedgers.com (Mikhail Glushenkov) Date: Tue, 23 Feb 2010 09:59:30 -0000 Subject: [llvm-commits] [llvm] r96933 - in /llvm/trunk/tools/llvmc: Makefile example/mcc16/plugins/PIC16Base/PIC16Base.td plugins/Clang/Clang.td Message-ID: <20100223095930.43A872A6C12C@llvm.org> Author: foldr Date: Tue Feb 23 03:59:30 2010 New Revision: 96933 URL: http://llvm.org/viewvc/llvm-project?rev=96933&view=rev Log: Update mcc16 and the ancient Clang plugin for the 'cmd_line' -> 'command' change. Modified: llvm/trunk/tools/llvmc/Makefile llvm/trunk/tools/llvmc/example/mcc16/plugins/PIC16Base/PIC16Base.td llvm/trunk/tools/llvmc/plugins/Clang/Clang.td Modified: llvm/trunk/tools/llvmc/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/Makefile?rev=96933&r1=96932&r2=96933&view=diff ============================================================================== --- llvm/trunk/tools/llvmc/Makefile (original) +++ llvm/trunk/tools/llvmc/Makefile Tue Feb 23 03:59:30 2010 @@ -10,7 +10,7 @@ LEVEL = ../.. export LLVMC_BASED_DRIVER_NAME = llvmc -export LLVMC_BUILTIN_PLUGINS = Base +export LLVMC_BUILTIN_PLUGINS = Base Clang REQUIRES_RTTI = 1 DIRS = plugins driver Modified: llvm/trunk/tools/llvmc/example/mcc16/plugins/PIC16Base/PIC16Base.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/example/mcc16/plugins/PIC16Base/PIC16Base.td?rev=96933&r1=96932&r2=96933&view=diff ============================================================================== --- llvm/trunk/tools/llvmc/example/mcc16/plugins/PIC16Base/PIC16Base.td (original) +++ llvm/trunk/tools/llvmc/example/mcc16/plugins/PIC16Base/PIC16Base.td Tue Feb 23 03:59:30 2010 @@ -72,16 +72,14 @@ [(in_language language), (out_language "llvm-bitcode"), (output_suffix "bc"), - (cmd_line (case - (switch_on "E"), - (case - (not_empty "o"), !strconcat(cmd, " -E $INFILE -o $OUTFILE"), - (default), !strconcat(cmd, " -E $INFILE")), - (default), !strconcat(cmd, " $INFILE -o $OUTFILE"))), - (actions (case - (and (multiple_input_files), (or (switch_on "S"), (switch_on "c"))), - (error "cannot specify -o with -c or -S with multiple files"), - (switch_on "E"), [(stop_compilation), (output_suffix ext_E)], + (command cmd), + (actions (case + (and (multiple_input_files), + (or (switch_on "S"), (switch_on "c"))), + (error "cannot specify -o with -c or -S with multiple files"), + (switch_on "E"), [(forward "E"), + (stop_compilation), (output_suffix ext_E)], + (and (switch_on "E"), (empty "o")), (no_out_file), (switch_on "bc"),[(stop_compilation), (output_suffix "bc")], (switch_on "g"), (append_cmd "-g"), (switch_on "w"), (append_cmd "-w"), @@ -116,12 +114,13 @@ (in_language "llvm-bitcode"), (out_language "llvm-bitcode"), (output_suffix "bc"), - (cmd_line "$CALL(GetBinDir)llvm-ld -L $CALL(GetStdLibsDir) -disable-gvn -disable-licm-promotion -disable-mem2reg $INFILE -b $OUTFILE -l std"), + (command "$CALL(GetBinDir)llvm-ld -L $CALL(GetStdLibsDir) -disable-gvn -disable-licm-promotion -disable-mem2reg -l std"), + (out_file_option "-b"), (actions (case (switch_on "O0"), (append_cmd "-disable-opt"), (switch_on "O1"), (append_cmd "-disable-opt"), // Whenever O3 is not specified on the command line, default i.e. disable-inlining will always be added. - (switch_on "O2"), (append_cmd ""), + (switch_on "O2"), (append_cmd ""), (switch_on "O3"), (append_cmd ""), (default), (append_cmd "-disable-inlining"))), (join) @@ -134,12 +133,13 @@ (output_suffix "bc"), // FIXME: we are still not disabling licm-promotion. // -disable-licm-promotion and building stdn library causes c16-71 to fail. - (cmd_line "$CALL(GetBinDir)llvm-ld -disable-gvn -disable-mem2reg $INFILE -b $OUTFILE"), + (command "$CALL(GetBinDir)llvm-ld -disable-gvn -disable-mem2reg"), + (out_file_option "-b"), (actions (case (switch_on "O0"), (append_cmd "-disable-opt"), (switch_on "O1"), (append_cmd "-disable-opt"), // Whenever O3 is not specified on the command line, default i.e. disable-inlining will always be added. - (switch_on "O2"), (append_cmd ""), + (switch_on "O2"), (append_cmd ""), (switch_on "O3"), (append_cmd ""), (default), (append_cmd "-disable-inlining"))) ]>; @@ -149,7 +149,7 @@ (in_language "llvm-bitcode"), (out_language "llvm-bitcode"), (output_suffix "obc"), - (cmd_line "$CALL(GetBinDir)opt -pic16cg -pic16overlay $INFILE -f -o $OUTFILE"), + (command "$CALL(GetBinDir)opt -pic16cg -pic16overlay -f"), (actions (case (switch_on "O0"), (append_cmd "-disable-opt"))) ]>; @@ -158,7 +158,7 @@ (in_language "llvm-bitcode"), (out_language "assembler"), (output_suffix "s"), - (cmd_line "$CALL(GetBinDir)llc -march=pic16 -disable-jump-tables -pre-RA-sched=list-burr -f $INFILE -o $OUTFILE"), + (command "$CALL(GetBinDir)llc -march=pic16 -disable-jump-tables -pre-RA-sched=list-burr -f"), (actions (case (switch_on "S"), (stop_compilation), // (not_empty "Wllc,"), (unpack_values "Wllc,"), @@ -171,7 +171,7 @@ (in_language "assembler"), (out_language "object-code"), (output_suffix "o"), - (cmd_line "$CALL(GetBinDir)gpasm -z -r decimal -I $CALL(GetStdAsmHeadersDir) -C -c -w 2 $INFILE -o $OUTFILE"), + (command "$CALL(GetBinDir)gpasm -z -r decimal -I $CALL(GetStdAsmHeadersDir) -C -c -w 2"), (actions (case (switch_on "c"), (stop_compilation), (switch_on "g"), (append_cmd "-g"), @@ -184,7 +184,7 @@ (in_language "object-code"), (out_language "executable"), (output_suffix "cof"), - (cmd_line "$CALL(GetBinDir)mplink -e -k $CALL(GetStdLinkerScriptsDir) -l $CALL(GetStdLibsDir) intrinsics.lib stdn.lib $INFILE -o $OUTFILE"), + (command "$CALL(GetBinDir)mplink -e -k $CALL(GetStdLinkerScriptsDir) -l $CALL(GetStdLibsDir) intrinsics.lib stdn.lib"), (actions (case (not_empty "Wl,"), (forward_value "Wl,"), (switch_on "X"), (append_cmd "-x"), @@ -217,13 +217,13 @@ def CompilationGraph : CompilationGraph<[ Edge<"root", "clang_cc">, Edge<"root", "llvm_ld">, - OptionalEdge<"root", "llvm_ld_optimizer", (case + OptionalEdge<"root", "llvm_ld_optimizer", (case (switch_on "S"), (inc_weight), (switch_on "c"), (inc_weight))>, Edge<"root", "gpasm">, Edge<"root", "mplink">, Edge<"clang_cc", "llvm_ld">, - OptionalEdge<"clang_cc", "llvm_ld_optimizer", (case + OptionalEdge<"clang_cc", "llvm_ld_optimizer", (case (switch_on "S"), (inc_weight), (switch_on "c"), (inc_weight))>, Edge<"llvm_ld", "pic16passes">, Modified: llvm/trunk/tools/llvmc/plugins/Clang/Clang.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/plugins/Clang/Clang.td?rev=96933&r1=96932&r2=96933&view=diff ============================================================================== --- llvm/trunk/tools/llvmc/plugins/Clang/Clang.td (original) +++ llvm/trunk/tools/llvmc/plugins/Clang/Clang.td Tue Feb 23 03:59:30 2010 @@ -24,23 +24,17 @@ [(in_language language), (out_language "llvm-bitcode"), (output_suffix "bc"), - (cmd_line (case - (switch_on "E"), - (case - (not_empty "o"), - !strconcat(cmd, " -E $INFILE -o $OUTFILE"), - (default), - !strconcat(cmd, " -E $INFILE")), - (and (switch_on "S"), (switch_on "emit-llvm")), - !strconcat(cmd, " -emit-llvm $INFILE -o $OUTFILE"), - (default), - !strconcat(cmd, " -emit-llvm-bc $INFILE -o $OUTFILE"))), + (command cmd), (actions (case (switch_on "E"), - [(stop_compilation), (output_suffix ext_E)], + [(forward "E"), (stop_compilation), (output_suffix ext_E)], + (and (switch_on "E"), (empty "o")), (no_out_file), (switch_on "fsyntax-only"), (stop_compilation), - (and (switch_on "S"), (switch_on "emit-llvm")), - [(stop_compilation), (output_suffix "ll")], - (and (switch_on "c"), (switch_on "emit-llvm")), + (switch_on ["S", "emit-llvm"]), + [(append_cmd "-emit-llvm"), + (stop_compilation), (output_suffix "ll")], + (not (switch_on ["S", "emit-llvm"])), + (append_cmd "-emit-llvm-bc"), + (switch_on ["c", "emit-llvm"]), (stop_compilation), (not_empty "include"), (forward "include"), (not_empty "I"), (forward "I"))), @@ -58,7 +52,7 @@ [(in_language "assembler"), (out_language "object-code"), (output_suffix "o"), - (cmd_line "as $INFILE -o $OUTFILE"), + (command "as"), (actions (case (not_empty "Wa,"), (forward_value "Wa,"), (switch_on "c"), (stop_compilation))) ]>; @@ -68,7 +62,7 @@ [(in_language "object-code"), (out_language "executable"), (output_suffix "out"), - (cmd_line "llvm-ld -native -disable-internalize $INFILE -o $OUTFILE"), + (command "llvm-ld -native -disable-internalize"), (actions (case (switch_on "pthread"), (append_cmd "-lpthread"), (not_empty "L"), (forward "L"), From daniel at zuster.org Tue Feb 23 04:00:50 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 10:00:50 -0000 Subject: [llvm-commits] [llvm] r96934 - in /llvm/trunk: Makefile.config.in autoconf/configure.ac configure Message-ID: <20100223100050.2421E2A6C12C@llvm.org> Author: ddunbar Date: Tue Feb 23 04:00:49 2010 New Revision: 96934 URL: http://llvm.org/viewvc/llvm-project?rev=96934&view=rev Log: Initial configure support for using Clang as the LLVM capable compiler. Comes in two parts: 1. Use --with-clang=path/to/clang/compiler to select an installed clang, or --with-built-clang to have the makefiles use the clang which will be built as the LLVM capable compiler. If neither is given, --with-built-clang will be used if the Clang sources are checked out into the standard location (tools/clang). 2. Use --with-llvmcc={llvm-gcc,clang,none} to specify which LLVM capable compiler to use. If not given, then llvm-gcc will be used if available, otherwise Clang. Makefile support still to come. Eric, Doug, Chris, seem reasonable? Modified: llvm/trunk/Makefile.config.in llvm/trunk/autoconf/configure.ac llvm/trunk/configure Modified: llvm/trunk/Makefile.config.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.config.in?rev=96934&r1=96933&r2=96934&view=diff ============================================================================== --- llvm/trunk/Makefile.config.in (original) +++ llvm/trunk/Makefile.config.in Tue Feb 23 04:00:49 2010 @@ -190,6 +190,14 @@ LLVMCC1PLUS := @LLVMCC1PLUS@ LLVMGCC_LANGS := @LLVMGCC_LANGS@ +# Information on Clang, if configured. +CLANGPATH := @CLANGPATH@ +CLANGXXPATH := @CLANGXXPATH@ +ENABLE_BUILT_CLANG := @ENABLE_BUILT_CLANG@ + +# The LLVM capable compiler to use. +LLVMCC_OPTION := @LLVMCC_OPTION@ + # Path to directory where object files should be stored during a build. # Set OBJ_ROOT to "." if you do not want to use a separate place for # object files. Modified: llvm/trunk/autoconf/configure.ac URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=96934&r1=96933&r2=96934&view=diff ============================================================================== --- llvm/trunk/autoconf/configure.ac (original) +++ llvm/trunk/autoconf/configure.ac Tue Feb 23 04:00:49 2010 @@ -612,6 +612,56 @@ AC_MSG_ERROR([Invalid llvm-gcc. Use --with-llvmgcc when --with-llvmgxx is used]); fi +dnl Allow a specific Clang compiler to be used with this LLVM config. +AC_ARG_WITH(clang, + AS_HELP_STRING([--with-clang], + [Specify location of clang compiler (default is --with-built-clang)]), + [],[with_clang=default]) + +dnl Enable use of the built Clang. +AC_ARG_WITH(built-clang, + AS_HELP_STRING([--with-built-clang], + [Use the compiled Clang as the LLVM compiler (default=check)]), + [],[with_built_clang=check]) + +dnl Select the Clang compiler option. +dnl +dnl If --with-clang is given, always honor that; otherwise honor +dnl --with-built-clang, or check if we have the clang sources. +AC_MSG_CHECKING([clang compiler]) +WITH_CLANGPATH="" +WITH_BUILT_CLANG=0 +if test "$with_clang" != "default"; then + WITH_CLANGPATH="$with_clang" + if ! test -x "$WITH_CLANGPATH"; then + AC_MSG_ERROR([invalid --with-clang, path does not specify an executable]) + fi +elif test "$with_built_clang" = "yes"; then + WITH_BUILT_CLANG=1 +elif test "$with_built_clang" = "no"; then + WITH_BUILT_CLANG=0 +else + if test "$with_built_clang" != "check"; then + AC_MSG_ERROR([invalid value for --with-built-clang.]) + fi + + if test -f ${srcdir}/tools/clang/README.txt; then + WITH_BUILT_CLANG=1 + fi +fi + +if ! test -z "$WITH_CLANGPATH"; then + AC_MSG_RESULT([$WITH_CLANGPATH]) + WITH_CLANGXXPATH=`"$WITH_CLANGPATH" --print-prog-name=clang++` +elif test "$WITH_BUILT_CLANG" = "1"; then + AC_MSG_RESULT([built]) +else + AC_MSG_RESULT([none]) +fi +AC_SUBST(CLANGPATH,$WITH_CLANGPATH) +AC_SUBST(CLANGXXPATH,$WITH_CLANGXXPATH) +AC_SUBST(ENABLE_BUILT_CLANG,$WITH_BUILT_CLANG) + dnl Override the option to use for optimized builds. AC_ARG_WITH(optimize-option, AS_HELP_STRING([--with-optimize-option], @@ -946,6 +996,29 @@ AC_SUBST(LLVMGXXCOMMAND,$LLVMGXXCOMMAND) fi +dnl Select the LLVM capable compiler to use, we default to using llvm-gcc if +dnl found, otherwise clang if available. +AC_ARG_WITH(llvmcc, + AS_HELP_STRING([--with-llvmcc=], + [Choose the LLVM capable compiler to use (llvm-gcc, clang, or none; default=check)]), + [],[with_llvmcc=check]) +AC_MSG_CHECKING([LLVM capable compiler]) +if test "$with_llvmcc" != "check"; then + if (test "$with_llvmcc" != "llvm-gcc" && + test "$with_llvmcc" != "clang" && + test "$with_llvmcc" != "none"); then + AC_MSG_ERROR([invalid value for --with-llvmcc, expected 'llvm-gcc', 'clang', or 'none'.]) + fi + WITH_LLVMCC="$with_llvmcc" +elif test -n "$LLVMGCC"; then + WITH_LLVMCC=llvm-gcc +elif test -n "$WITH_CLANGPATH" || test "$WITH_BUILT_CLANG" -ne "0"; then + WITH_LLVMCC=clang +else + WITH_LLVMCC=none +fi +AC_MSG_RESULT([$WITH_LLVMCC]) +AC_SUBST(LLVMCC_OPTION,$WITH_LLVMCC) AC_MSG_CHECKING([tool compatibility]) Modified: llvm/trunk/configure URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=96934&r1=96933&r2=96934&view=diff ============================================================================== --- llvm/trunk/configure (original) +++ llvm/trunk/configure Tue Feb 23 04:00:49 2010 @@ -695,6 +695,9 @@ LLVM_ENUM_ASM_PARSERS LLVM_ENUM_DISASSEMBLERS ENABLE_CBE_PRINTF_A +CLANGPATH +CLANGXXPATH +ENABLE_BUILT_CLANG OPTIMIZE_OPTION EXTRA_OPTIONS BINUTILS_INCDIR @@ -754,6 +757,7 @@ LLVMGXXCOMMAND LLVMGCC LLVMGXX +LLVMCC_OPTION NO_VARIADIC_MACROS NO_MISSING_FIELD_INITIALIZERS USE_UDIS86 @@ -1423,6 +1427,10 @@ searches PATH) --with-llvmgxx Specify location of llvm-g++ driver (default searches PATH) + --with-clang Specify location of clang compiler (default is + --with-built-clang) + --with-built-clang Use the compiled Clang as the LLVM compiler + (default=check) --with-optimize-option Select the compiler options to use for optimized builds --with-extra-options Specify additional options to compile LLVM with @@ -1439,6 +1447,8 @@ --with-binutils-include Specify path to binutils/include/ containing plugin-api.h file for gold plugin. --with-tclinclude directory where tcl headers are + --with-llvmcc= Choose the LLVM capable compiler to use (llvm-gcc, + clang, or none; default=check) --with-udis86= Use udis86 external x86 disassembler library --with-oprofile= Tell OProfile >= 0.9.4 how to symbolize JIT output @@ -5026,6 +5036,69 @@ fi +# Check whether --with-clang was given. +if test "${with_clang+set}" = set; then + withval=$with_clang; +else + with_clang=default +fi + + + +# Check whether --with-built-clang was given. +if test "${with_built_clang+set}" = set; then + withval=$with_built_clang; +else + with_built_clang=check +fi + + +{ echo "$as_me:$LINENO: checking clang compiler" >&5 +echo $ECHO_N "checking clang compiler... $ECHO_C" >&6; } +WITH_CLANGPATH="" +WITH_BUILT_CLANG=0 +if test "$with_clang" != "default"; then + WITH_CLANGPATH="$with_clang" + if ! test -x "$WITH_CLANGPATH"; then + { { echo "$as_me:$LINENO: error: invalid --with-clang, path does not specify an executable" >&5 +echo "$as_me: error: invalid --with-clang, path does not specify an executable" >&2;} + { (exit 1); exit 1; }; } + fi +elif test "$with_built_clang" = "yes"; then + WITH_BUILT_CLANG=1 +elif test "$with_built_clang" = "no"; then + WITH_BUILT_CLANG=0 +else + if test "$with_built_clang" != "check"; then + { { echo "$as_me:$LINENO: error: invalid value for --with-built-clang." >&5 +echo "$as_me: error: invalid value for --with-built-clang." >&2;} + { (exit 1); exit 1; }; } + fi + + if test -f ${srcdir}/tools/clang/README.txt; then + WITH_BUILT_CLANG=1 + fi +fi + +if ! test -z "$WITH_CLANGPATH"; then + { echo "$as_me:$LINENO: result: $WITH_CLANGPATH" >&5 +echo "${ECHO_T}$WITH_CLANGPATH" >&6; } + WITH_CLANGXXPATH=`"$WITH_CLANGPATH" --print-prog-name=clang++` +elif test "$WITH_BUILT_CLANG" = "1"; then + { echo "$as_me:$LINENO: result: built" >&5 +echo "${ECHO_T}built" >&6; } +else + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } +fi +CLANGPATH=$WITH_CLANGPATH + +CLANGXXPATH=$WITH_CLANGXXPATH + +ENABLE_BUILT_CLANG=$WITH_BUILT_CLANG + + + # Check whether --with-optimize-option was given. if test "${with_optimize_option+set}" = set; then withval=$with_optimize_option; @@ -11032,7 +11105,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking LLVM capable compiler... $ECHO_C" >&6; } +if test "$with_llvmcc" != "check"; then + if (test "$with_llvmcc" != "llvm-gcc" && + test "$with_llvmcc" != "clang" && + test "$with_llvmcc" != "none"); then + { { echo "$as_me:$LINENO: error: invalid value for --with-llvmcc, expected 'llvm-gcc', 'clang', or 'none'." >&5 +echo "$as_me: error: invalid value for --with-llvmcc, expected 'llvm-gcc', 'clang', or 'none'." >&2;} + { (exit 1); exit 1; }; } + fi + WITH_LLVMCC="$with_llvmcc" +elif test -n "$LLVMGCC"; then + WITH_LLVMCC=llvm-gcc +elif test -n "$WITH_CLANGPATH" || test "$WITH_BUILT_CLANG" -ne "0"; then + WITH_LLVMCC=clang +else + WITH_LLVMCC=none +fi +{ echo "$as_me:$LINENO: result: $WITH_LLVMCC" >&5 +echo "${ECHO_T}$WITH_LLVMCC" >&6; } +LLVMCC_OPTION=$WITH_LLVMCC + + { echo "$as_me:$LINENO: checking tool compatibility" >&5 echo $ECHO_N "checking tool compatibility... $ECHO_C" >&6; } @@ -20646,10 +20749,10 @@ LLVM_ENUM_ASM_PARSERS!$LLVM_ENUM_ASM_PARSERS$ac_delim LLVM_ENUM_DISASSEMBLERS!$LLVM_ENUM_DISASSEMBLERS$ac_delim ENABLE_CBE_PRINTF_A!$ENABLE_CBE_PRINTF_A$ac_delim +CLANGPATH!$CLANGPATH$ac_delim +CLANGXXPATH!$CLANGXXPATH$ac_delim +ENABLE_BUILT_CLANG!$ENABLE_BUILT_CLANG$ac_delim OPTIMIZE_OPTION!$OPTIMIZE_OPTION$ac_delim -EXTRA_OPTIONS!$EXTRA_OPTIONS$ac_delim -BINUTILS_INCDIR!$BINUTILS_INCDIR$ac_delim -ENABLE_LLVMC_DYNAMIC!$ENABLE_LLVMC_DYNAMIC$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -20691,6 +20794,9 @@ ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF +EXTRA_OPTIONS!$EXTRA_OPTIONS$ac_delim +BINUTILS_INCDIR!$BINUTILS_INCDIR$ac_delim +ENABLE_LLVMC_DYNAMIC!$ENABLE_LLVMC_DYNAMIC$ac_delim ENABLE_LLVMC_DYNAMIC_PLUGINS!$ENABLE_LLVMC_DYNAMIC_PLUGINS$ac_delim CXX!$CXX$ac_delim CXXFLAGS!$CXXFLAGS$ac_delim @@ -20746,6 +20852,7 @@ LLVMGXXCOMMAND!$LLVMGXXCOMMAND$ac_delim LLVMGCC!$LLVMGCC$ac_delim LLVMGXX!$LLVMGXX$ac_delim +LLVMCC_OPTION!$LLVMCC_OPTION$ac_delim NO_VARIADIC_MACROS!$NO_VARIADIC_MACROS$ac_delim NO_MISSING_FIELD_INITIALIZERS!$NO_MISSING_FIELD_INITIALIZERS$ac_delim USE_UDIS86!$USE_UDIS86$ac_delim @@ -20778,7 +20885,7 @@ LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 85; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 89; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 From daniel at zuster.org Tue Feb 23 04:00:53 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 10:00:53 -0000 Subject: [llvm-commits] [llvm] r96935 - in /llvm/trunk: Makefile.rules docs/MakefileGuide.html Message-ID: <20100223100053.5C29C2A6C12D@llvm.org> Author: ddunbar Date: Tue Feb 23 04:00:53 2010 New Revision: 96935 URL: http://llvm.org/viewvc/llvm-project?rev=96935&view=rev Log: Add LLVM{CC,CXX} make variables, which specify the configured path the LLVM capable compilers (which could be llvm-gcc or clang). Modified: llvm/trunk/Makefile.rules llvm/trunk/docs/MakefileGuide.html Modified: llvm/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=96935&r1=96934&r2=96935&view=diff ============================================================================== --- llvm/trunk/Makefile.rules (original) +++ llvm/trunk/Makefile.rules Tue Feb 23 04:00:53 2010 @@ -495,6 +495,27 @@ LLVMExmplDir:= $(LLVM_OBJ_ROOT)/$(BuildMode)/examples #-------------------------------------------------------------------- +# LLVM Capable Compiler +#-------------------------------------------------------------------- + +ifeq ($(LLVMCC_OPTION),llvm-gcc) + LLVMCC := $(LLVMGCC) + LLVMCXX := $(LLVMGXX) +else + ifeq ($(LLVMCC_OPTION),clang) + ifneq ($(CLANGPATH),) + LLVMCC := $(CLANGPATH) + LLVMCXX := $(CLANGXXPATH) + else + ifeq ($(ENABLE_BUILT_CLANG),1) + LLVMCC := $(LLVMToolDir)/clang + LLVMCXX := $(LLVMToolDir)/clang++ + endif + endif + endif +endif + +#-------------------------------------------------------------------- # Full Paths To Compiled Tools and Utilities #-------------------------------------------------------------------- EchoCmd = $(ECHO) llvm[$(MAKELEVEL)]: Modified: llvm/trunk/docs/MakefileGuide.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/MakefileGuide.html?rev=96935&r1=96934&r2=96935&view=diff ============================================================================== --- llvm/trunk/docs/MakefileGuide.html (original) +++ llvm/trunk/docs/MakefileGuide.html Tue Feb 23 04:00:53 2010 @@ -818,6 +818,10 @@ mklib by the configure script and always located in the
    LLVMAS(defaulted)
    Specifies the path to the llvm-as tool.
    +
    LLVMCC
    +
    Specifies the path to the LLVM capable compiler.
    +
    LLVMCXX
    +
    Specifies the path to the LLVM C++ capable compiler.
    LLVMGCC(defaulted)
    Specifies the path to the LLVM version of the GCC 'C' Compiler
    LLVMGXX(defaulted)
    From daniel at zuster.org Tue Feb 23 04:28:07 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 10:28:07 -0000 Subject: [llvm-commits] [llvm] r96936 - in /llvm/trunk: Makefile.rules runtime/libprofile/Makefile test/Makefile.tests Message-ID: <20100223102807.228312A6C12C@llvm.org> Author: ddunbar Date: Tue Feb 23 04:28:06 2010 New Revision: 96936 URL: http://llvm.org/viewvc/llvm-project?rev=96936&view=rev Log: Switch .bc/.ll Makefile rules to use LLVM{CC,CXX} instead of LLVMG{CC,XX} Modified: llvm/trunk/Makefile.rules llvm/trunk/runtime/libprofile/Makefile llvm/trunk/test/Makefile.tests Modified: llvm/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=96936&r1=96935&r2=96936&view=diff ============================================================================== --- llvm/trunk/Makefile.rules (original) +++ llvm/trunk/Makefile.rules Tue Feb 23 04:28:06 2010 @@ -720,12 +720,12 @@ $(TargetCommonOpts) $(CompileCommonOpts) $(LD.Flags) $(Strip) endif -BCCompile.C = $(LLVMGCC) $(CPP.Flags) $(C.Flags) $(CFLAGS) $(CPPFLAGS) \ +BCCompile.C = $(LLVMCC) $(CPP.Flags) $(C.Flags) $(CFLAGS) $(CPPFLAGS) \ $(TargetCommonOpts) $(CompileCommonOpts) Preprocess.C = $(CC) $(CPP.Flags) $(C.Flags) $(CPPFLAGS) \ $(TargetCommonOpts) $(CompileCommonOpts) -E -BCCompile.CXX = $(LLVMGXX) $(CPP.Flags) $(CXX.Flags) $(CXXFLAGS) $(CPPFLAGS) \ +BCCompile.CXX = $(LLVMCXX) $(CPP.Flags) $(CXX.Flags) $(CXXFLAGS) $(CPPFLAGS) \ $(TargetCommonOpts) $(CompileCommonOpts) ProgInstall = $(INSTALL) $(Install.StripFlag) -m 0755 @@ -979,8 +979,8 @@ #--------------------------------------------------------- ifdef MODULE_NAME -ifeq ($(strip $(LLVMGCC)),) -$(warning Modules require llvm-gcc but no llvm-gcc is available ****) +ifeq ($(strip $(LLVMCC)),) +$(warning Modules require LLVM capable compiler but none is available ****) else Module := $(LibDir)/$(MODULE_NAME).bc @@ -1105,8 +1105,8 @@ # targets for building them. #--------------------------------------------------------- ifdef BYTECODE_LIBRARY -ifeq ($(strip $(LLVMGCC)),) -$(warning Bytecode libraries require llvm-gcc which could not be found ****) +ifeq ($(strip $(LLVMCC)),) +$(warning Bytecode libraries require LLVM capable compiler but none is available ****) else all-local:: $(LibName.BCA) @@ -1389,19 +1389,19 @@ BC_DEPEND_MOVEFILE = then $(MV) -f "$(ObjDir)/$*.bc.d.tmp" "$(ObjDir)/$*.bc.d"; \ else $(RM) "$(ObjDir)/$*.bc.d.tmp"; exit 1; fi -$(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMGXX) +$(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX) $(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)" $(Verb) if $(BCCompile.CXX) $(BC_DEPEND_OPTIONS) \ $< -o $(ObjDir)/$*.ll -S -emit-llvm ; \ $(BC_DEPEND_MOVEFILE) -$(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMGXX) +$(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX) $(Echo) "Compiling $*.cc for $(BuildMode) build (bytecode)" $(Verb) if $(BCCompile.CXX) $(BC_DEPEND_OPTIONS) \ $< -o $(ObjDir)/$*.ll -S -emit-llvm ; \ $(BC_DEPEND_MOVEFILE) -$(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMGCC) +$(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCC) $(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)" $(Verb) if $(BCCompile.C) $(BC_DEPEND_OPTIONS) \ $< -o $(ObjDir)/$*.ll -S -emit-llvm ; \ @@ -1422,15 +1422,15 @@ $(Echo) "Compiling $*.c for $(BuildMode) build" $(PIC_FLAG) $(Compile.C) $< -o $@ -$(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMGXX) +$(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX) $(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)" $(BCCompile.CXX) $< -o $@ -S -emit-llvm -$(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMGXX) +$(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX) $(Echo) "Compiling $*.cc for $(BuildMode) build (bytecode)" $(BCCompile.CXX) $< -o $@ -S -emit-llvm -$(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMGCC) +$(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCC) $(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)" $(BCCompile.C) $< -o $@ -S -emit-llvm Modified: llvm/trunk/runtime/libprofile/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/runtime/libprofile/Makefile?rev=96936&r1=96935&r2=96936&view=diff ============================================================================== --- llvm/trunk/runtime/libprofile/Makefile (original) +++ llvm/trunk/runtime/libprofile/Makefile Tue Feb 23 04:28:06 2010 @@ -10,7 +10,7 @@ LEVEL = ../.. include $(LEVEL)/Makefile.config -ifneq ($(wildcard $(LLVMGCC)),) +ifneq ($(strip $(LLVMCC)),) BYTECODE_LIBRARY = 1 endif SHARED_LIBRARY = 1 Modified: llvm/trunk/test/Makefile.tests URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Makefile.tests?rev=96936&r1=96935&r2=96936&view=diff ============================================================================== --- llvm/trunk/test/Makefile.tests (original) +++ llvm/trunk/test/Makefile.tests Tue Feb 23 04:28:06 2010 @@ -49,15 +49,15 @@ # Compile from X.c to Output/X.ll Output/%.ll: %.c $(LCC1) Output/.dir $(INCLUDES) - -$(LLVMGCC) $(CPPFLAGS) $(LCCFLAGS) -S $< -o $@ + -$(LLVMCC) $(CPPFLAGS) $(LCCFLAGS) -S $< -o $@ # Compile from X.cpp to Output/X.ll Output/%.ll: %.cpp $(LCC1XX) Output/.dir $(INCLUDES) - -$(LLVMGXX) $(CPPFLAGS) $(LCXXFLAGS) -S $< -o $@ + -$(LLVMCXX) $(CPPFLAGS) $(LCXXFLAGS) -S $< -o $@ # Compile from X.cc to Output/X.ll Output/%.ll: %.cc $(LCC1XX) Output/.dir $(INCLUDES) - -$(LLVMGXX) $(CPPFLAGS) $(LCXXFLAGS) -S $< -o $@ + -$(LLVMCXX) $(CPPFLAGS) $(LCXXFLAGS) -S $< -o $@ # LLVM Assemble from Output/X.ll to Output/X.bc. Output/X.ll must have come # from GCC output, so use GCCAS. From daniel at zuster.org Tue Feb 23 04:48:51 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 10:48:51 -0000 Subject: [llvm-commits] [test-suite] r96937 - in /test-suite/trunk: Makefile.config.in Makefile.rules Message-ID: <20100223104851.D96512A6C12C@llvm.org> Author: ddunbar Date: Tue Feb 23 04:48:51 2010 New Revision: 96937 URL: http://llvm.org/viewvc/llvm-project?rev=96937&view=rev Log: Switch llvm-test-suite to using LLVM{CC,CXX}. Modified: test-suite/trunk/Makefile.config.in test-suite/trunk/Makefile.rules Modified: test-suite/trunk/Makefile.config.in URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Makefile.config.in?rev=96937&r1=96936&r2=96937&view=diff ============================================================================== --- test-suite/trunk/Makefile.config.in (original) +++ test-suite/trunk/Makefile.config.in Tue Feb 23 04:48:51 2010 @@ -45,10 +45,14 @@ ifdef TARGET_LLVMGCC LLVMGCC := $(TARGET_LLVMGCC) +LLVMCC := $(TARGET_LLVMGCC) +LLVMCC_OPTION := llvm-gcc endif ifdef TARGET_LLVMGXX LLVMGXX := $(TARGET_LLVMGXX) +LLVMCXX := $(TARGET_LLVMGXX) +LLVMCC_OPTION := llvm-gcc endif ifeq ($(ARCH),THUMB) Modified: test-suite/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Makefile.rules?rev=96937&r1=96936&r2=96937&view=diff ============================================================================== --- test-suite/trunk/Makefile.rules (original) +++ test-suite/trunk/Makefile.rules Tue Feb 23 04:48:51 2010 @@ -248,6 +248,29 @@ LIBTOOL += --silent endif +#-------------------------------------------------------------------- +# LLVM Capable Compiler +#-------------------------------------------------------------------- + +# FIXME: We shouldn't need to duplicate this from LLVM's Makefile.rules. + +ifeq ($(LLVMCC_OPTION),llvm-gcc) + LLVMCC := $(LLVMGCC) + LLVMCXX := $(LLVMGXX) +else + ifeq ($(LLVMCC_OPTION),clang) + ifneq ($(CLANGPATH),) + LLVMCC := $(CLANGPATH) + LLVMCXX := $(CLANGXXPATH) + else + ifeq ($(ENABLE_BUILT_CLANG),1) + LLVMCC := $(LLVMTOOLCURRENT)/clang + LLVMCXX := $(LLVMTOOLCURRENT)/clang++ + endif + endif + endif +endif + ########################################################################### # Miscellaneous paths and commands (part deux): # This section defines various configuration macros, such as where @@ -271,9 +294,12 @@ LBUGPOINT = $(LLVMTOOLCURRENT)/bugpoint$(EXEEXT) LFINDMISOPT= $(LLVM_SRC_ROOT)/utils/findmisopt -LCC := $(LLVMGCC) -LCXX := $(LLVMGXX) -LCC_PROGRAMS := $(LCC) $(LCXX) $(LLVMCC1) $(LLVMCC1PLUS) +LCC := $(LLVMCC) +LCXX := $(LLVMCXX) +LCC_PROGRAMS := $(LCC) $(LCXX) +ifeq ($(LLVMCC_OPTION),llvm-gcc) + LCC_PROGRAMS += $(LLVMCC1) $(LLVMCC1PLUS) +endif ########################################################################### From xerxes at zafena.se Tue Feb 23 05:23:14 2010 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Tue, 23 Feb 2010 12:23:14 +0100 Subject: [llvm-commits] [llvm] r96934 - in /llvm/trunk: Makefile.config.in autoconf/configure.ac configure In-Reply-To: <20100223100050.2421E2A6C12C@llvm.org> References: <20100223100050.2421E2A6C12C@llvm.org> Message-ID: <4B83BAA2.3070509@zafena.se> On 2010-02-23 11:00, Daniel Dunbar wrote: > Author: ddunbar > Date: Tue Feb 23 04:00:49 2010 > New Revision: 96934 > > URL: http://llvm.org/viewvc/llvm-project?rev=96934&view=rev > Log: > Initial configure support for using Clang as the LLVM capable compiler. > > Comes in two parts: > 1. Use --with-clang=path/to/clang/compiler to select an installed clang, or > --with-built-clang to have the makefiles use the clang which will be built > as the LLVM capable compiler. If neither is given, --with-built-clang will > be used if the Clang sources are checked out into the standard location > (tools/clang). > > 2. Use --with-llvmcc={llvm-gcc,clang,none} to specify which LLVM capable > compiler to use. If not given, then llvm-gcc will be used if available, > otherwise Clang. > > llvm-arm-linux buildbot fails to run all llvm regression tests with this patch applyed. http://google1.osuosl.org:8011/builders/llvm-arm-linux/builds/1802/steps/test-llvm/logs/stdio lit.py: lit.cfg:44: fatal: No llvm-gcc dir set! make[1]: *** [check-local-lit] Error 2 make[1]: Leaving directory `/wd/buildbot/llvm-arm-linux/llvm/test' make: *** [check-lit] Error 2 program finished with exit code 2 What puzzles me are why the buildbot decides to greenflag this when obviously no tests have been executed. http://google1.osuosl.org:8011/builders/llvm-arm-linux/builds/1802 Cheers and have a great day! Xerxes > Makefile support still to come. > > Eric, Doug, Chris, seem reasonable? > > Modified: > llvm/trunk/Makefile.config.in > llvm/trunk/autoconf/configure.ac > llvm/trunk/configure > > Modified: llvm/trunk/Makefile.config.in > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.config.in?rev=96934&r1=96933&r2=96934&view=diff > ============================================================================== > --- llvm/trunk/Makefile.config.in (original) > +++ llvm/trunk/Makefile.config.in Tue Feb 23 04:00:49 2010 > @@ -190,6 +190,14 @@ > LLVMCC1PLUS := @LLVMCC1PLUS@ > LLVMGCC_LANGS := @LLVMGCC_LANGS@ > > +# Information on Clang, if configured. > +CLANGPATH := @CLANGPATH@ > +CLANGXXPATH := @CLANGXXPATH@ > +ENABLE_BUILT_CLANG := @ENABLE_BUILT_CLANG@ > + > +# The LLVM capable compiler to use. > +LLVMCC_OPTION := @LLVMCC_OPTION@ > + > # Path to directory where object files should be stored during a build. > # Set OBJ_ROOT to "." if you do not want to use a separate place for > # object files. > > Modified: llvm/trunk/autoconf/configure.ac > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=96934&r1=96933&r2=96934&view=diff > ============================================================================== > --- llvm/trunk/autoconf/configure.ac (original) > +++ llvm/trunk/autoconf/configure.ac Tue Feb 23 04:00:49 2010 > @@ -612,6 +612,56 @@ > AC_MSG_ERROR([Invalid llvm-gcc. Use --with-llvmgcc when --with-llvmgxx is used]); > fi > > +dnl Allow a specific Clang compiler to be used with this LLVM config. > +AC_ARG_WITH(clang, > + AS_HELP_STRING([--with-clang], > + [Specify location of clang compiler (default is --with-built-clang)]), > + [],[with_clang=default]) > + > +dnl Enable use of the built Clang. > +AC_ARG_WITH(built-clang, > + AS_HELP_STRING([--with-built-clang], > + [Use the compiled Clang as the LLVM compiler (default=check)]), > + [],[with_built_clang=check]) > + > +dnl Select the Clang compiler option. > +dnl > +dnl If --with-clang is given, always honor that; otherwise honor > +dnl --with-built-clang, or check if we have the clang sources. > +AC_MSG_CHECKING([clang compiler]) > +WITH_CLANGPATH="" > +WITH_BUILT_CLANG=0 > +if test "$with_clang" != "default"; then > + WITH_CLANGPATH="$with_clang" > + if ! test -x "$WITH_CLANGPATH"; then > + AC_MSG_ERROR([invalid --with-clang, path does not specify an executable]) > + fi > +elif test "$with_built_clang" = "yes"; then > + WITH_BUILT_CLANG=1 > +elif test "$with_built_clang" = "no"; then > + WITH_BUILT_CLANG=0 > +else > + if test "$with_built_clang" != "check"; then > + AC_MSG_ERROR([invalid value for --with-built-clang.]) > + fi > + > + if test -f ${srcdir}/tools/clang/README.txt; then > + WITH_BUILT_CLANG=1 > + fi > +fi > + > +if ! test -z "$WITH_CLANGPATH"; then > + AC_MSG_RESULT([$WITH_CLANGPATH]) > + WITH_CLANGXXPATH=`"$WITH_CLANGPATH" --print-prog-name=clang++` > +elif test "$WITH_BUILT_CLANG" = "1"; then > + AC_MSG_RESULT([built]) > +else > + AC_MSG_RESULT([none]) > +fi > +AC_SUBST(CLANGPATH,$WITH_CLANGPATH) > +AC_SUBST(CLANGXXPATH,$WITH_CLANGXXPATH) > +AC_SUBST(ENABLE_BUILT_CLANG,$WITH_BUILT_CLANG) > + > dnl Override the option to use for optimized builds. > AC_ARG_WITH(optimize-option, > AS_HELP_STRING([--with-optimize-option], > @@ -946,6 +996,29 @@ > AC_SUBST(LLVMGXXCOMMAND,$LLVMGXXCOMMAND) > fi > > +dnl Select the LLVM capable compiler to use, we default to using llvm-gcc if > +dnl found, otherwise clang if available. > +AC_ARG_WITH(llvmcc, > + AS_HELP_STRING([--with-llvmcc=], > + [Choose the LLVM capable compiler to use (llvm-gcc, clang, or none; default=check)]), > + [],[with_llvmcc=check]) > +AC_MSG_CHECKING([LLVM capable compiler]) > +if test "$with_llvmcc" != "check"; then > + if (test "$with_llvmcc" != "llvm-gcc" && > + test "$with_llvmcc" != "clang" && > + test "$with_llvmcc" != "none"); then > + AC_MSG_ERROR([invalid value for --with-llvmcc, expected 'llvm-gcc', 'clang', or 'none'.]) > + fi > + WITH_LLVMCC="$with_llvmcc" > +elif test -n "$LLVMGCC"; then > + WITH_LLVMCC=llvm-gcc > +elif test -n "$WITH_CLANGPATH" || test "$WITH_BUILT_CLANG" -ne "0"; then > + WITH_LLVMCC=clang > +else > + WITH_LLVMCC=none > +fi > +AC_MSG_RESULT([$WITH_LLVMCC]) > +AC_SUBST(LLVMCC_OPTION,$WITH_LLVMCC) > > AC_MSG_CHECKING([tool compatibility]) > > > Modified: llvm/trunk/configure > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=96934&r1=96933&r2=96934&view=diff > ============================================================================== > --- llvm/trunk/configure (original) > +++ llvm/trunk/configure Tue Feb 23 04:00:49 2010 > @@ -695,6 +695,9 @@ > LLVM_ENUM_ASM_PARSERS > LLVM_ENUM_DISASSEMBLERS > ENABLE_CBE_PRINTF_A > +CLANGPATH > +CLANGXXPATH > +ENABLE_BUILT_CLANG > OPTIMIZE_OPTION > EXTRA_OPTIONS > BINUTILS_INCDIR > @@ -754,6 +757,7 @@ > LLVMGXXCOMMAND > LLVMGCC > LLVMGXX > +LLVMCC_OPTION > NO_VARIADIC_MACROS > NO_MISSING_FIELD_INITIALIZERS > USE_UDIS86 > @@ -1423,6 +1427,10 @@ > searches PATH) > --with-llvmgxx Specify location of llvm-g++ driver (default > searches PATH) > + --with-clang Specify location of clang compiler (default is > + --with-built-clang) > + --with-built-clang Use the compiled Clang as the LLVM compiler > + (default=check) > --with-optimize-option Select the compiler options to use for optimized > builds > --with-extra-options Specify additional options to compile LLVM with > @@ -1439,6 +1447,8 @@ > --with-binutils-include Specify path to binutils/include/ containing > plugin-api.h file for gold plugin. > --with-tclinclude directory where tcl headers are > + --with-llvmcc= Choose the LLVM capable compiler to use (llvm-gcc, > + clang, or none; default=check) > --with-udis86= Use udis86 external x86 disassembler library > --with-oprofile= > Tell OProfile >= 0.9.4 how to symbolize JIT output > @@ -5026,6 +5036,69 @@ > fi > > > +# Check whether --with-clang was given. > +if test "${with_clang+set}" = set; then > + withval=$with_clang; > +else > + with_clang=default > +fi > + > + > + > +# Check whether --with-built-clang was given. > +if test "${with_built_clang+set}" = set; then > + withval=$with_built_clang; > +else > + with_built_clang=check > +fi > + > + > +{ echo "$as_me:$LINENO: checking clang compiler" >&5 > +echo $ECHO_N "checking clang compiler... $ECHO_C" >&6; } > +WITH_CLANGPATH="" > +WITH_BUILT_CLANG=0 > +if test "$with_clang" != "default"; then > + WITH_CLANGPATH="$with_clang" > + if ! test -x "$WITH_CLANGPATH"; then > + { { echo "$as_me:$LINENO: error: invalid --with-clang, path does not specify an executable" >&5 > +echo "$as_me: error: invalid --with-clang, path does not specify an executable" >&2;} > + { (exit 1); exit 1; }; } > + fi > +elif test "$with_built_clang" = "yes"; then > + WITH_BUILT_CLANG=1 > +elif test "$with_built_clang" = "no"; then > + WITH_BUILT_CLANG=0 > +else > + if test "$with_built_clang" != "check"; then > + { { echo "$as_me:$LINENO: error: invalid value for --with-built-clang." >&5 > +echo "$as_me: error: invalid value for --with-built-clang." >&2;} > + { (exit 1); exit 1; }; } > + fi > + > + if test -f ${srcdir}/tools/clang/README.txt; then > + WITH_BUILT_CLANG=1 > + fi > +fi > + > +if ! test -z "$WITH_CLANGPATH"; then > + { echo "$as_me:$LINENO: result: $WITH_CLANGPATH" >&5 > +echo "${ECHO_T}$WITH_CLANGPATH" >&6; } > + WITH_CLANGXXPATH=`"$WITH_CLANGPATH" --print-prog-name=clang++` > +elif test "$WITH_BUILT_CLANG" = "1"; then > + { echo "$as_me:$LINENO: result: built" >&5 > +echo "${ECHO_T}built" >&6; } > +else > + { echo "$as_me:$LINENO: result: none" >&5 > +echo "${ECHO_T}none" >&6; } > +fi > +CLANGPATH=$WITH_CLANGPATH > + > +CLANGXXPATH=$WITH_CLANGXXPATH > + > +ENABLE_BUILT_CLANG=$WITH_BUILT_CLANG > + > + > + > # Check whether --with-optimize-option was given. > if test "${with_optimize_option+set}" = set; then > withval=$with_optimize_option; > @@ -11032,7 +11105,7 @@ > lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 > lt_status=$lt_dlunknown > cat > conftest.$ac_ext < -#line 11035 "configure" > +#line 11108 "configure" > #include "confdefs.h" > > #if HAVE_DLFCN_H > @@ -12802,6 +12875,36 @@ > fi > > > +# Check whether --with-llvmcc was given. > +if test "${with_llvmcc+set}" = set; then > + withval=$with_llvmcc; > +else > + with_llvmcc=check > +fi > + > +{ echo "$as_me:$LINENO: checking LLVM capable compiler" >&5 > +echo $ECHO_N "checking LLVM capable compiler... $ECHO_C" >&6; } > +if test "$with_llvmcc" != "check"; then > + if (test "$with_llvmcc" != "llvm-gcc" && > + test "$with_llvmcc" != "clang" && > + test "$with_llvmcc" != "none"); then > + { { echo "$as_me:$LINENO: error: invalid value for --with-llvmcc, expected 'llvm-gcc', 'clang', or 'none'." >&5 > +echo "$as_me: error: invalid value for --with-llvmcc, expected 'llvm-gcc', 'clang', or 'none'." >&2;} > + { (exit 1); exit 1; }; } > + fi > + WITH_LLVMCC="$with_llvmcc" > +elif test -n "$LLVMGCC"; then > + WITH_LLVMCC=llvm-gcc > +elif test -n "$WITH_CLANGPATH" || test "$WITH_BUILT_CLANG" -ne "0"; then > + WITH_LLVMCC=clang > +else > + WITH_LLVMCC=none > +fi > +{ echo "$as_me:$LINENO: result: $WITH_LLVMCC" >&5 > +echo "${ECHO_T}$WITH_LLVMCC" >&6; } > +LLVMCC_OPTION=$WITH_LLVMCC > + > + > { echo "$as_me:$LINENO: checking tool compatibility" >&5 > echo $ECHO_N "checking tool compatibility... $ECHO_C" >&6; } > > @@ -20646,10 +20749,10 @@ > LLVM_ENUM_ASM_PARSERS!$LLVM_ENUM_ASM_PARSERS$ac_delim > LLVM_ENUM_DISASSEMBLERS!$LLVM_ENUM_DISASSEMBLERS$ac_delim > ENABLE_CBE_PRINTF_A!$ENABLE_CBE_PRINTF_A$ac_delim > +CLANGPATH!$CLANGPATH$ac_delim > +CLANGXXPATH!$CLANGXXPATH$ac_delim > +ENABLE_BUILT_CLANG!$ENABLE_BUILT_CLANG$ac_delim > OPTIMIZE_OPTION!$OPTIMIZE_OPTION$ac_delim > -EXTRA_OPTIONS!$EXTRA_OPTIONS$ac_delim > -BINUTILS_INCDIR!$BINUTILS_INCDIR$ac_delim > -ENABLE_LLVMC_DYNAMIC!$ENABLE_LLVMC_DYNAMIC$ac_delim > _ACEOF > > if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then > @@ -20691,6 +20794,9 @@ > ac_delim='%!_!# ' > for ac_last_try in false false false false false :; do > cat >conf$$subs.sed <<_ACEOF > +EXTRA_OPTIONS!$EXTRA_OPTIONS$ac_delim > +BINUTILS_INCDIR!$BINUTILS_INCDIR$ac_delim > +ENABLE_LLVMC_DYNAMIC!$ENABLE_LLVMC_DYNAMIC$ac_delim > ENABLE_LLVMC_DYNAMIC_PLUGINS!$ENABLE_LLVMC_DYNAMIC_PLUGINS$ac_delim > CXX!$CXX$ac_delim > CXXFLAGS!$CXXFLAGS$ac_delim > @@ -20746,6 +20852,7 @@ > LLVMGXXCOMMAND!$LLVMGXXCOMMAND$ac_delim > LLVMGCC!$LLVMGCC$ac_delim > LLVMGXX!$LLVMGXX$ac_delim > +LLVMCC_OPTION!$LLVMCC_OPTION$ac_delim > NO_VARIADIC_MACROS!$NO_VARIADIC_MACROS$ac_delim > NO_MISSING_FIELD_INITIALIZERS!$NO_MISSING_FIELD_INITIALIZERS$ac_delim > USE_UDIS86!$USE_UDIS86$ac_delim > @@ -20778,7 +20885,7 @@ > LTLIBOBJS!$LTLIBOBJS$ac_delim > _ACEOF > > - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 85; then > + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 89; then > break > elif $ac_last_try; then > { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > From daniel at zuster.org Tue Feb 23 05:34:12 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 11:34:12 -0000 Subject: [llvm-commits] [llvm] r96938 - /llvm/trunk/test/lit.cfg Message-ID: <20100223113412.31BAC2A6C12C@llvm.org> Author: ddunbar Date: Tue Feb 23 05:34:12 2010 New Revision: 96938 URL: http://llvm.org/viewvc/llvm-project?rev=96938&view=rev Log: tests: Don't make a missing llvm-gcc dir a fatal error. Modified: llvm/trunk/test/lit.cfg Modified: llvm/trunk/test/lit.cfg URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lit.cfg?rev=96938&r1=96937&r2=96938&view=diff ============================================================================== --- llvm/trunk/test/lit.cfg (original) +++ llvm/trunk/test/lit.cfg Tue Feb 23 05:34:12 2010 @@ -40,8 +40,6 @@ config.environment['PATH'] = path llvmgcc_dir = getattr(config, 'llvmgcc_dir', None) - if not llvmgcc_dir: - lit.fatal('No llvm-gcc dir set!') if llvmgcc_dir: path = os.path.pathsep.join((os.path.join(llvmgcc_dir, 'bin'), config.environment['PATH'])) From daniel at zuster.org Tue Feb 23 05:35:08 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 03:35:08 -0800 Subject: [llvm-commits] [llvm] r96934 - in /llvm/trunk: Makefile.config.in autoconf/configure.ac configure In-Reply-To: <4B83BAA2.3070509@zafena.se> References: <20100223100050.2421E2A6C12C@llvm.org> <4B83BAA2.3070509@zafena.se> Message-ID: <6a8523d61002230335n5b7d2168p90eb06d736d7231f@mail.gmail.com> On Tue, Feb 23, 2010 at 3:23 AM, Xerxes R?nby wrote: > On 2010-02-23 11:00, Daniel Dunbar wrote: >> Author: ddunbar >> Date: Tue Feb 23 04:00:49 2010 >> New Revision: 96934 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=96934&view=rev >> Log: >> Initial configure support for using Clang as the LLVM capable compiler. >> >> Comes in two parts: >> ?1. Use --with-clang=path/to/clang/compiler to select an installed clang, or >> ? ? --with-built-clang to have the makefiles use the clang which will be built >> ? ? as the LLVM capable compiler. If neither is given, --with-built-clang will >> ? ? be used if the Clang sources are checked out into the standard location >> ? ? (tools/clang). >> >> ?2. Use --with-llvmcc={llvm-gcc,clang,none} to specify which LLVM capable >> ? ? compiler to use. If not given, then llvm-gcc will be used if available, >> ? ? otherwise Clang. >> >> > llvm-arm-linux buildbot fails to run all llvm regression tests with this > patch applyed. > > http://google1.osuosl.org:8011/builders/llvm-arm-linux/builds/1802/steps/test-llvm/logs/stdio > > lit.py: lit.cfg:44: fatal: No llvm-gcc dir set! > make[1]: *** [check-local-lit] Error 2 > make[1]: Leaving directory `/wd/buildbot/llvm-arm-linux/llvm/test' > make: *** [check-lit] Error 2 > program finished with exit code 2 > > What puzzles me are why the buildbot decides to greenflag this when > obviously no tests have been executed. > http://google1.osuosl.org:8011/builders/llvm-arm-linux/builds/1802 This is fixed in r96938, I think. The reason it claims to pass is a bug in the lit test scanner (it isn't expecting lit itself to fail). - Daniel > > Cheers and have a great day! > Xerxes > >> Makefile support still to come. >> >> Eric, Doug, Chris, seem reasonable? >> >> Modified: >> ? ? llvm/trunk/Makefile.config.in >> ? ? llvm/trunk/autoconf/configure.ac >> ? ? llvm/trunk/configure >> >> Modified: llvm/trunk/Makefile.config.in >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.config.in?rev=96934&r1=96933&r2=96934&view=diff >> ============================================================================== >> --- llvm/trunk/Makefile.config.in (original) >> +++ llvm/trunk/Makefile.config.in Tue Feb 23 04:00:49 2010 >> @@ -190,6 +190,14 @@ >> ?LLVMCC1PLUS := @LLVMCC1PLUS@ >> ?LLVMGCC_LANGS := @LLVMGCC_LANGS@ >> >> +# Information on Clang, if configured. >> +CLANGPATH := @CLANGPATH@ >> +CLANGXXPATH := @CLANGXXPATH@ >> +ENABLE_BUILT_CLANG := @ENABLE_BUILT_CLANG@ >> + >> +# The LLVM capable compiler to use. >> +LLVMCC_OPTION := @LLVMCC_OPTION@ >> + >> ?# Path to directory where object files should be stored during a build. >> ?# Set OBJ_ROOT to "." if you do not want to use a separate place for >> ?# object files. >> >> Modified: llvm/trunk/autoconf/configure.ac >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=96934&r1=96933&r2=96934&view=diff >> ============================================================================== >> --- llvm/trunk/autoconf/configure.ac (original) >> +++ llvm/trunk/autoconf/configure.ac Tue Feb 23 04:00:49 2010 >> @@ -612,6 +612,56 @@ >> ? ? AC_MSG_ERROR([Invalid llvm-gcc. Use --with-llvmgcc when --with-llvmgxx is used]); >> ?fi >> >> +dnl Allow a specific Clang compiler to be used with this LLVM config. >> +AC_ARG_WITH(clang, >> + ?AS_HELP_STRING([--with-clang], >> + ? ?[Specify location of clang compiler (default is --with-built-clang)]), >> + ? ?[],[with_clang=default]) >> + >> +dnl Enable use of the built Clang. >> +AC_ARG_WITH(built-clang, >> + ?AS_HELP_STRING([--with-built-clang], >> + ? ?[Use the compiled Clang as the LLVM compiler (default=check)]), >> + ? ?[],[with_built_clang=check]) >> + >> +dnl Select the Clang compiler option. >> +dnl >> +dnl If --with-clang is given, always honor that; otherwise honor >> +dnl --with-built-clang, or check if we have the clang sources. >> +AC_MSG_CHECKING([clang compiler]) >> +WITH_CLANGPATH="" >> +WITH_BUILT_CLANG=0 >> +if test "$with_clang" != "default"; then >> + ? WITH_CLANGPATH="$with_clang" >> + ? if ! test -x "$WITH_CLANGPATH"; then >> + ? ? AC_MSG_ERROR([invalid --with-clang, path does not specify an executable]) >> + ? fi >> +elif test "$with_built_clang" = "yes"; then >> + ? WITH_BUILT_CLANG=1 >> +elif test "$with_built_clang" = "no"; then >> + ? WITH_BUILT_CLANG=0 >> +else >> + ? if test "$with_built_clang" != "check"; then >> + ? ? ?AC_MSG_ERROR([invalid value for --with-built-clang.]) >> + ? fi >> + >> + ? if test -f ${srcdir}/tools/clang/README.txt; then >> + ? ? WITH_BUILT_CLANG=1 >> + ? fi >> +fi >> + >> +if ! test -z "$WITH_CLANGPATH"; then >> + ? AC_MSG_RESULT([$WITH_CLANGPATH]) >> + ? WITH_CLANGXXPATH=`"$WITH_CLANGPATH" --print-prog-name=clang++` >> +elif test "$WITH_BUILT_CLANG" = "1"; then >> + ? AC_MSG_RESULT([built]) >> +else >> + ? AC_MSG_RESULT([none]) >> +fi >> +AC_SUBST(CLANGPATH,$WITH_CLANGPATH) >> +AC_SUBST(CLANGXXPATH,$WITH_CLANGXXPATH) >> +AC_SUBST(ENABLE_BUILT_CLANG,$WITH_BUILT_CLANG) >> + >> ?dnl Override the option to use for optimized builds. >> ?AC_ARG_WITH(optimize-option, >> ? ?AS_HELP_STRING([--with-optimize-option], >> @@ -946,6 +996,29 @@ >> ? ?AC_SUBST(LLVMGXXCOMMAND,$LLVMGXXCOMMAND) >> ?fi >> >> +dnl Select the LLVM capable compiler to use, we default to using llvm-gcc if >> +dnl found, otherwise clang if available. >> +AC_ARG_WITH(llvmcc, >> + ?AS_HELP_STRING([--with-llvmcc=], >> + ? ?[Choose the LLVM capable compiler to use (llvm-gcc, clang, or none; default=check)]), >> + ? ?[],[with_llvmcc=check]) >> +AC_MSG_CHECKING([LLVM capable compiler]) >> +if test "$with_llvmcc" != "check"; then >> + ? if (test "$with_llvmcc" != "llvm-gcc" && >> + ? ? ? test "$with_llvmcc" != "clang" && >> + ? ? ? test "$with_llvmcc" != "none"); then >> + ? ? ?AC_MSG_ERROR([invalid value for --with-llvmcc, expected 'llvm-gcc', 'clang', or 'none'.]) >> + ? fi >> + ? WITH_LLVMCC="$with_llvmcc" >> +elif test -n "$LLVMGCC"; then >> + ? WITH_LLVMCC=llvm-gcc >> +elif test -n "$WITH_CLANGPATH" || test "$WITH_BUILT_CLANG" -ne "0"; then >> + ? WITH_LLVMCC=clang >> +else >> + ? WITH_LLVMCC=none >> +fi >> +AC_MSG_RESULT([$WITH_LLVMCC]) >> +AC_SUBST(LLVMCC_OPTION,$WITH_LLVMCC) >> >> ?AC_MSG_CHECKING([tool compatibility]) >> >> >> Modified: llvm/trunk/configure >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=96934&r1=96933&r2=96934&view=diff >> ============================================================================== >> --- llvm/trunk/configure (original) >> +++ llvm/trunk/configure Tue Feb 23 04:00:49 2010 >> @@ -695,6 +695,9 @@ >> ?LLVM_ENUM_ASM_PARSERS >> ?LLVM_ENUM_DISASSEMBLERS >> ?ENABLE_CBE_PRINTF_A >> +CLANGPATH >> +CLANGXXPATH >> +ENABLE_BUILT_CLANG >> ?OPTIMIZE_OPTION >> ?EXTRA_OPTIONS >> ?BINUTILS_INCDIR >> @@ -754,6 +757,7 @@ >> ?LLVMGXXCOMMAND >> ?LLVMGCC >> ?LLVMGXX >> +LLVMCC_OPTION >> ?NO_VARIADIC_MACROS >> ?NO_MISSING_FIELD_INITIALIZERS >> ?USE_UDIS86 >> @@ -1423,6 +1427,10 @@ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ?searches PATH) >> ? ?--with-llvmgxx ? ? ? ? ?Specify location of llvm-g++ driver (default >> ? ? ? ? ? ? ? ? ? ? ? ? ? ?searches PATH) >> + ?--with-clang ? ? ? ? ? ?Specify location of clang compiler (default is >> + ? ? ? ? ? ? ? ? ? ? ? ? ?--with-built-clang) >> + ?--with-built-clang ? ? ?Use the compiled Clang as the LLVM compiler >> + ? ? ? ? ? ? ? ? ? ? ? ? ?(default=check) >> ? ?--with-optimize-option ?Select the compiler options to use for optimized >> ? ? ? ? ? ? ? ? ? ? ? ? ? ?builds >> ? ?--with-extra-options ? ?Specify additional options to compile LLVM with >> @@ -1439,6 +1447,8 @@ >> ? ?--with-binutils-include Specify path to binutils/include/ containing >> ? ? ? ? ? ? ? ? ? ? ? ? ? ?plugin-api.h file for gold plugin. >> ? ?--with-tclinclude ? ? ? directory where tcl headers are >> + ?--with-llvmcc= ? ?Choose the LLVM capable compiler to use (llvm-gcc, >> + ? ? ? ? ? ? ? ? ? ? ? ? ?clang, or none; default=check) >> ? ?--with-udis86= ? ?Use udis86 external x86 disassembler library >> ? ?--with-oprofile= >> ? ? ? ? ? ? ? ? ? ? ? ? ? ?Tell OProfile >= 0.9.4 how to symbolize JIT output >> @@ -5026,6 +5036,69 @@ >> ?fi >> >> >> +# Check whether --with-clang was given. >> +if test "${with_clang+set}" = set; then >> + ?withval=$with_clang; >> +else >> + ?with_clang=default >> +fi >> + >> + >> + >> +# Check whether --with-built-clang was given. >> +if test "${with_built_clang+set}" = set; then >> + ?withval=$with_built_clang; >> +else >> + ?with_built_clang=check >> +fi >> + >> + >> +{ echo "$as_me:$LINENO: checking clang compiler" >&5 >> +echo $ECHO_N "checking clang compiler... $ECHO_C" >&6; } >> +WITH_CLANGPATH="" >> +WITH_BUILT_CLANG=0 >> +if test "$with_clang" != "default"; then >> + ? WITH_CLANGPATH="$with_clang" >> + ? if ! test -x "$WITH_CLANGPATH"; then >> + ? ? { { echo "$as_me:$LINENO: error: invalid --with-clang, path does not specify an executable" >&5 >> +echo "$as_me: error: invalid --with-clang, path does not specify an executable" >&2;} >> + ? { (exit 1); exit 1; }; } >> + ? fi >> +elif test "$with_built_clang" = "yes"; then >> + ? WITH_BUILT_CLANG=1 >> +elif test "$with_built_clang" = "no"; then >> + ? WITH_BUILT_CLANG=0 >> +else >> + ? if test "$with_built_clang" != "check"; then >> + ? ? ?{ { echo "$as_me:$LINENO: error: invalid value for --with-built-clang." >&5 >> +echo "$as_me: error: invalid value for --with-built-clang." >&2;} >> + ? { (exit 1); exit 1; }; } >> + ? fi >> + >> + ? if test -f ${srcdir}/tools/clang/README.txt; then >> + ? ? WITH_BUILT_CLANG=1 >> + ? fi >> +fi >> + >> +if ! test -z "$WITH_CLANGPATH"; then >> + ? { echo "$as_me:$LINENO: result: $WITH_CLANGPATH" >&5 >> +echo "${ECHO_T}$WITH_CLANGPATH" >&6; } >> + ? WITH_CLANGXXPATH=`"$WITH_CLANGPATH" --print-prog-name=clang++` >> +elif test "$WITH_BUILT_CLANG" = "1"; then >> + ? { echo "$as_me:$LINENO: result: built" >&5 >> +echo "${ECHO_T}built" >&6; } >> +else >> + ? { echo "$as_me:$LINENO: result: none" >&5 >> +echo "${ECHO_T}none" >&6; } >> +fi >> +CLANGPATH=$WITH_CLANGPATH >> + >> +CLANGXXPATH=$WITH_CLANGXXPATH >> + >> +ENABLE_BUILT_CLANG=$WITH_BUILT_CLANG >> + >> + >> + >> ?# Check whether --with-optimize-option was given. >> ?if test "${with_optimize_option+set}" = set; then >> ? ?withval=$with_optimize_option; >> @@ -11032,7 +11105,7 @@ >> ? ?lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 >> ? ?lt_status=$lt_dlunknown >> ? ?cat > conftest.$ac_ext <> -#line 11035 "configure" >> +#line 11108 "configure" >> ?#include "confdefs.h" >> >> ?#if HAVE_DLFCN_H >> @@ -12802,6 +12875,36 @@ >> ?fi >> >> >> +# Check whether --with-llvmcc was given. >> +if test "${with_llvmcc+set}" = set; then >> + ?withval=$with_llvmcc; >> +else >> + ?with_llvmcc=check >> +fi >> + >> +{ echo "$as_me:$LINENO: checking LLVM capable compiler" >&5 >> +echo $ECHO_N "checking LLVM capable compiler... $ECHO_C" >&6; } >> +if test "$with_llvmcc" != "check"; then >> + ? if (test "$with_llvmcc" != "llvm-gcc" && >> + ? ? ? test "$with_llvmcc" != "clang" && >> + ? ? ? test "$with_llvmcc" != "none"); then >> + ? ? ?{ { echo "$as_me:$LINENO: error: invalid value for --with-llvmcc, expected 'llvm-gcc', 'clang', or 'none'." >&5 >> +echo "$as_me: error: invalid value for --with-llvmcc, expected 'llvm-gcc', 'clang', or 'none'." >&2;} >> + ? { (exit 1); exit 1; }; } >> + ? fi >> + ? WITH_LLVMCC="$with_llvmcc" >> +elif test -n "$LLVMGCC"; then >> + ? WITH_LLVMCC=llvm-gcc >> +elif test -n "$WITH_CLANGPATH" || test "$WITH_BUILT_CLANG" -ne "0"; then >> + ? WITH_LLVMCC=clang >> +else >> + ? WITH_LLVMCC=none >> +fi >> +{ echo "$as_me:$LINENO: result: $WITH_LLVMCC" >&5 >> +echo "${ECHO_T}$WITH_LLVMCC" >&6; } >> +LLVMCC_OPTION=$WITH_LLVMCC >> + >> + >> ?{ echo "$as_me:$LINENO: checking tool compatibility" >&5 >> ?echo $ECHO_N "checking tool compatibility... $ECHO_C" >&6; } >> >> @@ -20646,10 +20749,10 @@ >> ?LLVM_ENUM_ASM_PARSERS!$LLVM_ENUM_ASM_PARSERS$ac_delim >> ?LLVM_ENUM_DISASSEMBLERS!$LLVM_ENUM_DISASSEMBLERS$ac_delim >> ?ENABLE_CBE_PRINTF_A!$ENABLE_CBE_PRINTF_A$ac_delim >> +CLANGPATH!$CLANGPATH$ac_delim >> +CLANGXXPATH!$CLANGXXPATH$ac_delim >> +ENABLE_BUILT_CLANG!$ENABLE_BUILT_CLANG$ac_delim >> ?OPTIMIZE_OPTION!$OPTIMIZE_OPTION$ac_delim >> -EXTRA_OPTIONS!$EXTRA_OPTIONS$ac_delim >> -BINUTILS_INCDIR!$BINUTILS_INCDIR$ac_delim >> -ENABLE_LLVMC_DYNAMIC!$ENABLE_LLVMC_DYNAMIC$ac_delim >> ?_ACEOF >> >> ? ?if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then >> @@ -20691,6 +20794,9 @@ >> ?ac_delim='%!_!# ' >> ?for ac_last_try in false false false false false :; do >> ? ?cat >conf$$subs.sed <<_ACEOF >> +EXTRA_OPTIONS!$EXTRA_OPTIONS$ac_delim >> +BINUTILS_INCDIR!$BINUTILS_INCDIR$ac_delim >> +ENABLE_LLVMC_DYNAMIC!$ENABLE_LLVMC_DYNAMIC$ac_delim >> ?ENABLE_LLVMC_DYNAMIC_PLUGINS!$ENABLE_LLVMC_DYNAMIC_PLUGINS$ac_delim >> ?CXX!$CXX$ac_delim >> ?CXXFLAGS!$CXXFLAGS$ac_delim >> @@ -20746,6 +20852,7 @@ >> ?LLVMGXXCOMMAND!$LLVMGXXCOMMAND$ac_delim >> ?LLVMGCC!$LLVMGCC$ac_delim >> ?LLVMGXX!$LLVMGXX$ac_delim >> +LLVMCC_OPTION!$LLVMCC_OPTION$ac_delim >> ?NO_VARIADIC_MACROS!$NO_VARIADIC_MACROS$ac_delim >> ?NO_MISSING_FIELD_INITIALIZERS!$NO_MISSING_FIELD_INITIALIZERS$ac_delim >> ?USE_UDIS86!$USE_UDIS86$ac_delim >> @@ -20778,7 +20885,7 @@ >> ?LTLIBOBJS!$LTLIBOBJS$ac_delim >> ?_ACEOF >> >> - ?if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 85; then >> + ?if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 89; then >> ? ? ?break >> ? ?elif $ac_last_try; then >> ? ? ?{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 >> >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits >> > > From daniel at zuster.org Tue Feb 23 05:37:45 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 11:37:45 -0000 Subject: [llvm-commits] [zorg] r96939 - in /zorg/trunk: buildbot/osuosl/master/config/builders.py buildbot/osuosl/master/config/slaves.py zorg/buildbot/builders/DragonEggBuilder.py Message-ID: <20100223113746.02F7B2A6C12C@llvm.org> Author: ddunbar Date: Tue Feb 23 05:37:45 2010 New Revision: 96939 URL: http://llvm.org/viewvc/llvm-project?rev=96939&view=rev Log: Sketch initial cut at DragonEgg builder. Added: zorg/trunk/zorg/buildbot/builders/DragonEggBuilder.py Modified: zorg/trunk/buildbot/osuosl/master/config/builders.py zorg/trunk/buildbot/osuosl/master/config/slaves.py Modified: zorg/trunk/buildbot/osuosl/master/config/builders.py URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/osuosl/master/config/builders.py?rev=96939&r1=96938&r2=96939&view=diff ============================================================================== --- zorg/trunk/buildbot/osuosl/master/config/builders.py (original) +++ zorg/trunk/buildbot/osuosl/master/config/builders.py Tue Feb 23 05:37:45 2010 @@ -1,5 +1,9 @@ from zorg.buildbot.builders import ClangBuilder, LLVMBuilder, LLVMGCCBuilder +from zorg.buildbot.builders import DragonEggBuilder +reload(DragonEggBuilder) +from zorg.buildbot.builders import DragonEggBuilder + # Plain LLVM builders. def _get_llvm_builders(): return [ @@ -111,7 +115,8 @@ verbose=True, env={ 'PATH' : '/cross-tools/bin:/usr/bin:/bin:/usr/sbin:/sbin' }, ), - 'category':'llvm-gcc.exp'}, + 'category':'llvm-gcc'}, + {'name' : "clang-x86_64-darwin10-selfhost-rel", 'slavenames' : ["dunbar-darwin10"], 'builddir' : "clang-x86_64-darwin10-selfhost-rel", @@ -120,6 +125,12 @@ stage1_config='Release', stage2_config='Release'), 'category' : 'clang.exp' }, + + {'name' : 'dragonegg-x86_64-linux', + 'slavenames' : ['baldrick2'], + 'builddir' : 'dragonegg-x86_64-linux', + 'factory' : DragonEggBuilder.getBuildFactory(triple='x86_64-pc-linux-gnu'), + 'category' : 'dragonegg.exp' }, ] def get_builders(): Modified: zorg/trunk/buildbot/osuosl/master/config/slaves.py URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/osuosl/master/config/slaves.py?rev=96939&r1=96938&r2=96939&view=diff ============================================================================== --- zorg/trunk/buildbot/osuosl/master/config/slaves.py (original) +++ zorg/trunk/buildbot/osuosl/master/config/slaves.py Tue Feb 23 05:37:45 2010 @@ -46,6 +46,10 @@ # Win XP SP2, Intel Core2 Duo 2.99GHz -E6850, 2.93 GB create_slave("adobe1", properties={'jobs' : 2}, max_builds=1), + # GCC Farm Slaves, for DragonEgg + create_slave("baldrick1", properties={'jobs' : 2}, max_builds=1), + create_slave("baldrick2", properties={'jobs' : 4}, max_builds=1), + # Defunct. #create_slave("osu2", properties={'jobs' : 4}, max_builds=2), #create_slave("andrew1"), Added: zorg/trunk/zorg/buildbot/builders/DragonEggBuilder.py URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/DragonEggBuilder.py?rev=96939&view=auto ============================================================================== --- zorg/trunk/zorg/buildbot/builders/DragonEggBuilder.py (added) +++ zorg/trunk/zorg/buildbot/builders/DragonEggBuilder.py Tue Feb 23 05:37:45 2010 @@ -0,0 +1,144 @@ +import buildbot +import buildbot.process.factory +from buildbot.steps.source import SVN +from buildbot.steps.shell import Configure, ShellCommand +from buildbot.steps.shell import WarningCountingShellCommand +from buildbot.process.properties import WithProperties + +def getBuildFactory(triple, clean=True, + jobs='%(jobs)s'): + # FIXME: Move out. + env = {} + configure_args = ["--enable-lto", "--enable-languages=c,c++", "--disable-bootstrap", + "--disable-multilib", "--enable-checking", + "--with-mpfr=/opt/cfarm/mpfr-2.4.1", "--with-gmp=/opt/cfarm/gmp-4.2.4", + "--with-mpc=/opt/cfarm/mpc-0.8", "--with-libelf=/opt/cfarm/libelf-0.8.12"] + + f = buildbot.process.factory.BuildFactory() + + # Determine the build directory. + f.addStep(buildbot.steps.shell.SetProperty(name="get_builddir", + command=["pwd"], + property="builddir", + description="set build dir", + workdir=".")) + + # Checkout LLVM sources. + f.addStep(SVN(name='svn-llvm', + mode='update', baseURL='http://llvm.org/svn/llvm-project/llvm/', + defaultBranch='trunk', + workdir='llvm.src')) + + # Checkout DragonEgg sources. + f.addStep(SVN(name='svn-dragonegg', + mode='update', baseURL='http://llvm.org/svn/llvm-project/dragonegg/', + defaultBranch='trunk', + workdir='dragonegg.src')) + + # Revert any DragonEgg patches. + f.addStep(ShellCommand(name='patch.revert.gcc', + command=['svn','revert','-R','gcc'], + workdir='gcc.src', + haltOnFailure=False)) + + # Checkout GCC sources. + # + # FIXME: This is going to mess up revision numbers. + f.addStep(SVN(name='svn-gcc', + mode='update', baseURL='svn://gcc.gnu.org/svn/gcc/', + defaultBranch='trunk', + workdir='gcc.src')) + + # Apply patch. + # + # FIXME: Eliminate this. + f.addStep(ShellCommand(name='patch.gcc', + command="patch -p1 < ../dragonegg.src/gcc-patches/i386_static.diff", + workdir='gcc.src')) + + # Build and install GCC. + if clean: + f.addStep(ShellCommand(name="rm-gcc.obj.stage1", + command=["rm", "-rf", "gcc.1.obj"], + haltOnFailure = True, + description=["rm build dir", "gcc"], + workdir=".", env=env)) + # Create the gcc.1.obj dir. FIXME: This shouldn't be necessary, old buildbot or something. + f.addStep(ShellCommand(command="mkdir gcc.1.obj", + workdir='.')) + f.addStep(Configure(name='configure.gcc.stage1', + command=(["../gcc.src/configure", + WithProperties("--prefix=%(builddir)s/gcc.1.install")] + + configure_args), + haltOnFailure = True, + description=["configure", "gcc", "(stage 1)"], + workdir="gcc.1.obj", env=env)) + f.addStep(WarningCountingShellCommand(name = "compile.gcc.stage1", + command = ["nice", "-n", "10", + "make", WithProperties("-j%s" % jobs)], + haltOnFailure = True, + description=["compile", "gcc", "(stage 1)"], + workdir="gcc.1.obj", env=env)) + f.addStep(WarningCountingShellCommand(name = "install.gcc.stage1", + command = ["nice", "-n", "10", + "make", "install"], + haltOnFailure = True, + description=["install", "gcc", "(stage 1)"], + workdir="gcc.1.obj", env=env)) + + # Build LLVM (stage 1) with the GCC (stage 1). + if clean: + f.addStep(ShellCommand(name="rm-llvm.obj.stage1", + command=["rm", "-rf", "llvm.1.obj"], + haltOnFailure = True, + description=["rm build dir", "llvm"], + workdir=".", env=env)) + # Create the llvm.1.obj dir. FIXME: This shouldn't be necessary, old buildbot or something. + f.addStep(ShellCommand(command="mkdir llvm.1.obj", + workdir='.')) + f.addStep(Configure(name='configure.llvm.stage1', + command=(["../llvm.src/configure", + WithProperties("CC=%(builddir)s/gcc.1.install/bin/gcc"), + WithProperties("CXX=%(builddir)s/gcc.1.install/bin/g++"), + WithProperties("--prefix=%(builddir)s/llvm.1.install")] + + configure_args), + haltOnFailure = True, + description=["configure", "llvm", "(stage 1)"], + workdir="llvm.1.obj", env=env)) + f.addStep(WarningCountingShellCommand(name = "compile.llvm.stage1", + command = ["nice", "-n", "10", + "make", WithProperties("-j%s" % jobs)], + haltOnFailure = True, + description=["compile", "llvm", "(stage 1)"], + workdir="llvm.1.obj", env=env)) + f.addStep(WarningCountingShellCommand(name = "install.llvm.stage1", + command = ["nice", "-n", "10", + "make", WithProperties("-j%s" % jobs), + "install"], + haltOnFailure = True, + description=["install", "llvm", "(stage 1)"], + workdir="llvm.1.obj", env=env)) + + # Clean DragonEgg. + if clean: + f.addStep(ShellCommand(name="clean.dragonegg.stage1", + command=["make", "clean"], + haltOnFailure = True, + description=["make clean", + "(dragonegg)"], + workdir="dragonegg.src", env=env)) + f.addStep(WarningCountingShellCommand( + name = "compile.dragonegg.stage1", + command = ["nice", "-n", "10", + "make", WithProperties("-j%s" % jobs), + WithProperties("CC=%(builddir)s/gcc.1.install/bin/gcc"), + WithProperties("GXX=%(builddir)s/gcc.1.install/bin/g++"), + WithProperties("GCC=%(builddir)s/gcc.1.install/bin/gcc"), + WithProperties("LLVM_CONFIG=%(builddir)s/llvm.1.obj/Debug/bin/llvm-config"), + ], + haltOnFailure = True, + description=["compile", "dragonegg", "(stage 1)"], + workdir="dragonegg.src", env=env)) + + return f + From baldrick at free.fr Tue Feb 23 05:54:56 2010 From: baldrick at free.fr (Duncan Sands) Date: Tue, 23 Feb 2010 11:54:56 -0000 Subject: [llvm-commits] [dragonegg] r96940 - /dragonegg/trunk/Makefile Message-ID: <20100223115456.1B2C02A6C12C@llvm.org> Author: baldrick Date: Tue Feb 23 05:54:55 2010 New Revision: 96940 URL: http://llvm.org/viewvc/llvm-project?rev=96940&view=rev Log: Make it possible to build in a different directory to the source, by providing SRC_DIR, for example: SRC_DIR=.../dragonegg make -f .../dragonegg/Makefile Modified: dragonegg/trunk/Makefile Modified: dragonegg/trunk/Makefile URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/Makefile?rev=96940&r1=96939&r2=96940&view=diff ============================================================================== --- dragonegg/trunk/Makefile (original) +++ dragonegg/trunk/Makefile Tue Feb 23 05:54:55 2010 @@ -9,13 +9,16 @@ # that was created during the build. LLVM_CONFIG?=llvm-config +# Location of the dragonegg source, useful if you want separate source and +# object directories. +SRC_DIR?=$(PWD) PLUGIN=dragonegg.so PLUGIN_OBJECTS=llvm-cache.o llvm-convert.o llvm-backend.o llvm-debug.o \ llvm-types.o bits_and_bobs.o llvm-abi-default.o TARGET_OBJECT=llvm-target.o -TARGET_SOURCE=$(shell $(TARGET_UTIL) -p)/llvm-target.cpp +TARGET_SOURCE=$(SRC_DIR)/$(shell $(TARGET_UTIL) -p)/llvm-target.cpp TARGET_UTIL_OBJECTS=target.o TARGET_UTIL=./target @@ -23,15 +26,15 @@ ALL_OBJECTS=$(PLUGIN_OBJECTS) $(TARGET_OBJECT) $(TARGET_UTIL_OBJECTS) -GENGTYPE_INPUT=$(PWD)/llvm-cache.c -GENGTYPE_OUTPUT=$(PWD)/gt-llvm-cache.h +GENGTYPE_INPUT=$(SRC_DIR)/llvm-cache.c +GENGTYPE_OUTPUT=$(SRC_DIR)/gt-llvm-cache.h GCCSOURCE_DIR=$(shell $(GCC) -print-file-name=plugin) TARGET_TRIPLE:=$(shell $(GCC) -v 2>&1 | grep "^Target:" | sed -e "s/^Target: *//") # NOTE: replace with an informative string when doing a release. -REVISION:=$(shell svnversion -n .) +REVISION:=$(shell svnversion -n $(SRC_DIR)) CFLAGS+=-Wall -Werror -fPIC -g -O2 -fno-exceptions CFLAGS+=-DIN_GCC -DREVISION=\"$(REVISION)\" -DTARGET_NAME=\"$(TARGET_TRIPLE)\" @@ -43,27 +46,28 @@ PLUGIN_CFLAGS+=-I$(GCCSOURCE_DIR)/gcc -I$(GCCSOURCE_DIR)/include \ -I$(GCCSOURCE_DIR)/libcpp/include -I$(GCCSOURCE_DIR)/libdecnumber \ - -I$(shell $(TARGET_UTIL) -p) -I$(shell $(TARGET_UTIL) -o) + -I$(SRC_DIR)/$(shell $(TARGET_UTIL) -p) \ + -I$(SRC_DIR)/$(shell $(TARGET_UTIL) -o) PLUGIN_CXXFLAGS+=$(PLUGIN_CFLAGS) default: $(PLUGIN) -$(TARGET_UTIL_OBJECTS): %.o : utils/%.cpp +$(TARGET_UTIL_OBJECTS): %.o : $(SRC_DIR)/utils/%.cpp $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< $(TARGET_UTIL): $(TARGET_UTIL_OBJECTS) $(CXX) -o $@ $^ $(LDFLAGS) -%.o : %.c $(TARGET_UTIL) +%.o : $(SRC_DIR)/%.c $(TARGET_UTIL) $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PLUGIN_CFLAGS) $< -%.o : %.cpp $(TARGET_UTIL) +%.o : $(SRC_DIR)/%.cpp $(TARGET_UTIL) $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(PLUGIN_CXXFLAGS) $< $(TARGET_OBJECT): $(TARGET_UTIL) - $(CXX) -o $@ -c $(CPPFLAGS) $(CXXFLAGS) $(PLUGIN_CXXFLAGS) -I. \ - $(TARGET_SOURCE) + $(CXX) -o $@ -c $(CPPFLAGS) $(CXXFLAGS) $(PLUGIN_CXXFLAGS) \ + -I$(SRC_DIR) $(TARGET_SOURCE) $(PLUGIN): $(PLUGIN_OBJECTS) $(TARGET_OBJECT) $(TARGET_UTIL) $(CXX) -shared $(PLUGIN_OBJECTS) $(TARGET_OBJECT) -o $@ $(LDFLAGS) \ From xerxes at zafena.se Tue Feb 23 06:41:55 2010 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Tue, 23 Feb 2010 13:41:55 +0100 Subject: [llvm-commits] [llvm] r95723 - in /llvm/trunk/examples: CMakeLists.txt ExceptionDemo/ ExceptionDemo/CMakeLists.txt ExceptionDemo/ExceptionDemo.cpp ExceptionDemo/Makefile Makefile In-Reply-To: <201002092322.o19NMiQ3005105@zion.cs.uiuc.edu> References: <201002092322.o19NMiQ3005105@zion.cs.uiuc.edu> Message-ID: <4B83CD13.9050908@zafena.se> On 2010-02-10 00:22, Garrison Venn wrote: > Author: gvenn > Date: Tue Feb 9 17:22:43 2010 > New Revision: 95723 > > URL: http://llvm.org/viewvc/llvm-project?rev=95723&view=rev > Log: > Adds a JIT based exception handling example to the examples directory. > Both zero cost example domain specific, and C++ foreign exception handling are > shown. The example's documentation fully explains how to run the example. > > Notes: > > 1) The code uses an extremely simple type info model. > 2) Only a single landing pad is used per unwind edge > (one call to llvm.eh.selector) > 3) llvm.eh.selector support for filter arguments is not given. > 4) llvm.eh.typeid.for is not used. > 5) Forced unwind behavior is not supported. > 6) Very little if any error handling is given. > 7) __attribute__((__aligned__)) is used. > 8) The code uses parts from the llvm compiler-rt project and > the llvm Kaleidoscope example. > 9) The code has not been ported or tested on WINDOWS. > 10) The code was not tested with a cmake build. > 11) The code was tested for a debug build on 32bit X86 CentOS LINUX, > and both a debug and release build on OS X 10.6.2 (64bit). > The build fails when building this example using LLVM ARM Linux using GCC 4.3.3 on Ubuntu Jaunty, make[1]: Entering directory `/media/disk/llvm-configure/examples/ExceptionDemo' llvm[1]: Compiling ExceptionDemo.cpp for Release build llvm[1]: Linking Release executable ExceptionDemo (without symbols) /media/disk/llvm-configure/examples/ExceptionDemo/Release/ExceptionDemo.o: In function `ourPersonality': ExceptionDemo.cpp:(.text+0x60c): undefined reference to `_Unwind_GetIP' ExceptionDemo.cpp:(.text+0x7f8): undefined reference to `_Unwind_SetGR' ExceptionDemo.cpp:(.text+0x818): undefined reference to `_Unwind_SetGR' ExceptionDemo.cpp:(.text+0x828): undefined reference to `_Unwind_SetIP' ExceptionDemo.cpp:(.text+0x870): undefined reference to `_Unwind_SetGR' collect2: ld returned 1 exit status make[1]: *** [/media/disk/llvm-configure/Release/examples/ExceptionDemo] Error 1 make[1]: Leaving directory The llvm-arm-linux buildbot have disabled builds of the examples so thats why we are not catching this using the buildbot. The following exception symbols exist when building on ARM: buildbot at sheeva:/usr/lib/gcc/arm-linux-gnueabi/4.3.3$ nm -a libgcc_eh.a unwind-arm.o: 00000000 n .ARM.attributes 00000000 r .ARM.exidx 00000000 r .ARM.extab 00000000 b .bss 00000000 n .comment 00000000 d .data 00000000 n .note.GNU-stack 00000000 t .text U _GLOBAL_OFFSET_TABLE_ 000000b0 T _Unwind_Complete 000000b4 T _Unwind_DeleteException 000000a8 T _Unwind_GetCFA 00000000 T _Unwind_VRS_Get 00000b8c T _Unwind_VRS_Pop 00000054 T _Unwind_VRS_Set 000004e0 T __aeabi_unwind_cpp_pr0 000004d8 W __aeabi_unwind_cpp_pr1 000004d0 W __aeabi_unwind_cpp_pr2 w __cxa_begin_cleanup w __cxa_call_unexpected w __cxa_type_match U __exidx_end U __exidx_start 000007e0 T __gnu_Unwind_Backtrace w __gnu_Unwind_Find_exidx 000009dc T __gnu_Unwind_ForcedUnwind 00000a5c T __gnu_Unwind_RaiseException U __gnu_Unwind_Restore_VFP U __gnu_Unwind_Restore_VFP_D U __gnu_Unwind_Restore_VFP_D_16_to_31 U __gnu_Unwind_Restore_WMMXC U __gnu_Unwind_Restore_WMMXD 00000b20 T __gnu_Unwind_Resume 00000b00 T __gnu_Unwind_Resume_or_Rethrow U __gnu_Unwind_Save_VFP U __gnu_Unwind_Save_VFP_D U __gnu_Unwind_Save_VFP_D_16_to_31 U __gnu_Unwind_Save_WMMXC U __gnu_Unwind_Save_WMMXD U __gnu_unwind_execute 000000dc t __gnu_unwind_pr_common U abort 000004e8 t get_eit_entry U memcpy U restore_core_regs 00000754 t restore_non_core_regs 00000a00 t unwind_phase2 0000089c t unwind_phase2_forced libunwind.o: 00000000 n .ARM.attributes 00000000 b .bss 00000000 d .data 00000000 n .note.GNU-stack 00000000 t .text 00000184 T _Unwind_Backtrace 00000160 T _Unwind_ForcedUnwind 000000f4 T _Unwind_RaiseException 00000118 T _Unwind_Resume 0000013c T _Unwind_Resume_or_Rethrow 00000184 T ___Unwind_Backtrace 00000160 T ___Unwind_ForcedUnwind 000000f4 T ___Unwind_RaiseException 00000118 T ___Unwind_Resume 0000013c T ___Unwind_Resume_or_Rethrow U __gnu_Unwind_Backtrace U __gnu_Unwind_ForcedUnwind U __gnu_Unwind_RaiseException 00000014 T __gnu_Unwind_Restore_VFP 00000024 T __gnu_Unwind_Restore_VFP_D 00000034 T __gnu_Unwind_Restore_VFP_D_16_to_31 000000cc T __gnu_Unwind_Restore_WMMXC 00000044 T __gnu_Unwind_Restore_WMMXD U __gnu_Unwind_Resume U __gnu_Unwind_Resume_or_Rethrow 0000001c T __gnu_Unwind_Save_VFP 0000002c T __gnu_Unwind_Save_VFP_D 0000003c T __gnu_Unwind_Save_VFP_D_16_to_31 000000e0 T __gnu_Unwind_Save_WMMXC 00000088 T __gnu_Unwind_Save_WMMXD 00000000 T __restore_core_regs 00000000 T restore_core_regs pr-support.o: 00000000 n .ARM.attributes 00000000 r .ARM.exidx 00000000 r .ARM.extab 00000000 b .bss 00000000 n .comment 00000000 d .data 00000000 n .note.GNU-stack 00000000 t .text 00000068 T _Unwind_GetDataRelBase 00000074 T _Unwind_GetLanguageSpecificData 000000b8 T _Unwind_GetRegionStart 0000005c T _Unwind_GetTextRelBase U _Unwind_VRS_Get U _Unwind_VRS_Pop U _Unwind_VRS_Set U __aeabi_unwind_cpp_pr0 000000e8 T __gnu_unwind_execute 00000768 T __gnu_unwind_frame U abort 00000000 t next_unwind_byte unwind-c.o: 00000000 n .ARM.attributes 00000000 r .ARM.exidx 00000000 r .ARM.extab 00000000 b .bss 00000000 n .comment 00000000 d .data 00000000 n .note.GNU-stack 00000000 t .text U _Unwind_GetDataRelBase U _Unwind_GetLanguageSpecificData U _Unwind_GetRegionStart U _Unwind_GetTextRelBase U _Unwind_VRS_Get U _Unwind_VRS_Set U __aeabi_unwind_cpp_pr0 00000000 T __gcc_personality_v0 U __gnu_unwind_frame U abort emutls.o: 00000000 n .ARM.attributes 00000000 r .ARM.exidx 00000000 r .ARM.extab 00000000 b .bss 00000000 n .comment 00000000 d .data 00000000 n .note.GNU-stack 00000000 t .text U _GLOBAL_OFFSET_TABLE_ U __aeabi_unwind_cpp_pr0 0000012c T __emutls_get_address 00000000 T __emutls_register_common U abort U calloc 00000084 t emutls_alloc 000002b8 t emutls_destroy 00000040 t emutls_init 0000001c b emutls_key 00000000 b emutls_mutex 00000020 b emutls_size U free U malloc U memcpy U memset 00000018 b once.6753 w pthread_cancel w pthread_getspecific w pthread_key_create w pthread_mutex_lock w pthread_mutex_unlock w pthread_once w pthread_setspecific U realloc buildbot at sheeva:/usr/lib/gcc/arm-linux-gnueabi/4.3.3$ Cheers, and have a great day! Xerxes From xerxes at zafena.se Tue Feb 23 07:20:39 2010 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Tue, 23 Feb 2010 14:20:39 +0100 Subject: [llvm-commits] [llvm] r95723 - in /llvm/trunk/examples: CMakeLists.txt ExceptionDemo/ ExceptionDemo/CMakeLists.txt ExceptionDemo/ExceptionDemo.cpp ExceptionDemo/Makefile Makefile In-Reply-To: <4B83CD13.9050908@zafena.se> References: <201002092322.o19NMiQ3005105@zion.cs.uiuc.edu> <4B83CD13.9050908@zafena.se> Message-ID: <4B83D627.9070001@zafena.se> On 2010-02-23 13:41, Xerxes R?nby wrote: > On 2010-02-10 00:22, Garrison Venn wrote: > >> Author: gvenn >> Date: Tue Feb 9 17:22:43 2010 >> New Revision: 95723 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=95723&view=rev >> Log: >> Adds a JIT based exception handling example to the examples directory. >> Both zero cost example domain specific, and C++ foreign exception handling are >> shown. The example's documentation fully explains how to run the example. >> >> Notes: >> >> 1) The code uses an extremely simple type info model. >> 2) Only a single landing pad is used per unwind edge >> (one call to llvm.eh.selector) >> 3) llvm.eh.selector support for filter arguments is not given. >> 4) llvm.eh.typeid.for is not used. >> 5) Forced unwind behavior is not supported. >> 6) Very little if any error handling is given. >> 7) __attribute__((__aligned__)) is used. >> 8) The code uses parts from the llvm compiler-rt project and >> the llvm Kaleidoscope example. >> 9) The code has not been ported or tested on WINDOWS. >> 10) The code was not tested with a cmake build. >> 11) The code was tested for a debug build on 32bit X86 CentOS LINUX, >> and both a debug and release build on OS X 10.6.2 (64bit). >> >> > The build fails when building this example using LLVM ARM Linux using > GCC 4.3.3 on Ubuntu Jaunty, > > make[1]: Entering directory > `/media/disk/llvm-configure/examples/ExceptionDemo' > llvm[1]: Compiling ExceptionDemo.cpp for Release build > llvm[1]: Linking Release executable ExceptionDemo (without symbols) > /media/disk/llvm-configure/examples/ExceptionDemo/Release/ExceptionDemo.o: > In function `ourPersonality': > ExceptionDemo.cpp:(.text+0x60c): undefined reference to `_Unwind_GetIP' > ExceptionDemo.cpp:(.text+0x7f8): undefined reference to `_Unwind_SetGR' > ExceptionDemo.cpp:(.text+0x818): undefined reference to `_Unwind_SetGR' > ExceptionDemo.cpp:(.text+0x828): undefined reference to `_Unwind_SetIP' > ExceptionDemo.cpp:(.text+0x870): undefined reference to `_Unwind_SetGR' > collect2: ld returned 1 exit status > make[1]: *** [/media/disk/llvm-configure/Release/examples/ExceptionDemo] > Error 1 > make[1]: Leaving directory > For what i can find, it looks like _Unwind_GetIP and _Unwind_SetGR are not defined in the Exception Handling ABI for the ARM? Architecture http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038a/IHI0038A_ehabi.pdf Hope this heps fixing the example implementation for ARM. Cheers Xerxes > The llvm-arm-linux buildbot have disabled builds of the examples so > thats why we are not catching this using the buildbot. > > The following exception symbols exist when building on ARM: > buildbot at sheeva:/usr/lib/gcc/arm-linux-gnueabi/4.3.3$ nm -a libgcc_eh.a > > unwind-arm.o: > 00000000 n .ARM.attributes > 00000000 r .ARM.exidx > 00000000 r .ARM.extab > 00000000 b .bss > 00000000 n .comment > 00000000 d .data > 00000000 n .note.GNU-stack > 00000000 t .text > U _GLOBAL_OFFSET_TABLE_ > 000000b0 T _Unwind_Complete > 000000b4 T _Unwind_DeleteException > 000000a8 T _Unwind_GetCFA > 00000000 T _Unwind_VRS_Get > 00000b8c T _Unwind_VRS_Pop > 00000054 T _Unwind_VRS_Set > 000004e0 T __aeabi_unwind_cpp_pr0 > 000004d8 W __aeabi_unwind_cpp_pr1 > 000004d0 W __aeabi_unwind_cpp_pr2 > w __cxa_begin_cleanup > w __cxa_call_unexpected > w __cxa_type_match > U __exidx_end > U __exidx_start > 000007e0 T __gnu_Unwind_Backtrace > w __gnu_Unwind_Find_exidx > 000009dc T __gnu_Unwind_ForcedUnwind > 00000a5c T __gnu_Unwind_RaiseException > U __gnu_Unwind_Restore_VFP > U __gnu_Unwind_Restore_VFP_D > U __gnu_Unwind_Restore_VFP_D_16_to_31 > U __gnu_Unwind_Restore_WMMXC > U __gnu_Unwind_Restore_WMMXD > 00000b20 T __gnu_Unwind_Resume > 00000b00 T __gnu_Unwind_Resume_or_Rethrow > U __gnu_Unwind_Save_VFP > U __gnu_Unwind_Save_VFP_D > U __gnu_Unwind_Save_VFP_D_16_to_31 > U __gnu_Unwind_Save_WMMXC > U __gnu_Unwind_Save_WMMXD > U __gnu_unwind_execute > 000000dc t __gnu_unwind_pr_common > U abort > 000004e8 t get_eit_entry > U memcpy > U restore_core_regs > 00000754 t restore_non_core_regs > 00000a00 t unwind_phase2 > 0000089c t unwind_phase2_forced > > libunwind.o: > 00000000 n .ARM.attributes > 00000000 b .bss > 00000000 d .data > 00000000 n .note.GNU-stack > 00000000 t .text > 00000184 T _Unwind_Backtrace > 00000160 T _Unwind_ForcedUnwind > 000000f4 T _Unwind_RaiseException > 00000118 T _Unwind_Resume > 0000013c T _Unwind_Resume_or_Rethrow > 00000184 T ___Unwind_Backtrace > 00000160 T ___Unwind_ForcedUnwind > 000000f4 T ___Unwind_RaiseException > 00000118 T ___Unwind_Resume > 0000013c T ___Unwind_Resume_or_Rethrow > U __gnu_Unwind_Backtrace > U __gnu_Unwind_ForcedUnwind > U __gnu_Unwind_RaiseException > 00000014 T __gnu_Unwind_Restore_VFP > 00000024 T __gnu_Unwind_Restore_VFP_D > 00000034 T __gnu_Unwind_Restore_VFP_D_16_to_31 > 000000cc T __gnu_Unwind_Restore_WMMXC > 00000044 T __gnu_Unwind_Restore_WMMXD > U __gnu_Unwind_Resume > U __gnu_Unwind_Resume_or_Rethrow > 0000001c T __gnu_Unwind_Save_VFP > 0000002c T __gnu_Unwind_Save_VFP_D > 0000003c T __gnu_Unwind_Save_VFP_D_16_to_31 > 000000e0 T __gnu_Unwind_Save_WMMXC > 00000088 T __gnu_Unwind_Save_WMMXD > 00000000 T __restore_core_regs > 00000000 T restore_core_regs > > pr-support.o: > 00000000 n .ARM.attributes > 00000000 r .ARM.exidx > 00000000 r .ARM.extab > 00000000 b .bss > 00000000 n .comment > 00000000 d .data > 00000000 n .note.GNU-stack > 00000000 t .text > 00000068 T _Unwind_GetDataRelBase > 00000074 T _Unwind_GetLanguageSpecificData > 000000b8 T _Unwind_GetRegionStart > 0000005c T _Unwind_GetTextRelBase > U _Unwind_VRS_Get > U _Unwind_VRS_Pop > U _Unwind_VRS_Set > U __aeabi_unwind_cpp_pr0 > 000000e8 T __gnu_unwind_execute > 00000768 T __gnu_unwind_frame > U abort > 00000000 t next_unwind_byte > > unwind-c.o: > 00000000 n .ARM.attributes > 00000000 r .ARM.exidx > 00000000 r .ARM.extab > 00000000 b .bss > 00000000 n .comment > 00000000 d .data > 00000000 n .note.GNU-stack > 00000000 t .text > U _Unwind_GetDataRelBase > U _Unwind_GetLanguageSpecificData > U _Unwind_GetRegionStart > U _Unwind_GetTextRelBase > U _Unwind_VRS_Get > U _Unwind_VRS_Set > U __aeabi_unwind_cpp_pr0 > 00000000 T __gcc_personality_v0 > U __gnu_unwind_frame > U abort > > emutls.o: > 00000000 n .ARM.attributes > 00000000 r .ARM.exidx > 00000000 r .ARM.extab > 00000000 b .bss > 00000000 n .comment > 00000000 d .data > 00000000 n .note.GNU-stack > 00000000 t .text > U _GLOBAL_OFFSET_TABLE_ > U __aeabi_unwind_cpp_pr0 > 0000012c T __emutls_get_address > 00000000 T __emutls_register_common > U abort > U calloc > 00000084 t emutls_alloc > 000002b8 t emutls_destroy > 00000040 t emutls_init > 0000001c b emutls_key > 00000000 b emutls_mutex > 00000020 b emutls_size > U free > U malloc > U memcpy > U memset > 00000018 b once.6753 > w pthread_cancel > w pthread_getspecific > w pthread_key_create > w pthread_mutex_lock > w pthread_mutex_unlock > w pthread_once > w pthread_setspecific > U realloc > buildbot at sheeva:/usr/lib/gcc/arm-linux-gnueabi/4.3.3$ > > Cheers, and have a great day! > Xerxes > From richard at xmos.com Tue Feb 23 07:25:07 2010 From: richard at xmos.com (Richard Osborne) Date: Tue, 23 Feb 2010 13:25:07 -0000 Subject: [llvm-commits] [llvm] r96942 - in /llvm/trunk: lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp lib/Target/XCore/XCoreISelLowering.cpp lib/Target/XCore/XCoreISelLowering.h lib/Target/XCore/XCoreInstrInfo.cpp lib/Target/XCore/XCoreInstrInfo.td test/CodeGen/XCore/switch.ll test/CodeGen/XCore/switch_long.ll Message-ID: <20100223132507.5A6F62A6C12C@llvm.org> Author: friedgold Date: Tue Feb 23 07:25:07 2010 New Revision: 96942 URL: http://llvm.org/viewvc/llvm-project?rev=96942&view=rev Log: Lower BR_JT on the XCore to a jump into a series of jump instructions. Added: llvm/trunk/test/CodeGen/XCore/switch.ll llvm/trunk/test/CodeGen/XCore/switch_long.ll Modified: llvm/trunk/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp llvm/trunk/lib/Target/XCore/XCoreISelLowering.h llvm/trunk/lib/Target/XCore/XCoreInstrInfo.cpp llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td Modified: llvm/trunk/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp?rev=96942&r1=96941&r2=96942&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp Tue Feb 23 07:25:07 2010 @@ -27,6 +27,7 @@ #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineConstantPool.h" #include "llvm/CodeGen/MachineInstr.h" +#include "llvm/CodeGen/MachineJumpTableInfo.h" #include "llvm/MC/MCStreamer.h" #include "llvm/MC/MCSymbol.h" #include "llvm/Target/TargetData.h" @@ -62,6 +63,11 @@ } void printMemOperand(const MachineInstr *MI, int opNum); + void printInlineJT(const MachineInstr *MI, int opNum, + const std::string &directive = ".jmptable"); + void printInlineJT32(const MachineInstr *MI, int opNum) { + printInlineJT(MI, opNum, ".jmptable32"); + } void printOperand(const MachineInstr *MI, int opNum); bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, unsigned AsmVariant, const char *ExtraCode); @@ -257,6 +263,23 @@ printOperand(MI, opNum+1); } +void XCoreAsmPrinter:: +printInlineJT(const MachineInstr *MI, int opNum, const std::string &directive) +{ + unsigned JTI = MI->getOperand(opNum).getIndex(); + const MachineFunction *MF = MI->getParent()->getParent(); + const MachineJumpTableInfo *MJTI = MF->getJumpTableInfo(); + const std::vector &JT = MJTI->getJumpTables(); + const std::vector &JTBBs = JT[JTI].MBBs; + O << "\t" << directive << " "; + for (unsigned i = 0, e = JTBBs.size(); i != e; ++i) { + MachineBasicBlock *MBB = JTBBs[i]; + if (i > 0) + O << ","; + O << *MBB->getSymbol(OutContext); + } +} + void XCoreAsmPrinter::printOperand(const MachineInstr *MI, int opNum) { const MachineOperand &MO = MI->getOperand(opNum); switch (MO.getType()) { Modified: llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp?rev=96942&r1=96941&r2=96942&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp (original) +++ llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp Tue Feb 23 07:25:07 2010 @@ -29,6 +29,7 @@ #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineInstrBuilder.h" +#include "llvm/CodeGen/MachineJumpTableInfo.h" #include "llvm/CodeGen/MachineRegisterInfo.h" #include "llvm/CodeGen/SelectionDAGISel.h" #include "llvm/CodeGen/ValueTypes.h" @@ -53,6 +54,8 @@ case XCoreISD::RETSP : return "XCoreISD::RETSP"; case XCoreISD::LADD : return "XCoreISD::LADD"; case XCoreISD::LSUB : return "XCoreISD::LSUB"; + case XCoreISD::BR_JT : return "XCoreISD::BR_JT"; + case XCoreISD::BR_JT32 : return "XCoreISD::BR_JT32"; default : return NULL; } } @@ -106,9 +109,8 @@ setOperationAction(ISD::TRAP, MVT::Other, Legal); - // Expand jump tables for now - setOperationAction(ISD::BR_JT, MVT::Other, Expand); - setOperationAction(ISD::JumpTable, MVT::i32, Custom); + // Jump tables. + setOperationAction(ISD::BR_JT, MVT::Other, Custom); setOperationAction(ISD::GlobalAddress, MVT::i32, Custom); setOperationAction(ISD::BlockAddress, MVT::i32 , Custom); @@ -158,6 +160,7 @@ case ISD::BlockAddress: return LowerBlockAddress(Op, DAG); case ISD::ConstantPool: return LowerConstantPool(Op, DAG); case ISD::JumpTable: return LowerJumpTable(Op, DAG); + case ISD::BR_JT: return LowerBR_JT(Op, DAG); case ISD::LOAD: return LowerLOAD(Op, DAG); case ISD::STORE: return LowerSTORE(Op, DAG); case ISD::SELECT_CC: return LowerSELECT_CC(Op, DAG); @@ -325,6 +328,30 @@ return DAG.getNode(XCoreISD::DPRelativeWrapper, dl, MVT::i32, JTI); } +SDValue XCoreTargetLowering:: +LowerBR_JT(SDValue Op, SelectionDAG &DAG) +{ + SDValue Chain = Op.getOperand(0); + SDValue Table = Op.getOperand(1); + SDValue Index = Op.getOperand(2); + DebugLoc dl = Op.getDebugLoc(); + JumpTableSDNode *JT = cast(Table); + unsigned JTI = JT->getIndex(); + MachineFunction &MF = DAG.getMachineFunction(); + const MachineJumpTableInfo *MJTI = MF.getJumpTableInfo(); + SDValue TargetJT = DAG.getTargetJumpTable(JT->getIndex(), MVT::i32); + + unsigned NumEntries = MJTI->getJumpTables()[JTI].MBBs.size(); + if (NumEntries <= 32) { + return DAG.getNode(XCoreISD::BR_JT, dl, MVT::Other, Chain, TargetJT, Index); + } + assert((NumEntries >> 31) == 0); + SDValue ScaledIndex = DAG.getNode(ISD::SHL, dl, MVT::i32, Index, + DAG.getConstant(1, MVT::i32)); + return DAG.getNode(XCoreISD::BR_JT32, dl, MVT::Other, Chain, TargetJT, + ScaledIndex); +} + static bool IsWordAlignedBasePlusConstantOffset(SDValue Addr, SDValue &AlignedBase, int64_t &Offset) Modified: llvm/trunk/lib/Target/XCore/XCoreISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreISelLowering.h?rev=96942&r1=96941&r2=96942&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreISelLowering.h (original) +++ llvm/trunk/lib/Target/XCore/XCoreISelLowering.h Tue Feb 23 07:25:07 2010 @@ -52,7 +52,13 @@ LADD, // Corresponds to LSUB instruction - LSUB + LSUB, + + // Jumptable branch. + BR_JT, + + // Jumptable branch using long branches for each entry. + BR_JT32 }; } @@ -123,6 +129,7 @@ SDValue LowerBlockAddress(SDValue Op, SelectionDAG &DAG); SDValue LowerConstantPool(SDValue Op, SelectionDAG &DAG); SDValue LowerJumpTable(SDValue Op, SelectionDAG &DAG); + SDValue LowerBR_JT(SDValue Op, SelectionDAG &DAG); SDValue LowerSELECT_CC(SDValue Op, SelectionDAG &DAG); SDValue LowerVAARG(SDValue Op, SelectionDAG &DAG); SDValue LowerVASTART(SDValue Op, SelectionDAG &DAG); Modified: llvm/trunk/lib/Target/XCore/XCoreInstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreInstrInfo.cpp?rev=96942&r1=96941&r2=96942&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreInstrInfo.cpp (original) +++ llvm/trunk/lib/Target/XCore/XCoreInstrInfo.cpp Tue Feb 23 07:25:07 2010 @@ -145,6 +145,11 @@ return IsBRF(BrOpc) || IsBRT(BrOpc); } +static inline bool IsBR_JT(unsigned BrOpc) { + return BrOpc == XCore::BR_JT + || BrOpc == XCore::BR_JT32; +} + /// GetCondFromBranchOpc - Return the XCore CC that matches /// the correspondent Branch instruction opcode. static XCore::CondCode GetCondFromBranchOpc(unsigned BrOpc) @@ -271,6 +276,14 @@ return false; } + // Likewise if it ends with a branch table followed by an unconditional branch. + if (IsBR_JT(SecondLastInst->getOpcode()) && IsBRU(LastInst->getOpcode())) { + I = LastInst; + if (AllowModify) + I->eraseFromParent(); + return true; + } + // Otherwise, can't handle this. return true; } Modified: llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td?rev=96942&r1=96941&r2=96942&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td (original) +++ llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td Tue Feb 23 07:25:07 2010 @@ -34,6 +34,15 @@ def XCoreRetsp : SDNode<"XCoreISD::RETSP", SDTNone, [SDNPHasChain, SDNPOptInFlag]>; +def SDT_XCoreBR_JT : SDTypeProfile<0, 2, + [SDTCisVT<0, i32>, SDTCisVT<1, i32>]>; + +def XCoreBR_JT : SDNode<"XCoreISD::BR_JT", SDT_XCoreBR_JT, + [SDNPHasChain]>; + +def XCoreBR_JT32 : SDNode<"XCoreISD::BR_JT32", SDT_XCoreBR_JT, + [SDNPHasChain]>; + def SDT_XCoreAddress : SDTypeProfile<1, 1, [SDTCisSameAs<0, 1>, SDTCisPtrTy<0>]>; @@ -185,6 +194,15 @@ let MIOperandInfo = (ops i32imm, i32imm); } +// Jump tables. +def InlineJT : Operand { + let PrintMethod = "printInlineJT"; +} + +def InlineJT32 : Operand { + let PrintMethod = "printInlineJT32"; +} + //===----------------------------------------------------------------------===// // Instruction Class Templates //===----------------------------------------------------------------------===// @@ -756,13 +774,23 @@ // One operand short // TODO edu, eeu, waitet, waitef, freer, tstart, msync, mjoin, syncr, clrtp -// bru, setdp, setcp, setv, setev, kcall +// setdp, setcp, setv, setev, kcall // dgetreg let isBranch=1, isIndirectBranch=1, isTerminator=1 in def BAU_1r : _F1R<(outs), (ins GRRegs:$addr), "bau $addr", [(brind GRRegs:$addr)]>; +let isBranch=1, isIndirectBranch=1, isTerminator=1, isBarrier = 1 in +def BR_JT : PseudoInstXCore<(outs), (ins InlineJT:$t, GRRegs:$i), + "bru $i\n$t", + [(XCoreBR_JT tjumptable:$t, GRRegs:$i)]>; + +let isBranch=1, isIndirectBranch=1, isTerminator=1, isBarrier = 1 in +def BR_JT32 : PseudoInstXCore<(outs), (ins InlineJT32:$t, GRRegs:$i), + "bru $i\n$t", + [(XCoreBR_JT32 tjumptable:$t, GRRegs:$i)]>; + let Defs=[SP], neverHasSideEffects=1 in def SETSP_1r : _F1R<(outs), (ins GRRegs:$src), "set sp, $src", Added: llvm/trunk/test/CodeGen/XCore/switch.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/switch.ll?rev=96942&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/XCore/switch.ll (added) +++ llvm/trunk/test/CodeGen/XCore/switch.ll Tue Feb 23 07:25:07 2010 @@ -0,0 +1,24 @@ +; RUN: llc -march=xcore < %s | FileCheck %s + +define i32 @switch(i32 %i) { +entry: + switch i32 %i, label %default [ + i32 0, label %bb0 + i32 1, label %bb1 + i32 2, label %bb2 + i32 3, label %bb3 + ] +; CHECK-NOT: shl +; CHECK: bru +; CHECK: .jmptable +bb0: + ret i32 0 +bb1: + ret i32 1 +bb2: + ret i32 2 +bb3: + ret i32 3 +default: + ret i32 4 +} Added: llvm/trunk/test/CodeGen/XCore/switch_long.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/switch_long.ll?rev=96942&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/XCore/switch_long.ll (added) +++ llvm/trunk/test/CodeGen/XCore/switch_long.ll Tue Feb 23 07:25:07 2010 @@ -0,0 +1,132 @@ +; RUN: llc -march=xcore < %s | FileCheck %s + +define i32 @switch(i32 %i) { +entry: + switch i32 %i, label %default [ + i32 0, label %bb0 + i32 1, label %bb1 + i32 2, label %bb2 + i32 3, label %bb3 + i32 4, label %bb4 + i32 5, label %bb5 + i32 6, label %bb6 + i32 7, label %bb7 + i32 8, label %bb8 + i32 9, label %bb9 + i32 10, label %bb10 + i32 11, label %bb11 + i32 12, label %bb12 + i32 13, label %bb13 + i32 14, label %bb14 + i32 15, label %bb15 + i32 16, label %bb16 + i32 17, label %bb17 + i32 18, label %bb18 + i32 19, label %bb19 + i32 20, label %bb20 + i32 21, label %bb21 + i32 22, label %bb22 + i32 23, label %bb23 + i32 24, label %bb24 + i32 25, label %bb25 + i32 26, label %bb26 + i32 27, label %bb27 + i32 28, label %bb28 + i32 29, label %bb29 + i32 30, label %bb30 + i32 31, label %bb31 + i32 32, label %bb32 + i32 33, label %bb33 + i32 34, label %bb34 + i32 35, label %bb35 + i32 36, label %bb36 + i32 37, label %bb37 + i32 38, label %bb38 + i32 39, label %bb39 + ] +; CHECK: shl +; CHECK: bru +; CHECK: .jmptable +bb0: + ret i32 0 +bb1: + ret i32 1 +bb2: + ret i32 2 +bb3: + ret i32 3 +bb4: + ret i32 4 +bb5: + ret i32 5 +bb6: + ret i32 6 +bb7: + ret i32 7 +bb8: + ret i32 8 +bb9: + ret i32 9 +bb10: + ret i32 0 +bb11: + ret i32 1 +bb12: + ret i32 2 +bb13: + ret i32 3 +bb14: + ret i32 4 +bb15: + ret i32 5 +bb16: + ret i32 6 +bb17: + ret i32 7 +bb18: + ret i32 8 +bb19: + ret i32 9 +bb20: + ret i32 0 +bb21: + ret i32 1 +bb22: + ret i32 2 +bb23: + ret i32 3 +bb24: + ret i32 4 +bb25: + ret i32 5 +bb26: + ret i32 6 +bb27: + ret i32 7 +bb28: + ret i32 8 +bb29: + ret i32 9 +bb30: + ret i32 0 +bb31: + ret i32 1 +bb32: + ret i32 2 +bb33: + ret i32 3 +bb34: + ret i32 4 +bb35: + ret i32 5 +bb36: + ret i32 6 +bb37: + ret i32 7 +bb38: + ret i32 8 +bb39: + ret i32 9 +default: + ret i32 0 +} From xerxes at zafena.se Tue Feb 23 07:27:58 2010 From: xerxes at zafena.se (=?UTF-8?B?WGVyeGVzIFLDpW5ieQ==?=) Date: Tue, 23 Feb 2010 14:27:58 +0100 Subject: [llvm-commits] [llvm] r96569 - in /llvm/trunk: Makefile Makefile.config.in Makefile.rules autoconf/configure.ac configure test/Makefile test/Unit/lit.cfg test/Unit/lit.site.cfg.in tools/llvm-shlib/ unittests/Makefile.unittest In-Reply-To: <4B7DC59B.7060600@zafena.se> References: <201002180443.o1I4h31e021421@zion.cs.uiuc.edu> <4B7D1C39.7050001@zafena.se> <5d44f72f1002180846i179a9eb0m610f3067b6157e54@mail.gmail.com> <4B7DC59B.7060600@zafena.se> Message-ID: <4B83D7DE.2060106@zafena.se> On 2010-02-18 23:56, Xerxes Ranby wrote: > Jeffrey Yasskin wrote: > >> On Thu, Feb 18, 2010 at 2:53 AM, Xerxes R?nby wrote: >> >> >>> Jeffrey Yasskin wrote: >>> >>> >>>> Author: jyasskin >>>> Date: Wed Feb 17 22:43:02 2010 >>>> New Revision: 96569 >>>> >>>> URL: http://llvm.org/viewvc/llvm-project?rev=96569&view=rev >>>> Log: >>>> Roll back the shared library, r96559. It broke two darwins and arm, mysteriously. >>>> >>>> >>>> >>>> >>> Hi >>> The failure on arm: >>> >>> llvm[1]: Linking Debug Shared Library LLVM2.7svn.so >>> /wd/buildbot/llvm-arm-linux/llvm/Debug/lib/libLLVMSystem.a(Atomic.o): In function `llvm::sys::AtomicAdd(unsigned int volatile*, unsigned int)': >>> /wd/buildbot/llvm-arm-linux/llvm/lib/System/Atomic.cpp:86: undefined reference to `__sync_add_and_fetch_4' >>> /wd/buildbot/llvm-arm-linux/llvm/Debug/lib/libLLVMSystem.a(Atomic.o): In function `llvm::sys::AtomicIncrement(unsigned int volatile*)': >>> /wd/buildbot/llvm-arm-linux/llvm/lib/System/Atomic.cpp:60: undefined reference to `__sync_add_and_fetch_4' >>> /wd/buildbot/llvm-arm-linux/llvm/Debug/lib/libLLVMSystem.a(Atomic.o): In function `llvm::sys::AtomicDecrement(unsigned int volatile*)': >>> /wd/buildbot/llvm-arm-linux/llvm/lib/System/Atomic.cpp:73: undefined reference to `__sync_sub_and_fetch_4' >>> /wd/buildbot/llvm-arm-linux/llvm/Debug/lib/libLLVMSystem.a(Atomic.o): In function `llvm::sys::CompareAndSwap(unsigned int volatile*, unsigned int, unsigned int)': >>> /wd/buildbot/llvm-arm-linux/llvm/lib/System/Atomic.cpp:47: undefined reference to `__sync_val_compare_and_swap_4' >>> collect2: ld returned 1 exit status >>> >>> I have seen something similar about one year ago when we tried to make >>> libCompileDriver a shared library: >>> http://markmail.org/message/cblcpfmsfab65vue >>> >>> The issue are that the symbol __sync_add_and_fetch_4 and friends do >>> exists in libstdc++ but only in the static version. >>> >>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40133 >>> Quoted Mikael Pettersson from >>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40133#c8 >>> " >>> 1. g++ links shared libraries with -shared-libgcc, which apparently is >>> important whenever exceptions are possible. >>> 2. -shared-libgcc by definition excludes the static libgcc from the link >>> command. >>> 3. Since the __sync__ procedures are only present in the static libgcc, >>> it follows that they cannot be used by -shared-libgcc objects like >>> libstdc++.so. >>> " >>> >>> A workaround might be to specify -lgcc to force linking in the static >>> libstdc++ that contains the missing symbols. >>> >>> Good news are that it looks like this bug should have been resolved in >>> gcc trunk. >>> I will do some tests with r96559 applied on arm to see if this can be >>> workaround by >>> >>> a: make the linking work by specifying -lgcc during linking. >>> or >>> b: upgrade gcc and libstdc++ on the buildbot to a newer version. >>> >>> Cheers >>> Xerxes >>> >>> >> Thanks for the explanation of the problem! To work around it, I'm >> going to remove -Wl,--no-undefined from the ARM build. I think the >> shared library should still find the __sync primitives defined in the >> main executable, and we'll get assurance that the library is complete >> from builds on non-ARM platforms. >> >> > Test results of workarounds +r96559 on llvm trunk using gcc 4.3.3 on > ubuntu arm linux > > with removed --no-undefined from tools/llvm-shlib/Makefile > the shared library links! > -rwxr-xr-x 1 xerxes xerxes 21640706 2010-02-18 23:50 > ../../Release/lib/libLLVM2.7svn.so > All examples fail to link > llvm[1]: Linking Release executable BrainF (without symbols) > /usr/bin/ld: /media/disk/llvm-configure/Release/examples/BrainF: hidden > symbol `__sync_val_compare_and_swap_4' in > /usr/lib/gcc/arm-linux-gnueabi/4.3.3/libgcc.a(linux-atomic.o) is > referenced by DSO > > with -lgcc > LLVMLibsOptions += -lgcc > the shared library links! > -rwxr-xr-x 1 xerxes xerxes 21658573 2010-02-18 23:46 > ../../Release/lib/libLLVM2.7svn.so > BrainF Fibonacci Kaleidoscope-Ch2 Kaleidoscope-Ch4 > Kaleidoscope-Ch6 ModuleMaker > HowToUseJIT Kaleidoscope-Ch3 Kaleidoscope-Ch5 Kaleidoscope-Ch7 > ParallelJIT > links and run > ExceptionDemo fails to link > llvm[1]: ======= Finished Linking Release Executable ParallelJIT > (without symbols) > make[1]: Leaving directory `/media/disk/llvm-configure/examples/ParallelJIT' > make[1]: Entering directory > `/media/disk/llvm-configure/examples/ExceptionDemo' > llvm[1]: Compiling ExceptionDemo.cpp for Release build > llvm[1]: Linking Release executable ExceptionDemo (without symbols) > /media/disk/llvm-configure/examples/ExceptionDemo/Release/ExceptionDemo.o: > In function `ourPersonality': > ExceptionDemo.cpp:(.text+0x60c): undefined reference to `_Unwind_GetIP' > ExceptionDemo.cpp:(.text+0x7f8): undefined reference to `_Unwind_SetGR' > ExceptionDemo.cpp:(.text+0x818): undefined reference to `_Unwind_SetGR' > ExceptionDemo.cpp:(.text+0x828): undefined reference to `_Unwind_SetIP' > ExceptionDemo.cpp:(.text+0x870): undefined reference to `_Unwind_SetGR' > collect2: ld returned 1 exit status > make[1]: *** [/media/disk/llvm-configure/Release/examples/ExceptionDemo] > Error 1 > make[1]: Leaving directory > `/media/disk/llvm-configure/examples/ExceptionDemo' > make: *** [ExceptionDemo/.makeall] Error 2 > > So linking in the static -lgcc makes at least the shared library usable > on ARM and only adds 18kb to the shared library size, > still it needs to be solved how to dynamically link LLVM clients binarys > that make use of exceptions. > The example ExceptionDemo got added to llvm two weeks ago and are not built to work using ARM exception ABI. Static compilation fails as well as shared compilation so there are nothing in your changeset that broke this. The reason why the llvm-arm-linux buildbot dont complain are that building of llvm examples are disabled on the arm buildbot. http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20100222/096690.html Cheers Xerxes > I will keep you updated if this are all fixed when using a newer gcc and > libstdc++ on ARM. > > Cheers > Xerxes > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > From gvenn.cfe.dev at gmail.com Tue Feb 23 08:16:10 2010 From: gvenn.cfe.dev at gmail.com (Garrison Venn) Date: Tue, 23 Feb 2010 09:16:10 -0500 Subject: [llvm-commits] [llvm] r95723 - in /llvm/trunk/examples: CMakeLists.txt ExceptionDemo/ ExceptionDemo/CMakeLists.txt ExceptionDemo/ExceptionDemo.cpp ExceptionDemo/Makefile Makefile In-Reply-To: <4B83D627.9070001@zafena.se> References: <201002092322.o19NMiQ3005105@zion.cs.uiuc.edu> <4B83CD13.9050908@zafena.se> <4B83D627.9070001@zafena.se> Message-ID: <039BD5FD-C0A3-4AE1-B142-166C6E5806E1@gmail.com> Ok, on it now. Thanks Garrison On Feb 23, 2010, at 8:20, Xerxes R?nby wrote: > On 2010-02-23 13:41, Xerxes R?nby wrote: >> On 2010-02-10 00:22, Garrison Venn wrote: >> >>> Author: gvenn >>> Date: Tue Feb 9 17:22:43 2010 >>> New Revision: 95723 >>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=95723&view=rev >>> Log: >>> Adds a JIT based exception handling example to the examples directory. >>> Both zero cost example domain specific, and C++ foreign exception handling are >>> shown. The example's documentation fully explains how to run the example. >>> >>> Notes: >>> >>> 1) The code uses an extremely simple type info model. >>> 2) Only a single landing pad is used per unwind edge >>> (one call to llvm.eh.selector) >>> 3) llvm.eh.selector support for filter arguments is not given. >>> 4) llvm.eh.typeid.for is not used. >>> 5) Forced unwind behavior is not supported. >>> 6) Very little if any error handling is given. >>> 7) __attribute__((__aligned__)) is used. >>> 8) The code uses parts from the llvm compiler-rt project and >>> the llvm Kaleidoscope example. >>> 9) The code has not been ported or tested on WINDOWS. >>> 10) The code was not tested with a cmake build. >>> 11) The code was tested for a debug build on 32bit X86 CentOS LINUX, >>> and both a debug and release build on OS X 10.6.2 (64bit). >>> >>> >> The build fails when building this example using LLVM ARM Linux using >> GCC 4.3.3 on Ubuntu Jaunty, >> >> make[1]: Entering directory >> `/media/disk/llvm-configure/examples/ExceptionDemo' >> llvm[1]: Compiling ExceptionDemo.cpp for Release build >> llvm[1]: Linking Release executable ExceptionDemo (without symbols) >> /media/disk/llvm-configure/examples/ExceptionDemo/Release/ExceptionDemo.o: >> In function `ourPersonality': >> ExceptionDemo.cpp:(.text+0x60c): undefined reference to `_Unwind_GetIP' >> ExceptionDemo.cpp:(.text+0x7f8): undefined reference to `_Unwind_SetGR' >> ExceptionDemo.cpp:(.text+0x818): undefined reference to `_Unwind_SetGR' >> ExceptionDemo.cpp:(.text+0x828): undefined reference to `_Unwind_SetIP' >> ExceptionDemo.cpp:(.text+0x870): undefined reference to `_Unwind_SetGR' >> collect2: ld returned 1 exit status >> make[1]: *** [/media/disk/llvm-configure/Release/examples/ExceptionDemo] >> Error 1 >> make[1]: Leaving directory >> > > For what i can find, it looks like > > _Unwind_GetIP > > and > > _Unwind_SetGR > > are not defined in the Exception Handling ABI for the ARM? Architecture > http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038a/IHI0038A_ehabi.pdf > > Hope this heps fixing the example implementation for ARM. > Cheers > Xerxes > >> The llvm-arm-linux buildbot have disabled builds of the examples so >> thats why we are not catching this using the buildbot. >> >> The following exception symbols exist when building on ARM: >> buildbot at sheeva:/usr/lib/gcc/arm-linux-gnueabi/4.3.3$ nm -a libgcc_eh.a >> >> unwind-arm.o: >> 00000000 n .ARM.attributes >> 00000000 r .ARM.exidx >> 00000000 r .ARM.extab >> 00000000 b .bss >> 00000000 n .comment >> 00000000 d .data >> 00000000 n .note.GNU-stack >> 00000000 t .text >> U _GLOBAL_OFFSET_TABLE_ >> 000000b0 T _Unwind_Complete >> 000000b4 T _Unwind_DeleteException >> 000000a8 T _Unwind_GetCFA >> 00000000 T _Unwind_VRS_Get >> 00000b8c T _Unwind_VRS_Pop >> 00000054 T _Unwind_VRS_Set >> 000004e0 T __aeabi_unwind_cpp_pr0 >> 000004d8 W __aeabi_unwind_cpp_pr1 >> 000004d0 W __aeabi_unwind_cpp_pr2 >> w __cxa_begin_cleanup >> w __cxa_call_unexpected >> w __cxa_type_match >> U __exidx_end >> U __exidx_start >> 000007e0 T __gnu_Unwind_Backtrace >> w __gnu_Unwind_Find_exidx >> 000009dc T __gnu_Unwind_ForcedUnwind >> 00000a5c T __gnu_Unwind_RaiseException >> U __gnu_Unwind_Restore_VFP >> U __gnu_Unwind_Restore_VFP_D >> U __gnu_Unwind_Restore_VFP_D_16_to_31 >> U __gnu_Unwind_Restore_WMMXC >> U __gnu_Unwind_Restore_WMMXD >> 00000b20 T __gnu_Unwind_Resume >> 00000b00 T __gnu_Unwind_Resume_or_Rethrow >> U __gnu_Unwind_Save_VFP >> U __gnu_Unwind_Save_VFP_D >> U __gnu_Unwind_Save_VFP_D_16_to_31 >> U __gnu_Unwind_Save_WMMXC >> U __gnu_Unwind_Save_WMMXD >> U __gnu_unwind_execute >> 000000dc t __gnu_unwind_pr_common >> U abort >> 000004e8 t get_eit_entry >> U memcpy >> U restore_core_regs >> 00000754 t restore_non_core_regs >> 00000a00 t unwind_phase2 >> 0000089c t unwind_phase2_forced >> >> libunwind.o: >> 00000000 n .ARM.attributes >> 00000000 b .bss >> 00000000 d .data >> 00000000 n .note.GNU-stack >> 00000000 t .text >> 00000184 T _Unwind_Backtrace >> 00000160 T _Unwind_ForcedUnwind >> 000000f4 T _Unwind_RaiseException >> 00000118 T _Unwind_Resume >> 0000013c T _Unwind_Resume_or_Rethrow >> 00000184 T ___Unwind_Backtrace >> 00000160 T ___Unwind_ForcedUnwind >> 000000f4 T ___Unwind_RaiseException >> 00000118 T ___Unwind_Resume >> 0000013c T ___Unwind_Resume_or_Rethrow >> U __gnu_Unwind_Backtrace >> U __gnu_Unwind_ForcedUnwind >> U __gnu_Unwind_RaiseException >> 00000014 T __gnu_Unwind_Restore_VFP >> 00000024 T __gnu_Unwind_Restore_VFP_D >> 00000034 T __gnu_Unwind_Restore_VFP_D_16_to_31 >> 000000cc T __gnu_Unwind_Restore_WMMXC >> 00000044 T __gnu_Unwind_Restore_WMMXD >> U __gnu_Unwind_Resume >> U __gnu_Unwind_Resume_or_Rethrow >> 0000001c T __gnu_Unwind_Save_VFP >> 0000002c T __gnu_Unwind_Save_VFP_D >> 0000003c T __gnu_Unwind_Save_VFP_D_16_to_31 >> 000000e0 T __gnu_Unwind_Save_WMMXC >> 00000088 T __gnu_Unwind_Save_WMMXD >> 00000000 T __restore_core_regs >> 00000000 T restore_core_regs >> >> pr-support.o: >> 00000000 n .ARM.attributes >> 00000000 r .ARM.exidx >> 00000000 r .ARM.extab >> 00000000 b .bss >> 00000000 n .comment >> 00000000 d .data >> 00000000 n .note.GNU-stack >> 00000000 t .text >> 00000068 T _Unwind_GetDataRelBase >> 00000074 T _Unwind_GetLanguageSpecificData >> 000000b8 T _Unwind_GetRegionStart >> 0000005c T _Unwind_GetTextRelBase >> U _Unwind_VRS_Get >> U _Unwind_VRS_Pop >> U _Unwind_VRS_Set >> U __aeabi_unwind_cpp_pr0 >> 000000e8 T __gnu_unwind_execute >> 00000768 T __gnu_unwind_frame >> U abort >> 00000000 t next_unwind_byte >> >> unwind-c.o: >> 00000000 n .ARM.attributes >> 00000000 r .ARM.exidx >> 00000000 r .ARM.extab >> 00000000 b .bss >> 00000000 n .comment >> 00000000 d .data >> 00000000 n .note.GNU-stack >> 00000000 t .text >> U _Unwind_GetDataRelBase >> U _Unwind_GetLanguageSpecificData >> U _Unwind_GetRegionStart >> U _Unwind_GetTextRelBase >> U _Unwind_VRS_Get >> U _Unwind_VRS_Set >> U __aeabi_unwind_cpp_pr0 >> 00000000 T __gcc_personality_v0 >> U __gnu_unwind_frame >> U abort >> >> emutls.o: >> 00000000 n .ARM.attributes >> 00000000 r .ARM.exidx >> 00000000 r .ARM.extab >> 00000000 b .bss >> 00000000 n .comment >> 00000000 d .data >> 00000000 n .note.GNU-stack >> 00000000 t .text >> U _GLOBAL_OFFSET_TABLE_ >> U __aeabi_unwind_cpp_pr0 >> 0000012c T __emutls_get_address >> 00000000 T __emutls_register_common >> U abort >> U calloc >> 00000084 t emutls_alloc >> 000002b8 t emutls_destroy >> 00000040 t emutls_init >> 0000001c b emutls_key >> 00000000 b emutls_mutex >> 00000020 b emutls_size >> U free >> U malloc >> U memcpy >> U memset >> 00000018 b once.6753 >> w pthread_cancel >> w pthread_getspecific >> w pthread_key_create >> w pthread_mutex_lock >> w pthread_mutex_unlock >> w pthread_once >> w pthread_setspecific >> U realloc >> buildbot at sheeva:/usr/lib/gcc/arm-linux-gnueabi/4.3.3$ >> >> Cheers, and have a great day! >> Xerxes >> > From richard at xmos.com Tue Feb 23 08:17:21 2010 From: richard at xmos.com (Richard Osborne) Date: Tue, 23 Feb 2010 14:17:21 -0000 Subject: [llvm-commits] [llvm] r96943 - in /llvm/trunk/lib/Target/XCore: XCoreISelLowering.cpp XCoreISelLowering.h Message-ID: <20100223141721.0B92C2A6C12C@llvm.org> Author: friedgold Date: Tue Feb 23 08:17:20 2010 New Revision: 96943 URL: http://llvm.org/viewvc/llvm-project?rev=96943&view=rev Log: Remove unused lowering function LowerJumpTable Modified: llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp llvm/trunk/lib/Target/XCore/XCoreISelLowering.h Modified: llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp?rev=96943&r1=96942&r2=96943&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp (original) +++ llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp Tue Feb 23 08:17:20 2010 @@ -159,7 +159,6 @@ case ISD::GlobalTLSAddress: return LowerGlobalTLSAddress(Op, DAG); case ISD::BlockAddress: return LowerBlockAddress(Op, DAG); case ISD::ConstantPool: return LowerConstantPool(Op, DAG); - case ISD::JumpTable: return LowerJumpTable(Op, DAG); case ISD::BR_JT: return LowerBR_JT(Op, DAG); case ISD::LOAD: return LowerLOAD(Op, DAG); case ISD::STORE: return LowerSTORE(Op, DAG); @@ -318,17 +317,6 @@ } SDValue XCoreTargetLowering:: -LowerJumpTable(SDValue Op, SelectionDAG &DAG) -{ - // FIXME there isn't really debug info here - DebugLoc dl = Op.getDebugLoc(); - EVT PtrVT = Op.getValueType(); - JumpTableSDNode *JT = cast(Op); - SDValue JTI = DAG.getTargetJumpTable(JT->getIndex(), PtrVT); - return DAG.getNode(XCoreISD::DPRelativeWrapper, dl, MVT::i32, JTI); -} - -SDValue XCoreTargetLowering:: LowerBR_JT(SDValue Op, SelectionDAG &DAG) { SDValue Chain = Op.getOperand(0); Modified: llvm/trunk/lib/Target/XCore/XCoreISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreISelLowering.h?rev=96943&r1=96942&r2=96943&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreISelLowering.h (original) +++ llvm/trunk/lib/Target/XCore/XCoreISelLowering.h Tue Feb 23 08:17:20 2010 @@ -128,7 +128,6 @@ SDValue LowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG); SDValue LowerBlockAddress(SDValue Op, SelectionDAG &DAG); SDValue LowerConstantPool(SDValue Op, SelectionDAG &DAG); - SDValue LowerJumpTable(SDValue Op, SelectionDAG &DAG); SDValue LowerBR_JT(SDValue Op, SelectionDAG &DAG); SDValue LowerSELECT_CC(SDValue Op, SelectionDAG &DAG); SDValue LowerVAARG(SDValue Op, SelectionDAG &DAG); From foldr at codedgers.com Tue Feb 23 08:29:42 2010 From: foldr at codedgers.com (Mikhail Glushenkov) Date: Tue, 23 Feb 2010 14:29:42 -0000 Subject: [llvm-commits] [llvm] r96944 - /llvm/trunk/tools/llvmc/plugins/Base/Base.td.in Message-ID: <20100223142942.3FF602A6C12C@llvm.org> Author: foldr Date: Tue Feb 23 08:29:42 2010 New Revision: 96944 URL: http://llvm.org/viewvc/llvm-project?rev=96944&view=rev Log: Fix -mtune forwarding. Modified: llvm/trunk/tools/llvmc/plugins/Base/Base.td.in Modified: llvm/trunk/tools/llvmc/plugins/Base/Base.td.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/plugins/Base/Base.td.in?rev=96944&r1=96943&r2=96944&view=diff ============================================================================== --- llvm/trunk/tools/llvmc/plugins/Base/Base.td.in (original) +++ llvm/trunk/tools/llvmc/plugins/Base/Base.td.in Tue Feb 23 08:29:42 2010 @@ -49,7 +49,7 @@ (parameter_option "linker", (help "Choose linker (possible values: gcc, g++)")), (parameter_option "mtune", - (help "Target a specific CPU type"), (hidden)), + (help "Target a specific CPU type"), (hidden), (forward_not_split)), // TODO: Add a conditional compilation mechanism to make Darwin-only options // like '-arch' really Darwin-only. @@ -57,9 +57,9 @@ (parameter_option "arch", (help "Compile for the specified target architecture"), (hidden)), (parameter_option "march", - (help "A synonym for -mtune"), (hidden)), + (help "A synonym for -mtune"), (hidden), (forward_not_split)), (parameter_option "mcpu", - (help "A deprecated synonym for -mtune"), (hidden)), + (help "A deprecated synonym for -mtune"), (hidden), (forward_not_split)), (switch_option "mfix-and-continue", (help "Needed by gdb to load .o files dynamically"), (hidden)), (parameter_option "MF", @@ -250,8 +250,8 @@ (switch_on "fPIC"), (append_cmd "-relocation-model=pic"), (switch_on "mdynamic-no-pic"), (append_cmd "-relocation-model=dynamic-no-pic"), - (not_empty "march"), (forward "mcpu"), - (not_empty "mtune"), (forward "mcpu"), + (not_empty "march"), (forward_as "mtune", "-mcpu"), + (not_empty "mtune"), (forward_as "mtune", "-mcpu"), (not_empty "mcpu"), (forward "mcpu"), (not_empty "m"), (forward_transformed_value "m", "ConvertToMAttr"), (not_empty "Wllc,"), (forward_value "Wllc,"))) From baldrick at free.fr Tue Feb 23 08:34:52 2010 From: baldrick at free.fr (Duncan Sands) Date: Tue, 23 Feb 2010 14:34:52 -0000 Subject: [llvm-commits] [dragonegg] r96945 - /dragonegg/trunk/llvm-backend.cpp Message-ID: <20100223143452.6D2862A6C12C@llvm.org> Author: baldrick Date: Tue Feb 23 08:34:52 2010 New Revision: 96945 URL: http://llvm.org/viewvc/llvm-project?rev=96945&view=rev Log: Do not use NULL to initialize an integer field. Noticed by recent gcc. Modified: dragonegg/trunk/llvm-backend.cpp Modified: dragonegg/trunk/llvm-backend.cpp URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-backend.cpp?rev=96945&r1=96944&r2=96945&view=diff ============================================================================== --- dragonegg/trunk/llvm-backend.cpp (original) +++ dragonegg/trunk/llvm-backend.cpp Tue Feb 23 08:34:52 2010 @@ -1915,9 +1915,10 @@ NULL, /* generate_summary */ emit_variables, /* write_summary */ NULL, /* read_summary */ - NULL, /* variable_read_summary */ - NULL, /* TODOs */ - NULL, /* variable_transform */ + NULL, /* function_read_summary */ + NULL, /* stmt_fixup */ + 0, /* function_transform_todo_flags_start */ + NULL, /* function_transform */ NULL /* variable_transform */ }; From baldrick at free.fr Tue Feb 23 09:06:52 2010 From: baldrick at free.fr (Duncan Sands) Date: Tue, 23 Feb 2010 15:06:52 -0000 Subject: [llvm-commits] [dragonegg] r96946 - /dragonegg/trunk/llvm-debug.cpp Message-ID: <20100223150652.DBEE62A6C12C@llvm.org> Author: baldrick Date: Tue Feb 23 09:06:52 2010 New Revision: 96946 URL: http://llvm.org/viewvc/llvm-project?rev=96946&view=rev Log: This is not a pointer, it's a character. Noticed by recent gcc. Modified: dragonegg/trunk/llvm-debug.cpp Modified: dragonegg/trunk/llvm-debug.cpp URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-debug.cpp?rev=96946&r1=96945&r2=96946&view=diff ============================================================================== --- dragonegg/trunk/llvm-debug.cpp (original) +++ dragonegg/trunk/llvm-debug.cpp Tue Feb 23 09:06:52 2010 @@ -242,7 +242,7 @@ // copy first. char *StrPtr = FunctionNames.Allocate(FnName.size() + 1); strncpy(StrPtr, FnName.data(), FnName.size()); - StrPtr[FnName.size()] = NULL; + StrPtr[FnName.size()] = 0; return StringRef(StrPtr); } From baldrick at free.fr Tue Feb 23 09:07:27 2010 From: baldrick at free.fr (Duncan Sands) Date: Tue, 23 Feb 2010 15:07:27 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r96947 - /llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Message-ID: <20100223150727.ACF712A6C12C@llvm.org> Author: baldrick Date: Tue Feb 23 09:07:27 2010 New Revision: 96947 URL: http://llvm.org/viewvc/llvm-project?rev=96947&view=rev Log: Port dragonegg commit 96946 (baldrick): This is not a pointer, it's a character. Noticed by recent gcc. Modified: llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Modified: llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp?rev=96947&r1=96946&r2=96947&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Tue Feb 23 09:07:27 2010 @@ -245,7 +245,7 @@ // copy first. char *StrPtr = FunctionNames.Allocate(FnName.size() + 1); strncpy(StrPtr, FnName.data(), FnName.size()); - StrPtr[FnName.size()] = NULL; + StrPtr[FnName.size()] = 0; return StringRef(StrPtr); } From gvenn.cfe.dev at gmail.com Tue Feb 23 10:27:59 2010 From: gvenn.cfe.dev at gmail.com (Garrison Venn) Date: Tue, 23 Feb 2010 16:27:59 -0000 Subject: [llvm-commits] [llvm] r96949 - /llvm/trunk/examples/Makefile Message-ID: <20100223162759.BEC3A2A6C12C@llvm.org> Author: gvenn Date: Tue Feb 23 10:27:59 2010 New Revision: 96949 URL: http://llvm.org/viewvc/llvm-project?rev=96949&view=rev Log: Modified examples Makefile to only build the ExceptionDemo example for x86 and x86_64 on UNIX systems. Only OS X 10.6.2 (x86_64) and 32bit CentOS 5.2 with gcc 4.1.2 were tested. ARM UNIX build triggered failure motivating this modification, as it seems that the ARM ABI does not support _Unwind_GetIP(...), _Unwind_SetGR(...), and _Unwind_SetIP(...). From doing a quick browse of: http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038a/IHI0038A_ehabi.pdf, it seems as if all other exception related apis are supported. Looks like the port can be done to ARM. Thanks to Xerxes R?nby for pointing out this error. Modified: llvm/trunk/examples/Makefile Modified: llvm/trunk/examples/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Makefile?rev=96949&r1=96948&r2=96949&view=diff ============================================================================== --- llvm/trunk/examples/Makefile (original) +++ llvm/trunk/examples/Makefile Tue Feb 23 10:27:59 2010 @@ -17,7 +17,12 @@ endif ifeq ($(LLVM_ON_UNIX),1) -PARALLEL_DIRS += ExceptionDemo + ifeq ($(ARCH),x86) + PARALLEL_DIRS += ExceptionDemo + endif + ifeq ($(ARCH),x86_64) + PARALLEL_DIRS += ExceptionDemo + endif endif include $(LEVEL)/Makefile.common From gvenn.cfe.dev at gmail.com Tue Feb 23 10:32:31 2010 From: gvenn.cfe.dev at gmail.com (Garrison Venn) Date: Tue, 23 Feb 2010 11:32:31 -0500 Subject: [llvm-commits] [llvm] r95723 - in /llvm/trunk/examples: CMakeLists.txt ExceptionDemo/ ExceptionDemo/CMakeLists.txt ExceptionDemo/ExceptionDemo.cpp ExceptionDemo/Makefile Makefile In-Reply-To: <4B83D627.9070001@zafena.se> References: <201002092322.o19NMiQ3005105@zion.cs.uiuc.edu> <4B83CD13.9050908@zafena.se> <4B83D627.9070001@zafena.se> Message-ID: I temporarily fixed this by preventing a build on non x86 and x86_64 architectures. Your ARM ABI reference seems doable but I would have to look at it in greater detail, unless of course you already understand the direction needed. :-) Thanks again! Garrison On Feb 23, 2010, at 8:20, Xerxes R?nby wrote: > On 2010-02-23 13:41, Xerxes R?nby wrote: >> On 2010-02-10 00:22, Garrison Venn wrote: >> >>> Author: gvenn >>> Date: Tue Feb 9 17:22:43 2010 >>> New Revision: 95723 >>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=95723&view=rev >>> Log: >>> Adds a JIT based exception handling example to the examples directory. >>> Both zero cost example domain specific, and C++ foreign exception handling are >>> shown. The example's documentation fully explains how to run the example. >>> >>> Notes: >>> >>> 1) The code uses an extremely simple type info model. >>> 2) Only a single landing pad is used per unwind edge >>> (one call to llvm.eh.selector) >>> 3) llvm.eh.selector support for filter arguments is not given. >>> 4) llvm.eh.typeid.for is not used. >>> 5) Forced unwind behavior is not supported. >>> 6) Very little if any error handling is given. >>> 7) __attribute__((__aligned__)) is used. >>> 8) The code uses parts from the llvm compiler-rt project and >>> the llvm Kaleidoscope example. >>> 9) The code has not been ported or tested on WINDOWS. >>> 10) The code was not tested with a cmake build. >>> 11) The code was tested for a debug build on 32bit X86 CentOS LINUX, >>> and both a debug and release build on OS X 10.6.2 (64bit). >>> >>> >> The build fails when building this example using LLVM ARM Linux using >> GCC 4.3.3 on Ubuntu Jaunty, >> >> make[1]: Entering directory >> `/media/disk/llvm-configure/examples/ExceptionDemo' >> llvm[1]: Compiling ExceptionDemo.cpp for Release build >> llvm[1]: Linking Release executable ExceptionDemo (without symbols) >> /media/disk/llvm-configure/examples/ExceptionDemo/Release/ExceptionDemo.o: >> In function `ourPersonality': >> ExceptionDemo.cpp:(.text+0x60c): undefined reference to `_Unwind_GetIP' >> ExceptionDemo.cpp:(.text+0x7f8): undefined reference to `_Unwind_SetGR' >> ExceptionDemo.cpp:(.text+0x818): undefined reference to `_Unwind_SetGR' >> ExceptionDemo.cpp:(.text+0x828): undefined reference to `_Unwind_SetIP' >> ExceptionDemo.cpp:(.text+0x870): undefined reference to `_Unwind_SetGR' >> collect2: ld returned 1 exit status >> make[1]: *** [/media/disk/llvm-configure/Release/examples/ExceptionDemo] >> Error 1 >> make[1]: Leaving directory >> > > For what i can find, it looks like > > _Unwind_GetIP > > and > > _Unwind_SetGR > > are not defined in the Exception Handling ABI for the ARM? Architecture > http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038a/IHI0038A_ehabi.pdf > > Hope this heps fixing the example implementation for ARM. > Cheers > Xerxes > >> The llvm-arm-linux buildbot have disabled builds of the examples so >> thats why we are not catching this using the buildbot. >> >> The following exception symbols exist when building on ARM: >> buildbot at sheeva:/usr/lib/gcc/arm-linux-gnueabi/4.3.3$ nm -a libgcc_eh.a >> >> unwind-arm.o: >> 00000000 n .ARM.attributes >> 00000000 r .ARM.exidx >> 00000000 r .ARM.extab >> 00000000 b .bss >> 00000000 n .comment >> 00000000 d .data >> 00000000 n .note.GNU-stack >> 00000000 t .text >> U _GLOBAL_OFFSET_TABLE_ >> 000000b0 T _Unwind_Complete >> 000000b4 T _Unwind_DeleteException >> 000000a8 T _Unwind_GetCFA >> 00000000 T _Unwind_VRS_Get >> 00000b8c T _Unwind_VRS_Pop >> 00000054 T _Unwind_VRS_Set >> 000004e0 T __aeabi_unwind_cpp_pr0 >> 000004d8 W __aeabi_unwind_cpp_pr1 >> 000004d0 W __aeabi_unwind_cpp_pr2 >> w __cxa_begin_cleanup >> w __cxa_call_unexpected >> w __cxa_type_match >> U __exidx_end >> U __exidx_start >> 000007e0 T __gnu_Unwind_Backtrace >> w __gnu_Unwind_Find_exidx >> 000009dc T __gnu_Unwind_ForcedUnwind >> 00000a5c T __gnu_Unwind_RaiseException >> U __gnu_Unwind_Restore_VFP >> U __gnu_Unwind_Restore_VFP_D >> U __gnu_Unwind_Restore_VFP_D_16_to_31 >> U __gnu_Unwind_Restore_WMMXC >> U __gnu_Unwind_Restore_WMMXD >> 00000b20 T __gnu_Unwind_Resume >> 00000b00 T __gnu_Unwind_Resume_or_Rethrow >> U __gnu_Unwind_Save_VFP >> U __gnu_Unwind_Save_VFP_D >> U __gnu_Unwind_Save_VFP_D_16_to_31 >> U __gnu_Unwind_Save_WMMXC >> U __gnu_Unwind_Save_WMMXD >> U __gnu_unwind_execute >> 000000dc t __gnu_unwind_pr_common >> U abort >> 000004e8 t get_eit_entry >> U memcpy >> U restore_core_regs >> 00000754 t restore_non_core_regs >> 00000a00 t unwind_phase2 >> 0000089c t unwind_phase2_forced >> >> libunwind.o: >> 00000000 n .ARM.attributes >> 00000000 b .bss >> 00000000 d .data >> 00000000 n .note.GNU-stack >> 00000000 t .text >> 00000184 T _Unwind_Backtrace >> 00000160 T _Unwind_ForcedUnwind >> 000000f4 T _Unwind_RaiseException >> 00000118 T _Unwind_Resume >> 0000013c T _Unwind_Resume_or_Rethrow >> 00000184 T ___Unwind_Backtrace >> 00000160 T ___Unwind_ForcedUnwind >> 000000f4 T ___Unwind_RaiseException >> 00000118 T ___Unwind_Resume >> 0000013c T ___Unwind_Resume_or_Rethrow >> U __gnu_Unwind_Backtrace >> U __gnu_Unwind_ForcedUnwind >> U __gnu_Unwind_RaiseException >> 00000014 T __gnu_Unwind_Restore_VFP >> 00000024 T __gnu_Unwind_Restore_VFP_D >> 00000034 T __gnu_Unwind_Restore_VFP_D_16_to_31 >> 000000cc T __gnu_Unwind_Restore_WMMXC >> 00000044 T __gnu_Unwind_Restore_WMMXD >> U __gnu_Unwind_Resume >> U __gnu_Unwind_Resume_or_Rethrow >> 0000001c T __gnu_Unwind_Save_VFP >> 0000002c T __gnu_Unwind_Save_VFP_D >> 0000003c T __gnu_Unwind_Save_VFP_D_16_to_31 >> 000000e0 T __gnu_Unwind_Save_WMMXC >> 00000088 T __gnu_Unwind_Save_WMMXD >> 00000000 T __restore_core_regs >> 00000000 T restore_core_regs >> >> pr-support.o: >> 00000000 n .ARM.attributes >> 00000000 r .ARM.exidx >> 00000000 r .ARM.extab >> 00000000 b .bss >> 00000000 n .comment >> 00000000 d .data >> 00000000 n .note.GNU-stack >> 00000000 t .text >> 00000068 T _Unwind_GetDataRelBase >> 00000074 T _Unwind_GetLanguageSpecificData >> 000000b8 T _Unwind_GetRegionStart >> 0000005c T _Unwind_GetTextRelBase >> U _Unwind_VRS_Get >> U _Unwind_VRS_Pop >> U _Unwind_VRS_Set >> U __aeabi_unwind_cpp_pr0 >> 000000e8 T __gnu_unwind_execute >> 00000768 T __gnu_unwind_frame >> U abort >> 00000000 t next_unwind_byte >> >> unwind-c.o: >> 00000000 n .ARM.attributes >> 00000000 r .ARM.exidx >> 00000000 r .ARM.extab >> 00000000 b .bss >> 00000000 n .comment >> 00000000 d .data >> 00000000 n .note.GNU-stack >> 00000000 t .text >> U _Unwind_GetDataRelBase >> U _Unwind_GetLanguageSpecificData >> U _Unwind_GetRegionStart >> U _Unwind_GetTextRelBase >> U _Unwind_VRS_Get >> U _Unwind_VRS_Set >> U __aeabi_unwind_cpp_pr0 >> 00000000 T __gcc_personality_v0 >> U __gnu_unwind_frame >> U abort >> >> emutls.o: >> 00000000 n .ARM.attributes >> 00000000 r .ARM.exidx >> 00000000 r .ARM.extab >> 00000000 b .bss >> 00000000 n .comment >> 00000000 d .data >> 00000000 n .note.GNU-stack >> 00000000 t .text >> U _GLOBAL_OFFSET_TABLE_ >> U __aeabi_unwind_cpp_pr0 >> 0000012c T __emutls_get_address >> 00000000 T __emutls_register_common >> U abort >> U calloc >> 00000084 t emutls_alloc >> 000002b8 t emutls_destroy >> 00000040 t emutls_init >> 0000001c b emutls_key >> 00000000 b emutls_mutex >> 00000020 b emutls_size >> U free >> U malloc >> U memcpy >> U memset >> 00000018 b once.6753 >> w pthread_cancel >> w pthread_getspecific >> w pthread_key_create >> w pthread_mutex_lock >> w pthread_mutex_unlock >> w pthread_once >> w pthread_setspecific >> U realloc >> buildbot at sheeva:/usr/lib/gcc/arm-linux-gnueabi/4.3.3$ >> >> Cheers, and have a great day! >> Xerxes >> > From gohman at apple.com Tue Feb 23 10:35:41 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 23 Feb 2010 16:35:41 -0000 Subject: [llvm-commits] [llvm] r96950 - in /llvm/trunk: lib/Analysis/ConstantFolding.cpp test/Transforms/InstCombine/constant-fold-ptr-casts.ll Message-ID: <20100223163541.C3D332A6C12C@llvm.org> Author: djg Date: Tue Feb 23 10:35:41 2010 New Revision: 96950 URL: http://llvm.org/viewvc/llvm-project?rev=96950&view=rev Log: Remove the code which constant-folded ptrtoint(inttoptr(x)+c) to getelementptr. Despite only doing so in the case where x is a known array object and c can be converted to an index within range, this could still be invalid if c is actually the address of an object allocated outside of LLVM. Also, SCEVExpander, the original motivation for this code, has since been improved to avoid inttoptr+ptroint in more cases. Removed: llvm/trunk/test/Transforms/InstCombine/constant-fold-ptr-casts.ll Modified: llvm/trunk/lib/Analysis/ConstantFolding.cpp Modified: llvm/trunk/lib/Analysis/ConstantFolding.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ConstantFolding.cpp?rev=96950&r1=96949&r2=96950&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ConstantFolding.cpp (original) +++ llvm/trunk/lib/Analysis/ConstantFolding.cpp Tue Feb 23 10:35:41 2010 @@ -783,44 +783,12 @@ // If the input is a ptrtoint, turn the pair into a ptr to ptr bitcast if // the int size is >= the ptr size. This requires knowing the width of a // pointer, so it can't be done in ConstantExpr::getCast. - if (ConstantExpr *CE = dyn_cast(Ops[0])) { + if (ConstantExpr *CE = dyn_cast(Ops[0])) if (TD && - TD->getPointerSizeInBits() <= - CE->getType()->getScalarSizeInBits()) { - if (CE->getOpcode() == Instruction::PtrToInt) - return FoldBitCast(CE->getOperand(0), DestTy, *TD); - - // If there's a constant offset added to the integer value before - // it is casted back to a pointer, see if the expression can be - // converted into a GEP. - if (CE->getOpcode() == Instruction::Add) - if (ConstantInt *L = dyn_cast(CE->getOperand(1))) - if (ConstantExpr *R = dyn_cast(CE->getOperand(0))) - if (R->getOpcode() == Instruction::PtrToInt) - if (GlobalVariable *GV = - dyn_cast(R->getOperand(0))) { - const PointerType *GVTy = cast(GV->getType()); - if (const ArrayType *AT = - dyn_cast(GVTy->getElementType())) { - const Type *ElTy = AT->getElementType(); - uint64_t AllocSize = TD->getTypeAllocSize(ElTy); - APInt PSA(L->getValue().getBitWidth(), AllocSize); - if (ElTy == cast(DestTy)->getElementType() && - L->getValue().urem(PSA) == 0) { - APInt ElemIdx = L->getValue().udiv(PSA); - if (ElemIdx.ult(APInt(ElemIdx.getBitWidth(), - AT->getNumElements()))) { - Constant *Index[] = { - Constant::getNullValue(CE->getType()), - ConstantInt::get(ElTy->getContext(), ElemIdx) - }; - return ConstantExpr::getGetElementPtr(GV, &Index[0], 2); - } - } - } - } - } - } + TD->getPointerSizeInBits() <= CE->getType()->getScalarSizeInBits() && + CE->getOpcode() == Instruction::PtrToInt) + return FoldBitCast(CE->getOperand(0), DestTy, *TD); + return ConstantExpr::getCast(Opcode, Ops[0], DestTy); case Instruction::Trunc: case Instruction::ZExt: Removed: llvm/trunk/test/Transforms/InstCombine/constant-fold-ptr-casts.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/constant-fold-ptr-casts.ll?rev=96949&view=auto ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/constant-fold-ptr-casts.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/constant-fold-ptr-casts.ll (removed) @@ -1,27 +0,0 @@ -; RUN: opt < %s -instcombine -S | grep {ret i32 2143034560} | count 2 - -; Instcombine should be able to completely fold this code. - -target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" -target triple = "i686-apple-darwin8" - - at bar = constant [3 x i64] [i64 9220983451228067448, i64 9220983451228067449, i64 9220983450959631991], align 8 - -define i32 @foo() nounwind { -entry: - %tmp87.2 = load i64* inttoptr (i32 add (i32 16, i32 ptrtoint ([3 x i64]* @bar to i32)) to i64*), align 8 - %t0 = bitcast i64 %tmp87.2 to double - %tmp9192.2 = fptrunc double %t0 to float - %t1 = bitcast float %tmp9192.2 to i32 - ret i32 %t1 -} - -define i32 @goo() nounwind { -entry: - %tmp87.2 = load i64* inttoptr (i32 add (i32 ptrtoint ([3 x i64]* @bar to i32), i32 16) to i64*), align 8 - %t0 = bitcast i64 %tmp87.2 to double - %tmp9192.2 = fptrunc double %t0 to float - %t1 = bitcast float %tmp9192.2 to i32 - ret i32 %t1 -} - From alenhar2 at llvm.org Tue Feb 23 10:45:35 2010 From: alenhar2 at llvm.org (alenhar2 at llvm.org) Date: Tue, 23 Feb 2010 16:45:35 -0000 Subject: [llvm-commits] [poolalloc] r96953 - in /poolalloc/trunk: include/dsa/DSNode.h lib/DSA/BottomUpClosure.cpp lib/DSA/DataStructure.cpp lib/DSA/Local.cpp Message-ID: <20100223164535.2C1EE2A6C12C@llvm.org> Author: alenhar2 Date: Tue Feb 23 10:45:34 2010 New Revision: 96953 URL: http://llvm.org/viewvc/llvm-project?rev=96953&view=rev Log: cache external function in node info. reduces peak memory by 1GB and runtime by 66% on the linux kernel Modified: poolalloc/trunk/include/dsa/DSNode.h poolalloc/trunk/lib/DSA/BottomUpClosure.cpp poolalloc/trunk/lib/DSA/DataStructure.cpp poolalloc/trunk/lib/DSA/Local.cpp Modified: poolalloc/trunk/include/dsa/DSNode.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/DSNode.h?rev=96953&r1=96952&r2=96953&view=diff ============================================================================== --- poolalloc/trunk/include/dsa/DSNode.h (original) +++ poolalloc/trunk/include/dsa/DSNode.h Tue Feb 23 10:45:34 2010 @@ -85,20 +85,21 @@ AllocaNode = 1 << 0, // This node was allocated with alloca HeapNode = 1 << 1, // This node was allocated with malloc GlobalNode = 1 << 2, // This node was allocated by a global var decl - UnknownNode = 1 << 3, // This node points to unknown allocated memory - IncompleteNode = 1 << 4, // This node may not be complete - - ModifiedNode = 1 << 5, // This node is modified in this context - ReadNode = 1 << 6, // This node is read in this context - - ArrayNode = 1 << 7, // This node is treated like an array - ExternalNode = 1 << 8, // This node comes from an external source - IntToPtrNode = 1 << 9, // This node comes from an int cast - PtrToIntNode = 1 << 10, // This node excapes to an int cast - VAStartNode = 1 << 11, // This node excapes to an int cast + ExternFuncNode = 1 << 3, // This node contains external functions + UnknownNode = 1 << 4, // This node points to unknown allocated memory + IncompleteNode = 1 << 5, // This node may not be complete + + ModifiedNode = 1 << 6, // This node is modified in this context + ReadNode = 1 << 7, // This node is read in this context + + ArrayNode = 1 << 8, // This node is treated like an array + ExternalNode = 1 << 9, // This node comes from an external source + IntToPtrNode = 1 << 10, // This node comes from an int cast + PtrToIntNode = 1 << 11, // This node excapes to an int cast + VAStartNode = 1 << 12, // This node excapes to an int cast //#ifndef NDEBUG - DeadNode = 1 << 12, // This node is dead and should not be pointed to + DeadNode = 1 << 13, // This node is dead and should not be pointed to //#endif Composition = AllocaNode | HeapNode | GlobalNode | UnknownNode @@ -328,6 +329,7 @@ bool isAllocaNode() const { return NodeType & AllocaNode; } bool isHeapNode() const { return NodeType & HeapNode; } bool isGlobalNode() const { return NodeType & GlobalNode; } + bool isExternFuncNode() const { return NodeType & ExternFuncNode; } bool isUnknownNode() const { return NodeType & UnknownNode; } bool isModifiedNode() const { return NodeType & ModifiedNode; } bool isReadNode() const { return NodeType & ReadNode; } @@ -343,6 +345,7 @@ DSNode* setAllocaMarker() { NodeType |= AllocaNode; return this; } DSNode* setHeapMarker() { NodeType |= HeapNode; return this; } DSNode* setGlobalMarker() { NodeType |= GlobalNode; return this; } + DSNode* setExternFuncMarker() { NodeType |= ExternFuncNode; return this; } DSNode* setUnknownMarker() { NodeType |= UnknownNode; return this; } DSNode* setModifiedMarker() { NodeType |= ModifiedNode; return this; } DSNode* setReadMarker() { NodeType |= ReadNode; return this; } Modified: poolalloc/trunk/lib/DSA/BottomUpClosure.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/BottomUpClosure.cpp?rev=96953&r1=96952&r2=96953&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/BottomUpClosure.cpp (original) +++ poolalloc/trunk/lib/DSA/BottomUpClosure.cpp Tue Feb 23 10:45:34 2010 @@ -119,14 +119,6 @@ return false; } -static inline bool nodeContainsExternalFunction(const DSNode *N) { - std::vector Funcs; - N->addFullFunctionList(Funcs); - for (unsigned i = 0, e = Funcs.size(); i != e; ++i) - if (Funcs[i]->isDeclaration()) return true; - return false; -} - void BUDataStructures::finalizeGlobals(void) { // Any unresolved call can be removed (resolved) if it does not contain // external functions and it is not reachable from any call that does @@ -134,8 +126,7 @@ std::set GoodCalls, BadCalls; for (DSGraph::afc_iterator ii = GlobalsGraph->afc_begin(), ee = GlobalsGraph->afc_end(); ii != ee; ++ii) - if (ii->isDirectCall() || - nodeContainsExternalFunction(ii->getCalleeNode())) + if (ii->isDirectCall() || ii->getCalleeNode()->isExternFuncNode()) BadCalls.insert(*ii); else GoodCalls.insert(*ii); @@ -163,15 +154,8 @@ Callees.push_back(CS.getCalleeFunc()); } else if (!CS.getCalleeNode()->isIncompleteNode()) { // Get all callees. - unsigned OldSize = Callees.size(); - CS.getCalleeNode()->addFullFunctionList(Callees); - - // If any of the callees are unresolvable, remove the whole batch! - for (unsigned i = OldSize, e = Callees.size(); i != e; ++i) - if (Callees[i]->isDeclaration()) { - Callees.erase(Callees.begin()+OldSize, Callees.end()); - return; - } + if (!CS.getCalleeNode()->isExternFuncNode()) + CS.getCalleeNode()->addFullFunctionList(Callees); } } @@ -181,15 +165,15 @@ if (!CS.getCalleeFunc()->isDeclaration()) Callees.push_back(CS.getCalleeFunc()); } else { - // Get all callees. + // Get any callees. unsigned OldSize = Callees.size(); CS.getCalleeNode()->addFullFunctionList(Callees); - + // If any of the callees are unresolvable, remove them - for (unsigned i = OldSize; i != Callees.size(); ) + for (unsigned i = OldSize; i != Callees.size();) if (Callees[i]->isDeclaration()) { - Callees.erase(Callees.begin()+i); - } else + Callees.erase(Callees.begin() + i); + } else ++i; } } @@ -202,14 +186,6 @@ GetAllCallees(*I, Callees); } -/// GetAnyAuxCallees - Return a list containing all of the callees in -/// the aux list for the specified graph in the Callees vector. -static void GetAnyAuxCallees(DSGraph* G, std::vector &Callees) { - Callees.clear(); - for (DSGraph::afc_iterator I = G->afc_begin(), E = G->afc_end(); I != E; ++I) - GetAnyCallees(*I, Callees); -} - unsigned BUDataStructures::calculateGraphs(const Function *F, std::vector &Stack, unsigned &NextID, @@ -233,17 +209,8 @@ // Find all callee functions. std::vector CalleeFunctions; - GetAnyAuxCallees(Graph, CalleeFunctions); - std::sort(CalleeFunctions.begin(), CalleeFunctions.end()); - std::vector::iterator uid = std::unique(CalleeFunctions.begin(), CalleeFunctions.end()); - CalleeFunctions.resize(uid - CalleeFunctions.begin()); - - std::vector PreResolvedFuncs; - GetAllAuxCallees(Graph, PreResolvedFuncs); - std::sort(PreResolvedFuncs.begin(), PreResolvedFuncs.end()); - uid = std::unique(PreResolvedFuncs.begin(), PreResolvedFuncs.end()); - PreResolvedFuncs.resize(uid - PreResolvedFuncs.begin()); - + GetAllAuxCallees(Graph, CalleeFunctions); + // The edges out of the current node are the call site targets... for (unsigned i = 0, e = CalleeFunctions.size(); i != e; ++i) { const Function *Callee = CalleeFunctions[i]; @@ -275,36 +242,15 @@ if (MaxSCC < 1) MaxSCC = 1; // Should we revisit the graph? Only do it if there are now new resolvable - // callees or new callees - std::vector NewCalleeFuncs; - GetAnyAuxCallees(Graph, NewCalleeFuncs); - std::sort(NewCalleeFuncs.begin(), NewCalleeFuncs.end()); - std::vector::iterator uid = std::unique(NewCalleeFuncs.begin(), NewCalleeFuncs.end()); - NewCalleeFuncs.resize(uid - NewCalleeFuncs.begin()); - uid = std::set_difference(NewCalleeFuncs.begin(), NewCalleeFuncs.end(), - CalleeFunctions.begin(), CalleeFunctions.end(), - NewCalleeFuncs.begin()); - NewCalleeFuncs.resize(uid - NewCalleeFuncs.begin()); - - std::vector ResolvedFuncs; - GetAllAuxCallees(Graph, ResolvedFuncs); - std::sort(ResolvedFuncs.begin(), ResolvedFuncs.end()); - uid = std::unique(ResolvedFuncs.begin(), ResolvedFuncs.end()); - ResolvedFuncs.resize(uid - ResolvedFuncs.begin()); - uid = std::set_difference(ResolvedFuncs.begin(), ResolvedFuncs.end(), - PreResolvedFuncs.begin(), PreResolvedFuncs.end(), - ResolvedFuncs.begin()); - ResolvedFuncs.resize(uid - ResolvedFuncs.begin()); - - if (ResolvedFuncs.size() || NewCalleeFuncs.size()) { + // callees + GetAllAuxCallees(Graph, CalleeFunctions); + if (!CalleeFunctions.empty()) { DEBUG(errs() << "Recalculating " << F->getName() << " due to new knowledge\n"); ValMap.erase(F); return calculateGraphs(F, Stack, NextID, ValMap); } else { ValMap[F] = ~0U; } - //propagate incomplete call nodes - inlineUnresolved(Graph); return MyID; } else { @@ -359,8 +305,6 @@ << "DONE with SCC #: " << MyID << "\n"); // We never have to revisit "SCC" processed functions... - //propagate incomplete call nodes - inlineUnresolved(SCCGraph); return MyID; } @@ -628,7 +572,8 @@ << Graph->getFunctionNames() << "' [" << Graph->getGraphSize() <<"+" << Graph->getAuxFunctionCalls().size() << "]\n"); Graph->mergeInGraph(CS, *Callee, *GI, - DSGraph::StripAllocaBit|DSGraph::DontCloneCallNodes); + DSGraph::StripAllocaBit|DSGraph::DontCloneCallNodes | + DSGraph::DontCloneAuxCallNodes); ++NumInlines; } else { DEBUG(errs() << "In Fns: " << Graph->getFunctionNames() << "\n"); @@ -710,7 +655,8 @@ Graph->mergeInGraph(CS, IndCallGraph.second, *GI, DSGraph::StripAllocaBit | - DSGraph::DontCloneCallNodes); + DSGraph::DontCloneCallNodes | + DSGraph::DontCloneAuxCallNodes); ++NumInlines; } } Modified: poolalloc/trunk/lib/DSA/DataStructure.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DataStructure.cpp?rev=96953&r1=96952&r2=96953&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/DataStructure.cpp (original) +++ poolalloc/trunk/lib/DSA/DataStructure.cpp Tue Feb 23 10:45:34 2010 @@ -117,7 +117,6 @@ return ValueMap.insert(std::make_pair(GV, DSNodeHandle())).first->second; } - //===----------------------------------------------------------------------===// // DSNode Implementation //===----------------------------------------------------------------------===// @@ -212,7 +211,7 @@ if (I == Globals.end() || *I != GV) { Globals.insert(I, GV); - NodeType |= GlobalNode; + setGlobalMarker(); } } @@ -853,11 +852,6 @@ std::set_union(Globals.begin(), Globals.end(), RHS.Globals.begin(), RHS.Globals.end(), back_it); - DEBUG( - for (std::vector::iterator ii = Temp.begin(), - ee = Temp.end(); ii != ee; ++ii) - assert(isa(*ii) && "Non global merged"); - ); Globals.swap(Temp); } @@ -1011,12 +1005,10 @@ N->Links.clear(); // Merge the globals list... - if (!N->Globals.empty()) { - CurNodeH.getNode()->mergeGlobals(*N); + CurNodeH.getNode()->mergeGlobals(*N); - // Delete the globals from the old node... - N->Globals.clear(); - } + // Delete the globals from the old node... + N->Globals.clear(); } @@ -2050,14 +2042,6 @@ Edge.setTo(0, 0); // Kill the edge! } -static inline bool nodeContainsExternalFunction(const DSNode *N) { - std::vector Funcs; - N->addFullFunctionList(Funcs); - for (unsigned i = 0, e = Funcs.size(); i != e; ++i) - if (Funcs[i]->isDeclaration()) return true; - return false; -} - static void removeIdenticalCalls(std::list &Calls) { // Remove trivially identical function calls Calls.sort(); // Sort by callee as primary key! @@ -2095,8 +2079,7 @@ // if the callee contains an external function, it will never be // resolvable, just merge the call sites. if (!LastCalleeNode.isNull() && LastCalleeNode.getNode() == Callee) { - LastCalleeContainsExternalFunction = - nodeContainsExternalFunction(Callee); + LastCalleeContainsExternalFunction = Callee->isExternFuncNode(); std::list::iterator PrevIt = OldIt; --PrevIt; @@ -2834,7 +2817,10 @@ for( ; i != I->globals_end(); ++i) { GlobalECs.unionSets(First, *i); ECGlobals.insert(*i); - SM.erase(SM.find(*i)); + if (SM.find(*i) != SM.end()) + SM.erase(SM.find(*i)); + else + errs() << "Global missing in scalar map " << (*i)->getName() << "\n"; } // Next, get the leader element. Modified: poolalloc/trunk/lib/DSA/Local.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/Local.cpp?rev=96953&r1=96952&r2=96953&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/Local.cpp (original) +++ poolalloc/trunk/lib/DSA/Local.cpp Tue Feb 23 10:45:34 2010 @@ -76,7 +76,7 @@ /// getValueDest - Return the DSNode that the actual value points to. /// - DSNodeHandle getValueDest(Value &V); + DSNodeHandle getValueDest(Value* V); /// getLink - This method is used to return the specified link in the /// specified node if one exists. If a link does not already exist (it's @@ -95,7 +95,7 @@ { setDestTo(AI, createNode()->setAllocaMarker()); } void visitFreeInst(FreeInst &FI) - { if (DSNode *N = getValueDest(*FI.getOperand(0)).getNode()) + { if (DSNode *N = getValueDest(FI.getOperand(0)).getNode()) N->setHeapMarker(); } @@ -129,7 +129,7 @@ for (Function::arg_iterator I = f.arg_begin(), E = f.arg_end(); I != E; ++I) { if (isa(I->getType())) { - DSNode * Node = getValueDest(*I).getNode(); + DSNode * Node = getValueDest(I).getNode(); if (!f.hasInternalLinkage()) Node->setExternalMarker(); @@ -167,7 +167,7 @@ {} void mergeInGlobalInitializer(GlobalVariable *GV); - void mergeFunction(Function& F) { getValueDest(F); } + void mergeFunction(Function* F) { getValueDest(F); } }; /// Traverse the whole DSGraph, and propagate the unknown flags through all @@ -200,8 +200,7 @@ /// /// getValueDest - Return the DSNode that the actual value points to. /// -DSNodeHandle GraphBuilder::getValueDest(Value &Val) { - Value *V = &Val; +DSNodeHandle GraphBuilder::getValueDest(Value* V) { if (isa(V) && cast(V)->isNullValue()) return 0; // Null doesn't point to anything, don't add to ScalarMap! @@ -218,14 +217,16 @@ N = createNode(GV->getType()->getElementType()); N->addGlobal(GV); } else if (Function* GV = dyn_cast(V)) { - // Create a new global node for this global variable. + // Create a new global node for this function. N = createNode(); N->addGlobal(GV); + if (GV->isDeclaration()) + N->setExternFuncMarker(); } else if (Constant *C = dyn_cast(V)) { if (ConstantExpr *CE = dyn_cast(C)) { if (CE->isCast()) { if (isa(CE->getOperand(0)->getType())) - NH = getValueDest(*CE->getOperand(0)); + NH = getValueDest(CE->getOperand(0)); else NH = createNode()->setUnknownMarker(); } else if (CE->getOpcode() == Instruction::GetElementPtr) { @@ -249,10 +250,10 @@ // According to Andrew, DSA is broken on global aliasing, since it does // not handle the aliases of parameters correctly. Here is only a quick // fix for some special cases. - NH = getValueDest(*(cast(C)->getAliasee())); + NH = getValueDest(cast(C)->getAliasee()); return 0; } else { - DEBUG(errs() << "Unknown constant: " << *C << "\n"); + errs() << "Unknown constant: " << *C << "\n"; assert(0 && "Unknown constant type!"); } N = createNode(); // just create a shadow node @@ -304,7 +305,7 @@ DSNodeHandle &PNDest = G.getNodeForValue(&PN); for (unsigned i = 0, e = PN.getNumIncomingValues(); i != e; ++i) - PNDest.mergeWith(getValueDest(*PN.getIncomingValue(i))); + PNDest.mergeWith(getValueDest(PN.getIncomingValue(i))); } void GraphBuilder::visitSelectInst(SelectInst &SI) { @@ -312,14 +313,14 @@ return; // Only pointer Selects DSNodeHandle &Dest = G.getNodeForValue(&SI); - DSNodeHandle S1 = getValueDest(*SI.getOperand(1)); - DSNodeHandle S2 = getValueDest(*SI.getOperand(2)); + DSNodeHandle S1 = getValueDest(SI.getOperand(1)); + DSNodeHandle S2 = getValueDest(SI.getOperand(2)); Dest.mergeWith(S1); Dest.mergeWith(S2); } void GraphBuilder::visitLoadInst(LoadInst &LI) { - DSNodeHandle Ptr = getValueDest(*LI.getOperand(0)); + DSNodeHandle Ptr = getValueDest(LI.getOperand(0)); if (Ptr.isNull()) return; // Load from null @@ -335,7 +336,7 @@ void GraphBuilder::visitStoreInst(StoreInst &SI) { const Type *StoredTy = SI.getOperand(0)->getType(); - DSNodeHandle Dest = getValueDest(*SI.getOperand(1)); + DSNodeHandle Dest = getValueDest(SI.getOperand(1)); if (Dest.isNull()) return; // Mark that the node is written to... @@ -346,17 +347,17 @@ // Avoid adding edges from null, or processing non-"pointer" stores if (isa(StoredTy)) - Dest.addEdgeTo(getValueDest(*SI.getOperand(0))); + Dest.addEdgeTo(getValueDest(SI.getOperand(0))); } void GraphBuilder::visitReturnInst(ReturnInst &RI) { if (RI.getNumOperands() && isa(RI.getOperand(0)->getType())) - G.getOrCreateReturnNodeFor(*FB).mergeWith(getValueDest(*RI.getOperand(0))); + G.getOrCreateReturnNodeFor(*FB).mergeWith(getValueDest(RI.getOperand(0))); } void GraphBuilder::visitVAArgInst(VAArgInst &I) { //FIXME: also updates the argument - DSNodeHandle Ptr = getValueDest(*I.getOperand(0)); + DSNodeHandle Ptr = getValueDest(I.getOperand(0)); if (Ptr.isNull()) return; // Make that the node is read and written @@ -377,14 +378,14 @@ } void GraphBuilder::visitPtrToIntInst(PtrToIntInst& I) { - if (DSNode* N = getValueDest(*I.getOperand(0)).getNode()) + if (DSNode* N = getValueDest(I.getOperand(0)).getNode()) N->setPtrToIntMarker(); } void GraphBuilder::visitBitCastInst(BitCastInst &I) { if (!isa(I.getType())) return; // Only pointers - DSNodeHandle Ptr = getValueDest(*I.getOperand(0)); + DSNodeHandle Ptr = getValueDest(I.getOperand(0)); if (Ptr.isNull()) return; setDestTo(I, Ptr); } @@ -397,8 +398,8 @@ setDestTo(I, createNode()->setAllocaMarker()); const Type *StoredTy = I.getInsertedValueOperand()->getType(); - DSNodeHandle Dest = getValueDest(I); - Dest.mergeWith(getValueDest(*I.getAggregateOperand())); + DSNodeHandle Dest = getValueDest(&I); + Dest.mergeWith(getValueDest(I.getAggregateOperand())); // Mark that the node is written to... Dest.getNode()->setModifiedMarker(); @@ -409,11 +410,11 @@ // Avoid adding edges from null, or processing non-"pointer" stores if (isa(StoredTy)) - Dest.addEdgeTo(getValueDest(*I.getInsertedValueOperand())); + Dest.addEdgeTo(getValueDest(I.getInsertedValueOperand())); } void GraphBuilder::visitExtractValueInst(ExtractValueInst& I) { - DSNodeHandle Ptr = getValueDest(*I.getOperand(0)); + DSNodeHandle Ptr = getValueDest(I.getOperand(0)); // Make that the node is read from... Ptr.getNode()->setReadMarker(); @@ -427,7 +428,7 @@ } void GraphBuilder::visitGetElementPtrInst(User &GEP) { - DSNodeHandle Value = getValueDest(*GEP.getOperand(0)); + DSNodeHandle Value = getValueDest(GEP.getOperand(0)); if (Value.isNull()) Value = createNode(); @@ -594,7 +595,7 @@ switch (F->getIntrinsicID()) { case Intrinsic::vastart: { // Mark the memory written by the vastart intrinsic as incomplete - DSNodeHandle RetNH = getValueDest(**CS.arg_begin()); + DSNodeHandle RetNH = getValueDest(*CS.arg_begin()); if (DSNode *N = RetNH.getNode()) { N->setModifiedMarker()->setAllocaMarker()->setIncompleteMarker() ->setVAStartMarker()->setUnknownMarker()->foldNodeCompletely(); @@ -614,7 +615,7 @@ Value * Operand = CS.getInstruction()->getOperand(1); if (CastInst * CI = dyn_cast(Operand)) Operand = CI->getOperand (0); - RetNH = getValueDest(*Operand); + RetNH = getValueDest(Operand); if (DSNode *N = RetNH.getNode()) { N->setModifiedMarker()->setAllocaMarker()->setIncompleteMarker() ->setVAStartMarker()->setUnknownMarker()->foldNodeCompletely(); @@ -624,8 +625,8 @@ return true; } case Intrinsic::vacopy: - getValueDest(*CS.getInstruction()). - mergeWith(getValueDest(**(CS.arg_begin()))); + getValueDest(CS.getInstruction()). + mergeWith(getValueDest(*(CS.arg_begin()))); return true; case Intrinsic::stacksave: { DSNode * Node = createNode(); @@ -635,10 +636,10 @@ return true; } case Intrinsic::stackrestore: - getValueDest(*CS.getInstruction()).getNode()->setAllocaMarker() - ->setIncompleteMarker() - ->setUnknownMarker() - ->foldNodeCompletely(); + getValueDest(CS.getInstruction()).getNode()->setAllocaMarker() + ->setIncompleteMarker() + ->setUnknownMarker() + ->foldNodeCompletely(); return true; case Intrinsic::vaend: case Intrinsic::dbg_func_start: @@ -651,15 +652,15 @@ case Intrinsic::memmove: { // Merge the first & second arguments, and mark the memory read and // modified. - DSNodeHandle RetNH = getValueDest(**CS.arg_begin()); - RetNH.mergeWith(getValueDest(**(CS.arg_begin()+1))); + DSNodeHandle RetNH = getValueDest(*CS.arg_begin()); + RetNH.mergeWith(getValueDest(*(CS.arg_begin()+1))); if (DSNode *N = RetNH.getNode()) N->setModifiedMarker()->setReadMarker(); return true; } case Intrinsic::memset: // Mark the memory modified. - if (DSNode *N = getValueDest(**CS.arg_begin()).getNode()) + if (DSNode *N = getValueDest(*CS.arg_begin()).getNode()) N->setModifiedMarker(); return true; @@ -672,13 +673,13 @@ } case Intrinsic::atomic_cmp_swap: { - DSNodeHandle Ptr = getValueDest(**CS.arg_begin()); + DSNodeHandle Ptr = getValueDest(*CS.arg_begin()); Ptr.getNode()->setReadMarker(); Ptr.getNode()->setModifiedMarker(); if (isa(F->getReturnType())) { - setDestTo(*(CS.getInstruction()), getValueDest(**(CS.arg_begin() + 1))); - getValueDest(**(CS.arg_begin() + 1)) - .mergeWith(getValueDest(**(CS.arg_begin() + 2))); + setDestTo(*(CS.getInstruction()), getValueDest(*(CS.arg_begin() + 1))); + getValueDest(*(CS.arg_begin() + 1)) + .mergeWith(getValueDest(*(CS.arg_begin() + 2))); } } case Intrinsic::atomic_swap: @@ -693,11 +694,11 @@ case Intrinsic::atomic_load_umax: case Intrinsic::atomic_load_umin: { - DSNodeHandle Ptr = getValueDest(**CS.arg_begin()); + DSNodeHandle Ptr = getValueDest(*CS.arg_begin()); Ptr.getNode()->setReadMarker(); Ptr.getNode()->setModifiedMarker(); if (isa(F->getReturnType())) - setDestTo(*(CS.getInstruction()), getValueDest(**(CS.arg_begin() + 1))); + setDestTo(*CS.getInstruction(), getValueDest(*(CS.arg_begin() + 1))); } @@ -753,7 +754,7 @@ DSNodeHandle RetVal; Instruction *I = CS.getInstruction(); if (isa(I->getType())) - RetVal = getValueDest(*I); + RetVal = getValueDest(I); if (!isa(Callee)) if (ConstantExpr* EX = dyn_cast(Callee)) @@ -762,7 +763,7 @@ DSNode *CalleeNode = 0; if (!isa(Callee)) { - CalleeNode = getValueDest(*Callee).getNode(); + CalleeNode = getValueDest(Callee).getNode(); if (CalleeNode == 0) { DEBUG(errs() << "WARNING: Program is calling through a null pointer?\n" << *I); return; // Calling a null pointer? @@ -775,7 +776,7 @@ // Calculate the arguments vector... for (CallSite::arg_iterator I = CS.arg_begin(), E = CS.arg_end(); I != E; ++I) if (isa((*I)->getType())) - Args.push_back(getValueDest(**I)); + Args.push_back(getValueDest(*I)); // Add a new function call entry... if (CalleeNode) { @@ -792,10 +793,10 @@ void GraphBuilder::visitInstruction(Instruction &Inst) { DSNodeHandle CurNode; if (isa(Inst.getType())) - CurNode = getValueDest(Inst); + CurNode = getValueDest(&Inst); for (User::op_iterator I = Inst.op_begin(), E = Inst.op_end(); I != E; ++I) if (isa((*I)->getType())) - CurNode.mergeWith(getValueDest(**I)); + CurNode.mergeWith(getValueDest(*I)); if (DSNode *N = CurNode.getNode()) N->setUnknownMarker(); @@ -816,7 +817,7 @@ if (isa(Ty)) { // Avoid adding edges from null, or processing non-"pointer" stores - NH.addEdgeTo(getValueDest(*C)); + NH.addEdgeTo(getValueDest(C)); return; } @@ -853,7 +854,7 @@ void GraphBuilder::mergeInGlobalInitializer(GlobalVariable *GV) { assert(!GV->isDeclaration() && "Cannot merge in external global!"); // Get a node handle to the global node and merge the initializer into it. - DSNodeHandle NH = getValueDest(*GV); + DSNodeHandle NH = getValueDest(GV); MergeConstantInitIntoNode(NH, GV->getType()->getElementType(), GV->getInitializer()); } @@ -874,7 +875,7 @@ // Add Functions to the globals graph. for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) if (!I->isDeclaration() && I->hasAddressTaken()) - GGB.mergeFunction(*I); + GGB.mergeFunction(I); } // Next step, iterate through the nodes in the globals graph, unioning From cdavis at mymail.mines.edu Tue Feb 23 11:00:55 2010 From: cdavis at mymail.mines.edu (Charles Davis) Date: Tue, 23 Feb 2010 10:00:55 -0700 Subject: [llvm-commits] [PATCH] Work around an Apple linker bug Message-ID: <4B8409C7.6090005@mymail.mines.edu> While compiling Wine with clang, I discovered a bug in the Apple linker. When LLVM encounters what it believes to be a UTF-16 string, it places it in the (__TEXT, __ustring) section. Unfortunately, if a global symbol is placed there, the linker does not see it and loses the symbol. I have filed to keep track of this. This patch disables generation of the (__TEXT, __ustring) section. UTF-16 string constants will be placed in the (__TEXT, __const) section instead (as GCC does). This is a temporary workaround until Apple fixes the linker bug. Chip -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rdar-7672401-workaround.patch Url: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20100223/1c1700be/attachment.pl From grosbach at apple.com Tue Feb 23 11:16:28 2010 From: grosbach at apple.com (Jim Grosbach) Date: Tue, 23 Feb 2010 17:16:28 -0000 Subject: [llvm-commits] [llvm] r96954 - /llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp Message-ID: <20100223171628.1B4562A6C12C@llvm.org> Author: grosbach Date: Tue Feb 23 11:16:27 2010 New Revision: 96954 URL: http://llvm.org/viewvc/llvm-project?rev=96954&view=rev Log: Spelling. s/suppor /support / Modified: llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp Modified: llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp?rev=96954&r1=96953&r2=96954&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp Tue Feb 23 11:16:27 2010 @@ -1129,7 +1129,7 @@ ARMFunctionInfo *AFI = MF.getInfo(); assert(!AFI->isThumb1OnlyFunction() && - "This eliminateCallFramePseudoInstr does not suppor Thumb1!"); + "This eliminateCallFramePseudoInstr does not support Thumb1!"); bool isARM = !AFI->isThumbFunction(); // Replace the pseudo instruction with a new instruction... @@ -1266,7 +1266,7 @@ MachineFrameInfo *MFI = MF.getFrameInfo(); ARMFunctionInfo *AFI = MF.getInfo(); assert(!AFI->isThumb1OnlyFunction() && - "This emitPrologue does not suppor Thumb1!"); + "This emitPrologue does not support Thumb1!"); bool isARM = !AFI->isThumbFunction(); unsigned VARegSaveSize = AFI->getVarArgsRegSaveSize(); unsigned NumBytes = MFI->getStackSize(); @@ -1427,7 +1427,7 @@ MachineFrameInfo *MFI = MF.getFrameInfo(); ARMFunctionInfo *AFI = MF.getInfo(); assert(!AFI->isThumb1OnlyFunction() && - "This emitEpilogue does not suppor Thumb1!"); + "This emitEpilogue does not support Thumb1!"); bool isARM = !AFI->isThumbFunction(); unsigned VARegSaveSize = AFI->getVarArgsRegSaveSize(); From gohman at apple.com Tue Feb 23 11:17:57 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 23 Feb 2010 17:17:57 -0000 Subject: [llvm-commits] [llvm] r96955 - in /llvm/trunk: lib/Transforms/InstCombine/InstCombineSelect.cpp test/Transforms/InstCombine/fcmp-select.ll Message-ID: <20100223171757.7804D2A6C12C@llvm.org> Author: djg Date: Tue Feb 23 11:17:57 2010 New Revision: 96955 URL: http://llvm.org/viewvc/llvm-project?rev=96955&view=rev Log: Don't do (X != Y) ? X : Y -> X for floating-point values; it doesn't handle NaN properly. Do (X une Y) ? X : Y -> X if one of X and Y is not zero. Added: llvm/trunk/test/Transforms/InstCombine/fcmp-select.ll Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineSelect.cpp Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineSelect.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineSelect.cpp?rev=96955&r1=96954&r2=96955&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/InstCombine/InstCombineSelect.cpp (original) +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineSelect.cpp Tue Feb 23 11:17:57 2010 @@ -539,9 +539,18 @@ !CFPf->getValueAPF().isZero())) return ReplaceInstUsesWith(SI, FalseVal); } - // Transform (X != Y) ? X : Y -> X - if (FCI->getPredicate() == FCmpInst::FCMP_ONE) + // Transform (X une Y) ? X : Y -> X + if (FCI->getPredicate() == FCmpInst::FCMP_UNE) { + // This is not safe in general for floating point: + // consider X== -0, Y== +0. + // It becomes safe if either operand is a nonzero constant. + ConstantFP *CFPt, *CFPf; + if (((CFPt = dyn_cast(TrueVal)) && + !CFPt->getValueAPF().isZero()) || + ((CFPf = dyn_cast(FalseVal)) && + !CFPf->getValueAPF().isZero())) return ReplaceInstUsesWith(SI, TrueVal); + } // NOTE: if we wanted to, this is where to detect MIN/MAX } else if (FCI->getOperand(0) == FalseVal && FCI->getOperand(1) == TrueVal){ @@ -557,9 +566,18 @@ !CFPf->getValueAPF().isZero())) return ReplaceInstUsesWith(SI, FalseVal); } - // Transform (X != Y) ? Y : X -> Y - if (FCI->getPredicate() == FCmpInst::FCMP_ONE) - return ReplaceInstUsesWith(SI, TrueVal); + // Transform (X une Y) ? Y : X -> Y + if (FCI->getPredicate() == FCmpInst::FCMP_UNE) { + // This is not safe in general for floating point: + // consider X== -0, Y== +0. + // It becomes safe if either operand is a nonzero constant. + ConstantFP *CFPt, *CFPf; + if (((CFPt = dyn_cast(TrueVal)) && + !CFPt->getValueAPF().isZero()) || + ((CFPf = dyn_cast(FalseVal)) && + !CFPf->getValueAPF().isZero())) + return ReplaceInstUsesWith(SI, TrueVal); + } // NOTE: if we wanted to, this is where to detect MIN/MAX } // NOTE: if we wanted to, this is where to detect ABS Added: llvm/trunk/test/Transforms/InstCombine/fcmp-select.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/fcmp-select.ll?rev=96955&view=auto ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/fcmp-select.ll (added) +++ llvm/trunk/test/Transforms/InstCombine/fcmp-select.ll Tue Feb 23 11:17:57 2010 @@ -0,0 +1,53 @@ +; RUN: opt < %s -instcombine -S | FileCheck %s + +; x != y ? x : y -> x if it's the right kind of != and at least +; one of x and y is not negative zero. + +; CHECK: f0 +; CHECK: ret double %x +define double @f0(double %x) nounwind readnone { +entry: + %cmp = fcmp une double %x, -1.0 + %cond = select i1 %cmp, double %x, double -1.0 + ret double %cond +} +; CHECK: f1 +; CHECK: ret double -1.000000e+00 +define double @f1(double %x) nounwind readnone { +entry: + %cmp = fcmp une double %x, -1.0 + %cond = select i1 %cmp, double -1.0, double %x + ret double %cond +} +; CHECK: f2 +; CHECK: ret double %cond +define double @f2(double %x, double %y) nounwind readnone { +entry: + %cmp = fcmp une double %x, %y + %cond = select i1 %cmp, double %x, double %y + ret double %cond +} +; CHECK: f3 +; CHECK: ret double %cond +define double @f3(double %x, double %y) nounwind readnone { +entry: + %cmp = fcmp une double %x, %y + %cond = select i1 %cmp, double %y, double %x + ret double %cond +} +; CHECK: f4 +; CHECK: ret double %cond +define double @f4(double %x) nounwind readnone { +entry: + %cmp = fcmp one double %x, -1.0 + %cond = select i1 %cmp, double %x, double -1.0 + ret double %cond +} +; CHECK: f5 +; CHECK: ret double %cond +define double @f5(double %x) nounwind readnone { +entry: + %cmp = fcmp one double %x, -1.0 + %cond = select i1 %cmp, double -1.0, double %x + ret double %cond +} From peckw at wesleypeck.com Tue Feb 23 09:11:17 2010 From: peckw at wesleypeck.com (Wesley Peck) Date: Tue, 23 Feb 2010 15:11:17 -0000 Subject: [llvm-commits] [llvm] r96948 - /llvm/trunk/projects/sample/configure Message-ID: <20100223151117.EF9BD2A6C12C@llvm.org> Author: peckw Date: Tue Feb 23 09:11:17 2010 New Revision: 96948 URL: http://llvm.org/viewvc/llvm-project?rev=96948&view=rev Log: Testing subversion commit access Modified: llvm/trunk/projects/sample/configure Modified: llvm/trunk/projects/sample/configure URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/projects/sample/configure?rev=96948&r1=96947&r2=96948&view=diff ============================================================================== --- llvm/trunk/projects/sample/configure (original) +++ llvm/trunk/projects/sample/configure Tue Feb 23 09:11:17 2010 @@ -2362,3 +2362,4 @@ $ac_cs_success || { (exit 1); exit 1; } fi + From greened at obbligato.org Tue Feb 23 11:37:50 2010 From: greened at obbligato.org (David Greene) Date: Tue, 23 Feb 2010 17:37:50 -0000 Subject: [llvm-commits] [llvm] r96956 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <20100223173750.3FF1B2A6C12C@llvm.org> Author: greened Date: Tue Feb 23 11:37:50 2010 New Revision: 96956 URL: http://llvm.org/viewvc/llvm-project?rev=96956&view=rev Log: Speed up cycle checking significantly by caching results. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=96956&r1=96955&r2=96956&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Tue Feb 23 11:37:50 2010 @@ -6315,7 +6315,11 @@ } static void checkForCyclesHelper(const SDNode *N, - std::set &visited) { + std::set &visited, + std::set &checked) { + if (checked.find(N) != checked.end()) + return; + if (visited.find(N) != visited.end()) { dbgs() << "Offending node:\n"; N->dumprFull(); @@ -6329,16 +6333,18 @@ assert(inserted && "Missed cycle"); for(unsigned i = 0; i < N->getNumOperands(); ++i) { - checkForCyclesHelper(N->getOperand(i).getNode(), visited); + checkForCyclesHelper(N->getOperand(i).getNode(), visited, checked); } visited.erase(i); + checked.insert(N); } void llvm::checkForCycles(const llvm::SDNode *N) { #ifdef XDEBUG assert(N && "Checking nonexistant SDNode"); std::set visited; - checkForCyclesHelper(N, visited); + std::set checked; + checkForCyclesHelper(N, visited, checked); #endif } From clattner at apple.com Tue Feb 23 11:41:28 2010 From: clattner at apple.com (Chris Lattner) Date: Tue, 23 Feb 2010 09:41:28 -0800 Subject: [llvm-commits] [llvm] r96956 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp In-Reply-To: <20100223173750.3FF1B2A6C12C@llvm.org> References: <20100223173750.3FF1B2A6C12C@llvm.org> Message-ID: <74AF2502-782D-42D3-BD15-EAE4C7CCE6C9@apple.com> On Feb 23, 2010, at 9:37 AM, David Greene wrote: > Author: greened > Date: Tue Feb 23 11:37:50 2010 > New Revision: 96956 > > URL: http://llvm.org/viewvc/llvm-project?rev=96956&view=rev > Log: > > Speed up cycle checking significantly by caching results. Please use a SmallPtrSet instead of std::set, it is much faster for pointers. -Chris > > Modified: > llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp > > Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=96956&r1=96955&r2=96956&view=diff > ============================================================================== > --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) > +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Tue Feb 23 11:37:50 2010 > @@ -6315,7 +6315,11 @@ > } > > static void checkForCyclesHelper(const SDNode *N, > - std::set &visited) { > + std::set &visited, > + std::set &checked) { > + if (checked.find(N) != checked.end()) > + return; > + > if (visited.find(N) != visited.end()) { > dbgs() << "Offending node:\n"; > N->dumprFull(); > @@ -6329,16 +6333,18 @@ > assert(inserted && "Missed cycle"); > > for(unsigned i = 0; i < N->getNumOperands(); ++i) { > - checkForCyclesHelper(N->getOperand(i).getNode(), visited); > + checkForCyclesHelper(N->getOperand(i).getNode(), visited, checked); > } > visited.erase(i); > + checked.insert(N); > } > > void llvm::checkForCycles(const llvm::SDNode *N) { > #ifdef XDEBUG > assert(N && "Checking nonexistant SDNode"); > std::set visited; > - checkForCyclesHelper(N, visited); > + std::set checked; > + checkForCyclesHelper(N, visited, checked); > #endif > } > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From eli.friedman at gmail.com Tue Feb 23 11:51:16 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Tue, 23 Feb 2010 09:51:16 -0800 Subject: [llvm-commits] [PATCH] Work around an Apple linker bug In-Reply-To: <4B8409C7.6090005@mymail.mines.edu> References: <4B8409C7.6090005@mymail.mines.edu> Message-ID: On Tue, Feb 23, 2010 at 9:00 AM, Charles Davis wrote: > While compiling Wine with clang, I discovered a bug in the Apple linker. > > When LLVM encounters what it believes to be a UTF-16 string, it places > it in the (__TEXT, __ustring) section. Unfortunately, if a global symbol > is placed there, the linker does not see it and loses the symbol. I have > filed to keep track of this. > > This patch disables generation of the (__TEXT, __ustring) section. > UTF-16 string constants will be placed in the (__TEXT, __const) section > instead (as GCC does). This is a temporary workaround until Apple fixes > the linker bug. How about just never putting symbols with external linkage into a string section? -Eli From clattner at apple.com Tue Feb 23 11:54:54 2010 From: clattner at apple.com (Chris Lattner) Date: Tue, 23 Feb 2010 09:54:54 -0800 Subject: [llvm-commits] [llvm] r96934 - in /llvm/trunk: Makefile.config.in autoconf/configure.ac configure In-Reply-To: <20100223100050.2421E2A6C12C@llvm.org> References: <20100223100050.2421E2A6C12C@llvm.org> Message-ID: On Feb 23, 2010, at 2:00 AM, Daniel Dunbar wrote: > Author: ddunbar > Date: Tue Feb 23 04:00:49 2010 > New Revision: 96934 > > URL: http://llvm.org/viewvc/llvm-project?rev=96934&view=rev > Log: > Initial configure support for using Clang as the LLVM capable compiler. > > Comes in two parts: > 1. Use --with-clang=path/to/clang/compiler to select an installed clang, or > --with-built-clang to have the makefiles use the clang which will be built > as the LLVM capable compiler. If neither is given, --with-built-clang will > be used if the Clang sources are checked out into the standard location > (tools/clang). > > 2. Use --with-llvmcc={llvm-gcc,clang,none} to specify which LLVM capable > compiler to use. If not given, then llvm-gcc will be used if available, > otherwise Clang. Sounds good to me. This means that if I check out llvm and clang, build them, then run tests that it will test clang. If I don't check out clang, it will default to testing llvm-gcc? If so, that sounds good to me! -Chris > > Makefile support still to come. > > Eric, Doug, Chris, seem reasonable? > > Modified: > llvm/trunk/Makefile.config.in > llvm/trunk/autoconf/configure.ac > llvm/trunk/configure > > Modified: llvm/trunk/Makefile.config.in > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.config.in?rev=96934&r1=96933&r2=96934&view=diff > ============================================================================== > --- llvm/trunk/Makefile.config.in (original) > +++ llvm/trunk/Makefile.config.in Tue Feb 23 04:00:49 2010 > @@ -190,6 +190,14 @@ > LLVMCC1PLUS := @LLVMCC1PLUS@ > LLVMGCC_LANGS := @LLVMGCC_LANGS@ > > +# Information on Clang, if configured. > +CLANGPATH := @CLANGPATH@ > +CLANGXXPATH := @CLANGXXPATH@ > +ENABLE_BUILT_CLANG := @ENABLE_BUILT_CLANG@ > + > +# The LLVM capable compiler to use. > +LLVMCC_OPTION := @LLVMCC_OPTION@ > + > # Path to directory where object files should be stored during a build. > # Set OBJ_ROOT to "." if you do not want to use a separate place for > # object files. > > Modified: llvm/trunk/autoconf/configure.ac > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=96934&r1=96933&r2=96934&view=diff > ============================================================================== > --- llvm/trunk/autoconf/configure.ac (original) > +++ llvm/trunk/autoconf/configure.ac Tue Feb 23 04:00:49 2010 > @@ -612,6 +612,56 @@ > AC_MSG_ERROR([Invalid llvm-gcc. Use --with-llvmgcc when --with-llvmgxx is used]); > fi > > +dnl Allow a specific Clang compiler to be used with this LLVM config. > +AC_ARG_WITH(clang, > + AS_HELP_STRING([--with-clang], > + [Specify location of clang compiler (default is --with-built-clang)]), > + [],[with_clang=default]) > + > +dnl Enable use of the built Clang. > +AC_ARG_WITH(built-clang, > + AS_HELP_STRING([--with-built-clang], > + [Use the compiled Clang as the LLVM compiler (default=check)]), > + [],[with_built_clang=check]) > + > +dnl Select the Clang compiler option. > +dnl > +dnl If --with-clang is given, always honor that; otherwise honor > +dnl --with-built-clang, or check if we have the clang sources. > +AC_MSG_CHECKING([clang compiler]) > +WITH_CLANGPATH="" > +WITH_BUILT_CLANG=0 > +if test "$with_clang" != "default"; then > + WITH_CLANGPATH="$with_clang" > + if ! test -x "$WITH_CLANGPATH"; then > + AC_MSG_ERROR([invalid --with-clang, path does not specify an executable]) > + fi > +elif test "$with_built_clang" = "yes"; then > + WITH_BUILT_CLANG=1 > +elif test "$with_built_clang" = "no"; then > + WITH_BUILT_CLANG=0 > +else > + if test "$with_built_clang" != "check"; then > + AC_MSG_ERROR([invalid value for --with-built-clang.]) > + fi > + > + if test -f ${srcdir}/tools/clang/README.txt; then > + WITH_BUILT_CLANG=1 > + fi > +fi > + > +if ! test -z "$WITH_CLANGPATH"; then > + AC_MSG_RESULT([$WITH_CLANGPATH]) > + WITH_CLANGXXPATH=`"$WITH_CLANGPATH" --print-prog-name=clang++` > +elif test "$WITH_BUILT_CLANG" = "1"; then > + AC_MSG_RESULT([built]) > +else > + AC_MSG_RESULT([none]) > +fi > +AC_SUBST(CLANGPATH,$WITH_CLANGPATH) > +AC_SUBST(CLANGXXPATH,$WITH_CLANGXXPATH) > +AC_SUBST(ENABLE_BUILT_CLANG,$WITH_BUILT_CLANG) > + > dnl Override the option to use for optimized builds. > AC_ARG_WITH(optimize-option, > AS_HELP_STRING([--with-optimize-option], > @@ -946,6 +996,29 @@ > AC_SUBST(LLVMGXXCOMMAND,$LLVMGXXCOMMAND) > fi > > +dnl Select the LLVM capable compiler to use, we default to using llvm-gcc if > +dnl found, otherwise clang if available. > +AC_ARG_WITH(llvmcc, > + AS_HELP_STRING([--with-llvmcc=], > + [Choose the LLVM capable compiler to use (llvm-gcc, clang, or none; default=check)]), > + [],[with_llvmcc=check]) > +AC_MSG_CHECKING([LLVM capable compiler]) > +if test "$with_llvmcc" != "check"; then > + if (test "$with_llvmcc" != "llvm-gcc" && > + test "$with_llvmcc" != "clang" && > + test "$with_llvmcc" != "none"); then > + AC_MSG_ERROR([invalid value for --with-llvmcc, expected 'llvm-gcc', 'clang', or 'none'.]) > + fi > + WITH_LLVMCC="$with_llvmcc" > +elif test -n "$LLVMGCC"; then > + WITH_LLVMCC=llvm-gcc > +elif test -n "$WITH_CLANGPATH" || test "$WITH_BUILT_CLANG" -ne "0"; then > + WITH_LLVMCC=clang > +else > + WITH_LLVMCC=none > +fi > +AC_MSG_RESULT([$WITH_LLVMCC]) > +AC_SUBST(LLVMCC_OPTION,$WITH_LLVMCC) > > AC_MSG_CHECKING([tool compatibility]) > > > Modified: llvm/trunk/configure > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=96934&r1=96933&r2=96934&view=diff > ============================================================================== > --- llvm/trunk/configure (original) > +++ llvm/trunk/configure Tue Feb 23 04:00:49 2010 > @@ -695,6 +695,9 @@ > LLVM_ENUM_ASM_PARSERS > LLVM_ENUM_DISASSEMBLERS > ENABLE_CBE_PRINTF_A > +CLANGPATH > +CLANGXXPATH > +ENABLE_BUILT_CLANG > OPTIMIZE_OPTION > EXTRA_OPTIONS > BINUTILS_INCDIR > @@ -754,6 +757,7 @@ > LLVMGXXCOMMAND > LLVMGCC > LLVMGXX > +LLVMCC_OPTION > NO_VARIADIC_MACROS > NO_MISSING_FIELD_INITIALIZERS > USE_UDIS86 > @@ -1423,6 +1427,10 @@ > searches PATH) > --with-llvmgxx Specify location of llvm-g++ driver (default > searches PATH) > + --with-clang Specify location of clang compiler (default is > + --with-built-clang) > + --with-built-clang Use the compiled Clang as the LLVM compiler > + (default=check) > --with-optimize-option Select the compiler options to use for optimized > builds > --with-extra-options Specify additional options to compile LLVM with > @@ -1439,6 +1447,8 @@ > --with-binutils-include Specify path to binutils/include/ containing > plugin-api.h file for gold plugin. > --with-tclinclude directory where tcl headers are > + --with-llvmcc= Choose the LLVM capable compiler to use (llvm-gcc, > + clang, or none; default=check) > --with-udis86= Use udis86 external x86 disassembler library > --with-oprofile= > Tell OProfile >= 0.9.4 how to symbolize JIT output > @@ -5026,6 +5036,69 @@ > fi > > > +# Check whether --with-clang was given. > +if test "${with_clang+set}" = set; then > + withval=$with_clang; > +else > + with_clang=default > +fi > + > + > + > +# Check whether --with-built-clang was given. > +if test "${with_built_clang+set}" = set; then > + withval=$with_built_clang; > +else > + with_built_clang=check > +fi > + > + > +{ echo "$as_me:$LINENO: checking clang compiler" >&5 > +echo $ECHO_N "checking clang compiler... $ECHO_C" >&6; } > +WITH_CLANGPATH="" > +WITH_BUILT_CLANG=0 > +if test "$with_clang" != "default"; then > + WITH_CLANGPATH="$with_clang" > + if ! test -x "$WITH_CLANGPATH"; then > + { { echo "$as_me:$LINENO: error: invalid --with-clang, path does not specify an executable" >&5 > +echo "$as_me: error: invalid --with-clang, path does not specify an executable" >&2;} > + { (exit 1); exit 1; }; } > + fi > +elif test "$with_built_clang" = "yes"; then > + WITH_BUILT_CLANG=1 > +elif test "$with_built_clang" = "no"; then > + WITH_BUILT_CLANG=0 > +else > + if test "$with_built_clang" != "check"; then > + { { echo "$as_me:$LINENO: error: invalid value for --with-built-clang." >&5 > +echo "$as_me: error: invalid value for --with-built-clang." >&2;} > + { (exit 1); exit 1; }; } > + fi > + > + if test -f ${srcdir}/tools/clang/README.txt; then > + WITH_BUILT_CLANG=1 > + fi > +fi > + > +if ! test -z "$WITH_CLANGPATH"; then > + { echo "$as_me:$LINENO: result: $WITH_CLANGPATH" >&5 > +echo "${ECHO_T}$WITH_CLANGPATH" >&6; } > + WITH_CLANGXXPATH=`"$WITH_CLANGPATH" --print-prog-name=clang++` > +elif test "$WITH_BUILT_CLANG" = "1"; then > + { echo "$as_me:$LINENO: result: built" >&5 > +echo "${ECHO_T}built" >&6; } > +else > + { echo "$as_me:$LINENO: result: none" >&5 > +echo "${ECHO_T}none" >&6; } > +fi > +CLANGPATH=$WITH_CLANGPATH > + > +CLANGXXPATH=$WITH_CLANGXXPATH > + > +ENABLE_BUILT_CLANG=$WITH_BUILT_CLANG > + > + > + > # Check whether --with-optimize-option was given. > if test "${with_optimize_option+set}" = set; then > withval=$with_optimize_option; > @@ -11032,7 +11105,7 @@ > lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 > lt_status=$lt_dlunknown > cat > conftest.$ac_ext < -#line 11035 "configure" > +#line 11108 "configure" > #include "confdefs.h" > > #if HAVE_DLFCN_H > @@ -12802,6 +12875,36 @@ > fi > > > +# Check whether --with-llvmcc was given. > +if test "${with_llvmcc+set}" = set; then > + withval=$with_llvmcc; > +else > + with_llvmcc=check > +fi > + > +{ echo "$as_me:$LINENO: checking LLVM capable compiler" >&5 > +echo $ECHO_N "checking LLVM capable compiler... $ECHO_C" >&6; } > +if test "$with_llvmcc" != "check"; then > + if (test "$with_llvmcc" != "llvm-gcc" && > + test "$with_llvmcc" != "clang" && > + test "$with_llvmcc" != "none"); then > + { { echo "$as_me:$LINENO: error: invalid value for --with-llvmcc, expected 'llvm-gcc', 'clang', or 'none'." >&5 > +echo "$as_me: error: invalid value for --with-llvmcc, expected 'llvm-gcc', 'clang', or 'none'." >&2;} > + { (exit 1); exit 1; }; } > + fi > + WITH_LLVMCC="$with_llvmcc" > +elif test -n "$LLVMGCC"; then > + WITH_LLVMCC=llvm-gcc > +elif test -n "$WITH_CLANGPATH" || test "$WITH_BUILT_CLANG" -ne "0"; then > + WITH_LLVMCC=clang > +else > + WITH_LLVMCC=none > +fi > +{ echo "$as_me:$LINENO: result: $WITH_LLVMCC" >&5 > +echo "${ECHO_T}$WITH_LLVMCC" >&6; } > +LLVMCC_OPTION=$WITH_LLVMCC > + > + > { echo "$as_me:$LINENO: checking tool compatibility" >&5 > echo $ECHO_N "checking tool compatibility... $ECHO_C" >&6; } > > @@ -20646,10 +20749,10 @@ > LLVM_ENUM_ASM_PARSERS!$LLVM_ENUM_ASM_PARSERS$ac_delim > LLVM_ENUM_DISASSEMBLERS!$LLVM_ENUM_DISASSEMBLERS$ac_delim > ENABLE_CBE_PRINTF_A!$ENABLE_CBE_PRINTF_A$ac_delim > +CLANGPATH!$CLANGPATH$ac_delim > +CLANGXXPATH!$CLANGXXPATH$ac_delim > +ENABLE_BUILT_CLANG!$ENABLE_BUILT_CLANG$ac_delim > OPTIMIZE_OPTION!$OPTIMIZE_OPTION$ac_delim > -EXTRA_OPTIONS!$EXTRA_OPTIONS$ac_delim > -BINUTILS_INCDIR!$BINUTILS_INCDIR$ac_delim > -ENABLE_LLVMC_DYNAMIC!$ENABLE_LLVMC_DYNAMIC$ac_delim > _ACEOF > > if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then > @@ -20691,6 +20794,9 @@ > ac_delim='%!_!# ' > for ac_last_try in false false false false false :; do > cat >conf$$subs.sed <<_ACEOF > +EXTRA_OPTIONS!$EXTRA_OPTIONS$ac_delim > +BINUTILS_INCDIR!$BINUTILS_INCDIR$ac_delim > +ENABLE_LLVMC_DYNAMIC!$ENABLE_LLVMC_DYNAMIC$ac_delim > ENABLE_LLVMC_DYNAMIC_PLUGINS!$ENABLE_LLVMC_DYNAMIC_PLUGINS$ac_delim > CXX!$CXX$ac_delim > CXXFLAGS!$CXXFLAGS$ac_delim > @@ -20746,6 +20852,7 @@ > LLVMGXXCOMMAND!$LLVMGXXCOMMAND$ac_delim > LLVMGCC!$LLVMGCC$ac_delim > LLVMGXX!$LLVMGXX$ac_delim > +LLVMCC_OPTION!$LLVMCC_OPTION$ac_delim > NO_VARIADIC_MACROS!$NO_VARIADIC_MACROS$ac_delim > NO_MISSING_FIELD_INITIALIZERS!$NO_MISSING_FIELD_INITIALIZERS$ac_delim > USE_UDIS86!$USE_UDIS86$ac_delim > @@ -20778,7 +20885,7 @@ > LTLIBOBJS!$LTLIBOBJS$ac_delim > _ACEOF > > - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 85; then > + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 89; then > break > elif $ac_last_try; then > { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From daniel at zuster.org Tue Feb 23 11:54:57 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 17:54:57 -0000 Subject: [llvm-commits] [test-suite] r96957 - /test-suite/trunk/Makefile.rules Message-ID: <20100223175457.CB0432A6C12C@llvm.org> Author: ddunbar Date: Tue Feb 23 11:54:57 2010 New Revision: 96957 URL: http://llvm.org/viewvc/llvm-project?rev=96957&view=rev Log: Don't introduce dependencies on the LLVMCC or LLVMCXX variables directly, they may be more than just a program path. Modified: test-suite/trunk/Makefile.rules Modified: test-suite/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Makefile.rules?rev=96957&r1=96956&r2=96957&view=diff ============================================================================== --- test-suite/trunk/Makefile.rules (original) +++ test-suite/trunk/Makefile.rules Tue Feb 23 11:54:57 2010 @@ -296,7 +296,9 @@ LCC := $(LLVMCC) LCXX := $(LLVMCXX) -LCC_PROGRAMS := $(LCC) $(LCXX) + +# FIXME: Fix these dependencies for Clang, and for overridden TARGET_LLVMGCC. +LCC_PROGRAMS := ifeq ($(LLVMCC_OPTION),llvm-gcc) LCC_PROGRAMS += $(LLVMCC1) $(LLVMCC1PLUS) endif From jyasskin at google.com Tue Feb 23 12:10:07 2010 From: jyasskin at google.com (Jeffrey Yasskin) Date: Tue, 23 Feb 2010 18:10:07 -0000 Subject: [llvm-commits] [llvm] r96959 - in /llvm/trunk: Makefile Makefile.config.in Makefile.rules autoconf/configure.ac configure examples/BrainF/Makefile examples/Fibonacci/Makefile examples/HowToUseJIT/Makefile test/Makefile test/Unit/lit.cfg test/Unit/lit.site.cfg.in tools/llvm-shlib/ tools/llvm-shlib/Makefile unittests/Makefile.unittest Message-ID: <20100223181007.E34312A6C12C@llvm.org> Author: jyasskin Date: Tue Feb 23 12:10:07 2010 New Revision: 96959 URL: http://llvm.org/viewvc/llvm-project?rev=96959&view=rev Log: Roll r96559 forward again, adding libLLVM-2.7svn.so to LLVM. This links 3 of the examples shared to make sure the shared library keeps working. Added: llvm/trunk/tools/llvm-shlib/ - copied from r96568, llvm/trunk/tools/llvm-shlib/ llvm/trunk/tools/llvm-shlib/Makefile - copied, changed from r96568, llvm/trunk/tools/llvm-shlib/Makefile Modified: llvm/trunk/Makefile llvm/trunk/Makefile.config.in llvm/trunk/Makefile.rules llvm/trunk/autoconf/configure.ac llvm/trunk/configure llvm/trunk/examples/BrainF/Makefile llvm/trunk/examples/Fibonacci/Makefile llvm/trunk/examples/HowToUseJIT/Makefile llvm/trunk/test/Makefile llvm/trunk/test/Unit/lit.cfg llvm/trunk/test/Unit/lit.site.cfg.in llvm/trunk/unittests/Makefile.unittest Modified: llvm/trunk/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile?rev=96959&r1=96958&r2=96959&view=diff ============================================================================== --- llvm/trunk/Makefile (original) +++ llvm/trunk/Makefile Tue Feb 23 12:10:07 2010 @@ -30,8 +30,8 @@ DIRS := lib/System lib/Support utils OPTIONAL_DIRS := else - DIRS := lib/System lib/Support utils lib/VMCore lib tools/llvm-config \ - tools runtime docs unittests + DIRS := lib/System lib/Support utils lib/VMCore lib tools/llvm-shlib \ + tools/llvm-config tools runtime docs unittests OPTIONAL_DIRS := projects bindings endif Modified: llvm/trunk/Makefile.config.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.config.in?rev=96959&r1=96958&r2=96959&view=diff ============================================================================== --- llvm/trunk/Makefile.config.in (original) +++ llvm/trunk/Makefile.config.in Tue Feb 23 12:10:07 2010 @@ -262,6 +262,11 @@ # Do we want to build with position independent code? ENABLE_PIC := @ENABLE_PIC@ +# Do we want to link the tools shared? +ifndef ENABLE_SHARED + ENABLE_SHARED := @ENABLE_SHARED@ +endif + # Use -fvisibility-inlines-hidden? ENABLE_VISIBILITY_INLINES_HIDDEN := @ENABLE_VISIBILITY_INLINES_HIDDEN@ @@ -272,6 +277,9 @@ # Enable JIT for this platform TARGET_HAS_JIT = @TARGET_HAS_JIT@ +# Environment variable to set to change the runtime shared library search path. +SHLIBPATH_VAR = @SHLIBPATH_VAR@ + # Shared library extension for host platform. SHLIBEXT = @SHLIBEXT@ Modified: llvm/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=96959&r1=96958&r2=96959&view=diff ============================================================================== --- llvm/trunk/Makefile.rules (original) +++ llvm/trunk/Makefile.rules Tue Feb 23 12:10:07 2010 @@ -623,11 +623,12 @@ ifneq ($(HOST_OS),Darwin) ifneq ($(DARWIN_MAJVERS),4) ifdef TOOLNAME -ifdef EXAMPLE_TOOL - LD.Flags += $(RPATH) -Wl,$(ExmplDir) $(RDYNAMIC) -else - LD.Flags += $(RPATH) -Wl,$(ToolDir) $(RDYNAMIC) -endif + LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib' + ifdef EXAMPLE_TOOL + LD.Flags += $(RPATH) -Wl,$(ExmplDir) $(RDYNAMIC) + else + LD.Flags += $(RPATH) -Wl,$(ToolDir) $(RDYNAMIC) + endif endif endif endif @@ -960,11 +961,16 @@ $(ToolDir)/$(strip $(TOOLNAME))$(EXEEXT): $(LLVM_CONFIG) +ifeq ($(ENABLE_SHARED), 1) +LLVMLibsOptions += -lLLVM-$(LLVMVersion) +LLVMLibsPaths += $(LibDir)/libLLVM-$(LLVMVersion)$(SHLIBEXT) +else LLVMLibsOptions += $(shell $(LLVM_CONFIG) --libs $(LINK_COMPONENTS)) LLVMLibsPaths += $(LLVM_CONFIG) \ $(shell $(LLVM_CONFIG) --libfiles $(LINK_COMPONENTS)) endif endif +endif ############################################################################### # Library Build Rules: Four ways to build a library @@ -1169,11 +1175,13 @@ # If neither BUILD_ARCHIVE or LOADABLE_MODULE are specified, default to # building an archive. #--------------------------------------------------------- +ifndef NO_BUILD_ARCHIVE ifndef BUILD_ARCHIVE ifndef LOADABLE_MODULE BUILD_ARCHIVE = 1 endif endif +endif #--------------------------------------------------------- # Archive Library Targets: Modified: llvm/trunk/autoconf/configure.ac URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=96959&r1=96958&r2=96959&view=diff ============================================================================== --- llvm/trunk/autoconf/configure.ac (original) +++ llvm/trunk/autoconf/configure.ac Tue Feb 23 12:10:07 2010 @@ -470,6 +470,18 @@ AC_DEFINE_UNQUOTED([ENABLE_PIC],$ENABLE_PIC, [Define if position independent code is enabled]) +dnl Allow linking tools against the shared library. +AC_ARG_ENABLE(shared, + AS_HELP_STRING([--enable-shared], + [Link LLVM tools shared (default is NO)]),, + enableval=default) +case "$enableval" in + yes) AC_SUBST(ENABLE_SHARED,[1]) ;; + no) AC_SUBST(ENABLE_SHARED,[0]) ;; + default) AC_SUBST(ENABLE_SHARED,[0]) ;; + *) AC_MSG_ERROR([Invalid setting for --enable-shared. Use "yes" or "no"]) ;; +esac + dnl Allow specific targets to be specified for building (or not) TARGETS_TO_BUILD="" AC_ARG_ENABLE([targets],AS_HELP_STRING([--enable-targets], @@ -1332,6 +1344,10 @@ dnl the Makefiles so we can use it there too AC_SUBST(SHLIBEXT,$libltdl_cv_shlibext) +dnl Propagate the run-time library path variable that the libltdl +dnl checks found to the Makefiles so we can use it there too +AC_SUBST(SHLIBPATH_VAR,$libltdl_cv_shlibpath_var) + # Translate the various configuration directories and other basic # information into substitutions that will end up in Makefile.config.in # that these configured values can be used by the makefiles Modified: llvm/trunk/configure URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=96959&r1=96958&r2=96959&view=diff ============================================================================== --- llvm/trunk/configure (original) +++ llvm/trunk/configure Tue Feb 23 12:10:07 2010 @@ -689,6 +689,7 @@ ENABLE_DOXYGEN ENABLE_THREADS ENABLE_PIC +ENABLE_SHARED TARGETS_TO_BUILD LLVM_ENUM_TARGETS LLVM_ENUM_ASM_PRINTERS @@ -770,6 +771,7 @@ LLVMGCCDIR LLVMGCC_LANGS SHLIBEXT +SHLIBPATH_VAR LLVM_PREFIX LLVM_BINDIR LLVM_LIBDIR @@ -1402,6 +1404,7 @@ --enable-threads Use threads if available (default is YES) --enable-pic Build LLVM with Position Independent Code (default is YES) + --enable-shared Link LLVM tools shared (default is NO) --enable-targets Build specific host targets: all or target1,target2,... Valid targets are: host, x86, x86_64, sparc, powerpc, alpha, arm, mips, spu, @@ -4864,6 +4867,25 @@ _ACEOF +# Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then + enableval=$enable_shared; +else + enableval=default +fi + +case "$enableval" in + yes) ENABLE_SHARED=1 + ;; + no) ENABLE_SHARED=0 + ;; + default) ENABLE_SHARED=0 + ;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-shared. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --enable-shared. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; } ;; +esac + TARGETS_TO_BUILD="" # Check whether --enable-targets was given. if test "${enable_targets+set}" = set; then @@ -11105,7 +11127,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <conf$$subs.sed <<_ACEOF +OPTIMIZE_OPTION!$OPTIMIZE_OPTION$ac_delim EXTRA_OPTIONS!$EXTRA_OPTIONS$ac_delim BINUTILS_INCDIR!$BINUTILS_INCDIR$ac_delim ENABLE_LLVMC_DYNAMIC!$ENABLE_LLVMC_DYNAMIC$ac_delim @@ -20865,6 +20891,7 @@ LLVMGCCDIR!$LLVMGCCDIR$ac_delim LLVMGCC_LANGS!$LLVMGCC_LANGS$ac_delim SHLIBEXT!$SHLIBEXT$ac_delim +SHLIBPATH_VAR!$SHLIBPATH_VAR$ac_delim LLVM_PREFIX!$LLVM_PREFIX$ac_delim LLVM_BINDIR!$LLVM_BINDIR$ac_delim LLVM_LIBDIR!$LLVM_LIBDIR$ac_delim @@ -20885,7 +20912,7 @@ LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 89; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 91; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 Modified: llvm/trunk/examples/BrainF/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/BrainF/Makefile?rev=96959&r1=96958&r2=96959&view=diff ============================================================================== --- llvm/trunk/examples/BrainF/Makefile (original) +++ llvm/trunk/examples/BrainF/Makefile Tue Feb 23 12:10:07 2010 @@ -9,6 +9,9 @@ LEVEL = ../.. TOOLNAME = BrainF EXAMPLE_TOOL = 1 +# To keep the shared library working, we link a few of the examples +# against it unconditionally. +ENABLE_SHARED = 1 LINK_COMPONENTS := jit bitwriter nativecodegen interpreter Modified: llvm/trunk/examples/Fibonacci/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Fibonacci/Makefile?rev=96959&r1=96958&r2=96959&view=diff ============================================================================== --- llvm/trunk/examples/Fibonacci/Makefile (original) +++ llvm/trunk/examples/Fibonacci/Makefile Tue Feb 23 12:10:07 2010 @@ -10,6 +10,9 @@ LEVEL = ../.. TOOLNAME = Fibonacci EXAMPLE_TOOL = 1 +# To keep the shared library working, we link a few of the examples +# against it unconditionally. +ENABLE_SHARED = 1 # Link in JIT support LINK_COMPONENTS := jit interpreter nativecodegen Modified: llvm/trunk/examples/HowToUseJIT/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/HowToUseJIT/Makefile?rev=96959&r1=96958&r2=96959&view=diff ============================================================================== --- llvm/trunk/examples/HowToUseJIT/Makefile (original) +++ llvm/trunk/examples/HowToUseJIT/Makefile Tue Feb 23 12:10:07 2010 @@ -9,6 +9,9 @@ LEVEL = ../.. TOOLNAME = HowToUseJIT EXAMPLE_TOOL = 1 +# To keep the shared library working, we link a few of the examples +# against it unconditionally. +ENABLE_SHARED = 1 LINK_COMPONENTS := jit interpreter nativecodegen Modified: llvm/trunk/test/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Makefile?rev=96959&r1=96958&r2=96959&view=diff ============================================================================== --- llvm/trunk/test/Makefile (original) +++ llvm/trunk/test/Makefile Tue Feb 23 12:10:07 2010 @@ -198,4 +198,6 @@ -e "s#@LLVM_TOOLS_DIR@#$(ToolDir)#g" \ -e "s#@LLVMGCCDIR@#$(LLVMGCCDIR)#g" \ -e "s#@LLVM_BUILD_MODE@#$(BuildMode)#g" \ + -e "s#@ENABLE_SHARED@#$(ENABLE_SHARED)#g" \ + -e "s#@SHLIBPATH_VAR@#$(SHLIBPATH_VAR)#g" \ $(PROJ_SRC_DIR)/Unit/lit.site.cfg.in > $@ Modified: llvm/trunk/test/Unit/lit.cfg URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Unit/lit.cfg?rev=96959&r1=96958&r2=96959&view=diff ============================================================================== --- llvm/trunk/test/Unit/lit.cfg (original) +++ llvm/trunk/test/Unit/lit.cfg Tue Feb 23 12:10:07 2010 @@ -23,7 +23,14 @@ ### -import os +# If necessary, point the dynamic loader at libLLVM.so. +if config.enable_shared: + libdir = os.path.join(config.llvm_obj_root, config.llvm_build_mode, 'lib') + shlibpath = config.environment.get(config.shlibpath_var,'') + if shlibpath: + shlibpath = ':' + shlibpath + shlibpath = libdir + shlibpath + config.environment[config.shlibpath_var] = shlibpath # Check that the object root is known. if config.test_exec_root is None: Modified: llvm/trunk/test/Unit/lit.site.cfg.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Unit/lit.site.cfg.in?rev=96959&r1=96958&r2=96959&view=diff ============================================================================== --- llvm/trunk/test/Unit/lit.site.cfg.in (original) +++ llvm/trunk/test/Unit/lit.site.cfg.in Tue Feb 23 12:10:07 2010 @@ -5,6 +5,8 @@ config.llvm_tools_dir = "@LLVM_TOOLS_DIR@" config.llvmgcc_dir = "@LLVMGCCDIR@" config.llvm_build_mode = "@LLVM_BUILD_MODE@" +config.enable_shared = @ENABLE_SHARED@ +config.shlibpath_var = "@SHLIBPATH_VAR@" # Let the main config do the real work. lit.load_config(config, "@LLVM_SOURCE_DIR@/test/Unit/lit.cfg") Copied: llvm/trunk/tools/llvm-shlib/Makefile (from r96568, llvm/trunk/tools/llvm-shlib/Makefile) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-shlib/Makefile?p2=llvm/trunk/tools/llvm-shlib/Makefile&p1=llvm/trunk/tools/llvm-shlib/Makefile&r1=96568&r2=96959&rev=96959&view=diff ============================================================================== --- llvm/trunk/tools/llvm-shlib/Makefile (original) +++ llvm/trunk/tools/llvm-shlib/Makefile Tue Feb 23 12:10:07 2010 @@ -8,7 +8,7 @@ ##===----------------------------------------------------------------------===## LEVEL = ../.. -LIBRARYNAME = LLVM$(LLVMVersion) +LIBRARYNAME = LLVM-$(LLVMVersion) NO_BUILD_ARCHIVE = 1 LINK_LIBS_IN_SHARED = 1 @@ -34,8 +34,7 @@ -Wl,-compatibility_version -Wl,1 endif # Include everything from the .a's into the shared library. - LLVMLibsOptions := $(LLVMLibsOptions) \ - -Wl,-all_load + LLVMLibsOptions := $(LLVMLibsOptions) -all_load # extra options to override libtool defaults LLVMLibsOptions := $(LLVMLibsOptions) \ -avoid-version \ @@ -55,7 +54,14 @@ # Include everything from the .a's into the shared library. LLVMLibsOptions := -Wl,--whole-archive $(LLVMLibsOptions) \ -Wl,--no-whole-archive - # Don't allow unresolved symbols, and warn if we'll need to modify - # the text segment when loading libLLVM.so. - LLVMLibsOptions += -Wl,--no-undefined,--warn-shared-textrel + # Warn if we'll need to modify the text segment when loading libLLVM.so. + LLVMLibsOptions += -Wl,--warn-shared-textrel + # Don't allow unresolved symbols. + LLVMLibsOptions += -Wl,--no-undefined + ifneq ($(ARCH), ARM) + # ARM's shared libgcc omits several of the __sync functions that are + # present in the static libgcc, so we also link in the static gcc. This + # is described at http://gcc.gnu.org/PR40133. + LLVMLibsOptions += -lgcc + endif endif Modified: llvm/trunk/unittests/Makefile.unittest URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Makefile.unittest?rev=96959&r1=96958&r2=96959&view=diff ============================================================================== --- llvm/trunk/unittests/Makefile.unittest (original) +++ llvm/trunk/unittests/Makefile.unittest Tue Feb 23 12:10:07 2010 @@ -28,6 +28,17 @@ CPP.Flags += $(NO_VARIADIC_MACROS) TESTLIBS = -lGoogleTest -lUnitTestMain +ifeq ($(ENABLE_SHARED), 1) + # Add the absolute path to the dynamic library. This is ok because + # we'll never install unittests. + LD.Flags += $(RPATH) -Wl,$(LibDir) +endif +ifeq ($(ENABLE_SHARED), 1) + # Also set {DYLD,LD}_LIBRARY_PATH because OSX ignores the rpath most + # of the time. + Run.Shared := $(SHLIBPATH_VAR)="$(LibDir)$${$(SHLIBPATH_VAR):+:}$$$(SHLIBPATH_VAR)" +endif + $(LLVMUnitTestExe): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths) $(Echo) Linking $(BuildMode) unit test $(TESTNAME) $(StripWarnMsg) $(Verb) $(Link) -o $@ $(TOOLLINKOPTS) $(ObjectsO) $(ProjLibsOptions) \ @@ -38,6 +49,6 @@ all:: $(LLVMUnitTestExe) unitcheck:: $(LLVMUnitTestExe) - $(LLVMUnitTestExe) + $(Run.Shared) $(LLVMUnitTestExe) endif From richard at xmos.com Tue Feb 23 12:13:39 2010 From: richard at xmos.com (Richard Osborne) Date: Tue, 23 Feb 2010 18:13:39 -0000 Subject: [llvm-commits] [llvm] r96960 - /llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td Message-ID: <20100223181339.0CD742A6C12C@llvm.org> Author: friedgold Date: Tue Feb 23 12:13:38 2010 New Revision: 96960 URL: http://llvm.org/viewvc/llvm-project?rev=96960&view=rev Log: Mark unconditional branches as barriers. Found using -verify-machineinstrs Modified: llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td Modified: llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td?rev=96960&r1=96959&r2=96960&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td (original) +++ llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td Tue Feb 23 12:13:38 2010 @@ -642,7 +642,7 @@ // TODO extdp, kentsp, krestsp, blat, setsr // clrsr, getsr, kalli -let isBranch = 1, isTerminator = 1 in { +let isBranch = 1, isTerminator = 1, isBarrier = 1 in { def BRBU_u6 : _FU6< (outs), (ins brtarget:$target), @@ -703,7 +703,7 @@ "ldap r11, $addr", [(set R11, (pcrelwrapper tblockaddress:$addr))]>; -let isCall=1, +let isCall=1, isBarrier = 1, // All calls clobber the link register and the non-callee-saved registers: Defs = [R0, R1, R2, R3, R11, LR] in { def BL_u10 : _FU10< @@ -776,7 +776,7 @@ // TODO edu, eeu, waitet, waitef, freer, tstart, msync, mjoin, syncr, clrtp // setdp, setcp, setv, setev, kcall // dgetreg -let isBranch=1, isIndirectBranch=1, isTerminator=1 in +let isBranch=1, isIndirectBranch=1, isTerminator=1, isBarrier = 1 in def BAU_1r : _F1R<(outs), (ins GRRegs:$addr), "bau $addr", [(brind GRRegs:$addr)]>; From enderby at apple.com Tue Feb 23 12:26:34 2010 From: enderby at apple.com (Kevin Enderby) Date: Tue, 23 Feb 2010 18:26:34 -0000 Subject: [llvm-commits] [llvm] r96963 - in /llvm/trunk: include/llvm/MC/MCAssembler.h include/llvm/MC/MCStreamer.h lib/MC/MCAsmStreamer.cpp lib/MC/MCAssembler.cpp lib/MC/MCMachOStreamer.cpp lib/MC/MCNullStreamer.cpp Message-ID: <20100223182634.96CAA2A6C12C@llvm.org> Author: enderby Date: Tue Feb 23 12:26:34 2010 New Revision: 96963 URL: http://llvm.org/viewvc/llvm-project?rev=96963&view=rev Log: This is the first patch to put the needed bits in place to eventually allow code to be aligned with optimal nops. This patch does not change any functionality and when the compiler is changed to use EmitCodeAlignment() it should also not change the resulting output. Once the compiler change is made and everything looks good the next patch with the table of optimal X86 nops will be added to WriteNopData() changing the output. There are many FIXMEs in this patch which will be removed when we have better target hooks (coming soon I hear). Modified: llvm/trunk/include/llvm/MC/MCAssembler.h llvm/trunk/include/llvm/MC/MCStreamer.h llvm/trunk/lib/MC/MCAsmStreamer.cpp llvm/trunk/lib/MC/MCAssembler.cpp llvm/trunk/lib/MC/MCMachOStreamer.cpp llvm/trunk/lib/MC/MCNullStreamer.cpp Modified: llvm/trunk/include/llvm/MC/MCAssembler.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCAssembler.h?rev=96963&r1=96962&r2=96963&view=diff ============================================================================== --- llvm/trunk/include/llvm/MC/MCAssembler.h (original) +++ llvm/trunk/include/llvm/MC/MCAssembler.h Tue Feb 23 12:26:34 2010 @@ -195,12 +195,16 @@ /// cannot be satisfied in this width then this fragment is ignored. unsigned MaxBytesToEmit; + /// EmitNops - true when aligning code and optimal nops to be used for filling + bool EmitNops; + public: MCAlignFragment(unsigned _Alignment, int64_t _Value, unsigned _ValueSize, - unsigned _MaxBytesToEmit, MCSectionData *SD = 0) + unsigned _MaxBytesToEmit, bool _EmitNops, + MCSectionData *SD = 0) : MCFragment(FT_Align, SD), Alignment(_Alignment), Value(_Value),ValueSize(_ValueSize), - MaxBytesToEmit(_MaxBytesToEmit) {} + MaxBytesToEmit(_MaxBytesToEmit), EmitNops(_EmitNops) {} /// @name Accessors /// @{ @@ -217,6 +221,8 @@ unsigned getMaxBytesToEmit() const { return MaxBytesToEmit; } + unsigned getEmitNops() const { return EmitNops; } + /// @} static bool classof(const MCFragment *F) { Modified: llvm/trunk/include/llvm/MC/MCStreamer.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCStreamer.h?rev=96963&r1=96962&r2=96963&view=diff ============================================================================== --- llvm/trunk/include/llvm/MC/MCStreamer.h (original) +++ llvm/trunk/include/llvm/MC/MCStreamer.h Tue Feb 23 12:26:34 2010 @@ -232,6 +232,20 @@ unsigned ValueSize = 1, unsigned MaxBytesToEmit = 0) = 0; + /// EmitCodeAlignment - Emit nops until the byte alignment @p ByteAlignment + /// is reached. + /// + /// This used to align code where the alignment bytes may be executed. This + /// can emit different bytes for different sizes to optimize execution. + /// + /// @param ByteAlignment - The alignment to reach. This must be a power of + /// two on some targets. + /// @param MaxBytesToEmit - The maximum numbers of bytes to emit, or 0. If + /// the alignment cannot be reached in this many bytes, no bytes are + /// emitted. + virtual void EmitCodeAlignment(unsigned ByteAlignment, + unsigned MaxBytesToEmit = 0) = 0; + /// EmitValueToOffset - Emit some number of copies of @p Value until the /// byte offset @p Offset is reached. /// Modified: llvm/trunk/lib/MC/MCAsmStreamer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmStreamer.cpp?rev=96963&r1=96962&r2=96963&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCAsmStreamer.cpp (original) +++ llvm/trunk/lib/MC/MCAsmStreamer.cpp Tue Feb 23 12:26:34 2010 @@ -134,6 +134,9 @@ unsigned ValueSize = 1, unsigned MaxBytesToEmit = 0); + virtual void EmitCodeAlignment(unsigned ByteAlignment, + unsigned MaxBytesToEmit = 0); + virtual void EmitValueToOffset(const MCExpr *Offset, unsigned char Value = 0); @@ -513,6 +516,12 @@ EmitEOL(); } +void MCAsmStreamer::EmitCodeAlignment(unsigned ByteAlignment, + unsigned MaxBytesToEmit) { + // FIXME: a hack for now to only work for x86 using the 0x90 nop opcode. + EmitValueToAlignment(ByteAlignment, 0x90, 1, MaxBytesToEmit); +} + void MCAsmStreamer::EmitValueToOffset(const MCExpr *Offset, unsigned char Value) { // FIXME: Verify that Offset is associated with the current section. Modified: llvm/trunk/lib/MC/MCAssembler.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAssembler.cpp?rev=96963&r1=96962&r2=96963&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCAssembler.cpp (original) +++ llvm/trunk/lib/MC/MCAssembler.cpp Tue Feb 23 12:26:34 2010 @@ -42,6 +42,8 @@ static void WriteFileData(raw_ostream &OS, const MCSectionData &SD, MachObjectWriter &MOW); +static uint64_t WriteNopData(uint64_t Count, MachObjectWriter &MOW); + /// isVirtualSection - Check if this is a section which does not actually exist /// in the object file. static bool isVirtualSection(const MCSection &Section) { @@ -1058,6 +1060,19 @@ SD.setFileSize(Address - SD.getAddress()); } +/// WriteNopData - Write optimal nops to the output file for the \arg Count +/// bytes. This returns the number of bytes written. It may return 0 if +/// the \arg Count is more than the maximum optimal nops. +/// +/// FIXME this is X86 32-bit specific and should move to a better place. +static uint64_t WriteNopData(uint64_t Count, MachObjectWriter &MOW) { + // FIXME for now just use the 0x90 nop opcode byte. + for (uint64_t i = 0; i < Count; i++) + MOW.Write8 (uint8_t(0x90)); + + return Count; +} + /// WriteFileData - Write the \arg F data to the output file. static void WriteFileData(raw_ostream &OS, const MCFragment &F, MachObjectWriter &MOW) { @@ -1081,6 +1096,14 @@ "' is not a divisor of padding size '" + Twine(AF.getFileSize()) + "'"); + // See if we are aligning with nops, and if so do that first to try to fill + // the Count bytes. Then if that did not fill any bytes or there are any + // bytes left to fill use the the Value and ValueSize to fill the rest. + if (AF.getEmitNops()) { + uint64_t NopByteCount = WriteNopData(Count, MOW); + Count -= NopByteCount; + } + for (uint64_t i = 0; i != Count; ++i) { switch (AF.getValueSize()) { default: Modified: llvm/trunk/lib/MC/MCMachOStreamer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCMachOStreamer.cpp?rev=96963&r1=96962&r2=96963&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCMachOStreamer.cpp (original) +++ llvm/trunk/lib/MC/MCMachOStreamer.cpp Tue Feb 23 12:26:34 2010 @@ -137,6 +137,8 @@ virtual void EmitValueToAlignment(unsigned ByteAlignment, int64_t Value = 0, unsigned ValueSize = 1, unsigned MaxBytesToEmit = 0); + virtual void EmitCodeAlignment(unsigned ByteAlignment, + unsigned MaxBytesToEmit = 0); virtual void EmitValueToOffset(const MCExpr *Offset, unsigned char Value = 0); @@ -357,7 +359,20 @@ if (MaxBytesToEmit == 0) MaxBytesToEmit = ByteAlignment; new MCAlignFragment(ByteAlignment, Value, ValueSize, MaxBytesToEmit, - CurSectionData); + false /* EmitNops */, CurSectionData); + + // Update the maximum alignment on the current section if necessary. + if (ByteAlignment > CurSectionData->getAlignment()) + CurSectionData->setAlignment(ByteAlignment); +} + +void MCMachOStreamer::EmitCodeAlignment(unsigned ByteAlignment, + unsigned MaxBytesToEmit) { + if (MaxBytesToEmit == 0) + MaxBytesToEmit = ByteAlignment; + // FIXME the 0x90 is the default x86 1 byte nop opcode. + new MCAlignFragment(ByteAlignment, 0x90, 1, MaxBytesToEmit, + true /* EmitNops */, CurSectionData); // Update the maximum alignment on the current section if necessary. if (ByteAlignment > CurSectionData->getAlignment()) Modified: llvm/trunk/lib/MC/MCNullStreamer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCNullStreamer.cpp?rev=96963&r1=96962&r2=96963&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCNullStreamer.cpp (original) +++ llvm/trunk/lib/MC/MCNullStreamer.cpp Tue Feb 23 12:26:34 2010 @@ -55,6 +55,9 @@ unsigned ValueSize = 1, unsigned MaxBytesToEmit = 0) {} + virtual void EmitCodeAlignment(unsigned ByteAlignment, + unsigned MaxBytesToEmit = 0) {} + virtual void EmitValueToOffset(const MCExpr *Offset, unsigned char Value = 0) {} From cdavis at mymail.mines.edu Tue Feb 23 12:28:50 2010 From: cdavis at mymail.mines.edu (Charles Davis) Date: Tue, 23 Feb 2010 11:28:50 -0700 Subject: [llvm-commits] [PATCH] Work around an Apple linker bug In-Reply-To: References: <4B8409C7.6090005@mymail.mines.edu> Message-ID: <4B841E62.1020209@mymail.mines.edu> Eli Friedman wrote: > How about just never putting symbols with external linkage into a > string section? That works too. New patch attached. Chip -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rdar-7672401-workaround.patch Url: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20100223/2468eb28/attachment.pl From richard at xmos.com Tue Feb 23 12:29:49 2010 From: richard at xmos.com (Richard Osborne) Date: Tue, 23 Feb 2010 18:29:49 -0000 Subject: [llvm-commits] [llvm] r96964 - /llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td Message-ID: <20100223182949.A65A52A6C12C@llvm.org> Author: friedgold Date: Tue Feb 23 12:29:49 2010 New Revision: 96964 URL: http://llvm.org/viewvc/llvm-project?rev=96964&view=rev Log: ECALLF, ECALLT shouldn't be marked as barriers. Modified: llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td Modified: llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td?rev=96964&r1=96963&r2=96964&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td (original) +++ llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td Tue Feb 23 12:29:49 2010 @@ -796,12 +796,12 @@ "set sp, $src", []>; -let isBarrier = 1, hasCtrlDep = 1 in +let hasCtrlDep = 1 in def ECALLT_1r : _F1R<(outs), (ins GRRegs:$src), "ecallt $src", []>; -let isBarrier = 1, hasCtrlDep = 1 in +let hasCtrlDep = 1 in def ECALLF_1r : _F1R<(outs), (ins GRRegs:$src), "ecallf $src", []>; From clattner at apple.com Tue Feb 23 12:37:44 2010 From: clattner at apple.com (Chris Lattner) Date: Tue, 23 Feb 2010 10:37:44 -0800 Subject: [llvm-commits] [llvm] r96601 - /llvm/trunk/lib/Target/X86/X86FastISel.cpp In-Reply-To: <201002181851.o1IIpF28008661@zion.cs.uiuc.edu> References: <201002181851.o1IIpF28008661@zion.cs.uiuc.edu> Message-ID: <3907F1A1-8BA4-4C75-B926-7F519AC6F032@apple.com> On Feb 18, 2010, at 10:51 AM, Dale Johannesen wrote: > Author: johannes > Date: Thu Feb 18 12:51:15 2010 > New Revision: 96601 > > URL: http://llvm.org/viewvc/llvm-project?rev=96601&view=rev > Log: > Generate DBG_VALUE from dbg.value intrinsics. These currently > comes out as comments but will eventually generate DWARF. > ============================================================================== > --- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original) > +++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Thu Feb 18 12:51:15 2010 > @@ -1161,10 +1161,41 @@ > if (!X86SelectAddress(DI->getAddress(), AM)) > return false; > const TargetInstrDesc &II = TII.get(TargetOpcode::DBG_VALUE); > + // FIXME may need to add RegState::Debug to any registers produced, > + // although ESP/EBP should be the only ones at the moment. > addFullAddress(BuildMI(MBB, DL, II), AM).addImm(0). > addMetadata(DI->getVariable()); > return true; > } > + case Intrinsic::dbg_value: { > + // FIXME this should eventually be moved to FastISel, when all targets > + // are able to cope with DBG_VALUE. There is nothing target dependent here. Dale, X86 is the only target that uses fastisel, you might as well move this up right now. -Chris > + DbgValueInst *DI = cast(&I); > + const TargetInstrDesc &II = TII.get(TargetOpcode::DBG_VALUE); > + Value *V = DI->getValue(); > + if (!V) { > + // Currently the optimizer can produce this; insert an undef to > + // help debugging. Probably the optimizer should not do this. > + BuildMI(MBB, DL, II).addReg(0U).addImm(DI->getOffset()). > + addMetadata(DI->getVariable()); > + } else if (ConstantInt *CI = dyn_cast(V)) { > + BuildMI(MBB, DL, II).addImm(CI->getZExtValue()).addImm(DI->getOffset()). > + addMetadata(DI->getVariable()); > + } else if (ConstantFP *CF = dyn_cast(V)) { > + BuildMI(MBB, DL, II).addFPImm(CF).addImm(DI->getOffset()). > + addMetadata(DI->getVariable()); > + } else if (unsigned Reg = lookUpRegForValue(V)) { > + BuildMI(MBB, DL, II).addReg(Reg, RegState::Debug).addImm(DI->getOffset()). > + addMetadata(DI->getVariable()); > + } else { > + // We can't yet handle anything else here because it would require > + // generating code, thus altering codegen because of debug info. > + // Insert an undef so we can see what we dropped. > + BuildMI(MBB, DL, II).addReg(0U).addImm(DI->getOffset()). > + addMetadata(DI->getVariable()); > + } > + return true; > + } > case Intrinsic::trap: { > BuildMI(MBB, DL, TII.get(X86::TRAP)); > return true; > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From jyasskin at google.com Tue Feb 23 12:40:48 2010 From: jyasskin at google.com (Jeffrey Yasskin) Date: Tue, 23 Feb 2010 18:40:48 -0000 Subject: [llvm-commits] [llvm] r96965 - /llvm/trunk/tools/llvm-shlib/Makefile Message-ID: <20100223184048.691D02A6C12C@llvm.org> Author: jyasskin Date: Tue Feb 23 12:40:48 2010 New Revision: 96965 URL: http://llvm.org/viewvc/llvm-project?rev=96965&view=rev Log: Oops. Pass -lgcc _only_ on ARM, not on everything except ARM. Modified: llvm/trunk/tools/llvm-shlib/Makefile Modified: llvm/trunk/tools/llvm-shlib/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-shlib/Makefile?rev=96965&r1=96964&r2=96965&view=diff ============================================================================== --- llvm/trunk/tools/llvm-shlib/Makefile (original) +++ llvm/trunk/tools/llvm-shlib/Makefile Tue Feb 23 12:40:48 2010 @@ -58,7 +58,7 @@ LLVMLibsOptions += -Wl,--warn-shared-textrel # Don't allow unresolved symbols. LLVMLibsOptions += -Wl,--no-undefined - ifneq ($(ARCH), ARM) + ifeq ($(ARCH), ARM) # ARM's shared libgcc omits several of the __sync functions that are # present in the static libgcc, so we also link in the static gcc. This # is described at http://gcc.gnu.org/PR40133. From sabre at nondot.org Tue Feb 23 12:44:31 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 23 Feb 2010 18:44:31 -0000 Subject: [llvm-commits] [llvm] r96966 - /llvm/trunk/lib/MC/MCAsmStreamer.cpp Message-ID: <20100223184431.83FF32A6C12C@llvm.org> Author: lattner Date: Tue Feb 23 12:44:31 2010 New Revision: 96966 URL: http://llvm.org/viewvc/llvm-project?rev=96966&view=rev Log: genericize MCAsmStreamer::EmitCodeAlignment to support other targets so that it doesn't break them when the code generator starts using it. Modified: llvm/trunk/lib/MC/MCAsmStreamer.cpp Modified: llvm/trunk/lib/MC/MCAsmStreamer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmStreamer.cpp?rev=96966&r1=96965&r2=96966&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCAsmStreamer.cpp (original) +++ llvm/trunk/lib/MC/MCAsmStreamer.cpp Tue Feb 23 12:44:31 2010 @@ -518,8 +518,9 @@ void MCAsmStreamer::EmitCodeAlignment(unsigned ByteAlignment, unsigned MaxBytesToEmit) { - // FIXME: a hack for now to only work for x86 using the 0x90 nop opcode. - EmitValueToAlignment(ByteAlignment, 0x90, 1, MaxBytesToEmit); + // Emit with a text fill value. + EmitValueToAlignment(ByteAlignment, MAI.getTextAlignFillValue(), + 1, MaxBytesToEmit); } void MCAsmStreamer::EmitValueToOffset(const MCExpr *Offset, From sabre at nondot.org Tue Feb 23 12:46:22 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 23 Feb 2010 18:46:22 -0000 Subject: [llvm-commits] [llvm] r96967 - /llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Message-ID: <20100223184622.4E6D12A6C12C@llvm.org> Author: lattner Date: Tue Feb 23 12:46:22 2010 New Revision: 96967 URL: http://llvm.org/viewvc/llvm-project?rev=96967&view=rev Log: use OutStreamer.EmitCodeAlignment for alignment in the text segment. Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=96967&r1=96966&r2=96967&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Tue Feb 23 12:46:22 2010 @@ -917,11 +917,10 @@ if (NumBits == 0) return; // No need to emit alignment. - unsigned FillValue = 0; if (getCurrentSection()->getKind().isText()) - FillValue = MAI->getTextAlignFillValue(); - - OutStreamer.EmitValueToAlignment(1 << NumBits, FillValue, 1, 0); + OutStreamer.EmitCodeAlignment(1 << NumBits); + else + OutStreamer.EmitValueToAlignment(1 << NumBits, 0, 1, 0); } /// LowerConstant - Lower the specified LLVM Constant to an MCExpr. From peckw at wesleypeck.com Tue Feb 23 13:15:24 2010 From: peckw at wesleypeck.com (Wesley Peck) Date: Tue, 23 Feb 2010 19:15:24 -0000 Subject: [llvm-commits] [llvm] r96969 - in /llvm/trunk: ./ autoconf/ include/llvm/ADT/ lib/Support/ lib/Target/MBlaze/ lib/Target/MBlaze/AsmPrinter/ lib/Target/MBlaze/TargetInfo/ test/CodeGen/MBlaze/ Message-ID: <20100223191525.1C50E2A6C12C@llvm.org> Author: peckw Date: Tue Feb 23 13:15:24 2010 New Revision: 96969 URL: http://llvm.org/viewvc/llvm-project?rev=96969&view=rev Log: Adding the MicroBlaze backend. The MicroBlaze is a highly configurable 32-bit soft-microprocessor for use on Xilinx FPGAs. For more information see: http://www.xilinx.com/tools/microblaze.htm http://en.wikipedia.org/wiki/MicroBlaze The current LLVM MicroBlaze backend generates assembly which can be compiled using the an appropriate binutils assembler. Added: llvm/trunk/lib/Target/MBlaze/ llvm/trunk/lib/Target/MBlaze/AsmPrinter/ llvm/trunk/lib/Target/MBlaze/AsmPrinter/CMakeLists.txt llvm/trunk/lib/Target/MBlaze/AsmPrinter/MBlazeAsmPrinter.cpp llvm/trunk/lib/Target/MBlaze/AsmPrinter/Makefile llvm/trunk/lib/Target/MBlaze/CMakeLists.txt llvm/trunk/lib/Target/MBlaze/MBlaze.h llvm/trunk/lib/Target/MBlaze/MBlaze.td llvm/trunk/lib/Target/MBlaze/MBlazeCallingConv.td llvm/trunk/lib/Target/MBlaze/MBlazeDelaySlotFiller.cpp llvm/trunk/lib/Target/MBlaze/MBlazeISelDAGToDAG.cpp llvm/trunk/lib/Target/MBlaze/MBlazeISelLowering.cpp llvm/trunk/lib/Target/MBlaze/MBlazeISelLowering.h llvm/trunk/lib/Target/MBlaze/MBlazeInstrFPU.td llvm/trunk/lib/Target/MBlaze/MBlazeInstrFSL.td llvm/trunk/lib/Target/MBlaze/MBlazeInstrFormats.td llvm/trunk/lib/Target/MBlaze/MBlazeInstrInfo.cpp llvm/trunk/lib/Target/MBlaze/MBlazeInstrInfo.h llvm/trunk/lib/Target/MBlaze/MBlazeInstrInfo.td llvm/trunk/lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp llvm/trunk/lib/Target/MBlaze/MBlazeIntrinsicInfo.h llvm/trunk/lib/Target/MBlaze/MBlazeIntrinsics.td llvm/trunk/lib/Target/MBlaze/MBlazeMCAsmInfo.cpp llvm/trunk/lib/Target/MBlaze/MBlazeMCAsmInfo.h llvm/trunk/lib/Target/MBlaze/MBlazeMachineFunction.h llvm/trunk/lib/Target/MBlaze/MBlazeRegisterInfo.cpp llvm/trunk/lib/Target/MBlaze/MBlazeRegisterInfo.h llvm/trunk/lib/Target/MBlaze/MBlazeRegisterInfo.td llvm/trunk/lib/Target/MBlaze/MBlazeSchedule.td llvm/trunk/lib/Target/MBlaze/MBlazeSubtarget.cpp llvm/trunk/lib/Target/MBlaze/MBlazeSubtarget.h llvm/trunk/lib/Target/MBlaze/MBlazeTargetMachine.cpp llvm/trunk/lib/Target/MBlaze/MBlazeTargetMachine.h llvm/trunk/lib/Target/MBlaze/MBlazeTargetObjectFile.cpp llvm/trunk/lib/Target/MBlaze/MBlazeTargetObjectFile.h llvm/trunk/lib/Target/MBlaze/Makefile llvm/trunk/lib/Target/MBlaze/TargetInfo/ llvm/trunk/lib/Target/MBlaze/TargetInfo/CMakeLists.txt llvm/trunk/lib/Target/MBlaze/TargetInfo/MBlazeTargetInfo.cpp llvm/trunk/lib/Target/MBlaze/TargetInfo/Makefile llvm/trunk/test/CodeGen/MBlaze/ llvm/trunk/test/CodeGen/MBlaze/brind.ll llvm/trunk/test/CodeGen/MBlaze/callind.ll llvm/trunk/test/CodeGen/MBlaze/cc.ll llvm/trunk/test/CodeGen/MBlaze/dg.exp llvm/trunk/test/CodeGen/MBlaze/div.ll llvm/trunk/test/CodeGen/MBlaze/fpu.ll llvm/trunk/test/CodeGen/MBlaze/fsl.ll llvm/trunk/test/CodeGen/MBlaze/imm.ll llvm/trunk/test/CodeGen/MBlaze/jumptable.ll llvm/trunk/test/CodeGen/MBlaze/loop.ll llvm/trunk/test/CodeGen/MBlaze/mul.ll llvm/trunk/test/CodeGen/MBlaze/mul64.ll llvm/trunk/test/CodeGen/MBlaze/select.ll llvm/trunk/test/CodeGen/MBlaze/shift.ll Modified: llvm/trunk/CREDITS.TXT llvm/trunk/autoconf/configure.ac llvm/trunk/configure llvm/trunk/include/llvm/ADT/Triple.h llvm/trunk/lib/Support/Triple.cpp Modified: llvm/trunk/CREDITS.TXT URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CREDITS.TXT?rev=96969&r1=96968&r2=96969&view=diff ============================================================================== --- llvm/trunk/CREDITS.TXT (original) +++ llvm/trunk/CREDITS.TXT Tue Feb 23 13:15:24 2010 @@ -335,3 +335,8 @@ N: Bob Wilson E: bob.wilson at acm.org D: Advanced SIMD (NEON) support in the ARM backend + +N: Wesley Peck +E: peckw at wesleypeck.com +W: http://wesleypeck.com/ +D: MicroBlaze backend Modified: llvm/trunk/autoconf/configure.ac URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=96969&r1=96968&r2=96969&view=diff ============================================================================== --- llvm/trunk/autoconf/configure.ac (original) +++ llvm/trunk/autoconf/configure.ac Tue Feb 23 13:15:24 2010 @@ -291,6 +291,7 @@ msp430-*) llvm_cv_target_arch="MSP430" ;; s390x-*) llvm_cv_target_arch="SystemZ" ;; bfin-*) llvm_cv_target_arch="Blackfin" ;; + mblaze-*) llvm_cv_target_arch="MBlaze" ;; *) llvm_cv_target_arch="Unknown" ;; esac]) @@ -427,6 +428,7 @@ MSP430) AC_SUBST(TARGET_HAS_JIT,0) ;; SystemZ) AC_SUBST(TARGET_HAS_JIT,0) ;; Blackfin) AC_SUBST(TARGET_HAS_JIT,0) ;; + MBlaze) AC_SUBST(TARGET_HAS_JIT,0) ;; *) AC_SUBST(TARGET_HAS_JIT,0) ;; esac fi @@ -493,7 +495,7 @@ enableval=host fi case "$enableval" in - all) TARGETS_TO_BUILD="X86 Sparc PowerPC Alpha ARM Mips CellSPU PIC16 XCore MSP430 SystemZ Blackfin CBackend MSIL CppBackend" ;; + all) TARGETS_TO_BUILD="X86 Sparc PowerPC Alpha ARM Mips CellSPU PIC16 XCore MSP430 SystemZ Blackfin CBackend MSIL CppBackend MBlaze" ;; *)for a_target in `echo $enableval|sed -e 's/,/ /g' ` ; do case "$a_target" in x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;; @@ -512,6 +514,7 @@ cbe) TARGETS_TO_BUILD="CBackend $TARGETS_TO_BUILD" ;; msil) TARGETS_TO_BUILD="MSIL $TARGETS_TO_BUILD" ;; cpp) TARGETS_TO_BUILD="CppBackend $TARGETS_TO_BUILD" ;; + mblaze) TARGETS_TO_BUILD="MBlaze $TARGETS_TO_BUILD" ;; host) case "$llvm_cv_target_arch" in x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;; x86_64) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;; @@ -520,6 +523,7 @@ Alpha) TARGETS_TO_BUILD="Alpha $TARGETS_TO_BUILD" ;; ARM) TARGETS_TO_BUILD="ARM $TARGETS_TO_BUILD" ;; Mips) TARGETS_TO_BUILD="Mips $TARGETS_TO_BUILD" ;; + MBlaze) TARGETS_TO_BUILD="MBlaze $TARGETS_TO_BUILD" ;; CellSPU|SPU) TARGETS_TO_BUILD="CellSPU $TARGETS_TO_BUILD" ;; PIC16) TARGETS_TO_BUILD="PIC16 $TARGETS_TO_BUILD" ;; XCore) TARGETS_TO_BUILD="XCore $TARGETS_TO_BUILD" ;; Modified: llvm/trunk/configure URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=96969&r1=96968&r2=96969&view=diff ============================================================================== --- llvm/trunk/configure (original) +++ llvm/trunk/configure Tue Feb 23 13:15:24 2010 @@ -2330,6 +2330,7 @@ msp430-*) llvm_cv_target_arch="MSP430" ;; s390x-*) llvm_cv_target_arch="SystemZ" ;; bfin-*) llvm_cv_target_arch="Blackfin" ;; + microblaze-*) llvm_cv_target_arch="MBlaze" ;; *) llvm_cv_target_arch="Unknown" ;; esac fi @@ -4795,6 +4796,8 @@ ;; Blackfin) TARGET_HAS_JIT=0 ;; + MBlaze) TARGET_HAS_JIT=0 + ;; *) TARGET_HAS_JIT=0 ;; esac @@ -4898,7 +4901,7 @@ enableval=host fi case "$enableval" in - all) TARGETS_TO_BUILD="X86 Sparc PowerPC Alpha ARM Mips CellSPU PIC16 XCore MSP430 SystemZ Blackfin CBackend MSIL CppBackend" ;; + all) TARGETS_TO_BUILD="X86 Sparc PowerPC Alpha ARM Mips CellSPU PIC16 XCore MSP430 SystemZ Blackfin CBackend MSIL CppBackend MBlaze" ;; *)for a_target in `echo $enableval|sed -e 's/,/ /g' ` ; do case "$a_target" in x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;; @@ -4917,6 +4920,7 @@ cbe) TARGETS_TO_BUILD="CBackend $TARGETS_TO_BUILD" ;; msil) TARGETS_TO_BUILD="MSIL $TARGETS_TO_BUILD" ;; cpp) TARGETS_TO_BUILD="CppBackend $TARGETS_TO_BUILD" ;; + mblaze) TARGETS_TO_BUILD="MBlaze $TARGETS_TO_BUILD" ;; host) case "$llvm_cv_target_arch" in x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;; x86_64) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;; @@ -4925,6 +4929,7 @@ Alpha) TARGETS_TO_BUILD="Alpha $TARGETS_TO_BUILD" ;; ARM) TARGETS_TO_BUILD="ARM $TARGETS_TO_BUILD" ;; Mips) TARGETS_TO_BUILD="Mips $TARGETS_TO_BUILD" ;; + MBlaze) TARGETS_TO_BUILD="MBlaze $TARGETS_TO_BUILD" ;; CellSPU|SPU) TARGETS_TO_BUILD="CellSPU $TARGETS_TO_BUILD" ;; PIC16) TARGETS_TO_BUILD="PIC16 $TARGETS_TO_BUILD" ;; XCore) TARGETS_TO_BUILD="XCore $TARGETS_TO_BUILD" ;; Modified: llvm/trunk/include/llvm/ADT/Triple.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/Triple.h?rev=96969&r1=96968&r2=96969&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/Triple.h (original) +++ llvm/trunk/include/llvm/ADT/Triple.h Tue Feb 23 13:15:24 2010 @@ -73,6 +73,7 @@ x86, // X86: i[3-9]86 x86_64, // X86-64: amd64, x86_64 xcore, // XCore: xcore + mblaze, // MBlaze: mblaze InvalidArch }; Modified: llvm/trunk/lib/Support/Triple.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Triple.cpp?rev=96969&r1=96968&r2=96969&view=diff ============================================================================== --- llvm/trunk/lib/Support/Triple.cpp (original) +++ llvm/trunk/lib/Support/Triple.cpp Tue Feb 23 13:15:24 2010 @@ -40,6 +40,7 @@ case x86: return "i386"; case x86_64: return "x86_64"; case xcore: return "xcore"; + case mblaze: return "mblaze"; } return ""; @@ -62,6 +63,8 @@ case ppc64: case ppc: return "ppc"; + case mblaze: return "mblaze"; + case sparcv9: case sparc: return "sparc"; @@ -127,6 +130,8 @@ return ppc64; if (Name == "ppc") return ppc; + if (Name == "mblaze") + return mblaze; if (Name == "sparc") return sparc; if (Name == "sparcv9") @@ -198,6 +203,8 @@ return "ppc"; if (Str == "powerpc64") return "ppc64"; + if (Str == "mblaze" || Str == "microblaze") + return "mblaze"; if (Str == "arm") return "arm"; if (Str == "armv4t" || Str == "thumbv4t") @@ -234,6 +241,8 @@ Arch = ppc; else if ((ArchName == "powerpc64") || (ArchName == "ppu")) Arch = ppc64; + else if (ArchName == "mblaze") + Arch = mblaze; else if (ArchName == "arm" || ArchName.startswith("armv") || ArchName == "xscale") Added: llvm/trunk/lib/Target/MBlaze/AsmPrinter/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/AsmPrinter/CMakeLists.txt?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/AsmPrinter/CMakeLists.txt (added) +++ llvm/trunk/lib/Target/MBlaze/AsmPrinter/CMakeLists.txt Tue Feb 23 13:15:24 2010 @@ -0,0 +1,9 @@ +include_directories( + ${CMAKE_CURRENT_BINARY_DIR}/.. + ${CMAKE_CURRENT_SOURCE_DIR}/.. + ) + +add_llvm_library(LLVMMBlazeAsmPrinter + MBlazeAsmPrinter.cpp + ) +add_dependencies(LLVMMBlazeAsmPrinter MBlazeCodeGenTable_gen) \ No newline at end of file Added: llvm/trunk/lib/Target/MBlaze/AsmPrinter/MBlazeAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/AsmPrinter/MBlazeAsmPrinter.cpp?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/AsmPrinter/MBlazeAsmPrinter.cpp (added) +++ llvm/trunk/lib/Target/MBlaze/AsmPrinter/MBlazeAsmPrinter.cpp Tue Feb 23 13:15:24 2010 @@ -0,0 +1,302 @@ +//===-- MBlazeAsmPrinter.cpp - MBlaze LLVM assembly writer ----------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file contains a printer that converts from our internal representation +// of machine-dependent LLVM code to GAS-format MBlaze assembly language. +// +//===----------------------------------------------------------------------===// + +#define DEBUG_TYPE "mblaze-asm-printer" + +#include "MBlaze.h" +#include "MBlazeSubtarget.h" +#include "MBlazeInstrInfo.h" +#include "MBlazeTargetMachine.h" +#include "MBlazeMachineFunction.h" +#include "llvm/Constants.h" +#include "llvm/DerivedTypes.h" +#include "llvm/Module.h" +#include "llvm/CodeGen/AsmPrinter.h" +#include "llvm/CodeGen/DwarfWriter.h" +#include "llvm/CodeGen/MachineFunctionPass.h" +#include "llvm/CodeGen/MachineConstantPool.h" +#include "llvm/CodeGen/MachineFrameInfo.h" +#include "llvm/CodeGen/MachineInstr.h" +#include "llvm/MC/MCStreamer.h" +#include "llvm/MC/MCAsmInfo.h" +#include "llvm/MC/MCSymbol.h" +#include "llvm/Target/TargetData.h" +#include "llvm/Target/TargetLoweringObjectFile.h" +#include "llvm/Target/TargetMachine.h" +#include "llvm/Target/TargetOptions.h" +#include "llvm/Target/TargetRegistry.h" +#include "llvm/Support/ErrorHandling.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/ADT/StringExtras.h" +#include "llvm/Support/Debug.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/FormattedStream.h" +#include "llvm/Support/MathExtras.h" +#include + +using namespace llvm; + +namespace { + class MBlazeAsmPrinter : public AsmPrinter { + const MBlazeSubtarget *Subtarget; + public: + explicit MBlazeAsmPrinter(formatted_raw_ostream &O, TargetMachine &TM, + MCContext &Ctx, MCStreamer &Streamer, + const MCAsmInfo *T ) + : AsmPrinter(O, TM, Ctx, Streamer, T) { + Subtarget = &TM.getSubtarget(); + } + + virtual const char *getPassName() const { + return "MBlaze Assembly Printer"; + } + + bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, + unsigned AsmVariant, const char *ExtraCode); + void printOperand(const MachineInstr *MI, int opNum); + void printUnsignedImm(const MachineInstr *MI, int opNum); + void printFSLImm(const MachineInstr *MI, int opNum); + void printMemOperand(const MachineInstr *MI, int opNum, + const char *Modifier = 0); + void printFCCOperand(const MachineInstr *MI, int opNum, + const char *Modifier = 0); + void printSavedRegsBitmask(); + void printHex32(unsigned int Value); + + const char *emitCurrentABIString(); + void emitFrameDirective(); + + void printInstruction(const MachineInstr *MI); // autogenerated. + void EmitInstruction(const MachineInstr *MI) { + printInstruction(MI); + O << '\n'; + } + virtual void EmitFunctionBodyStart(); + virtual void EmitFunctionBodyEnd(); + static const char *getRegisterName(unsigned RegNo); + + virtual void EmitFunctionEntryLabel(); + void EmitStartOfAsmFile(Module &M); + }; +} // end of anonymous namespace + +#include "MBlazeGenAsmWriter.inc" + +//===----------------------------------------------------------------------===// +// +// MBlaze Asm Directives +// +// -- Frame directive "frame Stackpointer, Stacksize, RARegister" +// Describe the stack frame. +// +// -- Mask directives "mask bitmask, offset" +// Tells the assembler which registers are saved and where. +// bitmask - contain a little endian bitset indicating which registers are +// saved on function prologue (e.g. with a 0x80000000 mask, the +// assembler knows the register 31 (RA) is saved at prologue. +// offset - the position before stack pointer subtraction indicating where +// the first saved register on prologue is located. (e.g. with a +// +// Consider the following function prologue: +// +// .frame R19,48,R15 +// .mask 0xc0000000,-8 +// addiu R1, R1, -48 +// sw R15, 40(R1) +// sw R19, 36(R1) +// +// With a 0xc0000000 mask, the assembler knows the register 15 (R15) and +// 19 (R19) are saved at prologue. As the save order on prologue is from +// left to right, R15 is saved first. A -8 offset means that after the +// stack pointer subtration, the first register in the mask (R15) will be +// saved at address 48-8=40. +// +//===----------------------------------------------------------------------===// + +//===----------------------------------------------------------------------===// +// Mask directives +//===----------------------------------------------------------------------===// + +// Create a bitmask with all callee saved registers for CPU or Floating Point +// registers. For CPU registers consider RA, GP and FP for saving if necessary. +void MBlazeAsmPrinter::printSavedRegsBitmask() { + const TargetRegisterInfo &RI = *TM.getRegisterInfo(); + const MBlazeFunctionInfo *MBlazeFI = MF->getInfo(); + + // CPU Saved Registers Bitmasks + unsigned int CPUBitmask = 0; + + // Set the CPU Bitmasks + const MachineFrameInfo *MFI = MF->getFrameInfo(); + const std::vector &CSI = MFI->getCalleeSavedInfo(); + for (unsigned i = 0, e = CSI.size(); i != e; ++i) { + unsigned RegNum = MBlazeRegisterInfo::getRegisterNumbering(CSI[i].getReg()); + if (CSI[i].getRegClass() == MBlaze::CPURegsRegisterClass) + CPUBitmask |= (1 << RegNum); + } + + // Return Address and Frame registers must also be set in CPUBitmask. + if (RI.hasFP(*MF)) + CPUBitmask |= (1 << MBlazeRegisterInfo:: + getRegisterNumbering(RI.getFrameRegister(*MF))); + + if (MFI->hasCalls()) + CPUBitmask |= (1 << MBlazeRegisterInfo:: + getRegisterNumbering(RI.getRARegister())); + + // Print CPUBitmask + O << "\t.mask \t"; printHex32(CPUBitmask); O << ',' + << MBlazeFI->getCPUTopSavedRegOff() << '\n'; +} + +// Print a 32 bit hex number with all numbers. +void MBlazeAsmPrinter::printHex32(unsigned int Value) { + O << "0x"; + for (int i = 7; i >= 0; i--) + O << utohexstr( (Value & (0xF << (i*4))) >> (i*4) ); +} + +//===----------------------------------------------------------------------===// +// Frame and Set directives +//===----------------------------------------------------------------------===// + +/// Frame Directive +void MBlazeAsmPrinter::emitFrameDirective() { + const TargetRegisterInfo &RI = *TM.getRegisterInfo(); + + unsigned stackReg = RI.getFrameRegister(*MF); + unsigned returnReg = RI.getRARegister(); + unsigned stackSize = MF->getFrameInfo()->getStackSize(); + + + O << "\t.frame\t" << getRegisterName(stackReg) + << ',' << stackSize << ',' + << getRegisterName(returnReg) + << '\n'; +} + +void MBlazeAsmPrinter::EmitFunctionEntryLabel() { + O << "\t.ent\t" << *CurrentFnSym << '\n'; + OutStreamer.EmitLabel(CurrentFnSym); +} + +/// EmitFunctionBodyStart - Targets can override this to emit stuff before +/// the first basic block in the function. +void MBlazeAsmPrinter::EmitFunctionBodyStart() { + emitFrameDirective(); + printSavedRegsBitmask(); +} + +/// EmitFunctionBodyEnd - Targets can override this to emit stuff after +/// the last basic block in the function. +void MBlazeAsmPrinter::EmitFunctionBodyEnd() { + O << "\t.end\t" << *CurrentFnSym << '\n'; +} + +// Print out an operand for an inline asm expression. +bool MBlazeAsmPrinter:: +PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, + unsigned AsmVariant,const char *ExtraCode){ + // Does this asm operand have a single letter operand modifier? + if (ExtraCode && ExtraCode[0]) + return true; // Unknown modifier. + + printOperand(MI, OpNo); + return false; +} + +void MBlazeAsmPrinter::printOperand(const MachineInstr *MI, int opNum) { + const MachineOperand &MO = MI->getOperand(opNum); + + switch (MO.getType()) { + case MachineOperand::MO_Register: + O << getRegisterName(MO.getReg()); + break; + + case MachineOperand::MO_Immediate: + O << (int)MO.getImm(); + break; + + case MachineOperand::MO_FPImmediate: { + const ConstantFP* fp = MO.getFPImm(); + printHex32(fp->getValueAPF().bitcastToAPInt().getZExtValue()); + O << ";\t# immediate = " << *fp; + break; + } + + case MachineOperand::MO_MachineBasicBlock: + O << *MO.getMBB()->getSymbol(OutContext); + return; + + case MachineOperand::MO_GlobalAddress: + O << *GetGlobalValueSymbol(MO.getGlobal()); + break; + + case MachineOperand::MO_ExternalSymbol: + O << *GetExternalSymbolSymbol(MO.getSymbolName()); + break; + + case MachineOperand::MO_JumpTableIndex: + O << MAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber() + << '_' << MO.getIndex(); + break; + + case MachineOperand::MO_ConstantPoolIndex: + O << MAI->getPrivateGlobalPrefix() << "CPI" + << getFunctionNumber() << "_" << MO.getIndex(); + if (MO.getOffset()) + O << "+" << MO.getOffset(); + break; + + default: + llvm_unreachable(""); + } +} + +void MBlazeAsmPrinter::printUnsignedImm(const MachineInstr *MI, int opNum) { + const MachineOperand &MO = MI->getOperand(opNum); + if (MO.getType() == MachineOperand::MO_Immediate) + O << (unsigned int)MO.getImm(); + else + printOperand(MI, opNum); +} + +void MBlazeAsmPrinter::printFSLImm(const MachineInstr *MI, int opNum) { + const MachineOperand &MO = MI->getOperand(opNum); + if (MO.getType() == MachineOperand::MO_Immediate) + O << "rfsl" << (unsigned int)MO.getImm(); + else + printOperand(MI, opNum); +} + +void MBlazeAsmPrinter:: +printMemOperand(const MachineInstr *MI, int opNum, const char *Modifier) { + printOperand(MI, opNum+1); + O << ", "; + printOperand(MI, opNum); +} + +void MBlazeAsmPrinter:: +printFCCOperand(const MachineInstr *MI, int opNum, const char *Modifier) { + const MachineOperand& MO = MI->getOperand(opNum); + O << MBlaze::MBlazeFCCToString((MBlaze::CondCode)MO.getImm()); +} + +void MBlazeAsmPrinter::EmitStartOfAsmFile(Module &M) { +} + +// Force static initialization. +extern "C" void LLVMInitializeMBlazeAsmPrinter() { + RegisterAsmPrinter X(TheMBlazeTarget); +} Added: llvm/trunk/lib/Target/MBlaze/AsmPrinter/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/AsmPrinter/Makefile?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/AsmPrinter/Makefile (added) +++ llvm/trunk/lib/Target/MBlaze/AsmPrinter/Makefile Tue Feb 23 13:15:24 2010 @@ -0,0 +1,17 @@ +##===- lib/Target/MBlaze/AsmPrinter/Makefile ---------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## + +LEVEL = ../../../.. +LIBRARYNAME = LLVMMBlazeAsmPrinter + +# Hack: we need to include 'main' MBlaze target directory to grab +# private headers +CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. + +include $(LEVEL)/Makefile.common Added: llvm/trunk/lib/Target/MBlaze/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/CMakeLists.txt?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/CMakeLists.txt (added) +++ llvm/trunk/lib/Target/MBlaze/CMakeLists.txt Tue Feb 23 13:15:24 2010 @@ -0,0 +1,27 @@ +set(LLVM_TARGET_DEFINITIONS MBlaze.td) + +tablegen(MBlazeGenRegisterInfo.h.inc -gen-register-desc-header) +tablegen(MBlazeGenRegisterNames.inc -gen-register-enums) +tablegen(MBlazeGenRegisterInfo.inc -gen-register-desc) +tablegen(MBlazeGenInstrNames.inc -gen-instr-enums) +tablegen(MBlazeGenInstrInfo.inc -gen-instr-desc) +tablegen(MBlazeGenAsmWriter.inc -gen-asm-writer) +tablegen(MBlazeGenDAGISel.inc -gen-dag-isel) +tablegen(MBlazeGenCallingConv.inc -gen-callingconv) +tablegen(MBlazeGenSubtarget.inc -gen-subtarget) +tablegen(MBlazeGenIntrinsics.inc -gen-tgt-intrinsic) + +add_llvm_target(MBlazeCodeGen + MBlazeDelaySlotFiller.cpp + MBlazeInstrInfo.cpp + MBlazeISelDAGToDAG.cpp + MBlazeISelLowering.cpp + MBlazeMCAsmInfo.cpp + MBlazeRegisterInfo.cpp + MBlazeSubtarget.cpp + MBlazeTargetMachine.cpp + MBlazeTargetObjectFile.cpp + MBlazeIntrinsicInfo.cpp + ) + +target_link_libraries (LLVMMBlazeCodeGen LLVMSelectionDAG) Added: llvm/trunk/lib/Target/MBlaze/MBlaze.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlaze.h?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlaze.h (added) +++ llvm/trunk/lib/Target/MBlaze/MBlaze.h Tue Feb 23 13:15:24 2010 @@ -0,0 +1,39 @@ +//===-- MBlaze.h - Top-level interface for MBlaze ---------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file contains the entry points for global functions defined in +// the LLVM MBlaze back-end. +// +//===----------------------------------------------------------------------===// + +#ifndef TARGET_MBLAZE_H +#define TARGET_MBLAZE_H + +#include "llvm/Target/TargetMachine.h" + +namespace llvm { + class MBlazeTargetMachine; + class FunctionPass; + class MachineCodeEmitter; + class formatted_raw_ostream; + + FunctionPass *createMBlazeISelDag(MBlazeTargetMachine &TM); + FunctionPass *createMBlazeDelaySlotFillerPass(MBlazeTargetMachine &TM); + + extern Target TheMBlazeTarget; +} // end namespace llvm; + +// Defines symbolic names for MBlaze registers. This defines a mapping from +// register name to register number. +#include "MBlazeGenRegisterNames.inc" + +// Defines symbolic names for the MBlaze instructions. +#include "MBlazeGenInstrNames.inc" + +#endif Added: llvm/trunk/lib/Target/MBlaze/MBlaze.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlaze.td?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlaze.td (added) +++ llvm/trunk/lib/Target/MBlaze/MBlaze.td Tue Feb 23 13:15:24 2010 @@ -0,0 +1,85 @@ +//===- MBlaze.td - Describe the MBlaze Target Machine -----------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// This is the top level entry point for the MBlaze target. +//===----------------------------------------------------------------------===// + +//===----------------------------------------------------------------------===// +// Target-independent interfaces +//===----------------------------------------------------------------------===// + +include "llvm/Target/Target.td" + +//===----------------------------------------------------------------------===// +// Register File, Calling Conv, Instruction Descriptions +//===----------------------------------------------------------------------===// + +include "MBlazeRegisterInfo.td" +include "MBlazeSchedule.td" +include "MBlazeIntrinsics.td" +include "MBlazeInstrInfo.td" +include "MBlazeCallingConv.td" + +def MBlazeInstrInfo : InstrInfo { + let TSFlagsFields = []; + let TSFlagsShifts = []; +} + + +//===----------------------------------------------------------------------===// +// Microblaze Subtarget features // +//===----------------------------------------------------------------------===// + +def FeaturePipe3 : SubtargetFeature<"pipe3", "HasPipe3", "true", + "Implements 3-stage pipeline.">; +def FeatureBarrel : SubtargetFeature<"barrel", "HasBarrel", "true", + "Implements barrel shifter.">; +def FeatureDiv : SubtargetFeature<"div", "HasDiv", "true", + "Implements hardware divider.">; +def FeatureMul : SubtargetFeature<"mul", "HasMul", "true", + "Implements hardware multiplier.">; +def FeatureFSL : SubtargetFeature<"fsl", "HasFSL", "true", + "Implements FSL instructions.">; +def FeatureEFSL : SubtargetFeature<"efsl", "HasEFSL", "true", + "Implements extended FSL instructions.">; +def FeatureMSRSet : SubtargetFeature<"msrset", "HasMSRSet", "true", + "Implements MSR register set and clear.">; +def FeatureException : SubtargetFeature<"exception", "HasException", "true", + "Implements hardware exception support.">; +def FeaturePatCmp : SubtargetFeature<"patcmp", "HasPatCmp", "true", + "Implements pattern compare instruction.">; +def FeatureFPU : SubtargetFeature<"fpu", "HasFPU", "true", + "Implements floating point unit.">; +def FeatureESR : SubtargetFeature<"esr", "HasESR", "true", + "Implements ESR and EAR registers">; +def FeaturePVR : SubtargetFeature<"pvr", "HasPVR", "true", + "Implements processor version register.">; +def FeatureMul64 : SubtargetFeature<"mul64", "HasMul64", "true", + "Implements multiplier with 64-bit result">; +def FeatureSqrt : SubtargetFeature<"sqrt", "HasSqrt", "true", + "Implements sqrt and floating point convert.">; +def FeatureMMU : SubtargetFeature<"mmu", "HasMMU", "true", + "Implements memory management unit.">; + +//===----------------------------------------------------------------------===// +// MBlaze processors supported. +//===----------------------------------------------------------------------===// + +class Proc Features> + : Processor; + + +def : Proc<"v400", []>; +def : Proc<"v500", []>; +def : Proc<"v600", []>; +def : Proc<"v700", []>; +def : Proc<"v710", []>; + +def MBlaze : Target { + let InstructionSet = MBlazeInstrInfo; +} Added: llvm/trunk/lib/Target/MBlaze/MBlazeCallingConv.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeCallingConv.td?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeCallingConv.td (added) +++ llvm/trunk/lib/Target/MBlaze/MBlazeCallingConv.td Tue Feb 23 13:15:24 2010 @@ -0,0 +1,41 @@ +//===- MBlazeCallingConv.td - Calling Conventions for MBlaze ----*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// This describes the calling conventions for MBlaze architecture. +//===----------------------------------------------------------------------===// + +/// CCIfSubtarget - Match if the current subtarget has a feature F. +class CCIfSubtarget: + CCIf().", F), A>; + +//===----------------------------------------------------------------------===// +// MBlaze ABI Calling Convention +//===----------------------------------------------------------------------===// + +def CC_MBlaze : CallingConv<[ + // Promote i8/i16 arguments to i32. + CCIfType<[i8, i16], CCPromoteToType>, + + // Integer arguments are passed in integer registers. + CCIfType<[i32], CCAssignToReg<[R5, R6, R7, R8, R9, R10]>>, + + // Single fp arguments are passed in floating point registers + CCIfType<[f32], CCAssignToReg<[F5, F6, F7, F8, F9, F10]>>, + + // 32-bit values get stored in stack slots that are 4 bytes in + // size and 4-byte aligned. + CCIfType<[i32, f32], CCAssignToStack<4, 4>> +]>; + +def RetCC_MBlaze : CallingConv<[ + // i32 are returned in registers R3, R4 + CCIfType<[i32], CCAssignToReg<[R3, R4]>>, + + // f32 are returned in registers F3, F4 + CCIfType<[f32], CCAssignToReg<[F3, F4]>> +]>; Added: llvm/trunk/lib/Target/MBlaze/MBlazeDelaySlotFiller.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeDelaySlotFiller.cpp?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeDelaySlotFiller.cpp (added) +++ llvm/trunk/lib/Target/MBlaze/MBlazeDelaySlotFiller.cpp Tue Feb 23 13:15:24 2010 @@ -0,0 +1,75 @@ +//===-- DelaySlotFiller.cpp - MBlaze delay slot filler --------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// Simple pass to fills delay slots with NOPs. +// +//===----------------------------------------------------------------------===// + +#define DEBUG_TYPE "delay-slot-filler" + +#include "MBlaze.h" +#include "MBlazeTargetMachine.h" +#include "llvm/CodeGen/MachineFunctionPass.h" +#include "llvm/CodeGen/MachineInstrBuilder.h" +#include "llvm/Target/TargetInstrInfo.h" +#include "llvm/ADT/Statistic.h" + +using namespace llvm; + +STATISTIC(FilledSlots, "Number of delay slots filled"); + +namespace { + struct Filler : public MachineFunctionPass { + + TargetMachine &TM; + const TargetInstrInfo *TII; + + static char ID; + Filler(TargetMachine &tm) + : MachineFunctionPass(&ID), TM(tm), TII(tm.getInstrInfo()) { } + + virtual const char *getPassName() const { + return "MBlaze Delay Slot Filler"; + } + + bool runOnMachineBasicBlock(MachineBasicBlock &MBB); + bool runOnMachineFunction(MachineFunction &F) { + bool Changed = false; + for (MachineFunction::iterator FI = F.begin(), FE = F.end(); + FI != FE; ++FI) + Changed |= runOnMachineBasicBlock(*FI); + return Changed; + } + + }; + char Filler::ID = 0; +} // end of anonymous namespace + +/// runOnMachineBasicBlock - Fill in delay slots for the given basic block. +/// Currently, we fill delay slots with NOPs. We assume there is only one +/// delay slot per delayed instruction. +bool Filler::runOnMachineBasicBlock(MachineBasicBlock &MBB) { + bool Changed = false; + for (MachineBasicBlock::iterator I = MBB.begin(); I != MBB.end(); ++I) + if (I->getDesc().hasDelaySlot()) { + MachineBasicBlock::iterator J = I; + ++J; + BuildMI(MBB, J, I->getDebugLoc(), TII->get(MBlaze::NOP)); + ++FilledSlots; + Changed = true; + } + return Changed; +} + +/// createMBlazeDelaySlotFillerPass - Returns a pass that fills in delay +/// slots in MBlaze MachineFunctions +FunctionPass *llvm::createMBlazeDelaySlotFillerPass(MBlazeTargetMachine &tm) { + return new Filler(tm); +} + Added: llvm/trunk/lib/Target/MBlaze/MBlazeISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeISelDAGToDAG.cpp?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeISelDAGToDAG.cpp (added) +++ llvm/trunk/lib/Target/MBlaze/MBlazeISelDAGToDAG.cpp Tue Feb 23 13:15:24 2010 @@ -0,0 +1,368 @@ +//===-- MBlazeISelDAGToDAG.cpp - A dag to dag inst selector for MBlaze ----===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines an instruction selector for the MBlaze target. +// +//===----------------------------------------------------------------------===// + +#define DEBUG_TYPE "mblaze-isel" +#include "MBlaze.h" +#include "MBlazeISelLowering.h" +#include "MBlazeMachineFunction.h" +#include "MBlazeRegisterInfo.h" +#include "MBlazeSubtarget.h" +#include "MBlazeTargetMachine.h" +#include "llvm/GlobalValue.h" +#include "llvm/Instructions.h" +#include "llvm/Intrinsics.h" +#include "llvm/Support/CFG.h" +#include "llvm/Type.h" +#include "llvm/CodeGen/MachineConstantPool.h" +#include "llvm/CodeGen/MachineFunction.h" +#include "llvm/CodeGen/MachineFrameInfo.h" +#include "llvm/CodeGen/MachineInstrBuilder.h" +#include "llvm/CodeGen/MachineRegisterInfo.h" +#include "llvm/CodeGen/SelectionDAGISel.h" +#include "llvm/Target/TargetMachine.h" +#include "llvm/Support/Debug.h" +#include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/raw_ostream.h" +using namespace llvm; + +//===----------------------------------------------------------------------===// +// Instruction Selector Implementation +//===----------------------------------------------------------------------===// + +//===----------------------------------------------------------------------===// +// MBlazeDAGToDAGISel - MBlaze specific code to select MBlaze machine +// instructions for SelectionDAG operations. +//===----------------------------------------------------------------------===// +namespace { + +class MBlazeDAGToDAGISel : public SelectionDAGISel { + + /// TM - Keep a reference to MBlazeTargetMachine. + MBlazeTargetMachine &TM; + + /// Subtarget - Keep a pointer to the MBlazeSubtarget around so that we can + /// make the right decision when generating code for different targets. + const MBlazeSubtarget &Subtarget; + +public: + explicit MBlazeDAGToDAGISel(MBlazeTargetMachine &tm) : + SelectionDAGISel(tm), + TM(tm), Subtarget(tm.getSubtarget()) {} + + virtual void InstructionSelect(); + + // Pass Name + virtual const char *getPassName() const { + return "MBlaze DAG->DAG Pattern Instruction Selection"; + } +private: + // Include the pieces autogenerated from the target description. + #include "MBlazeGenDAGISel.inc" + + /// getTargetMachine - Return a reference to the TargetMachine, casted + /// to the target-specific type. + const MBlazeTargetMachine &getTargetMachine() { + return static_cast(TM); + } + + /// getInstrInfo - Return a reference to the TargetInstrInfo, casted + /// to the target-specific type. + const MBlazeInstrInfo *getInstrInfo() { + return getTargetMachine().getInstrInfo(); + } + + SDNode *getGlobalBaseReg(); + SDNode *Select(SDNode *N); + + // Complex Pattern. + bool SelectAddr(SDNode *Op, SDValue N, + SDValue &Base, SDValue &Offset); + + // Address Selection + bool SelectAddrRegReg(SDNode *Op, SDValue N, SDValue &Base, SDValue &Index); + bool SelectAddrRegImm(SDNode *Op, SDValue N, SDValue &Disp, SDValue &Base); + + // getI32Imm - Return a target constant with the specified value, of type i32. + inline SDValue getI32Imm(unsigned Imm) { + return CurDAG->getTargetConstant(Imm, MVT::i32); + } + + + #ifndef NDEBUG + unsigned Indent; + #endif +}; + +} + +/// isIntS32Immediate - This method tests to see if the node is either a 32-bit +/// or 64-bit immediate, and if the value can be accurately represented as a +/// sign extension from a 32-bit value. If so, this returns true and the +/// immediate. +static bool isIntS32Immediate(SDNode *N, int32_t &Imm) { + unsigned Opc = N->getOpcode(); + if (Opc != ISD::Constant) + return false; + + Imm = (int32_t)cast(N)->getZExtValue(); + if (N->getValueType(0) == MVT::i32) + return Imm == (int32_t)cast(N)->getZExtValue(); + else + return Imm == (int64_t)cast(N)->getZExtValue(); +} + +static bool isIntS32Immediate(SDValue Op, int32_t &Imm) { + return isIntS32Immediate(Op.getNode(), Imm); +} + +/// InstructionSelect - This callback is invoked by +/// SelectionDAGISel when it has created a SelectionDAG for us to codegen. +void MBlazeDAGToDAGISel::InstructionSelect() { + // Codegen the basic block. + DEBUG(errs() << "===== Instruction selection begins:\n"); + DEBUG(Indent = 0); + + // Select target instructions for the DAG. + SelectRoot(*CurDAG); + + DEBUG(errs() << "===== Instruction selection ends:\n"); + + CurDAG->RemoveDeadNodes(); +} + +/// SelectAddressRegReg - Given the specified addressed, check to see if it +/// can be represented as an indexed [r+r] operation. Returns false if it +/// can be more efficiently represented with [r+imm]. +bool MBlazeDAGToDAGISel:: +SelectAddrRegReg(SDNode *Op, SDValue N, SDValue &Base, SDValue &Index) { + if (N.getOpcode() == ISD::FrameIndex) return false; + if (N.getOpcode() == ISD::TargetExternalSymbol || + N.getOpcode() == ISD::TargetGlobalAddress) + return false; // direct calls. + + if (N.getOperand(0).getOpcode() == ISD::TargetJumpTable || + N.getOperand(1).getOpcode() == ISD::TargetJumpTable) + return false; // jump tables. + + int32_t imm = 0; + if (N.getOpcode() == ISD::ADD || N.getOpcode() == ISD::OR) { + if (isIntS32Immediate(N.getOperand(1), imm)) + return false; // r+i + + Base = N.getOperand(1); + Index = N.getOperand(0); + return true; + } + + return false; +} + +/// Returns true if the address N can be represented by a base register plus +/// a signed 32-bit displacement [r+imm], and if it is not better +/// represented as reg+reg. +bool MBlazeDAGToDAGISel:: +SelectAddrRegImm(SDNode *Op, SDValue N, SDValue &Disp, SDValue &Base) { + // If this can be more profitably realized as r+r, fail. + if (SelectAddrRegReg(Op, N, Disp, Base)) + return false; + + if (N.getOpcode() == ISD::ADD || N.getOpcode() == ISD::OR) { + int32_t imm = 0; + if (isIntS32Immediate(N.getOperand(1), imm)) { + Disp = CurDAG->getTargetConstant(imm, MVT::i32); + if (FrameIndexSDNode *FI = dyn_cast(N.getOperand(0))) { + Base = CurDAG->getTargetFrameIndex(FI->getIndex(), N.getValueType()); + } else { + Base = N.getOperand(0); + } + DEBUG( errs() << "WESLEY: Using Operand Immediate\n" ); + return true; // [r+i] + } + } else if (ConstantSDNode *CN = dyn_cast(N)) { + // Loading from a constant address. + uint32_t Imm = CN->getZExtValue(); + Disp = CurDAG->getTargetConstant(Imm, CN->getValueType(0)); + Base = CurDAG->getRegister(MBlaze::R0, CN->getValueType(0)); + DEBUG( errs() << "WESLEY: Using Constant Node\n" ); + return true; + } + + Disp = CurDAG->getTargetConstant(0, TM.getTargetLowering()->getPointerTy()); + if (FrameIndexSDNode *FI = dyn_cast(N)) + Base = CurDAG->getTargetFrameIndex(FI->getIndex(), N.getValueType()); + else + Base = N; + return true; // [r+0] +} + +/// getGlobalBaseReg - Output the instructions required to put the +/// GOT address into a register. +SDNode *MBlazeDAGToDAGISel::getGlobalBaseReg() { + unsigned GlobalBaseReg = getInstrInfo()->getGlobalBaseReg(MF); + return CurDAG->getRegister(GlobalBaseReg, TLI.getPointerTy()).getNode(); +} + +/// ComplexPattern used on MBlazeInstrInfo +/// Used on MBlaze Load/Store instructions +bool MBlazeDAGToDAGISel:: +SelectAddr(SDNode *Op, SDValue Addr, SDValue &Offset, SDValue &Base) { + // if Address is FI, get the TargetFrameIndex. + if (FrameIndexSDNode *FIN = dyn_cast(Addr)) { + Base = CurDAG->getTargetFrameIndex(FIN->getIndex(), MVT::i32); + Offset = CurDAG->getTargetConstant(0, MVT::i32); + return true; + } + + // on PIC code Load GA + if (TM.getRelocationModel() == Reloc::PIC_) { + if ((Addr.getOpcode() == ISD::TargetGlobalAddress) || + (Addr.getOpcode() == ISD::TargetConstantPool) || + (Addr.getOpcode() == ISD::TargetJumpTable)){ + Base = CurDAG->getRegister(MBlaze::R15, MVT::i32); + Offset = Addr; + return true; + } + } else { + if ((Addr.getOpcode() == ISD::TargetExternalSymbol || + Addr.getOpcode() == ISD::TargetGlobalAddress)) + return false; + } + + // Operand is a result from an ADD. + if (Addr.getOpcode() == ISD::ADD) { + if (ConstantSDNode *CN = dyn_cast(Addr.getOperand(1))) { + if (Predicate_immSExt16(CN)) { + + // If the first operand is a FI, get the TargetFI Node + if (FrameIndexSDNode *FIN = dyn_cast + (Addr.getOperand(0))) { + Base = CurDAG->getTargetFrameIndex(FIN->getIndex(), MVT::i32); + } else { + Base = Addr.getOperand(0); + } + + Offset = CurDAG->getTargetConstant(CN->getZExtValue(), MVT::i32); + return true; + } + } + } + + Base = Addr; + Offset = CurDAG->getTargetConstant(0, MVT::i32); + return true; +} + +/// Select instructions not customized! Used for +/// expanded, promoted and normal instructions +SDNode* MBlazeDAGToDAGISel::Select(SDNode *Node) { + unsigned Opcode = Node->getOpcode(); + DebugLoc dl = Node->getDebugLoc(); + + // Dump information about the Node being selected + DEBUG(errs().indent(Indent) << "Selecting: "; + Node->dump(CurDAG); + errs() << "\n"); + DEBUG(Indent += 2); + + // If we have a custom node, we already have selected! + if (Node->isMachineOpcode()) { + DEBUG(errs().indent(Indent-2) << "== "; + Node->dump(CurDAG); + errs() << "\n"); + DEBUG(Indent -= 2); + return NULL; + } + + /// + // Instruction Selection not handled by the auto-generated + // tablegen selection should be handled here. + /// + switch(Opcode) { + default: break; + + // Get target GOT address. + case ISD::GLOBAL_OFFSET_TABLE: + return getGlobalBaseReg(); + + case ISD::FrameIndex: { + SDValue imm = CurDAG->getTargetConstant(0, MVT::i32); + int FI = dyn_cast(Node)->getIndex(); + EVT VT = Node->getValueType(0); + SDValue TFI = CurDAG->getTargetFrameIndex(FI, VT); + unsigned Opc = MBlaze::ADDI; + if (Node->hasOneUse()) + return CurDAG->SelectNodeTo(Node, Opc, VT, TFI, imm); + return CurDAG->getMachineNode(Opc, dl, VT, TFI, imm); + } + + + /// Handle direct and indirect calls when using PIC. On PIC, when + /// GOT is smaller than about 64k (small code) the GA target is + /// loaded with only one instruction. Otherwise GA's target must + /// be loaded with 3 instructions. + case MBlazeISD::JmpLink: { + if (TM.getRelocationModel() == Reloc::PIC_) { + SDValue Chain = Node->getOperand(0); + SDValue Callee = Node->getOperand(1); + SDValue R20Reg = CurDAG->getRegister(MBlaze::R20, MVT::i32); + SDValue InFlag(0, 0); + + if ( (isa(Callee)) || + (isa(Callee)) ) + { + /// Direct call for global addresses and external symbols + SDValue GPReg = CurDAG->getRegister(MBlaze::R15, MVT::i32); + + // Use load to get GOT target + SDValue Ops[] = { Callee, GPReg, Chain }; + SDValue Load = SDValue(CurDAG->getMachineNode(MBlaze::LW, dl, + MVT::i32, MVT::Other, Ops, 3), 0); + Chain = Load.getValue(1); + + // Call target must be on T9 + Chain = CurDAG->getCopyToReg(Chain, dl, R20Reg, Load, InFlag); + } else + /// Indirect call + Chain = CurDAG->getCopyToReg(Chain, dl, R20Reg, Callee, InFlag); + + // Emit Jump and Link Register + SDNode *ResNode = CurDAG->getMachineNode(MBlaze::BRLID, dl, MVT::Other, + MVT::Flag, R20Reg, Chain); + Chain = SDValue(ResNode, 0); + InFlag = SDValue(ResNode, 1); + ReplaceUses(SDValue(Node, 0), Chain); + ReplaceUses(SDValue(Node, 1), InFlag); + return ResNode; + } + } + } + + // Select the default instruction + SDNode *ResNode = SelectCode(Node); + + DEBUG(errs().indent(Indent-2) << "=> "); + if (ResNode == NULL || ResNode == Node) + DEBUG(Node->dump(CurDAG)); + else + DEBUG(ResNode->dump(CurDAG)); + DEBUG(errs() << "\n"); + DEBUG(Indent -= 2); + + return ResNode; +} + +/// createMBlazeISelDag - This pass converts a legalized DAG into a +/// MBlaze-specific DAG, ready for instruction scheduling. +FunctionPass *llvm::createMBlazeISelDag(MBlazeTargetMachine &TM) { + return new MBlazeDAGToDAGISel(TM); +} Added: llvm/trunk/lib/Target/MBlaze/MBlazeISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeISelLowering.cpp?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeISelLowering.cpp (added) +++ llvm/trunk/lib/Target/MBlaze/MBlazeISelLowering.cpp Tue Feb 23 13:15:24 2010 @@ -0,0 +1,882 @@ +//===-- MBlazeISelLowering.cpp - MBlaze DAG Lowering Implementation -------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines the interfaces that MBlaze uses to lower LLVM code into a +// selection DAG. +// +//===----------------------------------------------------------------------===// + +#define DEBUG_TYPE "mblaze-lower" +#include "MBlazeISelLowering.h" +#include "MBlazeMachineFunction.h" +#include "MBlazeTargetMachine.h" +#include "MBlazeTargetObjectFile.h" +#include "MBlazeSubtarget.h" +#include "llvm/DerivedTypes.h" +#include "llvm/Function.h" +#include "llvm/GlobalVariable.h" +#include "llvm/Intrinsics.h" +#include "llvm/CallingConv.h" +#include "llvm/CodeGen/CallingConvLower.h" +#include "llvm/CodeGen/MachineFrameInfo.h" +#include "llvm/CodeGen/MachineFunction.h" +#include "llvm/CodeGen/MachineInstrBuilder.h" +#include "llvm/CodeGen/MachineRegisterInfo.h" +#include "llvm/CodeGen/SelectionDAGISel.h" +#include "llvm/CodeGen/ValueTypes.h" +#include "llvm/Support/Debug.h" +#include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/raw_ostream.h" +using namespace llvm; + +const char *MBlazeTargetLowering::getTargetNodeName(unsigned Opcode) const { + switch (Opcode) { + case MBlazeISD::JmpLink : return "MBlazeISD::JmpLink"; + case MBlazeISD::GPRel : return "MBlazeISD::GPRel"; + case MBlazeISD::Wrap : return "MBlazeISD::Wrap"; + case MBlazeISD::ICmp : return "MBlazeISD::ICmp"; + case MBlazeISD::Ret : return "MBlazeISD::Ret"; + case MBlazeISD::Select_CC : return "MBlazeISD::Select_CC"; + default : return NULL; + } +} + +MBlazeTargetLowering::MBlazeTargetLowering(MBlazeTargetMachine &TM) + : TargetLowering(TM, new MBlazeTargetObjectFile()) { + Subtarget = &TM.getSubtarget(); + + // MBlaze does not have i1 type, so use i32 for + // setcc operations results (slt, sgt, ...). + setBooleanContents(ZeroOrOneBooleanContent); + + // Set up the register classes + addRegisterClass(MVT::i32, MBlaze::CPURegsRegisterClass); + if (Subtarget->hasFPU()) { + addRegisterClass(MVT::f32, MBlaze::FGR32RegisterClass); + setOperationAction(ISD::ConstantFP, MVT::f32, Legal); + } + + // Floating point operations which are not supported + setOperationAction(ISD::FREM, MVT::f32, Expand); + setOperationAction(ISD::UINT_TO_FP, MVT::i8, Expand); + setOperationAction(ISD::UINT_TO_FP, MVT::i16, Expand); + setOperationAction(ISD::UINT_TO_FP, MVT::i32, Expand); + setOperationAction(ISD::FP_TO_UINT, MVT::i32, Expand); + setOperationAction(ISD::FP_ROUND, MVT::f32, Expand); + setOperationAction(ISD::FP_ROUND, MVT::f64, Expand); + setOperationAction(ISD::FCOPYSIGN, MVT::f32, Expand); + setOperationAction(ISD::FCOPYSIGN, MVT::f64, Expand); + setOperationAction(ISD::FSIN, MVT::f32, Expand); + setOperationAction(ISD::FCOS, MVT::f32, Expand); + setOperationAction(ISD::FPOWI, MVT::f32, Expand); + setOperationAction(ISD::FPOW, MVT::f32, Expand); + setOperationAction(ISD::FLOG, MVT::f32, Expand); + setOperationAction(ISD::FLOG2, MVT::f32, Expand); + setOperationAction(ISD::FLOG10, MVT::f32, Expand); + setOperationAction(ISD::FEXP, MVT::f32, Expand); + + // Load extented operations for i1 types must be promoted + setLoadExtAction(ISD::EXTLOAD, MVT::i1, Promote); + setLoadExtAction(ISD::ZEXTLOAD, MVT::i1, Promote); + setLoadExtAction(ISD::SEXTLOAD, MVT::i1, Promote); + + // MBlaze has no REM or DIVREM operations. + setOperationAction(ISD::UREM, MVT::i32, Expand); + setOperationAction(ISD::SREM, MVT::i32, Expand); + setOperationAction(ISD::SDIVREM, MVT::i32, Expand); + setOperationAction(ISD::UDIVREM, MVT::i32, Expand); + + // If the processor doesn't support multiply then expand it + if (!Subtarget->hasMul()) { + setOperationAction(ISD::MUL, MVT::i32, Expand); + } + + // If the processor doesn't support 64-bit multiply then expand + if (!Subtarget->hasMul() || !Subtarget->hasMul64()) { + setOperationAction(ISD::MULHS, MVT::i32, Expand); + setOperationAction(ISD::MULHS, MVT::i64, Expand); + setOperationAction(ISD::MULHU, MVT::i32, Expand); + setOperationAction(ISD::MULHU, MVT::i64, Expand); + } + + // If the processor doesn't support division then expand + if (!Subtarget->hasDiv()) { + setOperationAction(ISD::UDIV, MVT::i32, Expand); + setOperationAction(ISD::SDIV, MVT::i32, Expand); + } + + // Expand unsupported conversions + setOperationAction(ISD::BIT_CONVERT, MVT::f32, Expand); + setOperationAction(ISD::BIT_CONVERT, MVT::i32, Expand); + + // Expand SELECT_CC + setOperationAction(ISD::SELECT_CC, MVT::Other, Expand); + + // MBlaze doesn't have MUL_LOHI + setOperationAction(ISD::SMUL_LOHI, MVT::i32, Expand); + setOperationAction(ISD::UMUL_LOHI, MVT::i32, Expand); + setOperationAction(ISD::SMUL_LOHI, MVT::i64, Expand); + setOperationAction(ISD::UMUL_LOHI, MVT::i64, Expand); + + // Used by legalize types to correctly generate the setcc result. + // Without this, every float setcc comes with a AND/OR with the result, + // we don't want this, since the fpcmp result goes to a flag register, + // which is used implicitly by brcond and select operations. + AddPromotedToType(ISD::SETCC, MVT::i1, MVT::i32); + AddPromotedToType(ISD::SELECT, MVT::i1, MVT::i32); + AddPromotedToType(ISD::SELECT_CC, MVT::i1, MVT::i32); + + // MBlaze Custom Operations + setOperationAction(ISD::GlobalAddress, MVT::i32, Custom); + setOperationAction(ISD::GlobalTLSAddress, MVT::i32, Custom); + setOperationAction(ISD::JumpTable, MVT::i32, Custom); + setOperationAction(ISD::ConstantPool, MVT::i32, Custom); + + // Operations not directly supported by MBlaze. + setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i32, Expand); + setOperationAction(ISD::BR_JT, MVT::Other, Expand); + setOperationAction(ISD::BR_CC, MVT::Other, Expand); + setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i1, Expand); + setOperationAction(ISD::ROTL, MVT::i32, Expand); + setOperationAction(ISD::ROTR, MVT::i32, Expand); + setOperationAction(ISD::SHL_PARTS, MVT::i32, Expand); + setOperationAction(ISD::SRA_PARTS, MVT::i32, Expand); + setOperationAction(ISD::SRL_PARTS, MVT::i32, Expand); + setOperationAction(ISD::CTLZ, MVT::i32, Expand); + setOperationAction(ISD::CTTZ, MVT::i32, Expand); + setOperationAction(ISD::CTPOP, MVT::i32, Expand); + setOperationAction(ISD::BSWAP, MVT::i32, Expand); + + // We don't have line number support yet. + setOperationAction(ISD::EH_LABEL, MVT::Other, Expand); + + // Use the default for now + setOperationAction(ISD::STACKSAVE, MVT::Other, Expand); + setOperationAction(ISD::STACKRESTORE, MVT::Other, Expand); + setOperationAction(ISD::MEMBARRIER, MVT::Other, Expand); + + // MBlaze doesn't have extending float->double load/store + setLoadExtAction(ISD::EXTLOAD, MVT::f32, Expand); + setTruncStoreAction(MVT::f64, MVT::f32, Expand); + + setStackPointerRegisterToSaveRestore(MBlaze::R1); + computeRegisterProperties(); +} + +MVT::SimpleValueType MBlazeTargetLowering::getSetCCResultType(EVT VT) const { + return MVT::i32; +} + +/// getFunctionAlignment - Return the Log2 alignment of this function. +unsigned MBlazeTargetLowering::getFunctionAlignment(const Function *) const { + return 2; +} + +SDValue MBlazeTargetLowering::LowerOperation(SDValue Op, SelectionDAG &DAG) { + switch (Op.getOpcode()) + { + case ISD::ConstantPool: return LowerConstantPool(Op, DAG); + case ISD::GlobalAddress: return LowerGlobalAddress(Op, DAG); + case ISD::GlobalTLSAddress: return LowerGlobalTLSAddress(Op, DAG); + case ISD::JumpTable: return LowerJumpTable(Op, DAG); + case ISD::SELECT_CC: return LowerSELECT_CC(Op, DAG); + } + return SDValue(); +} + +//===----------------------------------------------------------------------===// +// Lower helper functions +//===----------------------------------------------------------------------===// +MachineBasicBlock* MBlazeTargetLowering:: +EmitInstrWithCustomInserter(MachineInstr *MI, MachineBasicBlock *BB, + DenseMap *EM) const { + const TargetInstrInfo *TII = getTargetMachine().getInstrInfo(); + DebugLoc dl = MI->getDebugLoc(); + + switch (MI->getOpcode()) { + default: assert(false && "Unexpected instr type to insert"); + case MBlaze::ShiftRL: + case MBlaze::ShiftRA: + case MBlaze::ShiftL: { + // To "insert" a shift left instruction, we actually have to insert a + // simple loop. The incoming instruction knows the destination vreg to + // set, the source vreg to operate over and the shift amount. + const BasicBlock *LLVM_BB = BB->getBasicBlock(); + MachineFunction::iterator It = BB; + ++It; + + // start: + // andi samt, samt, 31 + // beqid samt, finish + // add dst, src, r0 + // loop: + // addik samt, samt, -1 + // sra dst, dst + // bneid samt, loop + // nop + // finish: + MachineFunction *F = BB->getParent(); + MachineRegisterInfo &R = F->getRegInfo(); + MachineBasicBlock *loop = F->CreateMachineBasicBlock(LLVM_BB); + MachineBasicBlock *finish = F->CreateMachineBasicBlock(LLVM_BB); + + unsigned IAMT = R.createVirtualRegister(MBlaze::CPURegsRegisterClass); + BuildMI(BB, dl, TII->get(MBlaze::ANDI), IAMT) + .addReg(MI->getOperand(2).getReg()) + .addImm(31); + + unsigned IVAL = R.createVirtualRegister(MBlaze::CPURegsRegisterClass); + BuildMI(BB, dl, TII->get(MBlaze::ADDI), IVAL) + .addReg(MI->getOperand(1).getReg()) + .addImm(0); + + BuildMI(BB, dl, TII->get(MBlaze::BEQID)) + .addReg(IAMT) + .addMBB(finish); + + F->insert(It, loop); + F->insert(It, finish); + + // Update machine-CFG edges by first adding all successors of the current + // block to the new block which will contain the Phi node for the select. + // Also inform sdisel of the edge changes. + for(MachineBasicBlock::succ_iterator i = BB->succ_begin(), + e = BB->succ_end(); i != e; ++i) { + EM->insert(std::make_pair(*i, finish)); + finish->addSuccessor(*i); + } + + // Next, remove all successors of the current block, and add the true + // and fallthrough blocks as its successors. + while(!BB->succ_empty()) + BB->removeSuccessor(BB->succ_begin()); + BB->addSuccessor(loop); + BB->addSuccessor(finish); + + // Next, add the finish block as a successor of the loop block + loop->addSuccessor(finish); + loop->addSuccessor(loop); + + unsigned DST = R.createVirtualRegister(MBlaze::CPURegsRegisterClass); + unsigned NDST = R.createVirtualRegister(MBlaze::CPURegsRegisterClass); + BuildMI(loop, dl, TII->get(MBlaze::PHI), DST) + .addReg(IVAL).addMBB(BB) + .addReg(NDST).addMBB(loop); + + unsigned SAMT = R.createVirtualRegister(MBlaze::CPURegsRegisterClass); + unsigned NAMT = R.createVirtualRegister(MBlaze::CPURegsRegisterClass); + BuildMI(loop, dl, TII->get(MBlaze::PHI), SAMT) + .addReg(IAMT).addMBB(BB) + .addReg(NAMT).addMBB(loop); + + if (MI->getOpcode() == MBlaze::ShiftL) + BuildMI(loop, dl, TII->get(MBlaze::ADD), NDST).addReg(DST).addReg(DST); + else if (MI->getOpcode() == MBlaze::ShiftRA) + BuildMI(loop, dl, TII->get(MBlaze::SRA), NDST).addReg(DST); + else if (MI->getOpcode() == MBlaze::ShiftRL) + BuildMI(loop, dl, TII->get(MBlaze::SRL), NDST).addReg(DST); + else + llvm_unreachable( "Cannot lower unknown shift instruction" ); + + BuildMI(loop, dl, TII->get(MBlaze::ADDI), NAMT) + .addReg(SAMT) + .addImm(-1); + + BuildMI(loop, dl, TII->get(MBlaze::BNEID)) + .addReg(NAMT) + .addMBB(loop); + + BuildMI(finish, dl, TII->get(MBlaze::PHI), MI->getOperand(0).getReg()) + .addReg(IVAL).addMBB(BB) + .addReg(NDST).addMBB(loop); + + // The pseudo instruction is no longer needed so remove it + F->DeleteMachineInstr(MI); + return finish; + } + + case MBlaze::Select_FCC: + case MBlaze::Select_CC: { + // To "insert" a SELECT_CC instruction, we actually have to insert the + // diamond control-flow pattern. The incoming instruction knows the + // destination vreg to set, the condition code register to branch on, the + // true/false values to select between, and a branch opcode to use. + const BasicBlock *LLVM_BB = BB->getBasicBlock(); + MachineFunction::iterator It = BB; + ++It; + + // thisMBB: + // ... + // TrueVal = ... + // setcc r1, r2, r3 + // bNE r1, r0, copy1MBB + // fallthrough --> copy0MBB + MachineFunction *F = BB->getParent(); + MachineBasicBlock *flsBB = F->CreateMachineBasicBlock(LLVM_BB); + MachineBasicBlock *dneBB = F->CreateMachineBasicBlock(LLVM_BB); + + unsigned Opc; + switch (MI->getOperand(4).getImm()) { + default: llvm_unreachable( "Unknown branch condition" ); + case MBlazeCC::EQ: Opc = MBlaze::BNEID; break; + case MBlazeCC::NE: Opc = MBlaze::BEQID; break; + case MBlazeCC::GT: Opc = MBlaze::BLEID; break; + case MBlazeCC::LT: Opc = MBlaze::BGEID; break; + case MBlazeCC::GE: Opc = MBlaze::BLTID; break; + case MBlazeCC::LE: Opc = MBlaze::BGTID; break; + } + + BuildMI(BB, dl, TII->get(Opc)) + .addReg(MI->getOperand(3).getReg()) + .addMBB(dneBB); + + F->insert(It, flsBB); + F->insert(It, dneBB); + + // Update machine-CFG edges by first adding all successors of the current + // block to the new block which will contain the Phi node for the select. + // Also inform sdisel of the edge changes. + for(MachineBasicBlock::succ_iterator i = BB->succ_begin(), + e = BB->succ_end(); i != e; ++i) { + EM->insert(std::make_pair(*i, dneBB)); + dneBB->addSuccessor(*i); + } + + // Next, remove all successors of the current block, and add the true + // and fallthrough blocks as its successors. + while(!BB->succ_empty()) + BB->removeSuccessor(BB->succ_begin()); + BB->addSuccessor(flsBB); + BB->addSuccessor(dneBB); + flsBB->addSuccessor(dneBB); + + // sinkMBB: + // %Result = phi [ %FalseValue, copy0MBB ], [ %TrueValue, thisMBB ] + // ... + //BuildMI(dneBB, dl, TII->get(MBlaze::PHI), MI->getOperand(0).getReg()) + // .addReg(MI->getOperand(1).getReg()).addMBB(flsBB) + // .addReg(MI->getOperand(2).getReg()).addMBB(BB); + + BuildMI(dneBB, dl, TII->get(MBlaze::PHI), MI->getOperand(0).getReg()) + .addReg(MI->getOperand(2).getReg()).addMBB(flsBB) + .addReg(MI->getOperand(1).getReg()).addMBB(BB); + + F->DeleteMachineInstr(MI); // The pseudo instruction is gone now. + return dneBB; + } + } +} + +//===----------------------------------------------------------------------===// +// Misc Lower Operation implementation +//===----------------------------------------------------------------------===// +// + +SDValue MBlazeTargetLowering::LowerSELECT_CC(SDValue Op, SelectionDAG &DAG) { + SDValue LHS = Op.getOperand(0); + SDValue RHS = Op.getOperand(1); + SDValue TrueVal = Op.getOperand(2); + SDValue FalseVal = Op.getOperand(3); + DebugLoc dl = Op.getDebugLoc(); + unsigned Opc; + + SDValue CompareFlag; + if (LHS.getValueType() == MVT::i32) { + Opc = MBlazeISD::Select_CC; + CompareFlag = DAG.getNode(MBlazeISD::ICmp, dl, MVT::i32, LHS, RHS) + .getValue(1); + } else { + llvm_unreachable( "Cannot lower select_cc with unknown type" ); + } + + return DAG.getNode(Opc, dl, TrueVal.getValueType(), TrueVal, FalseVal, + CompareFlag); +} + +SDValue MBlazeTargetLowering:: +LowerGlobalAddress(SDValue Op, SelectionDAG &DAG) { + // FIXME there isn't actually debug info here + DebugLoc dl = Op.getDebugLoc(); + GlobalValue *GV = cast(Op)->getGlobal(); + SDValue GA = DAG.getTargetGlobalAddress(GV, MVT::i32); + + return DAG.getNode(MBlazeISD::Wrap, dl, MVT::i32, GA); +} + +SDValue MBlazeTargetLowering:: +LowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) { + llvm_unreachable("TLS not implemented for MicroBlaze."); + return SDValue(); // Not reached +} + +SDValue MBlazeTargetLowering:: +LowerJumpTable(SDValue Op, SelectionDAG &DAG) { + SDValue ResNode; + SDValue HiPart; + // FIXME there isn't actually debug info here + DebugLoc dl = Op.getDebugLoc(); + bool IsPIC = getTargetMachine().getRelocationModel() == Reloc::PIC_; + unsigned char OpFlag = IsPIC ? MBlazeII::MO_GOT : MBlazeII::MO_ABS_HILO; + + EVT PtrVT = Op.getValueType(); + JumpTableSDNode *JT = cast(Op); + + SDValue JTI = DAG.getTargetJumpTable(JT->getIndex(), PtrVT, OpFlag); + return DAG.getNode(MBlazeISD::Wrap, dl, MVT::i32, JTI); + //return JTI; +} + +SDValue MBlazeTargetLowering:: +LowerConstantPool(SDValue Op, SelectionDAG &DAG) { + SDValue ResNode; + EVT PtrVT = Op.getValueType(); + ConstantPoolSDNode *N = cast(Op); + Constant *C = N->getConstVal(); + SDValue Zero = DAG.getConstant(0, PtrVT); + // FIXME there isn't actually debug info here + DebugLoc dl = Op.getDebugLoc(); + + SDValue CP = DAG.getTargetConstantPool(C, MVT::i32, N->getAlignment(), + N->getOffset(), MBlazeII::MO_ABS_HILO); + return DAG.getNode(MBlazeISD::Wrap, dl, MVT::i32, CP); +} + +//===----------------------------------------------------------------------===// +// Calling Convention Implementation +//===----------------------------------------------------------------------===// + +#include "MBlazeGenCallingConv.inc" + +//===----------------------------------------------------------------------===// +// Call Calling Convention Implementation +//===----------------------------------------------------------------------===// + +/// LowerCall - functions arguments are copied from virtual regs to +/// (physical regs)/(stack frame), CALLSEQ_START and CALLSEQ_END are emitted. +/// TODO: isVarArg, isTailCall. +SDValue MBlazeTargetLowering:: +LowerCall(SDValue Chain, SDValue Callee, CallingConv::ID CallConv, + bool isVarArg, bool &isTailCall, + const SmallVectorImpl &Outs, + const SmallVectorImpl &Ins, + DebugLoc dl, SelectionDAG &DAG, + SmallVectorImpl &InVals) { + MachineFunction &MF = DAG.getMachineFunction(); + MachineFrameInfo *MFI = MF.getFrameInfo(); + bool IsPIC = getTargetMachine().getRelocationModel() == Reloc::PIC_; + + // Analyze operands of the call, assigning locations to each operand. + SmallVector ArgLocs; + CCState CCInfo(CallConv, isVarArg, getTargetMachine(), ArgLocs, + *DAG.getContext()); + CCInfo.AnalyzeCallOperands(Outs, CC_MBlaze); + + // Get a count of how many bytes are to be pushed on the stack. + unsigned NumBytes = CCInfo.getNextStackOffset(); + Chain = DAG.getCALLSEQ_START(Chain, DAG.getIntPtrConstant(NumBytes, true)); + + SmallVector, 8> RegsToPass; + SmallVector MemOpChains; + + // First/LastArgStackLoc contains the first/last + // "at stack" argument location. + int LastArgStackLoc = 0; + unsigned FirstStackArgLoc = 4; + + // Walk the register/memloc assignments, inserting copies/loads. + for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) { + CCValAssign &VA = ArgLocs[i]; + EVT RegVT = VA.getLocVT(); + SDValue Arg = Outs[i].Val; + + // Promote the value if needed. + switch (VA.getLocInfo()) { + default: llvm_unreachable("Unknown loc info!"); + case CCValAssign::Full: break; + case CCValAssign::SExt: + Arg = DAG.getNode(ISD::SIGN_EXTEND, dl, RegVT, Arg); + break; + case CCValAssign::ZExt: + Arg = DAG.getNode(ISD::ZERO_EXTEND, dl, RegVT, Arg); + break; + case CCValAssign::AExt: + Arg = DAG.getNode(ISD::ANY_EXTEND, dl, RegVT, Arg); + break; + case CCValAssign::BCvt: + Arg = DAG.getNode(ISD::BIT_CONVERT, dl, RegVT, Arg); + break; + } + + // Arguments that can be passed on register must be kept at + // RegsToPass vector + if (VA.isRegLoc()) { + RegsToPass.push_back(std::make_pair(VA.getLocReg(), Arg)); + } else { + // Register can't get to this point... + assert(VA.isMemLoc()); + + // Create the frame index object for this incoming parameter + LastArgStackLoc = (FirstStackArgLoc + VA.getLocMemOffset()); + int FI = MFI->CreateFixedObject(VA.getValVT().getSizeInBits()/8, + LastArgStackLoc, true, false); + + SDValue PtrOff = DAG.getFrameIndex(FI,getPointerTy()); + + // emit ISD::STORE whichs stores the + // parameter value to a stack Location + MemOpChains.push_back(DAG.getStore(Chain, dl, Arg, PtrOff, NULL, 0, + false, false, 0)); + } + } + + // Transform all store nodes into one single node because all store + // nodes are independent of each other. + if (!MemOpChains.empty()) + Chain = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, + &MemOpChains[0], MemOpChains.size()); + + // Build a sequence of copy-to-reg nodes chained together with token + // chain and flag operands which copy the outgoing args into registers. + // The InFlag in necessary since all emited instructions must be + // stuck together. + SDValue InFlag; + for (unsigned i = 0, e = RegsToPass.size(); i != e; ++i) { + Chain = DAG.getCopyToReg(Chain, dl, RegsToPass[i].first, + RegsToPass[i].second, InFlag); + InFlag = Chain.getValue(1); + } + + // If the callee is a GlobalAddress/ExternalSymbol node (quite common, every + // direct call is) turn it into a TargetGlobalAddress/TargetExternalSymbol + // node so that legalize doesn't hack it. + unsigned char OpFlag = IsPIC ? MBlazeII::MO_GOT_CALL : MBlazeII::MO_NO_FLAG; + if (GlobalAddressSDNode *G = dyn_cast(Callee)) + Callee = DAG.getTargetGlobalAddress(G->getGlobal(), + getPointerTy(), 0, OpFlag); + else if (ExternalSymbolSDNode *S = dyn_cast(Callee)) + Callee = DAG.getTargetExternalSymbol(S->getSymbol(), + getPointerTy(), OpFlag); + + // MBlazeJmpLink = #chain, #target_address, #opt_in_flags... + // = Chain, Callee, Reg#1, Reg#2, ... + // + // Returns a chain & a flag for retval copy to use. + SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Flag); + SmallVector Ops; + Ops.push_back(Chain); + Ops.push_back(Callee); + + // Add argument registers to the end of the list so that they are + // known live into the call. + for (unsigned i = 0, e = RegsToPass.size(); i != e; ++i) { + Ops.push_back(DAG.getRegister(RegsToPass[i].first, + RegsToPass[i].second.getValueType())); + } + + if (InFlag.getNode()) + Ops.push_back(InFlag); + + Chain = DAG.getNode(MBlazeISD::JmpLink, dl, NodeTys, &Ops[0], Ops.size()); + InFlag = Chain.getValue(1); + + // Create the CALLSEQ_END node. + Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(NumBytes, true), + DAG.getIntPtrConstant(0, true), InFlag); + if (!Ins.empty()) + InFlag = Chain.getValue(1); + + // Handle result values, copying them out of physregs into vregs that we + // return. + return LowerCallResult(Chain, InFlag, CallConv, isVarArg, + Ins, dl, DAG, InVals); +} + +/// LowerCallResult - Lower the result values of a call into the +/// appropriate copies out of appropriate physical registers. +SDValue MBlazeTargetLowering:: +LowerCallResult(SDValue Chain, SDValue InFlag, CallingConv::ID CallConv, + bool isVarArg, const SmallVectorImpl &Ins, + DebugLoc dl, SelectionDAG &DAG, + SmallVectorImpl &InVals) { + // Assign locations to each value returned by this call. + SmallVector RVLocs; + CCState CCInfo(CallConv, isVarArg, getTargetMachine(), + RVLocs, *DAG.getContext()); + + CCInfo.AnalyzeCallResult(Ins, RetCC_MBlaze); + + // Copy all of the result registers out of their specified physreg. + for (unsigned i = 0; i != RVLocs.size(); ++i) { + Chain = DAG.getCopyFromReg(Chain, dl, RVLocs[i].getLocReg(), + RVLocs[i].getValVT(), InFlag).getValue(1); + InFlag = Chain.getValue(2); + InVals.push_back(Chain.getValue(0)); + } + + return Chain; +} + +//===----------------------------------------------------------------------===// +// Formal Arguments Calling Convention Implementation +//===----------------------------------------------------------------------===// + +/// LowerFormalArguments - transform physical registers into +/// virtual registers and generate load operations for +/// arguments places on the stack. +/// TODO: isVarArg +SDValue MBlazeTargetLowering:: +LowerFormalArguments(SDValue Chain, CallingConv::ID CallConv, bool isVarArg, + const SmallVectorImpl &Ins, + DebugLoc dl, SelectionDAG &DAG, + SmallVectorImpl &InVals) { + MachineFunction &MF = DAG.getMachineFunction(); + MachineFrameInfo *MFI = MF.getFrameInfo(); + MBlazeFunctionInfo *MBlazeFI = MF.getInfo(); + + unsigned StackReg = MF.getTarget().getRegisterInfo()->getFrameRegister(MF); + + // Assign locations to all of the incoming arguments. + SmallVector ArgLocs; + CCState CCInfo(CallConv, isVarArg, getTargetMachine(), + ArgLocs, *DAG.getContext()); + + CCInfo.AnalyzeFormalArguments(Ins, CC_MBlaze); + SDValue StackPtr; + + unsigned FirstStackArgLoc = 4; + + for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) { + CCValAssign &VA = ArgLocs[i]; + + // Arguments stored on registers + if (VA.isRegLoc()) { + EVT RegVT = VA.getLocVT(); + TargetRegisterClass *RC = 0; + + if (RegVT == MVT::i32) + RC = MBlaze::CPURegsRegisterClass; + else if (RegVT == MVT::f32) + RC = MBlaze::FGR32RegisterClass; + else + llvm_unreachable("RegVT not supported by LowerFormalArguments"); + + // Transform the arguments stored on + // physical registers into virtual ones + unsigned Reg = MF.addLiveIn(VA.getLocReg(), RC); + SDValue ArgValue = DAG.getCopyFromReg(Chain, dl, Reg, RegVT); + + // If this is an 8 or 16-bit value, it has been passed promoted + // to 32 bits. Insert an assert[sz]ext to capture this, then + // truncate to the right size. + if (VA.getLocInfo() != CCValAssign::Full) { + unsigned Opcode = 0; + if (VA.getLocInfo() == CCValAssign::SExt) + Opcode = ISD::AssertSext; + else if (VA.getLocInfo() == CCValAssign::ZExt) + Opcode = ISD::AssertZext; + if (Opcode) + ArgValue = DAG.getNode(Opcode, dl, RegVT, ArgValue, + DAG.getValueType(VA.getValVT())); + ArgValue = DAG.getNode(ISD::TRUNCATE, dl, VA.getValVT(), ArgValue); + } + + InVals.push_back(ArgValue); + + // To meet ABI, when VARARGS are passed on registers, the registers + // must have their values written to the caller stack frame. + if (isVarArg) { + if (StackPtr.getNode() == 0) + StackPtr = DAG.getRegister(StackReg, getPointerTy()); + + // The stack pointer offset is relative to the caller stack frame. + // Since the real stack size is unknown here, a negative SPOffset + // is used so there's a way to adjust these offsets when the stack + // size get known (on EliminateFrameIndex). A dummy SPOffset is + // used instead of a direct negative address (which is recorded to + // be used on emitPrologue) to avoid mis-calc of the first stack + // offset on PEI::calculateFrameObjectOffsets. + // Arguments are always 32-bit. + int FI = MFI->CreateFixedObject(4, 0, true, false); + MBlazeFI->recordStoreVarArgsFI(FI, -(FirstStackArgLoc+(i*4))); + SDValue PtrOff = DAG.getFrameIndex(FI, getPointerTy()); + + // emit ISD::STORE whichs stores the + // parameter value to a stack Location + InVals.push_back(DAG.getStore(Chain, dl, ArgValue, PtrOff, NULL, 0, + false, false, 0)); + } + + } else { // VA.isRegLoc() + + // sanity check + assert(VA.isMemLoc()); + + // The stack pointer offset is relative to the caller stack frame. + // Since the real stack size is unknown here, a negative SPOffset + // is used so there's a way to adjust these offsets when the stack + // size get known (on EliminateFrameIndex). A dummy SPOffset is + // used instead of a direct negative address (which is recorded to + // be used on emitPrologue) to avoid mis-calc of the first stack + // offset on PEI::calculateFrameObjectOffsets. + // Arguments are always 32-bit. + unsigned ArgSize = VA.getLocVT().getSizeInBits()/8; + int FI = MFI->CreateFixedObject(ArgSize, 0, true, false); + MBlazeFI->recordLoadArgsFI(FI, -(ArgSize+ + (FirstStackArgLoc + VA.getLocMemOffset()))); + + // Create load nodes to retrieve arguments from the stack + SDValue FIN = DAG.getFrameIndex(FI, getPointerTy()); + InVals.push_back(DAG.getLoad(VA.getValVT(), dl, Chain, FIN, NULL, 0, + false, false, 0)); + } + } + + return Chain; +} + +//===----------------------------------------------------------------------===// +// Return Value Calling Convention Implementation +//===----------------------------------------------------------------------===// + +SDValue MBlazeTargetLowering:: +LowerReturn(SDValue Chain, CallingConv::ID CallConv, bool isVarArg, + const SmallVectorImpl &Outs, + DebugLoc dl, SelectionDAG &DAG) { + // CCValAssign - represent the assignment of + // the return value to a location + SmallVector RVLocs; + + // CCState - Info about the registers and stack slot. + CCState CCInfo(CallConv, isVarArg, getTargetMachine(), + RVLocs, *DAG.getContext()); + + // Analize return values. + CCInfo.AnalyzeReturn(Outs, RetCC_MBlaze); + + // If this is the first return lowered for this function, add + // the regs to the liveout set for the function. + if (DAG.getMachineFunction().getRegInfo().liveout_empty()) { + for (unsigned i = 0; i != RVLocs.size(); ++i) + if (RVLocs[i].isRegLoc()) + DAG.getMachineFunction().getRegInfo().addLiveOut(RVLocs[i].getLocReg()); + } + + SDValue Flag; + + // Copy the result values into the output registers. + for (unsigned i = 0; i != RVLocs.size(); ++i) { + CCValAssign &VA = RVLocs[i]; + assert(VA.isRegLoc() && "Can only return in registers!"); + + Chain = DAG.getCopyToReg(Chain, dl, VA.getLocReg(), + Outs[i].Val, Flag); + + // guarantee that all emitted copies are + // stuck together, avoiding something bad + Flag = Chain.getValue(1); + } + + // Return on MBlaze is always a "rtsd R15, 8" + if (Flag.getNode()) + return DAG.getNode(MBlazeISD::Ret, dl, MVT::Other, + Chain, DAG.getRegister(MBlaze::R15, MVT::i32), Flag); + else // Return Void + return DAG.getNode(MBlazeISD::Ret, dl, MVT::Other, + Chain, DAG.getRegister(MBlaze::R15, MVT::i32)); +} + +//===----------------------------------------------------------------------===// +// MBlaze Inline Assembly Support +//===----------------------------------------------------------------------===// + +/// getConstraintType - Given a constraint letter, return the type of +/// constraint it is for this target. +MBlazeTargetLowering::ConstraintType MBlazeTargetLowering:: +getConstraintType(const std::string &Constraint) const +{ + // MBlaze specific constrainy + // + // 'd' : An address register. Equivalent to r. + // 'y' : Equivalent to r; retained for + // backwards compatibility. + // 'f' : Floating Point registers. + if (Constraint.size() == 1) { + switch (Constraint[0]) { + default : break; + case 'd': + case 'y': + case 'f': + return C_RegisterClass; + break; + } + } + return TargetLowering::getConstraintType(Constraint); +} + +/// getRegClassForInlineAsmConstraint - Given a constraint letter (e.g. "r"), +/// return a list of registers that can be used to satisfy the constraint. +/// This should only be used for C_RegisterClass constraints. +std::pair MBlazeTargetLowering:: +getRegForInlineAsmConstraint(const std::string &Constraint, EVT VT) const { + if (Constraint.size() == 1) { + switch (Constraint[0]) { + case 'r': + return std::make_pair(0U, MBlaze::CPURegsRegisterClass); + case 'f': + if (VT == MVT::f32) + return std::make_pair(0U, MBlaze::FGR32RegisterClass); + } + } + return TargetLowering::getRegForInlineAsmConstraint(Constraint, VT); +} + +/// Given a register class constraint, like 'r', if this corresponds directly +/// to an LLVM register class, return a register of 0 and the register class +/// pointer. +std::vector MBlazeTargetLowering:: +getRegClassForInlineAsmConstraint(const std::string &Constraint, EVT VT) const { + if (Constraint.size() != 1) + return std::vector(); + + switch (Constraint[0]) { + default : break; + case 'r': + // GCC MBlaze Constraint Letters + case 'd': + case 'y': + return make_vector( + MBlaze::R3, MBlaze::R4, MBlaze::R5, MBlaze::R6, + MBlaze::R7, MBlaze::R9, MBlaze::R10, MBlaze::R11, + MBlaze::R12, MBlaze::R19, MBlaze::R20, MBlaze::R21, + MBlaze::R22, MBlaze::R23, MBlaze::R24, MBlaze::R25, + MBlaze::R26, MBlaze::R27, MBlaze::R28, MBlaze::R29, + MBlaze::R30, MBlaze::R31, 0); + + case 'f': + return make_vector( + MBlaze::F3, MBlaze::F4, MBlaze::F5, MBlaze::F6, + MBlaze::F7, MBlaze::F9, MBlaze::F10, MBlaze::F11, + MBlaze::F12, MBlaze::F19, MBlaze::F20, MBlaze::F21, + MBlaze::F22, MBlaze::F23, MBlaze::F24, MBlaze::F25, + MBlaze::F26, MBlaze::F27, MBlaze::F28, MBlaze::F29, + MBlaze::F30, MBlaze::F31, 0); + } + return std::vector(); +} + +bool MBlazeTargetLowering:: +isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const { + // The MBlaze target isn't yet aware of offsets. + return false; +} + +bool MBlazeTargetLowering::isFPImmLegal(const APFloat &Imm, EVT VT) const { + return VT != MVT::f32; +} Added: llvm/trunk/lib/Target/MBlaze/MBlazeISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeISelLowering.h?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeISelLowering.h (added) +++ llvm/trunk/lib/Target/MBlaze/MBlazeISelLowering.h Tue Feb 23 13:15:24 2010 @@ -0,0 +1,146 @@ +//===-- MBlazeISelLowering.h - MBlaze DAG Lowering Interface ----*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines the interfaces that MBlaze uses to lower LLVM code into a +// selection DAG. +// +//===----------------------------------------------------------------------===// + +#ifndef MBlazeISELLOWERING_H +#define MBlazeISELLOWERING_H + +#include "llvm/CodeGen/SelectionDAG.h" +#include "llvm/Target/TargetLowering.h" +#include "MBlaze.h" +#include "MBlazeSubtarget.h" + +namespace llvm { + namespace MBlazeCC { + enum CC { + FIRST = 0, + EQ, + NE, + GT, + LT, + GE, + LE + }; + } + + namespace MBlazeISD { + enum NodeType { + // Start the numbering from where ISD NodeType finishes. + FIRST_NUMBER = ISD::BUILTIN_OP_END, + + // Jump and link (call) + JmpLink, + + // Handle gp_rel (small data/bss sections) relocation. + GPRel, + + // Select CC Pseudo Instruction + Select_CC, + + // Wrap up multiple types of instructions + Wrap, + + // Integer Compare + ICmp, + + // Return + Ret + }; + } + + //===--------------------------------------------------------------------===// + // TargetLowering Implementation + //===--------------------------------------------------------------------===// + + class MBlazeTargetLowering : public TargetLowering { + public: + + explicit MBlazeTargetLowering(MBlazeTargetMachine &TM); + + /// LowerOperation - Provide custom lowering hooks for some operations. + virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG); + + /// getTargetNodeName - This method returns the name of a target specific + // DAG node. + virtual const char *getTargetNodeName(unsigned Opcode) const; + + /// getSetCCResultType - get the ISD::SETCC result ValueType + MVT::SimpleValueType getSetCCResultType(EVT VT) const; + + virtual unsigned getFunctionAlignment(const Function *F) const; + private: + // Subtarget Info + const MBlazeSubtarget *Subtarget; + + + // Lower Operand helpers + SDValue LowerCallResult(SDValue Chain, SDValue InFlag, + CallingConv::ID CallConv, bool isVarArg, + const SmallVectorImpl &Ins, + DebugLoc dl, SelectionDAG &DAG, + SmallVectorImpl &InVals); + + // Lower Operand specifics + SDValue LowerConstantPool(SDValue Op, SelectionDAG &DAG); + SDValue LowerGlobalAddress(SDValue Op, SelectionDAG &DAG); + SDValue LowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG); + SDValue LowerJumpTable(SDValue Op, SelectionDAG &DAG); + SDValue LowerSELECT_CC(SDValue Op, SelectionDAG &DAG); + + virtual SDValue + LowerFormalArguments(SDValue Chain, + CallingConv::ID CallConv, bool isVarArg, + const SmallVectorImpl &Ins, + DebugLoc dl, SelectionDAG &DAG, + SmallVectorImpl &InVals); + + virtual SDValue + LowerCall(SDValue Chain, SDValue Callee, + CallingConv::ID CallConv, bool isVarArg, + bool &isTailCall, + const SmallVectorImpl &Outs, + const SmallVectorImpl &Ins, + DebugLoc dl, SelectionDAG &DAG, + SmallVectorImpl &InVals); + + virtual SDValue + LowerReturn(SDValue Chain, + CallingConv::ID CallConv, bool isVarArg, + const SmallVectorImpl &Outs, + DebugLoc dl, SelectionDAG &DAG); + + virtual MachineBasicBlock *EmitInstrWithCustomInserter(MachineInstr *MI, + MachineBasicBlock *MBB, + DenseMap *EM) const; + + // Inline asm support + ConstraintType getConstraintType(const std::string &Constraint) const; + + std::pair + getRegForInlineAsmConstraint(const std::string &Constraint, + EVT VT) const; + + std::vector + getRegClassForInlineAsmConstraint(const std::string &Constraint, + EVT VT) const; + + virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const; + + /// isFPImmLegal - Returns true if the target can instruction select the + /// specified FP immediate natively. If false, the legalizer will + /// materialize the FP immediate as a load from a constant pool. + virtual bool isFPImmLegal(const APFloat &Imm, EVT VT) const; + }; +} + +#endif // MBlazeISELLOWERING_H Added: llvm/trunk/lib/Target/MBlaze/MBlazeInstrFPU.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeInstrFPU.td?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeInstrFPU.td (added) +++ llvm/trunk/lib/Target/MBlaze/MBlazeInstrFPU.td Tue Feb 23 13:15:24 2010 @@ -0,0 +1,223 @@ +//===- MBlazeInstrFPU.td - MBlaze FPU Instruction defs ----------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +//===----------------------------------------------------------------------===// +// MBlaze profiles and nodes +//===----------------------------------------------------------------------===// + +//===----------------------------------------------------------------------===// +// MBlaze Operand, Complex Patterns and Transformations Definitions. +//===----------------------------------------------------------------------===// + +//===----------------------------------------------------------------------===// +// Memory Access Instructions +//===----------------------------------------------------------------------===// +class LoadFM op, string instr_asm, PatFrag OpNode> : + TA; + +class LoadFMI op, string instr_asm, PatFrag OpNode> : + TAI; + +class StoreFM op, string instr_asm, PatFrag OpNode> : + TA; + +class StoreFMI op, string instr_asm, PatFrag OpNode> : + TAI; + +class ArithF op, bits<11> flags, string instr_asm, SDNode OpNode, + InstrItinClass itin> : + TA; + +class CmpFN op, bits<11> flags, string instr_asm, + InstrItinClass itin> : + TA; + +class ArithFR op, bits<11> flags, string instr_asm, SDNode OpNode, + InstrItinClass itin> : + TA; + +class ArithF2 op, bits<11> flags, string instr_asm, + InstrItinClass itin> : + TF; + +class ArithIF op, bits<11> flags, string instr_asm, + InstrItinClass itin> : + TF; + +class ArithFI op, bits<11> flags, string instr_asm, + InstrItinClass itin> : + TF; + +class LogicF op, string instr_asm> : + TAI; + +class LogicFI op, string instr_asm> : + TAI; + +//===----------------------------------------------------------------------===// +// Pseudo instructions +//===----------------------------------------------------------------------===// + +//===----------------------------------------------------------------------===// +// FPU Arithmetic Instructions +//===----------------------------------------------------------------------===// +let Predicates=[HasFPU] in { + def FOR : LogicF<0x28, "or ">; + def FORI : LogicFI<0x28, "ori ">; + def FADD : ArithF<0x16, 0x000, "fadd ", fadd, IIAlu>; + def FRSUB : ArithFR<0x16, 0x080, "frsub ", fsub, IIAlu>; + def FMUL : ArithF<0x16, 0x100, "fmul ", fmul, IIAlu>; + def FDIV : ArithF<0x16, 0x180, "fdiv ", fdiv, IIAlu>; + + def LWF : LoadFM<0x32, "lw ", load>; + def LWFI : LoadFMI<0x32, "lwi ", load>; + + def SWF : StoreFM<0x32, "sw ", store>; + def SWFI : StoreFMI<0x32, "swi ", store>; +} + +let Predicates=[HasFPU,HasSqrt] in { + def FLT : ArithIF<0x16, 0x280, "flt ", IIAlu>; + def FINT : ArithFI<0x16, 0x300, "fint ", IIAlu>; + def FSQRT : ArithF2<0x16, 0x300, "fsqrt ", IIAlu>; +} + +let isAsCheapAsAMove = 1 in { + def FCMP_UN : CmpFN<0x16, 0x200, "fcmp.un", IIAlu>; + def FCMP_LT : CmpFN<0x16, 0x210, "fcmp.lt", IIAlu>; + def FCMP_EQ : CmpFN<0x16, 0x220, "fcmp.eq", IIAlu>; + def FCMP_LE : CmpFN<0x16, 0x230, "fcmp.le", IIAlu>; + def FCMP_GT : CmpFN<0x16, 0x240, "fcmp.gt", IIAlu>; + def FCMP_NE : CmpFN<0x16, 0x250, "fcmp.ne", IIAlu>; + def FCMP_GE : CmpFN<0x16, 0x260, "fcmp.ge", IIAlu>; +} + + +let usesCustomInserter = 1 in { + def Select_FCC : MBlazePseudo<(outs FGR32:$dst), + (ins FGR32:$T, FGR32:$F, CPURegs:$CMP, i32imm:$CC), + "; SELECT_FCC PSEUDO!", + []>; +} + +// Floating point conversions +let Predicates=[HasFPU] in { + def : Pat<(sint_to_fp CPURegs:$V), (FLT CPURegs:$V)>; + def : Pat<(fp_to_sint FGR32:$V), (FINT FGR32:$V)>; + def : Pat<(fsqrt FGR32:$V), (FSQRT FGR32:$V)>; +} + +// SET_CC operations +let Predicates=[HasFPU] in { + def : Pat<(setcc FGR32:$L, FGR32:$R, SETEQ), + (Select_CC (ADDI R0, 1), (ADDI R0, 0), + (FCMP_EQ FGR32:$L, FGR32:$R), 2)>; + def : Pat<(setcc FGR32:$L, FGR32:$R, SETNE), + (Select_CC (ADDI R0, 1), (ADDI R0, 0), + (FCMP_EQ FGR32:$L, FGR32:$R), 1)>; + def : Pat<(setcc FGR32:$L, FGR32:$R, SETOEQ), + (Select_CC (ADDI R0, 1), (ADDI R0, 0), + (FCMP_EQ FGR32:$L, FGR32:$R), 2)>; + def : Pat<(setcc FGR32:$L, FGR32:$R, SETONE), + (Select_CC (ADDI R0, 1), (ADDI R0, 0), + (XOR (FCMP_UN FGR32:$L, FGR32:$R), + (FCMP_EQ FGR32:$L, FGR32:$R)), 2)>; + def : Pat<(setcc FGR32:$L, FGR32:$R, SETONE), + (Select_CC (ADDI R0, 1), (ADDI R0, 0), + (OR (FCMP_UN FGR32:$L, FGR32:$R), + (FCMP_EQ FGR32:$L, FGR32:$R)), 2)>; + def : Pat<(setcc FGR32:$L, FGR32:$R, SETGT), + (Select_CC (ADDI R0, 1), (ADDI R0, 0), + (FCMP_GT FGR32:$L, FGR32:$R), 2)>; + def : Pat<(setcc FGR32:$L, FGR32:$R, SETLT), + (Select_CC (ADDI R0, 1), (ADDI R0, 0), + (FCMP_LT FGR32:$L, FGR32:$R), 2)>; + def : Pat<(setcc FGR32:$L, FGR32:$R, SETGE), + (Select_CC (ADDI R0, 1), (ADDI R0, 0), + (FCMP_GE FGR32:$L, FGR32:$R), 2)>; + def : Pat<(setcc FGR32:$L, FGR32:$R, SETLE), + (Select_CC (ADDI R0, 1), (ADDI R0, 0), + (FCMP_LE FGR32:$L, FGR32:$R), 2)>; + def : Pat<(setcc FGR32:$L, FGR32:$R, SETOGT), + (Select_CC (ADDI R0, 1), (ADDI R0, 0), + (FCMP_GT FGR32:$L, FGR32:$R), 2)>; + def : Pat<(setcc FGR32:$L, FGR32:$R, SETOLT), + (Select_CC (ADDI R0, 1), (ADDI R0, 0), + (FCMP_LT FGR32:$L, FGR32:$R), 2)>; + def : Pat<(setcc FGR32:$L, FGR32:$R, SETOGE), + (Select_CC (ADDI R0, 1), (ADDI R0, 0), + (FCMP_GE FGR32:$L, FGR32:$R), 2)>; + def : Pat<(setcc FGR32:$L, FGR32:$R, SETOLE), + (Select_CC (ADDI R0, 1), (ADDI R0, 0), + (FCMP_LE FGR32:$L, FGR32:$R), 2)>; + def : Pat<(setcc FGR32:$L, FGR32:$R, SETUEQ), + (Select_CC (ADDI R0, 1), (ADDI R0, 0), + (OR (FCMP_UN FGR32:$L, FGR32:$R), + (FCMP_EQ FGR32:$L, FGR32:$R)), 2)>; + def : Pat<(setcc FGR32:$L, FGR32:$R, SETUNE), + (Select_CC (ADDI R0, 1), (ADDI R0, 0), + (FCMP_NE FGR32:$L, FGR32:$R), 2)>; + def : Pat<(setcc FGR32:$L, FGR32:$R, SETUGT), + (Select_CC (ADDI R0, 1), (ADDI R0, 0), + (OR (FCMP_UN FGR32:$L, FGR32:$R), + (FCMP_GT FGR32:$L, FGR32:$R)), 2)>; + def : Pat<(setcc FGR32:$L, FGR32:$R, SETULT), + (Select_CC (ADDI R0, 1), (ADDI R0, 0), + (OR (FCMP_UN FGR32:$L, FGR32:$R), + (FCMP_LT FGR32:$L, FGR32:$R)), 2)>; + def : Pat<(setcc FGR32:$L, FGR32:$R, SETUGE), + (Select_CC (ADDI R0, 1), (ADDI R0, 0), + (OR (FCMP_UN FGR32:$L, FGR32:$R), + (FCMP_GE FGR32:$L, FGR32:$R)), 2)>; + def : Pat<(setcc FGR32:$L, FGR32:$R, SETULE), + (Select_CC (ADDI R0, 1), (ADDI R0, 0), + (OR (FCMP_UN FGR32:$L, FGR32:$R), + (FCMP_LE FGR32:$L, FGR32:$R)), 2)>; + def : Pat<(setcc FGR32:$L, FGR32:$R, SETO), + (Select_CC (ADDI R0, 1), (ADDI R0, 0), + (FCMP_UN FGR32:$L, FGR32:$R), 1)>; + def : Pat<(setcc FGR32:$L, FGR32:$R, SETUO), + (Select_CC (ADDI R0, 1), (ADDI R0, 0), + (FCMP_UN FGR32:$L, FGR32:$R), 2)>; +} + +// SELECT operations +def : Pat<(select CPURegs:$C, FGR32:$T, FGR32:$F), + (Select_FCC FGR32:$T, FGR32:$F, CPURegs:$C, 2)>; + +//===----------------------------------------------------------------------===// +// Patterns for Floating Point Instructions +//===----------------------------------------------------------------------===// +def : Pat<(f32 fpimm:$imm), (FORI F0, fpimm:$imm)>; Added: llvm/trunk/lib/Target/MBlaze/MBlazeInstrFSL.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeInstrFSL.td?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeInstrFSL.td (added) +++ llvm/trunk/lib/Target/MBlaze/MBlazeInstrFSL.td Tue Feb 23 13:15:24 2010 @@ -0,0 +1,153 @@ +//===- MBlazeInstrFSL.td - MBlaze FSL Instruction defs ----------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +//===----------------------------------------------------------------------===// +// FSL Instruction Formats +//===----------------------------------------------------------------------===// +class FSLGetD op, bits<11> flags, string instr_asm, Intrinsic OpNode> : + TA; + +class FSLGet op, string instr_asm, Intrinsic OpNode> : + TAI; + +class FSLPutD op, bits<11> flags, string instr_asm, Intrinsic OpNode> : + TA; + +class FSLPut op, string instr_asm, Intrinsic OpNode> : + TAI; + +class FSLPutTD op, bits<11> flags, string instr_asm, Intrinsic OpNode> : + TA; + +class FSLPutT op, string instr_asm, Intrinsic OpNode> : + TAI; + +//===----------------------------------------------------------------------===// +// FSL Get Instructions +//===----------------------------------------------------------------------===// +def GET : FSLGet<0x1B, "get ", int_mblaze_fsl_get>; +def AGET : FSLGet<0x1B, "aget ", int_mblaze_fsl_aget>; +def CGET : FSLGet<0x1B, "cget ", int_mblaze_fsl_cget>; +def CAGET : FSLGet<0x1B, "caget ", int_mblaze_fsl_caget>; +def EGET : FSLGet<0x1B, "eget ", int_mblaze_fsl_eget>; +def EAGET : FSLGet<0x1B, "eaget ", int_mblaze_fsl_eaget>; +def ECGET : FSLGet<0x1B, "ecget ", int_mblaze_fsl_ecget>; +def ECAGET : FSLGet<0x1B, "ecaget ", int_mblaze_fsl_ecaget>; +def NGET : FSLGet<0x1B, "nget ", int_mblaze_fsl_nget>; +def NAGET : FSLGet<0x1B, "naget ", int_mblaze_fsl_naget>; +def NCGET : FSLGet<0x1B, "ncget ", int_mblaze_fsl_ncget>; +def NCAGET : FSLGet<0x1B, "ncaget ", int_mblaze_fsl_ncaget>; +def NEGET : FSLGet<0x1B, "neget ", int_mblaze_fsl_neget>; +def NEAGET : FSLGet<0x1B, "neaget ", int_mblaze_fsl_neaget>; +def NECGET : FSLGet<0x1B, "necget ", int_mblaze_fsl_necget>; +def NECAGET : FSLGet<0x1B, "necaget ", int_mblaze_fsl_necaget>; +def TGET : FSLGet<0x1B, "tget ", int_mblaze_fsl_tget>; +def TAGET : FSLGet<0x1B, "taget ", int_mblaze_fsl_taget>; +def TCGET : FSLGet<0x1B, "tcget ", int_mblaze_fsl_tcget>; +def TCAGET : FSLGet<0x1B, "tcaget ", int_mblaze_fsl_tcaget>; +def TEGET : FSLGet<0x1B, "teget ", int_mblaze_fsl_teget>; +def TEAGET : FSLGet<0x1B, "teaget ", int_mblaze_fsl_teaget>; +def TECGET : FSLGet<0x1B, "tecget ", int_mblaze_fsl_tecget>; +def TECAGET : FSLGet<0x1B, "tecaget ", int_mblaze_fsl_tecaget>; +def TNGET : FSLGet<0x1B, "tnget ", int_mblaze_fsl_tnget>; +def TNAGET : FSLGet<0x1B, "tnaget ", int_mblaze_fsl_tnaget>; +def TNCGET : FSLGet<0x1B, "tncget ", int_mblaze_fsl_tncget>; +def TNCAGET : FSLGet<0x1B, "tncaget ", int_mblaze_fsl_tncaget>; +def TNEGET : FSLGet<0x1B, "tneget ", int_mblaze_fsl_tneget>; +def TNEAGET : FSLGet<0x1B, "tneaget ", int_mblaze_fsl_tneaget>; +def TNECGET : FSLGet<0x1B, "tnecget ", int_mblaze_fsl_tnecget>; +def TNECAGET : FSLGet<0x1B, "tnecaget ", int_mblaze_fsl_tnecaget>; + +//===----------------------------------------------------------------------===// +// FSL Dynamic Get Instructions +//===----------------------------------------------------------------------===// +def GETD : FSLGetD<0x1B, 0x00, "getd ", int_mblaze_fsl_get>; +def AGETD : FSLGetD<0x1B, 0x00, "agetd ", int_mblaze_fsl_aget>; +def CGETD : FSLGetD<0x1B, 0x00, "cgetd ", int_mblaze_fsl_cget>; +def CAGETD : FSLGetD<0x1B, 0x00, "cagetd ", int_mblaze_fsl_caget>; +def EGETD : FSLGetD<0x1B, 0x00, "egetd ", int_mblaze_fsl_eget>; +def EAGETD : FSLGetD<0x1B, 0x00, "eagetd ", int_mblaze_fsl_eaget>; +def ECGETD : FSLGetD<0x1B, 0x00, "ecgetd ", int_mblaze_fsl_ecget>; +def ECAGETD : FSLGetD<0x1B, 0x00, "ecagetd ", int_mblaze_fsl_ecaget>; +def NGETD : FSLGetD<0x1B, 0x00, "ngetd ", int_mblaze_fsl_nget>; +def NAGETD : FSLGetD<0x1B, 0x00, "nagetd ", int_mblaze_fsl_naget>; +def NCGETD : FSLGetD<0x1B, 0x00, "ncgetd ", int_mblaze_fsl_ncget>; +def NCAGETD : FSLGetD<0x1B, 0x00, "ncagetd ", int_mblaze_fsl_ncaget>; +def NEGETD : FSLGetD<0x1B, 0x00, "negetd ", int_mblaze_fsl_neget>; +def NEAGETD : FSLGetD<0x1B, 0x00, "neagetd ", int_mblaze_fsl_neaget>; +def NECGETD : FSLGetD<0x1B, 0x00, "necgetd ", int_mblaze_fsl_necget>; +def NECAGETD : FSLGetD<0x1B, 0x00, "necagetd ", int_mblaze_fsl_necaget>; +def TGETD : FSLGetD<0x1B, 0x00, "tgetd ", int_mblaze_fsl_tget>; +def TAGETD : FSLGetD<0x1B, 0x00, "tagetd ", int_mblaze_fsl_taget>; +def TCGETD : FSLGetD<0x1B, 0x00, "tcgetd ", int_mblaze_fsl_tcget>; +def TCAGETD : FSLGetD<0x1B, 0x00, "tcagetd ", int_mblaze_fsl_tcaget>; +def TEGETD : FSLGetD<0x1B, 0x00, "tegetd ", int_mblaze_fsl_teget>; +def TEAGETD : FSLGetD<0x1B, 0x00, "teagetd ", int_mblaze_fsl_teaget>; +def TECGETD : FSLGetD<0x1B, 0x00, "tecgetd ", int_mblaze_fsl_tecget>; +def TECAGETD : FSLGetD<0x1B, 0x00, "tecagetd ", int_mblaze_fsl_tecaget>; +def TNGETD : FSLGetD<0x1B, 0x00, "tngetd ", int_mblaze_fsl_tnget>; +def TNAGETD : FSLGetD<0x1B, 0x00, "tnagetd ", int_mblaze_fsl_tnaget>; +def TNCGETD : FSLGetD<0x1B, 0x00, "tncgetd ", int_mblaze_fsl_tncget>; +def TNCAGETD : FSLGetD<0x1B, 0x00, "tncagetd ", int_mblaze_fsl_tncaget>; +def TNEGETD : FSLGetD<0x1B, 0x00, "tnegetd ", int_mblaze_fsl_tneget>; +def TNEAGETD : FSLGetD<0x1B, 0x00, "tneagetd ", int_mblaze_fsl_tneaget>; +def TNECGETD : FSLGetD<0x1B, 0x00, "tnecgetd ", int_mblaze_fsl_tnecget>; +def TNECAGETD : FSLGetD<0x1B, 0x00, "tnecagetd", int_mblaze_fsl_tnecaget>; + +//===----------------------------------------------------------------------===// +// FSL Put Instructions +//===----------------------------------------------------------------------===// +def PUT : FSLPut<0x1B, "put ", int_mblaze_fsl_put>; +def APUT : FSLPut<0x1B, "aput ", int_mblaze_fsl_aput>; +def CPUT : FSLPut<0x1B, "cput ", int_mblaze_fsl_cput>; +def CAPUT : FSLPut<0x1B, "caput ", int_mblaze_fsl_caput>; +def NPUT : FSLPut<0x1B, "nput ", int_mblaze_fsl_nput>; +def NAPUT : FSLPut<0x1B, "naput ", int_mblaze_fsl_naput>; +def NCPUT : FSLPut<0x1B, "ncput ", int_mblaze_fsl_ncput>; +def NCAPUT : FSLPut<0x1B, "ncaput ", int_mblaze_fsl_ncaput>; +def TPUT : FSLPutT<0x1B, "tput ", int_mblaze_fsl_tput>; +def TAPUT : FSLPutT<0x1B, "taput ", int_mblaze_fsl_taput>; +def TCPUT : FSLPutT<0x1B, "tcput ", int_mblaze_fsl_tcput>; +def TCAPUT : FSLPutT<0x1B, "tcaput ", int_mblaze_fsl_tcaput>; +def TNPUT : FSLPutT<0x1B, "tnput ", int_mblaze_fsl_tnput>; +def TNAPUT : FSLPutT<0x1B, "tnaput ", int_mblaze_fsl_tnaput>; +def TNCPUT : FSLPutT<0x1B, "tncput ", int_mblaze_fsl_tncput>; +def TNCAPUT : FSLPutT<0x1B, "tncaput ", int_mblaze_fsl_tncaput>; + +//===----------------------------------------------------------------------===// +// FSL Dynamic Put Instructions +//===----------------------------------------------------------------------===// +def PUTD : FSLPutD<0x1B, 0x00, "putd ", int_mblaze_fsl_put>; +def APUTD : FSLPutD<0x1B, 0x00, "aputd ", int_mblaze_fsl_aput>; +def CPUTD : FSLPutD<0x1B, 0x00, "cputd ", int_mblaze_fsl_cput>; +def CAPUTD : FSLPutD<0x1B, 0x00, "caputd ", int_mblaze_fsl_caput>; +def NPUTD : FSLPutD<0x1B, 0x00, "nputd ", int_mblaze_fsl_nput>; +def NAPUTD : FSLPutD<0x1B, 0x00, "naputd ", int_mblaze_fsl_naput>; +def NCPUTD : FSLPutD<0x1B, 0x00, "ncputd ", int_mblaze_fsl_ncput>; +def NCAPUTD : FSLPutD<0x1B, 0x00, "ncaputd ", int_mblaze_fsl_ncaput>; +def TPUTD : FSLPutTD<0x1B, 0x00, "tputd ", int_mblaze_fsl_tput>; +def TAPUTD : FSLPutTD<0x1B, 0x00, "taputd ", int_mblaze_fsl_taput>; +def TCPUTD : FSLPutTD<0x1B, 0x00, "tcputd ", int_mblaze_fsl_tcput>; +def TCAPUTD : FSLPutTD<0x1B, 0x00, "tcaputd ", int_mblaze_fsl_tcaput>; +def TNPUTD : FSLPutTD<0x1B, 0x00, "tnputd ", int_mblaze_fsl_tnput>; +def TNAPUTD : FSLPutTD<0x1B, 0x00, "tnaputd ", int_mblaze_fsl_tnaput>; +def TNCPUTD : FSLPutTD<0x1B, 0x00, "tncputd ", int_mblaze_fsl_tncput>; +def TNCAPUTD : FSLPutTD<0x1B, 0x00, "tncaputd ", int_mblaze_fsl_tncaput>; Added: llvm/trunk/lib/Target/MBlaze/MBlazeInstrFormats.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeInstrFormats.td?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeInstrFormats.td (added) +++ llvm/trunk/lib/Target/MBlaze/MBlazeInstrFormats.td Tue Feb 23 13:15:24 2010 @@ -0,0 +1,246 @@ +//===- MBlazeInstrFormats.td - MB Instruction defs --------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +//===----------------------------------------------------------------------===// +// Describe MBlaze instructions format +// +// CPU INSTRUCTION FORMATS +// +// opcode - operation code. +// rd - dst reg. +// ra - first src. reg. +// rb - second src. reg. +// imm16 - 16-bit immediate value. +// +//===----------------------------------------------------------------------===// + +// Generic MBlaze Format +class MBlazeInst pattern, + InstrItinClass itin> : Instruction +{ + field bits<32> Inst; + + let Namespace = "MBlaze"; + + bits<6> opcode; + + // Top 6 bits are the 'opcode' field + let Inst{0-5} = opcode; + + dag OutOperandList = outs; + dag InOperandList = ins; + + let AsmString = asmstr; + let Pattern = pattern; + let Itinerary = itin; +} + +//===----------------------------------------------------------------------===// +// Pseudo instruction class +//===----------------------------------------------------------------------===// +class MBlazePseudo pattern>: + MBlazeInst; + +//===----------------------------------------------------------------------===// +// Type A instruction class in MBlaze : <|opcode|rd|ra|rb|flags|> +//===----------------------------------------------------------------------===// + +class TA op, bits<11> flags, dag outs, dag ins, string asmstr, + list pattern, InstrItinClass itin> : + MBlazeInst +{ + bits<5> rd; + bits<5> ra; + bits<5> rb; + + let opcode = op; + + let Inst{6-10} = rd; + let Inst{11-15} = ra; + let Inst{16-20} = rb; + let Inst{21-31} = flags; +} + +class TAI op, dag outs, dag ins, string asmstr, + list pattern, InstrItinClass itin> : + MBlazeInst +{ + bits<5> rd; + bits<5> ra; + bits<16> imm16; + + let opcode = op; + + let Inst{6-10} = rd; + let Inst{11-15} = ra; + let Inst{16-31} = imm16; +} + +class TIMM op, dag outs, dag ins, string asmstr, + list pattern, InstrItinClass itin> : + MBlazeInst +{ + bits<5> ra; + bits<16> imm16; + + let opcode = op; + + let Inst{6-15} = 0; + let Inst{16-31} = imm16; +} + +class TADDR op, dag outs, dag ins, string asmstr, + list pattern, InstrItinClass itin> : + MBlazeInst +{ + bits<26> addr; + + let opcode = op; + + let Inst{6-31} = addr; +} + +//===----------------------------------------------------------------------===// +// Type B instruction class in MBlaze : <|opcode|rd|ra|immediate|> +//===----------------------------------------------------------------------===// + +class TB op, dag outs, dag ins, string asmstr, list pattern, + InstrItinClass itin> : + MBlazeInst +{ + bits<5> rd; + bits<5> ra; + bits<16> imm16; + + let opcode = op; + + let Inst{6-10} = rd; + let Inst{11-15} = ra; + let Inst{16-31} = imm16; +} + +//===----------------------------------------------------------------------===// +// Float instruction class in MBlaze : <|opcode|rd|ra|flags|> +//===----------------------------------------------------------------------===// + +class TF op, bits<11> flags, dag outs, dag ins, string asmstr, + list pattern, InstrItinClass itin> : + MBlazeInst +{ + bits<5> rd; + bits<5> ra; + + let opcode = op; + + let Inst{6-10} = rd; + let Inst{11-15} = ra; + let Inst{16-20} = 0; + let Inst{21-31} = flags; +} + +//===----------------------------------------------------------------------===// +// Branch instruction class in MBlaze : <|opcode|rd|br|ra|flags|> +//===----------------------------------------------------------------------===// + +class TBR op, bits<5> br, bits<11> flags, dag outs, dag ins, + string asmstr, list pattern, InstrItinClass itin> : + MBlazeInst +{ + bits<5> ra; + + let opcode = op; + + let Inst{6-10} = 0; + let Inst{11-15} = br; + let Inst{16-20} = ra; + let Inst{21-31} = flags; +} + +class TBRC op, bits<5> br, bits<11> flags, dag outs, dag ins, + string asmstr, list pattern, InstrItinClass itin> : + MBlazeInst +{ + bits<5> ra; + bits<5> rb; + + let opcode = op; + + let Inst{6-10} = br; + let Inst{11-15} = ra; + let Inst{16-20} = rb; + let Inst{21-31} = flags; +} + +class TBRL op, bits<5> br, bits<11> flags, dag outs, dag ins, + string asmstr, list pattern, InstrItinClass itin> : + MBlazeInst +{ + bits<5> ra; + + let opcode = op; + + let Inst{6-10} = 0xF; + let Inst{11-15} = br; + let Inst{16-20} = ra; + let Inst{21-31} = flags; +} + +class TBRI op, bits<5> br, dag outs, dag ins, + string asmstr, list pattern, InstrItinClass itin> : + MBlazeInst +{ + bits<16> imm16; + + let opcode = op; + + let Inst{6-10} = 0; + let Inst{11-15} = br; + let Inst{16-31} = imm16; +} + +class TBRLI op, bits<5> br, dag outs, dag ins, + string asmstr, list pattern, InstrItinClass itin> : + MBlazeInst +{ + bits<16> imm16; + + let opcode = op; + + let Inst{6-10} = 0xF; + let Inst{11-15} = br; + let Inst{16-31} = imm16; +} + +class TBRCI op, bits<5> br, dag outs, dag ins, + string asmstr, list pattern, InstrItinClass itin> : + MBlazeInst +{ + bits<5> ra; + bits<16> imm16; + + let opcode = op; + + let Inst{6-10} = br; + let Inst{11-15} = ra; + let Inst{16-31} = imm16; +} + +class TRET op, dag outs, dag ins, + string asmstr, list pattern, InstrItinClass itin> : + MBlazeInst +{ + bits<5> ra; + bits<16> imm16; + + let opcode = op; + + let Inst{6-10} = 0x10; + let Inst{11-15} = ra; + let Inst{16-31} = imm16; +} Added: llvm/trunk/lib/Target/MBlaze/MBlazeInstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeInstrInfo.cpp?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeInstrInfo.cpp (added) +++ llvm/trunk/lib/Target/MBlaze/MBlazeInstrInfo.cpp Tue Feb 23 13:15:24 2010 @@ -0,0 +1,222 @@ +//===- MBlazeInstrInfo.cpp - MBlaze Instruction Information -----*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file contains the MBlaze implementation of the TargetInstrInfo class. +// +//===----------------------------------------------------------------------===// + +#include "MBlazeInstrInfo.h" +#include "MBlazeTargetMachine.h" +#include "MBlazeMachineFunction.h" +#include "llvm/ADT/STLExtras.h" +#include "llvm/CodeGen/MachineInstrBuilder.h" +#include "llvm/CodeGen/MachineRegisterInfo.h" +#include "llvm/Support/ErrorHandling.h" +#include "MBlazeGenInstrInfo.inc" + +using namespace llvm; + +MBlazeInstrInfo::MBlazeInstrInfo(MBlazeTargetMachine &tm) + : TargetInstrInfoImpl(MBlazeInsts, array_lengthof(MBlazeInsts)), + TM(tm), RI(*TM.getSubtargetImpl(), *this) {} + +static bool isZeroImm(const MachineOperand &op) { + return op.isImm() && op.getImm() == 0; +} + +/// Return true if the instruction is a register to register move and +/// leave the source and dest operands in the passed parameters. +bool MBlazeInstrInfo:: +isMoveInstr(const MachineInstr &MI, unsigned &SrcReg, unsigned &DstReg, + unsigned &SrcSubIdx, unsigned &DstSubIdx) const { + SrcSubIdx = DstSubIdx = 0; // No sub-registers. + + // add $dst, $src, $zero || addu $dst, $zero, $src + // or $dst, $src, $zero || or $dst, $zero, $src + if ((MI.getOpcode() == MBlaze::ADD) || (MI.getOpcode() == MBlaze::OR)) { + if (MI.getOperand(1).isReg() && MI.getOperand(1).getReg() == MBlaze::R0) { + DstReg = MI.getOperand(0).getReg(); + SrcReg = MI.getOperand(2).getReg(); + return true; + } else if (MI.getOperand(2).isReg() && + MI.getOperand(2).getReg() == MBlaze::R0) { + DstReg = MI.getOperand(0).getReg(); + SrcReg = MI.getOperand(1).getReg(); + return true; + } + } + + // addi $dst, $src, 0 + // ori $dst, $src, 0 + if ((MI.getOpcode() == MBlaze::ADDI) || (MI.getOpcode() == MBlaze::ORI)) { + if ((MI.getOperand(1).isReg()) && (isZeroImm(MI.getOperand(2)))) { + DstReg = MI.getOperand(0).getReg(); + SrcReg = MI.getOperand(1).getReg(); + return true; + } + } + + return false; +} + +/// isLoadFromStackSlot - If the specified machine instruction is a direct +/// load from a stack slot, return the virtual or physical register number of +/// the destination along with the FrameIndex of the loaded stack slot. If +/// not, return 0. This predicate must return 0 if the instruction has +/// any side effects other than loading from the stack slot. +unsigned MBlazeInstrInfo:: +isLoadFromStackSlot(const MachineInstr *MI, int &FrameIndex) const { + if (MI->getOpcode() == MBlaze::LWI) { + if ((MI->getOperand(2).isFI()) && // is a stack slot + (MI->getOperand(1).isImm()) && // the imm is zero + (isZeroImm(MI->getOperand(1)))) { + FrameIndex = MI->getOperand(2).getIndex(); + return MI->getOperand(0).getReg(); + } + } + + return 0; +} + +/// isStoreToStackSlot - If the specified machine instruction is a direct +/// store to a stack slot, return the virtual or physical register number of +/// the source reg along with the FrameIndex of the loaded stack slot. If +/// not, return 0. This predicate must return 0 if the instruction has +/// any side effects other than storing to the stack slot. +unsigned MBlazeInstrInfo:: +isStoreToStackSlot(const MachineInstr *MI, int &FrameIndex) const { + if (MI->getOpcode() == MBlaze::SWI) { + if ((MI->getOperand(2).isFI()) && // is a stack slot + (MI->getOperand(1).isImm()) && // the imm is zero + (isZeroImm(MI->getOperand(1)))) { + FrameIndex = MI->getOperand(2).getIndex(); + return MI->getOperand(0).getReg(); + } + } + return 0; +} + +/// insertNoop - If data hazard condition is found insert the target nop +/// instruction. +void MBlazeInstrInfo:: +insertNoop(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI) const { + DebugLoc DL = DebugLoc::getUnknownLoc(); + if (MI != MBB.end()) DL = MI->getDebugLoc(); + BuildMI(MBB, MI, DL, get(MBlaze::NOP)); +} + +bool MBlazeInstrInfo:: +copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, + unsigned DestReg, unsigned SrcReg, + const TargetRegisterClass *DestRC, + const TargetRegisterClass *SrcRC) const { + DebugLoc dl = DebugLoc::getUnknownLoc(); + llvm::BuildMI(MBB, I, dl, get(MBlaze::ADD), DestReg) + .addReg(SrcReg).addReg(MBlaze::R0); + return true; +} + +void MBlazeInstrInfo:: +storeRegToStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, + unsigned SrcReg, bool isKill, int FI, + const TargetRegisterClass *RC) const { + DebugLoc dl = DebugLoc::getUnknownLoc(); + BuildMI(MBB, I, dl, get(MBlaze::SWI)).addReg(SrcReg,getKillRegState(isKill)) + .addImm(0).addFrameIndex(FI); +} + +void MBlazeInstrInfo:: +loadRegFromStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, + unsigned DestReg, int FI, + const TargetRegisterClass *RC) const { + DebugLoc dl = DebugLoc::getUnknownLoc(); + BuildMI(MBB, I, dl, get(MBlaze::LWI), DestReg) + .addImm(0).addFrameIndex(FI); +} + +MachineInstr *MBlazeInstrInfo:: +foldMemoryOperandImpl(MachineFunction &MF, + MachineInstr* MI, + const SmallVectorImpl &Ops, int FI) const { + if (Ops.size() != 1) return NULL; + + MachineInstr *NewMI = NULL; + + switch (MI->getOpcode()) { + case MBlaze::OR: + case MBlaze::ADD: + if ((MI->getOperand(0).isReg()) && + (MI->getOperand(2).isReg()) && + (MI->getOperand(2).getReg() == MBlaze::R0) && + (MI->getOperand(1).isReg())) { + if (Ops[0] == 0) { // COPY -> STORE + unsigned SrcReg = MI->getOperand(1).getReg(); + bool isKill = MI->getOperand(1).isKill(); + bool isUndef = MI->getOperand(1).isUndef(); + NewMI = BuildMI(MF, MI->getDebugLoc(), get(MBlaze::SW)) + .addReg(SrcReg, getKillRegState(isKill) | getUndefRegState(isUndef)) + .addImm(0).addFrameIndex(FI); + } else { // COPY -> LOAD + unsigned DstReg = MI->getOperand(0).getReg(); + bool isDead = MI->getOperand(0).isDead(); + bool isUndef = MI->getOperand(0).isUndef(); + NewMI = BuildMI(MF, MI->getDebugLoc(), get(MBlaze::LW)) + .addReg(DstReg, RegState::Define | getDeadRegState(isDead) | + getUndefRegState(isUndef)) + .addImm(0).addFrameIndex(FI); + } + } + break; + } + + return NewMI; +} + +//===----------------------------------------------------------------------===// +// Branch Analysis +//===----------------------------------------------------------------------===// +unsigned MBlazeInstrInfo:: +InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, + MachineBasicBlock *FBB, + const SmallVectorImpl &Cond) const { + DebugLoc dl = DebugLoc::getUnknownLoc(); + + // Can only insert uncond branches so far. + assert(Cond.empty() && !FBB && TBB && "Can only handle uncond branches!"); + BuildMI(&MBB, dl, get(MBlaze::BRI)).addMBB(TBB); + return 1; +} + +/// getGlobalBaseReg - Return a virtual register initialized with the +/// the global base register value. Output instructions required to +/// initialize the register in the function entry block, if necessary. +/// +unsigned MBlazeInstrInfo::getGlobalBaseReg(MachineFunction *MF) const { + MBlazeFunctionInfo *MBlazeFI = MF->getInfo(); + unsigned GlobalBaseReg = MBlazeFI->getGlobalBaseReg(); + if (GlobalBaseReg != 0) + return GlobalBaseReg; + + // Insert the set of GlobalBaseReg into the first MBB of the function + MachineBasicBlock &FirstMBB = MF->front(); + MachineBasicBlock::iterator MBBI = FirstMBB.begin(); + MachineRegisterInfo &RegInfo = MF->getRegInfo(); + const TargetInstrInfo *TII = MF->getTarget().getInstrInfo(); + + GlobalBaseReg = RegInfo.createVirtualRegister(MBlaze::CPURegsRegisterClass); + bool Ok = TII->copyRegToReg(FirstMBB, MBBI, GlobalBaseReg, MBlaze::R20, + MBlaze::CPURegsRegisterClass, + MBlaze::CPURegsRegisterClass); + assert(Ok && "Couldn't assign to global base register!"); + Ok = Ok; // Silence warning when assertions are turned off. + RegInfo.addLiveIn(MBlaze::R20); + + MBlazeFI->setGlobalBaseReg(GlobalBaseReg); + return GlobalBaseReg; +} Added: llvm/trunk/lib/Target/MBlaze/MBlazeInstrInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeInstrInfo.h?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeInstrInfo.h (added) +++ llvm/trunk/lib/Target/MBlaze/MBlazeInstrInfo.h Tue Feb 23 13:15:24 2010 @@ -0,0 +1,242 @@ +//===- MBlazeInstrInfo.h - MBlaze Instruction Information -------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file contains the MBlaze implementation of the TargetInstrInfo class. +// +//===----------------------------------------------------------------------===// + +#ifndef MBLAZEINSTRUCTIONINFO_H +#define MBLAZEINSTRUCTIONINFO_H + +#include "MBlaze.h" +#include "llvm/Support/ErrorHandling.h" +#include "llvm/Target/TargetInstrInfo.h" +#include "MBlazeRegisterInfo.h" + +namespace llvm { + +namespace MBlaze { + + // MBlaze Branch Codes + enum FPBranchCode { + BRANCH_F, + BRANCH_T, + BRANCH_FL, + BRANCH_TL, + BRANCH_INVALID + }; + + // MBlaze Condition Codes + enum CondCode { + // To be used with float branch True + FCOND_F, + FCOND_UN, + FCOND_EQ, + FCOND_UEQ, + FCOND_OLT, + FCOND_ULT, + FCOND_OLE, + FCOND_ULE, + FCOND_SF, + FCOND_NGLE, + FCOND_SEQ, + FCOND_NGL, + FCOND_LT, + FCOND_NGE, + FCOND_LE, + FCOND_NGT, + + // To be used with float branch False + // This conditions have the same mnemonic as the + // above ones, but are used with a branch False; + FCOND_T, + FCOND_OR, + FCOND_NEQ, + FCOND_OGL, + FCOND_UGE, + FCOND_OGE, + FCOND_UGT, + FCOND_OGT, + FCOND_ST, + FCOND_GLE, + FCOND_SNE, + FCOND_GL, + FCOND_NLT, + FCOND_GE, + FCOND_NLE, + FCOND_GT, + + // Only integer conditions + COND_E, + COND_GZ, + COND_GEZ, + COND_LZ, + COND_LEZ, + COND_NE, + COND_INVALID + }; + + // Turn condition code into conditional branch opcode. + unsigned GetCondBranchFromCond(CondCode CC); + + /// GetOppositeBranchCondition - Return the inverse of the specified cond, + /// e.g. turning COND_E to COND_NE. + CondCode GetOppositeBranchCondition(MBlaze::CondCode CC); + + /// MBlazeCCToString - Map each FP condition code to its string + inline static const char *MBlazeFCCToString(MBlaze::CondCode CC) + { + switch (CC) { + default: llvm_unreachable("Unknown condition code"); + case FCOND_F: + case FCOND_T: return "f"; + case FCOND_UN: + case FCOND_OR: return "un"; + case FCOND_EQ: + case FCOND_NEQ: return "eq"; + case FCOND_UEQ: + case FCOND_OGL: return "ueq"; + case FCOND_OLT: + case FCOND_UGE: return "olt"; + case FCOND_ULT: + case FCOND_OGE: return "ult"; + case FCOND_OLE: + case FCOND_UGT: return "ole"; + case FCOND_ULE: + case FCOND_OGT: return "ule"; + case FCOND_SF: + case FCOND_ST: return "sf"; + case FCOND_NGLE: + case FCOND_GLE: return "ngle"; + case FCOND_SEQ: + case FCOND_SNE: return "seq"; + case FCOND_NGL: + case FCOND_GL: return "ngl"; + case FCOND_LT: + case FCOND_NLT: return "lt"; + case FCOND_NGE: + case FCOND_GE: return "ge"; + case FCOND_LE: + case FCOND_NLE: return "nle"; + case FCOND_NGT: + case FCOND_GT: return "gt"; + } + } +} + +/// MBlazeII - This namespace holds all of the target specific flags that +/// instruction info tracks. +/// +namespace MBlazeII { + /// Target Operand Flag enum. + enum TOF { + //===------------------------------------------------------------------===// + // MBlaze Specific MachineOperand flags. + MO_NO_FLAG, + + /// MO_GOT - Represents the offset into the global offset table at which + /// the address the relocation entry symbol resides during execution. + MO_GOT, + + /// MO_GOT_CALL - Represents the offset into the global offset table at + /// which the address of a call site relocation entry symbol resides + /// during execution. This is different from the above since this flag + /// can only be present in call instructions. + MO_GOT_CALL, + + /// MO_GPREL - Represents the offset from the current gp value to be used + /// for the relocatable object file being produced. + MO_GPREL, + + /// MO_ABS_HILO - Represents the hi or low part of an absolute symbol + /// address. + MO_ABS_HILO + + }; +} + +class MBlazeInstrInfo : public TargetInstrInfoImpl { + MBlazeTargetMachine &TM; + const MBlazeRegisterInfo RI; +public: + explicit MBlazeInstrInfo(MBlazeTargetMachine &TM); + + /// getRegisterInfo - TargetInstrInfo is a superset of MRegister info. As + /// such, whenever a client has an instance of instruction info, it should + /// always be able to get register info as well (through this method). + /// + virtual const MBlazeRegisterInfo &getRegisterInfo() const { return RI; } + + /// Return true if the instruction is a register to register move and return + /// the source and dest operands and their sub-register indices by reference. + virtual bool isMoveInstr(const MachineInstr &MI, + unsigned &SrcReg, unsigned &DstReg, + unsigned &SrcSubIdx, unsigned &DstSubIdx) const; + + /// isLoadFromStackSlot - If the specified machine instruction is a direct + /// load from a stack slot, return the virtual or physical register number of + /// the destination along with the FrameIndex of the loaded stack slot. If + /// not, return 0. This predicate must return 0 if the instruction has + /// any side effects other than loading from the stack slot. + virtual unsigned isLoadFromStackSlot(const MachineInstr *MI, + int &FrameIndex) const; + + /// isStoreToStackSlot - If the specified machine instruction is a direct + /// store to a stack slot, return the virtual or physical register number of + /// the source reg along with the FrameIndex of the loaded stack slot. If + /// not, return 0. This predicate must return 0 if the instruction has + /// any side effects other than storing to the stack slot. + virtual unsigned isStoreToStackSlot(const MachineInstr *MI, + int &FrameIndex) const; + + /// Branch Analysis + virtual unsigned InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, + MachineBasicBlock *FBB, + const SmallVectorImpl &Cond) const; + virtual bool copyRegToReg(MachineBasicBlock &MBB, + MachineBasicBlock::iterator I, + unsigned DestReg, unsigned SrcReg, + const TargetRegisterClass *DestRC, + const TargetRegisterClass *SrcRC) const; + virtual void storeRegToStackSlot(MachineBasicBlock &MBB, + MachineBasicBlock::iterator MBBI, + unsigned SrcReg, bool isKill, int FrameIndex, + const TargetRegisterClass *RC) const; + + virtual void loadRegFromStackSlot(MachineBasicBlock &MBB, + MachineBasicBlock::iterator MBBI, + unsigned DestReg, int FrameIndex, + const TargetRegisterClass *RC) const; + + virtual MachineInstr* foldMemoryOperandImpl(MachineFunction &MF, + MachineInstr* MI, + const SmallVectorImpl &Ops, + int FrameIndex) const; + + virtual MachineInstr* foldMemoryOperandImpl(MachineFunction &MF, + MachineInstr* MI, + const SmallVectorImpl &Ops, + MachineInstr* LoadMI) const { + return 0; + } + + /// Insert nop instruction when hazard condition is found + virtual void insertNoop(MachineBasicBlock &MBB, + MachineBasicBlock::iterator MI) const; + + /// getGlobalBaseReg - Return a virtual register initialized with the + /// the global base register value. Output instructions required to + /// initialize the register in the function entry block, if necessary. + /// + unsigned getGlobalBaseReg(MachineFunction *MF) const; +}; + +} + +#endif Added: llvm/trunk/lib/Target/MBlaze/MBlazeInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeInstrInfo.td?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeInstrInfo.td (added) +++ llvm/trunk/lib/Target/MBlaze/MBlazeInstrInfo.td Tue Feb 23 13:15:24 2010 @@ -0,0 +1,672 @@ +//===- MBlazeInstrInfo.td - MBlaze Instruction defs -------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +//===----------------------------------------------------------------------===// +// Instruction format superclass +//===----------------------------------------------------------------------===// +include "MBlazeInstrFormats.td" + +//===----------------------------------------------------------------------===// +// MBlaze profiles and nodes +//===----------------------------------------------------------------------===// +def SDT_MBlazeRet : SDTypeProfile<0, 1, [SDTCisInt<0>]>; +def SDT_MBlazeJmpLink : SDTypeProfile<0, 1, [SDTCisVT<0, i32>]>; + +// Call +def MBlazeJmpLink : SDNode<"MBlazeISD::JmpLink",SDT_MBlazeJmpLink, + [SDNPHasChain,SDNPOptInFlag,SDNPOutFlag]>; + +// Return +def MBlazeRet : SDNode<"MBlazeISD::Ret", SDT_MBlazeRet, + [SDNPHasChain, SDNPOptInFlag]>; + +// Hi and Lo nodes are used to handle global addresses. Used on +// MBlazeISelLowering to lower stuff like GlobalAddress, ExternalSymbol +// static model. +def MBWrapper : SDNode<"MBlazeISD::Wrap", SDTIntUnaryOp>; +def MBlazeGPRel : SDNode<"MBlazeISD::GPRel", SDTIntUnaryOp>; + +def SDT_MBCallSeqStart : SDCallSeqStart<[SDTCisVT<0, i32>]>; +def SDT_MBCallSeqEnd : SDCallSeqEnd<[SDTCisVT<0, i32>, SDTCisVT<1, i32>]>; + +// These are target-independent nodes, but have target-specific formats. +def callseq_start : SDNode<"ISD::CALLSEQ_START", SDT_MBCallSeqStart, + [SDNPHasChain, SDNPOutFlag]>; +def callseq_end : SDNode<"ISD::CALLSEQ_END", SDT_MBCallSeqEnd, + [SDNPHasChain, SDNPOptInFlag, SDNPOutFlag]>; + +def SDTMBlazeSelectCC : SDTypeProfile<1, 3, [SDTCisSameAs<0, 1>]>; + +//===----------------------------------------------------------------------===// +// MBlaze Instruction Predicate Definitions. +//===----------------------------------------------------------------------===// +def HasPipe3 : Predicate<"Subtarget.hasPipe3()">; +def HasBarrel : Predicate<"Subtarget.hasBarrel()">; +def NoBarrel : Predicate<"!Subtarget.hasBarrel()">; +def HasDiv : Predicate<"Subtarget.hasDiv()">; +def HasMul : Predicate<"Subtarget.hasMul()">; +def HasFSL : Predicate<"Subtarget.hasFSL()">; +def HasEFSL : Predicate<"Subtarget.hasEFSL()">; +def HasMSRSet : Predicate<"Subtarget.hasMSRSet()">; +def HasException : Predicate<"Subtarget.hasException()">; +def HasPatCmp : Predicate<"Subtarget.hasPatCmp()">; +def HasFPU : Predicate<"Subtarget.hasFPU()">; +def HasESR : Predicate<"Subtarget.hasESR()">; +def HasPVR : Predicate<"Subtarget.hasPVR()">; +def HasMul64 : Predicate<"Subtarget.hasMul64()">; +def HasSqrt : Predicate<"Subtarget.hasSqrt()">; +def HasMMU : Predicate<"Subtarget.hasMMU()">; + +//===----------------------------------------------------------------------===// +// MBlaze Operand, Complex Patterns and Transformations Definitions. +//===----------------------------------------------------------------------===// + +// Instruction operand types +def brtarget : Operand; +def calltarget : Operand; +def simm16 : Operand; +def uimm5 : Operand; +def fimm : Operand; + +// Unsigned Operand +def uimm16 : Operand { + let PrintMethod = "printUnsignedImm"; +} + +// FSL Operand +def fslimm : Operand { + let PrintMethod = "printFSLImm"; +} + +// Address operand +def memri : Operand { + let PrintMethod = "printMemOperand"; + let MIOperandInfo = (ops simm16, CPURegs); +} + +def memrr : Operand { + let PrintMethod = "printMemOperand"; + let MIOperandInfo = (ops CPURegs, CPURegs); +} + +// Transformation Function - get the lower 16 bits. +def LO16 : SDNodeXFormgetZExtValue() & 0xFFFF); +}]>; + +// Transformation Function - get the higher 16 bits. +def HI16 : SDNodeXFormgetZExtValue() >> 16); +}]>; + +// Node immediate fits as 16-bit sign extended on target immediate. +// e.g. addi, andi +def immSExt16 : PatLeaf<(imm), [{ + return (N->getZExtValue() >> 16) == 0; +}]>; + +// Node immediate fits as 16-bit zero extended on target immediate. +// The LO16 param means that only the lower 16 bits of the node +// immediate are caught. +// e.g. addiu, sltiu +def immZExt16 : PatLeaf<(imm), [{ + return (N->getZExtValue() >> 16) == 0; +}], LO16>; + +// FSL immediate field must fit in 4 bits. +def immZExt4 : PatLeaf<(imm), [{ + return N->getZExtValue() == ((N->getZExtValue()) & 0xf) ; +}]>; + +// shamt field must fit in 5 bits. +def immZExt5 : PatLeaf<(imm), [{ + return N->getZExtValue() == ((N->getZExtValue()) & 0x1f) ; +}]>; + +// MBlaze Address Mode! SDNode frameindex could possibily be a match +// since load and store instructions from stack used it. +def iaddr : ComplexPattern; +def xaddr : ComplexPattern; + +//===----------------------------------------------------------------------===// +// Pseudo instructions +//===----------------------------------------------------------------------===// + +// As stack alignment is always done with addiu, we need a 16-bit immediate +let Defs = [R1], Uses = [R1] in { +def ADJCALLSTACKDOWN : MBlazePseudo<(outs), (ins simm16:$amt), + "${:comment} ADJCALLSTACKDOWN $amt", + [(callseq_start timm:$amt)]>; +def ADJCALLSTACKUP : MBlazePseudo<(outs), + (ins uimm16:$amt1, simm16:$amt2), + "${:comment} ADJCALLSTACKUP $amt1", + [(callseq_end timm:$amt1, timm:$amt2)]>; +} + +// Some assembly macros need to avoid pseudoinstructions and assembler +// automatic reodering, we should reorder ourselves. +def MACRO : MBlazePseudo<(outs), (ins), ".set macro", []>; +def REORDER : MBlazePseudo<(outs), (ins), ".set reorder", []>; +def NOMACRO : MBlazePseudo<(outs), (ins), ".set nomacro", []>; +def NOREORDER : MBlazePseudo<(outs), (ins), ".set noreorder", []>; + +// When handling PIC code the assembler needs .cpload and .cprestore +// directives. If the real instructions corresponding these directives +// are used, we have the same behavior, but get also a bunch of warnings +// from the assembler. +def CPLOAD : MBlazePseudo<(outs), (ins CPURegs:$reg), ".cpload $reg", []>; +def CPRESTORE : MBlazePseudo<(outs), (ins uimm16:$l), ".cprestore $l\n", []>; + +//===----------------------------------------------------------------------===// +// Instructions specific format +//===----------------------------------------------------------------------===// + +//===----------------------------------------------------------------------===// +// Arithmetic Instructions +//===----------------------------------------------------------------------===// +class Arith op, bits<11> flags, string instr_asm, SDNode OpNode, + InstrItinClass itin> : + TA; + +class ArithI op, string instr_asm, SDNode OpNode, + Operand Od, PatLeaf imm_type> : + TAI; + +class ArithR op, bits<11> flags, string instr_asm, SDNode OpNode, + InstrItinClass itin> : + TA; + +class ArithRI op, string instr_asm, SDNode OpNode, + Operand Od, PatLeaf imm_type> : + TAI; + +class ArithN op, bits<11> flags, string instr_asm, + InstrItinClass itin> : + TA; + +class ArithNI op, string instr_asm,Operand Od, PatLeaf imm_type> : + TAI; + +class ArithRN op, bits<11> flags, string instr_asm, + InstrItinClass itin> : + TA; + +class ArithRNI op, string instr_asm,Operand Od, PatLeaf imm_type> : + TAI; + +//===----------------------------------------------------------------------===// +// Misc Arithmetic Instructions +//===----------------------------------------------------------------------===// + +class Logic op, bits<11> flags, string instr_asm, SDNode OpNode> : + TA; + +class LogicI op, string instr_asm, SDNode OpNode> : + TAI; + +class EffectiveAddress : + TAI<0x08, (outs CPURegs:$dst), (ins memri:$addr), + instr_asm, [(set CPURegs:$dst, iaddr:$addr)], IIAlu>; + +//===----------------------------------------------------------------------===// +// Memory Access Instructions +//===----------------------------------------------------------------------===// +class LoadM op, string instr_asm, PatFrag OpNode> : + TA; + +class LoadMI op, string instr_asm, PatFrag OpNode> : + TAI; + +class StoreM op, string instr_asm, PatFrag OpNode> : + TA; + +class StoreMI op, string instr_asm, PatFrag OpNode> : + TAI; + +//===----------------------------------------------------------------------===// +// Branch Instructions +//===----------------------------------------------------------------------===// +class Branch op, bits<5> br, bits<11> flags, string instr_asm> : + TBR; + +class BranchI op, bits<5> brf, string instr_asm> : + TBRI; + +//===----------------------------------------------------------------------===// +// Branch and Link Instructions +//===----------------------------------------------------------------------===// +class BranchL op, bits<5> br, bits<11> flags, string instr_asm> : + TBRL; + +class BranchLI op, bits<5> br, string instr_asm> : + TBRLI; + +//===----------------------------------------------------------------------===// +// Conditional Branch Instructions +//===----------------------------------------------------------------------===// +class BranchC op, bits<5> br, bits<11> flags, string instr_asm, + PatFrag cond_op> : + TBRC; + //(brcond (cond_op CPURegs:$a, CPURegs:$b), bb:$offset)], + //IIBranch>; + +class BranchCI op, bits<5> br, string instr_asm, PatFrag cond_op> : + TBRCI; + +//===----------------------------------------------------------------------===// +// MBlaze arithmetic instructions +//===----------------------------------------------------------------------===// + +let isCommutable = 1, isAsCheapAsAMove = 1 in { + def ADD : Arith<0x00, 0x000, "add ", add, IIAlu>; + def ADDC : Arith<0x02, 0x000, "addc ", adde, IIAlu>; + def ADDK : Arith<0x04, 0x000, "addk ", addc, IIAlu>; + def ADDKC : ArithN<0x06, 0x000, "addkc ", IIAlu>; + def AND : Logic<0x21, 0x000, "and ", and>; + def OR : Logic<0x20, 0x000, "or ", or>; + def XOR : Logic<0x22, 0x000, "xor ", xor>; +} + +let isAsCheapAsAMove = 1 in { + def ANDN : ArithN<0x23, 0x000, "andn ", IIAlu>; + def CMP : ArithN<0x05, 0x001, "cmp ", IIAlu>; + def CMPU : ArithN<0x05, 0x003, "cmpu ", IIAlu>; + def RSUB : ArithR<0x01, 0x000, "rsub ", sub, IIAlu>; + def RSUBC : ArithR<0x03, 0x000, "rsubc ", sube, IIAlu>; + def RSUBK : ArithR<0x05, 0x000, "rsubk ", subc, IIAlu>; + def RSUBKC : ArithRN<0x07, 0x000, "rsubkc ", IIAlu>; +} + +let isCommutable = 1, Predicates=[HasMul] in { + def MUL : Arith<0x10, 0x000, "mul ", mul, IIAlu>; +} + +let isCommutable = 1, Predicates=[HasMul,HasMul64] in { + def MULH : Arith<0x10, 0x001, "mulh ", mulhs, IIAlu>; + def MULHU : Arith<0x10, 0x003, "mulhu ", mulhu, IIAlu>; +} + +let Predicates=[HasMul,HasMul64] in { + def MULHSU : ArithN<0x10, 0x002, "mulhsu ", IIAlu>; +} + +let Predicates=[HasBarrel] in { + def BSRL : Arith<0x11, 0x000, "bsrl ", srl, IIAlu>; + def BSRA : Arith<0x11, 0x200, "bsra ", sra, IIAlu>; + def BSLL : Arith<0x11, 0x400, "bsll ", shl, IIAlu>; + def BSRLI : ArithI<0x11, "bsrli ", srl, uimm5, immZExt5>; + def BSRAI : ArithI<0x11, "bsrai ", sra, uimm5, immZExt5>; + def BSLLI : ArithI<0x11, "bslli ", shl, uimm5, immZExt5>; +} + +let Predicates=[HasDiv] in { + def IDIV : Arith<0x12, 0x000, "idiv ", sdiv, IIAlu>; + def IDIVU : Arith<0x12, 0x002, "idivu ", udiv, IIAlu>; +} + +//===----------------------------------------------------------------------===// +// MBlaze immediate mode arithmetic instructions +//===----------------------------------------------------------------------===// + +let isAsCheapAsAMove = 1 in { + def ADDI : ArithI<0x08, "addi ", add, simm16, immSExt16>; + def ADDIC : ArithNI<0x0A, "addic ", simm16, immSExt16>; + def ADDIK : ArithNI<0x0C, "addik ", simm16, immSExt16>; + def ADDIKC : ArithI<0x0E, "addikc ", addc, simm16, immSExt16>; + def RSUBI : ArithRI<0x09, "rsubi ", sub, simm16, immSExt16>; + def RSUBIC : ArithRNI<0x0B, "rsubi ", simm16, immSExt16>; + def RSUBIK : ArithRNI<0x0E, "rsubic ", simm16, immSExt16>; + def RSUBIKC : ArithRI<0x0F, "rsubikc", subc, simm16, immSExt16>; + def ANDNI : ArithNI<0x2B, "andni ", uimm16, immZExt16>; + def ANDI : LogicI<0x29, "andi ", and>; + def ORI : LogicI<0x28, "ori ", or>; + def XORI : LogicI<0x2A, "xori ", xor>; +} + +let Predicates=[HasMul] in { + def MULI : ArithI<0x18, "muli ", mul, simm16, immSExt16>; +} + +//===----------------------------------------------------------------------===// +// MBlaze memory access instructions +//===----------------------------------------------------------------------===// + +let canFoldAsLoad = 1, isReMaterializable = 1 in { + def LBU : LoadM<0x30, "lbu ", zextloadi8>; + def LHU : LoadM<0x31, "lhu ", zextloadi16>; + def LW : LoadM<0x32, "lw ", load>; + + def LBUI : LoadMI<0x30, "lbui ", zextloadi8>; + def LHUI : LoadMI<0x31, "lhui ", zextloadi16>; + def LWI : LoadMI<0x32, "lwi ", load>; +} + + def SB : StoreM<0x34, "sb ", truncstorei8>; + def SH : StoreM<0x35, "sh ", truncstorei16>; + def SW : StoreM<0x36, "sw ", store>; + + def SBI : StoreMI<0x34, "sbi ", truncstorei8>; + def SHI : StoreMI<0x35, "shi ", truncstorei16>; + def SWI : StoreMI<0x36, "swi ", store>; + +//===----------------------------------------------------------------------===// +// MBlaze branch instructions +//===----------------------------------------------------------------------===// + +let isBranch = 1, isTerminator = 1, hasCtrlDep = 1 in { + def BRI : BranchI<0x2E, 0x00, "bri ">; + def BRAI : BranchI<0x2E, 0x08, "brai ">; + def BEQI : BranchCI<0x2F, 0x00, "beqi ", seteq>; + def BNEI : BranchCI<0x2F, 0x01, "bnei ", setne>; + def BLTI : BranchCI<0x2F, 0x02, "blti ", setlt>; + def BLEI : BranchCI<0x2F, 0x03, "blei ", setle>; + def BGTI : BranchCI<0x2F, 0x04, "bgti ", setgt>; + def BGEI : BranchCI<0x2F, 0x05, "bgei ", setge>; +} + +let isBranch = 1, isIndirectBranch = 1, isTerminator = 1, hasCtrlDep = 1 in { + def BR : Branch<0x26, 0x00, 0x000, "br ">; + def BRA : Branch<0x26, 0x08, 0x000, "bra ">; + def BEQ : BranchC<0x27, 0x00, 0x000, "beq ", seteq>; + def BNE : BranchC<0x27, 0x01, 0x000, "bne ", setne>; + def BLT : BranchC<0x27, 0x02, 0x000, "blt ", setlt>; + def BLE : BranchC<0x27, 0x03, 0x000, "ble ", setle>; + def BGT : BranchC<0x27, 0x04, 0x000, "bgt ", setgt>; + def BGE : BranchC<0x27, 0x05, 0x000, "bge ", setge>; +} + +let isBranch = 1, isTerminator = 1, hasDelaySlot = 1, hasCtrlDep = 1 in { + def BRID : BranchI<0x2E, 0x10, "brid ">; + def BRAID : BranchI<0x2E, 0x18, "braid ">; + def BEQID : BranchCI<0x2F, 0x10, "beqid ", seteq>; + def BNEID : BranchCI<0x2F, 0x11, "bneid ", setne>; + def BLTID : BranchCI<0x2F, 0x12, "bltid ", setlt>; + def BLEID : BranchCI<0x2F, 0x13, "bleid ", setle>; + def BGTID : BranchCI<0x2F, 0x14, "bgtid ", setgt>; + def BGEID : BranchCI<0x2F, 0x15, "bgeid ", setge>; +} + +let isBranch = 1, isIndirectBranch = 1, isTerminator = 1, + hasDelaySlot = 1, hasCtrlDep = 1 in { + def BRD : Branch<0x26, 0x10, 0x000, "brd ">; + def BRAD : Branch<0x26, 0x18, 0x000, "brad ">; + def BEQD : BranchC<0x27, 0x10, 0x000, "beqd ", seteq>; + def BNED : BranchC<0x27, 0x11, 0x000, "bned ", setne>; + def BLTD : BranchC<0x27, 0x12, 0x000, "bltd ", setlt>; + def BLED : BranchC<0x27, 0x13, 0x000, "bled ", setle>; + def BGTD : BranchC<0x27, 0x14, 0x000, "bgtd ", setgt>; + def BGED : BranchC<0x27, 0x15, 0x000, "bged ", setge>; +} + +let isCall = 1, hasCtrlDep = 1, isIndirectBranch = 1, + Defs = [R3,R4,R5,R6,R7,R8,R9,R10,R11,R12], + Uses = [R1,R5,R6,R7,R8,R9,R10] in { + def BRL : BranchL<0x26, 0x04, 0x000, "brl ">; + def BRAL : BranchL<0x26, 0x0C, 0x000, "bral ">; +} + +let isCall = 1, hasDelaySlot = 1, hasCtrlDep = 1, + Defs = [R3,R4,R5,R6,R7,R8,R9,R10,R11,R12], + Uses = [R1,R5,R6,R7,R8,R9,R10] in { + def BRLID : BranchLI<0x2E, 0x14, "brlid ">; + def BRALID : BranchLI<0x2E, 0x1C, "bralid ">; +} + +let isCall = 1, hasDelaySlot = 1, hasCtrlDep = 1, isIndirectBranch = 1, + Defs = [R3,R4,R5,R6,R7,R8,R9,R10,R11,R12], + Uses = [R1,R5,R6,R7,R8,R9,R10] in { + def BRLD : BranchL<0x26, 0x14, 0x000, "brld ">; + def BRALD : BranchL<0x26, 0x1C, 0x000, "brald ">; +} + +let isReturn=1, isTerminator=1, hasDelaySlot=1, + isBarrier=1, hasCtrlDep=1, imm16=0x8 in { + def RTSD : TRET<0x2D, (outs), (ins CPURegs:$target), + "rtsd $target, 8", + [(MBlazeRet CPURegs:$target)], + IIBranch>; +} + +//===----------------------------------------------------------------------===// +// MBlaze misc instructions +//===----------------------------------------------------------------------===// + +let addr = 0 in { + def NOP : TADDR<0x00, (outs), (ins), "nop ", [], IIAlu>; +} + +let usesCustomInserter = 1 in { + //class PseudoSelCC: + // MBlazePseudo<(outs RC:$D), (ins RC:$T, RC:$F, CPURegs:$CMP), asmstr, + // [(set RC:$D, (MBlazeSelectCC RC:$T, RC:$F, CPURegs:$CMP))]>; + //def Select_CC : PseudoSelCC; + + def Select_CC : MBlazePseudo<(outs CPURegs:$dst), + (ins CPURegs:$T, CPURegs:$F, CPURegs:$CMP, i32imm:$CC), + "; SELECT_CC PSEUDO!", + []>; + + def ShiftL : MBlazePseudo<(outs CPURegs:$dst), + (ins CPURegs:$L, CPURegs:$R), + "; ShiftL PSEUDO!", + []>; + + def ShiftRA : MBlazePseudo<(outs CPURegs:$dst), + (ins CPURegs:$L, CPURegs:$R), + "; ShiftRA PSEUDO!", + []>; + + def ShiftRL : MBlazePseudo<(outs CPURegs:$dst), + (ins CPURegs:$L, CPURegs:$R), + "; ShiftRL PSEUDO!", + []>; +} + + +let rb = 0 in { + def SEXT16 : TA<0x24, 0x061, (outs CPURegs:$dst), (ins CPURegs:$src), + "sext16 $dst, $src", [], IIAlu>; + def SEXT8 : TA<0x24, 0x060, (outs CPURegs:$dst), (ins CPURegs:$src), + "sext8 $dst, $src", [], IIAlu>; + def SRL : TA<0x24, 0x041, (outs CPURegs:$dst), (ins CPURegs:$src), + "srl $dst, $src", [], IIAlu>; + def SRA : TA<0x24, 0x001, (outs CPURegs:$dst), (ins CPURegs:$src), + "sra $dst, $src", [], IIAlu>; + def SRC : TA<0x24, 0x021, (outs CPURegs:$dst), (ins CPURegs:$src), + "src $dst, $src", [], IIAlu>; +} + +def LEA_ADDI : EffectiveAddress<"addi $dst, ${addr:stackloc}">; + +//===----------------------------------------------------------------------===// +// Arbitrary patterns that map to one or more instructions +//===----------------------------------------------------------------------===// + +// Small immediates +def : Pat<(i32 0), (ADD R0, R0)>; +def : Pat<(i32 immSExt16:$imm), (ADDI R0, imm:$imm)>; +def : Pat<(i32 immZExt16:$imm), (ORI R0, imm:$imm)>; + +// Arbitrary immediates +def : Pat<(i32 imm:$imm), (ADDI R0, imm:$imm)>; + +// In register sign extension +def : Pat<(sext_inreg CPURegs:$src, i16), (SEXT16 CPURegs:$src)>; +def : Pat<(sext_inreg CPURegs:$src, i8), (SEXT8 CPURegs:$src)>; + +// Call +def : Pat<(MBlazeJmpLink (i32 tglobaladdr:$dst)), (BRLID tglobaladdr:$dst)>; +def : Pat<(MBlazeJmpLink (i32 texternalsym:$dst)),(BRLID texternalsym:$dst)>; +def : Pat<(MBlazeJmpLink CPURegs:$dst), (BRLD CPURegs:$dst)>; + +// Shift Instructions +def : Pat<(shl CPURegs:$L, CPURegs:$R), (ShiftL CPURegs:$L, CPURegs:$R)>; +def : Pat<(sra CPURegs:$L, CPURegs:$R), (ShiftRA CPURegs:$L, CPURegs:$R)>; +def : Pat<(srl CPURegs:$L, CPURegs:$R), (ShiftRL CPURegs:$L, CPURegs:$R)>; + +// SET_CC operations +def : Pat<(setcc CPURegs:$L, CPURegs:$R, SETEQ), + (Select_CC (ADDI R0, 1), (ADDI R0, 0), + (CMP CPURegs:$L, CPURegs:$R), 1)>; +def : Pat<(setcc CPURegs:$L, CPURegs:$R, SETNE), + (Select_CC (ADDI R0, 1), (ADDI R0, 0), + (CMP CPURegs:$L, CPURegs:$R), 2)>; +def : Pat<(setcc CPURegs:$L, CPURegs:$R, SETGT), + (Select_CC (ADDI R0, 1), (ADDI R0, 0), + (CMP CPURegs:$L, CPURegs:$R), 3)>; +def : Pat<(setcc CPURegs:$L, CPURegs:$R, SETLT), + (Select_CC (ADDI R0, 1), (ADDI R0, 0), + (CMP CPURegs:$L, CPURegs:$R), 4)>; +def : Pat<(setcc CPURegs:$L, CPURegs:$R, SETGE), + (Select_CC (ADDI R0, 1), (ADDI R0, 0), + (CMP CPURegs:$L, CPURegs:$R), 5)>; +def : Pat<(setcc CPURegs:$L, CPURegs:$R, SETLE), + (Select_CC (ADDI R0, 1), (ADDI R0, 0), + (CMP CPURegs:$L, CPURegs:$R), 6)>; +def : Pat<(setcc CPURegs:$L, CPURegs:$R, SETUGT), + (Select_CC (ADDI R0, 1), (ADDI R0, 0), + (CMPU CPURegs:$L, CPURegs:$R), 3)>; +def : Pat<(setcc CPURegs:$L, CPURegs:$R, SETULT), + (Select_CC (ADDI R0, 1), (ADDI R0, 0), + (CMPU CPURegs:$L, CPURegs:$R), 4)>; +def : Pat<(setcc CPURegs:$L, CPURegs:$R, SETUGE), + (Select_CC (ADDI R0, 1), (ADDI R0, 0), + (CMPU CPURegs:$L, CPURegs:$R), 5)>; +def : Pat<(setcc CPURegs:$L, CPURegs:$R, SETULE), + (Select_CC (ADDI R0, 1), (ADDI R0, 0), + (CMPU CPURegs:$L, CPURegs:$R), 6)>; + +// SELECT operations +def : Pat<(select CPURegs:$C, CPURegs:$T, CPURegs:$F), + (Select_CC CPURegs:$T, CPURegs:$F, CPURegs:$C, 2)>; + +// SELECT_CC +def : Pat<(selectcc CPURegs:$L, CPURegs:$R, CPURegs:$T, CPURegs:$F, SETEQ), + (Select_CC CPURegs:$T, CPURegs:$F, (CMP CPURegs:$L, CPURegs:$R), 1)>; +def : Pat<(selectcc CPURegs:$L, CPURegs:$R, CPURegs:$T, CPURegs:$F, SETNE), + (Select_CC CPURegs:$T, CPURegs:$F, (CMP CPURegs:$L, CPURegs:$R), 2)>; +def : Pat<(selectcc CPURegs:$L, CPURegs:$R, CPURegs:$T, CPURegs:$F, SETGT), + (Select_CC CPURegs:$T, CPURegs:$F, (CMP CPURegs:$L, CPURegs:$R), 3)>; +def : Pat<(selectcc CPURegs:$L, CPURegs:$R, CPURegs:$T, CPURegs:$F, SETLT), + (Select_CC CPURegs:$T, CPURegs:$F, (CMP CPURegs:$L, CPURegs:$R), 4)>; +def : Pat<(selectcc CPURegs:$L, CPURegs:$R, CPURegs:$T, CPURegs:$F, SETGE), + (Select_CC CPURegs:$T, CPURegs:$F, (CMP CPURegs:$L, CPURegs:$R), 5)>; +def : Pat<(selectcc CPURegs:$L, CPURegs:$R, CPURegs:$T, CPURegs:$F, SETLE), + (Select_CC CPURegs:$T, CPURegs:$F, (CMP CPURegs:$L, CPURegs:$R), 6)>; +def : Pat<(selectcc CPURegs:$L, CPURegs:$R, CPURegs:$T, CPURegs:$F, SETUGT), + (Select_CC CPURegs:$T, CPURegs:$F, (CMPU CPURegs:$L, CPURegs:$R), 3)>; +def : Pat<(selectcc CPURegs:$L, CPURegs:$R, CPURegs:$T, CPURegs:$F, SETULT), + (Select_CC CPURegs:$T, CPURegs:$F, (CMPU CPURegs:$L, CPURegs:$R), 4)>; +def : Pat<(selectcc CPURegs:$L, CPURegs:$R, CPURegs:$T, CPURegs:$F, SETUGE), + (Select_CC CPURegs:$T, CPURegs:$F, (CMPU CPURegs:$L, CPURegs:$R), 5)>; +def : Pat<(selectcc CPURegs:$L, CPURegs:$R, CPURegs:$T, CPURegs:$F, SETULE), + (Select_CC CPURegs:$T, CPURegs:$F, (CMPU CPURegs:$L, CPURegs:$R), 6)>; + +// BRCOND instructions +def : Pat<(brcond (setcc CPURegs:$L, CPURegs:$R, SETEQ), bb:$T), + (BEQID (CMP CPURegs:$R, CPURegs:$L), bb:$T)>; +def : Pat<(brcond (setcc CPURegs:$L, CPURegs:$R, SETNE), bb:$T), + (BNEID (CMP CPURegs:$R, CPURegs:$L), bb:$T)>; +def : Pat<(brcond (setcc CPURegs:$L, CPURegs:$R, SETGT), bb:$T), + (BGTID (CMP CPURegs:$R, CPURegs:$L), bb:$T)>; +def : Pat<(brcond (setcc CPURegs:$L, CPURegs:$R, SETLT), bb:$T), + (BLTID (CMP CPURegs:$R, CPURegs:$L), bb:$T)>; +def : Pat<(brcond (setcc CPURegs:$L, CPURegs:$R, SETGE), bb:$T), + (BGEID (CMP CPURegs:$R, CPURegs:$L), bb:$T)>; +def : Pat<(brcond (setcc CPURegs:$L, CPURegs:$R, SETLE), bb:$T), + (BLEID (CMP CPURegs:$R, CPURegs:$L), bb:$T)>; +def : Pat<(brcond (setcc CPURegs:$L, CPURegs:$R, SETUGT), bb:$T), + (BGTID (CMPU CPURegs:$R, CPURegs:$L), bb:$T)>; +def : Pat<(brcond (setcc CPURegs:$L, CPURegs:$R, SETULT), bb:$T), + (BLTID (CMPU CPURegs:$R, CPURegs:$L), bb:$T)>; +def : Pat<(brcond (setcc CPURegs:$L, CPURegs:$R, SETUGE), bb:$T), + (BGEID (CMPU CPURegs:$R, CPURegs:$L), bb:$T)>; +def : Pat<(brcond (setcc CPURegs:$L, CPURegs:$R, SETULE), bb:$T), + (BLEID (CMPU CPURegs:$R, CPURegs:$L), bb:$T)>; +def : Pat<(brcond CPURegs:$C, bb:$T), + (BNEID CPURegs:$C, bb:$T)>; + +// Jump tables, global addresses, and constant pools +def : Pat<(MBWrapper tglobaladdr:$in), (ORI R0, tglobaladdr:$in)>; +def : Pat<(MBWrapper tjumptable:$in), (ORI R0, tjumptable:$in)>; +def : Pat<(MBWrapper tconstpool:$in), (ORI R0, tconstpool:$in)>; + +// Misc instructions +def : Pat<(and CPURegs:$lh, (not CPURegs:$rh)),(ANDN CPURegs:$lh, CPURegs:$rh)>; + +// Arithmetic with immediates +def : Pat<(add CPURegs:$in, imm:$imm),(ADDI CPURegs:$in, imm:$imm)>; +def : Pat<(or CPURegs:$in, imm:$imm),(ORI CPURegs:$in, imm:$imm)>; +def : Pat<(xor CPURegs:$in, imm:$imm),(XORI CPURegs:$in, imm:$imm)>; + +// extended load and stores +def : Pat<(extloadi1 iaddr:$src), (LBUI iaddr:$src)>; +def : Pat<(extloadi8 iaddr:$src), (LBUI iaddr:$src)>; +def : Pat<(extloadi16 iaddr:$src), (LHUI iaddr:$src)>; +def : Pat<(extloadi1 xaddr:$src), (LBU xaddr:$src)>; +def : Pat<(extloadi8 xaddr:$src), (LBU xaddr:$src)>; +def : Pat<(extloadi16 xaddr:$src), (LHU xaddr:$src)>; + +def : Pat<(sextloadi1 iaddr:$src), (SEXT8 (LBUI iaddr:$src))>; +def : Pat<(sextloadi8 iaddr:$src), (SEXT8 (LBUI iaddr:$src))>; +def : Pat<(sextloadi16 iaddr:$src), (SEXT16 (LHUI iaddr:$src))>; +def : Pat<(sextloadi1 xaddr:$src), (SEXT8 (LBU xaddr:$src))>; +def : Pat<(sextloadi8 xaddr:$src), (SEXT8 (LBU xaddr:$src))>; +def : Pat<(sextloadi16 xaddr:$src), (SEXT16 (LHU xaddr:$src))>; + +// peepholes +def : Pat<(store (i32 0), iaddr:$dst), (SWI R0, iaddr:$dst)>; + +//===----------------------------------------------------------------------===// +// Floating Point Support +//===----------------------------------------------------------------------===// +include "MBlazeInstrFSL.td" +include "MBlazeInstrFPU.td" Added: llvm/trunk/lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp (added) +++ llvm/trunk/lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp Tue Feb 23 13:15:24 2010 @@ -0,0 +1,101 @@ +//===- MBlazeIntrinsicInfo.cpp - Intrinsic Information -00-------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file contains the MBlaze implementation of TargetIntrinsicInfo. +// +//===----------------------------------------------------------------------===// + +#include "MBlazeIntrinsicInfo.h" +#include "llvm/DerivedTypes.h" +#include "llvm/Function.h" +#include "llvm/Intrinsics.h" +#include "llvm/Module.h" +#include "llvm/Type.h" +#include "llvm/Support/raw_ostream.h" +#include + +using namespace llvm; + +namespace mblazeIntrinsic { + + enum ID { + last_non_mblaze_intrinsic = Intrinsic::num_intrinsics-1, +#define GET_INTRINSIC_ENUM_VALUES +#include "MBlazeGenIntrinsics.inc" +#undef GET_INTRINSIC_ENUM_VALUES + , num_mblaze_intrinsics + }; + +} + +std::string MBlazeIntrinsicInfo::getName(unsigned IntrID, const Type **Tys, + unsigned numTys) const { + static const char *const names[] = { +#define GET_INTRINSIC_NAME_TABLE +#include "MBlazeGenIntrinsics.inc" +#undef GET_INTRINSIC_NAME_TABLE + }; + + assert(!isOverloaded(IntrID) && "MBlaze intrinsics are not overloaded"); + if (IntrID < Intrinsic::num_intrinsics) + return 0; + assert(IntrID < mblazeIntrinsic::num_mblaze_intrinsics && + "Invalid intrinsic ID"); + + std::string Result(names[IntrID - Intrinsic::num_intrinsics]); + return Result; +} + +unsigned MBlazeIntrinsicInfo:: +lookupName(const char *Name, unsigned Len) const { +#define GET_FUNCTION_RECOGNIZER +#include "MBlazeGenIntrinsics.inc" +#undef GET_FUNCTION_RECOGNIZER + return 0; +} + +bool MBlazeIntrinsicInfo::isOverloaded(unsigned IntrID) const { + // Overload Table + const bool OTable[] = { +#define GET_INTRINSIC_OVERLOAD_TABLE +#include "MBlazeGenIntrinsics.inc" +#undef GET_INTRINSIC_OVERLOAD_TABLE + }; + if (IntrID == 0) + return false; + else + return OTable[IntrID - Intrinsic::num_intrinsics]; +} + +/// This defines the "getAttributes(ID id)" method. +#define GET_INTRINSIC_ATTRIBUTES +#include "MBlazeGenIntrinsics.inc" +#undef GET_INTRINSIC_ATTRIBUTES + +static const FunctionType *getType(LLVMContext &Context, unsigned id) { + const Type *ResultTy = NULL; + std::vector ArgTys; + bool IsVarArg = false; + +#define GET_INTRINSIC_GENERATOR +#include "MBlazeGenIntrinsics.inc" +#undef GET_INTRINSIC_GENERATOR + + return FunctionType::get(ResultTy, ArgTys, IsVarArg); +} + +Function *MBlazeIntrinsicInfo::getDeclaration(Module *M, unsigned IntrID, + const Type **Tys, + unsigned numTy) const { + assert(!isOverloaded(IntrID) && "MBlaze intrinsics are not overloaded"); + AttrListPtr AList = getAttributes((mblazeIntrinsic::ID) IntrID); + return cast(M->getOrInsertFunction(getName(IntrID), + getType(M->getContext(), IntrID), + AList)); +} Added: llvm/trunk/lib/Target/MBlaze/MBlazeIntrinsicInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeIntrinsicInfo.h?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeIntrinsicInfo.h (added) +++ llvm/trunk/lib/Target/MBlaze/MBlazeIntrinsicInfo.h Tue Feb 23 13:15:24 2010 @@ -0,0 +1,32 @@ +//===- MBlazeIntrinsicInfo.h - MBlaze Intrinsic Information -----*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file contains the MBlaze implementation of TargetIntrinsicInfo. +// +//===----------------------------------------------------------------------===// +#ifndef MBLAZEINTRINSICS_H +#define MBLAZEINTRINSICS_H + +#include "llvm/Target/TargetIntrinsicInfo.h" + +namespace llvm { + + class MBlazeIntrinsicInfo : public TargetIntrinsicInfo { + public: + std::string getName(unsigned IntrID, const Type **Tys = 0, + unsigned numTys = 0) const; + unsigned lookupName(const char *Name, unsigned Len) const; + bool isOverloaded(unsigned IID) const; + Function *getDeclaration(Module *M, unsigned ID, const Type **Tys = 0, + unsigned numTys = 0) const; + }; + +} + +#endif Added: llvm/trunk/lib/Target/MBlaze/MBlazeIntrinsics.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeIntrinsics.td?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeIntrinsics.td (added) +++ llvm/trunk/lib/Target/MBlaze/MBlazeIntrinsics.td Tue Feb 23 13:15:24 2010 @@ -0,0 +1,137 @@ +//===- IntrinsicsMBlaze.td - Defines MBlaze intrinsics -----*- tablegen -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines all of the MicroBlaze-specific intrinsics. +// +//===----------------------------------------------------------------------===// + +//===----------------------------------------------------------------------===// +// Definitions for all MBlaze intrinsics. +// + +// MBlaze intrinsic classes. +let TargetPrefix = "mblaze", isTarget = 1 in { + class MBFSL_Get_Intrinsic : Intrinsic<[llvm_i32_ty], + [llvm_i32_ty], + [IntrWriteMem]>; + + class MBFSL_Put_Intrinsic : Intrinsic<[llvm_void_ty], + [llvm_i32_ty, llvm_i32_ty], + [IntrWriteMem]>; + + class MBFSL_PutT_Intrinsic : Intrinsic<[llvm_void_ty], + [llvm_i32_ty], + [IntrWriteMem]>; +} + +//===----------------------------------------------------------------------===// +// MicroBlaze FSL Get Intrinsic Definitions. +// + +def int_mblaze_fsl_get : GCCBuiltin<"__builtin_mblaze_fsl_get">, + MBFSL_Get_Intrinsic; +def int_mblaze_fsl_aget : GCCBuiltin<"__builtin_mblaze_fsl_aget">, + MBFSL_Get_Intrinsic; +def int_mblaze_fsl_cget : GCCBuiltin<"__builtin_mblaze_fsl_cget">, + MBFSL_Get_Intrinsic; +def int_mblaze_fsl_caget : GCCBuiltin<"__builtin_mblaze_fsl_caget">, + MBFSL_Get_Intrinsic; +def int_mblaze_fsl_eget : GCCBuiltin<"__builtin_mblaze_fsl_eget">, + MBFSL_Get_Intrinsic; +def int_mblaze_fsl_eaget : GCCBuiltin<"__builtin_mblaze_fsl_eaget">, + MBFSL_Get_Intrinsic; +def int_mblaze_fsl_ecget : GCCBuiltin<"__builtin_mblaze_fsl_ecget">, + MBFSL_Get_Intrinsic; +def int_mblaze_fsl_ecaget : GCCBuiltin<"__builtin_mblaze_fsl_ecaget">, + MBFSL_Get_Intrinsic; +def int_mblaze_fsl_nget : GCCBuiltin<"__builtin_mblaze_fsl_nget">, + MBFSL_Get_Intrinsic; +def int_mblaze_fsl_naget : GCCBuiltin<"__builtin_mblaze_fsl_naget">, + MBFSL_Get_Intrinsic; +def int_mblaze_fsl_ncget : GCCBuiltin<"__builtin_mblaze_fsl_ncget">, + MBFSL_Get_Intrinsic; +def int_mblaze_fsl_ncaget : GCCBuiltin<"__builtin_mblaze_fsl_ncaget">, + MBFSL_Get_Intrinsic; +def int_mblaze_fsl_neget : GCCBuiltin<"__builtin_mblaze_fsl_neget">, + MBFSL_Get_Intrinsic; +def int_mblaze_fsl_neaget : GCCBuiltin<"__builtin_mblaze_fsl_neaget">, + MBFSL_Get_Intrinsic; +def int_mblaze_fsl_necget : GCCBuiltin<"__builtin_mblaze_fsl_necget">, + MBFSL_Get_Intrinsic; +def int_mblaze_fsl_necaget : GCCBuiltin<"__builtin_mblaze_fsl_necaget">, + MBFSL_Get_Intrinsic; +def int_mblaze_fsl_tget : GCCBuiltin<"__builtin_mblaze_fsl_tget">, + MBFSL_Get_Intrinsic; +def int_mblaze_fsl_taget : GCCBuiltin<"__builtin_mblaze_fsl_taget">, + MBFSL_Get_Intrinsic; +def int_mblaze_fsl_tcget : GCCBuiltin<"__builtin_mblaze_fsl_tcget">, + MBFSL_Get_Intrinsic; +def int_mblaze_fsl_tcaget : GCCBuiltin<"__builtin_mblaze_fsl_tcaget">, + MBFSL_Get_Intrinsic; +def int_mblaze_fsl_teget : GCCBuiltin<"__builtin_mblaze_fsl_teget">, + MBFSL_Get_Intrinsic; +def int_mblaze_fsl_teaget : GCCBuiltin<"__builtin_mblaze_fsl_teaget">, + MBFSL_Get_Intrinsic; +def int_mblaze_fsl_tecget : GCCBuiltin<"__builtin_mblaze_fsl_tecget">, + MBFSL_Get_Intrinsic; +def int_mblaze_fsl_tecaget : GCCBuiltin<"__builtin_mblaze_fsl_tecaget">, + MBFSL_Get_Intrinsic; +def int_mblaze_fsl_tnget : GCCBuiltin<"__builtin_mblaze_fsl_tnget">, + MBFSL_Get_Intrinsic; +def int_mblaze_fsl_tnaget : GCCBuiltin<"__builtin_mblaze_fsl_tnaget">, + MBFSL_Get_Intrinsic; +def int_mblaze_fsl_tncget : GCCBuiltin<"__builtin_mblaze_fsl_tncget">, + MBFSL_Get_Intrinsic; +def int_mblaze_fsl_tncaget : GCCBuiltin<"__builtin_mblaze_fsl_tncaget">, + MBFSL_Get_Intrinsic; +def int_mblaze_fsl_tneget : GCCBuiltin<"__builtin_mblaze_fsl_tneget">, + MBFSL_Get_Intrinsic; +def int_mblaze_fsl_tneaget : GCCBuiltin<"__builtin_mblaze_fsl_tneaget">, + MBFSL_Get_Intrinsic; +def int_mblaze_fsl_tnecget : GCCBuiltin<"__builtin_mblaze_fsl_tnecget">, + MBFSL_Get_Intrinsic; +def int_mblaze_fsl_tnecaget : GCCBuiltin<"__builtin_mblaze_fsl_tnecaget">, + MBFSL_Get_Intrinsic; + +//===----------------------------------------------------------------------===// +// MicroBlaze FSL Put Intrinsic Definitions. +// + +def int_mblaze_fsl_put : GCCBuiltin<"__builtin_mblaze_fsl_put">, + MBFSL_Put_Intrinsic; +def int_mblaze_fsl_aput : GCCBuiltin<"__builtin_mblaze_fsl_aput">, + MBFSL_Put_Intrinsic; +def int_mblaze_fsl_cput : GCCBuiltin<"__builtin_mblaze_fsl_cput">, + MBFSL_Put_Intrinsic; +def int_mblaze_fsl_caput : GCCBuiltin<"__builtin_mblaze_fsl_caput">, + MBFSL_Put_Intrinsic; +def int_mblaze_fsl_nput : GCCBuiltin<"__builtin_mblaze_fsl_nput">, + MBFSL_Put_Intrinsic; +def int_mblaze_fsl_naput : GCCBuiltin<"__builtin_mblaze_fsl_naput">, + MBFSL_Put_Intrinsic; +def int_mblaze_fsl_ncput : GCCBuiltin<"__builtin_mblaze_fsl_ncput">, + MBFSL_Put_Intrinsic; +def int_mblaze_fsl_ncaput : GCCBuiltin<"__builtin_mblaze_fsl_ncaput">, + MBFSL_Put_Intrinsic; +def int_mblaze_fsl_tput : GCCBuiltin<"__builtin_mblaze_fsl_tput">, + MBFSL_PutT_Intrinsic; +def int_mblaze_fsl_taput : GCCBuiltin<"__builtin_mblaze_fsl_taput">, + MBFSL_PutT_Intrinsic; +def int_mblaze_fsl_tcput : GCCBuiltin<"__builtin_mblaze_fsl_tcput">, + MBFSL_PutT_Intrinsic; +def int_mblaze_fsl_tcaput : GCCBuiltin<"__builtin_mblaze_fsl_tcaput">, + MBFSL_PutT_Intrinsic; +def int_mblaze_fsl_tnput : GCCBuiltin<"__builtin_mblaze_fsl_tnput">, + MBFSL_PutT_Intrinsic; +def int_mblaze_fsl_tnaput : GCCBuiltin<"__builtin_mblaze_fsl_tnaput">, + MBFSL_PutT_Intrinsic; +def int_mblaze_fsl_tncput : GCCBuiltin<"__builtin_mblaze_fsl_tncput">, + MBFSL_PutT_Intrinsic; +def int_mblaze_fsl_tncaput : GCCBuiltin<"__builtin_mblaze_fsl_tncaput">, + MBFSL_PutT_Intrinsic; Added: llvm/trunk/lib/Target/MBlaze/MBlazeMCAsmInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeMCAsmInfo.cpp?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeMCAsmInfo.cpp (added) +++ llvm/trunk/lib/Target/MBlaze/MBlazeMCAsmInfo.cpp Tue Feb 23 13:15:24 2010 @@ -0,0 +1,27 @@ +//===-- MBlazeMCAsmInfo.cpp - MBlaze asm properties -----------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file contains the declarations of the MBlazeMCAsmInfo properties. +// +//===----------------------------------------------------------------------===// + +#include "MBlazeMCAsmInfo.h" +using namespace llvm; + +MBlazeMCAsmInfo::MBlazeMCAsmInfo(const Target &T, const StringRef &TT) { + AlignmentIsInBytes = false; + Data16bitsDirective = "\t.half\t"; + Data32bitsDirective = "\t.word\t"; + Data64bitsDirective = 0; + PrivateGlobalPrefix = "$"; + CommentString = "#"; + ZeroDirective = "\t.space\t"; + GPRel32Directive = "\t.gpword\t"; + HasSetDirective = false; +} Added: llvm/trunk/lib/Target/MBlaze/MBlazeMCAsmInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeMCAsmInfo.h?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeMCAsmInfo.h (added) +++ llvm/trunk/lib/Target/MBlaze/MBlazeMCAsmInfo.h Tue Feb 23 13:15:24 2010 @@ -0,0 +1,30 @@ +//=====-- MBlazeMCAsmInfo.h - MBlaze asm properties -----------*- C++ -*--====// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file contains the declaration of the MBlazeMCAsmInfo class. +// +//===----------------------------------------------------------------------===// + +#ifndef MBLAZETARGETASMINFO_H +#define MBLAZETARGETASMINFO_H + +#include "llvm/MC/MCAsmInfo.h" + +namespace llvm { + class Target; + class StringRef; + + class MBlazeMCAsmInfo : public MCAsmInfo { + public: + explicit MBlazeMCAsmInfo(const Target &T, const StringRef &TT); + }; + +} // namespace llvm + +#endif Added: llvm/trunk/lib/Target/MBlaze/MBlazeMachineFunction.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeMachineFunction.h?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeMachineFunction.h (added) +++ llvm/trunk/lib/Target/MBlaze/MBlazeMachineFunction.h Tue Feb 23 13:15:24 2010 @@ -0,0 +1,140 @@ +//===-- MBlazeMachineFunctionInfo.h - Private data ----------------*- C++ -*-=// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file declares the MBlaze specific subclass of MachineFunctionInfo. +// +//===----------------------------------------------------------------------===// + +#ifndef MBLAZE_MACHINE_FUNCTION_INFO_H +#define MBLAZE_MACHINE_FUNCTION_INFO_H + +#include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/VectorExtras.h" +#include "llvm/CodeGen/MachineFunction.h" +#include "llvm/CodeGen/MachineFrameInfo.h" + +namespace llvm { + +/// MBlazeFunctionInfo - This class is derived from MachineFunction private +/// MBlaze target-specific information for each MachineFunction. +class MBlazeFunctionInfo : public MachineFunctionInfo { + +private: + /// Holds for each function where on the stack the Frame Pointer must be + /// saved. This is used on Prologue and Epilogue to emit FP save/restore + int FPStackOffset; + + /// Holds for each function where on the stack the Return Address must be + /// saved. This is used on Prologue and Epilogue to emit RA save/restore + int RAStackOffset; + + /// At each function entry, two special bitmask directives must be emitted + /// to help debugging, for CPU and FPU callee saved registers. Both need + /// the negative offset from the final stack size and its higher registers + /// location on the stack. + int CPUTopSavedRegOff; + int FPUTopSavedRegOff; + + /// MBlazeFIHolder - Holds a FrameIndex and it's Stack Pointer Offset + struct MBlazeFIHolder { + + int FI; + int SPOffset; + + MBlazeFIHolder(int FrameIndex, int StackPointerOffset) + : FI(FrameIndex), SPOffset(StackPointerOffset) {} + }; + + /// When PIC is used the GP must be saved on the stack on the function + /// prologue and must be reloaded from this stack location after every + /// call. A reference to its stack location and frame index must be kept + /// to be used on emitPrologue and processFunctionBeforeFrameFinalized. + MBlazeFIHolder GPHolder; + + /// On LowerFormalArguments the stack size is unknown, so the Stack + /// Pointer Offset calculation of "not in register arguments" must be + /// postponed to emitPrologue. + SmallVector FnLoadArgs; + bool HasLoadArgs; + + // When VarArgs, we must write registers back to caller stack, preserving + // on register arguments. Since the stack size is unknown on + // LowerFormalArguments, the Stack Pointer Offset calculation must be + // postponed to emitPrologue. + SmallVector FnStoreVarArgs; + bool HasStoreVarArgs; + + /// SRetReturnReg - Some subtargets require that sret lowering includes + /// returning the value of the returned struct in a register. This field + /// holds the virtual register into which the sret argument is passed. + unsigned SRetReturnReg; + + /// GlobalBaseReg - keeps track of the virtual register initialized for + /// use as the global base register. This is used for PIC in some PIC + /// relocation models. + unsigned GlobalBaseReg; + +public: + MBlazeFunctionInfo(MachineFunction& MF) + : FPStackOffset(0), RAStackOffset(0), CPUTopSavedRegOff(0), + FPUTopSavedRegOff(0), GPHolder(-1,-1), HasLoadArgs(false), + HasStoreVarArgs(false), SRetReturnReg(0), GlobalBaseReg(0) + {} + + int getFPStackOffset() const { return FPStackOffset; } + void setFPStackOffset(int Off) { FPStackOffset = Off; } + + int getRAStackOffset() const { return RAStackOffset; } + void setRAStackOffset(int Off) { RAStackOffset = Off; } + + int getCPUTopSavedRegOff() const { return CPUTopSavedRegOff; } + void setCPUTopSavedRegOff(int Off) { CPUTopSavedRegOff = Off; } + + int getFPUTopSavedRegOff() const { return FPUTopSavedRegOff; } + void setFPUTopSavedRegOff(int Off) { FPUTopSavedRegOff = Off; } + + int getGPStackOffset() const { return GPHolder.SPOffset; } + int getGPFI() const { return GPHolder.FI; } + void setGPStackOffset(int Off) { GPHolder.SPOffset = Off; } + void setGPFI(int FI) { GPHolder.FI = FI; } + bool needGPSaveRestore() const { return GPHolder.SPOffset != -1; } + + bool hasLoadArgs() const { return HasLoadArgs; } + bool hasStoreVarArgs() const { return HasStoreVarArgs; } + + void recordLoadArgsFI(int FI, int SPOffset) { + if (!HasLoadArgs) HasLoadArgs=true; + FnLoadArgs.push_back(MBlazeFIHolder(FI, SPOffset)); + } + void recordStoreVarArgsFI(int FI, int SPOffset) { + if (!HasStoreVarArgs) HasStoreVarArgs=true; + FnStoreVarArgs.push_back(MBlazeFIHolder(FI, SPOffset)); + } + + void adjustLoadArgsFI(MachineFrameInfo *MFI) const { + if (!hasLoadArgs()) return; + for (unsigned i = 0, e = FnLoadArgs.size(); i != e; ++i) + MFI->setObjectOffset( FnLoadArgs[i].FI, FnLoadArgs[i].SPOffset ); + } + void adjustStoreVarArgsFI(MachineFrameInfo *MFI) const { + if (!hasStoreVarArgs()) return; + for (unsigned i = 0, e = FnStoreVarArgs.size(); i != e; ++i) + MFI->setObjectOffset( FnStoreVarArgs[i].FI, FnStoreVarArgs[i].SPOffset ); + } + + unsigned getSRetReturnReg() const { return SRetReturnReg; } + void setSRetReturnReg(unsigned Reg) { SRetReturnReg = Reg; } + + unsigned getGlobalBaseReg() const { return GlobalBaseReg; } + void setGlobalBaseReg(unsigned Reg) { GlobalBaseReg = Reg; } +}; + +} // end of namespace llvm + +#endif // MBLAZE_MACHINE_FUNCTION_INFO_H Added: llvm/trunk/lib/Target/MBlaze/MBlazeRegisterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeRegisterInfo.cpp?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeRegisterInfo.cpp (added) +++ llvm/trunk/lib/Target/MBlaze/MBlazeRegisterInfo.cpp Tue Feb 23 13:15:24 2010 @@ -0,0 +1,378 @@ +//===- MBlazeRegisterInfo.cpp - MBlaze Register Information -== -*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file contains the MBlaze implementation of the TargetRegisterInfo +// class. +// +//===----------------------------------------------------------------------===// + +#define DEBUG_TYPE "mblaze-reg-info" + +#include "MBlaze.h" +#include "MBlazeSubtarget.h" +#include "MBlazeRegisterInfo.h" +#include "MBlazeMachineFunction.h" +#include "llvm/Constants.h" +#include "llvm/Type.h" +#include "llvm/Function.h" +#include "llvm/CodeGen/ValueTypes.h" +#include "llvm/CodeGen/MachineInstrBuilder.h" +#include "llvm/CodeGen/MachineFunction.h" +#include "llvm/CodeGen/MachineFrameInfo.h" +#include "llvm/CodeGen/MachineLocation.h" +#include "llvm/Target/TargetFrameInfo.h" +#include "llvm/Target/TargetMachine.h" +#include "llvm/Target/TargetOptions.h" +#include "llvm/Target/TargetInstrInfo.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/Debug.h" +#include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/raw_ostream.h" +#include "llvm/ADT/BitVector.h" +#include "llvm/ADT/STLExtras.h" + +using namespace llvm; + +MBlazeRegisterInfo:: +MBlazeRegisterInfo(const MBlazeSubtarget &ST, const TargetInstrInfo &tii) + : MBlazeGenRegisterInfo(MBlaze::ADJCALLSTACKDOWN, MBlaze::ADJCALLSTACKUP), + Subtarget(ST), TII(tii) {} + +/// getRegisterNumbering - Given the enum value for some register, e.g. +/// MBlaze::R0, return the number that it corresponds to (e.g. 0). +unsigned MBlazeRegisterInfo::getRegisterNumbering(unsigned RegEnum) { + switch (RegEnum) { + case MBlaze::R0 : case MBlaze::F0 : return 0; + case MBlaze::R1 : case MBlaze::F1 : return 1; + case MBlaze::R2 : case MBlaze::F2 : return 2; + case MBlaze::R3 : case MBlaze::F3 : return 3; + case MBlaze::R4 : case MBlaze::F4 : return 4; + case MBlaze::R5 : case MBlaze::F5 : return 5; + case MBlaze::R6 : case MBlaze::F6 : return 6; + case MBlaze::R7 : case MBlaze::F7 : return 7; + case MBlaze::R8 : case MBlaze::F8 : return 8; + case MBlaze::R9 : case MBlaze::F9 : return 9; + case MBlaze::R10 : case MBlaze::F10 : return 10; + case MBlaze::R11 : case MBlaze::F11 : return 11; + case MBlaze::R12 : case MBlaze::F12 : return 12; + case MBlaze::R13 : case MBlaze::F13 : return 13; + case MBlaze::R14 : case MBlaze::F14 : return 14; + case MBlaze::R15 : case MBlaze::F15 : return 15; + case MBlaze::R16 : case MBlaze::F16 : return 16; + case MBlaze::R17 : case MBlaze::F17 : return 17; + case MBlaze::R18 : case MBlaze::F18 : return 18; + case MBlaze::R19 : case MBlaze::F19 : return 19; + case MBlaze::R20 : case MBlaze::F20 : return 20; + case MBlaze::R21 : case MBlaze::F21 : return 21; + case MBlaze::R22 : case MBlaze::F22 : return 22; + case MBlaze::R23 : case MBlaze::F23 : return 23; + case MBlaze::R24 : case MBlaze::F24 : return 24; + case MBlaze::R25 : case MBlaze::F25 : return 25; + case MBlaze::R26 : case MBlaze::F26 : return 26; + case MBlaze::R27 : case MBlaze::F27 : return 27; + case MBlaze::R28 : case MBlaze::F28 : return 28; + case MBlaze::R29 : case MBlaze::F29 : return 29; + case MBlaze::R30 : case MBlaze::F30 : return 30; + case MBlaze::R31 : case MBlaze::F31 : return 31; + default: llvm_unreachable("Unknown register number!"); + } + return 0; // Not reached +} + +unsigned MBlazeRegisterInfo::getPICCallReg() { + return MBlaze::R20; +} + +//===----------------------------------------------------------------------===// +// Callee Saved Registers methods +//===----------------------------------------------------------------------===// + +/// MBlaze Callee Saved Registers +const unsigned* MBlazeRegisterInfo:: +getCalleeSavedRegs(const MachineFunction *MF) const { + // MBlaze callee-save register range is R19 - R31 + static const unsigned CalleeSavedRegs[] = { + MBlaze::R20, MBlaze::R21, MBlaze::R22, MBlaze::R23, + MBlaze::R24, MBlaze::R25, MBlaze::R26, MBlaze::R27, + MBlaze::R28, MBlaze::R29, MBlaze::R30, MBlaze::R31, + 0 + }; + + return CalleeSavedRegs; +} + +/// MBlaze Callee Saved Register Classes +const TargetRegisterClass* const* MBlazeRegisterInfo:: +getCalleeSavedRegClasses(const MachineFunction *MF) const { + static const TargetRegisterClass * const CalleeSavedRC[] = { + &MBlaze::CPURegsRegClass, &MBlaze::CPURegsRegClass, + &MBlaze::CPURegsRegClass, &MBlaze::CPURegsRegClass, + &MBlaze::CPURegsRegClass, &MBlaze::CPURegsRegClass, + &MBlaze::CPURegsRegClass, &MBlaze::CPURegsRegClass, + &MBlaze::CPURegsRegClass, &MBlaze::CPURegsRegClass, + &MBlaze::CPURegsRegClass, &MBlaze::CPURegsRegClass, + 0 + }; + + return CalleeSavedRC; +} + +BitVector MBlazeRegisterInfo:: +getReservedRegs(const MachineFunction &MF) const { + BitVector Reserved(getNumRegs()); + Reserved.set(MBlaze::R0); + Reserved.set(MBlaze::R1); + Reserved.set(MBlaze::R2); + Reserved.set(MBlaze::R13); + Reserved.set(MBlaze::R14); + Reserved.set(MBlaze::R15); + Reserved.set(MBlaze::R16); + Reserved.set(MBlaze::R17); + Reserved.set(MBlaze::R18); + Reserved.set(MBlaze::R19); + return Reserved; +} + +//===----------------------------------------------------------------------===// +// +// Stack Frame Processing methods +// +----------------------------+ +// +// The stack is allocated decrementing the stack pointer on +// the first instruction of a function prologue. Once decremented, +// all stack references are are done through a positive offset +// from the stack/frame pointer, so the stack is considered +// to grow up. +// +//===----------------------------------------------------------------------===// + +void MBlazeRegisterInfo::adjustMBlazeStackFrame(MachineFunction &MF) const { + MachineFrameInfo *MFI = MF.getFrameInfo(); + MBlazeFunctionInfo *MBlazeFI = MF.getInfo(); + + // See the description at MicroBlazeMachineFunction.h + int TopCPUSavedRegOff = -1; + + // Adjust CPU Callee Saved Registers Area. Registers RA and FP must + // be saved in this CPU Area there is the need. This whole Area must + // be aligned to the default Stack Alignment requirements. + unsigned StackOffset = MFI->getStackSize(); + unsigned RegSize = 4; + + // Replace the dummy '0' SPOffset by the negative offsets, as explained on + // LowerFORMAL_ARGUMENTS. Leaving '0' for while is necessary to avoid + // the approach done by calculateFrameObjectOffsets to the stack frame. + MBlazeFI->adjustLoadArgsFI(MFI); + MBlazeFI->adjustStoreVarArgsFI(MFI); + + if (hasFP(MF)) { + MFI->setObjectOffset(MFI->CreateStackObject(RegSize, RegSize, true), + StackOffset); + MBlazeFI->setFPStackOffset(StackOffset); + TopCPUSavedRegOff = StackOffset; + StackOffset += RegSize; + } + + if (MFI->hasCalls()) { + MFI->setObjectOffset(MFI->CreateStackObject(RegSize, RegSize, true), + StackOffset); + MBlazeFI->setRAStackOffset(StackOffset); + TopCPUSavedRegOff = StackOffset; + StackOffset += RegSize; + } + + // Update frame info + MFI->setStackSize(StackOffset); + + // Recalculate the final tops offset. The final values must be '0' + // if there isn't a callee saved register for CPU or FPU, otherwise + // a negative offset is needed. + if (TopCPUSavedRegOff >= 0) + MBlazeFI->setCPUTopSavedRegOff(TopCPUSavedRegOff-StackOffset); +} + +// hasFP - Return true if the specified function should have a dedicated frame +// pointer register. This is true if the function has variable sized allocas or +// if frame pointer elimination is disabled. +bool MBlazeRegisterInfo::hasFP(const MachineFunction &MF) const { + const MachineFrameInfo *MFI = MF.getFrameInfo(); + return NoFramePointerElim || MFI->hasVarSizedObjects(); +} + +// This function eliminate ADJCALLSTACKDOWN, +// ADJCALLSTACKUP pseudo instructions +void MBlazeRegisterInfo:: +eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, + MachineBasicBlock::iterator I) const { + // Simply discard ADJCALLSTACKDOWN, ADJCALLSTACKUP instructions. + MBB.erase(I); +} + +// FrameIndex represent objects inside a abstract stack. +// We must replace FrameIndex with an stack/frame pointer +// direct reference. +unsigned MBlazeRegisterInfo:: +eliminateFrameIndex(MachineBasicBlock::iterator II, int SPAdj, + int *Value, RegScavenger *RS) const { + MachineInstr &MI = *II; + MachineFunction &MF = *MI.getParent()->getParent(); + + unsigned i = 0; + while (!MI.getOperand(i).isFI()) { + ++i; + assert(i < MI.getNumOperands() && + "Instr doesn't have FrameIndex operand!"); + } + + unsigned oi = i == 2 ? 1 : 2; + + DEBUG(errs() << "\nFunction : " << MF.getFunction()->getName() << "\n"; + errs() << "<--------->\n" << MI); + + int FrameIndex = MI.getOperand(i).getIndex(); + int stackSize = MF.getFrameInfo()->getStackSize(); + int spOffset = MF.getFrameInfo()->getObjectOffset(FrameIndex); + + DEBUG(errs() << "FrameIndex : " << FrameIndex << "\n" + << "spOffset : " << spOffset << "\n" + << "stackSize : " << stackSize << "\n"); + + // as explained on LowerFormalArguments, detect negative offsets + // and adjust SPOffsets considering the final stack size. + int Offset = ((spOffset < 0) ? (stackSize + (-(spOffset+4))) : (spOffset)); + Offset += MI.getOperand(oi).getImm(); + + DEBUG(errs() << "Offset : " << Offset << "\n" << "<--------->\n"); + + MI.getOperand(oi).ChangeToImmediate(Offset); + MI.getOperand(i).ChangeToRegister(getFrameRegister(MF), false); + return 0; +} + +void MBlazeRegisterInfo:: +emitPrologue(MachineFunction &MF) const { + MachineBasicBlock &MBB = MF.front(); + MachineFrameInfo *MFI = MF.getFrameInfo(); + MBlazeFunctionInfo *MBlazeFI = MF.getInfo(); + MachineBasicBlock::iterator MBBI = MBB.begin(); + DebugLoc dl = (MBBI != MBB.end() ? + MBBI->getDebugLoc() : DebugLoc::getUnknownLoc()); + + // Get the right frame order for MBlaze. + adjustMBlazeStackFrame(MF); + + // Get the number of bytes to allocate from the FrameInfo. + unsigned StackSize = MFI->getStackSize(); + + // No need to allocate space on the stack. + if (StackSize == 0 && !MFI->hasCalls()) return; + + int FPOffset = MBlazeFI->getFPStackOffset(); + int RAOffset = MBlazeFI->getRAStackOffset(); + + // Adjust stack : addi R1, R1, -imm + BuildMI(MBB, MBBI, dl, TII.get(MBlaze::ADDI), MBlaze::R1) + .addReg(MBlaze::R1).addImm(-StackSize); + + // Save the return address only if the function isnt a leaf one. + // swi R15, R1, stack_loc + if (MFI->hasCalls()) { + BuildMI(MBB, MBBI, dl, TII.get(MBlaze::SWI)) + .addReg(MBlaze::R15).addImm(RAOffset).addReg(MBlaze::R1); + } + + // if framepointer enabled, save it and set it + // to point to the stack pointer + if (hasFP(MF)) { + // swi R19, R1, stack_loc + BuildMI(MBB, MBBI, dl, TII.get(MBlaze::SWI)) + .addReg(MBlaze::R19).addImm(FPOffset).addReg(MBlaze::R1); + + // add R19, R1, R0 + BuildMI(MBB, MBBI, dl, TII.get(MBlaze::ADD), MBlaze::R19) + .addReg(MBlaze::R1).addReg(MBlaze::R0); + } +} + +void MBlazeRegisterInfo:: +emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const { + MachineBasicBlock::iterator MBBI = prior(MBB.end()); + MachineFrameInfo *MFI = MF.getFrameInfo(); + MBlazeFunctionInfo *MBlazeFI = MF.getInfo(); + DebugLoc dl = MBBI->getDebugLoc(); + + // Get the number of bytes from FrameInfo + int NumBytes = (int) MFI->getStackSize(); + + // Get the FI's where RA and FP are saved. + int FPOffset = MBlazeFI->getFPStackOffset(); + int RAOffset = MBlazeFI->getRAStackOffset(); + + // if framepointer enabled, restore it and restore the + // stack pointer + if (hasFP(MF)) { + // add R1, R19, R0 + BuildMI(MBB, MBBI, dl, TII.get(MBlaze::ADD), MBlaze::R1) + .addReg(MBlaze::R19).addReg(MBlaze::R0); + + // lwi R19, R1, stack_loc + BuildMI(MBB, MBBI, dl, TII.get(MBlaze::LWI), MBlaze::R19) + .addImm(FPOffset).addReg(MBlaze::R1); + } + + // Restore the return address only if the function isnt a leaf one. + // lwi R15, R1, stack_loc + if (MFI->hasCalls()) { + BuildMI(MBB, MBBI, dl, TII.get(MBlaze::LWI), MBlaze::R15) + .addImm(RAOffset).addReg(MBlaze::R1); + } + + // adjust stack. + // addi R1, R1, imm + if (NumBytes) { + BuildMI(MBB, MBBI, dl, TII.get(MBlaze::ADDI), MBlaze::R1) + .addReg(MBlaze::R1).addImm(NumBytes); + } +} + + +void MBlazeRegisterInfo:: +processFunctionBeforeFrameFinalized(MachineFunction &MF) const { + // Set the stack offset where GP must be saved/loaded from. + MachineFrameInfo *MFI = MF.getFrameInfo(); + MBlazeFunctionInfo *MBlazeFI = MF.getInfo(); + if (MBlazeFI->needGPSaveRestore()) + MFI->setObjectOffset(MBlazeFI->getGPFI(), MBlazeFI->getGPStackOffset()); +} + +unsigned MBlazeRegisterInfo::getRARegister() const { + return MBlaze::R15; +} + +unsigned MBlazeRegisterInfo::getFrameRegister(const MachineFunction &MF) const { + return hasFP(MF) ? MBlaze::R19 : MBlaze::R1; +} + +unsigned MBlazeRegisterInfo::getEHExceptionRegister() const { + llvm_unreachable("What is the exception register"); + return 0; +} + +unsigned MBlazeRegisterInfo::getEHHandlerRegister() const { + llvm_unreachable("What is the exception handler register"); + return 0; +} + +int MBlazeRegisterInfo::getDwarfRegNum(unsigned RegNum, bool isEH) const { + llvm_unreachable("What is the dwarf register number"); + return -1; +} + +#include "MBlazeGenRegisterInfo.inc" + Added: llvm/trunk/lib/Target/MBlaze/MBlazeRegisterInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeRegisterInfo.h?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeRegisterInfo.h (added) +++ llvm/trunk/lib/Target/MBlaze/MBlazeRegisterInfo.h Tue Feb 23 13:15:24 2010 @@ -0,0 +1,90 @@ +//===- MBlazeRegisterInfo.h - MBlaze Register Information Impl --*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file contains the MBlaze implementation of the TargetRegisterInfo +// class. +// +//===----------------------------------------------------------------------===// + +#ifndef MBLAZEREGISTERINFO_H +#define MBLAZEREGISTERINFO_H + +#include "MBlaze.h" +#include "llvm/Target/TargetRegisterInfo.h" +#include "MBlazeGenRegisterInfo.h.inc" + +namespace llvm { +class MBlazeSubtarget; +class TargetInstrInfo; +class Type; + +namespace MBlaze { + /// SubregIndex - The index of various sized subregister classes. Note that + /// these indices must be kept in sync with the class indices in the + /// MBlazeRegisterInfo.td file. + enum SubregIndex { + SUBREG_FPEVEN = 1, SUBREG_FPODD = 2 + }; +} + +struct MBlazeRegisterInfo : public MBlazeGenRegisterInfo { + const MBlazeSubtarget &Subtarget; + const TargetInstrInfo &TII; + + MBlazeRegisterInfo(const MBlazeSubtarget &Subtarget, + const TargetInstrInfo &tii); + + /// getRegisterNumbering - Given the enum value for some register, e.g. + /// MBlaze::RA, return the number that it corresponds to (e.g. 31). + static unsigned getRegisterNumbering(unsigned RegEnum); + + /// Get PIC indirect call register + static unsigned getPICCallReg(); + + /// Adjust the MBlaze stack frame. + void adjustMBlazeStackFrame(MachineFunction &MF) const; + + /// Code Generation virtual methods... + const unsigned *getCalleeSavedRegs(const MachineFunction* MF = 0) const; + + const TargetRegisterClass* const* + getCalleeSavedRegClasses(const MachineFunction* MF = 0) const; + + BitVector getReservedRegs(const MachineFunction &MF) const; + + bool hasFP(const MachineFunction &MF) const; + + void eliminateCallFramePseudoInstr(MachineFunction &MF, + MachineBasicBlock &MBB, + MachineBasicBlock::iterator I) const; + + /// Stack Frame Processing Methods + unsigned eliminateFrameIndex(MachineBasicBlock::iterator II, + int SPAdj, int *Value = NULL, + RegScavenger *RS = NULL) const; + + void processFunctionBeforeFrameFinalized(MachineFunction &MF) const; + + void emitPrologue(MachineFunction &MF) const; + void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const; + + /// Debug information queries. + unsigned getRARegister() const; + unsigned getFrameRegister(const MachineFunction &MF) const; + + /// Exception handling queries. + unsigned getEHExceptionRegister() const; + unsigned getEHHandlerRegister() const; + + int getDwarfRegNum(unsigned RegNum, bool isEH) const; +}; + +} // end namespace llvm + +#endif Added: llvm/trunk/lib/Target/MBlaze/MBlazeRegisterInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeRegisterInfo.td?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeRegisterInfo.td (added) +++ llvm/trunk/lib/Target/MBlaze/MBlazeRegisterInfo.td Tue Feb 23 13:15:24 2010 @@ -0,0 +1,186 @@ +//===- MBlazeRegisterInfo.td - MBlaze Register defs -------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +//===----------------------------------------------------------------------===// +// Declarations that describe the MicroBlaze register file +//===----------------------------------------------------------------------===// + +// We have banks of 32 registers each. +class MBlazeReg : Register { + field bits<5> Num; + let Namespace = "MBlaze"; +} + +class MBlazeRegWithSubRegs subregs> + : RegisterWithSubRegs { + field bits<5> Num; + let Namespace = "MBlaze"; +} + +// MBlaze CPU Registers +class MBlazeGPRReg num, string n> : MBlazeReg { + let Num = num; +} + +// MBlaze 32-bit (aliased) FPU Registers +class FPR num, string n, list subregs> + : MBlazeRegWithSubRegs { + let Num = num; +} + +//===----------------------------------------------------------------------===// +// Registers +//===----------------------------------------------------------------------===// + +let Namespace = "MBlaze" in { + + // General Purpose Registers + def R0 : MBlazeGPRReg< 0, "r0">, DwarfRegNum<[0]>; + def R1 : MBlazeGPRReg< 1, "r1">, DwarfRegNum<[1]>; + def R2 : MBlazeGPRReg< 2, "r2">, DwarfRegNum<[2]>; + def R3 : MBlazeGPRReg< 3, "r3">, DwarfRegNum<[3]>; + def R4 : MBlazeGPRReg< 4, "r4">, DwarfRegNum<[5]>; + def R5 : MBlazeGPRReg< 5, "r5">, DwarfRegNum<[5]>; + def R6 : MBlazeGPRReg< 6, "r6">, DwarfRegNum<[6]>; + def R7 : MBlazeGPRReg< 7, "r7">, DwarfRegNum<[7]>; + def R8 : MBlazeGPRReg< 8, "r8">, DwarfRegNum<[8]>; + def R9 : MBlazeGPRReg< 9, "r9">, DwarfRegNum<[9]>; + def R10 : MBlazeGPRReg< 10, "r10">, DwarfRegNum<[10]>; + def R11 : MBlazeGPRReg< 11, "r11">, DwarfRegNum<[11]>; + def R12 : MBlazeGPRReg< 12, "r12">, DwarfRegNum<[12]>; + def R13 : MBlazeGPRReg< 13, "r13">, DwarfRegNum<[13]>; + def R14 : MBlazeGPRReg< 14, "r14">, DwarfRegNum<[14]>; + def R15 : MBlazeGPRReg< 15, "r15">, DwarfRegNum<[15]>; + def R16 : MBlazeGPRReg< 16, "r16">, DwarfRegNum<[16]>; + def R17 : MBlazeGPRReg< 17, "r17">, DwarfRegNum<[17]>; + def R18 : MBlazeGPRReg< 18, "r18">, DwarfRegNum<[18]>; + def R19 : MBlazeGPRReg< 19, "r19">, DwarfRegNum<[19]>; + def R20 : MBlazeGPRReg< 20, "r20">, DwarfRegNum<[20]>; + def R21 : MBlazeGPRReg< 21, "r21">, DwarfRegNum<[21]>; + def R22 : MBlazeGPRReg< 22, "r22">, DwarfRegNum<[22]>; + def R23 : MBlazeGPRReg< 23, "r23">, DwarfRegNum<[23]>; + def R24 : MBlazeGPRReg< 24, "r24">, DwarfRegNum<[24]>; + def R25 : MBlazeGPRReg< 25, "r25">, DwarfRegNum<[25]>; + def R26 : MBlazeGPRReg< 26, "r26">, DwarfRegNum<[26]>; + def R27 : MBlazeGPRReg< 27, "r27">, DwarfRegNum<[27]>; + def R28 : MBlazeGPRReg< 28, "r28">, DwarfRegNum<[28]>; + def R29 : MBlazeGPRReg< 29, "r29">, DwarfRegNum<[29]>; + def R30 : MBlazeGPRReg< 30, "r30">, DwarfRegNum<[30]>; + def R31 : MBlazeGPRReg< 31, "r31">, DwarfRegNum<[31]>; + + /// MBlaze Single point precision FPU Registers + def F0 : FPR< 0, "r0", [R0]>, DwarfRegNum<[32]>; + def F1 : FPR< 1, "r1", [R1]>, DwarfRegNum<[33]>; + def F2 : FPR< 2, "r2", [R2]>, DwarfRegNum<[34]>; + def F3 : FPR< 3, "r3", [R3]>, DwarfRegNum<[35]>; + def F4 : FPR< 4, "r4", [R4]>, DwarfRegNum<[36]>; + def F5 : FPR< 5, "r5", [R5]>, DwarfRegNum<[37]>; + def F6 : FPR< 6, "r6", [R6]>, DwarfRegNum<[38]>; + def F7 : FPR< 7, "r7", [R7]>, DwarfRegNum<[39]>; + def F8 : FPR< 8, "r8", [R8]>, DwarfRegNum<[40]>; + def F9 : FPR< 9, "r9", [R9]>, DwarfRegNum<[41]>; + def F10 : FPR<10, "r10", [R10]>, DwarfRegNum<[42]>; + def F11 : FPR<11, "r11", [R11]>, DwarfRegNum<[43]>; + def F12 : FPR<12, "r12", [R12]>, DwarfRegNum<[44]>; + def F13 : FPR<13, "r13", [R13]>, DwarfRegNum<[45]>; + def F14 : FPR<14, "r14", [R14]>, DwarfRegNum<[46]>; + def F15 : FPR<15, "r15", [R15]>, DwarfRegNum<[47]>; + def F16 : FPR<16, "r16", [R16]>, DwarfRegNum<[48]>; + def F17 : FPR<17, "r17", [R17]>, DwarfRegNum<[49]>; + def F18 : FPR<18, "r18", [R18]>, DwarfRegNum<[50]>; + def F19 : FPR<19, "r19", [R19]>, DwarfRegNum<[51]>; + def F20 : FPR<20, "r20", [R20]>, DwarfRegNum<[52]>; + def F21 : FPR<21, "r21", [R21]>, DwarfRegNum<[53]>; + def F22 : FPR<22, "r22", [R22]>, DwarfRegNum<[54]>; + def F23 : FPR<23, "r23", [R23]>, DwarfRegNum<[55]>; + def F24 : FPR<24, "r24", [R24]>, DwarfRegNum<[56]>; + def F25 : FPR<25, "r25", [R25]>, DwarfRegNum<[57]>; + def F26 : FPR<26, "r26", [R26]>, DwarfRegNum<[58]>; + def F27 : FPR<27, "r27", [R27]>, DwarfRegNum<[59]>; + def F28 : FPR<28, "r28", [R28]>, DwarfRegNum<[60]>; + def F29 : FPR<29, "r29", [R29]>, DwarfRegNum<[61]>; + def F30 : FPR<30, "r30", [R30]>, DwarfRegNum<[62]>; + def F31 : FPR<31, "r31", [R31]>, DwarfRegNum<[63]>; +} + +//===----------------------------------------------------------------------===// +// Register Classes +//===----------------------------------------------------------------------===// + +def CPURegs : RegisterClass<"MBlaze", [i32], 32, + [ + // Return Values and Arguments + R3, R4, R5, R6, R7, R8, R9, R10, + + // Not preserved across procedure calls + R11, R12, + + // Callee save + R20, R21, R22, R23, R24, R25, R26, R27, R28, R29, R30, R31, + + // Reserved + R0, // Always zero + R1, // The stack pointer + R2, // Read-only small data area anchor + R13, // Read-write small data area anchor + R14, // Return address for interrupts + R15, // Return address for sub-routines + R16, // Return address for trap + R17, // Return address for exceptions + R18, // Reserved for assembler + R19 // The frame-pointer + ]> +{ + let MethodProtos = [{ + iterator allocation_order_end(const MachineFunction &MF) const; + }]; + let MethodBodies = [{ + CPURegsClass::iterator + CPURegsClass::allocation_order_end(const MachineFunction &MF) const { + // The last 10 registers on the list above are reserved + return end()-10; + } + }]; +} + +def FGR32 : RegisterClass<"MBlaze", [f32], 32, + [ + // Return Values and Arguments + F3, F4, F5, F6, F7, F8, F9, F10, + + // Not preserved across procedure calls + F11, F12, + + // Callee save + F20, F21, F22, F23, F24, F25, F26, F27, F28, F29, F30, F31, + + // Reserved + F0, // Always zero + F1, // The stack pointer + F2, // Read-only small data area anchor + F13, // Read-write small data area anchor + F14, // Return address for interrupts + F15, // Return address for sub-routines + F16, // Return address for trap + F17, // Return address for exceptions + F18, // Reserved for assembler + F19 // The frame pointer + ]> +{ + let MethodProtos = [{ + iterator allocation_order_end(const MachineFunction &MF) const; + }]; + let MethodBodies = [{ + FGR32Class::iterator + FGR32Class::allocation_order_end(const MachineFunction &MF) const { + // The last 10 registers on the list above are reserved + return end()-10; + } + }]; +} Added: llvm/trunk/lib/Target/MBlaze/MBlazeSchedule.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeSchedule.td?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeSchedule.td (added) +++ llvm/trunk/lib/Target/MBlaze/MBlazeSchedule.td Tue Feb 23 13:15:24 2010 @@ -0,0 +1,63 @@ +//===- MBlazeSchedule.td - MBlaze Scheduling Definitions --------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +//===----------------------------------------------------------------------===// +// Functional units across MBlaze chips sets. Based on GCC/MBlaze backend files. +//===----------------------------------------------------------------------===// +def ALU : FuncUnit; +def IMULDIV : FuncUnit; + +//===----------------------------------------------------------------------===// +// Instruction Itinerary classes used for MBlaze +//===----------------------------------------------------------------------===// +def IIAlu : InstrItinClass; +def IILoad : InstrItinClass; +def IIStore : InstrItinClass; +def IIXfer : InstrItinClass; +def IIBranch : InstrItinClass; +def IIHiLo : InstrItinClass; +def IIImul : InstrItinClass; +def IIIdiv : InstrItinClass; +def IIFcvt : InstrItinClass; +def IIFmove : InstrItinClass; +def IIFcmp : InstrItinClass; +def IIFadd : InstrItinClass; +def IIFmulSingle : InstrItinClass; +def IIFmulDouble : InstrItinClass; +def IIFdivSingle : InstrItinClass; +def IIFdivDouble : InstrItinClass; +def IIFsqrtSingle : InstrItinClass; +def IIFsqrtDouble : InstrItinClass; +def IIFrecipFsqrtStep : InstrItinClass; +def IIPseudo : InstrItinClass; + +//===----------------------------------------------------------------------===// +// MBlaze Generic instruction itineraries. +//===----------------------------------------------------------------------===// +def MBlazeGenericItineraries : ProcessorItineraries<[ + InstrItinData]>, + InstrItinData]>, + InstrItinData]>, + InstrItinData]>, + InstrItinData]>, + InstrItinData]>, + InstrItinData]>, + InstrItinData]>, + InstrItinData]>, + InstrItinData]>, + InstrItinData]>, + InstrItinData]>, + InstrItinData]>, + InstrItinData]>, + InstrItinData]>, + InstrItinData]>, + InstrItinData]>, + InstrItinData]>, + InstrItinData]> +]>; Added: llvm/trunk/lib/Target/MBlaze/MBlazeSubtarget.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeSubtarget.cpp?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeSubtarget.cpp (added) +++ llvm/trunk/lib/Target/MBlaze/MBlazeSubtarget.cpp Tue Feb 23 13:15:24 2010 @@ -0,0 +1,31 @@ +//===- MBlazeSubtarget.cpp - MBlaze Subtarget Information -------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file implements the MBlaze specific subclass of TargetSubtarget. +// +//===----------------------------------------------------------------------===// + +#include "MBlazeSubtarget.h" +#include "MBlaze.h" +#include "MBlazeGenSubtarget.inc" +#include "llvm/Support/CommandLine.h" +using namespace llvm; + +MBlazeSubtarget::MBlazeSubtarget(const std::string &TT, const std::string &FS): + HasPipe3(false), HasBarrel(false), HasDiv(false), HasMul(false), + HasFSL(false), HasEFSL(false), HasMSRSet(false), HasException(false), + HasPatCmp(false), HasFPU(false), HasESR(false), HasPVR(false), + HasMul64(false), HasSqrt(false), HasMMU(false) +{ + std::string CPU = "v400"; + MBlazeArchVersion = V400; + + // Parse features string. + ParseSubtargetFeatures(FS, CPU); +} Added: llvm/trunk/lib/Target/MBlaze/MBlazeSubtarget.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeSubtarget.h?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeSubtarget.h (added) +++ llvm/trunk/lib/Target/MBlaze/MBlazeSubtarget.h Tue Feb 23 13:15:24 2010 @@ -0,0 +1,79 @@ +//=====-- MBlazeSubtarget.h - Define Subtarget for the MBlaze -*- C++ -*--====// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file declares the MBlaze specific subclass of TargetSubtarget. +// +//===----------------------------------------------------------------------===// + +#ifndef MBLAZESUBTARGET_H +#define MBLAZESUBTARGET_H + +#include "llvm/Target/TargetSubtarget.h" +#include "llvm/Target/TargetMachine.h" + +#include + +namespace llvm { + +class MBlazeSubtarget : public TargetSubtarget { + +protected: + + enum MBlazeArchEnum { + V400, V500, V600, V700, V710 + }; + + // MBlaze architecture version + MBlazeArchEnum MBlazeArchVersion; + + bool HasPipe3; + bool HasBarrel; + bool HasDiv; + bool HasMul; + bool HasFSL; + bool HasEFSL; + bool HasMSRSet; + bool HasException; + bool HasPatCmp; + bool HasFPU; + bool HasESR; + bool HasPVR; + bool HasMul64; + bool HasSqrt; + bool HasMMU; + + InstrItineraryData InstrItins; + +public: + + /// This constructor initializes the data members to match that + /// of the specified triple. + MBlazeSubtarget(const std::string &TT, const std::string &FS); + + /// ParseSubtargetFeatures - Parses features string setting specified + /// subtarget options. Definition of function is auto generated by tblgen. + std::string ParseSubtargetFeatures(const std::string &FS, + const std::string &CPU); + + bool hasFPU() const { return HasFPU; } + bool hasSqrt() const { return HasSqrt; } + bool hasMul() const { return HasMul; } + bool hasMul64() const { return HasMul64; } + bool hasDiv() const { return HasDiv; } + bool hasBarrel() const { return HasBarrel; } + + bool isV400() const { return MBlazeArchVersion == V400; } + bool isV500() const { return MBlazeArchVersion == V500; } + bool isV600() const { return MBlazeArchVersion == V600; } + bool isV700() const { return MBlazeArchVersion == V700; } + bool isV710() const { return MBlazeArchVersion == V710; } +}; +} // End llvm namespace + +#endif Added: llvm/trunk/lib/Target/MBlaze/MBlazeTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeTargetMachine.cpp?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeTargetMachine.cpp (added) +++ llvm/trunk/lib/Target/MBlaze/MBlazeTargetMachine.cpp Tue Feb 23 13:15:24 2010 @@ -0,0 +1,66 @@ +//===-- MBlazeTargetMachine.cpp - Define TargetMachine for MBlaze ---------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// Implements the info about MBlaze target spec. +// +//===----------------------------------------------------------------------===// + +#include "MBlaze.h" +#include "MBlazeMCAsmInfo.h" +#include "MBlazeTargetMachine.h" +#include "llvm/PassManager.h" +#include "llvm/Target/TargetRegistry.h" +using namespace llvm; + +extern "C" void LLVMInitializeMBlazeTarget() { + // Register the target. + RegisterTargetMachine X(TheMBlazeTarget); + RegisterAsmInfo A(TheMBlazeTarget); +} + +// DataLayout --> Big-endian, 32-bit pointer/ABI/alignment +// The stack is always 8 byte aligned +// On function prologue, the stack is created by decrementing +// its pointer. Once decremented, all references are done with positive +// offset from the stack/frame pointer, using StackGrowsUp enables +// an easier handling. +MBlazeTargetMachine:: +MBlazeTargetMachine(const Target &T, const std::string &TT, + const std::string &FS): + LLVMTargetMachine(T, TT), + Subtarget(TT, FS), + DataLayout("E-p:32:32-i8:8:8-i16:16:16-i64:32:32-" + "f64:32:32-v64:32:32-v128:32:32-n32"), + InstrInfo(*this), + FrameInfo(TargetFrameInfo::StackGrowsUp, 8, 0), + TLInfo(*this) { + if (getRelocationModel() == Reloc::Default) { + setRelocationModel(Reloc::Static); + } + + if (getCodeModel() == CodeModel::Default) + setCodeModel(CodeModel::Small); +} + +// Install an instruction selector pass using +// the ISelDag to gen MBlaze code. +bool MBlazeTargetMachine:: +addInstSelector(PassManagerBase &PM, CodeGenOpt::Level OptLevel) { + PM.add(createMBlazeISelDag(*this)); + return false; +} + +// Implemented by targets that want to run passes immediately before +// machine code is emitted. return true if -print-machineinstrs should +// print out the code after the passes. +bool MBlazeTargetMachine:: +addPreEmitPass(PassManagerBase &PM, CodeGenOpt::Level OptLevel) { + PM.add(createMBlazeDelaySlotFillerPass(*this)); + return true; +} Added: llvm/trunk/lib/Target/MBlaze/MBlazeTargetMachine.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeTargetMachine.h?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeTargetMachine.h (added) +++ llvm/trunk/lib/Target/MBlaze/MBlazeTargetMachine.h Tue Feb 23 13:15:24 2010 @@ -0,0 +1,69 @@ +//===-- MBlazeTargetMachine.h - Define TargetMachine for MBlaze --- C++ ---===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file declares the MBlaze specific subclass of TargetMachine. +// +//===----------------------------------------------------------------------===// + +#ifndef MBLAZE_TARGETMACHINE_H +#define MBLAZE_TARGETMACHINE_H + +#include "MBlazeSubtarget.h" +#include "MBlazeInstrInfo.h" +#include "MBlazeISelLowering.h" +#include "MBlazeIntrinsicInfo.h" +#include "llvm/Target/TargetMachine.h" +#include "llvm/Target/TargetData.h" +#include "llvm/Target/TargetFrameInfo.h" + +namespace llvm { + class formatted_raw_ostream; + + class MBlazeTargetMachine : public LLVMTargetMachine { + MBlazeSubtarget Subtarget; + const TargetData DataLayout; // Calculates type size & alignment + MBlazeInstrInfo InstrInfo; + TargetFrameInfo FrameInfo; + MBlazeTargetLowering TLInfo; + MBlazeIntrinsicInfo IntrinsicInfo; + public: + MBlazeTargetMachine(const Target &T, const std::string &TT, + const std::string &FS); + + virtual const MBlazeInstrInfo *getInstrInfo() const + { return &InstrInfo; } + + virtual const TargetFrameInfo *getFrameInfo() const + { return &FrameInfo; } + + virtual const MBlazeSubtarget *getSubtargetImpl() const + { return &Subtarget; } + + virtual const TargetData *getTargetData() const + { return &DataLayout;} + + virtual const MBlazeRegisterInfo *getRegisterInfo() const + { return &InstrInfo.getRegisterInfo(); } + + virtual MBlazeTargetLowering *getTargetLowering() const + { return const_cast(&TLInfo); } + + const TargetIntrinsicInfo *getIntrinsicInfo() const + { return &IntrinsicInfo; } + + // Pass Pipeline Configuration + virtual bool addInstSelector(PassManagerBase &PM, + CodeGenOpt::Level OptLevel); + + virtual bool addPreEmitPass(PassManagerBase &PM, + CodeGenOpt::Level OptLevel); + }; +} // End llvm namespace + +#endif Added: llvm/trunk/lib/Target/MBlaze/MBlazeTargetObjectFile.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeTargetObjectFile.cpp?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeTargetObjectFile.cpp (added) +++ llvm/trunk/lib/Target/MBlaze/MBlazeTargetObjectFile.cpp Tue Feb 23 13:15:24 2010 @@ -0,0 +1,88 @@ +//===-- MBlazeTargetObjectFile.cpp - MBlaze object files ------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "MBlazeTargetObjectFile.h" +#include "MBlazeSubtarget.h" +#include "llvm/DerivedTypes.h" +#include "llvm/GlobalVariable.h" +#include "llvm/MC/MCSectionELF.h" +#include "llvm/Target/TargetData.h" +#include "llvm/Target/TargetMachine.h" +#include "llvm/Support/CommandLine.h" +using namespace llvm; + +void MBlazeTargetObjectFile:: +Initialize(MCContext &Ctx, const TargetMachine &TM) { + TargetLoweringObjectFileELF::Initialize(Ctx, TM); + + SmallDataSection = + getELFSection(".sdata", MCSectionELF::SHT_PROGBITS, + MCSectionELF::SHF_WRITE | MCSectionELF::SHF_ALLOC, + SectionKind::getDataRel()); + + SmallBSSSection = + getELFSection(".sbss", MCSectionELF::SHT_NOBITS, + MCSectionELF::SHF_WRITE | MCSectionELF::SHF_ALLOC, + SectionKind::getBSS()); + +} + +// A address must be loaded from a small section if its size is less than the +// small section size threshold. Data in this section must be addressed using +// gp_rel operator. +static bool IsInSmallSection(uint64_t Size) { + return Size > 0 && Size <= 8; +} + +bool MBlazeTargetObjectFile:: +IsGlobalInSmallSection(const GlobalValue *GV, const TargetMachine &TM) const { + if (GV->isDeclaration() || GV->hasAvailableExternallyLinkage()) + return false; + + return IsGlobalInSmallSection(GV, TM, getKindForGlobal(GV, TM)); +} + +/// IsGlobalInSmallSection - Return true if this global address should be +/// placed into small data/bss section. +bool MBlazeTargetObjectFile:: +IsGlobalInSmallSection(const GlobalValue *GV, const TargetMachine &TM, + SectionKind Kind) const { + // Only global variables, not functions. + const GlobalVariable *GVA = dyn_cast(GV); + if (!GVA) + return false; + + // We can only do this for datarel or BSS objects for now. + if (!Kind.isBSS() && !Kind.isDataRel()) + return false; + + // If this is a internal constant string, there is a special + // section for it, but not in small data/bss. + if (Kind.isMergeable1ByteCString()) + return false; + + const Type *Ty = GV->getType()->getElementType(); + return IsInSmallSection(TM.getTargetData()->getTypeAllocSize(Ty)); +} + +const MCSection *MBlazeTargetObjectFile:: +SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, + Mangler *Mang, const TargetMachine &TM) const { + // TODO: Could also support "weak" symbols as well with ".gnu.linkonce.s.*" + // sections? + + // Handle Small Section classification here. + if (Kind.isBSS() && IsGlobalInSmallSection(GV, TM, Kind)) + return SmallBSSSection; + if (Kind.isDataNoRel() && IsGlobalInSmallSection(GV, TM, Kind)) + return SmallDataSection; + + // Otherwise, we work the same as ELF. + return TargetLoweringObjectFileELF::SelectSectionForGlobal(GV, Kind, Mang,TM); +} Added: llvm/trunk/lib/Target/MBlaze/MBlazeTargetObjectFile.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeTargetObjectFile.h?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeTargetObjectFile.h (added) +++ llvm/trunk/lib/Target/MBlaze/MBlazeTargetObjectFile.h Tue Feb 23 13:15:24 2010 @@ -0,0 +1,41 @@ +//===-- llvm/Target/MBlazeTargetObjectFile.h - MBlaze Obj. Info -*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_TARGET_MBLAZE_TARGETOBJECTFILE_H +#define LLVM_TARGET_MBLAZE_TARGETOBJECTFILE_H + +#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h" + +namespace llvm { + + class MBlazeTargetObjectFile : public TargetLoweringObjectFileELF { + const MCSection *SmallDataSection; + const MCSection *SmallBSSSection; + public: + + void Initialize(MCContext &Ctx, const TargetMachine &TM); + + + /// IsGlobalInSmallSection - Return true if this global address should be + /// placed into small data/bss section. + bool IsGlobalInSmallSection(const GlobalValue *GV, + const TargetMachine &TM, + SectionKind Kind) const; + + bool IsGlobalInSmallSection(const GlobalValue *GV, + const TargetMachine &TM) const; + + const MCSection *SelectSectionForGlobal(const GlobalValue *GV, + SectionKind Kind, + Mangler *Mang, + const TargetMachine &TM) const; + }; +} // end namespace llvm + +#endif Added: llvm/trunk/lib/Target/MBlaze/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/Makefile?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/Makefile (added) +++ llvm/trunk/lib/Target/MBlaze/Makefile Tue Feb 23 13:15:24 2010 @@ -0,0 +1,23 @@ +##===- lib/Target/MBlaze/Makefile --------------------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## +LEVEL = ../../.. +LIBRARYNAME = LLVMMBlazeCodeGen +TARGET = MBlaze + +# Make sure that tblgen is run, first thing. +BUILT_SOURCES = MBlazeGenRegisterInfo.h.inc MBlazeGenRegisterNames.inc \ + MBlazeGenRegisterInfo.inc MBlazeGenInstrNames.inc \ + MBlazeGenInstrInfo.inc MBlazeGenAsmWriter.inc \ + MBlazeGenDAGISel.inc MBlazeGenCallingConv.inc \ + MBlazeGenSubtarget.inc MBlazeGenIntrinsics.inc + +DIRS = AsmPrinter TargetInfo + +include $(LEVEL)/Makefile.common + Added: llvm/trunk/lib/Target/MBlaze/TargetInfo/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/TargetInfo/CMakeLists.txt?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/TargetInfo/CMakeLists.txt (added) +++ llvm/trunk/lib/Target/MBlaze/TargetInfo/CMakeLists.txt Tue Feb 23 13:15:24 2010 @@ -0,0 +1,7 @@ +include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) + +add_llvm_library(LLVMMBlazeInfo + MBlazeTargetInfo.cpp + ) + +add_dependencies(LLVMMBlazeInfo MBlazeCodeGenTable_gen) Added: llvm/trunk/lib/Target/MBlaze/TargetInfo/MBlazeTargetInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/TargetInfo/MBlazeTargetInfo.cpp?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/TargetInfo/MBlazeTargetInfo.cpp (added) +++ llvm/trunk/lib/Target/MBlaze/TargetInfo/MBlazeTargetInfo.cpp Tue Feb 23 13:15:24 2010 @@ -0,0 +1,19 @@ +//===-- MBlazeTargetInfo.cpp - MBlaze Target Implementation ---------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "MBlaze.h" +#include "llvm/Module.h" +#include "llvm/Target/TargetRegistry.h" +using namespace llvm; + +Target llvm::TheMBlazeTarget; + +extern "C" void LLVMInitializeMBlazeTargetInfo() { + RegisterTarget X(TheMBlazeTarget, "mblaze", "MBlaze"); +} Added: llvm/trunk/lib/Target/MBlaze/TargetInfo/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/TargetInfo/Makefile?rev=96969&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/TargetInfo/Makefile (added) +++ llvm/trunk/lib/Target/MBlaze/TargetInfo/Makefile Tue Feb 23 13:15:24 2010 @@ -0,0 +1,15 @@ +##===- lib/Target/MBlaze/TargetInfo/Makefile ---------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## +LEVEL = ../../../.. +LIBRARYNAME = LLVMMBlazeInfo + +# Hack: we need to include 'main' target directory to grab private headers +CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. + +include $(LEVEL)/Makefile.common Added: llvm/trunk/test/CodeGen/MBlaze/brind.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MBlaze/brind.ll?rev=96969&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/MBlaze/brind.ll (added) +++ llvm/trunk/test/CodeGen/MBlaze/brind.ll Tue Feb 23 13:15:24 2010 @@ -0,0 +1,73 @@ +; Ensure that the select instruction is supported and is lowered to +; some sort of branch instruction. +; +; RUN: llc < %s -march=mblaze -mattr=+mul,+fpu,+barrel | FileCheck %s + +declare i32 @printf(i8*, ...) + at MSG = internal constant [13 x i8] c"Message: %d\0A\00" + + at BLKS = private constant [5 x i8*] + [ i8* blockaddress(@brind, %L1), + i8* blockaddress(@brind, %L2), + i8* blockaddress(@brind, %L3), + i8* blockaddress(@brind, %L4), + i8* blockaddress(@brind, %L5) ] + +define i32 @brind(i32 %a, i32 %b) +{ + ; CHECK: brind: +entry: + br label %loop + +loop: + %tmp.0 = phi i32 [ 0, %entry ], [ %tmp.8, %finish ] + %dst.0 = getelementptr [5 x i8*]* @BLKS, i32 0, i32 %tmp.0 + %dst.1 = load i8** %dst.0 + indirectbr i8* %dst.1, [ label %L1, + label %L2, + label %L3, + label %L4, + label %L5 ] + ; CHECK: br {{r[0-9]*}} + +L1: + %tmp.1 = add i32 %a, %b + br label %finish + ; CHECK: br + +L2: + %tmp.2 = sub i32 %a, %b + br label %finish + ; CHECK: br + +L3: + %tmp.3 = mul i32 %a, %b + br label %finish + ; CHECK: br + +L4: + %tmp.4 = sdiv i32 %a, %b + br label %finish + ; CHECK: br + +L5: + %tmp.5 = srem i32 %a, %b + br label %finish + ; CHECK: br + +finish: + %tmp.6 = phi i32 [ %tmp.1, %L1 ], + [ %tmp.2, %L2 ], + [ %tmp.3, %L3 ], + [ %tmp.4, %L4 ], + [ %tmp.5, %L5 ] + + call i32 (i8*,...)* @printf( i8* getelementptr([13 x i8]* @MSG,i32 0,i32 0), + i32 %tmp.6) + + %tmp.7 = add i32 %tmp.0, 1 + %tmp.8 = urem i32 %tmp.7, 5 + + br label %loop + ; CHECK: br +} Added: llvm/trunk/test/CodeGen/MBlaze/callind.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MBlaze/callind.ll?rev=96969&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/MBlaze/callind.ll (added) +++ llvm/trunk/test/CodeGen/MBlaze/callind.ll Tue Feb 23 13:15:24 2010 @@ -0,0 +1,80 @@ +; Ensure that indirect calls work and that they are lowered to some +; sort of branch and link instruction. +; +; RUN: llc < %s -march=mblaze -mattr=+mul,+fpu,+barrel | FileCheck %s + +declare i32 @printf(i8*, ...) + at MSG = internal constant [13 x i8] c"Message: %d\0A\00" + + at FUNS = private constant [5 x i32 (i32,i32)*] + [ i32 (i32,i32)* @doadd, + i32 (i32,i32)* @dosub, + i32 (i32,i32)* @domul, + i32 (i32,i32)* @dodiv, + i32 (i32,i32)* @dorem ] + +define i32 @doadd(i32 %a, i32 %b) +{ + ; CHECK: doadd: + %tmp.0 = add i32 %a, %b + ret i32 %tmp.0 + ; CHECK: rtsd +} + +define i32 @dosub(i32 %a, i32 %b) +{ + ; CHECK: dosub: + %tmp.0 = sub i32 %a, %b + ret i32 %tmp.0 + ; CHECK: rtsd +} + +define i32 @domul(i32 %a, i32 %b) +{ + ; CHECK: domul: + %tmp.0 = mul i32 %a, %b + ret i32 %tmp.0 + ; CHECK: rtsd +} + +define i32 @dodiv(i32 %a, i32 %b) +{ + ; CHECK: dodiv: + %tmp.0 = sdiv i32 %a, %b + ret i32 %tmp.0 + ; CHECK: rtsd +} + +define i32 @dorem(i32 %a, i32 %b) +{ + ; CHECK: dorem: + %tmp.0 = srem i32 %a, %b + ret i32 %tmp.0 + ; CHECK: rtsd +} + +define i32 @callind(i32 %a, i32 %b) +{ + ; CHECK: callind: +entry: + br label %loop + +loop: + %tmp.0 = phi i32 [ 0, %entry ], [ %tmp.3, %loop ] + %dst.0 = getelementptr [5 x i32 (i32,i32)*]* @FUNS, i32 0, i32 %tmp.0 + %dst.1 = load i32 (i32,i32)** %dst.0 + %tmp.1 = call i32 %dst.1(i32 %a, i32 %b) + ; CHECK-NOT: brli + ; CHECK-NOT: brlai + ; CHECK: brl + + call i32 (i8*,...)* @printf( i8* getelementptr([13 x i8]* @MSG,i32 0,i32 0), + i32 %tmp.1) + ; CHECK: brl + + %tmp.2 = add i32 %tmp.0, 1 + %tmp.3 = urem i32 %tmp.2, 5 + + br label %loop + ; CHECK: br +} Added: llvm/trunk/test/CodeGen/MBlaze/cc.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MBlaze/cc.ll?rev=96969&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/MBlaze/cc.ll (added) +++ llvm/trunk/test/CodeGen/MBlaze/cc.ll Tue Feb 23 13:15:24 2010 @@ -0,0 +1,315 @@ +; Test some of the calling convention lowering done by the MBlaze backend. +; We test that integer values are passed in the correct registers and +; returned in the correct registers. Additionally, we test that the stack +; is used as appropriate for passing arguments that cannot be placed into +; registers. +; +; RUN: llc < %s -march=mblaze | FileCheck %s + +declare i32 @printf(i8*, ...) + at MSG = internal constant [13 x i8] c"Message: %d\0A\00" + +define void @params0_noret() { + ; CHECK: params0_noret: + ret void + ; CHECK-NOT: {{.* r3, r0, 1}} + ; CHECK-NOT: {{.* r4, .*, .*}} + ; CHECK: rtsd +} + +define i8 @params0_8bitret() { + ; CHECK: params0_8bitret: + ret i8 1 + ; CHECK: {{.* r3, r0, 1}} + ; CHECK-NOT: {{.* r4, .*, .*}} + ; CHECK: rtsd +} + +define i16 @params0_16bitret() { + ; CHECK: params0_16bitret: + ret i16 1 + ; CHECK: {{.* r3, r0, 1}} + ; CHECK-NOT: {{.* r4, .*, .*}} + ; CHECK: rtsd +} + +define i32 @params0_32bitret() { + ; CHECK: params0_32bitret: + ret i32 1 + ; CHECK: {{.* r3, r0, 1}} + ; CHECK-NOT: {{.* r4, .*, .*}} + ; CHECK: rtsd +} + +define i64 @params0_64bitret() { + ; CHECK: params0_64bitret: + ret i64 1 + ; CHECK: {{.* r3, r0, .*}} + ; CHECK: {{.* r4, r0, 1}} + ; CHECK: rtsd +} + +define i32 @params1_32bitret(i32 %a) { + ; CHECK: params1_32bitret: + ret i32 %a + ; CHECK: {{.* r3, r5, r0}} + ; CHECK-NOT: {{.* r4, .*, .*}} + ; CHECK: rtsd +} + +define i32 @params2_32bitret(i32 %a, i32 %b) { + ; CHECK: params2_32bitret: + ret i32 %b + ; CHECK: {{.* r3, r6, r0}} + ; CHECK-NOT: {{.* r4, .*, .*}} + ; CHECK: rtsd +} + +define i32 @params3_32bitret(i32 %a, i32 %b, i32 %c) { + ; CHECK: params3_32bitret: + ret i32 %c + ; CHECK: {{.* r3, r7, r0}} + ; CHECK-NOT: {{.* r4, .*, .*}} + ; CHECK: rtsd +} + +define i32 @params4_32bitret(i32 %a, i32 %b, i32 %c, i32 %d) { + ; CHECK: params4_32bitret: + ret i32 %d + ; CHECK: {{.* r3, r8, r0}} + ; CHECK-NOT: {{.* r4, .*, .*}} + ; CHECK: rtsd +} + +define i32 @params5_32bitret(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e) { + ; CHECK: params5_32bitret: + ret i32 %e + ; CHECK: {{.* r3, r9, r0}} + ; CHECK-NOT: {{.* r4, .*, .*}} + ; CHECK: rtsd +} + +define i32 @params6_32bitret(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f) { + ; CHECK: params6_32bitret: + ret i32 %f + ; CHECK: {{.* r3, r10, r0}} + ; CHECK-NOT: {{.* r4, .*, .*}} + ; CHECK: rtsd +} + +define i32 @params7_32bitret(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, + i32 %g) { + ; CHECK: params7_32bitret: + ret i32 %g + ; CHECK: {{lwi? r3, r1, 8}} + ; CHECK-NOT: {{.* r4, .*, .*}} + ; CHECK: rtsd +} + +define i32 @params8_32bitret(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, + i32 %g, i32 %h) { + ; CHECK: params8_32bitret: + ret i32 %h + ; CHECK: {{lwi? r3, r1, 12}} + ; CHECK-NOT: {{.* r4, .*, .*}} + ; CHECK: rtsd +} + +define i32 @params9_32bitret(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, + i32 %g, i32 %h, i32 %i) { + ; CHECK: params9_32bitret: + ret i32 %i + ; CHECK: {{lwi? r3, r1, 16}} + ; CHECK-NOT: {{.* r4, .*, .*}} + ; CHECK: rtsd +} + +define i32 @params10_32bitret(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, + i32 %g, i32 %h, i32 %i, i32 %j) { + ; CHECK: params10_32bitret: + ret i32 %j + ; CHECK: {{lwi? r3, r1, 20}} + ; CHECK-NOT: {{.* r4, .*, .*}} + ; CHECK: rtsd +} + +define void @testing() { + %MSG.1 = getelementptr [13 x i8]* @MSG, i32 0, i32 0 + + call void @params0_noret() + ; CHECK: brlid + + %tmp.1 = call i8 @params0_8bitret() + ; CHECK: brlid + call i32 (i8*,...)* @printf(i8* %MSG.1, i8 %tmp.1) + ; CHECK: {{.* r5, .*, .*}} + ; CHECK: {{.* r6, r3, r0}} + ; CHECK-NOT: {{.* r7, .*, .*}} + ; CHECK: brlid + + %tmp.2 = call i16 @params0_16bitret() + ; CHECK: brlid + call i32 (i8*,...)* @printf(i8* %MSG.1, i16 %tmp.2) + ; CHECK: {{.* r5, .*, .*}} + ; CHECK: {{.* r6, r3, r0}} + ; CHECK-NOT: {{.* r7, .*, .*}} + ; CHECK: brlid + + %tmp.3 = call i32 @params0_32bitret() + ; CHECK: brlid + call i32 (i8*,...)* @printf(i8* %MSG.1, i32 %tmp.3) + ; CHECK: {{.* r5, .*, .*}} + ; CHECK: {{.* r6, r3, r0}} + ; CHECK-NOT: {{.* r7, .*, .*}} + ; CHECK: brlid + + %tmp.4 = call i64 @params0_64bitret() + ; CHECK: brlid + call i32 (i8*,...)* @printf(i8* %MSG.1, i64 %tmp.4) + ; CHECK: {{.* r5, .*, .*}} + ; CHECK: {{.* r6, r3, r0}} + ; CHECK: {{.* r7, r4, r0}} + ; CHECK: brlid + + %tmp.5 = call i32 @params1_32bitret(i32 1) + ; CHECK: {{.* r5, .*, .*}} + ; CHECK: brlid + call i32 (i8*,...)* @printf(i8* %MSG.1, i32 %tmp.5) + ; CHECK: {{.* r5, .*, .*}} + ; CHECK: {{.* r6, r3, r0}} + ; CHECK-NOT: {{.* r7, .*, .*}} + ; CHECK: brlid + + %tmp.6 = call i32 @params2_32bitret(i32 1, i32 2) + ; CHECK: {{.* r5, .*, .*}} + ; CHECK: {{.* r6, .*, .*}} + ; CHECK: brlid + call i32 (i8*,...)* @printf(i8* %MSG.1, i32 %tmp.6) + ; CHECK: {{.* r5, .*, .*}} + ; CHECK: {{.* r6, r3, r0}} + ; CHECK-NOT: {{.* r7, .*, .*}} + ; CHECK: brlid + + %tmp.7 = call i32 @params3_32bitret(i32 1, i32 2, i32 3) + ; CHECK: {{.* r5, .*, .*}} + ; CHECK: {{.* r6, .*, .*}} + ; CHECK: {{.* r7, .*, .*}} + ; CHECK: brlid + call i32 (i8*,...)* @printf(i8* %MSG.1, i32 %tmp.7) + ; CHECK: {{.* r5, .*, .*}} + ; CHECK: {{.* r6, r3, r0}} + ; CHECK-NOT: {{.* r7, .*, .*}} + ; CHECK: brlid + + %tmp.8 = call i32 @params4_32bitret(i32 1, i32 2, i32 3, i32 4) + ; CHECK: {{.* r5, .*, .*}} + ; CHECK: {{.* r6, .*, .*}} + ; CHECK: {{.* r7, .*, .*}} + ; CHECK: {{.* r8, .*, .*}} + ; CHECK: brlid + call i32 (i8*,...)* @printf(i8* %MSG.1, i32 %tmp.8) + ; CHECK: {{.* r5, .*, .*}} + ; CHECK: {{.* r6, r3, r0}} + ; CHECK-NOT: {{.* r7, .*, .*}} + ; CHECK: brlid + + %tmp.9 = call i32 @params5_32bitret(i32 1, i32 2, i32 3, i32 4, i32 5) + ; CHECK: {{.* r5, .*, .*}} + ; CHECK: {{.* r6, .*, .*}} + ; CHECK: {{.* r7, .*, .*}} + ; CHECK: {{.* r8, .*, .*}} + ; CHECK: {{.* r9, .*, .*}} + ; CHECK: brlid + call i32 (i8*,...)* @printf(i8* %MSG.1, i32 %tmp.9) + ; CHECK: {{.* r5, .*, .*}} + ; CHECK: {{.* r6, r3, r0}} + ; CHECK-NOT: {{.* r7, .*, .*}} + ; CHECK: brlid + + %tmp.10 = call i32 @params6_32bitret(i32 1, i32 2, i32 3, i32 4, i32 5, + i32 6) + ; CHECK: {{.* r5, .*, .*}} + ; CHECK: {{.* r6, .*, .*}} + ; CHECK: {{.* r7, .*, .*}} + ; CHECK: {{.* r8, .*, .*}} + ; CHECK: {{.* r9, .*, .*}} + ; CHECK: {{.* r10, .*, .*}} + ; CHECK: brlid + call i32 (i8*,...)* @printf(i8* %MSG.1, i32 %tmp.10) + ; CHECK: {{.* r5, .*, .*}} + ; CHECK: {{.* r6, r3, r0}} + ; CHECK-NOT: {{.* r7, .*, .*}} + ; CHECK: brlid + + %tmp.11 = call i32 @params7_32bitret(i32 1, i32 2, i32 3, i32 4, i32 5, + i32 6, i32 7) + ; CHECK: {{swi? .*, r1, 4}} + ; CHECK: {{.* r5, .*, .*}} + ; CHECK: {{.* r6, .*, .*}} + ; CHECK: {{.* r7, .*, .*}} + ; CHECK: {{.* r8, .*, .*}} + ; CHECK: {{.* r9, .*, .*}} + ; CHECK: {{.* r10, .*, .*}} + ; CHECK: brlid + call i32 (i8*,...)* @printf(i8* %MSG.1, i32 %tmp.11) + ; CHECK: {{.* r5, .*, .*}} + ; CHECK: {{.* r6, r3, r0}} + ; CHECK-NOT: {{.* r7, .*, .*}} + ; CHECK: brlid + + %tmp.12 = call i32 @params8_32bitret(i32 1, i32 2, i32 3, i32 4, i32 5, + i32 6, i32 7, i32 8) + ; CHECK: {{swi? .*, r1, 4}} + ; CHECK: {{swi? .*, r1, 8}} + ; CHECK: {{.* r5, .*, .*}} + ; CHECK: {{.* r6, .*, .*}} + ; CHECK: {{.* r7, .*, .*}} + ; CHECK: {{.* r8, .*, .*}} + ; CHECK: {{.* r9, .*, .*}} + ; CHECK: {{.* r10, .*, .*}} + ; CHECK: brlid + call i32 (i8*,...)* @printf(i8* %MSG.1, i32 %tmp.12) + ; CHECK: {{.* r5, .*, .*}} + ; CHECK: {{.* r6, r3, r0}} + ; CHECK-NOT: {{.* r7, .*, .*}} + ; CHECK: brlid + + %tmp.13 = call i32 @params9_32bitret(i32 1, i32 2, i32 3, i32 4, i32 5, + i32 6, i32 7, i32 8, i32 9) + ; CHECK: {{swi? .*, r1, 4}} + ; CHECK: {{swi? .*, r1, 8}} + ; CHECK: {{swi? .*, r1, 12}} + ; CHECK: {{.* r5, .*, .*}} + ; CHECK: {{.* r6, .*, .*}} + ; CHECK: {{.* r7, .*, .*}} + ; CHECK: {{.* r8, .*, .*}} + ; CHECK: {{.* r9, .*, .*}} + ; CHECK: {{.* r10, .*, .*}} + ; CHECK: brlid + call i32 (i8*,...)* @printf(i8* %MSG.1, i32 %tmp.13) + ; CHECK: {{.* r5, .*, .*}} + ; CHECK: {{.* r6, r3, r0}} + ; CHECK-NOT: {{.* r7, .*, .*}} + ; CHECK: brlid + + %tmp.14 = call i32 @params10_32bitret(i32 1, i32 2, i32 3, i32 4, i32 5, + i32 6, i32 7, i32 8, i32 9, i32 10) + ; CHECK: {{swi? .*, r1, 4}} + ; CHECK: {{swi? .*, r1, 8}} + ; CHECK: {{swi? .*, r1, 12}} + ; CHECK: {{swi? .*, r1, 16}} + ; CHECK: {{.* r5, .*, .*}} + ; CHECK: {{.* r6, .*, .*}} + ; CHECK: {{.* r7, .*, .*}} + ; CHECK: {{.* r8, .*, .*}} + ; CHECK: {{.* r9, .*, .*}} + ; CHECK: {{.* r10, .*, .*}} + ; CHECK: brlid + call i32 (i8*,...)* @printf(i8* %MSG.1, i32 %tmp.14) + ; CHECK: {{.* r5, .*, .*}} + ; CHECK: {{.* r6, r3, r0}} + ; CHECK-NOT: {{.* r7, .*, .*}} + ; CHECK: brlid + + ret void +} Added: llvm/trunk/test/CodeGen/MBlaze/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MBlaze/dg.exp?rev=96969&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/MBlaze/dg.exp (added) +++ llvm/trunk/test/CodeGen/MBlaze/dg.exp Tue Feb 23 13:15:24 2010 @@ -0,0 +1,5 @@ +load_lib llvm.exp + +if { [llvm_supports_target MBlaze] } { + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] +} Added: llvm/trunk/test/CodeGen/MBlaze/div.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MBlaze/div.ll?rev=96969&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/MBlaze/div.ll (added) +++ llvm/trunk/test/CodeGen/MBlaze/div.ll Tue Feb 23 13:15:24 2010 @@ -0,0 +1,75 @@ +; Ensure that multiplication is lowered to function calls when the multiplier +; unit is not available in the hardware and that function calls are not used +; when the multiplier unit is available in the hardware. +; +; RUN: llc < %s -march=mblaze | FileCheck -check-prefix=FUN %s +; RUN: llc < %s -march=mblaze -mattr=+div | FileCheck -check-prefix=DIV %s + +define i8 @test_i8(i8 %a, i8 %b) { + ; FUN: test_i8: + ; DIV: test_i8: + + %tmp.1 = udiv i8 %a, %b + ; FUN-NOT: idiv + ; FUN: brlid + ; DIV-NOT: brlid + ; DIV: idivu + + %tmp.2 = sdiv i8 %a, %b + ; FUN-NOT: idiv + ; FUN: brlid + ; DIV-NOT: brlid + ; DIV-NOT: idivu + ; DIV: idiv + + %tmp.3 = add i8 %tmp.1, %tmp.2 + ret i8 %tmp.3 + ; FUN: rtsd + ; DIV: rtsd +} + +define i16 @test_i16(i16 %a, i16 %b) { + ; FUN: test_i16: + ; DIV: test_i16: + + %tmp.1 = udiv i16 %a, %b + ; FUN-NOT: idiv + ; FUN: brlid + ; DIV-NOT: brlid + ; DIV: idivu + + %tmp.2 = sdiv i16 %a, %b + ; FUN-NOT: idiv + ; FUN: brlid + ; DIV-NOT: brlid + ; DIV-NOT: idivu + ; DIV: idiv + + %tmp.3 = add i16 %tmp.1, %tmp.2 + ret i16 %tmp.3 + ; FUN: rtsd + ; DIV: rtsd +} + +define i32 @test_i32(i32 %a, i32 %b) { + ; FUN: test_i32: + ; DIV: test_i32: + + %tmp.1 = udiv i32 %a, %b + ; FUN-NOT: idiv + ; FUN: brlid + ; DIV-NOT: brlid + ; DIV: idivu + + %tmp.2 = sdiv i32 %a, %b + ; FUN-NOT: idiv + ; FUN: brlid + ; DIV-NOT: brlid + ; DIV-NOT: idivu + ; DIV: idiv + + %tmp.3 = add i32 %tmp.1, %tmp.2 + ret i32 %tmp.3 + ; FUN: rtsd + ; DIV: rtsd +} Added: llvm/trunk/test/CodeGen/MBlaze/fpu.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MBlaze/fpu.ll?rev=96969&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/MBlaze/fpu.ll (added) +++ llvm/trunk/test/CodeGen/MBlaze/fpu.ll Tue Feb 23 13:15:24 2010 @@ -0,0 +1,66 @@ +; Ensure that floating point operations are lowered to function calls when the +; FPU is not available in the hardware and that function calls are not used +; when the FPU is available in the hardware. +; +; RUN: llc < %s -march=mblaze | FileCheck -check-prefix=FUN %s +; RUN: llc < %s -march=mblaze -mattr=+fpu | FileCheck -check-prefix=FPU %s + +define float @test_add(float %a, float %b) { + ; FUN: test_add: + ; FPU: test_add: + + %tmp.1 = fadd float %a, %b + ; FUN-NOT: fadd + ; FUN: brlid + ; FPU-NOT: brlid + ; FPU: fadd + + ret float %tmp.1 + ; FUN: rtsd + ; FPU: rtsd +} + +define float @test_sub(float %a, float %b) { + ; FUN: test_sub: + ; FPU: test_sub: + + %tmp.1 = fsub float %a, %b + ; FUN-NOT: frsub + ; FUN: brlid + ; FPU-NOT: brlid + ; FPU: frsub + + ret float %tmp.1 + ; FUN: rtsd + ; FPU: rtsd +} + +define float @test_mul(float %a, float %b) { + ; FUN: test_mul: + ; FPU: test_mul: + + %tmp.1 = fmul float %a, %b + ; FUN-NOT: fmul + ; FUN: brlid + ; FPU-NOT: brlid + ; FPU: fmul + + ret float %tmp.1 + ; FUN: rtsd + ; FPU: rtsd +} + +define float @test_div(float %a, float %b) { + ; FUN: test_div: + ; FPU: test_div: + + %tmp.1 = fdiv float %a, %b + ; FUN-NOT: fdiv + ; FUN: brlid + ; FPU-NOT: brlid + ; FPU: fdiv + + ret float %tmp.1 + ; FUN: rtsd + ; FPU: rtsd +} Added: llvm/trunk/test/CodeGen/MBlaze/fsl.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MBlaze/fsl.ll?rev=96969&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/MBlaze/fsl.ll (added) +++ llvm/trunk/test/CodeGen/MBlaze/fsl.ll Tue Feb 23 13:15:24 2010 @@ -0,0 +1,323 @@ +; Ensure that the FSL instrinsic instruction generate single FSL instructions +; at the machine level. Additionally, ensure that dynamic values use the +; dynamic version of the instructions and that constant values use the +; constant version of the instructions. +; +; RUN: llc < %s -march=mblaze | FileCheck %s + +declare i32 @llvm.mblaze.fsl.get(i32 %port) +declare i32 @llvm.mblaze.fsl.aget(i32 %port) +declare i32 @llvm.mblaze.fsl.cget(i32 %port) +declare i32 @llvm.mblaze.fsl.caget(i32 %port) +declare i32 @llvm.mblaze.fsl.eget(i32 %port) +declare i32 @llvm.mblaze.fsl.eaget(i32 %port) +declare i32 @llvm.mblaze.fsl.ecget(i32 %port) +declare i32 @llvm.mblaze.fsl.ecaget(i32 %port) +declare i32 @llvm.mblaze.fsl.nget(i32 %port) +declare i32 @llvm.mblaze.fsl.naget(i32 %port) +declare i32 @llvm.mblaze.fsl.ncget(i32 %port) +declare i32 @llvm.mblaze.fsl.ncaget(i32 %port) +declare i32 @llvm.mblaze.fsl.neget(i32 %port) +declare i32 @llvm.mblaze.fsl.neaget(i32 %port) +declare i32 @llvm.mblaze.fsl.necget(i32 %port) +declare i32 @llvm.mblaze.fsl.necaget(i32 %port) +declare i32 @llvm.mblaze.fsl.tget(i32 %port) +declare i32 @llvm.mblaze.fsl.taget(i32 %port) +declare i32 @llvm.mblaze.fsl.tcget(i32 %port) +declare i32 @llvm.mblaze.fsl.tcaget(i32 %port) +declare i32 @llvm.mblaze.fsl.teget(i32 %port) +declare i32 @llvm.mblaze.fsl.teaget(i32 %port) +declare i32 @llvm.mblaze.fsl.tecget(i32 %port) +declare i32 @llvm.mblaze.fsl.tecaget(i32 %port) +declare i32 @llvm.mblaze.fsl.tnget(i32 %port) +declare i32 @llvm.mblaze.fsl.tnaget(i32 %port) +declare i32 @llvm.mblaze.fsl.tncget(i32 %port) +declare i32 @llvm.mblaze.fsl.tncaget(i32 %port) +declare i32 @llvm.mblaze.fsl.tneget(i32 %port) +declare i32 @llvm.mblaze.fsl.tneaget(i32 %port) +declare i32 @llvm.mblaze.fsl.tnecget(i32 %port) +declare i32 @llvm.mblaze.fsl.tnecaget(i32 %port) + +declare void @llvm.mblaze.fsl.put(i32 %value, i32 %port) +declare void @llvm.mblaze.fsl.aput(i32 %value, i32 %port) +declare void @llvm.mblaze.fsl.cput(i32 %value, i32 %port) +declare void @llvm.mblaze.fsl.caput(i32 %value, i32 %port) +declare void @llvm.mblaze.fsl.nput(i32 %value, i32 %port) +declare void @llvm.mblaze.fsl.naput(i32 %value, i32 %port) +declare void @llvm.mblaze.fsl.ncput(i32 %value, i32 %port) +declare void @llvm.mblaze.fsl.ncaput(i32 %value, i32 %port) +declare void @llvm.mblaze.fsl.tput(i32 %port) +declare void @llvm.mblaze.fsl.taput(i32 %port) +declare void @llvm.mblaze.fsl.tcput(i32 %port) +declare void @llvm.mblaze.fsl.tcaput(i32 %port) +declare void @llvm.mblaze.fsl.tnput(i32 %port) +declare void @llvm.mblaze.fsl.tnaput(i32 %port) +declare void @llvm.mblaze.fsl.tncput(i32 %port) +declare void @llvm.mblaze.fsl.tncaput(i32 %port) + +define i32 @fsl_get(i32 %port) +{ + ; CHECK: fsl_get: + %v0 = call i32 @llvm.mblaze.fsl.get(i32 %port) + ; CHECK: getd + %v1 = call i32 @llvm.mblaze.fsl.aget(i32 %port) + ; CHECK-NEXT: agetd + %v2 = call i32 @llvm.mblaze.fsl.cget(i32 %port) + ; CHECK-NEXT: cgetd + %v3 = call i32 @llvm.mblaze.fsl.caget(i32 %port) + ; CHECK-NEXT: cagetd + %v4 = call i32 @llvm.mblaze.fsl.eget(i32 %port) + ; CHECK-NEXT: egetd + %v5 = call i32 @llvm.mblaze.fsl.eaget(i32 %port) + ; CHECK-NEXT: eagetd + %v6 = call i32 @llvm.mblaze.fsl.ecget(i32 %port) + ; CHECK-NEXT: ecgetd + %v7 = call i32 @llvm.mblaze.fsl.ecaget(i32 %port) + ; CHECK-NEXT: ecagetd + %v8 = call i32 @llvm.mblaze.fsl.nget(i32 %port) + ; CHECK-NEXT: ngetd + %v9 = call i32 @llvm.mblaze.fsl.naget(i32 %port) + ; CHECK-NEXT: nagetd + %v10 = call i32 @llvm.mblaze.fsl.ncget(i32 %port) + ; CHECK-NEXT: ncgetd + %v11 = call i32 @llvm.mblaze.fsl.ncaget(i32 %port) + ; CHECK-NEXT: ncagetd + %v12 = call i32 @llvm.mblaze.fsl.neget(i32 %port) + ; CHECK-NEXT: negetd + %v13 = call i32 @llvm.mblaze.fsl.neaget(i32 %port) + ; CHECK-NEXT: neagetd + %v14 = call i32 @llvm.mblaze.fsl.necget(i32 %port) + ; CHECK-NEXT: necgetd + %v15 = call i32 @llvm.mblaze.fsl.necaget(i32 %port) + ; CHECK-NEXT: necagetd + %v16 = call i32 @llvm.mblaze.fsl.tget(i32 %port) + ; CHECK-NEXT: tgetd + %v17 = call i32 @llvm.mblaze.fsl.taget(i32 %port) + ; CHECK-NEXT: tagetd + %v18 = call i32 @llvm.mblaze.fsl.tcget(i32 %port) + ; CHECK-NEXT: tcgetd + %v19 = call i32 @llvm.mblaze.fsl.tcaget(i32 %port) + ; CHECK-NEXT: tcagetd + %v20 = call i32 @llvm.mblaze.fsl.teget(i32 %port) + ; CHECK-NEXT: tegetd + %v21 = call i32 @llvm.mblaze.fsl.teaget(i32 %port) + ; CHECK-NEXT: teagetd + %v22 = call i32 @llvm.mblaze.fsl.tecget(i32 %port) + ; CHECK-NEXT: tecgetd + %v23 = call i32 @llvm.mblaze.fsl.tecaget(i32 %port) + ; CHECK-NEXT: tecagetd + %v24 = call i32 @llvm.mblaze.fsl.tnget(i32 %port) + ; CHECK-NEXT: tngetd + %v25 = call i32 @llvm.mblaze.fsl.tnaget(i32 %port) + ; CHECK-NEXT: tnagetd + %v26 = call i32 @llvm.mblaze.fsl.tncget(i32 %port) + ; CHECK-NEXT: tncgetd + %v27 = call i32 @llvm.mblaze.fsl.tncaget(i32 %port) + ; CHECK-NEXT: tncagetd + %v28 = call i32 @llvm.mblaze.fsl.tneget(i32 %port) + ; CHECK-NEXT: tnegetd + %v29 = call i32 @llvm.mblaze.fsl.tneaget(i32 %port) + ; CHECK-NEXT: tneagetd + %v30 = call i32 @llvm.mblaze.fsl.tnecget(i32 %port) + ; CHECK-NEXT: tnecgetd + %v31 = call i32 @llvm.mblaze.fsl.tnecaget(i32 %port) + ; CHECK-NEXT: tnecagetd + ret i32 1 + ; CHECK: rtsd +} + +define i32 @fslc_get() +{ + ; CHECK: fslc_get: + %v0 = call i32 @llvm.mblaze.fsl.get(i32 1) + ; CHECK: get + %v1 = call i32 @llvm.mblaze.fsl.aget(i32 1) + ; CHECK-NOT: agetd + ; CHECK: aget + %v2 = call i32 @llvm.mblaze.fsl.cget(i32 1) + ; CHECK-NOT: cgetd + ; CHECK: cget + %v3 = call i32 @llvm.mblaze.fsl.caget(i32 1) + ; CHECK-NOT: cagetd + ; CHECK: caget + %v4 = call i32 @llvm.mblaze.fsl.eget(i32 1) + ; CHECK-NOT: egetd + ; CHECK: eget + %v5 = call i32 @llvm.mblaze.fsl.eaget(i32 1) + ; CHECK-NOT: eagetd + ; CHECK: eaget + %v6 = call i32 @llvm.mblaze.fsl.ecget(i32 1) + ; CHECK-NOT: ecgetd + ; CHECK: ecget + %v7 = call i32 @llvm.mblaze.fsl.ecaget(i32 1) + ; CHECK-NOT: ecagetd + ; CHECK: ecaget + %v8 = call i32 @llvm.mblaze.fsl.nget(i32 1) + ; CHECK-NOT: ngetd + ; CHECK: nget + %v9 = call i32 @llvm.mblaze.fsl.naget(i32 1) + ; CHECK-NOT: nagetd + ; CHECK: naget + %v10 = call i32 @llvm.mblaze.fsl.ncget(i32 1) + ; CHECK-NOT: ncgetd + ; CHECK: ncget + %v11 = call i32 @llvm.mblaze.fsl.ncaget(i32 1) + ; CHECK-NOT: ncagetd + ; CHECK: ncaget + %v12 = call i32 @llvm.mblaze.fsl.neget(i32 1) + ; CHECK-NOT: negetd + ; CHECK: neget + %v13 = call i32 @llvm.mblaze.fsl.neaget(i32 1) + ; CHECK-NOT: neagetd + ; CHECK: neaget + %v14 = call i32 @llvm.mblaze.fsl.necget(i32 1) + ; CHECK-NOT: necgetd + ; CHECK: necget + %v15 = call i32 @llvm.mblaze.fsl.necaget(i32 1) + ; CHECK-NOT: necagetd + ; CHECK: necaget + %v16 = call i32 @llvm.mblaze.fsl.tget(i32 1) + ; CHECK-NOT: tgetd + ; CHECK: tget + %v17 = call i32 @llvm.mblaze.fsl.taget(i32 1) + ; CHECK-NOT: tagetd + ; CHECK: taget + %v18 = call i32 @llvm.mblaze.fsl.tcget(i32 1) + ; CHECK-NOT: tcgetd + ; CHECK: tcget + %v19 = call i32 @llvm.mblaze.fsl.tcaget(i32 1) + ; CHECK-NOT: tcagetd + ; CHECK: tcaget + %v20 = call i32 @llvm.mblaze.fsl.teget(i32 1) + ; CHECK-NOT: tegetd + ; CHECK: teget + %v21 = call i32 @llvm.mblaze.fsl.teaget(i32 1) + ; CHECK-NOT: teagetd + ; CHECK: teaget + %v22 = call i32 @llvm.mblaze.fsl.tecget(i32 1) + ; CHECK-NOT: tecgetd + ; CHECK: tecget + %v23 = call i32 @llvm.mblaze.fsl.tecaget(i32 1) + ; CHECK-NOT: tecagetd + ; CHECK: tecaget + %v24 = call i32 @llvm.mblaze.fsl.tnget(i32 1) + ; CHECK-NOT: tngetd + ; CHECK: tnget + %v25 = call i32 @llvm.mblaze.fsl.tnaget(i32 1) + ; CHECK-NOT: tnagetd + ; CHECK: tnaget + %v26 = call i32 @llvm.mblaze.fsl.tncget(i32 1) + ; CHECK-NOT: tncgetd + ; CHECK: tncget + %v27 = call i32 @llvm.mblaze.fsl.tncaget(i32 1) + ; CHECK-NOT: tncagetd + ; CHECK: tncaget + %v28 = call i32 @llvm.mblaze.fsl.tneget(i32 1) + ; CHECK-NOT: tnegetd + ; CHECK: tneget + %v29 = call i32 @llvm.mblaze.fsl.tneaget(i32 1) + ; CHECK-NOT: tneagetd + ; CHECK: tneaget + %v30 = call i32 @llvm.mblaze.fsl.tnecget(i32 1) + ; CHECK-NOT: tnecgetd + ; CHECK: tnecget + %v31 = call i32 @llvm.mblaze.fsl.tnecaget(i32 1) + ; CHECK-NOT: tnecagetd + ; CHECK: tnecaget + ret i32 1 + ; CHECK: rtsd +} + +define void @putfsl(i32 %value, i32 %port) +{ + ; CHECK: putfsl: + call void @llvm.mblaze.fsl.put(i32 %value, i32 %port) + ; CHECK: putd + call void @llvm.mblaze.fsl.aput(i32 %value, i32 %port) + ; CHECK-NEXT: aputd + call void @llvm.mblaze.fsl.cput(i32 %value, i32 %port) + ; CHECK-NEXT: cputd + call void @llvm.mblaze.fsl.caput(i32 %value, i32 %port) + ; CHECK-NEXT: caputd + call void @llvm.mblaze.fsl.nput(i32 %value, i32 %port) + ; CHECK-NEXT: nputd + call void @llvm.mblaze.fsl.naput(i32 %value, i32 %port) + ; CHECK-NEXT: naputd + call void @llvm.mblaze.fsl.ncput(i32 %value, i32 %port) + ; CHECK-NEXT: ncputd + call void @llvm.mblaze.fsl.ncaput(i32 %value, i32 %port) + ; CHECK-NEXT: ncaputd + call void @llvm.mblaze.fsl.tput(i32 %port) + ; CHECK-NEXT: tputd + call void @llvm.mblaze.fsl.taput(i32 %port) + ; CHECK-NEXT: taputd + call void @llvm.mblaze.fsl.tcput(i32 %port) + ; CHECK-NEXT: tcputd + call void @llvm.mblaze.fsl.tcaput(i32 %port) + ; CHECK-NEXT: tcaputd + call void @llvm.mblaze.fsl.tnput(i32 %port) + ; CHECK-NEXT: tnputd + call void @llvm.mblaze.fsl.tnaput(i32 %port) + ; CHECK-NEXT: tnaputd + call void @llvm.mblaze.fsl.tncput(i32 %port) + ; CHECK-NEXT: tncputd + call void @llvm.mblaze.fsl.tncaput(i32 %port) + ; CHECK-NEXT: tncaputd + ret void + ; CHECK: rtsd +} + +define void @putfsl_const(i32 %value) +{ + ; CHECK: putfsl_const: + call void @llvm.mblaze.fsl.put(i32 %value, i32 1) + ; CHECK-NOT: putd + ; CHECK: put + call void @llvm.mblaze.fsl.aput(i32 %value, i32 1) + ; CHECK-NOT: aputd + ; CHECK: aput + call void @llvm.mblaze.fsl.cput(i32 %value, i32 1) + ; CHECK-NOT: cputd + ; CHECK: cput + call void @llvm.mblaze.fsl.caput(i32 %value, i32 1) + ; CHECK-NOT: caputd + ; CHECK: caput + call void @llvm.mblaze.fsl.nput(i32 %value, i32 1) + ; CHECK-NOT: nputd + ; CHECK: nput + call void @llvm.mblaze.fsl.naput(i32 %value, i32 1) + ; CHECK-NOT: naputd + ; CHECK: naput + call void @llvm.mblaze.fsl.ncput(i32 %value, i32 1) + ; CHECK-NOT: ncputd + ; CHECK: ncput + call void @llvm.mblaze.fsl.ncaput(i32 %value, i32 1) + ; CHECK-NOT: ncaputd + ; CHECK: ncaput + call void @llvm.mblaze.fsl.tput(i32 1) + ; CHECK-NOT: tputd + ; CHECK: tput + call void @llvm.mblaze.fsl.taput(i32 1) + ; CHECK-NOT: taputd + ; CHECK: taput + call void @llvm.mblaze.fsl.tcput(i32 1) + ; CHECK-NOT: tcputd + ; CHECK: tcput + call void @llvm.mblaze.fsl.tcaput(i32 1) + ; CHECK-NOT: tcaputd + ; CHECK: tcaput + call void @llvm.mblaze.fsl.tnput(i32 1) + ; CHECK-NOT: tnputd + ; CHECK: tnput + call void @llvm.mblaze.fsl.tnaput(i32 1) + ; CHECK-NOT: tnaputd + ; CHECK: tnaput + call void @llvm.mblaze.fsl.tncput(i32 1) + ; CHECK-NOT: tncputd + ; CHECK: tncput + call void @llvm.mblaze.fsl.tncaput(i32 1) + ; CHECK-NOT: tncaputd + ; CHECK: tncaput + ret void + ; CHECK: rtsd +} Added: llvm/trunk/test/CodeGen/MBlaze/imm.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MBlaze/imm.ll?rev=96969&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/MBlaze/imm.ll (added) +++ llvm/trunk/test/CodeGen/MBlaze/imm.ll Tue Feb 23 13:15:24 2010 @@ -0,0 +1,70 @@ +; Ensure that all immediate values that are 32-bits or less can be loaded +; using a single instruction and that immediate values 64-bits or less can +; be loaded using two instructions. +; +; RUN: llc < %s -march=mblaze | FileCheck %s +; RUN: llc < %s -march=mblaze -mattr=+fpu | FileCheck -check-prefix=FPU %s + +define i8 @retimm_i8() { + ; CHECK: retimm_i8: + ; CHECK: add + ; CHECK-NEXT: rtsd + ; FPU: retimm_i8: + ; FPU: add + ; FPU-NEXT: rtsd + ret i8 123 +} + +define i16 @retimm_i16() { + ; CHECK: retimm_i16: + ; CHECK: add + ; CHECK-NEXT: rtsd + ; FPU: retimm_i16: + ; FPU: add + ; FPU-NEXT: rtsd + ret i16 38212 +} + +define i32 @retimm_i32() { + ; CHECK: retimm_i32: + ; CHECK: add + ; CHECK-NEXT: rtsd + ; FPU: retimm_i32: + ; FPU: add + ; FPU-NEXT: rtsd + ret i32 2938128 +} + +define i64 @retimm_i64() { + ; CHECK: retimm_i64: + ; CHECK: add + ; CHECK-NEXT: add + ; CHECK-NEXT: rtsd + ; FPU: retimm_i64: + ; FPU: add + ; FPU-NEXT: add + ; FPU-NEXT: rtsd + ret i64 94581823 +} + +define float @retimm_float() { + ; CHECK: retimm_float: + ; CHECK: add + ; CHECK-NEXT: rtsd + ; FPU: retimm_float: + ; FPU: or + ; FPU: rtsd + ret float 12.0 +} + +define double @retimm_double() { + ; CHECK: retimm_double: + ; CHECK: add + ; CHECK-NEXT: add + ; CHECK-NEXT: rtsd + ; FPU: retimm_double: + ; FPU: add + ; FPU-NEXT: add + ; FPU-NEXT: rtsd + ret double 598382.39283873 +} Added: llvm/trunk/test/CodeGen/MBlaze/jumptable.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MBlaze/jumptable.ll?rev=96969&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/MBlaze/jumptable.ll (added) +++ llvm/trunk/test/CodeGen/MBlaze/jumptable.ll Tue Feb 23 13:15:24 2010 @@ -0,0 +1,79 @@ +; Ensure that jump tables can be handled by the mblaze backend. The +; jump table should be lowered to a "br" instruction using one of the +; available registers. +; +; RUN: llc < %s -march=mblaze | FileCheck %s + +define i32 @jmptable(i32 %arg) +{ + ; CHECK: jmptable: + switch i32 %arg, label %DEFAULT [ i32 0, label %L0 + i32 1, label %L1 + i32 2, label %L2 + i32 3, label %L3 + i32 4, label %L4 + i32 5, label %L5 + i32 6, label %L6 + i32 7, label %L7 + i32 8, label %L8 + i32 9, label %L9 ] + + ; CHECK: lw [[REG:r[0-9]*]] + ; CHECK: br [[REG]] +L0: + %var0 = add i32 %arg, 0 + br label %DONE + +L1: + %var1 = add i32 %arg, 1 + br label %DONE + +L2: + %var2 = add i32 %arg, 2 + br label %DONE + +L3: + %var3 = add i32 %arg, 3 + br label %DONE + +L4: + %var4 = add i32 %arg, 4 + br label %DONE + +L5: + %var5 = add i32 %arg, 5 + br label %DONE + +L6: + %var6 = add i32 %arg, 6 + br label %DONE + +L7: + %var7 = add i32 %arg, 7 + br label %DONE + +L8: + %var8 = add i32 %arg, 8 + br label %DONE + +L9: + %var9 = add i32 %arg, 9 + br label %DONE + +DEFAULT: + unreachable + +DONE: + %rval = phi i32 [ %var0, %L0 ], + [ %var1, %L1 ], + [ %var2, %L2 ], + [ %var3, %L3 ], + [ %var4, %L4 ], + [ %var5, %L5 ], + [ %var6, %L6 ], + [ %var7, %L7 ], + [ %var8, %L8 ], + [ %var9, %L9 ] + ret i32 %rval + ; CHECK: rtsd +} Added: llvm/trunk/test/CodeGen/MBlaze/loop.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MBlaze/loop.ll?rev=96969&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/MBlaze/loop.ll (added) +++ llvm/trunk/test/CodeGen/MBlaze/loop.ll Tue Feb 23 13:15:24 2010 @@ -0,0 +1,47 @@ +; Test some complicated looping constructs to ensure that they +; compile successfully and that some sort of branching is used +; in the resulting code. +; +; RUN: llc < %s -march=mblaze -mattr=+mul,+fpu,+barrel | FileCheck %s + +declare i32 @printf(i8*, ...) + at MSG = internal constant [19 x i8] c"Message: %d %d %d\0A\00" + +define i32 @loop(i32 %a, i32 %b) +{ + ; CHECK: loop: +entry: + br label %loop_outer + +loop_outer: + %outer.0 = phi i32 [ 0, %entry ], [ %outer.2, %loop_outer_finish ] + br label %loop_inner + +loop_inner: + %inner.0 = phi i32 [ %a, %loop_outer ], [ %inner.3, %loop_inner_finish ] + %inner.1 = phi i32 [ %b, %loop_outer ], [ %inner.4, %loop_inner_finish ] + %inner.2 = phi i32 [ 0, %loop_outer ], [ %inner.5, %loop_inner_finish ] + %inner.3 = add i32 %inner.0, %inner.1 + %inner.4 = mul i32 %inner.2, 11 + br label %loop_inner_finish + +loop_inner_finish: + %inner.5 = add i32 %inner.2, 1 + ; CHECK: addi {{.*, 1}} + + call i32 (i8*,...)* @printf( i8* getelementptr([19 x i8]* @MSG,i32 0,i32 0), + i32 %inner.0, i32 %inner.1, i32 %inner.2 ) + ; CHECK: brlid + + %inner.6 = icmp eq i32 %inner.5, 100 + ; CHECK: cmp + + br i1 %inner.6, label %loop_inner, label %loop_outer_finish + ; CHECK: {{beq|bne}} + +loop_outer_finish: + %outer.1 = add i32 %outer.0, 1 + %outer.2 = urem i32 %outer.1, 1500 + br label %loop_outer + ; CHECK: br +} Added: llvm/trunk/test/CodeGen/MBlaze/mul.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MBlaze/mul.ll?rev=96969&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/MBlaze/mul.ll (added) +++ llvm/trunk/test/CodeGen/MBlaze/mul.ll Tue Feb 23 13:15:24 2010 @@ -0,0 +1,51 @@ +; Ensure that multiplication is lowered to function calls when the multiplier +; unit is not available in the hardware and that function calls are not used +; when the multiplier unit is available in the hardware. +; +; RUN: llc < %s -march=mblaze | FileCheck -check-prefix=FUN %s +; RUN: llc < %s -march=mblaze -mattr=+mul | FileCheck -check-prefix=MUL %s + +define i8 @test_i8(i8 %a, i8 %b) { + ; FUN: test_i8: + ; MUL: test_i8: + + %tmp.1 = mul i8 %a, %b + ; FUN-NOT: mul + ; FUN: brlid + ; MUL-NOT: brlid + ; MUL: mul + + ret i8 %tmp.1 + ; FUN: rtsd + ; MUL: rtsd +} + +define i16 @test_i16(i16 %a, i16 %b) { + ; FUN: test_i16: + ; MUL: test_i16: + + %tmp.1 = mul i16 %a, %b + ; FUN-NOT: mul + ; FUN: brlid + ; MUL-NOT: brlid + ; MUL: mul + + ret i16 %tmp.1 + ; FUN: rtsd + ; MUL: rtsd +} + +define i32 @test_i32(i32 %a, i32 %b) { + ; FUN: test_i32: + ; MUL: test_i32: + + %tmp.1 = mul i32 %a, %b + ; FUN-NOT: mul + ; FUN: brlid + ; MUL-NOT: brlid + ; MUL: mul + + ret i32 %tmp.1 + ; FUN: rtsd + ; MUL: rtsd +} Added: llvm/trunk/test/CodeGen/MBlaze/mul64.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MBlaze/mul64.ll?rev=96969&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/MBlaze/mul64.ll (added) +++ llvm/trunk/test/CodeGen/MBlaze/mul64.ll Tue Feb 23 13:15:24 2010 @@ -0,0 +1,23 @@ +; Ensure that multiplication is lowered to function calls when the 64-bit +; multiplier unit is not available in the hardware and that function calls +; are not used when the 64-bit multiplier unit is available in the hardware. +; +; RUN: llc < %s -march=mblaze | FileCheck -check-prefix=FUN %s +; RUN: llc < %s -march=mblaze -mattr=+mul,+mul64 | \ +; RUN: FileCheck -check-prefix=MUL %s + +define i64 @test_i64(i64 %a, i64 %b) { + ; FUN: test_i64: + ; MUL: test_i64: + + %tmp.1 = mul i64 %a, %b + ; FUN-NOT: mul + ; FUN: brlid + ; MUL-NOT: brlid + ; MUL: mulh + ; MUL: mul + + ret i64 %tmp.1 + ; FUN: rtsd + ; MUL: rtsd +} Added: llvm/trunk/test/CodeGen/MBlaze/select.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MBlaze/select.ll?rev=96969&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/MBlaze/select.ll (added) +++ llvm/trunk/test/CodeGen/MBlaze/select.ll Tue Feb 23 13:15:24 2010 @@ -0,0 +1,15 @@ +; Ensure that the select instruction is supported and is lowered to +; some sort of branch instruction. +; +; RUN: llc < %s -march=mblaze | FileCheck %s + +define i32 @testsel(i32 %a, i32 %b) +{ + ; CHECK: testsel: + %tmp.1 = icmp eq i32 %a, %b + ; CHECK: cmp + %tmp.2 = select i1 %tmp.1, i32 %a, i32 %b + ; CHECK: {{bne|beq}} + ret i32 %tmp.2 + ; CHECK: rtsd +} Added: llvm/trunk/test/CodeGen/MBlaze/shift.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MBlaze/shift.ll?rev=96969&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/MBlaze/shift.ll (added) +++ llvm/trunk/test/CodeGen/MBlaze/shift.ll Tue Feb 23 13:15:24 2010 @@ -0,0 +1,117 @@ +; Ensure that shifts are lowered to loops when the barrel shifter unit is +; not available in the hardware and that loops are not used when the +; barrel shifter unit is available in the hardware. +; +; RUN: llc < %s -march=mblaze | FileCheck -check-prefix=FUN %s +; RUN: llc < %s -march=mblaze -mattr=+barrel | FileCheck -check-prefix=SHT %s + +define i8 @test_i8(i8 %a, i8 %b) { + ; FUN: test_i8: + ; SHT: test_i8: + + %tmp.1 = shl i8 %a, %b + ; FUN-NOT: bsll + ; FUN: andi + ; FUN: add + ; FUN: bnei + ; SHT-NOT: andi + ; SHT-NOT: bnei + ; SHT: bsll + + ret i8 %tmp.1 + ; FUN: rtsd + ; SHT: rtsd +} + +define i8 @testc_i8(i8 %a, i8 %b) { + ; FUN: testc_i8: + ; SHT: testc_i8: + + %tmp.1 = shl i8 %a, 5 + ; FUN-NOT: bsll + ; FUN: andi + ; FUN: add + ; FUN: bnei + ; SHT-NOT: andi + ; SHT-NOT: add + ; SHT-NOT: bnei + ; SHT: bslli + + ret i8 %tmp.1 + ; FUN: rtsd + ; SHT: rtsd +} + +define i16 @test_i16(i16 %a, i16 %b) { + ; FUN: test_i16: + ; SHT: test_i16: + + %tmp.1 = shl i16 %a, %b + ; FUN-NOT: bsll + ; FUN: andi + ; FUN: add + ; FUN: bnei + ; SHT-NOT: andi + ; SHT-NOT: bnei + ; SHT: bsll + + ret i16 %tmp.1 + ; FUN: rtsd + ; SHT: rtsd +} + +define i16 @testc_i16(i16 %a, i16 %b) { + ; FUN: testc_i16: + ; SHT: testc_i16: + + %tmp.1 = shl i16 %a, 5 + ; FUN-NOT: bsll + ; FUN: andi + ; FUN: add + ; FUN: bnei + ; SHT-NOT: andi + ; SHT-NOT: add + ; SHT-NOT: bnei + ; SHT: bslli + + ret i16 %tmp.1 + ; FUN: rtsd + ; SHT: rtsd +} + +define i32 @test_i32(i32 %a, i32 %b) { + ; FUN: test_i32: + ; SHT: test_i32: + + %tmp.1 = shl i32 %a, %b + ; FUN-NOT: bsll + ; FUN: andi + ; FUN: add + ; FUN: bnei + ; SHT-NOT: andi + ; SHT-NOT: bnei + ; SHT: bsll + + ret i32 %tmp.1 + ; FUN: rtsd + ; SHT: rtsd +} + +define i32 @testc_i32(i32 %a, i32 %b) { + ; FUN: testc_i32: + ; SHT: testc_i32: + + %tmp.1 = shl i32 %a, 5 + ; FUN-NOT: bsll + ; FUN: andi + ; FUN: add + ; FUN: bnei + ; SHT-NOT: andi + ; SHT-NOT: add + ; SHT-NOT: bnei + ; SHT: bslli + + ret i32 %tmp.1 + ; FUN: rtsd + ; SHT: rtsd +} From sabre at nondot.org Tue Feb 23 13:31:18 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 23 Feb 2010 19:31:18 -0000 Subject: [llvm-commits] [llvm] r96971 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <20100223193118.ADB3A2A6C12C@llvm.org> Author: lattner Date: Tue Feb 23 13:31:18 2010 New Revision: 96971 URL: http://llvm.org/viewvc/llvm-project?rev=96971&view=rev Log: Print node ID's in dumps and views if set. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=96971&r1=96970&r2=96971&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Tue Feb 23 13:31:18 2010 @@ -5926,6 +5926,9 @@ if (G) if (unsigned Order = G->GetOrdering(this)) OS << " [ORD=" << Order << ']'; + + if (getNodeId() != -1) + OS << " [ID=" << getNodeId() << ']'; } void SDNode::print(raw_ostream &OS, const SelectionDAG *G) const { From sabre at nondot.org Tue Feb 23 13:32:27 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 23 Feb 2010 19:32:27 -0000 Subject: [llvm-commits] [llvm] r96972 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <20100223193227.464442A6C12C@llvm.org> Author: lattner Date: Tue Feb 23 13:32:27 2010 New Revision: 96972 URL: http://llvm.org/viewvc/llvm-project?rev=96972&view=rev Log: fix a bug in findNonImmUse (used by IsLegalToFold) where nodes with no id's would cause early exit allowing IsLegalToFold to return true instead of false, producing a cyclic dag. This was striking the new isel because it isn't using SelectNodeTo yet, which theoretically is just an optimization. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=96972&r1=96971&r2=96972&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Tue Feb 23 13:32:27 2010 @@ -1318,8 +1318,20 @@ static bool findNonImmUse(SDNode *Use, SDNode* Def, SDNode *ImmedUse, SDNode *Root, SmallPtrSet &Visited) { - if (Use->getNodeId() < Def->getNodeId() || - !Visited.insert(Use)) + // The NodeID's are given uniques ID's where a node ID is guaranteed to be + // greater than all of its (recursive) operands. If we scan to a point where + // 'use' is smaller than the node we're scanning for, then we know we will + // never find it. + // + // The Use may be -1 (unassigned) if it is a newly allocated node. This can + // happen because we scan down to newly selected nodes in the case of flag + // uses. + if ((Use->getNodeId() < Def->getNodeId() && Use->getNodeId() != -1)) + return false; + + // Don't revisit nodes if we already scanned it and didn't fail, we know we + // won't fail if we scan it again. + if (!Visited.insert(Use)) return false; for (unsigned i = 0, e = Use->getNumOperands(); i != e; ++i) { From sabre at nondot.org Tue Feb 23 13:33:11 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 23 Feb 2010 19:33:11 -0000 Subject: [llvm-commits] [llvm] r96973 - /llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Message-ID: <20100223193311.611682A6C12C@llvm.org> Author: lattner Date: Tue Feb 23 13:33:11 2010 New Revision: 96973 URL: http://llvm.org/viewvc/llvm-project?rev=96973&view=rev Log: no need to override IsLegalToFold, the base implementation disables load folding at -O0. Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=96973&r1=96972&r2=96973&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Tue Feb 23 13:33:11 2010 @@ -185,8 +185,6 @@ virtual bool IsProfitableToFold(SDValue N, SDNode *U, SDNode *Root) const; - virtual bool IsLegalToFold(SDValue N, SDNode *U, SDNode *Root) const; - // Include the pieces autogenerated from the target description. #include "X86GenDAGISel.inc" @@ -382,14 +380,6 @@ return true; } - -bool X86DAGToDAGISel::IsLegalToFold(SDValue N, SDNode *U, SDNode *Root) const { - if (OptLevel == CodeGenOpt::None) return false; - - // Proceed to 'generic' cycle finder code - return SelectionDAGISel::IsLegalToFold(N, U, Root); -} - /// MoveBelowTokenFactor - Replace TokenFactor operand with load's chain operand /// and move load below the TokenFactor. Replace store's chain operand with /// load's chain result. From dpatel at apple.com Tue Feb 23 13:36:49 2010 From: dpatel at apple.com (Devang Patel) Date: Tue, 23 Feb 2010 19:36:49 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r96974 - in /llvm-gcc-4.2/trunk/gcc: objc/objc-act.c toplev.c Message-ID: <20100223193649.77C9B2A6C12C@llvm.org> Author: dpatel Date: Tue Feb 23 13:36:49 2010 New Revision: 96974 URL: http://llvm.org/viewvc/llvm-project?rev=96974&view=rev Log: Do not rely on write_symbols to disable debug info for super class added as an invisible member of derived class. write_symbols controls debug_hooks which are used to emit debug info in various formats in gcc. llvm-gcc does not use this debug_hooks interface to emit debugging information. Test case is at llvm/test/FrontendObjC/2010-02-23-DbgInheritance.m Modified: llvm-gcc-4.2/trunk/gcc/objc/objc-act.c llvm-gcc-4.2/trunk/gcc/toplev.c Modified: llvm-gcc-4.2/trunk/gcc/objc/objc-act.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/objc/objc-act.c?rev=96974&r1=96973&r2=96974&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/objc/objc-act.c (original) +++ llvm-gcc-4.2/trunk/gcc/objc/objc-act.c Tue Feb 23 13:36:49 2010 @@ -3407,8 +3407,10 @@ DECL_ALIGN (base) = 1; DECL_FIELD_CONTEXT (base) = s; /* APPLE LOCAL begin radar 4477797 */ - if (write_symbols == DWARF2_DEBUG) - DECL_IGNORED_P (base) = 1; + /* LLVM LOCAL begin */ + /* Do not check write-symbols in llvm-gcc. */ + DECL_IGNORED_P (base) = 1; + /* LLVM LOCAL end */ /* APPLE LOCAL end radar 4477797 */ #ifdef OBJCPLUS DECL_FIELD_IS_BASE (base) = 1; Modified: llvm-gcc-4.2/trunk/gcc/toplev.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/toplev.c?rev=96974&r1=96973&r2=96974&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/toplev.c (original) +++ llvm-gcc-4.2/trunk/gcc/toplev.c Tue Feb 23 13:36:49 2010 @@ -1926,6 +1926,8 @@ /* LLVM LOCAL begin */ #ifdef ENABLE_LLVM + // write_symbols set up debug_hooks. llvm-gcc does not use this hooks + // to emit debug info. write_symbols = NO_DEBUG; #endif /* LLVM LOCAL end */ From dpatel at apple.com Tue Feb 23 13:37:40 2010 From: dpatel at apple.com (Devang Patel) Date: Tue, 23 Feb 2010 19:37:40 -0000 Subject: [llvm-commits] [llvm] r96975 - /llvm/trunk/test/FrontendObjC/2010-02-23-DbgInheritance.m Message-ID: <20100223193740.91E952A6C12C@llvm.org> Author: dpatel Date: Tue Feb 23 13:37:40 2010 New Revision: 96975 URL: http://llvm.org/viewvc/llvm-project?rev=96975&view=rev Log: new test case for r96974. Added: llvm/trunk/test/FrontendObjC/2010-02-23-DbgInheritance.m Added: llvm/trunk/test/FrontendObjC/2010-02-23-DbgInheritance.m URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendObjC/2010-02-23-DbgInheritance.m?rev=96975&view=auto ============================================================================== --- llvm/trunk/test/FrontendObjC/2010-02-23-DbgInheritance.m (added) +++ llvm/trunk/test/FrontendObjC/2010-02-23-DbgInheritance.m Tue Feb 23 13:37:40 2010 @@ -0,0 +1,9 @@ +// RUN: %llvmgcc %s -S -g -o - | grep -v DW_TAG_member +// Interface P should not be a member of interface I in debug info. + at interface P + at end + + at interface I : P + at end + +void fn(I *iptr) {} From richard at xmos.com Tue Feb 23 14:45:08 2010 From: richard at xmos.com (Richard Osborne) Date: Tue, 23 Feb 2010 20:45:08 +0000 Subject: [llvm-commits] [llvm] r96959 - in /llvm/trunk: Makefile Makefile.config.in Makefile.rules autoconf/configure.ac configure examples/BrainF/Makefile examples/Fibonacci/Makefile examples/HowToUseJIT/Makefile test/Makefile test/Unit/lit.cfg test/Unit/lit.s... In-Reply-To: <20100223181007.E34312A6C12C@llvm.org> References: <20100223181007.E34312A6C12C@llvm.org> Message-ID: <3F80762B-9989-4F00-ACDC-3993D1F569CF@xmos.com> On 23 Feb 2010, at 18:10, Jeffrey Yasskin wrote: > Author: jyasskin > Date: Tue Feb 23 12:10:07 2010 > New Revision: 96959 > > URL: http://llvm.org/viewvc/llvm-project?rev=96959&view=rev > Log: > Roll r96559 forward again, adding libLLVM-2.7svn.so to LLVM. This links 3 of > the examples shared to make sure the shared library keeps working. This breaks the build for me on Ubuntu 9.10. Error is as follows: llvm[1]: Linking Debug Shared Library LLVM-2.7svn.so /usr/bin/ld: --warn-shared-textrel: unknown option /usr/bin/ld: use the --help option for usage information collect2: ld returned 1 exit status make[1]: *** [/homelocal/richard/llvm-obj/Debug/lib/libLLVM-2.7svn.so] Error 1 make[1]: Leaving directory `/homelocal/richard/llvm-obj/tools/llvm-shlib' make: *** [all] Error 1 From jyasskin at google.com Tue Feb 23 14:49:50 2010 From: jyasskin at google.com (Jeffrey Yasskin) Date: Tue, 23 Feb 2010 15:49:50 -0500 Subject: [llvm-commits] [llvm] r96959 - in /llvm/trunk: Makefile Makefile.config.in Makefile.rules autoconf/configure.ac configure examples/BrainF/Makefile examples/Fibonacci/Makefile examples/HowToUseJIT/Makefile test/Makefile test/Unit/lit.cfg test/Unit Message-ID: You're using gold. I'm reverting the whole change anyway, but I'll be sure to avoid that option for the next attempt. On Tue, Feb 23, 2010 at 3:45 PM, Richard Osborne wrote: > On 23 Feb 2010, at 18:10, Jeffrey Yasskin wrote: > >> Author: jyasskin >> Date: Tue Feb 23 12:10:07 2010 >> New Revision: 96959 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=96959&view=rev >> Log: >> Roll r96559 forward again, adding libLLVM-2.7svn.so to LLVM. ?This links 3 of >> the examples shared to make sure the shared library keeps working. > > This breaks the build for me on Ubuntu 9.10. Error is as follows: > > llvm[1]: Linking Debug Shared Library LLVM-2.7svn.so > /usr/bin/ld: --warn-shared-textrel: unknown option > /usr/bin/ld: use the --help option for usage information > collect2: ld returned 1 exit status > make[1]: *** [/homelocal/richard/llvm-obj/Debug/lib/libLLVM-2.7svn.so] Error 1 > make[1]: Leaving directory `/homelocal/richard/llvm-obj/tools/llvm-shlib' > make: *** [all] Error 1 > > From alenhar2 at llvm.org Tue Feb 23 14:50:55 2010 From: alenhar2 at llvm.org (alenhar2 at llvm.org) Date: Tue, 23 Feb 2010 20:50:55 -0000 Subject: [llvm-commits] [poolalloc] r96979 - in /poolalloc/trunk: include/dsa/DSNode.h lib/DSA/Basic.cpp lib/DSA/DataStructure.cpp lib/DSA/Makefile lib/DSA/Printer.cpp lib/PoolAllocate/Makefile Message-ID: <20100223205055.CD9942A6C12C@llvm.org> Author: alenhar2 Date: Tue Feb 23 14:50:55 2010 New Revision: 96979 URL: http://llvm.org/viewvc/llvm-project?rev=96979&view=rev Log: get rid of getGlobalContext and simplify ilist by using generic impl Modified: poolalloc/trunk/include/dsa/DSNode.h poolalloc/trunk/lib/DSA/Basic.cpp poolalloc/trunk/lib/DSA/DataStructure.cpp poolalloc/trunk/lib/DSA/Makefile poolalloc/trunk/lib/DSA/Printer.cpp poolalloc/trunk/lib/PoolAllocate/Makefile Modified: poolalloc/trunk/include/dsa/DSNode.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/DSNode.h?rev=96979&r1=96978&r2=96979&view=diff ============================================================================== --- poolalloc/trunk/include/dsa/DSNode.h (original) +++ poolalloc/trunk/include/dsa/DSNode.h Tue Feb 23 14:50:55 2010 @@ -15,6 +15,7 @@ #define LLVM_ANALYSIS_DSNODE_H #include "dsa/DSSupport.h" +#include "llvm/ADT/ilist_node.h" #include "llvm/Support/Streams.h" #include "poolalloc/ADT/HashExtras.h" @@ -31,7 +32,11 @@ /// track of any pointers that have been stored into the object as well as the /// different types represented in this object. /// -class DSNode { +class DSNode : public ilist_node { + friend struct ilist_sentinel_traits; + //Sentinel + DSNode() : NumReferrers(0), Size(0), Ty(0) {} + /// NumReferrers - The number of DSNodeHandles pointing to this node... if /// this is a forwarding node, then this is the number of node handles which /// are still forwarding over us. @@ -48,8 +53,8 @@ /// Next, Prev - These instance variables are used to keep the node on a /// doubly-linked ilist in the DSGraph. /// - DSNode *Next, *Prev; - friend struct ilist_traits; + //DSNode *Next, *Prev; + //friend struct ilist_traits; /// Size - The current size of the node. This should be equal to the size of /// the current type record. @@ -400,54 +405,6 @@ }; //===----------------------------------------------------------------------===// -// Define the ilist_traits specialization for the DSGraph ilist. -// -template<> -struct ilist_traits { - static DSNode *getPrev(const DSNode *N) { return N->Prev; } - static DSNode *getNext(const DSNode *N) { return N->Next; } - - static void deleteNode(llvm::DSNode *V) { delete V; } - static void setPrev(DSNode *N, DSNode *Prev) { N->Prev = Prev; } - static void setNext(DSNode *N, DSNode *Next) { N->Next = Next; } - - static DSNode *createSentinel() { return new DSNode(0,0); } - static void destroySentinel(DSNode *N) { delete N; } - - void addNodeToList(DSNode *NTy) {} - void removeNodeFromList(DSNode *NTy) {} - void transferNodesFromList(iplist &L2, - ilist_iterator first, - ilist_iterator last) {} - DSNode *provideInitialHead() const { - DSNode * sentinel = createSentinel(); - setPrev (sentinel, sentinel); - return sentinel; - } - - /// ensureHead - make sure that Head is either already - /// initialized or assigned a fresh sentinel - /// @return the sentinel - static DSNode *ensureHead(DSNode *&Head) { - if (!Head) { - Head = createSentinel(); - noteHead (Head, Head); - setNext(Head, Head); - return Head; - } - return getPrev(Head); - } - - /// noteHead - stash the sentinel into its default location - static void noteHead(DSNode *NewHead, DSNode *Sentinel) { - setPrev(NewHead, Sentinel); - } -}; - -template<> -struct ilist_traits : public ilist_traits {}; - -//===----------------------------------------------------------------------===// // Define inline DSNodeHandle functions that depend on the definition of DSNode // inline DSNode *DSNodeHandle::getNode() const { Modified: poolalloc/trunk/lib/DSA/Basic.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/Basic.cpp?rev=96979&r1=96978&r2=96979&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/Basic.cpp (original) +++ poolalloc/trunk/lib/DSA/Basic.cpp Tue Feb 23 14:50:55 2010 @@ -38,7 +38,7 @@ // // Create a void pointer type. This is simply a pointer to an 8 bit value. // - const IntegerType * IT = IntegerType::getInt8Ty(getGlobalContext()); + const IntegerType * IT = IntegerType::getInt8Ty(M.getContext()); const PointerType * VoidPtrTy = PointerType::getUnqual(IT); DSNode * GVNodeInternal = new DSNode(VoidPtrTy, GlobalsGraph); Modified: poolalloc/trunk/lib/DSA/DataStructure.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DataStructure.cpp?rev=96979&r1=96978&r2=96979&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/DataStructure.cpp (original) +++ poolalloc/trunk/lib/DSA/DataStructure.cpp Tue Feb 23 14:50:55 2010 @@ -122,7 +122,7 @@ //===----------------------------------------------------------------------===// DSNode::DSNode(const Type *T, DSGraph *G) - : NumReferrers(0), Size(0), ParentGraph(G), Ty(Type::getVoidTy(getGlobalContext())), NodeType(0) { +: NumReferrers(0), Size(0), ParentGraph(G), Ty(0) { // Add the type entry if it is specified... if (T) mergeTypeInfo(T, 0); if (G) G->addNode(this); @@ -164,10 +164,9 @@ } void DSNode::assertOK() const { - const Type * VoidType = Type::getVoidTy(getGlobalContext()); - assert((Ty != VoidType || - (Ty == VoidType && (Size == 0 || - (NodeType & DSNode::ArrayNode)))) && + assert(((Ty && Ty->getTypeID() != Type::VoidTyID) || + ((!Ty || Ty->getTypeID() == Type::VoidTyID) && (Size == 0 || + (NodeType & DSNode::ArrayNode)))) && "Node not OK!"); assert(ParentGraph && "Node has no parent?"); @@ -190,7 +189,7 @@ ForwardNH.setTo(To, Offset); NodeType = DeadNode; Size = 0; - Ty = Type::getVoidTy(getGlobalContext()); + Ty = 0; // Remove this node from the parent graph's Nodes list. ParentGraph->unlinkNode(this); @@ -238,7 +237,7 @@ // node. if (getSize() <= 1) { NodeType |= DSNode::ArrayNode; - Ty = Type::getVoidTy(getGlobalContext()); + Ty = 0; Size = 1; assert(Links.size() <= 1 && "Size is 1, but has more links?"); Links.resize(1); @@ -248,7 +247,7 @@ // forward, the forwarder has the opportunity to correct the offset. DSNode *DestNode = new DSNode(0, ParentGraph); DestNode->NodeType = NodeType|DSNode::ArrayNode; - DestNode->Ty = Type::getVoidTy(getGlobalContext()); + DestNode->Ty = 0; DestNode->Size = 1; DestNode->Globals.swap(Globals); @@ -290,8 +289,8 @@ /// all of the field sensitivity that may be present in the node. /// bool DSNode::isNodeCompletelyFolded() const { - const Type * VoidType = Type::getVoidTy(getGlobalContext()); - return getSize() == 1 && Ty == VoidType && isArray(); + return getSize() == 1 && (!Ty || Ty->getTypeID() == Type::VoidTyID) + && isArray(); } /// addFullGlobalsList - Compute the full set of global values that are @@ -490,7 +489,7 @@ // // Create an array type that fits the padding size. // - const Type * Int8Type = IntegerType::getInt8Ty(getGlobalContext()); + const Type * Int8Type = IntegerType::getInt8Ty(SubType->getContext()); const Type * paddingType = ArrayType::get (Int8Type, nextOffset-thisOffset); // @@ -499,7 +498,7 @@ std::vector elementTypes; elementTypes.push_back (SubType); elementTypes.push_back (paddingType); - return (StructType::get (getGlobalContext(), elementTypes, true)); + return (StructType::get (SubType->getContext(), elementTypes, true)); } else { return SubType; } @@ -516,6 +515,8 @@ bool DSNode::mergeTypeInfo(const Type *NewTy, unsigned Offset, bool FoldIfIncompatible) { //DOUT << "merging " << *NewTy << " at " << Offset << " with " << *Ty << "\n"; + if (!Ty) Ty = Type::getVoidTy(NewTy->getContext()); + const TargetData &TD = getTargetData(); // Check to make sure the Size member is up-to-date. Size can be one of the // following: @@ -524,7 +525,7 @@ // Size = 1, Ty = Void, Array = 1: The node is collapsed // Otherwise, sizeof(Ty) = Size // - const Type * VoidType = Type::getVoidTy(getGlobalContext()); + const Type * VoidType = Type::getVoidTy(NewTy->getContext()); assert(((Size == 0 && Ty == VoidType && !isArray()) || (Size == 0 && !Ty->isSized() && !isArray()) || (Size == 1 && Ty == VoidType && isArray()) || @@ -945,8 +946,7 @@ } #endif // Merge the type entries of the two nodes together... - const Type * VoidType = Type::getVoidTy(getGlobalContext()); - if (NH.getNode()->Ty != VoidType) + if (NH.getNode()->Ty && NH.getNode()->Ty->getTypeID() != Type::VoidTyID) CurNodeH.getNode()->mergeTypeInfo(NH.getNode()->Ty, NOffset); assert(!CurNodeH.getNode()->isDeadNode()); @@ -1206,9 +1206,9 @@ } // Merge the type entries of the two nodes together... - const Type * VoidType = Type::getVoidTy(getGlobalContext()); - if (SN->getType() != VoidType && !DN->isNodeCompletelyFolded()) { - DN->mergeTypeInfo(SN->getType(), NH.getOffset()-SrcNH.getOffset()); + if ((SN->getType() || SN->getType()->getTypeID() != Type::VoidTyID) + && !DN->isNodeCompletelyFolded()) { + DN->mergeTypeInfo(SN->getType(), NH.getOffset() - SrcNH.getOffset()); DN = NH.getNode(); } } @@ -2033,12 +2033,12 @@ } static inline void killIfUselessEdge(DSNodeHandle &Edge) { - const Type * VoidType = Type::getVoidTy(getGlobalContext()); - if (DSNode *N = Edge.getNode()) // Is there an edge? + if (DSNode * N = Edge.getNode()) // Is there an edge? if (N->getNumReferrers() == 1) // Does it point to a lonely node? // No interesting info? if ((N->getNodeFlags() & ~DSNode::IncompleteNode) == 0 && - N->getType() == VoidType && !N->isNodeCompletelyFolded()) + (!N->getType() || N->getType()->getTypeID() == Type::VoidTyID) + && !N->isNodeCompletelyFolded()) Edge.setTo(0, 0); // Kill the edge! } Modified: poolalloc/trunk/lib/DSA/Makefile URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/Makefile?rev=96979&r1=96978&r2=96979&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/Makefile (original) +++ poolalloc/trunk/lib/DSA/Makefile Tue Feb 23 14:50:55 2010 @@ -8,9 +8,10 @@ ##===----------------------------------------------------------------------===## LEVEL = ../.. -BUILD_RELINKED=1 -SHARED_LIBRARY=1 LIBRARYNAME = LLVMDataStructure +BUILD_ARCHIVE := 1 +SHARED_LIBRARY := 1 +#LOADABLE_MODULE := 1 include $(LEVEL)/Makefile.common Modified: poolalloc/trunk/lib/DSA/Printer.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/Printer.cpp?rev=96979&r1=96978&r2=96979&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/Printer.cpp (original) +++ poolalloc/trunk/lib/DSA/Printer.cpp Tue Feb 23 14:50:55 2010 @@ -63,7 +63,10 @@ if (N->isNodeCompletelyFolded()) OS << "COLLAPSED"; else { - WriteTypeSymbolic(OS, N->getType(), M); + if (N->getType()) + WriteTypeSymbolic(OS, N->getType(), M); + else + OS << "VOID"; if (N->isArray()) OS << " array"; } Modified: poolalloc/trunk/lib/PoolAllocate/Makefile URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/Makefile?rev=96979&r1=96978&r2=96979&view=diff ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/Makefile (original) +++ poolalloc/trunk/lib/PoolAllocate/Makefile Tue Feb 23 14:50:55 2010 @@ -6,15 +6,13 @@ # # Give the name of a library. This will build a dynamic version. # -BUILD_RELINKED=1 -SHARED_LIBRARY=1 LIBRARYNAME=poolalloc +BUILD_ARCHIVE := 1 +SHARED_LIBRARY := 1 +#LOADABLE_MODULE := 1 # # Include Makefile.common so we know what to do. # include $(LEVEL)/Makefile.common -LDFLAGS += -lLLVMDataStructure -CFLAGS += -fPIC - From johnny.chen at apple.com Tue Feb 23 14:51:23 2010 From: johnny.chen at apple.com (Johnny Chen) Date: Tue, 23 Feb 2010 20:51:23 -0000 Subject: [llvm-commits] [llvm] r96980 - /llvm/trunk/lib/Target/ARM/ARMInstrNEON.td Message-ID: <20100223205123.A08FF2A6C12C@llvm.org> Author: johnny Date: Tue Feb 23 14:51:23 2010 New Revision: 96980 URL: http://llvm.org/viewvc/llvm-project?rev=96980&view=rev Log: Added for disassembly VLD1 (multiple single elements) which loads memory into three or four registers and VLD2 (multiple two-element structures) which loads memory into two double-spaced registers. A8.6.307 & A8.6.310 Modified: llvm/trunk/lib/Target/ARM/ARMInstrNEON.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrNEON.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrNEON.td?rev=96980&r1=96979&r2=96980&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrNEON.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrNEON.td Tue Feb 23 14:51:23 2010 @@ -191,6 +191,29 @@ def VLD1qf : VLD1Q<0b1000, "vld1", "32", v4f32, int_arm_neon_vld1>; def VLD1q64 : VLD1Q<0b1100, "vld1", "64", v2i64, int_arm_neon_vld1>; +// These (dreg triple/quadruple) are for disassembly only. +class VLD1D3 op7_4, string OpcodeStr, string Dt> + : NLdSt<0, 0b10, 0b0110, op7_4, (outs DPR:$dst1, DPR:$dst2, DPR:$dst3), + (ins addrmode6:$addr), IIC_VLD1, OpcodeStr, Dt, + "\\{$dst1, $dst2, $dst3\\}, $addr", "", + [/* For disassembly only; pattern left blank */]>; +class VLD1D4 op7_4, string OpcodeStr, string Dt> + : NLdSt<0,0b10,0b0010,op7_4,(outs DPR:$dst1, DPR:$dst2, DPR:$dst3, DPR:$dst4), + (ins addrmode6:$addr), IIC_VLD1, OpcodeStr, Dt, + "\\{$dst1, $dst2, $dst3, $dst4\\}, $addr", "", + [/* For disassembly only; pattern left blank */]>; + +def VLD1d8T : VLD1D3<0b0000, "vld1", "8">; +def VLD1d16T : VLD1D3<0b0100, "vld1", "16">; +def VLD1d32T : VLD1D3<0b1000, "vld1", "32">; +//def VLD1d64T : VLD1D3<0b1100, "vld1", "64">; + +def VLD1d8Q : VLD1D4<0b0000, "vld1", "8">; +def VLD1d16Q : VLD1D4<0b0100, "vld1", "16">; +def VLD1d32Q : VLD1D4<0b1000, "vld1", "32">; +//def VLD1d64Q : VLD1D4<0b1100, "vld1", "64">; + + let mayLoad = 1, hasExtraDefRegAllocReq = 1 in { // VLD2 : Vector Load (multiple 2-element structures) @@ -216,6 +239,16 @@ def VLD2q16 : VLD2Q<0b0100, "vld2", "16">; def VLD2q32 : VLD2Q<0b1000, "vld2", "32">; +// These (double-spaced dreg pair) are for disassembly only. +class VLD2Ddbl op7_4, string OpcodeStr, string Dt> + : NLdSt<0,0b10,0b1001,op7_4, (outs DPR:$dst1, DPR:$dst2), + (ins addrmode6:$addr), IIC_VLD2, + OpcodeStr, Dt, "\\{$dst1, $dst2\\}, $addr", "", []>; + +def VLD2d8D : VLD2Ddbl<0b0000, "vld2", "8">; +def VLD2d16D : VLD2Ddbl<0b0100, "vld2", "16">; +def VLD2d32D : VLD2Ddbl<0b1000, "vld2", "32">; + // VLD3 : Vector Load (multiple 3-element structures) class VLD3D op7_4, string OpcodeStr, string Dt> : NLdSt<0,0b10,0b0100,op7_4, (outs DPR:$dst1, DPR:$dst2, DPR:$dst3), From jyasskin at google.com Tue Feb 23 14:53:37 2010 From: jyasskin at google.com (Jeffrey Yasskin) Date: Tue, 23 Feb 2010 20:53:37 -0000 Subject: [llvm-commits] [llvm] r96981 - in /llvm/trunk: ./ autoconf/ examples/BrainF/ examples/Fibonacci/ examples/HowToUseJIT/ include/llvm/ADT/ include/llvm/Support/ lib/CodeGen/ lib/CodeGen/SelectionDAG/ lib/Transforms/IPO/ test/ test/CodeGen/X86/ test/DebugInfo/ test/FrontendObjC++/ test/FrontendObjC/ test/TableGen/ test/Transforms/FunctionAttrs/ test/Transforms/IndVarSimplify/ test/Transforms/InstCombine/ test/Unit/ tools/llvm-shlib/ unittests/ Message-ID: <20100223205338.2299B2A6C12C@llvm.org> Author: jyasskin Date: Tue Feb 23 14:53:37 2010 New Revision: 96981 URL: http://llvm.org/viewvc/llvm-project?rev=96981&view=rev Log: Roll back r96959 again. Removed: llvm/trunk/tools/llvm-shlib/ Modified: llvm/trunk/Makefile llvm/trunk/Makefile.config.in llvm/trunk/Makefile.rules llvm/trunk/autoconf/configure.ac llvm/trunk/configure llvm/trunk/examples/BrainF/Makefile llvm/trunk/examples/Fibonacci/Makefile llvm/trunk/examples/HowToUseJIT/Makefile llvm/trunk/include/llvm/ADT/DenseMapInfo.h (props changed) llvm/trunk/include/llvm/Support/NoFolder.h (props changed) llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.h (props changed) llvm/trunk/lib/CodeGen/SelectionDAG/InstrEmitter.h (props changed) llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h (props changed) llvm/trunk/lib/CodeGen/VirtRegRewriter.cpp (props changed) llvm/trunk/lib/CodeGen/VirtRegRewriter.h (props changed) llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp (props changed) llvm/trunk/test/CodeGen/X86/optimize-max-0.ll (props changed) llvm/trunk/test/DebugInfo/2009-11-06-InvalidDerivedType.ll (props changed) llvm/trunk/test/FrontendObjC++/2007-10-03-MetadataPointers.mm (props changed) llvm/trunk/test/FrontendObjC/2008-10-3-EhValue.m (props changed) llvm/trunk/test/Makefile llvm/trunk/test/TableGen/DagDefSubst.td (props changed) llvm/trunk/test/TableGen/DagIntSubst.td (props changed) llvm/trunk/test/Transforms/FunctionAttrs/ (props changed) llvm/trunk/test/Transforms/FunctionAttrs/2008-09-03-Mutual.ll (props changed) llvm/trunk/test/Transforms/FunctionAttrs/2008-09-03-ReadNone.ll (props changed) llvm/trunk/test/Transforms/FunctionAttrs/2008-09-03-ReadOnly.ll (props changed) llvm/trunk/test/Transforms/FunctionAttrs/2008-09-13-VolatileRead.ll (props changed) llvm/trunk/test/Transforms/IndVarSimplify/loop_evaluate8.ll (props changed) llvm/trunk/test/Transforms/IndVarSimplify/variable-stride-ivs-0.ll (props changed) llvm/trunk/test/Transforms/InstCombine/add3.ll (props changed) llvm/trunk/test/Unit/lit.cfg llvm/trunk/test/Unit/lit.site.cfg.in llvm/trunk/unittests/Makefile.unittest Modified: llvm/trunk/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile?rev=96981&r1=96980&r2=96981&view=diff ============================================================================== --- llvm/trunk/Makefile (original) +++ llvm/trunk/Makefile Tue Feb 23 14:53:37 2010 @@ -30,8 +30,8 @@ DIRS := lib/System lib/Support utils OPTIONAL_DIRS := else - DIRS := lib/System lib/Support utils lib/VMCore lib tools/llvm-shlib \ - tools/llvm-config tools runtime docs unittests + DIRS := lib/System lib/Support utils lib/VMCore lib tools/llvm-config \ + tools runtime docs unittests OPTIONAL_DIRS := projects bindings endif Modified: llvm/trunk/Makefile.config.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.config.in?rev=96981&r1=96980&r2=96981&view=diff ============================================================================== --- llvm/trunk/Makefile.config.in (original) +++ llvm/trunk/Makefile.config.in Tue Feb 23 14:53:37 2010 @@ -262,11 +262,6 @@ # Do we want to build with position independent code? ENABLE_PIC := @ENABLE_PIC@ -# Do we want to link the tools shared? -ifndef ENABLE_SHARED - ENABLE_SHARED := @ENABLE_SHARED@ -endif - # Use -fvisibility-inlines-hidden? ENABLE_VISIBILITY_INLINES_HIDDEN := @ENABLE_VISIBILITY_INLINES_HIDDEN@ @@ -277,9 +272,6 @@ # Enable JIT for this platform TARGET_HAS_JIT = @TARGET_HAS_JIT@ -# Environment variable to set to change the runtime shared library search path. -SHLIBPATH_VAR = @SHLIBPATH_VAR@ - # Shared library extension for host platform. SHLIBEXT = @SHLIBEXT@ Modified: llvm/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=96981&r1=96980&r2=96981&view=diff ============================================================================== --- llvm/trunk/Makefile.rules (original) +++ llvm/trunk/Makefile.rules Tue Feb 23 14:53:37 2010 @@ -623,12 +623,11 @@ ifneq ($(HOST_OS),Darwin) ifneq ($(DARWIN_MAJVERS),4) ifdef TOOLNAME - LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib' - ifdef EXAMPLE_TOOL - LD.Flags += $(RPATH) -Wl,$(ExmplDir) $(RDYNAMIC) - else - LD.Flags += $(RPATH) -Wl,$(ToolDir) $(RDYNAMIC) - endif +ifdef EXAMPLE_TOOL + LD.Flags += $(RPATH) -Wl,$(ExmplDir) $(RDYNAMIC) +else + LD.Flags += $(RPATH) -Wl,$(ToolDir) $(RDYNAMIC) +endif endif endif endif @@ -961,16 +960,11 @@ $(ToolDir)/$(strip $(TOOLNAME))$(EXEEXT): $(LLVM_CONFIG) -ifeq ($(ENABLE_SHARED), 1) -LLVMLibsOptions += -lLLVM-$(LLVMVersion) -LLVMLibsPaths += $(LibDir)/libLLVM-$(LLVMVersion)$(SHLIBEXT) -else LLVMLibsOptions += $(shell $(LLVM_CONFIG) --libs $(LINK_COMPONENTS)) LLVMLibsPaths += $(LLVM_CONFIG) \ $(shell $(LLVM_CONFIG) --libfiles $(LINK_COMPONENTS)) endif endif -endif ############################################################################### # Library Build Rules: Four ways to build a library @@ -1175,13 +1169,11 @@ # If neither BUILD_ARCHIVE or LOADABLE_MODULE are specified, default to # building an archive. #--------------------------------------------------------- -ifndef NO_BUILD_ARCHIVE ifndef BUILD_ARCHIVE ifndef LOADABLE_MODULE BUILD_ARCHIVE = 1 endif endif -endif #--------------------------------------------------------- # Archive Library Targets: Modified: llvm/trunk/autoconf/configure.ac URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=96981&r1=96980&r2=96981&view=diff ============================================================================== --- llvm/trunk/autoconf/configure.ac (original) +++ llvm/trunk/autoconf/configure.ac Tue Feb 23 14:53:37 2010 @@ -472,18 +472,6 @@ AC_DEFINE_UNQUOTED([ENABLE_PIC],$ENABLE_PIC, [Define if position independent code is enabled]) -dnl Allow linking tools against the shared library. -AC_ARG_ENABLE(shared, - AS_HELP_STRING([--enable-shared], - [Link LLVM tools shared (default is NO)]),, - enableval=default) -case "$enableval" in - yes) AC_SUBST(ENABLE_SHARED,[1]) ;; - no) AC_SUBST(ENABLE_SHARED,[0]) ;; - default) AC_SUBST(ENABLE_SHARED,[0]) ;; - *) AC_MSG_ERROR([Invalid setting for --enable-shared. Use "yes" or "no"]) ;; -esac - dnl Allow specific targets to be specified for building (or not) TARGETS_TO_BUILD="" AC_ARG_ENABLE([targets],AS_HELP_STRING([--enable-targets], @@ -1348,10 +1336,6 @@ dnl the Makefiles so we can use it there too AC_SUBST(SHLIBEXT,$libltdl_cv_shlibext) -dnl Propagate the run-time library path variable that the libltdl -dnl checks found to the Makefiles so we can use it there too -AC_SUBST(SHLIBPATH_VAR,$libltdl_cv_shlibpath_var) - # Translate the various configuration directories and other basic # information into substitutions that will end up in Makefile.config.in # that these configured values can be used by the makefiles Modified: llvm/trunk/configure URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=96981&r1=96980&r2=96981&view=diff ============================================================================== --- llvm/trunk/configure (original) +++ llvm/trunk/configure Tue Feb 23 14:53:37 2010 @@ -689,7 +689,6 @@ ENABLE_DOXYGEN ENABLE_THREADS ENABLE_PIC -ENABLE_SHARED TARGETS_TO_BUILD LLVM_ENUM_TARGETS LLVM_ENUM_ASM_PRINTERS @@ -771,7 +770,6 @@ LLVMGCCDIR LLVMGCC_LANGS SHLIBEXT -SHLIBPATH_VAR LLVM_PREFIX LLVM_BINDIR LLVM_LIBDIR @@ -1404,7 +1402,6 @@ --enable-threads Use threads if available (default is YES) --enable-pic Build LLVM with Position Independent Code (default is YES) - --enable-shared Link LLVM tools shared (default is NO) --enable-targets Build specific host targets: all or target1,target2,... Valid targets are: host, x86, x86_64, sparc, powerpc, alpha, arm, mips, spu, @@ -4870,25 +4867,6 @@ _ACEOF -# Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then - enableval=$enable_shared; -else - enableval=default -fi - -case "$enableval" in - yes) ENABLE_SHARED=1 - ;; - no) ENABLE_SHARED=0 - ;; - default) ENABLE_SHARED=0 - ;; - *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-shared. Use \"yes\" or \"no\"" >&5 -echo "$as_me: error: Invalid setting for --enable-shared. Use \"yes\" or \"no\"" >&2;} - { (exit 1); exit 1; }; } ;; -esac - TARGETS_TO_BUILD="" # Check whether --enable-targets was given. if test "${enable_targets+set}" = set; then @@ -11132,7 +11110,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <conf$$subs.sed <<_ACEOF -OPTIMIZE_OPTION!$OPTIMIZE_OPTION$ac_delim EXTRA_OPTIONS!$EXTRA_OPTIONS$ac_delim BINUTILS_INCDIR!$BINUTILS_INCDIR$ac_delim ENABLE_LLVMC_DYNAMIC!$ENABLE_LLVMC_DYNAMIC$ac_delim @@ -20896,7 +20870,6 @@ LLVMGCCDIR!$LLVMGCCDIR$ac_delim LLVMGCC_LANGS!$LLVMGCC_LANGS$ac_delim SHLIBEXT!$SHLIBEXT$ac_delim -SHLIBPATH_VAR!$SHLIBPATH_VAR$ac_delim LLVM_PREFIX!$LLVM_PREFIX$ac_delim LLVM_BINDIR!$LLVM_BINDIR$ac_delim LLVM_LIBDIR!$LLVM_LIBDIR$ac_delim @@ -20917,7 +20890,7 @@ LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 91; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 89; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 Modified: llvm/trunk/examples/BrainF/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/BrainF/Makefile?rev=96981&r1=96980&r2=96981&view=diff ============================================================================== --- llvm/trunk/examples/BrainF/Makefile (original) +++ llvm/trunk/examples/BrainF/Makefile Tue Feb 23 14:53:37 2010 @@ -9,9 +9,6 @@ LEVEL = ../.. TOOLNAME = BrainF EXAMPLE_TOOL = 1 -# To keep the shared library working, we link a few of the examples -# against it unconditionally. -ENABLE_SHARED = 1 LINK_COMPONENTS := jit bitwriter nativecodegen interpreter Modified: llvm/trunk/examples/Fibonacci/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Fibonacci/Makefile?rev=96981&r1=96980&r2=96981&view=diff ============================================================================== --- llvm/trunk/examples/Fibonacci/Makefile (original) +++ llvm/trunk/examples/Fibonacci/Makefile Tue Feb 23 14:53:37 2010 @@ -10,9 +10,6 @@ LEVEL = ../.. TOOLNAME = Fibonacci EXAMPLE_TOOL = 1 -# To keep the shared library working, we link a few of the examples -# against it unconditionally. -ENABLE_SHARED = 1 # Link in JIT support LINK_COMPONENTS := jit interpreter nativecodegen Modified: llvm/trunk/examples/HowToUseJIT/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/HowToUseJIT/Makefile?rev=96981&r1=96980&r2=96981&view=diff ============================================================================== --- llvm/trunk/examples/HowToUseJIT/Makefile (original) +++ llvm/trunk/examples/HowToUseJIT/Makefile Tue Feb 23 14:53:37 2010 @@ -9,9 +9,6 @@ LEVEL = ../.. TOOLNAME = HowToUseJIT EXAMPLE_TOOL = 1 -# To keep the shared library working, we link a few of the examples -# against it unconditionally. -ENABLE_SHARED = 1 LINK_COMPONENTS := jit interpreter nativecodegen Propchange: llvm/trunk/include/llvm/ADT/DenseMapInfo.h ------------------------------------------------------------------------------ (empty) Propchange: llvm/trunk/include/llvm/Support/NoFolder.h ------------------------------------------------------------------------------ (empty) Propchange: llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.h ------------------------------------------------------------------------------ (empty) Propchange: llvm/trunk/lib/CodeGen/SelectionDAG/InstrEmitter.h ------------------------------------------------------------------------------ (empty) Propchange: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h ------------------------------------------------------------------------------ (empty) Propchange: llvm/trunk/lib/CodeGen/VirtRegRewriter.cpp ------------------------------------------------------------------------------ (empty) Propchange: llvm/trunk/lib/CodeGen/VirtRegRewriter.h ------------------------------------------------------------------------------ (empty) Propchange: llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp ------------------------------------------------------------------------------ (empty) Propchange: llvm/trunk/test/CodeGen/X86/optimize-max-0.ll ------------------------------------------------------------------------------ (empty) Propchange: llvm/trunk/test/DebugInfo/2009-11-06-InvalidDerivedType.ll ------------------------------------------------------------------------------ (empty) Propchange: llvm/trunk/test/FrontendObjC++/2007-10-03-MetadataPointers.mm ------------------------------------------------------------------------------ (empty) Propchange: llvm/trunk/test/FrontendObjC/2008-10-3-EhValue.m ------------------------------------------------------------------------------ (empty) Modified: llvm/trunk/test/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Makefile?rev=96981&r1=96980&r2=96981&view=diff ============================================================================== --- llvm/trunk/test/Makefile (original) +++ llvm/trunk/test/Makefile Tue Feb 23 14:53:37 2010 @@ -198,6 +198,4 @@ -e "s#@LLVM_TOOLS_DIR@#$(ToolDir)#g" \ -e "s#@LLVMGCCDIR@#$(LLVMGCCDIR)#g" \ -e "s#@LLVM_BUILD_MODE@#$(BuildMode)#g" \ - -e "s#@ENABLE_SHARED@#$(ENABLE_SHARED)#g" \ - -e "s#@SHLIBPATH_VAR@#$(SHLIBPATH_VAR)#g" \ $(PROJ_SRC_DIR)/Unit/lit.site.cfg.in > $@ Propchange: llvm/trunk/test/TableGen/DagDefSubst.td ------------------------------------------------------------------------------ (empty) Propchange: llvm/trunk/test/TableGen/DagIntSubst.td ------------------------------------------------------------------------------ (empty) Propchange: llvm/trunk/test/Transforms/FunctionAttrs/ ------------------------------------------------------------------------------ (empty) Propchange: llvm/trunk/test/Transforms/FunctionAttrs/2008-09-03-Mutual.ll ------------------------------------------------------------------------------ (empty) Propchange: llvm/trunk/test/Transforms/FunctionAttrs/2008-09-03-ReadNone.ll ------------------------------------------------------------------------------ (empty) Propchange: llvm/trunk/test/Transforms/FunctionAttrs/2008-09-03-ReadOnly.ll ------------------------------------------------------------------------------ (empty) Propchange: llvm/trunk/test/Transforms/FunctionAttrs/2008-09-13-VolatileRead.ll ------------------------------------------------------------------------------ (empty) Propchange: llvm/trunk/test/Transforms/IndVarSimplify/loop_evaluate8.ll ------------------------------------------------------------------------------ (empty) Propchange: llvm/trunk/test/Transforms/IndVarSimplify/variable-stride-ivs-0.ll ------------------------------------------------------------------------------ (empty) Propchange: llvm/trunk/test/Transforms/InstCombine/add3.ll ------------------------------------------------------------------------------ (empty) Modified: llvm/trunk/test/Unit/lit.cfg URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Unit/lit.cfg?rev=96981&r1=96980&r2=96981&view=diff ============================================================================== --- llvm/trunk/test/Unit/lit.cfg (original) +++ llvm/trunk/test/Unit/lit.cfg Tue Feb 23 14:53:37 2010 @@ -23,14 +23,7 @@ ### -# If necessary, point the dynamic loader at libLLVM.so. -if config.enable_shared: - libdir = os.path.join(config.llvm_obj_root, config.llvm_build_mode, 'lib') - shlibpath = config.environment.get(config.shlibpath_var,'') - if shlibpath: - shlibpath = ':' + shlibpath - shlibpath = libdir + shlibpath - config.environment[config.shlibpath_var] = shlibpath +import os # Check that the object root is known. if config.test_exec_root is None: Modified: llvm/trunk/test/Unit/lit.site.cfg.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Unit/lit.site.cfg.in?rev=96981&r1=96980&r2=96981&view=diff ============================================================================== --- llvm/trunk/test/Unit/lit.site.cfg.in (original) +++ llvm/trunk/test/Unit/lit.site.cfg.in Tue Feb 23 14:53:37 2010 @@ -5,8 +5,6 @@ config.llvm_tools_dir = "@LLVM_TOOLS_DIR@" config.llvmgcc_dir = "@LLVMGCCDIR@" config.llvm_build_mode = "@LLVM_BUILD_MODE@" -config.enable_shared = @ENABLE_SHARED@ -config.shlibpath_var = "@SHLIBPATH_VAR@" # Let the main config do the real work. lit.load_config(config, "@LLVM_SOURCE_DIR@/test/Unit/lit.cfg") Modified: llvm/trunk/unittests/Makefile.unittest URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Makefile.unittest?rev=96981&r1=96980&r2=96981&view=diff ============================================================================== --- llvm/trunk/unittests/Makefile.unittest (original) +++ llvm/trunk/unittests/Makefile.unittest Tue Feb 23 14:53:37 2010 @@ -28,17 +28,6 @@ CPP.Flags += $(NO_VARIADIC_MACROS) TESTLIBS = -lGoogleTest -lUnitTestMain -ifeq ($(ENABLE_SHARED), 1) - # Add the absolute path to the dynamic library. This is ok because - # we'll never install unittests. - LD.Flags += $(RPATH) -Wl,$(LibDir) -endif -ifeq ($(ENABLE_SHARED), 1) - # Also set {DYLD,LD}_LIBRARY_PATH because OSX ignores the rpath most - # of the time. - Run.Shared := $(SHLIBPATH_VAR)="$(LibDir)$${$(SHLIBPATH_VAR):+:}$$$(SHLIBPATH_VAR)" -endif - $(LLVMUnitTestExe): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths) $(Echo) Linking $(BuildMode) unit test $(TESTNAME) $(StripWarnMsg) $(Verb) $(Link) -o $@ $(TOOLLINKOPTS) $(ObjectsO) $(ProjLibsOptions) \ @@ -49,6 +38,6 @@ all:: $(LLVMUnitTestExe) unitcheck:: $(LLVMUnitTestExe) - $(Run.Shared) $(LLVMUnitTestExe) + $(LLVMUnitTestExe) endif From dag at cray.com Tue Feb 23 15:05:30 2010 From: dag at cray.com (David Greene) Date: Tue, 23 Feb 2010 15:05:30 -0600 Subject: [llvm-commits] [llvm] r96956 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp In-Reply-To: <74AF2502-782D-42D3-BD15-EAE4C7CCE6C9@apple.com> References: <20100223173750.3FF1B2A6C12C@llvm.org> <74AF2502-782D-42D3-BD15-EAE4C7CCE6C9@apple.com> Message-ID: <201002231505.36826.dag@cray.com> On Tuesday 23 February 2010 11:41:28 Chris Lattner wrote: > On Feb 23, 2010, at 9:37 AM, David Greene wrote: > > Author: greened > > Date: Tue Feb 23 11:37:50 2010 > > New Revision: 96956 > > > > URL: http://llvm.org/viewvc/llvm-project?rev=96956&view=rev > > Log: > > > > Speed up cycle checking significantly by caching results. > > Please use a SmallPtrSet instead of std::set, it is much faster for > pointers. Again, this is with debugging enabled, and extra checks on top of that. Stuff is SLLOOOWW anyway. :) -Dave From richard at xmos.com Tue Feb 23 15:08:11 2010 From: richard at xmos.com (Richard Osborne) Date: Tue, 23 Feb 2010 21:08:11 -0000 Subject: [llvm-commits] [llvm] r96983 - /llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td Message-ID: <20100223210811.70A2F2A6C12C@llvm.org> Author: friedgold Date: Tue Feb 23 15:08:11 2010 New Revision: 96983 URL: http://llvm.org/viewvc/llvm-project?rev=96983&view=rev Log: Don't mark call instruction as a barrier. Modified: llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td Modified: llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td?rev=96983&r1=96982&r2=96983&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td (original) +++ llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td Tue Feb 23 15:08:11 2010 @@ -703,7 +703,7 @@ "ldap r11, $addr", [(set R11, (pcrelwrapper tblockaddress:$addr))]>; -let isCall=1, isBarrier = 1, +let isCall=1, // All calls clobber the link register and the non-callee-saved registers: Defs = [R0, R1, R2, R3, R11, LR] in { def BL_u10 : _FU10< From devang.patel at gmail.com Tue Feb 23 15:15:42 2010 From: devang.patel at gmail.com (Devang Patel) Date: Tue, 23 Feb 2010 13:15:42 -0800 Subject: [llvm-commits] [llvm] r95975 - in /llvm/trunk: include/llvm/Analysis/ lib/Analysis/ lib/CodeGen/ lib/Transforms/Scalar/ test/CodeGen/ARM/ test/CodeGen/Thumb2/ test/CodeGen/X86/ test/Transforms/IndVarSimplify/ test/Transforms/LoopStrengthReduce/ In-Reply-To: <82BE0662-E905-46AE-98B4-2CC580FAE85E@apple.com> References: <201002121034.o1CAYXSw030410@zion.cs.uiuc.edu> <352a1fb21002152349v3b61242cnbb1a99f97fa018c4@mail.gmail.com> <82BE0662-E905-46AE-98B4-2CC580FAE85E@apple.com> Message-ID: <352a1fb21002231315i1f57d40bp9d8c856120950a00@mail.gmail.com> Dan, On Sun, Feb 21, 2010 at 10:24 AM, Dan Gohman wrote: > > Thanks for the reminder. ?I expect to solve this by adding an argument to > addPassesToEmit... ? The main inertia is in the clients. ?I'll aim to tackle > this soon. > Are there any reasons to keep addPassesToEmit... be in llvm/libCodegen instead of pushing it up in llc (and llvm-gcc/llvm-back.cpp and clang/lib/CodGen/.. ) just like selection of optimization passes ? - Devang From evan.cheng at apple.com Tue Feb 23 15:24:20 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 23 Feb 2010 21:24:20 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r96986 - /llvm-gcc-4.2/trunk/gcc/toplev.c Message-ID: <20100223212420.AD9FD2A6C12C@llvm.org> Author: evancheng Date: Tue Feb 23 15:24:20 2010 New Revision: 96986 URL: http://llvm.org/viewvc/llvm-project?rev=96986&view=rev Log: Unbreak build by using C style comments. Modified: llvm-gcc-4.2/trunk/gcc/toplev.c Modified: llvm-gcc-4.2/trunk/gcc/toplev.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/toplev.c?rev=96986&r1=96985&r2=96986&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/toplev.c (original) +++ llvm-gcc-4.2/trunk/gcc/toplev.c Tue Feb 23 15:24:20 2010 @@ -1926,8 +1926,8 @@ /* LLVM LOCAL begin */ #ifdef ENABLE_LLVM - // write_symbols set up debug_hooks. llvm-gcc does not use this hooks - // to emit debug info. + /* write_symbols set up debug_hooks. llvm-gcc does not use this hooks + to emit debug info. */ write_symbols = NO_DEBUG; #endif /* LLVM LOCAL end */ From enderby at apple.com Tue Feb 23 15:41:25 2010 From: enderby at apple.com (Kevin Enderby) Date: Tue, 23 Feb 2010 21:41:25 -0000 Subject: [llvm-commits] [llvm] r96988 - /llvm/trunk/lib/MC/MCAssembler.cpp Message-ID: <20100223214125.116A02A6C12C@llvm.org> Author: enderby Date: Tue Feb 23 15:41:24 2010 New Revision: 96988 URL: http://llvm.org/viewvc/llvm-project?rev=96988&view=rev Log: This is the second patch to allow x86 code to be aligned with optimal nops. With the compiler changed to use EmitCodeAlignment() it does change the functionality. But X86 assembly code assembled with llvm-mc does not change its output. For that we will eventually change the assembler frontend to detect a '.align x, 0x90' when used in a section that 'hasInstructions' and use EmitCodeAlignment, but will wait until we have better target hooks. Modified: llvm/trunk/lib/MC/MCAssembler.cpp Modified: llvm/trunk/lib/MC/MCAssembler.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAssembler.cpp?rev=96988&r1=96987&r2=96988&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCAssembler.cpp (original) +++ llvm/trunk/lib/MC/MCAssembler.cpp Tue Feb 23 15:41:24 2010 @@ -1066,9 +1066,54 @@ /// /// FIXME this is X86 32-bit specific and should move to a better place. static uint64_t WriteNopData(uint64_t Count, MachObjectWriter &MOW) { - // FIXME for now just use the 0x90 nop opcode byte. + static const uint8_t Nops[16][16] = { + // nop + {0x90}, + // xchg %ax,%ax + {0x66, 0x90}, + // nopl (%[re]ax) + {0x0f, 0x1f, 0x00}, + // nopl 0(%[re]ax) + {0x0f, 0x1f, 0x40, 0x00}, + // nopl 0(%[re]ax,%[re]ax,1) + {0x0f, 0x1f, 0x44, 0x00, 0x00}, + // nopw 0(%[re]ax,%[re]ax,1) + {0x66, 0x0f, 0x1f, 0x44, 0x00, 0x00}, + // nopl 0L(%[re]ax) + {0x0f, 0x1f, 0x80, 0x00, 0x00, 0x00, 0x00}, + // nopl 0L(%[re]ax,%[re]ax,1) + {0x0f, 0x1f, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00}, + // nopw 0L(%[re]ax,%[re]ax,1) + {0x66, 0x0f, 0x1f, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00}, + // nopw %cs:0L(%[re]ax,%[re]ax,1) + {0x66, 0x2e, 0x0f, 0x1f, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00}, + // nopl 0(%[re]ax,%[re]ax,1) + // nopw 0(%[re]ax,%[re]ax,1) + {0x0f, 0x1f, 0x44, 0x00, 0x00, + 0x66, 0x0f, 0x1f, 0x44, 0x00, 0x00}, + // nopw 0(%[re]ax,%[re]ax,1) + // nopw 0(%[re]ax,%[re]ax,1) + {0x66, 0x0f, 0x1f, 0x44, 0x00, 0x00, + 0x66, 0x0f, 0x1f, 0x44, 0x00, 0x00}, + // nopw 0(%[re]ax,%[re]ax,1) + // nopl 0L(%[re]ax) */ + {0x66, 0x0f, 0x1f, 0x44, 0x00, 0x00, + 0x0f, 0x1f, 0x80, 0x00, 0x00, 0x00, 0x00}, + // nopl 0L(%[re]ax) + // nopl 0L(%[re]ax) + {0x0f, 0x1f, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x0f, 0x1f, 0x80, 0x00, 0x00, 0x00, 0x00}, + // nopl 0L(%[re]ax) + // nopl 0L(%[re]ax,%[re]ax,1) + {0x0f, 0x1f, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x0f, 0x1f, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00} + }; + + if (Count > 15) + return 0; + for (uint64_t i = 0; i < Count; i++) - MOW.Write8 (uint8_t(0x90)); + MOW.Write8 (uint8_t(Nops[Count - 1][i])); return Count; } From evan.cheng at apple.com Tue Feb 23 15:51:54 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 23 Feb 2010 21:51:54 -0000 Subject: [llvm-commits] [llvm] r96990 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Message-ID: <20100223215154.CEAC42A6C12C@llvm.org> Author: evancheng Date: Tue Feb 23 15:51:54 2010 New Revision: 96990 URL: http://llvm.org/viewvc/llvm-project?rev=96990&view=rev Log: Fix rev 96389 by restricting the xform to mask that's either signbit or max signed value. Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=96990&r1=96989&r2=96990&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Feb 23 15:51:54 2010 @@ -9092,9 +9092,10 @@ } /// PerformANDCombine - Look for SSE and instructions of this form: -/// (and x, (build_vector c1,c2,c3,c4)). If there exists a use of a build_vector -/// that's the bitwise complement of the mask, then transform the node to -/// (and (xor x, (build_vector -1,-1,-1,-1)), (build_vector ~c1,~c2,~c3,~c4)). +/// (and x, (build_vector signbit,signbit,signbit,signbit)). If there +/// exists a use of a build_vector that's the bitwise complement of the mask, +/// then transform the node to +/// (and (xor x, (build_vector -1,-1,-1,-1)), (build_vector ~sb,~sb,~sb,~sb)). static SDValue PerformANDCombine(SDNode *N, SelectionDAG &DAG, TargetLowering::DAGCombinerInfo &DCI) { EVT VT = N->getValueType(0); @@ -9118,7 +9119,11 @@ continue; } ConstantSDNode *C = dyn_cast(Arg); - if (!C) return SDValue(); + if (!C) + return SDValue(); + if (!C->getAPIntValue().isSignBit() && + !C->getAPIntValue().isMaxSignedValue()) + return SDValue(); Mask.push_back(DAG.getConstant(~C->getAPIntValue(), EltVT)); } N1 = DAG.getNode(ISD::BUILD_VECTOR, N1.getDebugLoc(), VT, From stoklund at 2pi.dk Tue Feb 23 16:43:58 2010 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Tue, 23 Feb 2010 22:43:58 -0000 Subject: [llvm-commits] [llvm] r96994 - in /llvm/trunk: include/llvm/CodeGen/LiveVariables.h lib/CodeGen/LiveIntervalAnalysis.cpp lib/CodeGen/LiveVariables.cpp lib/CodeGen/PHIElimination.cpp test/CodeGen/X86/2010-02-23-SingleDefPhiJoin.ll Message-ID: <20100223224358.733902A6C12C@llvm.org> Author: stoklund Date: Tue Feb 23 16:43:58 2010 New Revision: 96994 URL: http://llvm.org/viewvc/llvm-project?rev=96994&view=rev Log: Keep track of phi join registers explicitly in LiveVariables. Previously, LiveIntervalAnalysis would infer phi joins by looking for multiply defined registers. That doesn't work if the phi join is implicitly defined in all but one of the predecessors. Added: llvm/trunk/test/CodeGen/X86/2010-02-23-SingleDefPhiJoin.ll Modified: llvm/trunk/include/llvm/CodeGen/LiveVariables.h llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp llvm/trunk/lib/CodeGen/LiveVariables.cpp llvm/trunk/lib/CodeGen/PHIElimination.cpp Modified: llvm/trunk/include/llvm/CodeGen/LiveVariables.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/LiveVariables.h?rev=96994&r1=96993&r2=96994&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/LiveVariables.h (original) +++ llvm/trunk/include/llvm/CodeGen/LiveVariables.h Tue Feb 23 16:43:58 2010 @@ -124,6 +124,11 @@ /// std::vector VirtRegInfo; + /// PHIJoins - list of virtual registers that are PHI joins. These registers + /// may have multiple definitions, and they require special handling when + /// building live intervals. + SparseBitVector<> PHIJoins; + /// ReservedRegisters - This vector keeps track of which registers /// are reserved register which are not allocatable by the target machine. /// We can not track liveness for values that are in this set. @@ -295,6 +300,12 @@ void addNewBlock(MachineBasicBlock *BB, MachineBasicBlock *DomBB, MachineBasicBlock *SuccBB); + + /// isPHIJoin - Return true if Reg is a phi join register. + bool isPHIJoin(unsigned Reg) { return PHIJoins.test(Reg); } + + /// setPHIJoin - Mark Reg as a phi join register. + void setPHIJoin(unsigned Reg) { PHIJoins.set(Reg); } }; } // End llvm namespace Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=96994&r1=96993&r2=96994&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original) +++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Tue Feb 23 16:43:58 2010 @@ -329,24 +329,43 @@ DEBUG(dbgs() << " +" << NewLR); interval.addRange(NewLR); - // Iterate over all of the blocks that the variable is completely - // live in, adding [insrtIndex(begin), instrIndex(end)+4) to the - // live interval. - for (SparseBitVector<>::iterator I = vi.AliveBlocks.begin(), - E = vi.AliveBlocks.end(); I != E; ++I) { - MachineBasicBlock *aliveBlock = mf_->getBlockNumbered(*I); - LiveRange LR(getMBBStartIdx(aliveBlock), getMBBEndIdx(aliveBlock), ValNo); - interval.addRange(LR); - DEBUG(dbgs() << " +" << LR); + bool PHIJoin = lv_->isPHIJoin(interval.reg); + + if (PHIJoin) { + // A phi join register is killed at the end of the MBB and revived as a new + // valno in the killing blocks. + assert(vi.AliveBlocks.empty() && "Phi join can't pass through blocks"); + DEBUG(dbgs() << " phi-join"); + ValNo->addKill(indexes_->getTerminatorGap(mbb)); + ValNo->setHasPHIKill(true); + } else { + // Iterate over all of the blocks that the variable is completely + // live in, adding [insrtIndex(begin), instrIndex(end)+4) to the + // live interval. + for (SparseBitVector<>::iterator I = vi.AliveBlocks.begin(), + E = vi.AliveBlocks.end(); I != E; ++I) { + MachineBasicBlock *aliveBlock = mf_->getBlockNumbered(*I); + LiveRange LR(getMBBStartIdx(aliveBlock), getMBBEndIdx(aliveBlock), ValNo); + interval.addRange(LR); + DEBUG(dbgs() << " +" << LR); + } } // Finally, this virtual register is live from the start of any killing // block to the 'use' slot of the killing instruction. for (unsigned i = 0, e = vi.Kills.size(); i != e; ++i) { MachineInstr *Kill = vi.Kills[i]; - SlotIndex killIdx = - getInstructionIndex(Kill).getDefIndex(); - LiveRange LR(getMBBStartIdx(Kill->getParent()), killIdx, ValNo); + SlotIndex Start = getMBBStartIdx(Kill->getParent()); + SlotIndex killIdx = getInstructionIndex(Kill).getDefIndex(); + + // Create interval with one of a NEW value number. Note that this value + // number isn't actually defined by an instruction, weird huh? :) + if (PHIJoin) { + ValNo = interval.getNextValue(SlotIndex(Start, true), 0, false, + VNInfoAllocator); + ValNo->setIsPHIDef(true); + } + LiveRange LR(Start, killIdx, ValNo); interval.addRange(LR); ValNo->addKill(killIdx); DEBUG(dbgs() << " +" << LR); @@ -409,48 +428,11 @@ interval.print(dbgs(), tri_); }); } else { - // Otherwise, this must be because of phi elimination. If this is the - // first redefinition of the vreg that we have seen, go back and change - // the live range in the PHI block to be a different value number. - if (interval.containsOneValue()) { - - VNInfo *VNI = interval.getValNumInfo(0); - // Phi elimination may have reused the register for multiple identical - // phi nodes. There will be a kill per phi. Remove the old ranges that - // we now know have an incorrect number. - for (unsigned ki=0, ke=vi.Kills.size(); ki != ke; ++ki) { - MachineInstr *Killer = vi.Kills[ki]; - SlotIndex Start = getMBBStartIdx(Killer->getParent()); - SlotIndex End = getInstructionIndex(Killer).getDefIndex(); - DEBUG({ - dbgs() << "\n\t\trenaming [" << Start << "," << End << "] in: "; - interval.print(dbgs(), tri_); - }); - interval.removeRange(Start, End); - - // Replace the interval with one of a NEW value number. Note that - // this value number isn't actually defined by an instruction, weird - // huh? :) - LiveRange LR(Start, End, - interval.getNextValue(SlotIndex(Start, true), - 0, false, VNInfoAllocator)); - LR.valno->setIsPHIDef(true); - interval.addRange(LR); - LR.valno->addKill(End); - } - - MachineBasicBlock *killMBB = getMBBFromIndex(VNI->def); - VNI->addKill(indexes_->getTerminatorGap(killMBB)); - VNI->setHasPHIKill(true); - DEBUG({ - dbgs() << " RESULT: "; - interval.print(dbgs(), tri_); - }); - } - + assert(lv_->isPHIJoin(interval.reg) && "Multiply defined register"); // In the case of PHI elimination, each variable definition is only // live until the end of the block. We've already taken care of the // rest of the live range. + SlotIndex defIndex = MIIdx.getDefIndex(); if (MO.isEarlyClobber()) defIndex = MIIdx.getUseIndex(); @@ -468,7 +450,7 @@ interval.addRange(LR); ValNo->addKill(indexes_->getTerminatorGap(mbb)); ValNo->setHasPHIKill(true); - DEBUG(dbgs() << " +" << LR); + DEBUG(dbgs() << " phi-join +" << LR); } } Modified: llvm/trunk/lib/CodeGen/LiveVariables.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveVariables.cpp?rev=96994&r1=96993&r2=96994&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LiveVariables.cpp (original) +++ llvm/trunk/lib/CodeGen/LiveVariables.cpp Tue Feb 23 16:43:58 2010 @@ -510,6 +510,7 @@ PHIVarInfo = new SmallVector[MF->getNumBlockIDs()]; std::fill(PhysRegDef, PhysRegDef + NumRegs, (MachineInstr*)0); std::fill(PhysRegUse, PhysRegUse + NumRegs, (MachineInstr*)0); + PHIJoins.clear(); /// Get some space for a respectable number of registers. VirtRegInfo.resize(64); Modified: llvm/trunk/lib/CodeGen/PHIElimination.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PHIElimination.cpp?rev=96994&r1=96993&r2=96994&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/PHIElimination.cpp (original) +++ llvm/trunk/lib/CodeGen/PHIElimination.cpp Tue Feb 23 16:43:58 2010 @@ -223,6 +223,7 @@ // Increment use count of the newly created virtual register. VI.NumUses++; + LV->setPHIJoin(IncomingReg); // When we are reusing the incoming register, it may already have been // killed in this block. The old kill will also have been inserted at Added: llvm/trunk/test/CodeGen/X86/2010-02-23-SingleDefPhiJoin.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2010-02-23-SingleDefPhiJoin.ll?rev=96994&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/2010-02-23-SingleDefPhiJoin.ll (added) +++ llvm/trunk/test/CodeGen/X86/2010-02-23-SingleDefPhiJoin.ll Tue Feb 23 16:43:58 2010 @@ -0,0 +1,146 @@ +; RUN: llc < %s +; PR6363 +; +; This test case creates a phi join register with a single definition. The other +; predecessor blocks are implicit-def. +; +; If LiveIntervalAnalysis fails to recognize this as a phi join, the coalescer +; will detect an infinity valno loop. +; +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128" +target triple = "x86_64-unknown-linux-gnu" + +define i32 @decode(i8* nocapture %input, i32 %offset, i8* nocapture %output) nounwind { +entry: + br i1 undef, label %meshBB86, label %meshBB102 + +bb: ; preds = %meshBB106, %meshBB102 + br i1 false, label %bb9, label %meshBB90 + +bb.nph: ; preds = %meshBB90 + br label %meshBB114 + +bb.nph.fragment: ; preds = %meshBB114 + br label %meshBB118 + +bb1.fragment: ; preds = %meshBB118 + br i1 false, label %bb2, label %bb3 + +bb2: ; preds = %bb1.fragment + br label %meshBB74 + +bb2.fragment15: ; preds = %meshBB74 + br label %meshBB98 + +bb3: ; preds = %bb1.fragment + br i1 undef, label %meshBB, label %meshBB102 + +bb4: ; preds = %meshBB + br label %meshBB118 + +bb4.fragment: ; preds = %meshBB118 + br label %meshBB82 + +bb5: ; preds = %meshBB102, %meshBB82 + br i1 false, label %bb6, label %bb7 + +bb6: ; preds = %bb5 + br label %bb7 + +bb7: ; preds = %meshBB98, %bb6, %bb5 + br label %meshBB114 + +bb7.fragment: ; preds = %meshBB114 + br i1 undef, label %meshBB74, label %bb9 + +bb9: ; preds = %bb7.fragment, %bb + br label %bb1.i23 + +bb1.i23: ; preds = %meshBB110, %bb9 + br i1 undef, label %meshBB106, label %meshBB110 + +skip_to_newline.exit26: ; preds = %meshBB106 + br label %meshBB86 + +skip_to_newline.exit26.fragment: ; preds = %meshBB86 + br i1 false, label %meshBB90, label %meshBB106 + +bb11.fragment: ; preds = %meshBB90, %meshBB86 + br label %meshBB122 + +bb1.i: ; preds = %meshBB122, %meshBB + %ooffset.2.lcssa.phi.SV.phi203 = phi i32 [ 0, %meshBB122 ], [ %ooffset.2.lcssa.phi.SV.phi233, %meshBB ] ; [#uses=1] + br label %meshBB98 + +bb1.i.fragment: ; preds = %meshBB98 + br i1 undef, label %meshBB78, label %meshBB + +skip_to_newline.exit: ; preds = %meshBB78 + br i1 undef, label %bb12, label %meshBB110 + +bb12: ; preds = %skip_to_newline.exit + br label %meshBB94 + +bb12.fragment: ; preds = %meshBB94 + br i1 false, label %bb13, label %meshBB78 + +bb13: ; preds = %bb12.fragment + br label %meshBB82 + +bb13.fragment: ; preds = %meshBB82 + br i1 undef, label %meshBB94, label %meshBB122 + +bb14: ; preds = %meshBB94 + ret i32 %ooffset.2.lcssa.phi.SV.phi250 + +bb15: ; preds = %meshBB122, %meshBB110, %meshBB78 + unreachable + +meshBB: ; preds = %bb1.i.fragment, %bb3 + %ooffset.2.lcssa.phi.SV.phi233 = phi i32 [ undef, %bb3 ], [ %ooffset.2.lcssa.phi.SV.phi209, %bb1.i.fragment ] ; [#uses=1] + br i1 undef, label %bb1.i, label %bb4 + +meshBB74: ; preds = %bb7.fragment, %bb2 + br i1 false, label %meshBB118, label %bb2.fragment15 + +meshBB78: ; preds = %bb12.fragment, %bb1.i.fragment + %ooffset.2.lcssa.phi.SV.phi239 = phi i32 [ %ooffset.2.lcssa.phi.SV.phi209, %bb1.i.fragment ], [ %ooffset.2.lcssa.phi.SV.phi250, %bb12.fragment ] ; [#uses=1] + br i1 false, label %bb15, label %skip_to_newline.exit + +meshBB82: ; preds = %bb13, %bb4.fragment + br i1 false, label %bb5, label %bb13.fragment + +meshBB86: ; preds = %skip_to_newline.exit26, %entry + br i1 undef, label %skip_to_newline.exit26.fragment, label %bb11.fragment + +meshBB90: ; preds = %skip_to_newline.exit26.fragment, %bb + br i1 false, label %bb11.fragment, label %bb.nph + +meshBB94: ; preds = %bb13.fragment, %bb12 + %ooffset.2.lcssa.phi.SV.phi250 = phi i32 [ 0, %bb13.fragment ], [ %ooffset.2.lcssa.phi.SV.phi239, %bb12 ] ; [#uses=2] + br i1 false, label %bb12.fragment, label %bb14 + +meshBB98: ; preds = %bb1.i, %bb2.fragment15 + %ooffset.2.lcssa.phi.SV.phi209 = phi i32 [ undef, %bb2.fragment15 ], [ %ooffset.2.lcssa.phi.SV.phi203, %bb1.i ] ; [#uses=2] + br i1 undef, label %bb1.i.fragment, label %bb7 + +meshBB102: ; preds = %bb3, %entry + br i1 undef, label %bb5, label %bb + +meshBB106: ; preds = %skip_to_newline.exit26.fragment, %bb1.i23 + br i1 undef, label %bb, label %skip_to_newline.exit26 + +meshBB110: ; preds = %skip_to_newline.exit, %bb1.i23 + br i1 false, label %bb15, label %bb1.i23 + +meshBB114: ; preds = %bb7, %bb.nph + %meshStackVariable115.phi = phi i32 [ 19, %bb7 ], [ 8, %bb.nph ] ; [#uses=0] + br i1 undef, label %bb.nph.fragment, label %bb7.fragment + +meshBB118: ; preds = %meshBB74, %bb4, %bb.nph.fragment + %meshCmp121 = icmp eq i32 undef, 10 ; [#uses=1] + br i1 %meshCmp121, label %bb4.fragment, label %bb1.fragment + +meshBB122: ; preds = %bb13.fragment, %bb11.fragment + br i1 false, label %bb1.i, label %bb15 +} From stoklund at 2pi.dk Tue Feb 23 16:44:02 2010 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Tue, 23 Feb 2010 22:44:02 -0000 Subject: [llvm-commits] [llvm] r96995 - in /llvm/trunk: lib/CodeGen/SimpleRegisterCoalescing.cpp test/CodeGen/X86/2010-02-23-RematImplicitSubreg.ll Message-ID: <20100223224402.721162A6C12D@llvm.org> Author: stoklund Date: Tue Feb 23 16:44:02 2010 New Revision: 96995 URL: http://llvm.org/viewvc/llvm-project?rev=96995&view=rev Log: Remember to handle sub-registers when moving imp-defs to a rematted instruction. Added: llvm/trunk/test/CodeGen/X86/2010-02-23-RematImplicitSubreg.ll Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp?rev=96995&r1=96994&r2=96995&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp (original) +++ llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Tue Feb 23 16:44:02 2010 @@ -702,7 +702,8 @@ for (const unsigned* SR = tri_->getSubRegisters(DstReg); *SR; ++SR) { if (!li_->hasInterval(*SR)) continue; - DLR = li_->getInterval(*SR).getLiveRangeContaining(DefIdx); + const LiveRange *DLR = + li_->getInterval(*SR).getLiveRangeContaining(DefIdx); if (DLR && DLR->valno->getCopy() == CopyMI) DLR->valno->setCopy(0); } @@ -741,9 +742,21 @@ NewMI->addOperand(MO); if (MO.isDef() && li_->hasInterval(MO.getReg())) { unsigned Reg = MO.getReg(); - DLR = li_->getInterval(Reg).getLiveRangeContaining(DefIdx); + const LiveRange *DLR = + li_->getInterval(Reg).getLiveRangeContaining(DefIdx); if (DLR && DLR->valno->getCopy() == CopyMI) DLR->valno->setCopy(0); + // Handle subregs as well + if (TargetRegisterInfo::isPhysicalRegister(Reg)) { + for (const unsigned* SR = tri_->getSubRegisters(Reg); *SR; ++SR) { + if (!li_->hasInterval(*SR)) + continue; + const LiveRange *DLR = + li_->getInterval(*SR).getLiveRangeContaining(DefIdx); + if (DLR && DLR->valno->getCopy() == CopyMI) + DLR->valno->setCopy(0); + } + } } } @@ -752,6 +765,7 @@ CopyMI->eraseFromParent(); ReMatCopies.insert(CopyMI); ReMatDefs.insert(DefMI); + DEBUG(dbgs() << "Remat: " << *NewMI); ++NumReMats; return true; } @@ -1705,6 +1719,7 @@ (AdjustCopiesBackFrom(SrcInt, DstInt, CopyMI) || RemoveCopyByCommutingDef(SrcInt, DstInt, CopyMI))) { JoinedCopies.insert(CopyMI); + DEBUG(dbgs() << "Trivial!\n"); return true; } Added: llvm/trunk/test/CodeGen/X86/2010-02-23-RematImplicitSubreg.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2010-02-23-RematImplicitSubreg.ll?rev=96995&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/2010-02-23-RematImplicitSubreg.ll (added) +++ llvm/trunk/test/CodeGen/X86/2010-02-23-RematImplicitSubreg.ll Tue Feb 23 16:44:02 2010 @@ -0,0 +1,49 @@ +; RUN: llc < %s +; PR6372 +; +; This test produces a move instruction with an implicitly defined super-register: +; +; %DL = MOV8rr %reg1038, %RDX +; +; When %DL is rematerialized, we must remember to update live intervals for +; sub-registers %DX and %EDX. + +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" +target triple = "x86_64-apple-darwin10.0.0" + +define noalias i8* @foo() nounwind ssp { +entry: + br i1 undef, label %for.end, label %for.body + +for.body: ; preds = %if.end40, %entry + %tmp6 = load i8* undef, align 2 ; [#uses=3] + %conv11 = sext i8 %tmp6 to i64 ; [#uses=1] + %cmp15 = icmp slt i64 %conv11, undef ; [#uses=1] + br i1 %cmp15, label %if.end, label %if.then + +if.then: ; preds = %for.body + %conv18 = sext i8 %tmp6 to i32 ; [#uses=1] + %call = tail call i32 (...)* @invalid(i32 0, i32 0, i32 %conv18) nounwind ; [#uses=0] + br label %if.end + +if.end: ; preds = %if.then, %for.body + %index.0 = phi i8 [ 0, %if.then ], [ %tmp6, %for.body ] ; [#uses=1] + store i8 %index.0, i8* undef + %tmp24 = load i8* undef ; [#uses=2] + br i1 undef, label %if.end40, label %if.then36 + +if.then36: ; preds = %if.end + %conv38 = sext i8 %tmp24 to i32 ; [#uses=1] + %call39 = tail call i32 (...)* @invalid(i32 0, i32 0, i32 %conv38) nounwind ; [#uses=0] + br label %if.end40 + +if.end40: ; preds = %if.then36, %if.end + %index.1 = phi i8 [ 0, %if.then36 ], [ %tmp24, %if.end ] ; [#uses=1] + store i8 %index.1, i8* undef + br i1 false, label %for.body, label %for.end + +for.end: ; preds = %if.end40, %entry + ret i8* undef +} + +declare i32 @invalid(...) From clattner at apple.com Tue Feb 23 16:46:51 2010 From: clattner at apple.com (Chris Lattner) Date: Tue, 23 Feb 2010 14:46:51 -0800 Subject: [llvm-commits] [llvm] r96956 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp In-Reply-To: <201002231505.36826.dag@cray.com> References: <20100223173750.3FF1B2A6C12C@llvm.org> <74AF2502-782D-42D3-BD15-EAE4C7CCE6C9@apple.com> <201002231505.36826.dag@cray.com> Message-ID: On Feb 23, 2010, at 1:05 PM, David Greene wrote: > On Tuesday 23 February 2010 11:41:28 Chris Lattner wrote: >> On Feb 23, 2010, at 9:37 AM, David Greene wrote: >>> Author: greened >>> Date: Tue Feb 23 11:37:50 2010 >>> New Revision: 96956 >>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=96956&view=rev >>> Log: >>> >>> Speed up cycle checking significantly by caching results. >> >> Please use a SmallPtrSet instead of std::set, it is much faster for >> pointers. > > Again, this is with debugging enabled, and extra checks on top of that. Stuff > is SLLOOOWW anyway. :) Please fix it anyway. Also, please close http://llvm.org/bugs/show_bug.cgi?id=6405 if have addressed this problem. People do actually care about the speed of checking enabled builds. -Chris From sabre at nondot.org Tue Feb 23 17:01:35 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 23 Feb 2010 23:01:35 -0000 Subject: [llvm-commits] [llvm] r97000 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <20100223230135.B4F822A6C12E@llvm.org> Author: lattner Date: Tue Feb 23 17:01:35 2010 New Revision: 97000 URL: http://llvm.org/viewvc/llvm-project?rev=97000&view=rev Log: make selectnodeto set the nodeid to -1. This makes it more akin to creating a new node then replacing uses. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=97000&r1=96999&r2=97000&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Tue Feb 23 17:01:35 2010 @@ -4553,7 +4553,10 @@ SDNode *SelectionDAG::SelectNodeTo(SDNode *N, unsigned MachineOpc, SDVTList VTs, const SDValue *Ops, unsigned NumOps) { - return MorphNodeTo(N, ~MachineOpc, VTs, Ops, NumOps); + N = MorphNodeTo(N, ~MachineOpc, VTs, Ops, NumOps); + // Reset the NodeID to -1. + N->setNodeId(-1); + return N; } SDNode *SelectionDAG::MorphNodeTo(SDNode *N, unsigned Opc, From dag at cray.com Tue Feb 23 17:27:13 2010 From: dag at cray.com (David Greene) Date: Tue, 23 Feb 2010 17:27:13 -0600 Subject: [llvm-commits] [llvm] r96956 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp In-Reply-To: References: <20100223173750.3FF1B2A6C12C@llvm.org> <201002231505.36826.dag@cray.com> Message-ID: <201002231727.14259.dag@cray.com> On Tuesday 23 February 2010 16:46:51 Chris Lattner wrote: > > Again, this is with debugging enabled, and extra checks on top of that. > > Stuff is SLLOOOWW anyway. :) > > Please fix it anyway. Also, please close: Ok, but realize there is a debugging consequence. Every time we replace a standard data structure with a nonstandard one, we lose the benefit of the libstdc++ debugging mode checks. Generally, my preference is to not optimize unless proven to need so by profiling. But like I said, I'll change it. Actually, one of my long-term TODO things is to get the custom data structures standard-confoming enough that we could replace them with standard components in Debug+Checks mode to get maximal debug checking. > http://llvm.org/bugs/show_bug.cgi?id=6405 if have addressed this problem. > People do actually care about the speed of checking enabled builds. Yep, it's the same issue. This is an extreme case. Using a std::set isn't nearly in the same class. -Dave From daniel at zuster.org Tue Feb 23 17:34:23 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 23 Feb 2010 23:34:23 -0000 Subject: [llvm-commits] [test-suite] r97001 - /test-suite/trunk/MultiSource/Applications/oggenc/oggenc.c Message-ID: <20100223233423.844462A6C12C@llvm.org> Author: ddunbar Date: Tue Feb 23 17:34:23 2010 New Revision: 97001 URL: http://llvm.org/viewvc/llvm-project?rev=97001&view=rev Log: Eliminate some undefined behavior. Modified: test-suite/trunk/MultiSource/Applications/oggenc/oggenc.c Modified: test-suite/trunk/MultiSource/Applications/oggenc/oggenc.c URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Applications/oggenc/oggenc.c?rev=97001&r1=97000&r2=97001&view=diff ============================================================================== --- test-suite/trunk/MultiSource/Applications/oggenc/oggenc.c (original) +++ test-suite/trunk/MultiSource/Applications/oggenc/oggenc.c Tue Feb 23 17:34:23 2010 @@ -1399,8 +1399,7 @@ opt->namefmt = strdup(optarg); break; case 'X': - if(opt->namefmt_remove && opt->namefmt_remove != - DEFAULT_NAMEFMT_REMOVE) + if(opt->namefmt_remove && strcmp(opt->namefmt_remove, DEFAULT_NAMEFMT_REMOVE)) { fprintf(stderr, _("WARNING: Multiple name format filters specified, using final\n")); free(opt->namefmt_remove); From sabre at nondot.org Tue Feb 23 17:47:34 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 23 Feb 2010 23:47:34 -0000 Subject: [llvm-commits] [llvm] r97003 - /llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Message-ID: <20100223234734.6957D2A6C12C@llvm.org> Author: lattner Date: Tue Feb 23 17:47:34 2010 New Revision: 97003 URL: http://llvm.org/viewvc/llvm-project?rev=97003&view=rev Log: fix X86/uint_to_fp-2.ll, only fold loads when they have a single use. Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h?rev=97003&r1=97002&r2=97003&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h (original) +++ llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Tue Feb 23 17:47:34 2010 @@ -618,25 +618,46 @@ // the old nodes. unsigned NumChains = MatcherTable[MatcherIndex++]; assert(NumChains != 0 && "Can't TF zero chains"); + + assert(ChainNodesMatched.empty() && + "Should only have one EmitMergeInputChains per match"); + + // Handle the first chain. + unsigned RecNo = MatcherTable[MatcherIndex++]; + assert(RecNo < RecordedNodes.size() && "Invalid CheckSame"); + ChainNodesMatched.push_back(RecordedNodes[RecNo].getNode()); + + // If the chained node is not the root, we can't fold it if it has + // multiple uses. + // FIXME: What if other value results of the node have uses not matched by + // this pattern? + if (ChainNodesMatched.back() != NodeToMatch && + !RecordedNodes[RecNo].hasOneUse()) { + ChainNodesMatched.clear(); + break; + } // The common case here is that we have exactly one chain, which is really // cheap to handle, just do it. if (NumChains == 1) { - unsigned RecNo = MatcherTable[MatcherIndex++]; - assert(RecNo < RecordedNodes.size() && "Invalid CheckSame"); - ChainNodesMatched.push_back(RecordedNodes[RecNo].getNode()); InputChain = RecordedNodes[RecNo].getOperand(0); assert(InputChain.getValueType() == MVT::Other && "Not a chain"); continue; } // Read all of the chained nodes. - assert(ChainNodesMatched.empty() && - "Should only have one EmitMergeInputChains per match"); - for (unsigned i = 0; i != NumChains; ++i) { - unsigned RecNo = MatcherTable[MatcherIndex++]; + for (unsigned i = 1; i != NumChains; ++i) { + RecNo = MatcherTable[MatcherIndex++]; assert(RecNo < RecordedNodes.size() && "Invalid CheckSame"); ChainNodesMatched.push_back(RecordedNodes[RecNo].getNode()); + + // FIXME: What if other value results of the node have uses not matched by + // this pattern? + if (ChainNodesMatched.back() != NodeToMatch && + !RecordedNodes[RecNo].hasOneUse()) { + ChainNodesMatched.clear(); + break; + } } // Walk all the chained nodes, adding the input chains if they are not in From bob.wilson at apple.com Tue Feb 23 17:53:14 2010 From: bob.wilson at apple.com (Bob Wilson) Date: Tue, 23 Feb 2010 23:53:14 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r97004 - in /llvm-gcc-4.2/trunk: libffi/Makefile.in libgomp/Makefile.in libjava/Makefile.in libmudflap/Makefile.in libssp/Makefile.in Message-ID: <20100223235314.E132E2A6C12C@llvm.org> Author: bwilson Date: Tue Feb 23 17:53:14 2010 New Revision: 97004 URL: http://llvm.org/viewvc/llvm-project?rev=97004&view=rev Log: Revert r96794 (my attempt to fix the apparent race condition in building libgomp). It didn't work. I still don't understand the real problem. Modified: llvm-gcc-4.2/trunk/libffi/Makefile.in llvm-gcc-4.2/trunk/libgomp/Makefile.in llvm-gcc-4.2/trunk/libjava/Makefile.in llvm-gcc-4.2/trunk/libmudflap/Makefile.in llvm-gcc-4.2/trunk/libssp/Makefile.in Modified: llvm-gcc-4.2/trunk/libffi/Makefile.in URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libffi/Makefile.in?rev=97004&r1=97003&r2=97004&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/libffi/Makefile.in (original) +++ llvm-gcc-4.2/trunk/libffi/Makefile.in Tue Feb 23 17:53:14 2010 @@ -872,8 +872,8 @@ .c.lo: @am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`; \ - at am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tplo" -c -o $@ $<; \ - at am__fastdepCC_TRUE@ then mv -f "$$depbase.Tplo" "$$depbase.Plo"; else rm -f "$$depbase.Tplo"; exit 1; fi + at am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \ + at am__fastdepCC_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Plo"; else rm -f "$$depbase.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< Modified: llvm-gcc-4.2/trunk/libgomp/Makefile.in URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libgomp/Makefile.in?rev=97004&r1=97003&r2=97004&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/libgomp/Makefile.in (original) +++ llvm-gcc-4.2/trunk/libgomp/Makefile.in Tue Feb 23 17:53:14 2010 @@ -442,8 +442,8 @@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: - at am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tplo" -c -o $@ $<; \ - at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tplo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tplo"; exit 1; fi + at am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ + at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< Modified: llvm-gcc-4.2/trunk/libjava/Makefile.in URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/Makefile.in?rev=97004&r1=97003&r2=97004&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/libjava/Makefile.in (original) +++ llvm-gcc-4.2/trunk/libjava/Makefile.in Tue Feb 23 17:53:14 2010 @@ -8403,8 +8403,8 @@ .c.lo: @am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`; \ - at am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tplo" -c -o $@ $<; \ - at am__fastdepCC_TRUE@ then mv -f "$$depbase.Tplo" "$$depbase.Plo"; else rm -f "$$depbase.Tplo"; exit 1; fi + at am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \ + at am__fastdepCC_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Plo"; else rm -f "$$depbase.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< @@ -8427,148 +8427,148 @@ .cc.lo: @am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`; \ - at am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tplo" -c -o $@ $<; \ - at am__fastdepCXX_TRUE@ then mv -f "$$depbase.Tplo" "$$depbase.Plo"; else rm -f "$$depbase.Tplo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \ + at am__fastdepCXX_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Plo"; else rm -f "$$depbase.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< gnu/gcj/xlib/lib_gnu_awt_xlib_la-natClip.lo: gnu/gcj/xlib/natClip.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natClip.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natClip.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natClip.lo `test -f 'gnu/gcj/xlib/natClip.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natClip.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natClip.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natClip.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natClip.Tplo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natClip.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natClip.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natClip.lo `test -f 'gnu/gcj/xlib/natClip.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natClip.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natClip.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natClip.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natClip.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natClip.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natClip.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natClip.lo `test -f 'gnu/gcj/xlib/natClip.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natClip.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natColormap.lo: gnu/gcj/xlib/natColormap.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natColormap.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natColormap.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natColormap.lo `test -f 'gnu/gcj/xlib/natColormap.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natColormap.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natColormap.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natColormap.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natColormap.Tplo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natColormap.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natColormap.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natColormap.lo `test -f 'gnu/gcj/xlib/natColormap.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natColormap.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natColormap.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natColormap.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natColormap.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natColormap.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natColormap.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natColormap.lo `test -f 'gnu/gcj/xlib/natColormap.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natColormap.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natDisplay.lo: gnu/gcj/xlib/natDisplay.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natDisplay.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDisplay.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natDisplay.lo `test -f 'gnu/gcj/xlib/natDisplay.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natDisplay.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDisplay.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDisplay.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDisplay.Tplo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natDisplay.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDisplay.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natDisplay.lo `test -f 'gnu/gcj/xlib/natDisplay.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natDisplay.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDisplay.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDisplay.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDisplay.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natDisplay.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natDisplay.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natDisplay.lo `test -f 'gnu/gcj/xlib/natDisplay.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natDisplay.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natDrawable.lo: gnu/gcj/xlib/natDrawable.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natDrawable.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDrawable.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natDrawable.lo `test -f 'gnu/gcj/xlib/natDrawable.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natDrawable.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDrawable.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDrawable.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDrawable.Tplo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natDrawable.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDrawable.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natDrawable.lo `test -f 'gnu/gcj/xlib/natDrawable.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natDrawable.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDrawable.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDrawable.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natDrawable.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natDrawable.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natDrawable.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natDrawable.lo `test -f 'gnu/gcj/xlib/natDrawable.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natDrawable.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natFont.lo: gnu/gcj/xlib/natFont.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natFont.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natFont.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natFont.lo `test -f 'gnu/gcj/xlib/natFont.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natFont.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natFont.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natFont.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natFont.Tplo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natFont.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natFont.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natFont.lo `test -f 'gnu/gcj/xlib/natFont.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natFont.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natFont.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natFont.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natFont.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natFont.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natFont.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natFont.lo `test -f 'gnu/gcj/xlib/natFont.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natFont.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natGC.lo: gnu/gcj/xlib/natGC.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natGC.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natGC.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natGC.lo `test -f 'gnu/gcj/xlib/natGC.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natGC.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natGC.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natGC.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natGC.Tplo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natGC.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natGC.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natGC.lo `test -f 'gnu/gcj/xlib/natGC.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natGC.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natGC.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natGC.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natGC.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natGC.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natGC.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natGC.lo `test -f 'gnu/gcj/xlib/natGC.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natGC.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natPixmap.lo: gnu/gcj/xlib/natPixmap.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natPixmap.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natPixmap.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natPixmap.lo `test -f 'gnu/gcj/xlib/natPixmap.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natPixmap.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natPixmap.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natPixmap.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natPixmap.Tplo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natPixmap.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natPixmap.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natPixmap.lo `test -f 'gnu/gcj/xlib/natPixmap.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natPixmap.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natPixmap.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natPixmap.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natPixmap.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natPixmap.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natPixmap.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natPixmap.lo `test -f 'gnu/gcj/xlib/natPixmap.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natPixmap.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natScreen.lo: gnu/gcj/xlib/natScreen.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natScreen.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natScreen.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natScreen.lo `test -f 'gnu/gcj/xlib/natScreen.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natScreen.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natScreen.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natScreen.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natScreen.Tplo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natScreen.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natScreen.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natScreen.lo `test -f 'gnu/gcj/xlib/natScreen.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natScreen.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natScreen.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natScreen.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natScreen.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natScreen.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natScreen.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natScreen.lo `test -f 'gnu/gcj/xlib/natScreen.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natScreen.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natVisual.lo: gnu/gcj/xlib/natVisual.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natVisual.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natVisual.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natVisual.lo `test -f 'gnu/gcj/xlib/natVisual.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natVisual.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natVisual.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natVisual.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natVisual.Tplo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natVisual.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natVisual.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natVisual.lo `test -f 'gnu/gcj/xlib/natVisual.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natVisual.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natVisual.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natVisual.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natVisual.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natVisual.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natVisual.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natVisual.lo `test -f 'gnu/gcj/xlib/natVisual.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natVisual.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWMSizeHints.lo: gnu/gcj/xlib/natWMSizeHints.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWMSizeHints.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWMSizeHints.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWMSizeHints.lo `test -f 'gnu/gcj/xlib/natWMSizeHints.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natWMSizeHints.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWMSizeHints.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWMSizeHints.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWMSizeHints.Tplo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWMSizeHints.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWMSizeHints.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWMSizeHints.lo `test -f 'gnu/gcj/xlib/natWMSizeHints.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natWMSizeHints.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWMSizeHints.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWMSizeHints.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWMSizeHints.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natWMSizeHints.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWMSizeHints.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWMSizeHints.lo `test -f 'gnu/gcj/xlib/natWMSizeHints.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natWMSizeHints.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWindow.lo: gnu/gcj/xlib/natWindow.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWindow.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindow.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWindow.lo `test -f 'gnu/gcj/xlib/natWindow.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natWindow.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindow.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindow.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindow.Tplo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWindow.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindow.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWindow.lo `test -f 'gnu/gcj/xlib/natWindow.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natWindow.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindow.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindow.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindow.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natWindow.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWindow.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWindow.lo `test -f 'gnu/gcj/xlib/natWindow.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natWindow.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWindowAttributes.lo: gnu/gcj/xlib/natWindowAttributes.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWindowAttributes.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindowAttributes.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWindowAttributes.lo `test -f 'gnu/gcj/xlib/natWindowAttributes.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natWindowAttributes.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindowAttributes.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindowAttributes.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindowAttributes.Tplo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWindowAttributes.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindowAttributes.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWindowAttributes.lo `test -f 'gnu/gcj/xlib/natWindowAttributes.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natWindowAttributes.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindowAttributes.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindowAttributes.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natWindowAttributes.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natWindowAttributes.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWindowAttributes.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natWindowAttributes.lo `test -f 'gnu/gcj/xlib/natWindowAttributes.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natWindowAttributes.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXAnyEvent.lo: gnu/gcj/xlib/natXAnyEvent.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXAnyEvent.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXAnyEvent.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXAnyEvent.lo `test -f 'gnu/gcj/xlib/natXAnyEvent.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXAnyEvent.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXAnyEvent.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXAnyEvent.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXAnyEvent.Tplo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXAnyEvent.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXAnyEvent.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXAnyEvent.lo `test -f 'gnu/gcj/xlib/natXAnyEvent.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXAnyEvent.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXAnyEvent.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXAnyEvent.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXAnyEvent.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natXAnyEvent.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXAnyEvent.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXAnyEvent.lo `test -f 'gnu/gcj/xlib/natXAnyEvent.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXAnyEvent.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXButtonEvent.lo: gnu/gcj/xlib/natXButtonEvent.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXButtonEvent.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXButtonEvent.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXButtonEvent.lo `test -f 'gnu/gcj/xlib/natXButtonEvent.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXButtonEvent.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXButtonEvent.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXButtonEvent.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXButtonEvent.Tplo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXButtonEvent.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXButtonEvent.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXButtonEvent.lo `test -f 'gnu/gcj/xlib/natXButtonEvent.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXButtonEvent.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXButtonEvent.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXButtonEvent.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXButtonEvent.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natXButtonEvent.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXButtonEvent.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXButtonEvent.lo `test -f 'gnu/gcj/xlib/natXButtonEvent.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXButtonEvent.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXColor.lo: gnu/gcj/xlib/natXColor.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXColor.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXColor.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXColor.lo `test -f 'gnu/gcj/xlib/natXColor.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXColor.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXColor.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXColor.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXColor.Tplo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXColor.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXColor.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXColor.lo `test -f 'gnu/gcj/xlib/natXColor.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXColor.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXColor.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXColor.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXColor.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natXColor.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXColor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXColor.lo `test -f 'gnu/gcj/xlib/natXColor.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXColor.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXConfigureEvent.lo: gnu/gcj/xlib/natXConfigureEvent.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXConfigureEvent.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXConfigureEvent.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXConfigureEvent.lo `test -f 'gnu/gcj/xlib/natXConfigureEvent.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXConfigureEvent.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXConfigureEvent.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXConfigureEvent.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXConfigureEvent.Tplo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXConfigureEvent.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXConfigureEvent.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXConfigureEvent.lo `test -f 'gnu/gcj/xlib/natXConfigureEvent.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXConfigureEvent.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXConfigureEvent.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXConfigureEvent.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXConfigureEvent.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natXConfigureEvent.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXConfigureEvent.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXConfigureEvent.lo `test -f 'gnu/gcj/xlib/natXConfigureEvent.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXConfigureEvent.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXException.lo: gnu/gcj/xlib/natXException.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXException.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXException.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXException.lo `test -f 'gnu/gcj/xlib/natXException.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXException.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXException.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXException.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXException.Tplo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXException.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXException.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXException.lo `test -f 'gnu/gcj/xlib/natXException.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXException.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXException.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXException.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXException.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natXException.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXException.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXException.lo `test -f 'gnu/gcj/xlib/natXException.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXException.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXExposeEvent.lo: gnu/gcj/xlib/natXExposeEvent.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXExposeEvent.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXExposeEvent.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXExposeEvent.lo `test -f 'gnu/gcj/xlib/natXExposeEvent.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXExposeEvent.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXExposeEvent.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXExposeEvent.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXExposeEvent.Tplo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXExposeEvent.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXExposeEvent.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXExposeEvent.lo `test -f 'gnu/gcj/xlib/natXExposeEvent.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXExposeEvent.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXExposeEvent.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXExposeEvent.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXExposeEvent.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natXExposeEvent.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXExposeEvent.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXExposeEvent.lo `test -f 'gnu/gcj/xlib/natXExposeEvent.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXExposeEvent.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXImage.lo: gnu/gcj/xlib/natXImage.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXImage.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXImage.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXImage.lo `test -f 'gnu/gcj/xlib/natXImage.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXImage.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXImage.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXImage.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXImage.Tplo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXImage.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXImage.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXImage.lo `test -f 'gnu/gcj/xlib/natXImage.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXImage.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXImage.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXImage.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXImage.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natXImage.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXImage.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXImage.lo `test -f 'gnu/gcj/xlib/natXImage.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXImage.cc gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXUnmapEvent.lo: gnu/gcj/xlib/natXUnmapEvent.cc - at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXUnmapEvent.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXUnmapEvent.Tplo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXUnmapEvent.lo `test -f 'gnu/gcj/xlib/natXUnmapEvent.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXUnmapEvent.cc; \ - at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXUnmapEvent.Tplo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXUnmapEvent.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXUnmapEvent.Tplo"; exit 1; fi + at am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXUnmapEvent.lo -MD -MP -MF "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXUnmapEvent.Tpo" -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXUnmapEvent.lo `test -f 'gnu/gcj/xlib/natXUnmapEvent.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXUnmapEvent.cc; \ + at am__fastdepCXX_TRUE@ then mv -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXUnmapEvent.Tpo" "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXUnmapEvent.Plo"; else rm -f "gnu/gcj/xlib/$(DEPDIR)/lib_gnu_awt_xlib_la-natXUnmapEvent.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='gnu/gcj/xlib/natXUnmapEvent.cc' object='gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXUnmapEvent.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_gnu_awt_xlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gnu/gcj/xlib/lib_gnu_awt_xlib_la-natXUnmapEvent.lo `test -f 'gnu/gcj/xlib/natXUnmapEvent.cc' || echo '$(srcdir)/'`gnu/gcj/xlib/natXUnmapEvent.cc @@ -8591,15 +8591,15 @@ .jar.lo: @am__fastdepGCJ_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`; \ - at am__fastdepGCJ_TRUE@ if $(LTGCJCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tplo" -c -o $@ $<; \ - at am__fastdepGCJ_TRUE@ then mv -f "$$depbase.Tplo" "$$depbase.Plo"; else rm -f "$$depbase.Tplo"; exit 1; fi + at am__fastdepGCJ_TRUE@ if $(LTGCJCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \ + at am__fastdepGCJ_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Plo"; else rm -f "$$depbase.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepGCJ_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepGCJ_FALSE@ DEPDIR=$(DEPDIR) $(GCJDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepGCJ_FALSE@ $(LTGCJCOMPILE) -c -o $@ $< classpath/tools/libgcj_tools_la-tools.lo: classpath/tools/tools.jar - at am__fastdepGCJ_TRUE@ if $(LIBTOOL) --mode=compile $(GCJ) $(libgcj_tools_la_GCJFLAGS) $(GCJFLAGS) -MT classpath/tools/libgcj_tools_la-tools.lo -MD -MP -MF "classpath/tools/$(DEPDIR)/libgcj_tools_la-tools.Tplo" -c -o classpath/tools/libgcj_tools_la-tools.lo `test -f 'classpath/tools/tools.jar' || echo '$(srcdir)/'`classpath/tools/tools.jar; \ - at am__fastdepGCJ_TRUE@ then mv -f "classpath/tools/$(DEPDIR)/libgcj_tools_la-tools.Tplo" "classpath/tools/$(DEPDIR)/libgcj_tools_la-tools.Plo"; else rm -f "classpath/tools/$(DEPDIR)/libgcj_tools_la-tools.Tplo"; exit 1; fi + at am__fastdepGCJ_TRUE@ if $(LIBTOOL) --mode=compile $(GCJ) $(libgcj_tools_la_GCJFLAGS) $(GCJFLAGS) -MT classpath/tools/libgcj_tools_la-tools.lo -MD -MP -MF "classpath/tools/$(DEPDIR)/libgcj_tools_la-tools.Tpo" -c -o classpath/tools/libgcj_tools_la-tools.lo `test -f 'classpath/tools/tools.jar' || echo '$(srcdir)/'`classpath/tools/tools.jar; \ + at am__fastdepGCJ_TRUE@ then mv -f "classpath/tools/$(DEPDIR)/libgcj_tools_la-tools.Tpo" "classpath/tools/$(DEPDIR)/libgcj_tools_la-tools.Plo"; else rm -f "classpath/tools/$(DEPDIR)/libgcj_tools_la-tools.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepGCJ_FALSE@ source='classpath/tools/tools.jar' object='classpath/tools/libgcj_tools_la-tools.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepGCJ_FALSE@ DEPDIR=$(DEPDIR) $(GCJDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepGCJ_FALSE@ $(LIBTOOL) --mode=compile $(GCJ) $(libgcj_tools_la_GCJFLAGS) $(GCJFLAGS) -c -o classpath/tools/libgcj_tools_la-tools.lo `test -f 'classpath/tools/tools.jar' || echo '$(srcdir)/'`classpath/tools/tools.jar @@ -8622,8 +8622,8 @@ .java.lo: @am__fastdepGCJ_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`; \ - at am__fastdepGCJ_TRUE@ if $(LTGCJCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tplo" -c -o $@ $<; \ - at am__fastdepGCJ_TRUE@ then mv -f "$$depbase.Tplo" "$$depbase.Plo"; else rm -f "$$depbase.Tplo"; exit 1; fi + at am__fastdepGCJ_TRUE@ if $(LTGCJCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \ + at am__fastdepGCJ_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Plo"; else rm -f "$$depbase.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepGCJ_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepGCJ_FALSE@ DEPDIR=$(DEPDIR) $(GCJDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepGCJ_FALSE@ $(LTGCJCOMPILE) -c -o $@ $< Modified: llvm-gcc-4.2/trunk/libmudflap/Makefile.in URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libmudflap/Makefile.in?rev=97004&r1=97003&r2=97004&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/libmudflap/Makefile.in (original) +++ llvm-gcc-4.2/trunk/libmudflap/Makefile.in Tue Feb 23 17:53:14 2010 @@ -410,8 +410,8 @@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: - at am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tplo" -c -o $@ $<; \ - at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tplo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tplo"; exit 1; fi + at am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ + at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< Modified: llvm-gcc-4.2/trunk/libssp/Makefile.in URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libssp/Makefile.in?rev=97004&r1=97003&r2=97004&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/libssp/Makefile.in (original) +++ llvm-gcc-4.2/trunk/libssp/Makefile.in Tue Feb 23 17:53:14 2010 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile.in generated by automake 1.9.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -15,6 +15,8 @@ @SET_MAKE@ +SOURCES = $(libssp_la_SOURCES) $(libssp_nonshared_la_SOURCES) + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -51,7 +53,6 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ $(top_srcdir)/../config/depstand.m4 \ $(top_srcdir)/../config/lead-dot.m4 \ - $(top_srcdir)/../config/multi.m4 \ $(top_srcdir)/../config/no-executables.m4 \ $(top_srcdir)/../libtool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -414,15 +415,15 @@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: - at am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tplo" -c -o $@ $<; \ - at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tplo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tplo"; exit 1; fi + at am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ + at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libssp_nonshared_la-ssp-local.lo: ssp-local.c - at am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libssp_nonshared_la_CFLAGS) $(CFLAGS) -MT libssp_nonshared_la-ssp-local.lo -MD -MP -MF "$(DEPDIR)/libssp_nonshared_la-ssp-local.Tplo" -c -o libssp_nonshared_la-ssp-local.lo `test -f 'ssp-local.c' || echo '$(srcdir)/'`ssp-local.c; \ - at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libssp_nonshared_la-ssp-local.Tplo" "$(DEPDIR)/libssp_nonshared_la-ssp-local.Plo"; else rm -f "$(DEPDIR)/libssp_nonshared_la-ssp-local.Tplo"; exit 1; fi + at am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libssp_nonshared_la_CFLAGS) $(CFLAGS) -MT libssp_nonshared_la-ssp-local.lo -MD -MP -MF "$(DEPDIR)/libssp_nonshared_la-ssp-local.Tpo" -c -o libssp_nonshared_la-ssp-local.lo `test -f 'ssp-local.c' || echo '$(srcdir)/'`ssp-local.c; \ + at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libssp_nonshared_la-ssp-local.Tpo" "$(DEPDIR)/libssp_nonshared_la-ssp-local.Plo"; else rm -f "$(DEPDIR)/libssp_nonshared_la-ssp-local.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ssp-local.c' object='libssp_nonshared_la-ssp-local.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libssp_nonshared_la_CFLAGS) $(CFLAGS) -c -o libssp_nonshared_la-ssp-local.lo `test -f 'ssp-local.c' || echo '$(srcdir)/'`ssp-local.c From stoklund at 2pi.dk Tue Feb 23 18:39:35 2010 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Wed, 24 Feb 2010 00:39:35 -0000 Subject: [llvm-commits] [llvm] r97006 - in /llvm/trunk: lib/Target/X86/X86InstrInfo.td test/CodeGen/X86/2010-02-23-DIV8rDefinesAX.ll Message-ID: <20100224003935.D23A12A6C12C@llvm.org> Author: stoklund Date: Tue Feb 23 18:39:35 2010 New Revision: 97006 URL: http://llvm.org/viewvc/llvm-project?rev=97006&view=rev Log: DIV8r must define %AX since X86DAGToDAGISel::Select() sometimes uses it instead of %AL/%AH. Added: llvm/trunk/test/CodeGen/X86/2010-02-23-DIV8rDefinesAX.ll Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=97006&r1=97005&r2=97006&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Tue Feb 23 18:39:35 2010 @@ -1156,7 +1156,7 @@ } // neverHasSideEffects // unsigned division/remainder -let Defs = [AL,AH,EFLAGS], Uses = [AX] in +let Defs = [AX,EFLAGS], Uses = [AX] in def DIV8r : I<0xF6, MRM6r, (outs), (ins GR8:$src), // AX/r8 = AL,AH "div{b}\t$src", []>; let Defs = [AX,DX,EFLAGS], Uses = [AX,DX] in Added: llvm/trunk/test/CodeGen/X86/2010-02-23-DIV8rDefinesAX.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2010-02-23-DIV8rDefinesAX.ll?rev=97006&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/2010-02-23-DIV8rDefinesAX.ll (added) +++ llvm/trunk/test/CodeGen/X86/2010-02-23-DIV8rDefinesAX.ll Tue Feb 23 18:39:35 2010 @@ -0,0 +1,20 @@ +; RUN: llc < %s +; PR6374 +; +; This test produces a DIV8r instruction and uses %AX instead of %AH and %AL. +; The DIV8r must have the right imp-defs for that to work. +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" +target triple = "x86_64-apple-darwin10.0.0" + +%struct._i386_state = type { %union.anon } +%union.anon = type { [0 x i8] } + +define void @i386_aam(%struct._i386_state* nocapture %cpustate) nounwind ssp { +entry: + %call = tail call fastcc signext i8 @FETCH() ; [#uses=1] + %rem = urem i8 0, %call ; [#uses=1] + store i8 %rem, i8* undef + ret void +} + +declare fastcc signext i8 @FETCH() nounwind readnone ssp From nicolas.geoffray at lip6.fr Tue Feb 23 13:42:44 2010 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Tue, 23 Feb 2010 19:42:44 -0000 Subject: [llvm-commits] [llvm] r96977 - /llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp Message-ID: <20100223194244.C3E892A6C12C@llvm.org> Author: geoffray Date: Tue Feb 23 13:42:44 2010 New Revision: 96977 URL: http://llvm.org/viewvc/llvm-project?rev=96977&view=rev Log: Use the module's context instead of the global context. Modified: llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp Modified: llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp?rev=96977&r1=96976&r2=96977&view=diff ============================================================================== --- llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp (original) +++ llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp Tue Feb 23 13:42:44 2010 @@ -221,7 +221,7 @@ APFloat APF = APFloat(CFP->getValueAPF()); // copy if (CFP->getType() == Type::getFloatTy(CFP->getContext())) APF.convert(APFloat::IEEEdouble, APFloat::rmNearestTiesToEven, &ignored); - Out << "ConstantFP::get(getGlobalContext(), "; + Out << "ConstantFP::get(mod->getContext(), "; Out << "APFloat("; #if HAVE_PRINTF_A char Buffer[100]; @@ -346,21 +346,21 @@ // First, handle the primitive types .. easy if (Ty->isPrimitiveType() || Ty->isIntegerTy()) { switch (Ty->getTypeID()) { - case Type::VoidTyID: return "Type::getVoidTy(getGlobalContext())"; + case Type::VoidTyID: return "Type::getVoidTy(mod->getContext())"; case Type::IntegerTyID: { unsigned BitWidth = cast(Ty)->getBitWidth(); - return "IntegerType::get(getGlobalContext(), " + utostr(BitWidth) + ")"; + return "IntegerType::get(mod->getContext(), " + utostr(BitWidth) + ")"; } - case Type::X86_FP80TyID: return "Type::getX86_FP80Ty(getGlobalContext())"; - case Type::FloatTyID: return "Type::getFloatTy(getGlobalContext())"; - case Type::DoubleTyID: return "Type::getDoubleTy(getGlobalContext())"; - case Type::LabelTyID: return "Type::getLabelTy(getGlobalContext())"; + case Type::X86_FP80TyID: return "Type::getX86_FP80Ty(mod->getContext())"; + case Type::FloatTyID: return "Type::getFloatTy(mod->getContext())"; + case Type::DoubleTyID: return "Type::getDoubleTy(mod->getContext())"; + case Type::LabelTyID: return "Type::getLabelTy(mod->getContext())"; default: error("Invalid primitive type"); break; } // shouldn't be returned, but make it sensible - return "Type::getVoidTy(getGlobalContext())"; + return "Type::getVoidTy(mod->getContext())"; } // Now, see if we've seen the type before and return that @@ -514,7 +514,7 @@ TypeMap::const_iterator I = UnresolvedTypes.find(Ty); if (I == UnresolvedTypes.end()) { Out << "PATypeHolder " << typeName; - Out << "_fwd = OpaqueType::get(getGlobalContext());"; + Out << "_fwd = OpaqueType::get(mod->getContext());"; nl(Out); UnresolvedTypes[Ty] = typeName; } @@ -615,7 +615,7 @@ } case Type::OpaqueTyID: { Out << "OpaqueType* " << typeName; - Out << " = OpaqueType::get(getGlobalContext());"; + Out << " = OpaqueType::get(mod->getContext());"; nl(Out); break; } @@ -751,7 +751,7 @@ if (const ConstantInt *CI = dyn_cast(CV)) { std::string constValue = CI->getValue().toString(10, true); Out << "ConstantInt* " << constName - << " = ConstantInt::get(getGlobalContext(), APInt(" + << " = ConstantInt::get(mod->getContext(), APInt(" << cast(CI->getType())->getBitWidth() << ", StringRef(\"" << constValue << "\"), 10));"; } else if (isa(CV)) { @@ -769,7 +769,7 @@ CA->getType()->getElementType() == Type::getInt8Ty(CA->getContext())) { Out << "Constant* " << constName << - " = ConstantArray::get(getGlobalContext(), \""; + " = ConstantArray::get(mod->getContext(), \""; std::string tmp = CA->getAsString(); bool nullTerminate = false; if (tmp[tmp.length()-1] == 0) { @@ -995,7 +995,7 @@ void CppWriter::printVariableHead(const GlobalVariable *GV) { nl(Out) << "GlobalVariable* " << getCppName(GV); if (is_inline) { - Out << " = mod->getGlobalVariable(getGlobalContext(), "; + Out << " = mod->getGlobalVariable(mod->getContext(), "; printEscapedString(GV->getName()); Out << ", " << getCppName(GV->getType()->getElementType()) << ",true)"; nl(Out) << "if (!" << getCppName(GV) << ") {"; @@ -1094,7 +1094,7 @@ case Instruction::Ret: { const ReturnInst* ret = cast(I); - Out << "ReturnInst::Create(getGlobalContext(), " + Out << "ReturnInst::Create(mod->getContext(), " << (ret->getReturnValue() ? opNames[0] + ", " : "") << bbname << ");"; break; } @@ -1171,7 +1171,7 @@ } case Instruction::Unreachable: { Out << "new UnreachableInst(" - << "getGlobalContext(), " + << "mod->getContext(), " << bbname << ");"; break; } @@ -1673,7 +1673,7 @@ BI != BE; ++BI) { std::string bbname(getCppName(BI)); Out << "BasicBlock* " << bbname << - " = BasicBlock::Create(getGlobalContext(), \""; + " = BasicBlock::Create(mod->getContext(), \""; if (BI->hasName()) printEscapedString(BI->getName()); Out << "\"," << getCppName(BI->getParent()) << ",0);"; From dalej at apple.com Tue Feb 23 19:22:54 2010 From: dalej at apple.com (Dale Johannesen) Date: Wed, 24 Feb 2010 01:22:54 -0000 Subject: [llvm-commits] [test-suite] r97007 - in /test-suite/trunk/SingleSource: Benchmarks/Misc/Makefile UnitTests/Makefile Message-ID: <20100224012254.9796E2A6C12C@llvm.org> Author: johannes Date: Tue Feb 23 19:22:54 2010 New Revision: 97007 URL: http://llvm.org/viewvc/llvm-project?rev=97007&view=rev Log: Disable some tests on PPC Darwin that are never going to work. Modified: test-suite/trunk/SingleSource/Benchmarks/Misc/Makefile test-suite/trunk/SingleSource/UnitTests/Makefile Modified: test-suite/trunk/SingleSource/Benchmarks/Misc/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Misc/Makefile?rev=97007&r1=97006&r2=97007&view=diff ============================================================================== --- test-suite/trunk/SingleSource/Benchmarks/Misc/Makefile (original) +++ test-suite/trunk/SingleSource/Benchmarks/Misc/Makefile Tue Feb 23 19:22:54 2010 @@ -2,4 +2,13 @@ LDFLAGS += -lm FP_TOLERANCE := 0.001 +include $(LEVEL)/Makefile.config + +# dt uses posix_memalign, which doesn't exist on PPC darwin. +ifeq ($(ARCH),PowerPC) +ifeq ($(TARGET_OS),Darwin) +PROGRAMS_TO_SKIP := dt +endif +endif + include $(LEVEL)/SingleSource/Makefile.singlesrc Modified: test-suite/trunk/SingleSource/UnitTests/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/Makefile?rev=97007&r1=97006&r2=97007&view=diff ============================================================================== --- test-suite/trunk/SingleSource/UnitTests/Makefile (original) +++ test-suite/trunk/SingleSource/UnitTests/Makefile Tue Feb 23 19:22:54 2010 @@ -25,6 +25,11 @@ # framework. ifeq ($(TARGET_OS),Darwin) PROGRAMS_TO_SKIP := 2007-04-25-weak +# The gcc on Darwin PPC doesn't support atomic ops, so we can't test them in this +# framework (even though they work OK in llvm). +ifeq ($(ARCH),PowerPC) +PROGRAMS_TO_SKIP += AtomicOps +endif endif PROGRAM_REQUIRED_TO_EXIT_OK := 1 From bob.wilson at apple.com Tue Feb 23 19:39:00 2010 From: bob.wilson at apple.com (Bob Wilson) Date: Wed, 24 Feb 2010 01:39:00 -0000 Subject: [llvm-commits] [llvm] r97010 - in /llvm/trunk: include/llvm/Analysis/PHITransAddr.h lib/Analysis/MemoryDependenceAnalysis.cpp lib/Analysis/PHITransAddr.cpp lib/Transforms/Scalar/GVN.cpp Message-ID: <20100224013900.E5AB62A6C12C@llvm.org> Author: bwilson Date: Tue Feb 23 19:39:00 2010 New Revision: 97010 URL: http://llvm.org/viewvc/llvm-project?rev=97010&view=rev Log: Add an argument to PHITranslateValue to specify the DominatorTree. If this argument is non-null, pass it along to PHITranslateSubExpr so that it can prefer using existing values that dominate the PredBB, instead of just blindly picking the first equivalent value that it finds on a uselist. Also when the DominatorTree is specified, have PHITranslateValue filter out any result that does not dominate the PredBB. This is basically just refactoring the check that used to be in GetAvailablePHITranslatedSubExpr and also in GVN. Despite my initial expectations, this change does not affect the results of GVN for any testcases that I could find, but it should help compile time. Before this change, if PHITranslateSubExpr picked a value that does not dominate, PHITranslateWithInsertion would then insert a new value, which GVN would later determine to be redundant and would replace. By picking a good value to begin with, we save GVN the extra work of inserting and then replacing a new value. Modified: llvm/trunk/include/llvm/Analysis/PHITransAddr.h llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp llvm/trunk/lib/Analysis/PHITransAddr.cpp llvm/trunk/lib/Transforms/Scalar/GVN.cpp Modified: llvm/trunk/include/llvm/Analysis/PHITransAddr.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/PHITransAddr.h?rev=97010&r1=97009&r2=97010&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/PHITransAddr.h (original) +++ llvm/trunk/include/llvm/Analysis/PHITransAddr.h Tue Feb 23 19:39:00 2010 @@ -66,9 +66,11 @@ bool IsPotentiallyPHITranslatable() const; /// PHITranslateValue - PHI translate the current address up the CFG from - /// CurBB to Pred, updating our state the reflect any needed changes. This - /// returns true on failure and sets Addr to null. - bool PHITranslateValue(BasicBlock *CurBB, BasicBlock *PredBB); + /// CurBB to Pred, updating our state to reflect any needed changes. If the + /// dominator tree DT is non-null, the translated value must dominate + /// PredBB. This returns true on failure and sets Addr to null. + bool PHITranslateValue(BasicBlock *CurBB, BasicBlock *PredBB, + const DominatorTree *DT); /// PHITranslateWithInsertion - PHI translate this value into the specified /// predecessor block, inserting a computation of the value if it is @@ -88,14 +90,8 @@ /// returns false. bool Verify() const; private: - Value *PHITranslateSubExpr(Value *V, BasicBlock *CurBB, BasicBlock *PredBB); - - - /// GetAvailablePHITranslatedSubExpr - Return the value computed by - /// PHITranslateSubExpr if it dominates PredBB, otherwise return null. - Value *GetAvailablePHITranslatedSubExpr(Value *V, - BasicBlock *CurBB, BasicBlock *PredBB, - const DominatorTree &DT) const; + Value *PHITranslateSubExpr(Value *V, BasicBlock *CurBB, BasicBlock *PredBB, + const DominatorTree *DT); /// InsertPHITranslatedSubExpr - Insert a computation of the PHI translated /// version of 'V' for the edge PredBB->CurBB into the end of the PredBB Modified: llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp?rev=97010&r1=97009&r2=97010&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp (original) +++ llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp Tue Feb 23 19:39:00 2010 @@ -861,7 +861,7 @@ // Get the PHI translated pointer in this predecessor. This can fail if // not translatable, in which case the getAddr() returns null. PHITransAddr PredPointer(Pointer); - PredPointer.PHITranslateValue(BB, Pred); + PredPointer.PHITranslateValue(BB, Pred, 0); Value *PredPtrVal = PredPointer.getAddr(); Modified: llvm/trunk/lib/Analysis/PHITransAddr.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/PHITransAddr.cpp?rev=97010&r1=97009&r2=97010&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/PHITransAddr.cpp (original) +++ llvm/trunk/lib/Analysis/PHITransAddr.cpp Tue Feb 23 19:39:00 2010 @@ -134,7 +134,8 @@ } Value *PHITransAddr::PHITranslateSubExpr(Value *V, BasicBlock *CurBB, - BasicBlock *PredBB) { + BasicBlock *PredBB, + const DominatorTree *DT) { // If this is a non-instruction value, it can't require PHI translation. Instruction *Inst = dyn_cast(V); if (Inst == 0) return V; @@ -177,7 +178,7 @@ // operands need to be phi translated, and if so, reconstruct it. if (BitCastInst *BC = dyn_cast(Inst)) { - Value *PHIIn = PHITranslateSubExpr(BC->getOperand(0), CurBB, PredBB); + Value *PHIIn = PHITranslateSubExpr(BC->getOperand(0), CurBB, PredBB, DT); if (PHIIn == 0) return 0; if (PHIIn == BC->getOperand(0)) return BC; @@ -193,7 +194,8 @@ for (Value::use_iterator UI = PHIIn->use_begin(), E = PHIIn->use_end(); UI != E; ++UI) { if (BitCastInst *BCI = dyn_cast(*UI)) - if (BCI->getType() == BC->getType()) + if (BCI->getType() == BC->getType() && + (!DT || DT->dominates(BCI->getParent(), PredBB))) return BCI; } return 0; @@ -204,7 +206,7 @@ SmallVector GEPOps; bool AnyChanged = false; for (unsigned i = 0, e = GEP->getNumOperands(); i != e; ++i) { - Value *GEPOp = PHITranslateSubExpr(GEP->getOperand(i), CurBB, PredBB); + Value *GEPOp = PHITranslateSubExpr(GEP->getOperand(i), CurBB, PredBB, DT); if (GEPOp == 0) return 0; AnyChanged |= GEPOp != GEP->getOperand(i); @@ -229,7 +231,8 @@ if (GetElementPtrInst *GEPI = dyn_cast(*UI)) if (GEPI->getType() == GEP->getType() && GEPI->getNumOperands() == GEPOps.size() && - GEPI->getParent()->getParent() == CurBB->getParent()) { + GEPI->getParent()->getParent() == CurBB->getParent() && + (!DT || DT->dominates(GEPI->getParent(), PredBB))) { bool Mismatch = false; for (unsigned i = 0, e = GEPOps.size(); i != e; ++i) if (GEPI->getOperand(i) != GEPOps[i]) { @@ -251,7 +254,7 @@ bool isNSW = cast(Inst)->hasNoSignedWrap(); bool isNUW = cast(Inst)->hasNoUnsignedWrap(); - Value *LHS = PHITranslateSubExpr(Inst->getOperand(0), CurBB, PredBB); + Value *LHS = PHITranslateSubExpr(Inst->getOperand(0), CurBB, PredBB, DT); if (LHS == 0) return 0; // If the PHI translated LHS is an add of a constant, fold the immediates. @@ -287,7 +290,8 @@ if (BinaryOperator *BO = dyn_cast(*UI)) if (BO->getOpcode() == Instruction::Add && BO->getOperand(0) == LHS && BO->getOperand(1) == RHS && - BO->getParent()->getParent() == CurBB->getParent()) + BO->getParent()->getParent() == CurBB->getParent() && + (!DT || DT->dominates(BO->getParent(), PredBB))) return BO; } @@ -300,33 +304,24 @@ /// PHITranslateValue - PHI translate the current address up the CFG from -/// CurBB to Pred, updating our state the reflect any needed changes. This -/// returns true on failure and sets Addr to null. -bool PHITransAddr::PHITranslateValue(BasicBlock *CurBB, BasicBlock *PredBB) { +/// CurBB to Pred, updating our state to reflect any needed changes. If the +/// dominator tree DT is non-null, the translated value must dominate +/// PredBB. This returns true on failure and sets Addr to null. +bool PHITransAddr::PHITranslateValue(BasicBlock *CurBB, BasicBlock *PredBB, + const DominatorTree *DT) { assert(Verify() && "Invalid PHITransAddr!"); - Addr = PHITranslateSubExpr(Addr, CurBB, PredBB); + Addr = PHITranslateSubExpr(Addr, CurBB, PredBB, DT); assert(Verify() && "Invalid PHITransAddr!"); - return Addr == 0; -} -/// GetAvailablePHITranslatedSubExpr - Return the value computed by -/// PHITranslateSubExpr if it dominates PredBB, otherwise return null. -Value *PHITransAddr:: -GetAvailablePHITranslatedSubExpr(Value *V, BasicBlock *CurBB,BasicBlock *PredBB, - const DominatorTree &DT) const { - PHITransAddr Tmp(V, TD); - Tmp.PHITranslateValue(CurBB, PredBB); - - // See if PHI translation succeeds. - V = Tmp.getAddr(); - - // Make sure the value is live in the predecessor. - if (Instruction *Inst = dyn_cast_or_null(V)) - if (!DT.dominates(Inst->getParent(), PredBB)) - return 0; - return V; -} + if (DT) { + // Make sure the value is live in the predecessor. + if (Instruction *Inst = dyn_cast_or_null(Addr)) + if (!DT->dominates(Inst->getParent(), PredBB)) + Addr = 0; + } + return Addr == 0; +} /// PHITranslateWithInsertion - PHI translate this value into the specified /// predecessor block, inserting a computation of the value if it is @@ -365,8 +360,9 @@ SmallVectorImpl &NewInsts) { // See if we have a version of this value already available and dominating // PredBB. If so, there is no need to insert a new instance of it. - if (Value *Res = GetAvailablePHITranslatedSubExpr(InVal, CurBB, PredBB, DT)) - return Res; + PHITransAddr Tmp(InVal, TD); + if (!Tmp.PHITranslateValue(CurBB, PredBB, &DT)) + return Tmp.getAddr(); // If we don't have an available version of this value, it must be an // instruction. Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=97010&r1=97009&r2=97010&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Tue Feb 23 19:39:00 2010 @@ -1633,13 +1633,8 @@ LoadPtr = Address.PHITranslateWithInsertion(LoadBB, UnavailablePred, *DT, NewInsts); } else { - Address.PHITranslateValue(LoadBB, UnavailablePred); + Address.PHITranslateValue(LoadBB, UnavailablePred, DT); LoadPtr = Address.getAddr(); - - // Make sure the value is live in the predecessor. - if (Instruction *Inst = dyn_cast_or_null(LoadPtr)) - if (!DT->dominates(Inst->getParent(), UnavailablePred)) - LoadPtr = 0; } // If we couldn't find or insert a computation of this phi translated value, From evan.cheng at apple.com Tue Feb 23 19:42:31 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 24 Feb 2010 01:42:31 -0000 Subject: [llvm-commits] [llvm] r97011 - in /llvm/trunk: lib/CodeGen/SelectionDAG/DAGCombiner.cpp lib/CodeGen/SelectionDAG/TargetLowering.cpp lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/2010-02-23-DAGCombineBug.ll test/CodeGen/X86/critical-edge-split.ll test/CodeGen/X86/ins_subreg_coalesce-3.ll test/CodeGen/X86/trunc-to-bool.ll test/CodeGen/X86/xor-icmp.ll Message-ID: <20100224014231.A18302A6C12C@llvm.org> Author: evancheng Date: Tue Feb 23 19:42:31 2010 New Revision: 97011 URL: http://llvm.org/viewvc/llvm-project?rev=97011&view=rev Log: Re-apply 96540 and 96556 with fixes. Added: llvm/trunk/test/CodeGen/X86/2010-02-23-DAGCombineBug.ll Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp llvm/trunk/lib/Target/X86/X86ISelLowering.cpp llvm/trunk/test/CodeGen/X86/critical-edge-split.ll llvm/trunk/test/CodeGen/X86/ins_subreg_coalesce-3.ll llvm/trunk/test/CodeGen/X86/trunc-to-bool.ll llvm/trunk/test/CodeGen/X86/xor-icmp.ll Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=97011&r1=97010&r2=97011&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Tue Feb 23 19:42:31 2010 @@ -4655,7 +4655,8 @@ DAG.DeleteNode(Trunc); } // Replace the uses of SRL with SETCC - DAG.ReplaceAllUsesOfValueWith(N1, SetCC); + WorkListRemover DeadNodes(*this); + DAG.ReplaceAllUsesOfValueWith(N1, SetCC, &DeadNodes); removeFromWorkList(N1.getNode()); DAG.DeleteNode(N1.getNode()); return SDValue(N, 0); // Return N so it doesn't get rechecked! @@ -4663,6 +4664,56 @@ } } } + + // Transform br(xor(x, y)) -> br(x != y) + // Transform br(xor(xor(x,y), 1)) -> br (x == y) + if (N1.hasOneUse() && N1.getOpcode() == ISD::XOR) { + SDNode *TheXor = N1.getNode(); + SDValue Op0 = TheXor->getOperand(0); + SDValue Op1 = TheXor->getOperand(1); + if (Op0.getOpcode() == Op1.getOpcode()) { + // Avoid missing important xor optimizations. + SDValue Tmp = visitXOR(TheXor); + if (Tmp.getNode()) { + DEBUG(dbgs() << "\nReplacing.8 "; + TheXor->dump(&DAG); + dbgs() << "\nWith: "; + Tmp.getNode()->dump(&DAG); + dbgs() << '\n'); + WorkListRemover DeadNodes(*this); + DAG.ReplaceAllUsesOfValueWith(N1, Tmp, &DeadNodes); + removeFromWorkList(TheXor); + DAG.DeleteNode(TheXor); + return DAG.getNode(ISD::BRCOND, N->getDebugLoc(), + MVT::Other, Chain, Tmp, N2); + } + } + + if (Op0.getOpcode() != ISD::SETCC && Op1.getOpcode() != ISD::SETCC) { + bool Equal = false; + if (ConstantSDNode *RHSCI = dyn_cast(Op0)) + if (RHSCI->getAPIntValue() == 1 && Op0.hasOneUse() && + Op0.getOpcode() == ISD::XOR) { + TheXor = Op0.getNode(); + Equal = true; + } + + EVT SetCCVT = N1.getValueType(); + if (LegalTypes) + SetCCVT = TLI.getSetCCResultType(SetCCVT); + SDValue SetCC = DAG.getSetCC(TheXor->getDebugLoc(), + SetCCVT, + Op0, Op1, + Equal ? ISD::SETEQ : ISD::SETNE); + // Replace the uses of XOR with SETCC + WorkListRemover DeadNodes(*this); + DAG.ReplaceAllUsesOfValueWith(N1, SetCC, &DeadNodes); + removeFromWorkList(N1.getNode()); + DAG.DeleteNode(N1.getNode()); + return DAG.getNode(ISD::BRCOND, N->getDebugLoc(), + MVT::Other, Chain, SetCC, N2); + } + } return SDValue(); } @@ -5012,7 +5063,7 @@ assert(N->getValueType(2) == MVT::Other && "Malformed indexed loads?"); if (N->hasNUsesOfValue(0, 0) && N->hasNUsesOfValue(0, 1)) { SDValue Undef = DAG.getUNDEF(N->getValueType(0)); - DEBUG(dbgs() << "\nReplacing.6 "; + DEBUG(dbgs() << "\nReplacing.7 "; N->dump(&DAG); dbgs() << "\nWith: "; Undef.getNode()->dump(&DAG); Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=97011&r1=97010&r2=97011&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Tue Feb 23 19:42:31 2010 @@ -1775,7 +1775,7 @@ break; // todo, be more careful with signed comparisons } } else if (N0.getOpcode() == ISD::SIGN_EXTEND_INREG && - (Cond == ISD::SETEQ || Cond == ISD::SETNE)) { + (Cond == ISD::SETEQ || Cond == ISD::SETNE)) { EVT ExtSrcTy = cast(N0.getOperand(1))->getVT(); unsigned ExtSrcTyBits = ExtSrcTy.getSizeInBits(); EVT ExtDstTy = N0.getValueType(); @@ -1809,22 +1809,21 @@ Cond); } else if ((N1C->isNullValue() || N1C->getAPIntValue() == 1) && (Cond == ISD::SETEQ || Cond == ISD::SETNE)) { - // SETCC (SETCC), [0|1], [EQ|NE] -> SETCC - if (N0.getOpcode() == ISD::SETCC) { + if (N0.getOpcode() == ISD::SETCC && + isTypeLegal(VT) && VT.bitsLE(N0.getValueType())) { bool TrueWhenTrue = (Cond == ISD::SETEQ) ^ (N1C->getAPIntValue() != 1); if (TrueWhenTrue) - return N0; - + return DAG.getNode(ISD::TRUNCATE, dl, VT, N0); // Invert the condition. ISD::CondCode CC = cast(N0.getOperand(2))->get(); CC = ISD::getSetCCInverse(CC, N0.getOperand(0).getValueType().isInteger()); return DAG.getSetCC(dl, VT, N0.getOperand(0), N0.getOperand(1), CC); } - + if ((N0.getOpcode() == ISD::XOR || - (N0.getOpcode() == ISD::AND && + (N0.getOpcode() == ISD::AND && N0.getOperand(0).getOpcode() == ISD::XOR && N0.getOperand(1) == N0.getOperand(0).getOperand(1))) && isa(N0.getOperand(1)) && @@ -1847,9 +1846,36 @@ N0.getOperand(0).getOperand(0), N0.getOperand(1)); } + return DAG.getSetCC(dl, VT, Val, N1, Cond == ISD::SETEQ ? ISD::SETNE : ISD::SETEQ); } + } else if (N1C->getAPIntValue() == 1) { + SDValue Op0 = N0; + if (Op0.getOpcode() == ISD::TRUNCATE) + Op0 = Op0.getOperand(0); + + if ((Op0.getOpcode() == ISD::XOR || Op0.getOpcode() == ISD::AND) && + Op0.getOperand(0).getOpcode() == ISD::SETCC && + Op0.getOperand(1).getOpcode() == ISD::SETCC) { + // (and (setcc), (setcc)) == / != 1 -> (setcc) == / != (setcc) + // (xor (setcc), (setcc)) == / != 1 -> (setcc) != / == (setcc) + if (Op0.getOpcode() == ISD::XOR) + Cond = (Cond == ISD::SETEQ) ? ISD::SETNE : ISD::SETEQ; + return DAG.getSetCC(dl, VT, Op0.getOperand(0), Op0.getOperand(1), + Cond); + } else if (Op0.getOpcode() == ISD::AND && + isa(Op0.getOperand(1)) && + cast(Op0.getOperand(1))->getAPIntValue() == 1) { + // If this is (X&1) == / != 1, normalize it to (X&1) != / == 0. + if (Op0.getValueType() != VT) + Op0 = DAG.getNode(ISD::AND, dl, VT, + DAG.getNode(ISD::TRUNCATE, dl, VT, Op0.getOperand(0)), + DAG.getConstant(1, VT)); + return DAG.getSetCC(dl, VT, Op0, + DAG.getConstant(0, Op0.getValueType()), + Cond == ISD::SETEQ ? ISD::SETNE : ISD::SETEQ); + } } } Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=97011&r1=97010&r2=97011&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Feb 23 19:42:31 2010 @@ -5883,26 +5883,31 @@ /// LowerToBT - Result of 'and' is compared against zero. Turn it into a BT node /// if it's possible. -static SDValue LowerToBT(SDValue Op0, ISD::CondCode CC, +static SDValue LowerToBT(SDValue And, ISD::CondCode CC, DebugLoc dl, SelectionDAG &DAG) { + SDValue Op0 = And.getOperand(0); + SDValue Op1 = And.getOperand(1); + if (Op0.getOpcode() == ISD::TRUNCATE) + Op0 = Op0.getOperand(0); + if (Op1.getOpcode() == ISD::TRUNCATE) + Op1 = Op1.getOperand(0); + SDValue LHS, RHS; - if (Op0.getOperand(1).getOpcode() == ISD::SHL) { - if (ConstantSDNode *Op010C = - dyn_cast(Op0.getOperand(1).getOperand(0))) - if (Op010C->getZExtValue() == 1) { - LHS = Op0.getOperand(0); - RHS = Op0.getOperand(1).getOperand(1); - } - } else if (Op0.getOperand(0).getOpcode() == ISD::SHL) { - if (ConstantSDNode *Op000C = - dyn_cast(Op0.getOperand(0).getOperand(0))) - if (Op000C->getZExtValue() == 1) { - LHS = Op0.getOperand(1); - RHS = Op0.getOperand(0).getOperand(1); - } - } else if (Op0.getOperand(1).getOpcode() == ISD::Constant) { - ConstantSDNode *AndRHS = cast(Op0.getOperand(1)); - SDValue AndLHS = Op0.getOperand(0); + if (Op1.getOpcode() == ISD::SHL) { + if (ConstantSDNode *And10C = dyn_cast(Op1.getOperand(0))) + if (And10C->getZExtValue() == 1) { + LHS = Op0; + RHS = Op1.getOperand(1); + } + } else if (Op0.getOpcode() == ISD::SHL) { + if (ConstantSDNode *And00C = dyn_cast(Op0.getOperand(0))) + if (And00C->getZExtValue() == 1) { + LHS = Op1; + RHS = Op0.getOperand(1); + } + } else if (Op1.getOpcode() == ISD::Constant) { + ConstantSDNode *AndRHS = cast(Op1); + SDValue AndLHS = Op0; if (AndRHS->getZExtValue() == 1 && AndLHS.getOpcode() == ISD::SRL) { LHS = AndLHS.getOperand(0); RHS = AndLHS.getOperand(1); @@ -5952,6 +5957,21 @@ return NewSetCC; } + // Look for "(setcc) == / != 1" to avoid unncessary setcc. + if (Op0.getOpcode() == X86ISD::SETCC && + Op1.getOpcode() == ISD::Constant && + (cast(Op1)->getZExtValue() == 1 || + cast(Op1)->isNullValue()) && + (CC == ISD::SETEQ || CC == ISD::SETNE)) { + X86::CondCode CCode = (X86::CondCode)Op0.getConstantOperandVal(0); + bool Invert = (CC == ISD::SETNE) ^ + cast(Op1)->isNullValue(); + if (Invert) + CCode = X86::GetOppositeBranchCondition(CCode); + return DAG.getNode(X86ISD::SETCC, dl, MVT::i8, + DAG.getConstant(CCode, MVT::i8), Op0.getOperand(1)); + } + bool isFP = Op.getOperand(1).getValueType().isFloatingPoint(); unsigned X86CC = TranslateX86CC(CC, isFP, Op0, Op1, DAG); if (X86CC == X86::COND_INVALID) Added: llvm/trunk/test/CodeGen/X86/2010-02-23-DAGCombineBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2010-02-23-DAGCombineBug.ll?rev=97011&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/2010-02-23-DAGCombineBug.ll (added) +++ llvm/trunk/test/CodeGen/X86/2010-02-23-DAGCombineBug.ll Tue Feb 23 19:42:31 2010 @@ -0,0 +1,17 @@ +; RUN: llc < %s -march=x86 | FileCheck %s + +define i32* @t() nounwind optsize ssp { +entry: +; CHECK: t: +; CHECK: testl %eax, %eax +; CHECK: js + %cmp = icmp slt i32 undef, 0 ; [#uses=1] + %outsearch.0 = select i1 %cmp, i1 false, i1 true ; [#uses=1] + br i1 %outsearch.0, label %if.then27, label %if.else29 + +if.then27: ; preds = %entry + ret i32* undef + +if.else29: ; preds = %entry + unreachable +} Modified: llvm/trunk/test/CodeGen/X86/critical-edge-split.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/critical-edge-split.ll?rev=97011&r1=97010&r2=97011&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/critical-edge-split.ll (original) +++ llvm/trunk/test/CodeGen/X86/critical-edge-split.ll Tue Feb 23 19:42:31 2010 @@ -1,4 +1,4 @@ -; RUN: llc < %s -mtriple=i386-apple-darwin -tailcallopt=false -stats -info-output-file - | grep asm-printer | grep 31 +; RUN: llc < %s -mtriple=i386-apple-darwin -stats -info-output-file - | grep asm-printer | grep 29 %CC = type { %Register } %II = type { %"struct.XX::II::$_74" } Modified: llvm/trunk/test/CodeGen/X86/ins_subreg_coalesce-3.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/ins_subreg_coalesce-3.ll?rev=97011&r1=97010&r2=97011&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/ins_subreg_coalesce-3.ll (original) +++ llvm/trunk/test/CodeGen/X86/ins_subreg_coalesce-3.ll Tue Feb 23 19:42:31 2010 @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=x86-64 | grep mov | count 5 +; RUN: llc < %s -march=x86-64 | grep mov | count 3 %struct.COMPOSITE = type { i8, i16, i16 } %struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 } Modified: llvm/trunk/test/CodeGen/X86/trunc-to-bool.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/trunc-to-bool.ll?rev=97011&r1=97010&r2=97011&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/trunc-to-bool.ll (original) +++ llvm/trunk/test/CodeGen/X86/trunc-to-bool.ll Tue Feb 23 19:42:31 2010 @@ -3,13 +3,14 @@ ; value and as the operand of a branch. ; RUN: llc < %s -march=x86 | FileCheck %s -define i1 @test1(i32 %X) zeroext { +define i1 @test1(i32 %X) zeroext nounwind { %Y = trunc i32 %X to i1 ret i1 %Y } +; CHECK: test1: ; CHECK: andl $1, %eax -define i1 @test2(i32 %val, i32 %mask) { +define i1 @test2(i32 %val, i32 %mask) nounwind { entry: %shifted = ashr i32 %val, %mask %anded = and i32 %shifted, 1 @@ -20,9 +21,10 @@ ret_false: ret i1 false } -; CHECK: testb $1, %al +; CHECK: test2: +; CHECK: btl %eax -define i32 @test3(i8* %ptr) { +define i32 @test3(i8* %ptr) nounwind { %val = load i8* %ptr %tmp = trunc i8 %val to i1 br i1 %tmp, label %cond_true, label %cond_false @@ -31,9 +33,10 @@ cond_false: ret i32 42 } -; CHECK: testb $1, %al +; CHECK: test3: +; CHECK: testb $1, (%eax) -define i32 @test4(i8* %ptr) { +define i32 @test4(i8* %ptr) nounwind { %tmp = ptrtoint i8* %ptr to i1 br i1 %tmp, label %cond_true, label %cond_false cond_true: @@ -41,9 +44,10 @@ cond_false: ret i32 42 } -; CHECK: testb $1, %al +; CHECK: test4: +; CHECK: testb $1, 4(%esp) -define i32 @test6(double %d) { +define i32 @test5(double %d) nounwind { %tmp = fptosi double %d to i1 br i1 %tmp, label %cond_true, label %cond_false cond_true: @@ -51,4 +55,5 @@ cond_false: ret i32 42 } +; CHECK: test5: ; CHECK: testb $1 Modified: llvm/trunk/test/CodeGen/X86/xor-icmp.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/xor-icmp.ll?rev=97011&r1=97010&r2=97011&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/xor-icmp.ll (original) +++ llvm/trunk/test/CodeGen/X86/xor-icmp.ll Tue Feb 23 19:42:31 2010 @@ -1,5 +1,6 @@ ; RUN: llc < %s -march=x86 | FileCheck %s -check-prefix=X32 ; RUN: llc < %s -march=x86-64 | FileCheck %s -check-prefix=X64 +; rdar://7367229 define i32 @t(i32 %a, i32 %b) nounwind ssp { entry: @@ -34,3 +35,33 @@ declare i32 @foo(...) declare i32 @bar(...) + +define i32 @t2(i32 %x, i32 %y) nounwind ssp { +; X32: t2: +; X32: cmpl +; X32: sete +; X32: cmpl +; X32: sete +; X32-NOT: xor +; X32: je + +; X64: t2: +; X64: testl +; X64: sete +; X64: testl +; X64: sete +; X64-NOT: xor +; X64: je +entry: + %0 = icmp eq i32 %x, 0 ; [#uses=1] + %1 = icmp eq i32 %y, 0 ; [#uses=1] + %2 = xor i1 %1, %0 ; [#uses=1] + br i1 %2, label %bb, label %return + +bb: ; preds = %entry + %3 = tail call i32 (...)* @foo() nounwind ; [#uses=0] + ret i32 undef + +return: ; preds = %entry + ret i32 undef +} From grosbach at apple.com Tue Feb 23 19:43:04 2010 From: grosbach at apple.com (Jim Grosbach) Date: Wed, 24 Feb 2010 01:43:04 -0000 Subject: [llvm-commits] [llvm] r97012 - in /llvm/trunk: lib/Target/ARM/ARMISelLowering.cpp test/CodeGen/Thumb2/ldr-str-imm12.ll Message-ID: <20100224014304.1CC402A6C12C@llvm.org> Author: grosbach Date: Tue Feb 23 19:43:03 2010 New Revision: 97012 URL: http://llvm.org/viewvc/llvm-project?rev=97012&view=rev Log: LowerCall() should always do getCopyFromReg() to reference the stack pointer. Machine instruction selection is much happier when operands are in virtual registers. Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp llvm/trunk/test/CodeGen/Thumb2/ldr-str-imm12.ll Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=97012&r1=97011&r2=97012&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Tue Feb 23 19:43:03 2010 @@ -924,7 +924,7 @@ // These operations are automatically eliminated by the prolog/epilog pass Chain = DAG.getCALLSEQ_START(Chain, DAG.getIntPtrConstant(NumBytes, true)); - SDValue StackPtr = DAG.getRegister(ARM::SP, MVT::i32); + SDValue StackPtr = DAG.getCopyFromReg(Chain, dl, ARM::SP, getPointerTy()); RegsToPassVector RegsToPass; SmallVector MemOpChains; @@ -973,8 +973,6 @@ VA, ArgLocs[++i], StackPtr, MemOpChains, Flags); } else { assert(VA.isMemLoc()); - if (StackPtr.getNode() == 0) - StackPtr = DAG.getCopyFromReg(Chain, dl, ARM::SP, getPointerTy()); MemOpChains.push_back(LowerMemOpCallTo(Chain, StackPtr, Op1, dl, DAG, VA, Flags)); @@ -987,8 +985,6 @@ RegsToPass.push_back(std::make_pair(VA.getLocReg(), Arg)); } else { assert(VA.isMemLoc()); - if (StackPtr.getNode() == 0) - StackPtr = DAG.getCopyFromReg(Chain, dl, ARM::SP, getPointerTy()); MemOpChains.push_back(LowerMemOpCallTo(Chain, StackPtr, Arg, dl, DAG, VA, Flags)); Modified: llvm/trunk/test/CodeGen/Thumb2/ldr-str-imm12.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Thumb2/ldr-str-imm12.ll?rev=97012&r1=97011&r2=97012&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/Thumb2/ldr-str-imm12.ll (original) +++ llvm/trunk/test/CodeGen/Thumb2/ldr-str-imm12.ll Tue Feb 23 19:43:03 2010 @@ -52,7 +52,7 @@ ; CHECK: str r{{[0-7]}}, [sp] ; CHECK: str r{{[0-7]}}, [sp, #+4] ; CHECK: str r{{[0-7]}}, [sp, #+8] -; CHECK: str r{{[0-7]}}, [sp, #+24] +; CHECK: str{{(.w)?}} r{{[0-9]+}}, [sp, #+24] store %union.rec* null, %union.rec** @zz_hold, align 4 store %union.rec* null, %union.rec** @zz_res, align 4 store %union.rec* %x, %union.rec** @zz_hold, align 4 From grosbach at apple.com Tue Feb 23 20:15:43 2010 From: grosbach at apple.com (Jim Grosbach) Date: Wed, 24 Feb 2010 02:15:43 -0000 Subject: [llvm-commits] [llvm] r97013 - in /llvm/trunk/lib/Target/ARM: ARMBaseRegisterInfo.cpp Thumb1RegisterInfo.cpp Message-ID: <20100224021543.E5D382A6C12C@llvm.org> Author: grosbach Date: Tue Feb 23 20:15:43 2010 New Revision: 97013 URL: http://llvm.org/viewvc/llvm-project?rev=97013&view=rev Log: handle very large call frames when require SPAdj != 0 for Thumb1 Modified: llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp llvm/trunk/lib/Target/ARM/Thumb1RegisterInfo.cpp Modified: llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp?rev=97013&r1=97012&r2=97013&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp Tue Feb 23 20:15:43 2010 @@ -1092,7 +1092,7 @@ bool ARMBaseRegisterInfo:: canSimplifyCallFramePseudos(MachineFunction &MF) const { ARMFunctionInfo *AFI = MF.getInfo(); - return hasReservedCallFrame(MF) || (AFI->isThumb1OnlyFunction() && hasFP(MF)); + return hasReservedCallFrame(MF) || MF.getFrameInfo()->hasVarSizedObjects(); } static void Modified: llvm/trunk/lib/Target/ARM/Thumb1RegisterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Thumb1RegisterInfo.cpp?rev=97013&r1=97012&r2=97013&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/Thumb1RegisterInfo.cpp (original) +++ llvm/trunk/lib/Target/ARM/Thumb1RegisterInfo.cpp Tue Feb 23 20:15:43 2010 @@ -450,9 +450,9 @@ Offset -= AFI->getGPRCalleeSavedArea1Offset(); else if (AFI->isGPRCalleeSavedArea2Frame(FrameIndex)) Offset -= AFI->getGPRCalleeSavedArea2Offset(); - else if (hasFP(MF)) { - assert(SPAdj == 0 && "Unexpected"); - // There is alloca()'s in this function, must reference off the frame + else if (MF.getFrameInfo()->hasVarSizedObjects()) { + assert(SPAdj == 0 && hasFP(MF) && "Unexpected"); + // There are alloca()'s in this function, must reference off the frame // pointer instead. FrameReg = getFrameRegister(MF); Offset -= AFI->getFramePtrSpillOffset(); From scallanan at apple.com Tue Feb 23 20:56:25 2010 From: scallanan at apple.com (Sean Callanan) Date: Wed, 24 Feb 2010 02:56:25 -0000 Subject: [llvm-commits] [llvm] r97017 - /llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp Message-ID: <20100224025625.D6E452A6C12C@llvm.org> Author: spyffe Date: Tue Feb 23 20:56:25 2010 New Revision: 97017 URL: http://llvm.org/viewvc/llvm-project?rev=97017&view=rev Log: Changed the table generator so that the X86 disassembler never recognizes InitReg instructions. Modified: llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp Modified: llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp?rev=97017&r1=97016&r2=97017&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp (original) +++ llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp Tue Feb 23 20:56:25 2010 @@ -282,6 +282,10 @@ IsCodeGenOnly) return FILTER_STRONG; + if (Form == X86Local::MRMInitReg) + return FILTER_STRONG; + + // Filter out instructions with a LOCK prefix; // prefer forms that do not have the prefix if (HasLockPrefix) @@ -353,9 +357,6 @@ if (AsmString.find("subreg") != AsmString.npos) return FILTER_STRONG; - assert(Form != X86Local::MRMInitReg && - "FORMAT_MRMINITREG instruction not skipped"); - if (HasFROperands && Name.find("MOV") != Name.npos && ((Name.find("2") != Name.npos && Name.find("32") == Name.npos) || (Name.find("to") != Name.npos))) From johnny.chen at apple.com Tue Feb 23 20:57:20 2010 From: johnny.chen at apple.com (Johnny Chen) Date: Wed, 24 Feb 2010 02:57:20 -0000 Subject: [llvm-commits] [llvm] r97018 - /llvm/trunk/lib/Target/ARM/ARMInstrNEON.td Message-ID: <20100224025720.3C71B2A6C12C@llvm.org> Author: johnny Date: Tue Feb 23 20:57:20 2010 New Revision: 97018 URL: http://llvm.org/viewvc/llvm-project?rev=97018&view=rev Log: Added for disassembly VST1 (multiple single elements) which stores elements to memory from three or four registers and VST2 (multiple two-element structures) which stores to memory from two double-spaced registers. A8.6.391 & A8.6.393 Modified: llvm/trunk/lib/Target/ARM/ARMInstrNEON.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrNEON.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrNEON.td?rev=97018&r1=97017&r2=97018&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrNEON.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrNEON.td Tue Feb 23 20:57:20 2010 @@ -410,6 +410,31 @@ def VST1q64 : VST1Q<0b1100, "vst1", "64", v2i64, int_arm_neon_vst1>; } // hasExtraSrcRegAllocReq +// These (dreg triple/quadruple) are for disassembly only. +class VST1D3 op7_4, string OpcodeStr, string Dt> + : NLdSt<0, 0b00, 0b0110, op7_4, (outs), + (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3), IIC_VST, + OpcodeStr, Dt, + "\\{$src1, $src2, $src3\\}, $addr", "", + [/* For disassembly only; pattern left blank */]>; +class VST1D4 op7_4, string OpcodeStr, string Dt> + : NLdSt<0, 0b00, 0b0010, op7_4, (outs), + (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4), + IIC_VST, OpcodeStr, Dt, + "\\{$src1, $src2, $src3, $src4\\}, $addr", "", + [/* For disassembly only; pattern left blank */]>; + +def VST1d8T : VST1D3<0b0000, "vld1", "8">; +def VST1d16T : VST1D3<0b0100, "vld1", "16">; +def VST1d32T : VST1D3<0b1000, "vld1", "32">; +//def VST1d64T : VST1D3<0b1100, "vld1", "64">; + +def VST1d8Q : VST1D4<0b0000, "vld1", "8">; +def VST1d16Q : VST1D4<0b0100, "vld1", "16">; +def VST1d32Q : VST1D4<0b1000, "vld1", "32">; +//def VST1d64Q : VST1D4<0b1100, "vld1", "64">; + + let mayStore = 1, hasExtraSrcRegAllocReq = 1 in { // VST2 : Vector Store (multiple 2-element structures) @@ -434,6 +459,16 @@ def VST2q16 : VST2Q<0b0100, "vst2", "16">; def VST2q32 : VST2Q<0b1000, "vst2", "32">; +// These (double-spaced dreg pair) are for disassembly only. +class VST2Ddbl op7_4, string OpcodeStr, string Dt> + : NLdSt<0, 0b00, 0b1001, op7_4, (outs), + (ins addrmode6:$addr, DPR:$src1, DPR:$src2), IIC_VST, + OpcodeStr, Dt, "\\{$src1, $src2\\}, $addr", "", []>; + +def VST2d8D : VST2Ddbl<0b0000, "vst2", "8">; +def VST2d16D : VST2Ddbl<0b0100, "vst2", "16">; +def VST2d32D : VST2Ddbl<0b1000, "vst2", "32">; + // VST3 : Vector Store (multiple 3-element structures) class VST3D op7_4, string OpcodeStr, string Dt> : NLdSt<0,0b00,0b0100,op7_4, (outs), From sabre at nondot.org Tue Feb 23 22:24:45 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 24 Feb 2010 04:24:45 -0000 Subject: [llvm-commits] [llvm] r97019 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <20100224042445.1FE202A6C12C@llvm.org> Author: lattner Date: Tue Feb 23 22:24:44 2010 New Revision: 97019 URL: http://llvm.org/viewvc/llvm-project?rev=97019&view=rev Log: add node #'s to debug dumps. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=97019&r1=97018&r2=97019&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Tue Feb 23 22:24:44 2010 @@ -5484,15 +5484,15 @@ if (const TargetInstrInfo *TII = G->getTarget().getInstrInfo()) if (getMachineOpcode() < TII->getNumOpcodes()) return TII->get(getMachineOpcode()).getName(); - return "<>"; + return "<>"; } if (G) { const TargetLowering &TLI = G->getTargetLoweringInfo(); const char *Name = TLI.getTargetNodeName(getOpcode()); if (Name) return Name; - return "<>"; + return "<>"; } - return "<>"; + return "<>"; #ifndef NDEBUG case ISD::DELETED_NODE: From sabre at nondot.org Tue Feb 23 23:33:42 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 24 Feb 2010 05:33:42 -0000 Subject: [llvm-commits] [llvm] r97021 - in /llvm/trunk: include/llvm/CodeGen/DAGISelHeader.h utils/TableGen/DAGISelMatcher.cpp utils/TableGen/DAGISelMatcher.h utils/TableGen/DAGISelMatcherEmitter.cpp utils/TableGen/DAGISelMatcherGen.cpp Message-ID: <20100224053342.C5E4A2A6C12C@llvm.org> Author: lattner Date: Tue Feb 23 23:33:42 2010 New Revision: 97021 URL: http://llvm.org/viewvc/llvm-project?rev=97021&view=rev Log: The new isel was not properly handling patterns that covered internal nodes with flag results. Record these with a new OPC_MarkFlagResults opcode and use this to update the interior nodes' flag results properly. This fixes CodeGen/X86/i256-add.ll with the new isel. Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h llvm/trunk/utils/TableGen/DAGISelMatcher.cpp llvm/trunk/utils/TableGen/DAGISelMatcher.h llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h?rev=97021&r1=97020&r2=97021&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h (original) +++ llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Tue Feb 23 23:33:42 2010 @@ -247,6 +247,7 @@ OPC_EmitCopyToReg, OPC_EmitNodeXForm, OPC_EmitNode, + OPC_MarkFlagResults, OPC_CompleteMatch }; @@ -290,7 +291,7 @@ SDValue InputChain, InputFlag; /// HasChainNodesMatched - True if the ChainNodesMatched list is non-empty. - bool HasChainNodesMatched; + bool HasChainNodesMatched, HasFlagResultNodesMatched; }; SDNode *SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable, @@ -354,6 +355,7 @@ // which ones they are. The result is captured into this list so that we can // update the chain results when the pattern is complete. SmallVector ChainNodesMatched; + SmallVector FlagResultNodesMatched; DEBUG(errs() << "ISEL: Starting pattern match on root node: "; NodeToMatch->dump(CurDAG); @@ -374,6 +376,7 @@ NewEntry.InputChain = InputChain; NewEntry.InputFlag = InputFlag; NewEntry.HasChainNodesMatched = !ChainNodesMatched.empty(); + NewEntry.HasFlagResultNodesMatched = !FlagResultNodesMatched.empty(); MatchScopes.push_back(NewEntry); continue; } @@ -387,6 +390,7 @@ NewEntry.InputChain = InputChain; NewEntry.InputFlag = InputFlag; NewEntry.HasChainNodesMatched = !ChainNodesMatched.empty(); + NewEntry.HasFlagResultNodesMatched = !FlagResultNodesMatched.empty(); MatchScopes.push_back(NewEntry); continue; } @@ -796,6 +800,21 @@ DEBUG(errs() << " Created node: "; Res->dump(CurDAG); errs() << "\n"); continue; } + + case OPC_MarkFlagResults: { + unsigned NumNodes = MatcherTable[MatcherIndex++]; + + // Read and remember all the flag-result nodes. + for (unsigned i = 0; i != NumNodes; ++i) { + unsigned RecNo = MatcherTable[MatcherIndex++]; + if (RecNo & 128) + RecNo = GetVBR(RecNo, MatcherTable, MatcherIndex); + + assert(RecNo < RecordedNodes.size() && "Invalid CheckSame"); + FlagResultNodesMatched.push_back(RecordedNodes[RecNo].getNode()); + } + continue; + } case OPC_CompleteMatch: { // The match has been completed, and any new nodes (if any) have been @@ -844,12 +863,24 @@ ReplaceUses(ChainVal, InputChain); } } - // If the root node produces a flag, make sure to replace its flag - // result with the resultant flag. - if (NodeToMatch->getValueType(NodeToMatch->getNumValues()-1) == - MVT::Flag) - ReplaceUses(SDValue(NodeToMatch, NodeToMatch->getNumValues()-1), - InputFlag); + + // If the result produces a flag, update any flag results in the matched + // pattern with the flag result. + if (InputFlag.getNode() != 0) { + // Handle the root node: + if (NodeToMatch->getValueType(NodeToMatch->getNumValues()-1) == + MVT::Flag) + ReplaceUses(SDValue(NodeToMatch, NodeToMatch->getNumValues()-1), + InputFlag); + + // Handle any interior nodes explicitly marked. + for (unsigned i = 0, e = FlagResultNodesMatched.size(); i != e; ++i) { + SDNode *FRN = FlagResultNodesMatched[i]; + assert(FRN->getValueType(FRN->getNumValues()-1) == MVT::Flag && + "Doesn't have a flag result"); + ReplaceUses(SDValue(FRN, FRN->getNumValues()-1), InputFlag); + } + } assert(NodeToMatch->use_empty() && "Didn't replace all uses of the node?"); @@ -885,7 +916,9 @@ InputFlag = LastScope.InputFlag; if (!LastScope.HasChainNodesMatched) ChainNodesMatched.clear(); - + if (!LastScope.HasFlagResultNodesMatched) + FlagResultNodesMatched.clear(); + MatchScopes.pop_back(); } } Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.cpp?rev=97021&r1=97020&r2=97021&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcher.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcher.cpp Tue Feb 23 23:33:42 2010 @@ -185,6 +185,11 @@ printNext(OS, indent); } +void MarkFlagResultsMatcherNode::print(raw_ostream &OS, unsigned indent) const { + OS.indent(indent) << "MarkFlagResults \n"; + printNext(OS, indent); +} + void CompleteMatchMatcherNode::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CompleteMatch \n"; OS.indent(indent) << "Src = " << *Pattern.getSrcPattern() << "\n"; Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.h?rev=97021&r1=97020&r2=97021&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcher.h (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcher.h Tue Feb 23 23:33:42 2010 @@ -71,6 +71,7 @@ EmitCopyToReg, // Emit a copytoreg into a physreg. EmitNode, // Create a DAG node EmitNodeXForm, // Run a SDNodeXForm + MarkFlagResults, // Indicate which interior nodes have flag results. CompleteMatch // Finish a match and update the results. }; const KindTy Kind; @@ -623,6 +624,29 @@ virtual void print(raw_ostream &OS, unsigned indent = 0) const; }; +/// MarkFlagResultsMatcherNode - This node indicates which non-root nodes in the +/// pattern produce flags. This allows CompleteMatchMatcherNode to update them +/// with the output flag of the resultant code. +class MarkFlagResultsMatcherNode : public MatcherNode { + SmallVector FlagResultNodes; +public: + MarkFlagResultsMatcherNode(const unsigned *nodes, unsigned NumNodes) + : MatcherNode(MarkFlagResults), FlagResultNodes(nodes, nodes+NumNodes) {} + + unsigned getNumNodes() const { return FlagResultNodes.size(); } + + unsigned getNode(unsigned i) const { + assert(i < FlagResultNodes.size()); + return FlagResultNodes[i]; + } + + static inline bool classof(const MatcherNode *N) { + return N->getKind() == MarkFlagResults; + } + + virtual void print(raw_ostream &OS, unsigned indent = 0) const; +}; + /// CompleteMatchMatcherNode - Complete a match by replacing the results of the /// pattern with the newly generated nodes. This also prints a comment /// indicating the source and dest patterns. Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp?rev=97021&r1=97020&r2=97021&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Tue Feb 23 23:33:42 2010 @@ -337,6 +337,15 @@ OS << '\n'; return 6+EN->getNumVTs()+NumOperandBytes; } + case MatcherNode::MarkFlagResults: { + const MarkFlagResultsMatcherNode *CFR = cast(N); + OS << "OPC_MarkFlagResults, " << CFR->getNumNodes() << ", "; + unsigned NumOperandBytes = 0; + for (unsigned i = 0, e = CFR->getNumNodes(); i != e; ++i) + NumOperandBytes += EmitVBRValue(CFR->getNode(i), OS); + OS << '\n'; + return 2+NumOperandBytes; + } case MatcherNode::CompleteMatch: { const CompleteMatchMatcherNode *CM = cast(N); OS << "OPC_CompleteMatch, " << CM->getNumResults() << ", "; Modified: llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp?rev=97021&r1=97020&r2=97021&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Tue Feb 23 23:33:42 2010 @@ -70,6 +70,10 @@ /// MatchedChainNodes - This maintains the position in the recorded nodes /// array of all of the recorded input nodes that have chains. SmallVector MatchedChainNodes; + + /// MatchedFlagResultNodes - This maintains the position in the recorded + /// nodes array of all of the recorded input nodes that have flag results. + SmallVector MatchedFlagResultNodes; /// PhysRegInputs - List list has an entry for each explicitly specified /// physreg input to the pattern. The first elt is the Register node, the @@ -287,6 +291,9 @@ AddMatcherNode(new CheckChainCompatibleMatcherNode(PrevOp)); } } + + // TODO: Complex patterns can't have output flags, if they did, we'd want + // to record them. return; } @@ -416,6 +423,18 @@ AddMatcherNode(new CheckFoldableChainNodeMatcherNode()); } } + + // If this node has an output flag and isn't the root, remember it. + if (N->NodeHasProperty(SDNPOutFlag, CGP) && + N != Pattern.getSrcPattern()) { + // TODO: This redundantly records nodes with both flags and chains. + + // Record the node and remember it in our chained nodes list. + AddMatcherNode(new RecordMatcherNode("'" + N->getOperator()->getName() + + "' flag output node")); + // Remember all of the nodes with output flags our pattern will match. + MatchedFlagResultNodes.push_back(NextRecordedOperandNo++); + } // If this node is known to have an input flag or if it *might* have an input // flag, capture it as the flag input of the pattern. @@ -598,16 +617,16 @@ bool isRoot = N == Pattern.getDstPattern(); - // NodeHasOutFlag - True if this node has a flag. - bool NodeHasInFlag = false, NodeHasOutFlag = false; + // TreeHasOutFlag - True if this tree has a flag. + bool TreeHasInFlag = false, TreeHasOutFlag = false; if (isRoot) { const TreePatternNode *SrcPat = Pattern.getSrcPattern(); - NodeHasInFlag = SrcPat->TreeHasProperty(SDNPOptInFlag, CGP) || + TreeHasInFlag = SrcPat->TreeHasProperty(SDNPOptInFlag, CGP) || SrcPat->TreeHasProperty(SDNPInFlag, CGP); // FIXME2: this is checking the entire pattern, not just the node in // question, doing this just for the root seems like a total hack. - NodeHasOutFlag = SrcPat->TreeHasProperty(SDNPOutFlag, CGP); + TreeHasOutFlag = SrcPat->TreeHasProperty(SDNPOutFlag, CGP); } // NumResults - This is the number of results produced by the instruction in @@ -668,7 +687,7 @@ PhysRegInputs[i].first)); // Even if the node has no other flag inputs, the resultant node must be // flagged to the CopyFromReg nodes we just generated. - NodeHasInFlag = true; + TreeHasInFlag = true; } // Result order: node results, chain, flags @@ -694,7 +713,7 @@ } if (NodeHasChain) ResultVTs.push_back(MVT::Other); - if (NodeHasOutFlag) + if (TreeHasOutFlag) ResultVTs.push_back(MVT::Flag); // FIXME2: Instead of using the isVariadic flag on the instruction, we should @@ -727,7 +746,7 @@ AddMatcherNode(new EmitNodeMatcherNode(II.Namespace+"::"+II.TheDef->getName(), ResultVTs.data(), ResultVTs.size(), InstOps.data(), InstOps.size(), - NodeHasChain, NodeHasInFlag, + NodeHasChain, TreeHasInFlag, NodeHasMemRefs,NumFixedArityOperands)); // The non-chain and non-flag results of the newly emitted node get recorded. @@ -813,6 +832,13 @@ assert(Ops.size() >= NumSrcResults && "Didn't provide enough results"); Ops.resize(NumSrcResults); #endif + + // If the matched pattern covers nodes which define a flag result, emit a node + // that tells the matcher about them so that it can update their results. + if (!MatchedFlagResultNodes.empty()) + AddMatcherNode(new MarkFlagResultsMatcherNode(MatchedFlagResultNodes.data(), + MatchedFlagResultNodes.size())); + // We know that the resulting pattern has exactly one result/ // FIXME2: why? what about something like (set a,b,c, (complexpat)) From chandlerc at gmail.com Wed Feb 24 00:09:03 2010 From: chandlerc at gmail.com (Chandler Carruth) Date: Wed, 24 Feb 2010 06:09:03 -0000 Subject: [llvm-commits] [llvm] r97022 - /llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp Message-ID: <20100224060903.35FF32A6C12C@llvm.org> Author: chandlerc Date: Wed Feb 24 00:09:03 2010 New Revision: 97022 URL: http://llvm.org/viewvc/llvm-project?rev=97022&view=rev Log: Remove an unused variable. Was this intentional? Modified: llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp Modified: llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp?rev=97022&r1=97021&r2=97022&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp Wed Feb 24 00:09:03 2010 @@ -1091,7 +1091,6 @@ // even when FP is available in Thumb2 mode. bool ARMBaseRegisterInfo:: canSimplifyCallFramePseudos(MachineFunction &MF) const { - ARMFunctionInfo *AFI = MF.getInfo(); return hasReservedCallFrame(MF) || MF.getFrameInfo()->hasVarSizedObjects(); } From sabre at nondot.org Wed Feb 24 00:11:37 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 24 Feb 2010 06:11:37 -0000 Subject: [llvm-commits] [llvm] r97023 - in /llvm/trunk: lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp test/CodeGen/Blackfin/promote-logic.ll test/CodeGen/MSP430/Inst8rr.ll test/CodeGen/PowerPC/LargeAbsoluteAddr.ll test/CodeGen/X86/2009-07-16-LoadFoldingBug.ll Message-ID: <20100224061137.F11F92A6C12C@llvm.org> Author: lattner Date: Wed Feb 24 00:11:37 2010 New Revision: 97023 URL: http://llvm.org/viewvc/llvm-project?rev=97023&view=rev Log: Change the scheduler from adding nodes in allnodes order to adding them in a determinstic order (bottom up from the root) based on the structure of the graph itself. This updates tests for some random changes, interesting bits: CodeGen/Blackfin/promote-logic.ll no longer crashes. I have no idea why, but that's good right? CodeGen/X86/2009-07-16-LoadFoldingBug.ll also fails, but now compiles to have one fewer constant pool entry, making the expected load that was being folded disappear. Since it is an unreduced mass of gnast, I just removed it. This fixes PR6370 Removed: llvm/trunk/test/CodeGen/X86/2009-07-16-LoadFoldingBug.ll Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp llvm/trunk/test/CodeGen/Blackfin/promote-logic.ll llvm/trunk/test/CodeGen/MSP430/Inst8rr.ll llvm/trunk/test/CodeGen/PowerPC/LargeAbsoluteAddr.ll Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp?rev=97023&r1=97022&r2=97023&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp Wed Feb 24 00:11:37 2010 @@ -218,8 +218,20 @@ // Check to see if the scheduler cares about latencies. bool UnitLatencies = ForceUnitLatencies(); - for (SelectionDAG::allnodes_iterator NI = DAG->allnodes_begin(), - E = DAG->allnodes_end(); NI != E; ++NI) { + // Add all nodes in depth first order. + SmallVector Worklist; + SmallPtrSet Visited; + Worklist.push_back(DAG->getRoot().getNode()); + Visited.insert(DAG->getRoot().getNode()); + + while (!Worklist.empty()) { + SDNode *NI = Worklist.pop_back_val(); + + // Add all operands to the worklist unless they've already been added. + for (unsigned i = 0, e = NI->getNumOperands(); i != e; ++i) + if (Visited.insert(NI->getOperand(i).getNode())) + Worklist.push_back(NI->getOperand(i).getNode()); + if (isPassiveNode(NI)) // Leaf node, e.g. a TargetImmediate. continue; Modified: llvm/trunk/test/CodeGen/Blackfin/promote-logic.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Blackfin/promote-logic.ll?rev=97023&r1=97022&r2=97023&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/Blackfin/promote-logic.ll (original) +++ llvm/trunk/test/CodeGen/Blackfin/promote-logic.ll Wed Feb 24 00:11:37 2010 @@ -1,5 +1,4 @@ -; RUN: llc < %s -march=bfin > %t -; XFAIL: * +; RUN: llc < %s -march=bfin ; DAGCombiner::SimplifyBinOpWithSameOpcodeHands can produce an illegal i16 OR ; operation after LegalizeOps. Modified: llvm/trunk/test/CodeGen/MSP430/Inst8rr.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MSP430/Inst8rr.ll?rev=97023&r1=97022&r2=97023&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/MSP430/Inst8rr.ll (original) +++ llvm/trunk/test/CodeGen/MSP430/Inst8rr.ll Wed Feb 24 00:11:37 2010 @@ -10,7 +10,7 @@ define i8 @add(i8 %a, i8 %b) nounwind { ; CHECK: add: -; CHECK: add.b r14, r15 +; CHECK: add.b r12, r15 %1 = add i8 %a, %b ret i8 %1 } Modified: llvm/trunk/test/CodeGen/PowerPC/LargeAbsoluteAddr.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/LargeAbsoluteAddr.ll?rev=97023&r1=97022&r2=97023&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/PowerPC/LargeAbsoluteAddr.ll (original) +++ llvm/trunk/test/CodeGen/PowerPC/LargeAbsoluteAddr.ll Wed Feb 24 00:11:37 2010 @@ -1,7 +1,7 @@ ; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin | \ -; RUN: grep {stw r4, 32751} +; RUN: grep {stw r3, 32751} ; RUN: llc < %s -march=ppc64 -mtriple=powerpc-apple-darwin | \ -; RUN: grep {stw r4, 32751} +; RUN: grep {stw r3, 32751} ; RUN: llc < %s -march=ppc64 -mtriple=powerpc-apple-darwin | \ ; RUN: grep {std r3, 9024} Removed: llvm/trunk/test/CodeGen/X86/2009-07-16-LoadFoldingBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2009-07-16-LoadFoldingBug.ll?rev=97022&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/2009-07-16-LoadFoldingBug.ll (original) +++ llvm/trunk/test/CodeGen/X86/2009-07-16-LoadFoldingBug.ll (removed) @@ -1,102 +0,0 @@ -; RUN: llc < %s -mtriple=x86_64-apple-darwin10 | FileCheck %s - -; CHECK: _foo: -; CHECK: pavgw LCPI1_4(%rip) - -; rdar://7057804 - -define void @foo(i16* %out8x8, i16* %in8x8, i32 %lastrow) optsize ssp { -entry: - %0 = call <8 x i16> @llvm.x86.sse2.pmulh.w(<8 x i16> , <8 x i16> undef) nounwind readnone ; <<8 x i16>> [#uses=2] - %1 = call <8 x i16> @llvm.x86.sse2.pcmpeq.w(<8 x i16> %0, <8 x i16> ) nounwind readnone ; <<8 x i16>> [#uses=1] - %2 = call <8 x i16> @llvm.x86.sse2.psrli.w(<8 x i16> zeroinitializer, i32 14) nounwind readnone ; <<8 x i16>> [#uses=1] - %3 = call <8 x i16> @llvm.x86.sse2.pavg.w(<8 x i16> %2, <8 x i16> zeroinitializer) nounwind readnone ; <<8 x i16>> [#uses=1] - %tmp.i.i10 = add <8 x i16> %0, %3 ; <<8 x i16>> [#uses=1] - %4 = call <8 x i16> @llvm.x86.sse2.psubs.w(<8 x i16> zeroinitializer, <8 x i16> %1) nounwind readnone ; <<8 x i16>> [#uses=1] - %5 = call <8 x i16> @llvm.x86.sse2.padds.w(<8 x i16> %tmp.i.i10, <8 x i16> %4) nounwind readnone ; <<8 x i16>> [#uses=3] - %6 = call <8 x i16> @llvm.x86.sse2.psubs.w(<8 x i16> %5, <8 x i16> undef) nounwind readnone ; <<8 x i16>> [#uses=1] - %7 = call <8 x i16> @llvm.x86.sse2.pmulh.w(<8 x i16> , <8 x i16> undef) nounwind readnone ; <<8 x i16>> [#uses=2] - %8 = call <8 x i16> @llvm.x86.sse2.pcmpeq.w(<8 x i16> %7, <8 x i16> ) nounwind readnone ; <<8 x i16>> [#uses=1] - %9 = call <8 x i16> @llvm.x86.sse2.psrli.w(<8 x i16> zeroinitializer, i32 14) nounwind readnone ; <<8 x i16>> [#uses=1] - %10 = call <8 x i16> @llvm.x86.sse2.pavg.w(<8 x i16> %9, <8 x i16> zeroinitializer) nounwind readnone ; <<8 x i16>> [#uses=1] - %tmp.i.i8 = add <8 x i16> %7, %10 ; <<8 x i16>> [#uses=1] - %11 = call <8 x i16> @llvm.x86.sse2.psubs.w(<8 x i16> undef, <8 x i16> %8) nounwind readnone ; <<8 x i16>> [#uses=1] - %12 = call <8 x i16> @llvm.x86.sse2.padds.w(<8 x i16> %tmp.i.i8, <8 x i16> %11) nounwind readnone ; <<8 x i16>> [#uses=1] - %13 = call <8 x i16> @llvm.x86.sse2.padds.w(<8 x i16> undef, <8 x i16> undef) nounwind readnone ; <<8 x i16>> [#uses=1] - %14 = call <8 x i16> @llvm.x86.sse2.psubs.w(<8 x i16> %5, <8 x i16> undef) nounwind readnone ; <<8 x i16>> [#uses=1] - %15 = call <8 x i16> @llvm.x86.sse2.padds.w(<8 x i16> %5, <8 x i16> undef) nounwind readnone ; <<8 x i16>> [#uses=1] - %16 = call <8 x i16> @llvm.x86.sse2.padds.w(<8 x i16> %6, <8 x i16> undef) nounwind readnone ; <<8 x i16>> [#uses=1] - %17 = call <8 x i16> @llvm.x86.sse2.padds.w(<8 x i16> %12, <8 x i16> undef) nounwind readnone ; <<8 x i16>> [#uses=1] - %18 = call <8 x i16> @llvm.x86.sse2.psubs.w(<8 x i16> %13, <8 x i16> %15) nounwind readnone ; <<8 x i16>> [#uses=1] - %19 = call <8 x i16> @llvm.x86.sse2.psubs.w(<8 x i16> undef, <8 x i16> %14) nounwind readnone ; <<8 x i16>> [#uses=2] - %20 = call <8 x i16> @llvm.x86.sse2.psubs.w(<8 x i16> undef, <8 x i16> undef) nounwind readnone ; <<8 x i16>> [#uses=4] - %21 = call <8 x i16> @llvm.x86.sse2.psubs.w(<8 x i16> undef, <8 x i16> %17) nounwind readnone ; <<8 x i16>> [#uses=1] - %22 = bitcast <8 x i16> %21 to <2 x i64> ; <<2 x i64>> [#uses=1] - %23 = call <8 x i16> @llvm.x86.sse2.pmulh.w(<8 x i16> , <8 x i16> undef) nounwind readnone ; <<8 x i16>> [#uses=2] - %24 = call <8 x i16> @llvm.x86.sse2.pcmpeq.w(<8 x i16> %23, <8 x i16> ) nounwind readnone ; <<8 x i16>> [#uses=1] - %25 = call <8 x i16> @llvm.x86.sse2.psrli.w(<8 x i16> zeroinitializer, i32 14) nounwind readnone ; <<8 x i16>> [#uses=1] - %26 = call <8 x i16> @llvm.x86.sse2.pavg.w(<8 x i16> %25, <8 x i16> zeroinitializer) nounwind readnone ; <<8 x i16>> [#uses=1] - %tmp.i.i6 = add <8 x i16> %23, %26 ; <<8 x i16>> [#uses=1] - %27 = call <8 x i16> @llvm.x86.sse2.psubs.w(<8 x i16> undef, <8 x i16> %24) nounwind readnone ; <<8 x i16>> [#uses=1] - %28 = call <8 x i16> @llvm.x86.sse2.padds.w(<8 x i16> %tmp.i.i6, <8 x i16> %27) nounwind readnone ; <<8 x i16>> [#uses=1] - %29 = call <8 x i16> @llvm.x86.sse2.pmulh.w(<8 x i16> , <8 x i16> undef) nounwind readnone ; <<8 x i16>> [#uses=2] - %30 = call <8 x i16> @llvm.x86.sse2.pcmpeq.w(<8 x i16> %29, <8 x i16> ) nounwind readnone ; <<8 x i16>> [#uses=1] - %31 = call <8 x i16> @llvm.x86.sse2.psrli.w(<8 x i16> zeroinitializer, i32 14) nounwind readnone ; <<8 x i16>> [#uses=1] - %32 = call <8 x i16> @llvm.x86.sse2.pavg.w(<8 x i16> %31, <8 x i16> zeroinitializer) nounwind readnone ; <<8 x i16>> [#uses=1] - %tmp.i.i4 = add <8 x i16> %29, %32 ; <<8 x i16>> [#uses=1] - %33 = call <8 x i16> @llvm.x86.sse2.psubs.w(<8 x i16> undef, <8 x i16> %30) nounwind readnone ; <<8 x i16>> [#uses=1] - %34 = call <8 x i16> @llvm.x86.sse2.padds.w(<8 x i16> %tmp.i.i4, <8 x i16> %33) nounwind readnone ; <<8 x i16>> [#uses=1] - %35 = call <8 x i16> @llvm.x86.sse2.pmulh.w(<8 x i16> , <8 x i16> %20) nounwind readnone ; <<8 x i16>> [#uses=2] - %tmp.i2.i1 = mul <8 x i16> %20, ; <<8 x i16>> [#uses=1] - %36 = call <8 x i16> @llvm.x86.sse2.pcmpeq.w(<8 x i16> %35, <8 x i16> ) nounwind readnone ; <<8 x i16>> [#uses=1] - %37 = call <8 x i16> @llvm.x86.sse2.psrli.w(<8 x i16> %tmp.i2.i1, i32 14) nounwind readnone ; <<8 x i16>> [#uses=1] - %38 = call <8 x i16> @llvm.x86.sse2.pavg.w(<8 x i16> %37, <8 x i16> zeroinitializer) nounwind readnone ; <<8 x i16>> [#uses=1] - %tmp.i.i2 = add <8 x i16> %35, %38 ; <<8 x i16>> [#uses=1] - %39 = call <8 x i16> @llvm.x86.sse2.psubs.w(<8 x i16> %19, <8 x i16> %36) nounwind readnone ; <<8 x i16>> [#uses=1] - %40 = call <8 x i16> @llvm.x86.sse2.padds.w(<8 x i16> %tmp.i.i2, <8 x i16> %39) nounwind readnone ; <<8 x i16>> [#uses=1] - %41 = call <8 x i16> @llvm.x86.sse2.pmulh.w(<8 x i16> , <8 x i16> %20) nounwind readnone ; <<8 x i16>> [#uses=2] - %tmp.i2.i = mul <8 x i16> %20, ; <<8 x i16>> [#uses=1] - %42 = call <8 x i16> @llvm.x86.sse2.pcmpeq.w(<8 x i16> %41, <8 x i16> ) nounwind readnone ; <<8 x i16>> [#uses=1] - %43 = call <8 x i16> @llvm.x86.sse2.psrli.w(<8 x i16> %tmp.i2.i, i32 14) nounwind readnone ; <<8 x i16>> [#uses=1] - %44 = call <8 x i16> @llvm.x86.sse2.pavg.w(<8 x i16> %43, <8 x i16> zeroinitializer) nounwind readnone ; <<8 x i16>> [#uses=1] - %tmp.i.i = add <8 x i16> %41, %44 ; <<8 x i16>> [#uses=1] - %45 = call <8 x i16> @llvm.x86.sse2.psubs.w(<8 x i16> %19, <8 x i16> %42) nounwind readnone ; <<8 x i16>> [#uses=1] - %46 = call <8 x i16> @llvm.x86.sse2.padds.w(<8 x i16> %tmp.i.i, <8 x i16> %45) nounwind readnone ; <<8 x i16>> [#uses=1] - %47 = call <8 x i16> @llvm.x86.sse2.padds.w(<8 x i16> %18, <8 x i16> %16) nounwind readnone ; <<8 x i16>> [#uses=1] - %48 = bitcast <8 x i16> %47 to <2 x i64> ; <<2 x i64>> [#uses=1] - %49 = bitcast <8 x i16> %28 to <2 x i64> ; <<2 x i64>> [#uses=1] - %50 = getelementptr i16* %out8x8, i64 8 ; [#uses=1] - %51 = bitcast i16* %50 to <2 x i64>* ; <<2 x i64>*> [#uses=1] - store <2 x i64> %49, <2 x i64>* %51, align 16 - %52 = bitcast <8 x i16> %40 to <2 x i64> ; <<2 x i64>> [#uses=1] - %53 = getelementptr i16* %out8x8, i64 16 ; [#uses=1] - %54 = bitcast i16* %53 to <2 x i64>* ; <<2 x i64>*> [#uses=1] - store <2 x i64> %52, <2 x i64>* %54, align 16 - %55 = getelementptr i16* %out8x8, i64 24 ; [#uses=1] - %56 = bitcast i16* %55 to <2 x i64>* ; <<2 x i64>*> [#uses=1] - store <2 x i64> %48, <2 x i64>* %56, align 16 - %57 = bitcast <8 x i16> %46 to <2 x i64> ; <<2 x i64>> [#uses=1] - %58 = getelementptr i16* %out8x8, i64 40 ; [#uses=1] - %59 = bitcast i16* %58 to <2 x i64>* ; <<2 x i64>*> [#uses=1] - store <2 x i64> %57, <2 x i64>* %59, align 16 - %60 = bitcast <8 x i16> %34 to <2 x i64> ; <<2 x i64>> [#uses=1] - %61 = getelementptr i16* %out8x8, i64 48 ; [#uses=1] - %62 = bitcast i16* %61 to <2 x i64>* ; <<2 x i64>*> [#uses=1] - store <2 x i64> %60, <2 x i64>* %62, align 16 - %63 = getelementptr i16* %out8x8, i64 56 ; [#uses=1] - %64 = bitcast i16* %63 to <2 x i64>* ; <<2 x i64>*> [#uses=1] - store <2 x i64> %22, <2 x i64>* %64, align 16 - ret void -} - -declare <8 x i16> @llvm.x86.sse2.psubs.w(<8 x i16>, <8 x i16>) nounwind readnone - -declare <8 x i16> @llvm.x86.sse2.pmulh.w(<8 x i16>, <8 x i16>) nounwind readnone - -declare <8 x i16> @llvm.x86.sse2.pcmpeq.w(<8 x i16>, <8 x i16>) nounwind readnone - -declare <8 x i16> @llvm.x86.sse2.pavg.w(<8 x i16>, <8 x i16>) nounwind readnone - -declare <8 x i16> @llvm.x86.sse2.padds.w(<8 x i16>, <8 x i16>) nounwind readnone - -declare <8 x i16> @llvm.x86.sse2.psrli.w(<8 x i16>, i32) nounwind readnone From gohman at apple.com Wed Feb 24 00:46:10 2010 From: gohman at apple.com (Dan Gohman) Date: Wed, 24 Feb 2010 06:46:10 -0000 Subject: [llvm-commits] [llvm] r97024 - /llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp Message-ID: <20100224064610.254832A6C12D@llvm.org> Author: djg Date: Wed Feb 24 00:46:09 2010 New Revision: 97024 URL: http://llvm.org/viewvc/llvm-project?rev=97024&view=rev Log: Fix indentation. Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp?rev=97024&r1=97023&r2=97024&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp (original) +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp Wed Feb 24 00:46:09 2010 @@ -2458,17 +2458,17 @@ return SelectInst::Create(LHSI->getOperand(0), Op1, Op2); break; } - case Instruction::Load: - if (GetElementPtrInst *GEP = - dyn_cast(LHSI->getOperand(0))) { - if (GlobalVariable *GV = dyn_cast(GEP->getOperand(0))) - if (GV->isConstant() && GV->hasDefinitiveInitializer() && - !cast(LHSI)->isVolatile()) - if (Instruction *Res = FoldCmpLoadFromIndexedGlobal(GEP, GV, I)) - return Res; + case Instruction::Load: + if (GetElementPtrInst *GEP = + dyn_cast(LHSI->getOperand(0))) { + if (GlobalVariable *GV = dyn_cast(GEP->getOperand(0))) + if (GV->isConstant() && GV->hasDefinitiveInitializer() && + !cast(LHSI)->isVolatile()) + if (Instruction *Res = FoldCmpLoadFromIndexedGlobal(GEP, GV, I)) + return Res; + } + break; } - break; - } } return Changed ? &I : 0; From gohman at apple.com Wed Feb 24 00:52:40 2010 From: gohman at apple.com (Dan Gohman) Date: Wed, 24 Feb 2010 06:52:40 -0000 Subject: [llvm-commits] [llvm] r97025 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAG.h include/llvm/CodeGen/SelectionDAGNodes.h include/llvm/Constants.h lib/CodeGen/SelectionDAG/SelectionDAG.cpp lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/sse-minmax.ll Message-ID: <20100224065240.A899F2A6C12C@llvm.org> Author: djg Date: Wed Feb 24 00:52:40 2010 New Revision: 97025 URL: http://llvm.org/viewvc/llvm-project?rev=97025&view=rev Log: When forming SSE min and max nodes for UGE and ULE comparisons, it's necessary to swap the operands to handle NaN and negative zero properly. Also, reintroduce logic for checking for NaN conditions when forming SSE min and max instructions, fixed to take into consideration NaNs and negative zeros. This allows forming min and max instructions in more cases. Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAG.h llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h llvm/trunk/include/llvm/Constants.h llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp llvm/trunk/lib/Target/X86/X86ISelLowering.cpp llvm/trunk/test/CodeGen/X86/sse-minmax.ll Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAG.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAG.h?rev=97025&r1=97024&r2=97025&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SelectionDAG.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAG.h Wed Feb 24 00:52:40 2010 @@ -898,6 +898,15 @@ /// isKnownNeverNan - Test whether the given SDValue is known to never be NaN. bool isKnownNeverNaN(SDValue Op) const; + /// isKnownNeverZero - Test whether the given SDValue is known to never be + /// positive or negative Zero. + bool isKnownNeverZero(SDValue Op) const; + + /// isEqualTo - Test whether two SDValues are known to compare equal. This + /// is true if they are the same value, or if one is negative zero and the + /// other positive zero. + bool isEqualTo(SDValue A, SDValue B) const; + /// isVerifiedDebugInfoDesc - Returns true if the specified SDValue has /// been verified as a debug information descriptor. bool isVerifiedDebugInfoDesc(SDValue Op) const; Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h?rev=97025&r1=97024&r2=97025&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h Wed Feb 24 00:52:40 2010 @@ -1815,6 +1815,12 @@ const APFloat& getValueAPF() const { return Value->getValueAPF(); } const ConstantFP *getConstantFPValue() const { return Value; } + /// isZero - Return true if the value is positive or negative zero. + bool isZero() const { return Value->isZero(); } + + /// isNaN - Return true if the value is a NaN. + bool isNaN() const { return Value->isNaN(); } + /// isExactlyValue - We don't rely on operator== working on double values, as /// it returns true for things that are clearly not equal, like -0.0 and 0.0. /// As such, this method can be used to do an exact bit-for-bit comparison of Modified: llvm/trunk/include/llvm/Constants.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Constants.h?rev=97025&r1=97024&r2=97025&view=diff ============================================================================== --- llvm/trunk/include/llvm/Constants.h (original) +++ llvm/trunk/include/llvm/Constants.h Wed Feb 24 00:52:40 2010 @@ -276,6 +276,12 @@ return Val.isZero() && Val.isNegative(); } + /// isZero - Return true if the value is positive or negative zero. + bool isZero() const { return Val.isZero(); } + + /// isNaN - Return true if the value is a NaN. + bool isNaN() const { return Val.isNaN(); } + /// isExactlyValue - We don't rely on operator== working on double values, as /// it returns true for things that are clearly not equal, like -0.0 and 0.0. /// As such, this method can be used to do an exact bit-for-bit comparison of Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=97025&r1=97024&r2=97025&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed Feb 24 00:52:40 2010 @@ -2235,6 +2235,29 @@ return false; } +bool SelectionDAG::isKnownNeverZero(SDValue Op) const { + // If the value is a constant, we can obviously see if it is a zero or not. + if (const ConstantFPSDNode *C = dyn_cast(Op)) + return !C->isZero(); + + // TODO: Recognize more cases here. + + return false; +} + +bool SelectionDAG::isEqualTo(SDValue A, SDValue B) const { + // Check the obvious case. + if (A == B) return true; + + // For for negative and positive zero. + if (const ConstantFPSDNode *CA = dyn_cast(A)) + if (const ConstantFPSDNode *CB = dyn_cast(B)) + if (CA->isZero() && CB->isZero()) return true; + + // Otherwise they may not be equal. + return false; +} + bool SelectionDAG::isVerifiedDebugInfoDesc(SDValue Op) const { GlobalAddressSDNode *GA = dyn_cast(Op); if (!GA) return false; Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=97025&r1=97024&r2=97025&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed Feb 24 00:52:40 2010 @@ -8833,18 +8833,35 @@ unsigned Opcode = 0; // Check for x CC y ? x : y. - if (LHS == Cond.getOperand(0) && RHS == Cond.getOperand(1)) { + if (DAG.isEqualTo(LHS, Cond.getOperand(0)) && + DAG.isEqualTo(RHS, Cond.getOperand(1))) { switch (CC) { default: break; case ISD::SETULT: - if (!UnsafeFPMath) break; + // Converting this to a min would handle NaNs incorrectly, and swapping + // the operands would cause it to handle comparisons between positive + // and negative zero incorrectly. + if (!FiniteOnlyFPMath() && + (!DAG.isKnownNeverNaN(LHS) || !DAG.isKnownNeverNaN(RHS))) { + if (!UnsafeFPMath && + !(DAG.isKnownNeverZero(LHS) || DAG.isKnownNeverZero(RHS))) + break; + std::swap(LHS, RHS); + } Opcode = X86ISD::FMIN; break; case ISD::SETOLE: - if (!UnsafeFPMath) break; + // Converting this to a min would handle comparisons between positive + // and negative zero incorrectly. + if (!UnsafeFPMath && + !DAG.isKnownNeverZero(LHS) && !DAG.isKnownNeverZero(RHS)) + break; Opcode = X86ISD::FMIN; break; case ISD::SETULE: + // Converting this to a min would handle both negative zeros and NaNs + // incorrectly, but we can swap the operands to fix both. + std::swap(LHS, RHS); case ISD::SETOLT: case ISD::SETLT: case ISD::SETLE: @@ -8852,14 +8869,30 @@ break; case ISD::SETOGE: - if (!UnsafeFPMath) break; + // Converting this to a max would handle comparisons between positive + // and negative zero incorrectly. + if (!UnsafeFPMath && + !DAG.isKnownNeverZero(LHS) && !DAG.isKnownNeverZero(LHS)) + break; Opcode = X86ISD::FMAX; break; case ISD::SETUGT: - if (!UnsafeFPMath) break; + // Converting this to a max would handle NaNs incorrectly, and swapping + // the operands would cause it to handle comparisons between positive + // and negative zero incorrectly. + if (!FiniteOnlyFPMath() && + (!DAG.isKnownNeverNaN(LHS) || !DAG.isKnownNeverNaN(RHS))) { + if (!UnsafeFPMath && + !(DAG.isKnownNeverZero(LHS) || DAG.isKnownNeverZero(RHS))) + break; + std::swap(LHS, RHS); + } Opcode = X86ISD::FMAX; break; case ISD::SETUGE: + // Converting this to a max would handle both negative zeros and NaNs + // incorrectly, but we can swap the operands to fix both. + std::swap(LHS, RHS); case ISD::SETOGT: case ISD::SETGT: case ISD::SETGE: @@ -8867,18 +8900,34 @@ break; } // Check for x CC y ? y : x -- a min/max with reversed arms. - } else if (LHS == Cond.getOperand(1) && RHS == Cond.getOperand(0)) { + } else if (DAG.isEqualTo(LHS, Cond.getOperand(1)) && + DAG.isEqualTo(RHS, Cond.getOperand(0))) { switch (CC) { default: break; case ISD::SETOGE: - if (!UnsafeFPMath) break; + // Converting this to a min would handle comparisons between positive + // and negative zero incorrectly, and swapping the operands would + // cause it to handle NaNs incorrectly. + if (!UnsafeFPMath && + !(DAG.isKnownNeverZero(LHS) || DAG.isKnownNeverZero(RHS))) { + if (!FiniteOnlyFPMath() && + (!DAG.isKnownNeverNaN(LHS) || !DAG.isKnownNeverNaN(RHS))) + break; + std::swap(LHS, RHS); + } Opcode = X86ISD::FMIN; break; case ISD::SETUGT: - if (!UnsafeFPMath) break; + // Converting this to a min would handle NaNs incorrectly. + if (!UnsafeFPMath && + (!DAG.isKnownNeverNaN(LHS) || !DAG.isKnownNeverNaN(RHS))) + break; Opcode = X86ISD::FMIN; break; case ISD::SETUGE: + // Converting this to a min would handle both negative zeros and NaNs + // incorrectly, but we can swap the operands to fix both. + std::swap(LHS, RHS); case ISD::SETOGT: case ISD::SETGT: case ISD::SETGE: @@ -8886,14 +8935,29 @@ break; case ISD::SETULT: - if (!UnsafeFPMath) break; + // Converting this to a max would handle NaNs incorrectly. + if (!FiniteOnlyFPMath() && + (!DAG.isKnownNeverNaN(LHS) || !DAG.isKnownNeverNaN(RHS))) + break; Opcode = X86ISD::FMAX; break; case ISD::SETOLE: - if (!UnsafeFPMath) break; + // Converting this to a max would handle comparisons between positive + // and negative zero incorrectly, and swapping the operands would + // cause it to handle NaNs incorrectly. + if (!UnsafeFPMath && + !DAG.isKnownNeverZero(LHS) && !DAG.isKnownNeverZero(RHS)) { + if (!FiniteOnlyFPMath() && + (!DAG.isKnownNeverNaN(LHS) || !DAG.isKnownNeverNaN(RHS))) + break; + std::swap(LHS, RHS); + } Opcode = X86ISD::FMAX; break; case ISD::SETULE: + // Converting this to a max would handle both negative zeros and NaNs + // incorrectly, but we can swap the operands to fix both. + std::swap(LHS, RHS); case ISD::SETOLT: case ISD::SETLT: case ISD::SETLE: Modified: llvm/trunk/test/CodeGen/X86/sse-minmax.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/sse-minmax.ll?rev=97025&r1=97024&r2=97025&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/sse-minmax.ll (original) +++ llvm/trunk/test/CodeGen/X86/sse-minmax.ll Wed Feb 24 00:52:40 2010 @@ -1,13 +1,15 @@ ; RUN: llc < %s -march=x86-64 -asm-verbose=false | FileCheck %s ; RUN: llc < %s -march=x86-64 -asm-verbose=false -enable-unsafe-fp-math | FileCheck -check-prefix=UNSAFE %s +; RUN: llc < %s -march=x86-64 -asm-verbose=false -enable-finite-only-fp-math | FileCheck -check-prefix=FINITE %s ; Some of these patterns can be matched as SSE min or max. Some of ; then can be matched provided that the operands are swapped. ; Some of them can't be matched at all and require a comparison ; and a conditional branch. -; The naming convention is {,x_}{o,u}{gt,lt,ge,le}{,_inverse} +; The naming convention is {,x_,y_}{o,u}{gt,lt,ge,le}{,_inverse} ; x_ : use 0.0 instead of %y +; y_ : use -0.0 instead of %y ; _inverse : swap the arms of the select. ; CHECK: ogt: @@ -16,6 +18,9 @@ ; UNSAFE: ogt: ; UNSAFE-NEXT: maxsd %xmm1, %xmm0 ; UNSAFE-NEXT: ret +; FINITE: ogt: +; FINITE-NEXT: maxsd %xmm1, %xmm0 +; FINITE-NEXT: ret define double @ogt(double %x, double %y) nounwind { %c = fcmp ogt double %x, %y %d = select i1 %c, double %x, double %y @@ -28,6 +33,9 @@ ; UNSAFE: olt: ; UNSAFE-NEXT: minsd %xmm1, %xmm0 ; UNSAFE-NEXT: ret +; FINITE: olt: +; FINITE-NEXT: minsd %xmm1, %xmm0 +; FINITE-NEXT: ret define double @olt(double %x, double %y) nounwind { %c = fcmp olt double %x, %y %d = select i1 %c, double %x, double %y @@ -42,6 +50,10 @@ ; UNSAFE-NEXT: minsd %xmm0, %xmm1 ; UNSAFE-NEXT: movapd %xmm1, %xmm0 ; UNSAFE-NEXT: ret +; FINITE: ogt_inverse: +; FINITE-NEXT: minsd %xmm0, %xmm1 +; FINITE-NEXT: movapd %xmm1, %xmm0 +; FINITE-NEXT: ret define double @ogt_inverse(double %x, double %y) nounwind { %c = fcmp ogt double %x, %y %d = select i1 %c, double %y, double %x @@ -56,6 +68,10 @@ ; UNSAFE-NEXT: maxsd %xmm0, %xmm1 ; UNSAFE-NEXT: movapd %xmm1, %xmm0 ; UNSAFE-NEXT: ret +; FINITE: olt_inverse: +; FINITE-NEXT: maxsd %xmm0, %xmm1 +; FINITE-NEXT: movapd %xmm1, %xmm0 +; FINITE-NEXT: ret define double @olt_inverse(double %x, double %y) nounwind { %c = fcmp olt double %x, %y %d = select i1 %c, double %y, double %x @@ -67,6 +83,9 @@ ; UNSAFE: oge: ; UNSAFE-NEXT: maxsd %xmm1, %xmm0 ; UNSAFE-NEXT: ret +; FINITE: oge: +; FINITE-NEXT: maxsd %xmm1, %xmm0 +; FINITE-NEXT: ret define double @oge(double %x, double %y) nounwind { %c = fcmp oge double %x, %y %d = select i1 %c, double %x, double %y @@ -77,6 +96,8 @@ ; CHECK-NEXT: ucomisd %xmm0, %xmm1 ; UNSAFE: ole: ; UNSAFE-NEXT: minsd %xmm1, %xmm0 +; FINITE: ole: +; FINITE-NEXT: minsd %xmm1, %xmm0 define double @ole(double %x, double %y) nounwind { %c = fcmp ole double %x, %y %d = select i1 %c, double %x, double %y @@ -89,6 +110,10 @@ ; UNSAFE-NEXT: minsd %xmm0, %xmm1 ; UNSAFE-NEXT: movapd %xmm1, %xmm0 ; UNSAFE-NEXT: ret +; FINITE: oge_inverse: +; FINITE-NEXT: minsd %xmm0, %xmm1 +; FINITE-NEXT: movapd %xmm1, %xmm0 +; FINITE-NEXT: ret define double @oge_inverse(double %x, double %y) nounwind { %c = fcmp oge double %x, %y %d = select i1 %c, double %y, double %x @@ -101,6 +126,10 @@ ; UNSAFE-NEXT: maxsd %xmm0, %xmm1 ; UNSAFE-NEXT: movapd %xmm1, %xmm0 ; UNSAFE-NEXT: ret +; FINITE: ole_inverse: +; FINITE-NEXT: maxsd %xmm0, %xmm1 +; FINITE-NEXT: movapd %xmm1, %xmm0 +; FINITE-NEXT: ret define double @ole_inverse(double %x, double %y) nounwind { %c = fcmp ole double %x, %y %d = select i1 %c, double %y, double %x @@ -115,6 +144,10 @@ ; UNSAFE-NEXT: pxor %xmm1, %xmm1 ; UNSAFE-NEXT: maxsd %xmm1, %xmm0 ; UNSAFE-NEXT: ret +; FINITE: x_ogt: +; FINITE-NEXT: pxor %xmm1, %xmm1 +; FINITE-NEXT: maxsd %xmm1, %xmm0 +; FINITE-NEXT: ret define double @x_ogt(double %x) nounwind { %c = fcmp ogt double %x, 0.000000e+00 %d = select i1 %c, double %x, double 0.000000e+00 @@ -129,6 +162,10 @@ ; UNSAFE-NEXT: pxor %xmm1, %xmm1 ; UNSAFE-NEXT: minsd %xmm1, %xmm0 ; UNSAFE-NEXT: ret +; FINITE: x_olt: +; FINITE-NEXT: pxor %xmm1, %xmm1 +; FINITE-NEXT: minsd %xmm1, %xmm0 +; FINITE-NEXT: ret define double @x_olt(double %x) nounwind { %c = fcmp olt double %x, 0.000000e+00 %d = select i1 %c, double %x, double 0.000000e+00 @@ -145,6 +182,11 @@ ; UNSAFE-NEXT: minsd %xmm0, %xmm1 ; UNSAFE-NEXT: movapd %xmm1, %xmm0 ; UNSAFE-NEXT: ret +; FINITE: x_ogt_inverse: +; FINITE-NEXT: pxor %xmm1, %xmm1 +; FINITE-NEXT: minsd %xmm0, %xmm1 +; FINITE-NEXT: movapd %xmm1, %xmm0 +; FINITE-NEXT: ret define double @x_ogt_inverse(double %x) nounwind { %c = fcmp ogt double %x, 0.000000e+00 %d = select i1 %c, double 0.000000e+00, double %x @@ -161,6 +203,11 @@ ; UNSAFE-NEXT: maxsd %xmm0, %xmm1 ; UNSAFE-NEXT: movapd %xmm1, %xmm0 ; UNSAFE-NEXT: ret +; FINITE: x_olt_inverse: +; FINITE-NEXT: pxor %xmm1, %xmm1 +; FINITE-NEXT: maxsd %xmm0, %xmm1 +; FINITE-NEXT: movapd %xmm1, %xmm0 +; FINITE-NEXT: ret define double @x_olt_inverse(double %x) nounwind { %c = fcmp olt double %x, 0.000000e+00 %d = select i1 %c, double 0.000000e+00, double %x @@ -173,6 +220,10 @@ ; UNSAFE-NEXT: pxor %xmm1, %xmm1 ; UNSAFE-NEXT: maxsd %xmm1, %xmm0 ; UNSAFE-NEXT: ret +; FINITE: x_oge: +; FINITE-NEXT: pxor %xmm1, %xmm1 +; FINITE-NEXT: maxsd %xmm1, %xmm0 +; FINITE-NEXT: ret define double @x_oge(double %x) nounwind { %c = fcmp oge double %x, 0.000000e+00 %d = select i1 %c, double %x, double 0.000000e+00 @@ -185,6 +236,10 @@ ; UNSAFE-NEXT: pxor %xmm1, %xmm1 ; UNSAFE-NEXT: minsd %xmm1, %xmm0 ; UNSAFE-NEXT: ret +; FINITE: x_ole: +; FINITE-NEXT: pxor %xmm1, %xmm1 +; FINITE-NEXT: minsd %xmm1, %xmm0 +; FINITE-NEXT: ret define double @x_ole(double %x) nounwind { %c = fcmp ole double %x, 0.000000e+00 %d = select i1 %c, double %x, double 0.000000e+00 @@ -198,6 +253,11 @@ ; UNSAFE-NEXT: minsd %xmm0, %xmm1 ; UNSAFE-NEXT: movapd %xmm1, %xmm0 ; UNSAFE-NEXT: ret +; FINITE: x_oge_inverse: +; FINITE-NEXT: pxor %xmm1, %xmm1 +; FINITE-NEXT: minsd %xmm0, %xmm1 +; FINITE-NEXT: movapd %xmm1, %xmm0 +; FINITE-NEXT: ret define double @x_oge_inverse(double %x) nounwind { %c = fcmp oge double %x, 0.000000e+00 %d = select i1 %c, double 0.000000e+00, double %x @@ -211,6 +271,11 @@ ; UNSAFE-NEXT: maxsd %xmm0, %xmm1 ; UNSAFE-NEXT: movapd %xmm1, %xmm0 ; UNSAFE-NEXT: ret +; FINITE: x_ole_inverse: +; FINITE-NEXT: pxor %xmm1, %xmm1 +; FINITE-NEXT: maxsd %xmm0, %xmm1 +; FINITE-NEXT: movapd %xmm1, %xmm0 +; FINITE-NEXT: ret define double @x_ole_inverse(double %x) nounwind { %c = fcmp ole double %x, 0.000000e+00 %d = select i1 %c, double 0.000000e+00, double %x @@ -222,6 +287,9 @@ ; UNSAFE: ugt: ; UNSAFE-NEXT: maxsd %xmm1, %xmm0 ; UNSAFE-NEXT: ret +; FINITE: ugt: +; FINITE-NEXT: maxsd %xmm1, %xmm0 +; FINITE-NEXT: ret define double @ugt(double %x, double %y) nounwind { %c = fcmp ugt double %x, %y %d = select i1 %c, double %x, double %y @@ -233,6 +301,9 @@ ; UNSAFE: ult: ; UNSAFE-NEXT: minsd %xmm1, %xmm0 ; UNSAFE-NEXT: ret +; FINITE: ult: +; FINITE-NEXT: minsd %xmm1, %xmm0 +; FINITE-NEXT: ret define double @ult(double %x, double %y) nounwind { %c = fcmp ult double %x, %y %d = select i1 %c, double %x, double %y @@ -245,6 +316,10 @@ ; UNSAFE-NEXT: minsd %xmm0, %xmm1 ; UNSAFE-NEXT: movapd %xmm1, %xmm0 ; UNSAFE-NEXT: ret +; FINITE: ugt_inverse: +; FINITE-NEXT: minsd %xmm0, %xmm1 +; FINITE-NEXT: movapd %xmm1, %xmm0 +; FINITE-NEXT: ret define double @ugt_inverse(double %x, double %y) nounwind { %c = fcmp ugt double %x, %y %d = select i1 %c, double %y, double %x @@ -257,6 +332,10 @@ ; UNSAFE-NEXT: maxsd %xmm0, %xmm1 ; UNSAFE-NEXT: movapd %xmm1, %xmm0 ; UNSAFE-NEXT: ret +; FINITE: ult_inverse: +; FINITE-NEXT: maxsd %xmm0, %xmm1 +; FINITE-NEXT: movapd %xmm1, %xmm0 +; FINITE-NEXT: ret define double @ult_inverse(double %x, double %y) nounwind { %c = fcmp ult double %x, %y %d = select i1 %c, double %y, double %x @@ -264,11 +343,15 @@ } ; CHECK: uge: -; CHECK-NEXT: maxsd %xmm1, %xmm0 +; CHECK-NEXT: maxsd %xmm0, %xmm1 +; CHECK-NEXT: movapd %xmm1, %xmm0 ; CHECK-NEXT: ret ; UNSAFE: uge: ; UNSAFE-NEXT: maxsd %xmm1, %xmm0 ; UNSAFE-NEXT: ret +; FINITE: uge: +; FINITE-NEXT: maxsd %xmm1, %xmm0 +; FINITE-NEXT: ret define double @uge(double %x, double %y) nounwind { %c = fcmp uge double %x, %y %d = select i1 %c, double %x, double %y @@ -276,11 +359,15 @@ } ; CHECK: ule: -; CHECK-NEXT: minsd %xmm1, %xmm0 +; CHECK-NEXT: minsd %xmm0, %xmm1 +; CHECK-NEXT: movapd %xmm1, %xmm0 ; CHECK-NEXT: ret ; UNSAFE: ule: ; UNSAFE-NEXT: minsd %xmm1, %xmm0 ; UNSAFE-NEXT: ret +; FINITE: ule: +; FINITE-NEXT: minsd %xmm1, %xmm0 +; FINITE-NEXT: ret define double @ule(double %x, double %y) nounwind { %c = fcmp ule double %x, %y %d = select i1 %c, double %x, double %y @@ -288,13 +375,16 @@ } ; CHECK: uge_inverse: -; CHECK-NEXT: minsd %xmm0, %xmm1 -; CHECK-NEXT: movapd %xmm1, %xmm0 +; CHECK-NEXT: minsd %xmm1, %xmm0 ; CHECK-NEXT: ret ; UNSAFE: uge_inverse: ; UNSAFE-NEXT: minsd %xmm0, %xmm1 ; UNSAFE-NEXT: movapd %xmm1, %xmm0 ; UNSAFE-NEXT: ret +; FINITE: uge_inverse: +; FINITE-NEXT: minsd %xmm0, %xmm1 +; FINITE-NEXT: movapd %xmm1, %xmm0 +; FINITE-NEXT: ret define double @uge_inverse(double %x, double %y) nounwind { %c = fcmp uge double %x, %y %d = select i1 %c, double %y, double %x @@ -302,13 +392,16 @@ } ; CHECK: ule_inverse: -; CHECK-NEXT: maxsd %xmm0, %xmm1 -; CHECK-NEXT: movapd %xmm1, %xmm0 +; CHECK-NEXT: maxsd %xmm1, %xmm0 ; CHECK-NEXT: ret ; UNSAFE: ule_inverse: ; UNSAFE-NEXT: maxsd %xmm0, %xmm1 ; UNSAFE-NEXT: movapd %xmm1, %xmm0 ; UNSAFE-NEXT: ret +; FINITE: ule_inverse: +; FINITE-NEXT: maxsd %xmm0, %xmm1 +; FINITE-NEXT: movapd %xmm1, %xmm0 +; FINITE-NEXT: ret define double @ule_inverse(double %x, double %y) nounwind { %c = fcmp ule double %x, %y %d = select i1 %c, double %y, double %x @@ -321,6 +414,10 @@ ; UNSAFE-NEXT: pxor %xmm1, %xmm1 ; UNSAFE-NEXT: maxsd %xmm1, %xmm0 ; UNSAFE-NEXT: ret +; FINITE: x_ugt: +; FINITE-NEXT: pxor %xmm1, %xmm1 +; FINITE-NEXT: maxsd %xmm1, %xmm0 +; FINITE-NEXT: ret define double @x_ugt(double %x) nounwind { %c = fcmp ugt double %x, 0.000000e+00 %d = select i1 %c, double %x, double 0.000000e+00 @@ -333,6 +430,10 @@ ; UNSAFE-NEXT: pxor %xmm1, %xmm1 ; UNSAFE-NEXT: minsd %xmm1, %xmm0 ; UNSAFE-NEXT: ret +; FINITE: x_ult: +; FINITE-NEXT: pxor %xmm1, %xmm1 +; FINITE-NEXT: minsd %xmm1, %xmm0 +; FINITE-NEXT: ret define double @x_ult(double %x) nounwind { %c = fcmp ult double %x, 0.000000e+00 %d = select i1 %c, double %x, double 0.000000e+00 @@ -346,6 +447,11 @@ ; UNSAFE-NEXT: minsd %xmm0, %xmm1 ; UNSAFE-NEXT: movapd %xmm1, %xmm0 ; UNSAFE-NEXT: ret +; FINITE: x_ugt_inverse: +; FINITE-NEXT: pxor %xmm1, %xmm1 +; FINITE-NEXT: minsd %xmm0, %xmm1 +; FINITE-NEXT: movapd %xmm1, %xmm0 +; FINITE-NEXT: ret define double @x_ugt_inverse(double %x) nounwind { %c = fcmp ugt double %x, 0.000000e+00 %d = select i1 %c, double 0.000000e+00, double %x @@ -359,6 +465,11 @@ ; UNSAFE-NEXT: maxsd %xmm0, %xmm1 ; UNSAFE-NEXT: movapd %xmm1, %xmm0 ; UNSAFE-NEXT: ret +; FINITE: x_ult_inverse: +; FINITE-NEXT: pxor %xmm1, %xmm1 +; FINITE-NEXT: maxsd %xmm0, %xmm1 +; FINITE-NEXT: movapd %xmm1, %xmm0 +; FINITE-NEXT: ret define double @x_ult_inverse(double %x) nounwind { %c = fcmp ult double %x, 0.000000e+00 %d = select i1 %c, double 0.000000e+00, double %x @@ -367,12 +478,17 @@ ; CHECK: x_uge: ; CHECK-NEXT: pxor %xmm1, %xmm1 -; CHECK-NEXT: maxsd %xmm1, %xmm0 +; CHECK-NEXT: maxsd %xmm0, %xmm1 +; CHECK-NEXT: movapd %xmm1, %xmm0 ; CHECK-NEXT: ret ; UNSAFE: x_uge: ; UNSAFE-NEXT: pxor %xmm1, %xmm1 ; UNSAFE-NEXT: maxsd %xmm1, %xmm0 ; UNSAFE-NEXT: ret +; FINITE: x_uge: +; FINITE-NEXT: pxor %xmm1, %xmm1 +; FINITE-NEXT: maxsd %xmm1, %xmm0 +; FINITE-NEXT: ret define double @x_uge(double %x) nounwind { %c = fcmp uge double %x, 0.000000e+00 %d = select i1 %c, double %x, double 0.000000e+00 @@ -381,12 +497,17 @@ ; CHECK: x_ule: ; CHECK-NEXT: pxor %xmm1, %xmm1 -; CHECK-NEXT: minsd %xmm1, %xmm0 +; CHECK-NEXT: minsd %xmm0, %xmm1 +; CHECK-NEXT: movapd %xmm1, %xmm0 ; CHECK-NEXT: ret ; UNSAFE: x_ule: ; UNSAFE-NEXT: pxor %xmm1, %xmm1 ; UNSAFE-NEXT: minsd %xmm1, %xmm0 ; UNSAFE-NEXT: ret +; FINITE: x_ule: +; FINITE-NEXT: pxor %xmm1, %xmm1 +; FINITE-NEXT: minsd %xmm1, %xmm0 +; FINITE-NEXT: ret define double @x_ule(double %x) nounwind { %c = fcmp ule double %x, 0.000000e+00 %d = select i1 %c, double %x, double 0.000000e+00 @@ -395,14 +516,18 @@ ; CHECK: x_uge_inverse: ; CHECK-NEXT: pxor %xmm1, %xmm1 -; CHECK-NEXT: minsd %xmm0, %xmm1 -; CHECK-NEXT: movapd %xmm1, %xmm0 +; CHECK-NEXT: minsd %xmm1, %xmm0 ; CHECK-NEXT: ret ; UNSAFE: x_uge_inverse: ; UNSAFE-NEXT: pxor %xmm1, %xmm1 ; UNSAFE-NEXT: minsd %xmm0, %xmm1 ; UNSAFE-NEXT: movapd %xmm1, %xmm0 ; UNSAFE-NEXT: ret +; FINITE: x_uge_inverse: +; FINITE-NEXT: pxor %xmm1, %xmm1 +; FINITE-NEXT: minsd %xmm0, %xmm1 +; FINITE-NEXT: movapd %xmm1, %xmm0 +; FINITE-NEXT: ret define double @x_uge_inverse(double %x) nounwind { %c = fcmp uge double %x, 0.000000e+00 %d = select i1 %c, double 0.000000e+00, double %x @@ -411,26 +536,303 @@ ; CHECK: x_ule_inverse: ; CHECK-NEXT: pxor %xmm1, %xmm1 -; CHECK-NEXT: maxsd %xmm0, %xmm1 -; CHECK-NEXT: movapd %xmm1, %xmm0 +; CHECK-NEXT: maxsd %xmm1, %xmm0 ; CHECK-NEXT: ret ; UNSAFE: x_ule_inverse: ; UNSAFE-NEXT: pxor %xmm1, %xmm1 ; UNSAFE-NEXT: maxsd %xmm0, %xmm1 ; UNSAFE-NEXT: movapd %xmm1, %xmm0 ; UNSAFE-NEXT: ret +; FINITE: x_ule_inverse: +; FINITE-NEXT: pxor %xmm1, %xmm1 +; FINITE-NEXT: maxsd %xmm0, %xmm1 +; FINITE-NEXT: movapd %xmm1, %xmm0 +; FINITE-NEXT: ret define double @x_ule_inverse(double %x) nounwind { %c = fcmp ule double %x, 0.000000e+00 %d = select i1 %c, double 0.000000e+00, double %x ret double %d } +; CHECK: y_ogt: +; CHECK-NEXT: maxsd {{[^,]*}}, %xmm0 +; CHECK-NEXT: ret +; UNSAFE: y_ogt: +; UNSAFE-NEXT: maxsd {{[^,]*}}, %xmm0 +; UNSAFE-NEXT: ret +; FINITE: y_ogt: +; FINITE-NEXT: maxsd {{[^,]*}}, %xmm0 +; FINITE-NEXT: ret +define double @y_ogt(double %x) nounwind { + %c = fcmp ogt double %x, -0.000000e+00 + %d = select i1 %c, double %x, double -0.000000e+00 + ret double %d +} + +; CHECK: y_olt: +; CHECK-NEXT: minsd {{[^,]*}}, %xmm0 +; CHECK-NEXT: ret +; UNSAFE: y_olt: +; UNSAFE-NEXT: minsd {{[^,]*}}, %xmm0 +; UNSAFE-NEXT: ret +; FINITE: y_olt: +; FINITE-NEXT: minsd {{[^,]*}}, %xmm0 +; FINITE-NEXT: ret +define double @y_olt(double %x) nounwind { + %c = fcmp olt double %x, -0.000000e+00 + %d = select i1 %c, double %x, double -0.000000e+00 + ret double %d +} + +; CHECK: y_ogt_inverse: +; CHECK-NEXT: movsd {{[^,]*}}, %xmm1 +; CHECK-NEXT: minsd %xmm0, %xmm1 +; CHECK-NEXT: movapd %xmm1, %xmm0 +; CHECK-NEXT: ret +; UNSAFE: y_ogt_inverse: +; UNSAFE-NEXT: movsd {{[^,]*}}, %xmm1 +; UNSAFE-NEXT: minsd %xmm0, %xmm1 +; UNSAFE-NEXT: movapd %xmm1, %xmm0 +; UNSAFE-NEXT: ret +; FINITE: y_ogt_inverse: +; FINITE-NEXT: movsd {{[^,]*}}, %xmm1 +; FINITE-NEXT: minsd %xmm0, %xmm1 +; FINITE-NEXT: movapd %xmm1, %xmm0 +; FINITE-NEXT: ret +define double @y_ogt_inverse(double %x) nounwind { + %c = fcmp ogt double %x, -0.000000e+00 + %d = select i1 %c, double -0.000000e+00, double %x + ret double %d +} + +; CHECK: y_olt_inverse: +; CHECK-NEXT: movsd {{[^,]*}}, %xmm1 +; CHECK-NEXT: maxsd %xmm0, %xmm1 +; CHECK-NEXT: movapd %xmm1, %xmm0 +; CHECK-NEXT: ret +; UNSAFE: y_olt_inverse: +; UNSAFE-NEXT: movsd {{[^,]*}}, %xmm1 +; UNSAFE-NEXT: maxsd %xmm0, %xmm1 +; UNSAFE-NEXT: movapd %xmm1, %xmm0 +; UNSAFE-NEXT: ret +; FINITE: y_olt_inverse: +; FINITE-NEXT: movsd {{[^,]*}}, %xmm1 +; FINITE-NEXT: maxsd %xmm0, %xmm1 +; FINITE-NEXT: movapd %xmm1, %xmm0 +; FINITE-NEXT: ret +define double @y_olt_inverse(double %x) nounwind { + %c = fcmp olt double %x, -0.000000e+00 + %d = select i1 %c, double -0.000000e+00, double %x + ret double %d +} + +; CHECK: y_oge: +; CHECK: ucomisd %xmm1, %xmm0 +; UNSAFE: y_oge: +; UNSAFE-NEXT: maxsd {{[^,]*}}, %xmm0 +; UNSAFE-NEXT: ret +; FINITE: y_oge: +; FINITE-NEXT: maxsd {{[^,]*}}, %xmm0 +; FINITE-NEXT: ret +define double @y_oge(double %x) nounwind { + %c = fcmp oge double %x, -0.000000e+00 + %d = select i1 %c, double %x, double -0.000000e+00 + ret double %d +} + +; CHECK: y_ole: +; CHECK: ucomisd %xmm0, %xmm1 +; UNSAFE: y_ole: +; UNSAFE-NEXT: minsd {{[^,]*}}, %xmm0 +; UNSAFE-NEXT: ret +; FINITE: y_ole: +; FINITE-NEXT: minsd {{[^,]*}}, %xmm0 +; FINITE-NEXT: ret +define double @y_ole(double %x) nounwind { + %c = fcmp ole double %x, -0.000000e+00 + %d = select i1 %c, double %x, double -0.000000e+00 + ret double %d +} + +; CHECK: y_oge_inverse: +; CHECK: ucomisd %xmm1, %xmm0 +; UNSAFE: y_oge_inverse: +; UNSAFE-NEXT: movsd {{[^,]*}}, %xmm1 +; UNSAFE-NEXT: minsd %xmm0, %xmm1 +; UNSAFE-NEXT: movapd %xmm1, %xmm0 +; UNSAFE-NEXT: ret +; FINITE: y_oge_inverse: +; FINITE-NEXT: movsd {{[^,]*}}, %xmm1 +; FINITE-NEXT: minsd %xmm0, %xmm1 +; FINITE-NEXT: movapd %xmm1, %xmm0 +; FINITE-NEXT: ret +define double @y_oge_inverse(double %x) nounwind { + %c = fcmp oge double %x, -0.000000e+00 + %d = select i1 %c, double -0.000000e+00, double %x + ret double %d +} + +; CHECK: y_ole_inverse: +; CHECK: ucomisd %xmm0, %xmm1 +; UNSAFE: y_ole_inverse: +; UNSAFE-NEXT: movsd {{[^,]*}}, %xmm1 +; UNSAFE-NEXT: maxsd %xmm0, %xmm1 +; UNSAFE-NEXT: movapd %xmm1, %xmm0 +; UNSAFE-NEXT: ret +; FINITE: y_ole_inverse: +; FINITE-NEXT: movsd {{[^,]*}}, %xmm1 +; FINITE-NEXT: maxsd %xmm0, %xmm1 +; FINITE-NEXT: movapd %xmm1, %xmm0 +; FINITE-NEXT: ret +define double @y_ole_inverse(double %x) nounwind { + %c = fcmp ole double %x, -0.000000e+00 + %d = select i1 %c, double -0.000000e+00, double %x + ret double %d +} + +; CHECK: y_ugt: +; CHECK: ucomisd %xmm0, %xmm1 +; UNSAFE: y_ugt: +; UNSAFE-NEXT: maxsd {{[^,]*}}, %xmm0 +; UNSAFE-NEXT: ret +; FINITE: y_ugt: +; FINITE-NEXT: maxsd {{[^,]*}}, %xmm0 +; FINITE-NEXT: ret +define double @y_ugt(double %x) nounwind { + %c = fcmp ugt double %x, -0.000000e+00 + %d = select i1 %c, double %x, double -0.000000e+00 + ret double %d +} + +; CHECK: y_ult: +; CHECK: ucomisd %xmm1, %xmm0 +; UNSAFE: y_ult: +; UNSAFE-NEXT: minsd {{[^,]*}}, %xmm0 +; UNSAFE-NEXT: ret +; FINITE: y_ult: +; FINITE-NEXT: minsd {{[^,]*}}, %xmm0 +; FINITE-NEXT: ret +define double @y_ult(double %x) nounwind { + %c = fcmp ult double %x, -0.000000e+00 + %d = select i1 %c, double %x, double -0.000000e+00 + ret double %d +} + +; CHECK: y_ugt_inverse: +; CHECK: ucomisd %xmm0, %xmm1 +; UNSAFE: y_ugt_inverse: +; UNSAFE-NEXT: movsd {{[^,]*}}, %xmm1 +; UNSAFE-NEXT: minsd %xmm0, %xmm1 +; UNSAFE-NEXT: movapd %xmm1, %xmm0 +; UNSAFE-NEXT: ret +; FINITE: y_ugt_inverse: +; FINITE-NEXT: movsd {{[^,]*}}, %xmm1 +; FINITE-NEXT: minsd %xmm0, %xmm1 +; FINITE-NEXT: movapd %xmm1, %xmm0 +; FINITE-NEXT: ret +define double @y_ugt_inverse(double %x) nounwind { + %c = fcmp ugt double %x, -0.000000e+00 + %d = select i1 %c, double -0.000000e+00, double %x + ret double %d +} + +; CHECK: y_ult_inverse: +; CHECK: ucomisd %xmm1, %xmm0 +; UNSAFE: y_ult_inverse: +; UNSAFE-NEXT: movsd {{[^,]*}}, %xmm1 +; UNSAFE-NEXT: maxsd %xmm0, %xmm1 +; UNSAFE-NEXT: movapd %xmm1, %xmm0 +; UNSAFE-NEXT: ret +; FINITE: y_ult_inverse: +; FINITE-NEXT: movsd {{[^,]*}}, %xmm1 +; FINITE-NEXT: maxsd %xmm0, %xmm1 +; FINITE-NEXT: movapd %xmm1, %xmm0 +; FINITE-NEXT: ret +define double @y_ult_inverse(double %x) nounwind { + %c = fcmp ult double %x, -0.000000e+00 + %d = select i1 %c, double -0.000000e+00, double %x + ret double %d +} + +; CHECK: y_uge: +; CHECK-NEXT: movsd {{[^,]*}}, %xmm1 +; CHECK-NEXT: maxsd %xmm0, %xmm1 +; CHECK-NEXT: movapd %xmm1, %xmm0 +; CHECK-NEXT: ret +; UNSAFE: y_uge: +; UNSAFE-NEXT: maxsd {{[^,]*}}, %xmm0 +; UNSAFE-NEXT: ret +; FINITE: y_uge: +; FINITE-NEXT: maxsd {{[^,]*}}, %xmm0 +; FINITE-NEXT: ret +define double @y_uge(double %x) nounwind { + %c = fcmp uge double %x, -0.000000e+00 + %d = select i1 %c, double %x, double -0.000000e+00 + ret double %d +} + +; CHECK: y_ule: +; CHECK-NEXT: movsd {{[^,]*}}, %xmm1 +; CHECK-NEXT: minsd %xmm0, %xmm1 +; CHECK-NEXT: movapd %xmm1, %xmm0 +; CHECK-NEXT: ret +; UNSAFE: y_ule: +; UNSAFE-NEXT: minsd {{[^,]*}}, %xmm0 +; UNSAFE-NEXT: ret +; FINITE: y_ule: +; FINITE-NEXT: minsd {{[^,]*}}, %xmm0 +; FINITE-NEXT: ret +define double @y_ule(double %x) nounwind { + %c = fcmp ule double %x, -0.000000e+00 + %d = select i1 %c, double %x, double -0.000000e+00 + ret double %d +} + +; CHECK: y_uge_inverse: +; CHECK-NEXT: minsd {{[^,]*}}, %xmm0 +; CHECK-NEXT: ret +; UNSAFE: y_uge_inverse: +; UNSAFE-NEXT: movsd {{[^,]*}}, %xmm1 +; UNSAFE-NEXT: minsd %xmm0, %xmm1 +; UNSAFE-NEXT: movapd %xmm1, %xmm0 +; UNSAFE-NEXT: ret +; FINITE: y_uge_inverse: +; FINITE-NEXT: movsd {{[^,]*}}, %xmm1 +; FINITE-NEXT: minsd %xmm0, %xmm1 +; FINITE-NEXT: movapd %xmm1, %xmm0 +; FINITE-NEXT: ret +define double @y_uge_inverse(double %x) nounwind { + %c = fcmp uge double %x, -0.000000e+00 + %d = select i1 %c, double -0.000000e+00, double %x + ret double %d +} + +; CHECK: y_ule_inverse: +; CHECK-NEXT: maxsd {{[^,]*}}, %xmm0 +; CHECK-NEXT: ret +; UNSAFE: y_ule_inverse: +; UNSAFE-NEXT: movsd {{[^,]*}}, %xmm1 +; UNSAFE-NEXT: maxsd %xmm0, %xmm1 +; UNSAFE-NEXT: movapd %xmm1, %xmm0 +; UNSAFE-NEXT: ret +; FINITE: y_ule_inverse: +; FINITE-NEXT: movsd {{[^,]*}}, %xmm1 +; FINITE-NEXT: maxsd %xmm0, %xmm1 +; FINITE-NEXT: movapd %xmm1, %xmm0 +; FINITE-NEXT: ret +define double @y_ule_inverse(double %x) nounwind { + %c = fcmp ule double %x, -0.000000e+00 + %d = select i1 %c, double -0.000000e+00, double %x + ret double %d +} ; Test a few more misc. cases. ; CHECK: clampTo3k_a: ; CHECK: minsd ; UNSAFE: clampTo3k_a: ; UNSAFE: minsd +; FINITE: clampTo3k_a: +; FINITE: minsd define double @clampTo3k_a(double %x) nounwind readnone { entry: %0 = fcmp ogt double %x, 3.000000e+03 ; [#uses=1] @@ -442,6 +844,8 @@ ; CHECK: minsd ; UNSAFE: clampTo3k_b: ; UNSAFE: minsd +; FINITE: clampTo3k_b: +; FINITE: minsd define double @clampTo3k_b(double %x) nounwind readnone { entry: %0 = fcmp uge double %x, 3.000000e+03 ; [#uses=1] @@ -453,6 +857,8 @@ ; CHECK: maxsd ; UNSAFE: clampTo3k_c: ; UNSAFE: maxsd +; FINITE: clampTo3k_c: +; FINITE: maxsd define double @clampTo3k_c(double %x) nounwind readnone { entry: %0 = fcmp olt double %x, 3.000000e+03 ; [#uses=1] @@ -464,6 +870,8 @@ ; CHECK: maxsd ; UNSAFE: clampTo3k_d: ; UNSAFE: maxsd +; FINITE: clampTo3k_d: +; FINITE: maxsd define double @clampTo3k_d(double %x) nounwind readnone { entry: %0 = fcmp ule double %x, 3.000000e+03 ; [#uses=1] @@ -475,6 +883,8 @@ ; CHECK: maxsd ; UNSAFE: clampTo3k_e: ; UNSAFE: maxsd +; FINITE: clampTo3k_e: +; FINITE: maxsd define double @clampTo3k_e(double %x) nounwind readnone { entry: %0 = fcmp olt double %x, 3.000000e+03 ; [#uses=1] @@ -486,6 +896,8 @@ ; CHECK: maxsd ; UNSAFE: clampTo3k_f: ; UNSAFE: maxsd +; FINITE: clampTo3k_f: +; FINITE: maxsd define double @clampTo3k_f(double %x) nounwind readnone { entry: %0 = fcmp ule double %x, 3.000000e+03 ; [#uses=1] @@ -497,6 +909,8 @@ ; CHECK: minsd ; UNSAFE: clampTo3k_g: ; UNSAFE: minsd +; FINITE: clampTo3k_g: +; FINITE: minsd define double @clampTo3k_g(double %x) nounwind readnone { entry: %0 = fcmp ogt double %x, 3.000000e+03 ; [#uses=1] @@ -508,6 +922,8 @@ ; CHECK: minsd ; UNSAFE: clampTo3k_h: ; UNSAFE: minsd +; FINITE: clampTo3k_h: +; FINITE: minsd define double @clampTo3k_h(double %x) nounwind readnone { entry: %0 = fcmp uge double %x, 3.000000e+03 ; [#uses=1] From daniel at zuster.org Wed Feb 24 00:55:22 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Wed, 24 Feb 2010 06:55:22 -0000 Subject: [llvm-commits] [llvm] r97027 - in /llvm/trunk: include/llvm/Analysis/PHITransAddr.h lib/Analysis/MemoryDependenceAnalysis.cpp lib/Analysis/PHITransAddr.cpp lib/Transforms/Scalar/GVN.cpp Message-ID: <20100224065522.C26FE2A6C12C@llvm.org> Author: ddunbar Date: Wed Feb 24 00:55:22 2010 New Revision: 97027 URL: http://llvm.org/viewvc/llvm-project?rev=97027&view=rev Log: Speculatively revert r97010, "Add an argument to PHITranslateValue to specify the DominatorTree. ...", in hopes of restoring poor old PPC bootstrap. Modified: llvm/trunk/include/llvm/Analysis/PHITransAddr.h llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp llvm/trunk/lib/Analysis/PHITransAddr.cpp llvm/trunk/lib/Transforms/Scalar/GVN.cpp Modified: llvm/trunk/include/llvm/Analysis/PHITransAddr.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/PHITransAddr.h?rev=97027&r1=97026&r2=97027&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/PHITransAddr.h (original) +++ llvm/trunk/include/llvm/Analysis/PHITransAddr.h Wed Feb 24 00:55:22 2010 @@ -66,11 +66,9 @@ bool IsPotentiallyPHITranslatable() const; /// PHITranslateValue - PHI translate the current address up the CFG from - /// CurBB to Pred, updating our state to reflect any needed changes. If the - /// dominator tree DT is non-null, the translated value must dominate - /// PredBB. This returns true on failure and sets Addr to null. - bool PHITranslateValue(BasicBlock *CurBB, BasicBlock *PredBB, - const DominatorTree *DT); + /// CurBB to Pred, updating our state the reflect any needed changes. This + /// returns true on failure and sets Addr to null. + bool PHITranslateValue(BasicBlock *CurBB, BasicBlock *PredBB); /// PHITranslateWithInsertion - PHI translate this value into the specified /// predecessor block, inserting a computation of the value if it is @@ -90,8 +88,14 @@ /// returns false. bool Verify() const; private: - Value *PHITranslateSubExpr(Value *V, BasicBlock *CurBB, BasicBlock *PredBB, - const DominatorTree *DT); + Value *PHITranslateSubExpr(Value *V, BasicBlock *CurBB, BasicBlock *PredBB); + + + /// GetAvailablePHITranslatedSubExpr - Return the value computed by + /// PHITranslateSubExpr if it dominates PredBB, otherwise return null. + Value *GetAvailablePHITranslatedSubExpr(Value *V, + BasicBlock *CurBB, BasicBlock *PredBB, + const DominatorTree &DT) const; /// InsertPHITranslatedSubExpr - Insert a computation of the PHI translated /// version of 'V' for the edge PredBB->CurBB into the end of the PredBB Modified: llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp?rev=97027&r1=97026&r2=97027&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp (original) +++ llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp Wed Feb 24 00:55:22 2010 @@ -861,7 +861,7 @@ // Get the PHI translated pointer in this predecessor. This can fail if // not translatable, in which case the getAddr() returns null. PHITransAddr PredPointer(Pointer); - PredPointer.PHITranslateValue(BB, Pred, 0); + PredPointer.PHITranslateValue(BB, Pred); Value *PredPtrVal = PredPointer.getAddr(); Modified: llvm/trunk/lib/Analysis/PHITransAddr.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/PHITransAddr.cpp?rev=97027&r1=97026&r2=97027&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/PHITransAddr.cpp (original) +++ llvm/trunk/lib/Analysis/PHITransAddr.cpp Wed Feb 24 00:55:22 2010 @@ -134,8 +134,7 @@ } Value *PHITransAddr::PHITranslateSubExpr(Value *V, BasicBlock *CurBB, - BasicBlock *PredBB, - const DominatorTree *DT) { + BasicBlock *PredBB) { // If this is a non-instruction value, it can't require PHI translation. Instruction *Inst = dyn_cast(V); if (Inst == 0) return V; @@ -178,7 +177,7 @@ // operands need to be phi translated, and if so, reconstruct it. if (BitCastInst *BC = dyn_cast(Inst)) { - Value *PHIIn = PHITranslateSubExpr(BC->getOperand(0), CurBB, PredBB, DT); + Value *PHIIn = PHITranslateSubExpr(BC->getOperand(0), CurBB, PredBB); if (PHIIn == 0) return 0; if (PHIIn == BC->getOperand(0)) return BC; @@ -194,8 +193,7 @@ for (Value::use_iterator UI = PHIIn->use_begin(), E = PHIIn->use_end(); UI != E; ++UI) { if (BitCastInst *BCI = dyn_cast(*UI)) - if (BCI->getType() == BC->getType() && - (!DT || DT->dominates(BCI->getParent(), PredBB))) + if (BCI->getType() == BC->getType()) return BCI; } return 0; @@ -206,7 +204,7 @@ SmallVector GEPOps; bool AnyChanged = false; for (unsigned i = 0, e = GEP->getNumOperands(); i != e; ++i) { - Value *GEPOp = PHITranslateSubExpr(GEP->getOperand(i), CurBB, PredBB, DT); + Value *GEPOp = PHITranslateSubExpr(GEP->getOperand(i), CurBB, PredBB); if (GEPOp == 0) return 0; AnyChanged |= GEPOp != GEP->getOperand(i); @@ -231,8 +229,7 @@ if (GetElementPtrInst *GEPI = dyn_cast(*UI)) if (GEPI->getType() == GEP->getType() && GEPI->getNumOperands() == GEPOps.size() && - GEPI->getParent()->getParent() == CurBB->getParent() && - (!DT || DT->dominates(GEPI->getParent(), PredBB))) { + GEPI->getParent()->getParent() == CurBB->getParent()) { bool Mismatch = false; for (unsigned i = 0, e = GEPOps.size(); i != e; ++i) if (GEPI->getOperand(i) != GEPOps[i]) { @@ -254,7 +251,7 @@ bool isNSW = cast(Inst)->hasNoSignedWrap(); bool isNUW = cast(Inst)->hasNoUnsignedWrap(); - Value *LHS = PHITranslateSubExpr(Inst->getOperand(0), CurBB, PredBB, DT); + Value *LHS = PHITranslateSubExpr(Inst->getOperand(0), CurBB, PredBB); if (LHS == 0) return 0; // If the PHI translated LHS is an add of a constant, fold the immediates. @@ -290,8 +287,7 @@ if (BinaryOperator *BO = dyn_cast(*UI)) if (BO->getOpcode() == Instruction::Add && BO->getOperand(0) == LHS && BO->getOperand(1) == RHS && - BO->getParent()->getParent() == CurBB->getParent() && - (!DT || DT->dominates(BO->getParent(), PredBB))) + BO->getParent()->getParent() == CurBB->getParent()) return BO; } @@ -304,25 +300,34 @@ /// PHITranslateValue - PHI translate the current address up the CFG from -/// CurBB to Pred, updating our state to reflect any needed changes. If the -/// dominator tree DT is non-null, the translated value must dominate -/// PredBB. This returns true on failure and sets Addr to null. -bool PHITransAddr::PHITranslateValue(BasicBlock *CurBB, BasicBlock *PredBB, - const DominatorTree *DT) { +/// CurBB to Pred, updating our state the reflect any needed changes. This +/// returns true on failure and sets Addr to null. +bool PHITransAddr::PHITranslateValue(BasicBlock *CurBB, BasicBlock *PredBB) { assert(Verify() && "Invalid PHITransAddr!"); - Addr = PHITranslateSubExpr(Addr, CurBB, PredBB, DT); + Addr = PHITranslateSubExpr(Addr, CurBB, PredBB); assert(Verify() && "Invalid PHITransAddr!"); - - if (DT) { - // Make sure the value is live in the predecessor. - if (Instruction *Inst = dyn_cast_or_null(Addr)) - if (!DT->dominates(Inst->getParent(), PredBB)) - Addr = 0; - } - return Addr == 0; } +/// GetAvailablePHITranslatedSubExpr - Return the value computed by +/// PHITranslateSubExpr if it dominates PredBB, otherwise return null. +Value *PHITransAddr:: +GetAvailablePHITranslatedSubExpr(Value *V, BasicBlock *CurBB,BasicBlock *PredBB, + const DominatorTree &DT) const { + PHITransAddr Tmp(V, TD); + Tmp.PHITranslateValue(CurBB, PredBB); + + // See if PHI translation succeeds. + V = Tmp.getAddr(); + + // Make sure the value is live in the predecessor. + if (Instruction *Inst = dyn_cast_or_null(V)) + if (!DT.dominates(Inst->getParent(), PredBB)) + return 0; + return V; +} + + /// PHITranslateWithInsertion - PHI translate this value into the specified /// predecessor block, inserting a computation of the value if it is /// unavailable. @@ -360,9 +365,8 @@ SmallVectorImpl &NewInsts) { // See if we have a version of this value already available and dominating // PredBB. If so, there is no need to insert a new instance of it. - PHITransAddr Tmp(InVal, TD); - if (!Tmp.PHITranslateValue(CurBB, PredBB, &DT)) - return Tmp.getAddr(); + if (Value *Res = GetAvailablePHITranslatedSubExpr(InVal, CurBB, PredBB, DT)) + return Res; // If we don't have an available version of this value, it must be an // instruction. Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=97027&r1=97026&r2=97027&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Wed Feb 24 00:55:22 2010 @@ -1633,8 +1633,13 @@ LoadPtr = Address.PHITranslateWithInsertion(LoadBB, UnavailablePred, *DT, NewInsts); } else { - Address.PHITranslateValue(LoadBB, UnavailablePred, DT); + Address.PHITranslateValue(LoadBB, UnavailablePred); LoadPtr = Address.getAddr(); + + // Make sure the value is live in the predecessor. + if (Instruction *Inst = dyn_cast_or_null(LoadPtr)) + if (!DT->dominates(Inst->getParent(), UnavailablePred)) + LoadPtr = 0; } // If we couldn't find or insert a computation of this phi translated value, From gohman at apple.com Wed Feb 24 01:06:20 2010 From: gohman at apple.com (Dan Gohman) Date: Wed, 24 Feb 2010 07:06:20 -0000 Subject: [llvm-commits] [llvm] r97028 - in /llvm/trunk: lib/Target/MBlaze/ lib/Target/MBlaze/AsmPrinter/ lib/Target/MBlaze/TargetInfo/ test/CodeGen/MBlaze/ Message-ID: <20100224070620.709372A6C12C@llvm.org> Author: djg Date: Wed Feb 24 01:06:20 2010 New Revision: 97028 URL: http://llvm.org/viewvc/llvm-project?rev=97028&view=rev Log: Add svn:ignore properties. Modified: llvm/trunk/lib/Target/MBlaze/ (props changed) llvm/trunk/lib/Target/MBlaze/AsmPrinter/ (props changed) llvm/trunk/lib/Target/MBlaze/TargetInfo/ (props changed) llvm/trunk/test/CodeGen/MBlaze/ (props changed) Propchange: llvm/trunk/lib/Target/MBlaze/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Wed Feb 24 01:06:20 2010 @@ -0,0 +1,8 @@ +Debug +Release +Release-Asserts +*.inc +Debug+Coverage-Asserts +Debug+Coverage +Release+Coverage +Debug+Checks Propchange: llvm/trunk/lib/Target/MBlaze/AsmPrinter/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Wed Feb 24 01:06:20 2010 @@ -0,0 +1,7 @@ +Debug +Release +Release-Asserts +Debug+Coverage-Asserts +Debug+Coverage +Release+Coverage +Debug+Checks Propchange: llvm/trunk/lib/Target/MBlaze/TargetInfo/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Wed Feb 24 01:06:20 2010 @@ -0,0 +1,7 @@ +Debug +Release +Release-Asserts +Debug+Coverage-Asserts +Debug+Coverage +Release+Coverage +Debug+Checks Propchange: llvm/trunk/test/CodeGen/MBlaze/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Wed Feb 24 01:06:20 2010 @@ -0,0 +1,3 @@ +Output +*.log +*.sum From sabre at nondot.org Wed Feb 24 01:06:51 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 24 Feb 2010 07:06:51 -0000 Subject: [llvm-commits] [llvm] r97029 - in /llvm/trunk/utils/TableGen: CMakeLists.txt DAGISelEmitter.cpp DAGISelMatcher.h DAGISelMatcherOpt.cpp Message-ID: <20100224070651.2DBFE2A6C12C@llvm.org> Author: lattner Date: Wed Feb 24 01:06:50 2010 New Revision: 97029 URL: http://llvm.org/viewvc/llvm-project?rev=97029&view=rev Log: The new isel passes all tests, time to start making it go fast. Also add an easy macro at the top of DAGISelEmitter.cpp to enable it. Lets see if I can avoid accidentally turning it on :) Added: llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Modified: llvm/trunk/utils/TableGen/CMakeLists.txt llvm/trunk/utils/TableGen/DAGISelEmitter.cpp llvm/trunk/utils/TableGen/DAGISelMatcher.h Modified: llvm/trunk/utils/TableGen/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CMakeLists.txt?rev=97029&r1=97028&r2=97029&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/CMakeLists.txt (original) +++ llvm/trunk/utils/TableGen/CMakeLists.txt Wed Feb 24 01:06:50 2010 @@ -11,6 +11,7 @@ DAGISelEmitter.cpp DAGISelMatcherEmitter.cpp DAGISelMatcherGen.cpp + DAGISelMatcherOpt.cpp DAGISelMatcher.cpp DisassemblerEmitter.cpp EDEmitter.cpp Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=97029&r1=97028&r2=97029&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Wed Feb 24 01:06:50 2010 @@ -24,6 +24,9 @@ #include using namespace llvm; +//#define ENABLE_NEW_ISEL + + static cl::opt GenDebug("gen-debug", cl::desc("Generate debug code"), cl::init(false)); @@ -1791,6 +1794,9 @@ OS << "// The main instruction selector code.\n" << "SDNode *SelectCode(SDNode *N) {\n" +#ifdef ENABLE_NEW_ISEL + << " return SelectCode2(N);\n" +#endif << " MVT::SimpleValueType NVT = N->getValueType(0).getSimpleVT().SimpleTy;\n" << " switch (N->getOpcode()) {\n" << " default:\n" @@ -1946,7 +1952,7 @@ // definitions. Emit the resultant instruction selector. EmitInstructionSelector(OS); -#if 0 +#ifdef ENABLE_NEW_ISEL MatcherNode *Matcher = 0; // Add all the patterns to a temporary list so we can sort them. @@ -1977,7 +1983,7 @@ Matcher = new PushMatcherNode(N, Matcher); } - // OptimizeMatcher(Matcher); + OptimizeMatcher(Matcher); //Matcher->dump(); EmitMatcherTable(Matcher, OS); delete Matcher; Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.h?rev=97029&r1=97028&r2=97029&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcher.h (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcher.h Wed Feb 24 01:06:50 2010 @@ -26,7 +26,7 @@ MatcherNode *ConvertPatternToMatcher(const PatternToMatch &Pattern, const CodeGenDAGPatterns &CGP); - +void OptimizeMatcher(const MatcherNode *Matcher); void EmitMatcherTable(const MatcherNode *Matcher, raw_ostream &OS); Added: llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp?rev=97029&view=auto ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp (added) +++ llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Wed Feb 24 01:06:50 2010 @@ -0,0 +1,19 @@ +//===- DAGISelMatcherOpt.cpp - Optimize a DAG Matcher ---------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file implements the DAG Matcher optimizer. +// +//===----------------------------------------------------------------------===// + +#include "DAGISelMatcher.h" +using namespace llvm; + +void llvm::OptimizeMatcher(const MatcherNode *Matcher) { + // Nothing yet. +} From sabre at nondot.org Wed Feb 24 01:31:46 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 24 Feb 2010 07:31:46 -0000 Subject: [llvm-commits] [llvm] r97031 - in /llvm/trunk: include/llvm/CodeGen/DAGISelHeader.h utils/TableGen/DAGISelEmitter.cpp utils/TableGen/DAGISelMatcher.cpp utils/TableGen/DAGISelMatcher.h utils/TableGen/DAGISelMatcherEmitter.cpp utils/TableGen/DAGISelMatcherOpt.cpp Message-ID: <20100224073146.274372A6C12C@llvm.org> Author: lattner Date: Wed Feb 24 01:31:45 2010 New Revision: 97031 URL: http://llvm.org/viewvc/llvm-project?rev=97031&view=rev Log: implement a simple proof-of-concept optimization for the new isel: fold movechild+record+moveparent into a single recordchild N node. This shrinks the X86 table from 125443 to 117502 bytes. Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h llvm/trunk/utils/TableGen/DAGISelEmitter.cpp llvm/trunk/utils/TableGen/DAGISelMatcher.cpp llvm/trunk/utils/TableGen/DAGISelMatcher.h llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h?rev=97031&r1=97030&r2=97031&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h (original) +++ llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Wed Feb 24 01:31:45 2010 @@ -221,6 +221,8 @@ enum BuiltinOpcodes { OPC_Push, OPC_Push2, OPC_RecordNode, + OPC_RecordChild0, OPC_RecordChild1, OPC_RecordChild2, OPC_RecordChild3, + OPC_RecordChild4, OPC_RecordChild5, OPC_RecordChild6, OPC_RecordChild7, OPC_RecordMemRef, OPC_CaptureFlagInput, OPC_MoveChild, @@ -365,7 +367,8 @@ unsigned MatcherIndex = 0; while (1) { assert(MatcherIndex < TableSize && "Invalid index"); - switch ((BuiltinOpcodes)MatcherTable[MatcherIndex++]) { + BuiltinOpcodes Opcode = (BuiltinOpcodes)MatcherTable[MatcherIndex++]; + switch (Opcode) { case OPC_Push: { unsigned NumToSkip = MatcherTable[MatcherIndex++]; MatchScope NewEntry; @@ -398,6 +401,18 @@ // Remember this node, it may end up being an operand in the pattern. RecordedNodes.push_back(N); continue; + + case OPC_RecordChild0: case OPC_RecordChild1: + case OPC_RecordChild2: case OPC_RecordChild3: + case OPC_RecordChild4: case OPC_RecordChild5: + case OPC_RecordChild6: case OPC_RecordChild7: { + unsigned ChildNo = Opcode-OPC_RecordChild0; + if (ChildNo >= N.getNumOperands()) + break; // Match fails if out of range child #. + + RecordedNodes.push_back(N->getOperand(ChildNo)); + continue; + } case OPC_RecordMemRef: MatchedMemRefs.push_back(cast(N)->getMemOperand()); continue; @@ -410,10 +425,10 @@ continue; case OPC_MoveChild: { - unsigned Child = MatcherTable[MatcherIndex++]; - if (Child >= N.getNumOperands()) + unsigned ChildNo = MatcherTable[MatcherIndex++]; + if (ChildNo >= N.getNumOperands()) break; // Match fails if out of range child #. - N = N.getOperand(Child); + N = N.getOperand(ChildNo); NodeStack.push_back(N); continue; } Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=97031&r1=97030&r2=97031&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Wed Feb 24 01:31:45 2010 @@ -1983,7 +1983,7 @@ Matcher = new PushMatcherNode(N, Matcher); } - OptimizeMatcher(Matcher); + Matcher = OptimizeMatcher(Matcher); //Matcher->dump(); EmitMatcherTable(Matcher, OS); delete Matcher; Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.cpp?rev=97031&r1=97030&r2=97031&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcher.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcher.cpp Wed Feb 24 01:31:45 2010 @@ -35,6 +35,11 @@ printNext(OS, indent); } +void RecordChildMatcherNode::print(raw_ostream &OS, unsigned indent) const { + OS.indent(indent) << "RecordChild: " << ChildNo << '\n'; + printNext(OS, indent); +} + void RecordMemRefMatcherNode::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "RecordMemRef\n"; printNext(OS, indent); Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.h?rev=97031&r1=97030&r2=97031&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcher.h (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcher.h Wed Feb 24 01:31:45 2010 @@ -26,7 +26,7 @@ MatcherNode *ConvertPatternToMatcher(const PatternToMatch &Pattern, const CodeGenDAGPatterns &CGP); -void OptimizeMatcher(const MatcherNode *Matcher); +MatcherNode *OptimizeMatcher(MatcherNode *Matcher); void EmitMatcherTable(const MatcherNode *Matcher, raw_ostream &OS); @@ -41,6 +41,7 @@ // Matcher state manipulation. Push, // Push a checking scope. RecordNode, // Record the current node. + RecordChild, // Record a child of the current node. RecordMemRef, // Record the memref in the current node. CaptureFlagInput, // If the current node has an input flag, save it. MoveChild, // Move current node to specified child. @@ -86,6 +87,9 @@ MatcherNode *getNext() { return Next.get(); } const MatcherNode *getNext() const { return Next.get(); } void setNext(MatcherNode *C) { Next.reset(C); } + MatcherNode *takeNext() { return Next.take(); } + + OwningPtr &getNextPtr() { return Next; } static inline bool classof(const MatcherNode *) { return true; } @@ -109,6 +113,7 @@ MatcherNode *getFailure() { return Failure.get(); } const MatcherNode *getFailure() const { return Failure.get(); } void setFailure(MatcherNode *N) { Failure.reset(N); } + OwningPtr &getFailurePtr() { return Failure; } static inline bool classof(const MatcherNode *N) { return N->getKind() == Push; @@ -135,6 +140,29 @@ virtual void print(raw_ostream &OS, unsigned indent = 0) const; }; +/// RecordChildMatcherNode - Save a numbered child of the current node, or fail +/// the match if it doesn't exist. This is logically equivalent to: +/// MoveChild N + RecordNode + MoveParent. +class RecordChildMatcherNode : public MatcherNode { + unsigned ChildNo; + + /// WhatFor - This is a string indicating why we're recording this. This + /// should only be used for comment generation not anything semantic. + std::string WhatFor; +public: + RecordChildMatcherNode(unsigned childno, const std::string &whatfor) + : MatcherNode(RecordChild), ChildNo(childno), WhatFor(whatfor) {} + + unsigned getChildNo() const { return ChildNo; } + const std::string &getWhatFor() const { return WhatFor; } + + static inline bool classof(const MatcherNode *N) { + return N->getKind() == RecordChild; + } + + virtual void print(raw_ostream &OS, unsigned indent = 0) const; +}; + /// RecordMemRefMatcherNode - Save the current node's memref. class RecordMemRefMatcherNode : public MatcherNode { public: Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp?rev=97031&r1=97030&r2=97031&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Wed Feb 24 01:31:45 2010 @@ -159,6 +159,13 @@ OS.PadToColumn(CommentIndent) << "// " << cast(N)->getWhatFor() << '\n'; return 1; + + case MatcherNode::RecordChild: + OS << "OPC_RecordChild" << cast(N)->getChildNo() + << ','; + OS.PadToColumn(CommentIndent) << "// " + << cast(N)->getWhatFor() << '\n'; + return 1; case MatcherNode::RecordMemRef: OS << "OPC_RecordMemRef,\n"; Modified: llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp?rev=97031&r1=97030&r2=97031&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Wed Feb 24 01:31:45 2010 @@ -14,6 +14,35 @@ #include "DAGISelMatcher.h" using namespace llvm; -void llvm::OptimizeMatcher(const MatcherNode *Matcher) { - // Nothing yet. + +static void FormRecordChildNodes(OwningPtr &Matcher) { + // If we reached the end of the chain, we're done. + MatcherNode *N = Matcher.get(); + if (N == 0) return; + + // If we have a push node, walk down both edges. + if (PushMatcherNode *Push = dyn_cast(N)) + FormRecordChildNodes(Push->getFailurePtr()); + + // If we found a movechild node, check to see if our pattern matches. + if (MoveChildMatcherNode *MC = dyn_cast(N)) { + if (RecordMatcherNode *RM = dyn_cast(MC->getNext())) + if (MoveParentMatcherNode *MP = + dyn_cast(RM->getNext())) { + MatcherNode *New + = new RecordChildMatcherNode(MC->getChildNo(), RM->getWhatFor()); + New->setNext(MP->takeNext()); + Matcher.reset(New); + return FormRecordChildNodes(Matcher); + } + } + + FormRecordChildNodes(N->getNextPtr()); +} + + +MatcherNode *llvm::OptimizeMatcher(MatcherNode *Matcher) { + OwningPtr MatcherPtr(Matcher); + FormRecordChildNodes(MatcherPtr); + return MatcherPtr.take(); } From sabre at nondot.org Wed Feb 24 01:35:10 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 24 Feb 2010 07:35:10 -0000 Subject: [llvm-commits] [llvm] r97033 - in /llvm/trunk/utils/TableGen: DAGISelEmitter.cpp DAGISelMatcherEmitter.cpp Message-ID: <20100224073510.106E52A6C12C@llvm.org> Author: lattner Date: Wed Feb 24 01:35:09 2010 New Revision: 97033 URL: http://llvm.org/viewvc/llvm-project?rev=97033&view=rev Log: Since the new instruction selector now works, I don't need to keep the old one around for comparative purposes: have the ENABLE_NEW_ISEL #define (which is not enabled on mainline) stop emitting the old isel at all, yay for build time win. Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=97033&r1=97032&r2=97033&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Wed Feb 24 01:35:09 2010 @@ -1794,9 +1794,7 @@ OS << "// The main instruction selector code.\n" << "SDNode *SelectCode(SDNode *N) {\n" -#ifdef ENABLE_NEW_ISEL << " return SelectCode2(N);\n" -#endif << " MVT::SimpleValueType NVT = N->getValueType(0).getSimpleVT().SimpleTy;\n" << " switch (N->getOpcode()) {\n" << " default:\n" @@ -1947,11 +1945,6 @@ DEBUG(errs() << "\n"); } - // At this point, we have full information about the 'Patterns' we need to - // parse, both implicitly from instructions as well as from explicit pattern - // definitions. Emit the resultant instruction selector. - EmitInstructionSelector(OS); - #ifdef ENABLE_NEW_ISEL MatcherNode *Matcher = 0; @@ -1987,5 +1980,11 @@ //Matcher->dump(); EmitMatcherTable(Matcher, OS); delete Matcher; + +#else + // At this point, we have full information about the 'Patterns' we need to + // parse, both implicitly from instructions as well as from explicit pattern + // definitions. Emit the resultant instruction selector. + EmitInstructionSelector(OS); #endif } Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp?rev=97033&r1=97032&r2=97033&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Wed Feb 24 01:35:09 2010 @@ -503,7 +503,7 @@ formatted_raw_ostream OS(O); OS << "// The main instruction selector code.\n"; - OS << "SDNode *SelectCode2(SDNode *N) {\n"; + OS << "SDNode *SelectCode(SDNode *N) {\n"; MatcherTableEmitter MatcherEmitter; From sabre at nondot.org Wed Feb 24 01:41:11 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 24 Feb 2010 07:41:11 -0000 Subject: [llvm-commits] [llvm] r97034 - /llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Message-ID: <20100224074111.696E62A6C12C@llvm.org> Author: lattner Date: Wed Feb 24 01:41:11 2010 New Revision: 97034 URL: http://llvm.org/viewvc/llvm-project?rev=97034&view=rev Log: lets not break the old isel. Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=97034&r1=97033&r2=97034&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Wed Feb 24 01:41:11 2010 @@ -1794,7 +1794,6 @@ OS << "// The main instruction selector code.\n" << "SDNode *SelectCode(SDNode *N) {\n" - << " return SelectCode2(N);\n" << " MVT::SimpleValueType NVT = N->getValueType(0).getSimpleVT().SimpleTy;\n" << " switch (N->getOpcode()) {\n" << " default:\n" From daniel at zuster.org Wed Feb 24 02:48:04 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Wed, 24 Feb 2010 08:48:04 -0000 Subject: [llvm-commits] [llvm] r97036 - in /llvm/trunk: include/llvm/Analysis/PHITransAddr.h lib/Analysis/MemoryDependenceAnalysis.cpp lib/Analysis/PHITransAddr.cpp lib/Transforms/Scalar/GVN.cpp Message-ID: <20100224084804.BF4F32A6C12D@llvm.org> Author: ddunbar Date: Wed Feb 24 02:48:04 2010 New Revision: 97036 URL: http://llvm.org/viewvc/llvm-project?rev=97036&view=rev Log: Reapply r97010, the speculative revert failed. Modified: llvm/trunk/include/llvm/Analysis/PHITransAddr.h llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp llvm/trunk/lib/Analysis/PHITransAddr.cpp llvm/trunk/lib/Transforms/Scalar/GVN.cpp Modified: llvm/trunk/include/llvm/Analysis/PHITransAddr.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/PHITransAddr.h?rev=97036&r1=97035&r2=97036&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/PHITransAddr.h (original) +++ llvm/trunk/include/llvm/Analysis/PHITransAddr.h Wed Feb 24 02:48:04 2010 @@ -66,9 +66,11 @@ bool IsPotentiallyPHITranslatable() const; /// PHITranslateValue - PHI translate the current address up the CFG from - /// CurBB to Pred, updating our state the reflect any needed changes. This - /// returns true on failure and sets Addr to null. - bool PHITranslateValue(BasicBlock *CurBB, BasicBlock *PredBB); + /// CurBB to Pred, updating our state to reflect any needed changes. If the + /// dominator tree DT is non-null, the translated value must dominate + /// PredBB. This returns true on failure and sets Addr to null. + bool PHITranslateValue(BasicBlock *CurBB, BasicBlock *PredBB, + const DominatorTree *DT); /// PHITranslateWithInsertion - PHI translate this value into the specified /// predecessor block, inserting a computation of the value if it is @@ -88,14 +90,8 @@ /// returns false. bool Verify() const; private: - Value *PHITranslateSubExpr(Value *V, BasicBlock *CurBB, BasicBlock *PredBB); - - - /// GetAvailablePHITranslatedSubExpr - Return the value computed by - /// PHITranslateSubExpr if it dominates PredBB, otherwise return null. - Value *GetAvailablePHITranslatedSubExpr(Value *V, - BasicBlock *CurBB, BasicBlock *PredBB, - const DominatorTree &DT) const; + Value *PHITranslateSubExpr(Value *V, BasicBlock *CurBB, BasicBlock *PredBB, + const DominatorTree *DT); /// InsertPHITranslatedSubExpr - Insert a computation of the PHI translated /// version of 'V' for the edge PredBB->CurBB into the end of the PredBB Modified: llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp?rev=97036&r1=97035&r2=97036&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp (original) +++ llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp Wed Feb 24 02:48:04 2010 @@ -861,7 +861,7 @@ // Get the PHI translated pointer in this predecessor. This can fail if // not translatable, in which case the getAddr() returns null. PHITransAddr PredPointer(Pointer); - PredPointer.PHITranslateValue(BB, Pred); + PredPointer.PHITranslateValue(BB, Pred, 0); Value *PredPtrVal = PredPointer.getAddr(); Modified: llvm/trunk/lib/Analysis/PHITransAddr.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/PHITransAddr.cpp?rev=97036&r1=97035&r2=97036&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/PHITransAddr.cpp (original) +++ llvm/trunk/lib/Analysis/PHITransAddr.cpp Wed Feb 24 02:48:04 2010 @@ -134,7 +134,8 @@ } Value *PHITransAddr::PHITranslateSubExpr(Value *V, BasicBlock *CurBB, - BasicBlock *PredBB) { + BasicBlock *PredBB, + const DominatorTree *DT) { // If this is a non-instruction value, it can't require PHI translation. Instruction *Inst = dyn_cast(V); if (Inst == 0) return V; @@ -177,7 +178,7 @@ // operands need to be phi translated, and if so, reconstruct it. if (BitCastInst *BC = dyn_cast(Inst)) { - Value *PHIIn = PHITranslateSubExpr(BC->getOperand(0), CurBB, PredBB); + Value *PHIIn = PHITranslateSubExpr(BC->getOperand(0), CurBB, PredBB, DT); if (PHIIn == 0) return 0; if (PHIIn == BC->getOperand(0)) return BC; @@ -193,7 +194,8 @@ for (Value::use_iterator UI = PHIIn->use_begin(), E = PHIIn->use_end(); UI != E; ++UI) { if (BitCastInst *BCI = dyn_cast(*UI)) - if (BCI->getType() == BC->getType()) + if (BCI->getType() == BC->getType() && + (!DT || DT->dominates(BCI->getParent(), PredBB))) return BCI; } return 0; @@ -204,7 +206,7 @@ SmallVector GEPOps; bool AnyChanged = false; for (unsigned i = 0, e = GEP->getNumOperands(); i != e; ++i) { - Value *GEPOp = PHITranslateSubExpr(GEP->getOperand(i), CurBB, PredBB); + Value *GEPOp = PHITranslateSubExpr(GEP->getOperand(i), CurBB, PredBB, DT); if (GEPOp == 0) return 0; AnyChanged |= GEPOp != GEP->getOperand(i); @@ -229,7 +231,8 @@ if (GetElementPtrInst *GEPI = dyn_cast(*UI)) if (GEPI->getType() == GEP->getType() && GEPI->getNumOperands() == GEPOps.size() && - GEPI->getParent()->getParent() == CurBB->getParent()) { + GEPI->getParent()->getParent() == CurBB->getParent() && + (!DT || DT->dominates(GEPI->getParent(), PredBB))) { bool Mismatch = false; for (unsigned i = 0, e = GEPOps.size(); i != e; ++i) if (GEPI->getOperand(i) != GEPOps[i]) { @@ -251,7 +254,7 @@ bool isNSW = cast(Inst)->hasNoSignedWrap(); bool isNUW = cast(Inst)->hasNoUnsignedWrap(); - Value *LHS = PHITranslateSubExpr(Inst->getOperand(0), CurBB, PredBB); + Value *LHS = PHITranslateSubExpr(Inst->getOperand(0), CurBB, PredBB, DT); if (LHS == 0) return 0; // If the PHI translated LHS is an add of a constant, fold the immediates. @@ -287,7 +290,8 @@ if (BinaryOperator *BO = dyn_cast(*UI)) if (BO->getOpcode() == Instruction::Add && BO->getOperand(0) == LHS && BO->getOperand(1) == RHS && - BO->getParent()->getParent() == CurBB->getParent()) + BO->getParent()->getParent() == CurBB->getParent() && + (!DT || DT->dominates(BO->getParent(), PredBB))) return BO; } @@ -300,33 +304,24 @@ /// PHITranslateValue - PHI translate the current address up the CFG from -/// CurBB to Pred, updating our state the reflect any needed changes. This -/// returns true on failure and sets Addr to null. -bool PHITransAddr::PHITranslateValue(BasicBlock *CurBB, BasicBlock *PredBB) { +/// CurBB to Pred, updating our state to reflect any needed changes. If the +/// dominator tree DT is non-null, the translated value must dominate +/// PredBB. This returns true on failure and sets Addr to null. +bool PHITransAddr::PHITranslateValue(BasicBlock *CurBB, BasicBlock *PredBB, + const DominatorTree *DT) { assert(Verify() && "Invalid PHITransAddr!"); - Addr = PHITranslateSubExpr(Addr, CurBB, PredBB); + Addr = PHITranslateSubExpr(Addr, CurBB, PredBB, DT); assert(Verify() && "Invalid PHITransAddr!"); - return Addr == 0; -} -/// GetAvailablePHITranslatedSubExpr - Return the value computed by -/// PHITranslateSubExpr if it dominates PredBB, otherwise return null. -Value *PHITransAddr:: -GetAvailablePHITranslatedSubExpr(Value *V, BasicBlock *CurBB,BasicBlock *PredBB, - const DominatorTree &DT) const { - PHITransAddr Tmp(V, TD); - Tmp.PHITranslateValue(CurBB, PredBB); - - // See if PHI translation succeeds. - V = Tmp.getAddr(); - - // Make sure the value is live in the predecessor. - if (Instruction *Inst = dyn_cast_or_null(V)) - if (!DT.dominates(Inst->getParent(), PredBB)) - return 0; - return V; -} + if (DT) { + // Make sure the value is live in the predecessor. + if (Instruction *Inst = dyn_cast_or_null(Addr)) + if (!DT->dominates(Inst->getParent(), PredBB)) + Addr = 0; + } + return Addr == 0; +} /// PHITranslateWithInsertion - PHI translate this value into the specified /// predecessor block, inserting a computation of the value if it is @@ -365,8 +360,9 @@ SmallVectorImpl &NewInsts) { // See if we have a version of this value already available and dominating // PredBB. If so, there is no need to insert a new instance of it. - if (Value *Res = GetAvailablePHITranslatedSubExpr(InVal, CurBB, PredBB, DT)) - return Res; + PHITransAddr Tmp(InVal, TD); + if (!Tmp.PHITranslateValue(CurBB, PredBB, &DT)) + return Tmp.getAddr(); // If we don't have an available version of this value, it must be an // instruction. Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=97036&r1=97035&r2=97036&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Wed Feb 24 02:48:04 2010 @@ -1633,13 +1633,8 @@ LoadPtr = Address.PHITranslateWithInsertion(LoadBB, UnavailablePred, *DT, NewInsts); } else { - Address.PHITranslateValue(LoadBB, UnavailablePred); + Address.PHITranslateValue(LoadBB, UnavailablePred, DT); LoadPtr = Address.getAddr(); - - // Make sure the value is live in the predecessor. - if (Instruction *Inst = dyn_cast_or_null(LoadPtr)) - if (!DT->dominates(Inst->getParent(), UnavailablePred)) - LoadPtr = 0; } // If we couldn't find or insert a computation of this phi translated value, From alenhar2 at llvm.org Wed Feb 24 09:57:35 2010 From: alenhar2 at llvm.org (alenhar2 at llvm.org) Date: Wed, 24 Feb 2010 15:57:35 -0000 Subject: [llvm-commits] [poolalloc] r97038 - in /poolalloc/trunk: include/dsa/DSNode.h lib/DSA/DataStructure.cpp Message-ID: <20100224155735.E9FA72A6C12C@llvm.org> Author: alenhar2 Date: Wed Feb 24 09:57:35 2010 New Revision: 97038 URL: http://llvm.org/viewvc/llvm-project?rev=97038&view=rev Log: set NodeType and fix null type check Modified: poolalloc/trunk/include/dsa/DSNode.h poolalloc/trunk/lib/DSA/DataStructure.cpp Modified: poolalloc/trunk/include/dsa/DSNode.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/DSNode.h?rev=97038&r1=97037&r2=97038&view=diff ============================================================================== --- poolalloc/trunk/include/dsa/DSNode.h (original) +++ poolalloc/trunk/include/dsa/DSNode.h Wed Feb 24 09:57:35 2010 @@ -35,7 +35,7 @@ class DSNode : public ilist_node { friend struct ilist_sentinel_traits; //Sentinel - DSNode() : NumReferrers(0), Size(0), Ty(0) {} + DSNode() : NumReferrers(0), Size(0), Ty(0), NodeType(0) {} /// NumReferrers - The number of DSNodeHandles pointing to this node... if /// this is a forwarding node, then this is the number of node handles which Modified: poolalloc/trunk/lib/DSA/DataStructure.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DataStructure.cpp?rev=97038&r1=97037&r2=97038&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/DataStructure.cpp (original) +++ poolalloc/trunk/lib/DSA/DataStructure.cpp Wed Feb 24 09:57:35 2010 @@ -122,7 +122,7 @@ //===----------------------------------------------------------------------===// DSNode::DSNode(const Type *T, DSGraph *G) -: NumReferrers(0), Size(0), ParentGraph(G), Ty(0) { +: NumReferrers(0), Size(0), ParentGraph(G), Ty(0), NodeType(0) { // Add the type entry if it is specified... if (T) mergeTypeInfo(T, 0); if (G) G->addNode(this); @@ -1206,7 +1206,7 @@ } // Merge the type entries of the two nodes together... - if ((SN->getType() || SN->getType()->getTypeID() != Type::VoidTyID) + if ((SN->getType() && SN->getType()->getTypeID() != Type::VoidTyID) && !DN->isNodeCompletelyFolded()) { DN->mergeTypeInfo(SN->getType(), NH.getOffset() - SrcNH.getOffset()); DN = NH.getNode(); From grosbach at apple.com Wed Feb 24 10:43:55 2010 From: grosbach at apple.com (Jim Grosbach) Date: Wed, 24 Feb 2010 08:43:55 -0800 Subject: [llvm-commits] [llvm] r97022 - /llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp In-Reply-To: <20100224060903.35FF32A6C12C@llvm.org> References: <20100224060903.35FF32A6C12C@llvm.org> Message-ID: Not intentional, no. Just a bit I had intended to be part of 97013, but missed. Thanks for the catch! -jim On Feb 23, 2010, at 10:09 PM, Chandler Carruth wrote: > Author: chandlerc > Date: Wed Feb 24 00:09:03 2010 > New Revision: 97022 > > URL: http://llvm.org/viewvc/llvm-project?rev=97022&view=rev > Log: > Remove an unused variable. Was this intentional? > > Modified: > llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp > > Modified: llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp?rev=97022&r1=97021&r2=97022&view=diff > ============================================================================== > --- llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp (original) > +++ llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp Wed Feb 24 00:09:03 2010 > @@ -1091,7 +1091,6 @@ > // even when FP is available in Thumb2 mode. > bool ARMBaseRegisterInfo:: > canSimplifyCallFramePseudos(MachineFunction &MF) const { > - ARMFunctionInfo *AFI = MF.getInfo(); > return hasReservedCallFrame(MF) || MF.getFrameInfo()->hasVarSizedObjects(); > } > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From daniel at zuster.org Wed Feb 24 11:05:47 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Wed, 24 Feb 2010 17:05:47 -0000 Subject: [llvm-commits] [llvm] r97040 - in /llvm/trunk: lib/CodeGen/SelectionDAG/DAGCombiner.cpp lib/CodeGen/SelectionDAG/TargetLowering.cpp lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/2010-02-23-DAGCombineBug.ll test/CodeGen/X86/critical-edge-split.ll test/CodeGen/X86/ins_subreg_coalesce-3.ll test/CodeGen/X86/trunc-to-bool.ll test/CodeGen/X86/xor-icmp.ll Message-ID: <20100224170547.C41872A6C12C@llvm.org> Author: ddunbar Date: Wed Feb 24 11:05:47 2010 New Revision: 97040 URL: http://llvm.org/viewvc/llvm-project?rev=97040&view=rev Log: Speculatively revert r97011, "Re-apply 96540 and 96556 with fixes.", again in the hopes of fixing PPC bootstrap. Removed: llvm/trunk/test/CodeGen/X86/2010-02-23-DAGCombineBug.ll Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp llvm/trunk/lib/Target/X86/X86ISelLowering.cpp llvm/trunk/test/CodeGen/X86/critical-edge-split.ll llvm/trunk/test/CodeGen/X86/ins_subreg_coalesce-3.ll llvm/trunk/test/CodeGen/X86/trunc-to-bool.ll llvm/trunk/test/CodeGen/X86/xor-icmp.ll Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=97040&r1=97039&r2=97040&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Wed Feb 24 11:05:47 2010 @@ -4655,8 +4655,7 @@ DAG.DeleteNode(Trunc); } // Replace the uses of SRL with SETCC - WorkListRemover DeadNodes(*this); - DAG.ReplaceAllUsesOfValueWith(N1, SetCC, &DeadNodes); + DAG.ReplaceAllUsesOfValueWith(N1, SetCC); removeFromWorkList(N1.getNode()); DAG.DeleteNode(N1.getNode()); return SDValue(N, 0); // Return N so it doesn't get rechecked! @@ -4664,56 +4663,6 @@ } } } - - // Transform br(xor(x, y)) -> br(x != y) - // Transform br(xor(xor(x,y), 1)) -> br (x == y) - if (N1.hasOneUse() && N1.getOpcode() == ISD::XOR) { - SDNode *TheXor = N1.getNode(); - SDValue Op0 = TheXor->getOperand(0); - SDValue Op1 = TheXor->getOperand(1); - if (Op0.getOpcode() == Op1.getOpcode()) { - // Avoid missing important xor optimizations. - SDValue Tmp = visitXOR(TheXor); - if (Tmp.getNode()) { - DEBUG(dbgs() << "\nReplacing.8 "; - TheXor->dump(&DAG); - dbgs() << "\nWith: "; - Tmp.getNode()->dump(&DAG); - dbgs() << '\n'); - WorkListRemover DeadNodes(*this); - DAG.ReplaceAllUsesOfValueWith(N1, Tmp, &DeadNodes); - removeFromWorkList(TheXor); - DAG.DeleteNode(TheXor); - return DAG.getNode(ISD::BRCOND, N->getDebugLoc(), - MVT::Other, Chain, Tmp, N2); - } - } - - if (Op0.getOpcode() != ISD::SETCC && Op1.getOpcode() != ISD::SETCC) { - bool Equal = false; - if (ConstantSDNode *RHSCI = dyn_cast(Op0)) - if (RHSCI->getAPIntValue() == 1 && Op0.hasOneUse() && - Op0.getOpcode() == ISD::XOR) { - TheXor = Op0.getNode(); - Equal = true; - } - - EVT SetCCVT = N1.getValueType(); - if (LegalTypes) - SetCCVT = TLI.getSetCCResultType(SetCCVT); - SDValue SetCC = DAG.getSetCC(TheXor->getDebugLoc(), - SetCCVT, - Op0, Op1, - Equal ? ISD::SETEQ : ISD::SETNE); - // Replace the uses of XOR with SETCC - WorkListRemover DeadNodes(*this); - DAG.ReplaceAllUsesOfValueWith(N1, SetCC, &DeadNodes); - removeFromWorkList(N1.getNode()); - DAG.DeleteNode(N1.getNode()); - return DAG.getNode(ISD::BRCOND, N->getDebugLoc(), - MVT::Other, Chain, SetCC, N2); - } - } return SDValue(); } @@ -5063,7 +5012,7 @@ assert(N->getValueType(2) == MVT::Other && "Malformed indexed loads?"); if (N->hasNUsesOfValue(0, 0) && N->hasNUsesOfValue(0, 1)) { SDValue Undef = DAG.getUNDEF(N->getValueType(0)); - DEBUG(dbgs() << "\nReplacing.7 "; + DEBUG(dbgs() << "\nReplacing.6 "; N->dump(&DAG); dbgs() << "\nWith: "; Undef.getNode()->dump(&DAG); Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=97040&r1=97039&r2=97040&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Wed Feb 24 11:05:47 2010 @@ -1775,7 +1775,7 @@ break; // todo, be more careful with signed comparisons } } else if (N0.getOpcode() == ISD::SIGN_EXTEND_INREG && - (Cond == ISD::SETEQ || Cond == ISD::SETNE)) { + (Cond == ISD::SETEQ || Cond == ISD::SETNE)) { EVT ExtSrcTy = cast(N0.getOperand(1))->getVT(); unsigned ExtSrcTyBits = ExtSrcTy.getSizeInBits(); EVT ExtDstTy = N0.getValueType(); @@ -1809,21 +1809,22 @@ Cond); } else if ((N1C->isNullValue() || N1C->getAPIntValue() == 1) && (Cond == ISD::SETEQ || Cond == ISD::SETNE)) { + // SETCC (SETCC), [0|1], [EQ|NE] -> SETCC - if (N0.getOpcode() == ISD::SETCC && - isTypeLegal(VT) && VT.bitsLE(N0.getValueType())) { + if (N0.getOpcode() == ISD::SETCC) { bool TrueWhenTrue = (Cond == ISD::SETEQ) ^ (N1C->getAPIntValue() != 1); if (TrueWhenTrue) - return DAG.getNode(ISD::TRUNCATE, dl, VT, N0); + return N0; + // Invert the condition. ISD::CondCode CC = cast(N0.getOperand(2))->get(); CC = ISD::getSetCCInverse(CC, N0.getOperand(0).getValueType().isInteger()); return DAG.getSetCC(dl, VT, N0.getOperand(0), N0.getOperand(1), CC); } - + if ((N0.getOpcode() == ISD::XOR || - (N0.getOpcode() == ISD::AND && + (N0.getOpcode() == ISD::AND && N0.getOperand(0).getOpcode() == ISD::XOR && N0.getOperand(1) == N0.getOperand(0).getOperand(1))) && isa(N0.getOperand(1)) && @@ -1846,36 +1847,9 @@ N0.getOperand(0).getOperand(0), N0.getOperand(1)); } - return DAG.getSetCC(dl, VT, Val, N1, Cond == ISD::SETEQ ? ISD::SETNE : ISD::SETEQ); } - } else if (N1C->getAPIntValue() == 1) { - SDValue Op0 = N0; - if (Op0.getOpcode() == ISD::TRUNCATE) - Op0 = Op0.getOperand(0); - - if ((Op0.getOpcode() == ISD::XOR || Op0.getOpcode() == ISD::AND) && - Op0.getOperand(0).getOpcode() == ISD::SETCC && - Op0.getOperand(1).getOpcode() == ISD::SETCC) { - // (and (setcc), (setcc)) == / != 1 -> (setcc) == / != (setcc) - // (xor (setcc), (setcc)) == / != 1 -> (setcc) != / == (setcc) - if (Op0.getOpcode() == ISD::XOR) - Cond = (Cond == ISD::SETEQ) ? ISD::SETNE : ISD::SETEQ; - return DAG.getSetCC(dl, VT, Op0.getOperand(0), Op0.getOperand(1), - Cond); - } else if (Op0.getOpcode() == ISD::AND && - isa(Op0.getOperand(1)) && - cast(Op0.getOperand(1))->getAPIntValue() == 1) { - // If this is (X&1) == / != 1, normalize it to (X&1) != / == 0. - if (Op0.getValueType() != VT) - Op0 = DAG.getNode(ISD::AND, dl, VT, - DAG.getNode(ISD::TRUNCATE, dl, VT, Op0.getOperand(0)), - DAG.getConstant(1, VT)); - return DAG.getSetCC(dl, VT, Op0, - DAG.getConstant(0, Op0.getValueType()), - Cond == ISD::SETEQ ? ISD::SETNE : ISD::SETEQ); - } } } Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=97040&r1=97039&r2=97040&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed Feb 24 11:05:47 2010 @@ -5883,31 +5883,26 @@ /// LowerToBT - Result of 'and' is compared against zero. Turn it into a BT node /// if it's possible. -static SDValue LowerToBT(SDValue And, ISD::CondCode CC, +static SDValue LowerToBT(SDValue Op0, ISD::CondCode CC, DebugLoc dl, SelectionDAG &DAG) { - SDValue Op0 = And.getOperand(0); - SDValue Op1 = And.getOperand(1); - if (Op0.getOpcode() == ISD::TRUNCATE) - Op0 = Op0.getOperand(0); - if (Op1.getOpcode() == ISD::TRUNCATE) - Op1 = Op1.getOperand(0); - SDValue LHS, RHS; - if (Op1.getOpcode() == ISD::SHL) { - if (ConstantSDNode *And10C = dyn_cast(Op1.getOperand(0))) - if (And10C->getZExtValue() == 1) { - LHS = Op0; - RHS = Op1.getOperand(1); - } - } else if (Op0.getOpcode() == ISD::SHL) { - if (ConstantSDNode *And00C = dyn_cast(Op0.getOperand(0))) - if (And00C->getZExtValue() == 1) { - LHS = Op1; - RHS = Op0.getOperand(1); - } - } else if (Op1.getOpcode() == ISD::Constant) { - ConstantSDNode *AndRHS = cast(Op1); - SDValue AndLHS = Op0; + if (Op0.getOperand(1).getOpcode() == ISD::SHL) { + if (ConstantSDNode *Op010C = + dyn_cast(Op0.getOperand(1).getOperand(0))) + if (Op010C->getZExtValue() == 1) { + LHS = Op0.getOperand(0); + RHS = Op0.getOperand(1).getOperand(1); + } + } else if (Op0.getOperand(0).getOpcode() == ISD::SHL) { + if (ConstantSDNode *Op000C = + dyn_cast(Op0.getOperand(0).getOperand(0))) + if (Op000C->getZExtValue() == 1) { + LHS = Op0.getOperand(1); + RHS = Op0.getOperand(0).getOperand(1); + } + } else if (Op0.getOperand(1).getOpcode() == ISD::Constant) { + ConstantSDNode *AndRHS = cast(Op0.getOperand(1)); + SDValue AndLHS = Op0.getOperand(0); if (AndRHS->getZExtValue() == 1 && AndLHS.getOpcode() == ISD::SRL) { LHS = AndLHS.getOperand(0); RHS = AndLHS.getOperand(1); @@ -5957,21 +5952,6 @@ return NewSetCC; } - // Look for "(setcc) == / != 1" to avoid unncessary setcc. - if (Op0.getOpcode() == X86ISD::SETCC && - Op1.getOpcode() == ISD::Constant && - (cast(Op1)->getZExtValue() == 1 || - cast(Op1)->isNullValue()) && - (CC == ISD::SETEQ || CC == ISD::SETNE)) { - X86::CondCode CCode = (X86::CondCode)Op0.getConstantOperandVal(0); - bool Invert = (CC == ISD::SETNE) ^ - cast(Op1)->isNullValue(); - if (Invert) - CCode = X86::GetOppositeBranchCondition(CCode); - return DAG.getNode(X86ISD::SETCC, dl, MVT::i8, - DAG.getConstant(CCode, MVT::i8), Op0.getOperand(1)); - } - bool isFP = Op.getOperand(1).getValueType().isFloatingPoint(); unsigned X86CC = TranslateX86CC(CC, isFP, Op0, Op1, DAG); if (X86CC == X86::COND_INVALID) Removed: llvm/trunk/test/CodeGen/X86/2010-02-23-DAGCombineBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2010-02-23-DAGCombineBug.ll?rev=97039&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/2010-02-23-DAGCombineBug.ll (original) +++ llvm/trunk/test/CodeGen/X86/2010-02-23-DAGCombineBug.ll (removed) @@ -1,17 +0,0 @@ -; RUN: llc < %s -march=x86 | FileCheck %s - -define i32* @t() nounwind optsize ssp { -entry: -; CHECK: t: -; CHECK: testl %eax, %eax -; CHECK: js - %cmp = icmp slt i32 undef, 0 ; [#uses=1] - %outsearch.0 = select i1 %cmp, i1 false, i1 true ; [#uses=1] - br i1 %outsearch.0, label %if.then27, label %if.else29 - -if.then27: ; preds = %entry - ret i32* undef - -if.else29: ; preds = %entry - unreachable -} Modified: llvm/trunk/test/CodeGen/X86/critical-edge-split.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/critical-edge-split.ll?rev=97040&r1=97039&r2=97040&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/critical-edge-split.ll (original) +++ llvm/trunk/test/CodeGen/X86/critical-edge-split.ll Wed Feb 24 11:05:47 2010 @@ -1,4 +1,4 @@ -; RUN: llc < %s -mtriple=i386-apple-darwin -stats -info-output-file - | grep asm-printer | grep 29 +; RUN: llc < %s -mtriple=i386-apple-darwin -tailcallopt=false -stats -info-output-file - | grep asm-printer | grep 31 %CC = type { %Register } %II = type { %"struct.XX::II::$_74" } Modified: llvm/trunk/test/CodeGen/X86/ins_subreg_coalesce-3.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/ins_subreg_coalesce-3.ll?rev=97040&r1=97039&r2=97040&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/ins_subreg_coalesce-3.ll (original) +++ llvm/trunk/test/CodeGen/X86/ins_subreg_coalesce-3.ll Wed Feb 24 11:05:47 2010 @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=x86-64 | grep mov | count 3 +; RUN: llc < %s -march=x86-64 | grep mov | count 5 %struct.COMPOSITE = type { i8, i16, i16 } %struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 } Modified: llvm/trunk/test/CodeGen/X86/trunc-to-bool.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/trunc-to-bool.ll?rev=97040&r1=97039&r2=97040&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/trunc-to-bool.ll (original) +++ llvm/trunk/test/CodeGen/X86/trunc-to-bool.ll Wed Feb 24 11:05:47 2010 @@ -3,14 +3,13 @@ ; value and as the operand of a branch. ; RUN: llc < %s -march=x86 | FileCheck %s -define i1 @test1(i32 %X) zeroext nounwind { +define i1 @test1(i32 %X) zeroext { %Y = trunc i32 %X to i1 ret i1 %Y } -; CHECK: test1: ; CHECK: andl $1, %eax -define i1 @test2(i32 %val, i32 %mask) nounwind { +define i1 @test2(i32 %val, i32 %mask) { entry: %shifted = ashr i32 %val, %mask %anded = and i32 %shifted, 1 @@ -21,10 +20,9 @@ ret_false: ret i1 false } -; CHECK: test2: -; CHECK: btl %eax +; CHECK: testb $1, %al -define i32 @test3(i8* %ptr) nounwind { +define i32 @test3(i8* %ptr) { %val = load i8* %ptr %tmp = trunc i8 %val to i1 br i1 %tmp, label %cond_true, label %cond_false @@ -33,10 +31,9 @@ cond_false: ret i32 42 } -; CHECK: test3: -; CHECK: testb $1, (%eax) +; CHECK: testb $1, %al -define i32 @test4(i8* %ptr) nounwind { +define i32 @test4(i8* %ptr) { %tmp = ptrtoint i8* %ptr to i1 br i1 %tmp, label %cond_true, label %cond_false cond_true: @@ -44,10 +41,9 @@ cond_false: ret i32 42 } -; CHECK: test4: -; CHECK: testb $1, 4(%esp) +; CHECK: testb $1, %al -define i32 @test5(double %d) nounwind { +define i32 @test6(double %d) { %tmp = fptosi double %d to i1 br i1 %tmp, label %cond_true, label %cond_false cond_true: @@ -55,5 +51,4 @@ cond_false: ret i32 42 } -; CHECK: test5: ; CHECK: testb $1 Modified: llvm/trunk/test/CodeGen/X86/xor-icmp.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/xor-icmp.ll?rev=97040&r1=97039&r2=97040&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/xor-icmp.ll (original) +++ llvm/trunk/test/CodeGen/X86/xor-icmp.ll Wed Feb 24 11:05:47 2010 @@ -1,6 +1,5 @@ ; RUN: llc < %s -march=x86 | FileCheck %s -check-prefix=X32 ; RUN: llc < %s -march=x86-64 | FileCheck %s -check-prefix=X64 -; rdar://7367229 define i32 @t(i32 %a, i32 %b) nounwind ssp { entry: @@ -35,33 +34,3 @@ declare i32 @foo(...) declare i32 @bar(...) - -define i32 @t2(i32 %x, i32 %y) nounwind ssp { -; X32: t2: -; X32: cmpl -; X32: sete -; X32: cmpl -; X32: sete -; X32-NOT: xor -; X32: je - -; X64: t2: -; X64: testl -; X64: sete -; X64: testl -; X64: sete -; X64-NOT: xor -; X64: je -entry: - %0 = icmp eq i32 %x, 0 ; [#uses=1] - %1 = icmp eq i32 %y, 0 ; [#uses=1] - %2 = xor i1 %1, %0 ; [#uses=1] - br i1 %2, label %bb, label %return - -bb: ; preds = %entry - %3 = tail call i32 (...)* @foo() nounwind ; [#uses=0] - ret i32 undef - -return: ; preds = %entry - ret i32 undef -} From alenhar2 at llvm.org Wed Feb 24 11:08:23 2010 From: alenhar2 at llvm.org (alenhar2 at llvm.org) Date: Wed, 24 Feb 2010 17:08:23 -0000 Subject: [llvm-commits] [poolalloc] r97041 - /poolalloc/trunk/lib/DSA/BottomUpClosure.cpp Message-ID: <20100224170823.857A32A6C12C@llvm.org> Author: alenhar2 Date: Wed Feb 24 11:08:23 2010 New Revision: 97041 URL: http://llvm.org/viewvc/llvm-project?rev=97041&view=rev Log: Shave a minute off the runtime by putting the entire debug loop in a debug block Modified: poolalloc/trunk/lib/DSA/BottomUpClosure.cpp Modified: poolalloc/trunk/lib/DSA/BottomUpClosure.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/BottomUpClosure.cpp?rev=97041&r1=97040&r2=97041&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/BottomUpClosure.cpp (original) +++ poolalloc/trunk/lib/DSA/BottomUpClosure.cpp Wed Feb 24 11:08:23 2010 @@ -428,19 +428,23 @@ ++NumInlines; DEBUG(Graph->AssertGraphOK();); } else if (CalledFuncs.size() > 1) { - DEBUG(errs() << "In Fns: " << Graph->getFunctionNames() << "\n"); - DEBUG(errs() << " calls " << CalledFuncs.size() - << " fns from site: " << CS.getCallSite().getInstruction() - << " " << *CS.getCallSite().getInstruction()); - DEBUG(errs() << " Fns ="); - unsigned NumPrinted = 0; - - for (std::vector::iterator I = CalledFuncs.begin(), - E = CalledFuncs.end(); I != E; ++I) - if (NumPrinted++ < 8) { - DEBUG(errs() << " " << (*I)->getName()); - } - DEBUG(errs() << "\n"); + bool doDebug = false; + DEBUG(doDebug = true); + if (doDebug) { + errs() << "In Fns: " << Graph->getFunctionNames() << "\n"; + errs() << " calls " << CalledFuncs.size() + << " fns from site: " << CS.getCallSite().getInstruction() + << " " << *CS.getCallSite().getInstruction(); + errs() << " Fns ="; + unsigned NumPrinted = 0; + + for (std::vector::iterator I = CalledFuncs.begin(), + E = CalledFuncs.end(); I != E; ++I) + if (NumPrinted++ < 8) { + errs() << " " << (*I)->getName(); + } + errs() << "\n"; + } if (!isComplete) { for (unsigned x = 0; x < CalledFuncs.size(); ) From gohman at apple.com Wed Feb 24 11:31:31 2010 From: gohman at apple.com (Dan Gohman) Date: Wed, 24 Feb 2010 17:31:31 -0000 Subject: [llvm-commits] [llvm] r97042 - in /llvm/trunk: include/llvm/Analysis/ScalarEvolution.h lib/Analysis/ScalarEvolution.cpp Message-ID: <20100224173131.2E9E62A6C12C@llvm.org> Author: djg Date: Wed Feb 24 11:31:30 2010 New Revision: 97042 URL: http://llvm.org/viewvc/llvm-project?rev=97042&view=rev Log: Convert a few more backedge-taken count functions to use BackedgeTakenInfo. Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolution.h llvm/trunk/lib/Analysis/ScalarEvolution.cpp Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolution.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ScalarEvolution.h?rev=97042&r1=97041&r2=97042&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/ScalarEvolution.h (original) +++ llvm/trunk/include/llvm/Analysis/ScalarEvolution.h Wed Feb 24 11:31:30 2010 @@ -305,7 +305,7 @@ /// ComputeLoadConstantCompareBackedgeTakenCount - Given an exit condition /// of 'icmp op load X, cst', try to see if we can compute the /// backedge-taken count. - const SCEV * + BackedgeTakenInfo ComputeLoadConstantCompareBackedgeTakenCount(LoadInst *LI, Constant *RHS, const Loop *L, @@ -323,12 +323,12 @@ /// HowFarToZero - Return the number of times a backedge comparing the /// specified value to zero will execute. If not computable, return /// CouldNotCompute. - const SCEV *HowFarToZero(const SCEV *V, const Loop *L); + BackedgeTakenInfo HowFarToZero(const SCEV *V, const Loop *L); /// HowFarToNonZero - Return the number of times a backedge checking the /// specified value for nonzero will execute. If not computable, return /// CouldNotCompute. - const SCEV *HowFarToNonZero(const SCEV *V, const Loop *L); + BackedgeTakenInfo HowFarToNonZero(const SCEV *V, const Loop *L); /// HowManyLessThans - Return the number of times a backedge containing the /// specified less-than comparison will execute. If not computable, return Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=97042&r1=97041&r2=97042&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Wed Feb 24 11:31:30 2010 @@ -3744,14 +3744,10 @@ // Handle common loops like: for (X = "string"; *X; ++X) if (LoadInst *LI = dyn_cast(ExitCond->getOperand(0))) if (Constant *RHS = dyn_cast(ExitCond->getOperand(1))) { - const SCEV *ItCnt = + BackedgeTakenInfo ItCnt = ComputeLoadConstantCompareBackedgeTakenCount(LI, RHS, L, Cond); - if (!isa(ItCnt)) { - unsigned BitWidth = getTypeSizeInBits(ItCnt->getType()); - return BackedgeTakenInfo(ItCnt, - isa(ItCnt) ? ItCnt : - getConstant(APInt::getMaxValue(BitWidth)-1)); - } + if (ItCnt.hasAnyInfo()) + return ItCnt; } const SCEV *LHS = getSCEV(ExitCond->getOperand(0)); @@ -3785,14 +3781,14 @@ switch (Cond) { case ICmpInst::ICMP_NE: { // while (X != Y) // Convert to: while (X-Y != 0) - const SCEV *TC = HowFarToZero(getMinusSCEV(LHS, RHS), L); - if (!isa(TC)) return TC; + BackedgeTakenInfo BTI = HowFarToZero(getMinusSCEV(LHS, RHS), L); + if (BTI.hasAnyInfo()) return BTI; break; } case ICmpInst::ICMP_EQ: { // while (X == Y) // Convert to: while (X-Y == 0) - const SCEV *TC = HowFarToNonZero(getMinusSCEV(LHS, RHS), L); - if (!isa(TC)) return TC; + BackedgeTakenInfo BTI = HowFarToNonZero(getMinusSCEV(LHS, RHS), L); + if (BTI.hasAnyInfo()) return BTI; break; } case ICmpInst::ICMP_SLT: { @@ -3879,7 +3875,7 @@ /// ComputeLoadConstantCompareBackedgeTakenCount - Given an exit condition of /// 'icmp op load X, cst', try to see if we can compute the backedge /// execution count. -const SCEV * +ScalarEvolution::BackedgeTakenInfo ScalarEvolution::ComputeLoadConstantCompareBackedgeTakenCount( LoadInst *LI, Constant *RHS, @@ -3888,6 +3884,7 @@ if (LI->isVolatile()) return getCouldNotCompute(); // Check to see if the loaded pointer is a getelementptr of a global. + // TODO: Use SCEV instead of manually grubbing with GEPs. GetElementPtrInst *GEP = dyn_cast(LI->getOperand(0)); if (!GEP) return getCouldNotCompute(); @@ -4452,7 +4449,8 @@ /// HowFarToZero - Return the number of times a backedge comparing the specified /// value to zero will execute. If not computable, return CouldNotCompute. -const SCEV *ScalarEvolution::HowFarToZero(const SCEV *V, const Loop *L) { +ScalarEvolution::BackedgeTakenInfo +ScalarEvolution::HowFarToZero(const SCEV *V, const Loop *L) { // If the value is a constant if (const SCEVConstant *C = dyn_cast(V)) { // If the value is already zero, the branch will execute zero times. @@ -4532,7 +4530,8 @@ /// HowFarToNonZero - Return the number of times a backedge checking the /// specified value for nonzero will execute. If not computable, return /// CouldNotCompute -const SCEV *ScalarEvolution::HowFarToNonZero(const SCEV *V, const Loop *L) { +ScalarEvolution::BackedgeTakenInfo +ScalarEvolution::HowFarToNonZero(const SCEV *V, const Loop *L) { // Loops that look like: while (X == 0) are very strange indeed. We don't // handle them yet except for the trivial case. This could be expanded in the // future as needed. From alenhar2 at llvm.org Wed Feb 24 11:45:15 2010 From: alenhar2 at llvm.org (alenhar2 at llvm.org) Date: Wed, 24 Feb 2010 17:45:15 -0000 Subject: [llvm-commits] [poolalloc] r97043 - in /poolalloc/trunk: include/dsa/DataStructure.h lib/DSA/BottomUpClosure.cpp Message-ID: <20100224174515.30F932A6C12C@llvm.org> Author: alenhar2 Date: Wed Feb 24 11:45:15 2010 New Revision: 97043 URL: http://llvm.org/viewvc/llvm-project?rev=97043&view=rev Log: inline globals only for main (undo old change). This needs to be generalized for multiple entrypoints soon Modified: poolalloc/trunk/include/dsa/DataStructure.h poolalloc/trunk/lib/DSA/BottomUpClosure.cpp Modified: poolalloc/trunk/include/dsa/DataStructure.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/DataStructure.h?rev=97043&r1=97042&r2=97043&view=diff ============================================================================== --- poolalloc/trunk/include/dsa/DataStructure.h (original) +++ poolalloc/trunk/include/dsa/DataStructure.h Wed Feb 24 11:45:15 2010 @@ -244,18 +244,16 @@ const char* debugname; bool useCallGraph; - bool ReInlineGlobals; public: static char ID; //Child constructor (CBU) BUDataStructures(intptr_t CID, const char* name, const char* printname) - : DataStructures(CID, printname), debugname(name), useCallGraph(true), - ReInlineGlobals(true) {} + : DataStructures(CID, printname), debugname(name), useCallGraph(true) {} //main constructor BUDataStructures() : DataStructures((intptr_t)&ID, "bu."), debugname("dsa-bu"), - useCallGraph(false), ReInlineGlobals(false) {} + useCallGraph(false) {} ~BUDataStructures() { releaseMemory(); } virtual bool runOnModule(Module &M); Modified: poolalloc/trunk/lib/DSA/BottomUpClosure.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/BottomUpClosure.cpp?rev=97043&r1=97042&r2=97043&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/BottomUpClosure.cpp (original) +++ poolalloc/trunk/lib/DSA/BottomUpClosure.cpp Wed Feb 24 11:45:15 2010 @@ -354,24 +354,17 @@ // Note that this is *required* for correctness. If a callee contains a use // of a global, we have to make sure to link up nodes due to global-argument // bindings. - if (ContainsMain || ReInlineGlobals) { + if (ContainsMain) { const DSGraph* GG = Graph->getGlobalsGraph(); ReachabilityCloner RC(Graph, GG, DSGraph::DontCloneCallNodes | DSGraph::DontCloneAuxCallNodes); - if (ContainsMain) { - // Clone the global nodes into this graph. + + // Clone the global nodes into this graph. for (DSScalarMap::global_iterator I = GG->getScalarMap().global_begin(), E = GG->getScalarMap().global_end(); I != E; ++I) if (isa(*I)) RC.getClonedNH(GG->getNodeForValue(*I)); - } else { - // Clone used the global nodes into this graph. - for (DSScalarMap::global_iterator I = Graph->getScalarMap().global_begin(), - E = Graph->getScalarMap().global_end(); I != E; ++I) - if (isa(*I)) - RC.getClonedNH(GG->getNodeForValue(*I)); - } } // Move our call site list into TempFCs so that inline call sites go into the @@ -389,20 +382,19 @@ CalledFuncs.clear(); + // Fast path for noop calls. Note that we don't care about merging globals + // in the callee with nodes in the caller here. + if (CS.getRetVal().isNull() && CS.getNumPtrArgs() == 0) { + TempFCs.erase(TempFCs.begin()); + continue; + } + GetAllCallees(CS, CalledFuncs); - bool isComplete = true; if (CalledFuncs.empty()) { // Remember that we could not resolve this yet! - isComplete = false; - GetAnyCallees(CS, CalledFuncs); - if (useCallGraph) - for (callee_iterator ii = callee_begin(CS.getCallSite().getInstruction()), - ee = callee_end(CS.getCallSite().getInstruction()); ii != ee; ++ii) - CalledFuncs.push_back(*ii); - std::sort(CalledFuncs.begin(), CalledFuncs.end()); - std::vector::iterator uid = std::unique(CalledFuncs.begin(), CalledFuncs.end()); - CalledFuncs.resize(uid - CalledFuncs.begin()); + AuxCallsList.splice(AuxCallsList.end(), TempFCs, TempFCs.begin()); + continue; } DSGraph *GI; @@ -411,7 +403,7 @@ ii != ee; ++ii) callee_add(TheCall, *ii); - if (CalledFuncs.size() == 1 && (isComplete || hasDSGraph(*CalledFuncs[0]))) { + if (CalledFuncs.size() == 1) { const Function *Callee = CalledFuncs[0]; // Get the data structure graph for the called function. @@ -423,11 +415,10 @@ << Graph->getFunctionNames() << "' [" << Graph->getGraphSize() <<"+" << Graph->getAuxFunctionCalls().size() << "]\n"); Graph->mergeInGraph(CS, *Callee, *GI, - DSGraph::StripAllocaBit|DSGraph::DontCloneCallNodes| - (isComplete?0:DSGraph::DontCloneAuxCallNodes)); + DSGraph::StripAllocaBit|DSGraph::DontCloneCallNodes); ++NumInlines; DEBUG(Graph->AssertGraphOK();); - } else if (CalledFuncs.size() > 1) { + } else { bool doDebug = false; DEBUG(doDebug = true); if (doDebug) { @@ -445,79 +436,67 @@ } errs() << "\n"; } - - if (!isComplete) { - for (unsigned x = 0; x < CalledFuncs.size(); ) - if (!hasDSGraph(*CalledFuncs[x])) - CalledFuncs.erase(CalledFuncs.begin() + x); - else - ++x; - } - if (CalledFuncs.size()) { - // See if we already computed a graph for this set of callees. - std::sort(CalledFuncs.begin(), CalledFuncs.end()); - std::pair > &IndCallGraph = - IndCallGraphMap[CalledFuncs]; - - if (IndCallGraph.first == 0) { - std::vector::iterator I = CalledFuncs.begin(), - E = CalledFuncs.end(); - - // Start with a copy of the first graph. - GI = IndCallGraph.first = new DSGraph(getDSGraph(**I), GlobalECs); - GI->setGlobalsGraph(Graph->getGlobalsGraph()); - std::vector &Args = IndCallGraph.second; - - // Get the argument nodes for the first callee. The return value is - // the 0th index in the vector. - GI->getFunctionArgumentsForCall(*I, Args); - - // Merge all of the other callees into this graph. - for (++I; I != E; ++I) { - // If the graph already contains the nodes for the function, don't - // bother merging it in again. - if (!GI->containsFunction(*I)) { - GI->cloneInto(getDSGraph(**I)); - ++NumInlines; - } - - std::vector NextArgs; - GI->getFunctionArgumentsForCall(*I, NextArgs); - unsigned i = 0, e = Args.size(); - for (; i != e; ++i) { - if (i == NextArgs.size()) break; - Args[i].mergeWith(NextArgs[i]); - } - for (e = NextArgs.size(); i != e; ++i) - Args.push_back(NextArgs[i]); + + // See if we already computed a graph for this set of callees. + std::sort(CalledFuncs.begin(), CalledFuncs.end()); + std::pair > &IndCallGraph = + IndCallGraphMap[CalledFuncs]; + + if (IndCallGraph.first == 0) { + std::vector::iterator I = CalledFuncs.begin(), + E = CalledFuncs.end(); + + // Start with a copy of the first graph. + GI = IndCallGraph.first = new DSGraph(getDSGraph(**I), GlobalECs); + GI->setGlobalsGraph(Graph->getGlobalsGraph()); + std::vector &Args = IndCallGraph.second; + + // Get the argument nodes for the first callee. The return value is + // the 0th index in the vector. + GI->getFunctionArgumentsForCall(*I, Args); + + // Merge all of the other callees into this graph. + for (++I; I != E; ++I) { + // If the graph already contains the nodes for the function, don't + // bother merging it in again. + if (!GI->containsFunction(*I)) { + GI->cloneInto(getDSGraph(**I)); + ++NumInlines; } - - // Clean up the final graph! - GI->removeDeadNodes(DSGraph::KeepUnreachableGlobals); - } else { - DEBUG(errs() << "***\n*** RECYCLED GRAPH ***\n***\n"); + + std::vector NextArgs; + GI->getFunctionArgumentsForCall(*I, NextArgs); + unsigned i = 0, e = Args.size(); + for (; i != e; ++i) { + if (i == NextArgs.size()) break; + Args[i].mergeWith(NextArgs[i]); + } + for (e = NextArgs.size(); i != e; ++i) + Args.push_back(NextArgs[i]); } - - GI = IndCallGraph.first; - - // Merge the unified graph into this graph now. - DEBUG(errs() << " Inlining multi callee graph " - << "[" << GI->getGraphSize() << "+" - << GI->getAuxFunctionCalls().size() << "] into '" - << Graph->getFunctionNames() << "' [" << Graph->getGraphSize() <<"+" - << Graph->getAuxFunctionCalls().size() << "]\n"); - - Graph->mergeInGraph(CS, IndCallGraph.second, *GI, - DSGraph::StripAllocaBit | - DSGraph::DontCloneCallNodes| - (isComplete?0:DSGraph::DontCloneAuxCallNodes)); - ++NumInlines; + + // Clean up the final graph! + GI->removeDeadNodes(DSGraph::KeepUnreachableGlobals); + } else { + DEBUG(errs() << "***\n*** RECYCLED GRAPH ***\n***\n"); } + + GI = IndCallGraph.first; + + // Merge the unified graph into this graph now. + DEBUG(errs() << " Inlining multi callee graph " + << "[" << GI->getGraphSize() << "+" + << GI->getAuxFunctionCalls().size() << "] into '" + << Graph->getFunctionNames() << "' [" << Graph->getGraphSize() << "+" + << Graph->getAuxFunctionCalls().size() << "]\n"); + + Graph->mergeInGraph(CS, IndCallGraph.second, *GI, + DSGraph::StripAllocaBit | + DSGraph::DontCloneCallNodes); + ++NumInlines; } DEBUG(Graph->AssertGraphOK();); DEBUG(Graph->getGlobalsGraph()->AssertGraphOK()); - if (!isComplete) - AuxCallsList.push_front(CS); TempFCs.erase(TempFCs.begin()); } From johnny.chen at apple.com Wed Feb 24 12:00:40 2010 From: johnny.chen at apple.com (Johnny Chen) Date: Wed, 24 Feb 2010 18:00:40 -0000 Subject: [llvm-commits] [llvm] r97044 - /llvm/trunk/lib/Target/ARM/ARMInstrNEON.td Message-ID: <20100224180040.75CE12A6C12C@llvm.org> Author: johnny Date: Wed Feb 24 12:00:40 2010 New Revision: 97044 URL: http://llvm.org/viewvc/llvm-project?rev=97044&view=rev Log: Fixed typo of opcodestr, should be "vst1", not "vld1". Modified: llvm/trunk/lib/Target/ARM/ARMInstrNEON.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrNEON.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrNEON.td?rev=97044&r1=97043&r2=97044&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrNEON.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrNEON.td Wed Feb 24 12:00:40 2010 @@ -424,15 +424,15 @@ "\\{$src1, $src2, $src3, $src4\\}, $addr", "", [/* For disassembly only; pattern left blank */]>; -def VST1d8T : VST1D3<0b0000, "vld1", "8">; -def VST1d16T : VST1D3<0b0100, "vld1", "16">; -def VST1d32T : VST1D3<0b1000, "vld1", "32">; -//def VST1d64T : VST1D3<0b1100, "vld1", "64">; - -def VST1d8Q : VST1D4<0b0000, "vld1", "8">; -def VST1d16Q : VST1D4<0b0100, "vld1", "16">; -def VST1d32Q : VST1D4<0b1000, "vld1", "32">; -//def VST1d64Q : VST1D4<0b1100, "vld1", "64">; +def VST1d8T : VST1D3<0b0000, "vst1", "8">; +def VST1d16T : VST1D3<0b0100, "vst1", "16">; +def VST1d32T : VST1D3<0b1000, "vst1", "32">; +//def VST1d64T : VST1D3<0b1100, "vst1", "64">; + +def VST1d8Q : VST1D4<0b0000, "vst1", "8">; +def VST1d16Q : VST1D4<0b0100, "vst1", "16">; +def VST1d32Q : VST1D4<0b1000, "vst1", "32">; +//def VST1d64Q : VST1D4<0b1100, "vst1", "64">; let mayStore = 1, hasExtraSrcRegAllocReq = 1 in { From baldrick at free.fr Wed Feb 24 12:31:20 2010 From: baldrick at free.fr (Duncan Sands) Date: Wed, 24 Feb 2010 19:31:20 +0100 Subject: [llvm-commits] [llvm] r97011 - in /llvm/trunk: lib/CodeGen/SelectionDAG/DAGCombiner.cpp lib/CodeGen/SelectionDAG/TargetLowering.cpp lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/2010-02-23-DAGCombineBug.ll test/CodeGen/X86/critical-edge-split.ll test/CodeGen/X86/ins_subreg_coalesce-3.ll test/CodeGen/X86/trunc-to-bool.ll test/CodeGen/X86/xor-icmp.ll In-Reply-To: <20100224014231.A18302A6C12C@llvm.org> References: <20100224014231.A18302A6C12C@llvm.org> Message-ID: <4B857078.20704@free.fr> Hi Evan, > Re-apply 96540 and 96556 with fixes. the dragonegg self-build succeeds with these patches applied. So whatever the problem was last time, it looks to be fixed. Ciao, Duncan. From stoklund at 2pi.dk Wed Feb 24 12:57:08 2010 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Wed, 24 Feb 2010 18:57:08 -0000 Subject: [llvm-commits] [llvm] r97046 - /llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp Message-ID: <20100224185708.E5DBE2A6C12E@llvm.org> Author: stoklund Date: Wed Feb 24 12:57:08 2010 New Revision: 97046 URL: http://llvm.org/viewvc/llvm-project?rev=97046&view=rev Log: Stay away from str in ARMLoadStoreOpt. This pass does not understand operands, and can cause scavenger failures when it translates to . Modified: llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp Modified: llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp?rev=97046&r1=97045&r2=97046&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp Wed Feb 24 12:57:08 2010 @@ -748,11 +748,19 @@ if (MMO->isVolatile()) return false; - // Unaligned ldr/str is emulated by some kernels, but unaligned ldm/stm is not. + // Unaligned ldr/str is emulated by some kernels, but unaligned ldm/stm is + // not. if (MMO->getAlignment() < 4) return false; } + // str could probably be eliminated entirely, but for now we just want + // to avoid making a mess of it. + // FIXME: Use str as a wildcard to enable better stm folding. + if (MI->getNumOperands() > 0 && MI->getOperand(0).isReg() && + MI->getOperand(0).isUndef()) + return false; + int Opcode = MI->getOpcode(); switch (Opcode) { default: break; From evan.cheng at apple.com Wed Feb 24 13:13:47 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 24 Feb 2010 11:13:47 -0800 Subject: [llvm-commits] [llvm] r97011 - in /llvm/trunk: lib/CodeGen/SelectionDAG/DAGCombiner.cpp lib/CodeGen/SelectionDAG/TargetLowering.cpp lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/2010-02-23-DAGCombineBug.ll test/CodeGen/X86/critical-edge-split.ll test/CodeGen/X86/ins_subreg_coalesce-3.ll test/CodeGen/X86/trunc-to-bool.ll test/CodeGen/X86/xor-icmp.ll In-Reply-To: <4B857078.20704@free.fr> References: <20100224014231.A18302A6C12C@llvm.org> <4B857078.20704@free.fr> Message-ID: Except now some people are blaming ppc self-hosting issue on it. :-( I don't believe it. Grrrr. Evan On Feb 24, 2010, at 10:31 AM, Duncan Sands wrote: > Hi Evan, > >> Re-apply 96540 and 96556 with fixes. > > the dragonegg self-build succeeds with these patches applied. > So whatever the problem was last time, it looks to be fixed. > > Ciao, > > Duncan. > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From sabre at nondot.org Wed Feb 24 13:17:12 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 24 Feb 2010 19:17:12 -0000 Subject: [llvm-commits] [llvm] r97047 - /llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Message-ID: <20100224191712.AE8562A6C12E@llvm.org> Author: lattner Date: Wed Feb 24 13:17:12 2010 New Revision: 97047 URL: http://llvm.org/viewvc/llvm-project?rev=97047&view=rev Log: emit a histogram of the opcodes in comments. Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp?rev=97047&r1=97046&r2=97047&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Wed Feb 24 13:17:12 2010 @@ -20,11 +20,9 @@ #include "llvm/Support/FormattedStream.h" using namespace llvm; -namespace { enum { CommentIndent = 30 }; -} /// ClassifyInt - Classify an integer by size, return '1','2','4','8' if this /// fits in 1, 2, 4, or 8 sign extended bytes. @@ -78,6 +76,8 @@ DenseMap NodeXFormMap; std::vector NodeXForms; + // Per opcode frequence count. + std::vector Histogram; public: MatcherTableEmitter() {} @@ -85,6 +85,8 @@ unsigned StartIdx, formatted_raw_ostream &OS); void EmitPredicateFunctions(formatted_raw_ostream &OS); + + void EmitHistogram(formatted_raw_ostream &OS); private: unsigned EmitMatcher(const MatcherNode *N, unsigned Indent, formatted_raw_ostream &OS); @@ -377,6 +379,10 @@ formatted_raw_ostream &OS) { unsigned Size = 0; while (N) { + if (unsigned(N->getKind()) >= Histogram.size()) + Histogram.resize(N->getKind()+1); + Histogram[N->getKind()]++; + // Push is a special case since it is binary. if (const PushMatcherNode *PMN = dyn_cast(N)) { // We need to encode the child and the offset of the failure code before @@ -498,6 +504,54 @@ OS << "}\n\n"; } +void MatcherTableEmitter::EmitHistogram(formatted_raw_ostream &OS) { + OS << " // Opcode Histogram:\n"; + for (unsigned i = 0, e = Histogram.size(); i != e; ++i) { + OS << " // #"; + switch ((MatcherNode::KindTy)i) { + case MatcherNode::Push: OS << "OPC_Push"; break; + case MatcherNode::RecordNode: OS << "OPC_RecordNode"; break; + case MatcherNode::RecordChild: OS << "OPC_RecordChild"; break; + case MatcherNode::RecordMemRef: OS << "OPC_RecordMemRef"; break; + case MatcherNode::CaptureFlagInput: OS << "OPC_CaptureFlagInput"; break; + case MatcherNode::MoveChild: OS << "OPC_MoveChild"; break; + case MatcherNode::MoveParent: OS << "OPC_MoveParent"; break; + case MatcherNode::CheckSame: OS << "OPC_CheckSame"; break; + case MatcherNode::CheckPatternPredicate: + OS << "OPC_CheckPatternPredicate"; break; + case MatcherNode::CheckPredicate: OS << "OPC_CheckPredicate"; break; + case MatcherNode::CheckOpcode: OS << "OPC_CheckOpcode"; break; + case MatcherNode::CheckMultiOpcode: OS << "OPC_CheckMultiOpcode"; break; + case MatcherNode::CheckType: OS << "OPC_CheckType"; break; + case MatcherNode::CheckInteger: OS << "OPC_CheckInteger"; break; + case MatcherNode::CheckCondCode: OS << "OPC_CheckCondCode"; break; + case MatcherNode::CheckValueType: OS << "OPC_CheckValueType"; break; + case MatcherNode::CheckComplexPat: OS << "OPC_CheckComplexPat"; break; + case MatcherNode::CheckAndImm: OS << "OPC_CheckAndImm"; break; + case MatcherNode::CheckOrImm: OS << "OPC_CheckOrImm"; break; + case MatcherNode::CheckFoldableChainNode: + OS << "OPC_CheckFoldableChainNode"; break; + case MatcherNode::CheckChainCompatible: + OS << "OPC_CheckChainCompatible"; break; + case MatcherNode::EmitInteger: OS << "OPC_EmitInteger"; break; + case MatcherNode::EmitStringInteger: OS << "OPC_EmitStringInteger"; break; + case MatcherNode::EmitRegister: OS << "OPC_EmitRegister"; break; + case MatcherNode::EmitConvertToTarget: + OS << "OPC_EmitConvertToTarget"; break; + case MatcherNode::EmitMergeInputChains: + OS << "OPC_EmitMergeInputChains"; break; + case MatcherNode::EmitCopyToReg: OS << "OPC_EmitCopyToReg"; break; + case MatcherNode::EmitNode: OS << "OPC_EmitNode"; break; + case MatcherNode::EmitNodeXForm: OS << "OPC_EmitNodeXForm"; break; + case MatcherNode::MarkFlagResults: OS << "OPC_MarkFlagResults"; break; + case MatcherNode::CompleteMatch: OS << "OPC_CompleteMatch"; break; + } + + OS.PadToColumn(40) << " = " << Histogram[i] << '\n'; + } + OS << '\n'; +} + void llvm::EmitMatcherTable(const MatcherNode *Matcher, raw_ostream &O) { formatted_raw_ostream OS(O); @@ -512,6 +566,9 @@ OS << " static const unsigned char MatcherTable[] = {\n"; unsigned TotalSize = MatcherEmitter.EmitMatcherList(Matcher, 5, 0, OS); OS << " 0\n }; // Total Array size is " << (TotalSize+1) << " bytes\n\n"; + + MatcherEmitter.EmitHistogram(OS); + OS << " #undef TARGET_OPCODE\n"; OS << " return SelectCodeCommon(N, MatcherTable,sizeof(MatcherTable));\n}\n"; OS << "\n"; From gohman at apple.com Wed Feb 24 13:31:06 2010 From: gohman at apple.com (Dan Gohman) Date: Wed, 24 Feb 2010 19:31:06 -0000 Subject: [llvm-commits] [llvm] r97048 - /llvm/trunk/lib/Analysis/ScalarEvolution.cpp Message-ID: <20100224193106.AE0712A6C12E@llvm.org> Author: djg Date: Wed Feb 24 13:31:06 2010 New Revision: 97048 URL: http://llvm.org/viewvc/llvm-project?rev=97048&view=rev Log: Simplify this code; these casts aren't necessary. Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=97048&r1=97047&r2=97048&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Wed Feb 24 13:31:06 2010 @@ -921,9 +921,7 @@ if (MaxBECount == RecastedMaxBECount) { const Type *WideTy = IntegerType::get(getContext(), BitWidth * 2); // Check whether Start+Step*MaxBECount has no unsigned overflow. - const SCEV *ZMul = - getMulExpr(CastedMaxBECount, - getTruncateOrZeroExtend(Step, Start->getType())); + const SCEV *ZMul = getMulExpr(CastedMaxBECount, Step); const SCEV *Add = getAddExpr(Start, ZMul); const SCEV *OperandExtendedAdd = getAddExpr(getZeroExtendExpr(Start, WideTy), @@ -937,9 +935,7 @@ // Similar to above, only this time treat the step value as signed. // This covers loops that count down. - const SCEV *SMul = - getMulExpr(CastedMaxBECount, - getTruncateOrSignExtend(Step, Start->getType())); + const SCEV *SMul = getMulExpr(CastedMaxBECount, Step); Add = getAddExpr(Start, SMul); OperandExtendedAdd = getAddExpr(getZeroExtendExpr(Start, WideTy), @@ -1060,9 +1056,7 @@ if (MaxBECount == RecastedMaxBECount) { const Type *WideTy = IntegerType::get(getContext(), BitWidth * 2); // Check whether Start+Step*MaxBECount has no signed overflow. - const SCEV *SMul = - getMulExpr(CastedMaxBECount, - getTruncateOrSignExtend(Step, Start->getType())); + const SCEV *SMul = getMulExpr(CastedMaxBECount, Step); const SCEV *Add = getAddExpr(Start, SMul); const SCEV *OperandExtendedAdd = getAddExpr(getSignExtendExpr(Start, WideTy), @@ -1076,9 +1070,7 @@ // Similar to above, only this time treat the step value as unsigned. // This covers loops that count up with an unsigned step. - const SCEV *UMul = - getMulExpr(CastedMaxBECount, - getTruncateOrZeroExtend(Step, Start->getType())); + const SCEV *UMul = getMulExpr(CastedMaxBECount, Step); Add = getAddExpr(Start, UMul); OperandExtendedAdd = getAddExpr(getSignExtendExpr(Start, WideTy), From gohman at apple.com Wed Feb 24 13:31:47 2010 From: gohman at apple.com (Dan Gohman) Date: Wed, 24 Feb 2010 19:31:47 -0000 Subject: [llvm-commits] [llvm] r97049 - /llvm/trunk/lib/Analysis/ScalarEvolution.cpp Message-ID: <20100224193147.4141A2A6C12E@llvm.org> Author: djg Date: Wed Feb 24 13:31:47 2010 New Revision: 97049 URL: http://llvm.org/viewvc/llvm-project?rev=97049&view=rev Log: ConstantFoldInstOperands can theoretically return null if it didn't fold anything. Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=97049&r1=97048&r2=97049&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Wed Feb 24 13:31:47 2010 @@ -4226,14 +4226,15 @@ } } - Constant *C; + Constant *C = 0; if (const CmpInst *CI = dyn_cast(I)) C = ConstantFoldCompareInstOperands(CI->getPredicate(), Operands[0], Operands[1], TD); else C = ConstantFoldInstOperands(I->getOpcode(), I->getType(), &Operands[0], Operands.size(), TD); - return getSCEV(C); + if (C) + return getSCEV(C); } } From sabre at nondot.org Wed Feb 24 13:52:48 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 24 Feb 2010 19:52:48 -0000 Subject: [llvm-commits] [llvm] r97051 - /llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Message-ID: <20100224195248.2A9042A6C12E@llvm.org> Author: lattner Date: Wed Feb 24 13:52:48 2010 New Revision: 97051 URL: http://llvm.org/viewvc/llvm-project?rev=97051&view=rev Log: split the movechild/record/moveparent -> recordchild optzn into a movechild/record -> recordchild/movechild and movechild/moveparent -> noop xforms. This slightly shrinks the tables (x86 to 117454) and enables adding future improvements. Modified: llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Modified: llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp?rev=97051&r1=97050&r2=97051&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Wed Feb 24 13:52:48 2010 @@ -14,35 +14,41 @@ #include "DAGISelMatcher.h" using namespace llvm; - -static void FormRecordChildNodes(OwningPtr &Matcher) { +static void ContractNodes(OwningPtr &Matcher) { // If we reached the end of the chain, we're done. MatcherNode *N = Matcher.get(); if (N == 0) return; // If we have a push node, walk down both edges. if (PushMatcherNode *Push = dyn_cast(N)) - FormRecordChildNodes(Push->getFailurePtr()); + ContractNodes(Push->getFailurePtr()); - // If we found a movechild node, check to see if our pattern matches. + // If we found a movechild node with a node that comes in a 'foochild' form, + // transform it. if (MoveChildMatcherNode *MC = dyn_cast(N)) { - if (RecordMatcherNode *RM = dyn_cast(MC->getNext())) - if (MoveParentMatcherNode *MP = - dyn_cast(RM->getNext())) { - MatcherNode *New - = new RecordChildMatcherNode(MC->getChildNo(), RM->getWhatFor()); - New->setNext(MP->takeNext()); - Matcher.reset(New); - return FormRecordChildNodes(Matcher); - } + if (RecordMatcherNode *RM = dyn_cast(MC->getNext())) { + MatcherNode *New + = new RecordChildMatcherNode(MC->getChildNo(), RM->getWhatFor()); + New->setNext(Matcher.take()); + Matcher.reset(New); + MC->setNext(RM->takeNext()); + return ContractNodes(Matcher); + } } - - FormRecordChildNodes(N->getNextPtr()); + + if (MoveChildMatcherNode *MC = dyn_cast(N)) + if (MoveParentMatcherNode *MP = + dyn_cast(MC->getNext())) { + Matcher.reset(MP->takeNext()); + return ContractNodes(Matcher); + } + + ContractNodes(N->getNextPtr()); } MatcherNode *llvm::OptimizeMatcher(MatcherNode *Matcher) { OwningPtr MatcherPtr(Matcher); - FormRecordChildNodes(MatcherPtr); + ContractNodes(MatcherPtr); return MatcherPtr.take(); } From johnny.chen at apple.com Wed Feb 24 14:06:07 2010 From: johnny.chen at apple.com (Johnny Chen) Date: Wed, 24 Feb 2010 20:06:07 -0000 Subject: [llvm-commits] [llvm] r97052 - /llvm/trunk/lib/Target/ARM/ARMInstrNEON.td Message-ID: <20100224200607.5D9DA2A6C130@llvm.org> Author: johnny Date: Wed Feb 24 14:06:07 2010 New Revision: 97052 URL: http://llvm.org/viewvc/llvm-project?rev=97052&view=rev Log: Added Vector Swap (VSWPd and VSWPq) instructions for disassembly only. A8.6.405 Modified: llvm/trunk/lib/Target/ARM/ARMInstrNEON.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrNEON.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrNEON.td?rev=97052&r1=97051&r2=97052&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrNEON.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrNEON.td Wed Feb 24 14:06:07 2010 @@ -2536,6 +2536,14 @@ IIC_VCNTiQ, "vcnt", "8", v16i8, v16i8, int_arm_neon_vcnt>; +// Vector Swap -- for disassembly only. +def VSWPd : N2VX<0b11, 0b11, 0b00, 0b10, 0b00000, 0, 0, + (outs DPR:$dst), (ins DPR:$src), NoItinerary, + "vswp", "$dst, $src", "", []>; +def VSWPq : N2VX<0b11, 0b11, 0b00, 0b10, 0b00000, 1, 0, + (outs QPR:$dst), (ins QPR:$src), NoItinerary, + "vswp", "$dst, $src", "", []>; + // Vector Move Operations. // VMOV : Vector Move (Register) From sabre at nondot.org Wed Feb 24 14:15:25 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 24 Feb 2010 20:15:25 -0000 Subject: [llvm-commits] [llvm] r97053 - in /llvm/trunk: include/llvm/CodeGen/DAGISelHeader.h utils/TableGen/DAGISelMatcher.cpp utils/TableGen/DAGISelMatcher.h utils/TableGen/DAGISelMatcherEmitter.cpp utils/TableGen/DAGISelMatcherOpt.cpp Message-ID: <20100224201525.A3FF32A6C130@llvm.org> Author: lattner Date: Wed Feb 24 14:15:25 2010 New Revision: 97053 URL: http://llvm.org/viewvc/llvm-project?rev=97053&view=rev Log: contract movechild+checktype into a new checkchild node, shrinking the x86 table by 1200 bytes. Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h llvm/trunk/utils/TableGen/DAGISelMatcher.cpp llvm/trunk/utils/TableGen/DAGISelMatcher.h llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h?rev=97053&r1=97052&r2=97053&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h (original) +++ llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Wed Feb 24 14:15:25 2010 @@ -233,6 +233,9 @@ OPC_CheckOpcode, OPC_CheckMultiOpcode, OPC_CheckType, + OPC_CheckChild0Type, OPC_CheckChild1Type, OPC_CheckChild2Type, + OPC_CheckChild3Type, OPC_CheckChild4Type, OPC_CheckChild5Type, + OPC_CheckChild6Type, OPC_CheckChild7Type, OPC_CheckInteger1, OPC_CheckInteger2, OPC_CheckInteger4, OPC_CheckInteger8, OPC_CheckCondCode, OPC_CheckValueType, @@ -481,6 +484,23 @@ } continue; } + case OPC_CheckChild0Type: case OPC_CheckChild1Type: + case OPC_CheckChild2Type: case OPC_CheckChild3Type: + case OPC_CheckChild4Type: case OPC_CheckChild5Type: + case OPC_CheckChild6Type: case OPC_CheckChild7Type: { + unsigned ChildNo = Opcode-OPC_CheckChild0Type; + if (ChildNo >= N.getNumOperands()) + break; // Match fails if out of range child #. + + MVT::SimpleValueType VT = + (MVT::SimpleValueType)MatcherTable[MatcherIndex++]; + if (N.getOperand(ChildNo).getValueType() != VT) { + // Handle the case when VT is iPTR. + if (VT != MVT::iPTR || N.getValueType() != TLI.getPointerTy()) + break; + } + continue; + } case OPC_CheckCondCode: if (cast(N)->get() != (ISD::CondCode)MatcherTable[MatcherIndex++]) break; Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.cpp?rev=97053&r1=97052&r2=97053&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcher.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcher.cpp Wed Feb 24 14:15:25 2010 @@ -91,6 +91,13 @@ printNext(OS, indent); } +void CheckChildTypeMatcherNode::print(raw_ostream &OS, unsigned indent) const { + OS.indent(indent) << "CheckChildType " << ChildNo << " " + << getEnumName(Type) << '\n'; + printNext(OS, indent); +} + + void CheckIntegerMatcherNode::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckInteger " << Value << '\n'; printNext(OS, indent); Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.h?rev=97053&r1=97052&r2=97053&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcher.h (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcher.h Wed Feb 24 14:15:25 2010 @@ -54,6 +54,7 @@ CheckOpcode, // Fail if not opcode. CheckMultiOpcode, // Fail if not in opcode list. CheckType, // Fail if not correct type. + CheckChildType, // Fail if child has wrong type. CheckInteger, // Fail if wrong val. CheckCondCode, // Fail if not condcode. CheckValueType, @@ -328,6 +329,26 @@ virtual void print(raw_ostream &OS, unsigned indent = 0) const; }; + +/// CheckChildTypeMatcherNode - This checks to see if a child node has the +/// specified type, if not it fails to match. +class CheckChildTypeMatcherNode : public MatcherNode { + unsigned ChildNo; + MVT::SimpleValueType Type; +public: + CheckChildTypeMatcherNode(unsigned childno, MVT::SimpleValueType type) + : MatcherNode(CheckChildType), ChildNo(childno), Type(type) {} + + unsigned getChildNo() const { return ChildNo; } + MVT::SimpleValueType getType() const { return Type; } + + static inline bool classof(const MatcherNode *N) { + return N->getKind() == CheckChildType; + } + + virtual void print(raw_ostream &OS, unsigned indent = 0) const; +}; + /// CheckIntegerMatcherNode - This checks to see if the current node is a /// ConstantSDNode with the specified integer value, if not it fails to match. Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp?rev=97053&r1=97052&r2=97053&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Wed Feb 24 14:15:25 2010 @@ -222,7 +222,12 @@ OS << "OPC_CheckType, " << getEnumName(cast(N)->getType()) << ",\n"; return 2; - + case MatcherNode::CheckChildType: + OS << "OPC_CheckChild" + << cast(N)->getChildNo() << "Type, " + << getEnumName(cast(N)->getType()) << ",\n"; + return 2; + case MatcherNode::CheckInteger: { int64_t Val = cast(N)->getValue(); OS << "OPC_CheckInteger" << ClassifyInt(Val) << ", "; @@ -523,6 +528,7 @@ case MatcherNode::CheckOpcode: OS << "OPC_CheckOpcode"; break; case MatcherNode::CheckMultiOpcode: OS << "OPC_CheckMultiOpcode"; break; case MatcherNode::CheckType: OS << "OPC_CheckType"; break; + case MatcherNode::CheckChildType: OS << "OPC_CheckChildType"; break; case MatcherNode::CheckInteger: OS << "OPC_CheckInteger"; break; case MatcherNode::CheckCondCode: OS << "OPC_CheckCondCode"; break; case MatcherNode::CheckValueType: OS << "OPC_CheckValueType"; break; Modified: llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp?rev=97053&r1=97052&r2=97053&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Wed Feb 24 14:15:25 2010 @@ -26,12 +26,19 @@ // If we found a movechild node with a node that comes in a 'foochild' form, // transform it. if (MoveChildMatcherNode *MC = dyn_cast(N)) { - if (RecordMatcherNode *RM = dyn_cast(MC->getNext())) { - MatcherNode *New - = new RecordChildMatcherNode(MC->getChildNo(), RM->getWhatFor()); + MatcherNode *New = 0; + if (RecordMatcherNode *RM = dyn_cast(MC->getNext())) + New = new RecordChildMatcherNode(MC->getChildNo(), RM->getWhatFor()); + + if (CheckTypeMatcherNode *CT= dyn_cast(MC->getNext())) + New = new CheckChildTypeMatcherNode(MC->getChildNo(), CT->getType()); + + if (New) { + // Insert the new node. New->setNext(Matcher.take()); Matcher.reset(New); - MC->setNext(RM->takeNext()); + // Remove the old one. + MC->setNext(MC->getNext()->takeNext()); return ContractNodes(Matcher); } } From peckw at wesleypeck.com Wed Feb 24 14:16:27 2010 From: peckw at wesleypeck.com (Wesley Peck) Date: Wed, 24 Feb 2010 20:16:27 -0000 Subject: [llvm-commits] [llvm] r97054 - in /llvm/trunk/lib/Target/MBlaze: MBlazeISelLowering.cpp MBlazeIntrinsicInfo.cpp MBlazeIntrinsicInfo.h MBlazeMachineFunction.h MBlazeRegisterInfo.cpp Message-ID: <20100224201627.A2E942A6C130@llvm.org> Author: peckw Date: Wed Feb 24 14:16:27 2010 New Revision: 97054 URL: http://llvm.org/viewvc/llvm-project?rev=97054&view=rev Log: Adding function "lookupGCCName" to MBlazeIntrinsicInfo Adding the function "lookupGCCName" to the MBlazeIntrinsicInfo class to support the Clang MicroBlaze target. Additionally, minor fixes which remove some unused PIC code (PIC is not supported yet in the MicroBlaze backend) and removed some unused variables. Modified: llvm/trunk/lib/Target/MBlaze/MBlazeISelLowering.cpp llvm/trunk/lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp llvm/trunk/lib/Target/MBlaze/MBlazeIntrinsicInfo.h llvm/trunk/lib/Target/MBlaze/MBlazeMachineFunction.h llvm/trunk/lib/Target/MBlaze/MBlazeRegisterInfo.cpp Modified: llvm/trunk/lib/Target/MBlaze/MBlazeISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeISelLowering.cpp?rev=97054&r1=97053&r2=97054&view=diff ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeISelLowering.cpp (original) +++ llvm/trunk/lib/Target/MBlaze/MBlazeISelLowering.cpp Wed Feb 24 14:16:27 2010 @@ -470,7 +470,6 @@ SmallVectorImpl &InVals) { MachineFunction &MF = DAG.getMachineFunction(); MachineFrameInfo *MFI = MF.getFrameInfo(); - bool IsPIC = getTargetMachine().getRelocationModel() == Reloc::PIC_; // Analyze operands of the call, assigning locations to each operand. SmallVector ArgLocs; @@ -556,7 +555,7 @@ // If the callee is a GlobalAddress/ExternalSymbol node (quite common, every // direct call is) turn it into a TargetGlobalAddress/TargetExternalSymbol // node so that legalize doesn't hack it. - unsigned char OpFlag = IsPIC ? MBlazeII::MO_GOT_CALL : MBlazeII::MO_NO_FLAG; + unsigned char OpFlag = MBlazeII::MO_NO_FLAG; if (GlobalAddressSDNode *G = dyn_cast(Callee)) Callee = DAG.getTargetGlobalAddress(G->getGlobal(), getPointerTy(), 0, OpFlag); Modified: llvm/trunk/lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp?rev=97054&r1=97053&r2=97054&view=diff ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp (original) +++ llvm/trunk/lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp Wed Feb 24 14:16:27 2010 @@ -32,6 +32,9 @@ , num_mblaze_intrinsics }; +#define GET_LLVM_INTRINSIC_FOR_GCC_BUILTIN +#include "MBlazeGenIntrinsics.inc" +#undef GET_LLVM_INTRINSIC_FOR_GCC_BUILTIN } std::string MBlazeIntrinsicInfo::getName(unsigned IntrID, const Type **Tys, @@ -60,6 +63,11 @@ return 0; } +unsigned MBlazeIntrinsicInfo:: +lookupGCCName(const char *Name) const { + return mblazeIntrinsic::getIntrinsicForGCCBuiltin("mblaze",Name); +} + bool MBlazeIntrinsicInfo::isOverloaded(unsigned IntrID) const { // Overload Table const bool OTable[] = { Modified: llvm/trunk/lib/Target/MBlaze/MBlazeIntrinsicInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeIntrinsicInfo.h?rev=97054&r1=97053&r2=97054&view=diff ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeIntrinsicInfo.h (original) +++ llvm/trunk/lib/Target/MBlaze/MBlazeIntrinsicInfo.h Wed Feb 24 14:16:27 2010 @@ -22,6 +22,7 @@ std::string getName(unsigned IntrID, const Type **Tys = 0, unsigned numTys = 0) const; unsigned lookupName(const char *Name, unsigned Len) const; + unsigned lookupGCCName(const char *Name) const; bool isOverloaded(unsigned IID) const; Function *getDeclaration(Module *M, unsigned ID, const Type **Tys = 0, unsigned numTys = 0) const; Modified: llvm/trunk/lib/Target/MBlaze/MBlazeMachineFunction.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeMachineFunction.h?rev=97054&r1=97053&r2=97054&view=diff ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeMachineFunction.h (original) +++ llvm/trunk/lib/Target/MBlaze/MBlazeMachineFunction.h Wed Feb 24 14:16:27 2010 @@ -34,12 +34,11 @@ /// saved. This is used on Prologue and Epilogue to emit RA save/restore int RAStackOffset; - /// At each function entry, two special bitmask directives must be emitted - /// to help debugging, for CPU and FPU callee saved registers. Both need - /// the negative offset from the final stack size and its higher registers - /// location on the stack. + /// At each function entry a special bitmask directive must be emitted + /// to help in debugging CPU callee saved registers. It needs a negative + /// offset from the final stack size and its higher register location on + /// the stack. int CPUTopSavedRegOff; - int FPUTopSavedRegOff; /// MBlazeFIHolder - Holds a FrameIndex and it's Stack Pointer Offset struct MBlazeFIHolder { @@ -83,8 +82,8 @@ public: MBlazeFunctionInfo(MachineFunction& MF) : FPStackOffset(0), RAStackOffset(0), CPUTopSavedRegOff(0), - FPUTopSavedRegOff(0), GPHolder(-1,-1), HasLoadArgs(false), - HasStoreVarArgs(false), SRetReturnReg(0), GlobalBaseReg(0) + GPHolder(-1,-1), HasLoadArgs(false), HasStoreVarArgs(false), + SRetReturnReg(0), GlobalBaseReg(0) {} int getFPStackOffset() const { return FPStackOffset; } @@ -96,9 +95,6 @@ int getCPUTopSavedRegOff() const { return CPUTopSavedRegOff; } void setCPUTopSavedRegOff(int Off) { CPUTopSavedRegOff = Off; } - int getFPUTopSavedRegOff() const { return FPUTopSavedRegOff; } - void setFPUTopSavedRegOff(int Off) { FPUTopSavedRegOff = Off; } - int getGPStackOffset() const { return GPHolder.SPOffset; } int getGPFI() const { return GPHolder.FI; } void setGPStackOffset(int Off) { GPHolder.SPOffset = Off; } Modified: llvm/trunk/lib/Target/MBlaze/MBlazeRegisterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeRegisterInfo.cpp?rev=97054&r1=97053&r2=97054&view=diff ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeRegisterInfo.cpp (original) +++ llvm/trunk/lib/Target/MBlaze/MBlazeRegisterInfo.cpp Wed Feb 24 14:16:27 2010 @@ -96,7 +96,7 @@ /// MBlaze Callee Saved Registers const unsigned* MBlazeRegisterInfo:: getCalleeSavedRegs(const MachineFunction *MF) const { - // MBlaze callee-save register range is R19 - R31 + // MBlaze callee-save register range is R20 - R31 static const unsigned CalleeSavedRegs[] = { MBlaze::R20, MBlaze::R21, MBlaze::R22, MBlaze::R23, MBlaze::R24, MBlaze::R25, MBlaze::R26, MBlaze::R27, From greened at obbligato.org Wed Feb 24 14:59:49 2010 From: greened at obbligato.org (David Greene) Date: Wed, 24 Feb 2010 20:59:49 -0000 Subject: [llvm-commits] [llvm] r97056 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <20100224205949.72F3B2A6C130@llvm.org> Author: greened Date: Wed Feb 24 14:59:49 2010 New Revision: 97056 URL: http://llvm.org/viewvc/llvm-project?rev=97056&view=rev Log: Use a SmallPtrSet as suggested by Chris. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=97056&r1=97055&r2=97056&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed Feb 24 14:59:49 2010 @@ -6344,8 +6344,8 @@ } static void checkForCyclesHelper(const SDNode *N, - std::set &visited, - std::set &checked) { + SmallPtrSet &visited, + SmallPtrSet &checked) { if (checked.find(N) != checked.end()) return; @@ -6371,8 +6371,8 @@ void llvm::checkForCycles(const llvm::SDNode *N) { #ifdef XDEBUG assert(N && "Checking nonexistant SDNode"); - std::set visited; - std::set checked; + SmallPtrSet visited; + SmallPtrSet checked; checkForCyclesHelper(N, visited, checked); #endif } From dgregor at apple.com Wed Feb 24 15:21:10 2010 From: dgregor at apple.com (Douglas Gregor) Date: Wed, 24 Feb 2010 13:21:10 -0800 Subject: [llvm-commits] [llvm] r97056 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp In-Reply-To: <20100224205949.72F3B2A6C130@llvm.org> References: <20100224205949.72F3B2A6C130@llvm.org> Message-ID: <1218B93B-0956-43B7-97F2-98B3E9F2123F@apple.com> On Feb 24, 2010, at 12:59 PM, David Greene wrote: > Author: greened > Date: Wed Feb 24 14:59:49 2010 > New Revision: 97056 > > URL: http://llvm.org/viewvc/llvm-project?rev=97056&view=rev > Log: > > Use a SmallPtrSet as suggested by Chris. This seems to be breaking all of the buildbots, e.g., http://google1.osuosl.org:8011/builders/llvm-i686-linux/builds/7815/steps/compile/logs/stdio Did you try to build before committing? - Doug > Modified: > llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp > > Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=97056&r1=97055&r2=97056&view=diff > ============================================================================== > --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) > +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed Feb 24 14:59:49 2010 > @@ -6344,8 +6344,8 @@ > } > > static void checkForCyclesHelper(const SDNode *N, > - std::set &visited, > - std::set &checked) { > + SmallPtrSet &visited, > + SmallPtrSet &checked) { > if (checked.find(N) != checked.end()) > return; > > @@ -6371,8 +6371,8 @@ > void llvm::checkForCycles(const llvm::SDNode *N) { > #ifdef XDEBUG > assert(N && "Checking nonexistant SDNode"); > - std::set visited; > - std::set checked; > + SmallPtrSet visited; > + SmallPtrSet checked; > checkForCyclesHelper(N, visited, checked); > #endif > } > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From sabre at nondot.org Wed Feb 24 15:25:09 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 24 Feb 2010 21:25:09 -0000 Subject: [llvm-commits] [llvm] r97057 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <20100224212509.2276B2A6C136@llvm.org> Author: lattner Date: Wed Feb 24 15:25:08 2010 New Revision: 97057 URL: http://llvm.org/viewvc/llvm-project?rev=97057&view=rev Log: revert david's patch which does not even build. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=97057&r1=97056&r2=97057&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed Feb 24 15:25:08 2010 @@ -6344,8 +6344,8 @@ } static void checkForCyclesHelper(const SDNode *N, - SmallPtrSet &visited, - SmallPtrSet &checked) { + std::set &visited, + std::set &checked) { if (checked.find(N) != checked.end()) return; @@ -6371,8 +6371,8 @@ void llvm::checkForCycles(const llvm::SDNode *N) { #ifdef XDEBUG assert(N && "Checking nonexistant SDNode"); - SmallPtrSet visited; - SmallPtrSet checked; + std::set visited; + std::set checked; checkForCyclesHelper(N, visited, checked); #endif } From dag at cray.com Wed Feb 24 15:31:17 2010 From: dag at cray.com (David Greene) Date: Wed, 24 Feb 2010 15:31:17 -0600 Subject: [llvm-commits] [llvm] r97057 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp In-Reply-To: <20100224212509.2276B2A6C136@llvm.org> References: <20100224212509.2276B2A6C136@llvm.org> Message-ID: <201002241531.23780.dag@cray.com> On Wednesday 24 February 2010 15:25:09 Chris Lattner wrote: > Author: lattner > Date: Wed Feb 24 15:25:08 2010 > New Revision: 97057 > > URL: http://llvm.org/viewvc/llvm-project?rev=97057&view=rev > Log: > revert david's patch which does not even build. Er? I see the failure in the buildbot. How did it build on my end? Probably something got updated between when I built and when I checked in. Apologies for the issue. I will fix it immediately. -Dave From dag at cray.com Wed Feb 24 15:34:02 2010 From: dag at cray.com (David Greene) Date: Wed, 24 Feb 2010 15:34:02 -0600 Subject: [llvm-commits] [llvm] r97057 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp In-Reply-To: <201002241531.23780.dag@cray.com> References: <20100224212509.2276B2A6C136@llvm.org> <201002241531.23780.dag@cray.com> Message-ID: <201002241534.03418.dag@cray.com> On Wednesday 24 February 2010 15:31:17 David Greene wrote: > On Wednesday 24 February 2010 15:25:09 Chris Lattner wrote: > > Author: lattner > > Date: Wed Feb 24 15:25:08 2010 > > New Revision: 97057 > > > > URL: http://llvm.org/viewvc/llvm-project?rev=97057&view=rev > > Log: > > revert david's patch which does not even build. > > Er? I see the failure in the buildbot. How did it build on my end? > > Probably something got updated between when I built and when > I checked in. Ah, no. I screwed up. I probably missed the build failure because I saw so many failures of other tests on trunk. I guess it got lost in the make output. Again, apologies for this. -Dave From sabre at nondot.org Wed Feb 24 15:34:04 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 24 Feb 2010 21:34:04 -0000 Subject: [llvm-commits] [llvm] r97059 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <20100224213404.41EF52A6C136@llvm.org> Author: lattner Date: Wed Feb 24 15:34:04 2010 New Revision: 97059 URL: http://llvm.org/viewvc/llvm-project?rev=97059&view=rev Log: convert cycle checker to smallptrset, add comments and make it more elegant. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=97059&r1=97058&r2=97059&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed Feb 24 15:34:04 2010 @@ -6343,36 +6343,36 @@ return true; } +#ifdef XDEBUG static void checkForCyclesHelper(const SDNode *N, - std::set &visited, - std::set &checked) { - if (checked.find(N) != checked.end()) + SmallPtrSet &Visited, + SmallPtrSet &Checked) { + // If this node has already been checked, don't check it again. + if (Checked.count(N)) return; - - if (visited.find(N) != visited.end()) { + + // If a node has already been visited on this depth-first walk, reject it as + // a cycle. + if (!Visited.insert(N)) { dbgs() << "Offending node:\n"; N->dumprFull(); - assert(0 && "Detected cycle in SelectionDAG"); + errs() << "Detected cycle in SelectionDAG\n"; + abort(); } - - std::set::iterator i; - bool inserted; - - tie(i, inserted) = visited.insert(N); - assert(inserted && "Missed cycle"); - - for(unsigned i = 0; i < N->getNumOperands(); ++i) { - checkForCyclesHelper(N->getOperand(i).getNode(), visited, checked); - } - visited.erase(i); - checked.insert(N); + + for(unsigned i = 0, e = N->getNumOperands(); i != e; ++i) + checkForCyclesHelper(N->getOperand(i).getNode(), Visited, Checked); + + Checked.insert(N); + Visited.erase(N); } +#endif void llvm::checkForCycles(const llvm::SDNode *N) { #ifdef XDEBUG assert(N && "Checking nonexistant SDNode"); - std::set visited; - std::set checked; + SmallPtrSet visited; + SmallPtrSet checked; checkForCyclesHelper(N, visited, checked); #endif } From gohman at apple.com Wed Feb 24 16:05:23 2010 From: gohman at apple.com (Dan Gohman) Date: Wed, 24 Feb 2010 22:05:23 -0000 Subject: [llvm-commits] [llvm] r97064 - in /llvm/trunk: include/llvm/Target/TargetData.h lib/CodeGen/SelectionDAG/LegalizeDAG.cpp lib/CodeGen/SelectionDAG/LegalizeTypes.cpp lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp lib/Target/TargetData.cpp test/CodeGen/X86/vector-of-i1.ll Message-ID: <20100224220523.B6BB32A6C136@llvm.org> Author: djg Date: Wed Feb 24 16:05:23 2010 New Revision: 97064 URL: http://llvm.org/viewvc/llvm-project?rev=97064&view=rev Log: Make getTypeSizeInBits work correctly for array types; it should return the number of value bits, not the number of bits of allocation for in-memory storage. Make getTypeStoreSize and getTypeAllocSize work consistently for arrays and vectors. Fix several places in CodeGen which compute offsets into in-memory vectors to use TargetData information. This fixes PR1784. Added: llvm/trunk/test/CodeGen/X86/vector-of-i1.ll Modified: llvm/trunk/include/llvm/Target/TargetData.h llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp llvm/trunk/lib/Target/TargetData.cpp Modified: llvm/trunk/include/llvm/Target/TargetData.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetData.h?rev=97064&r1=97063&r2=97064&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetData.h (original) +++ llvm/trunk/include/llvm/Target/TargetData.h Wed Feb 24 16:05:23 2010 @@ -193,9 +193,7 @@ /// getTypeStoreSize - Return the maximum number of bytes that may be /// overwritten by storing the specified type. For example, returns 5 /// for i36 and 10 for x86_fp80. - uint64_t getTypeStoreSize(const Type *Ty) const { - return (getTypeSizeInBits(Ty)+7)/8; - } + uint64_t getTypeStoreSize(const Type *Ty) const; /// getTypeStoreSizeInBits - Return the maximum number of bits that may be /// overwritten by storing the specified type; always a multiple of 8. For @@ -208,10 +206,7 @@ /// of the specified type, including alignment padding. This is the amount /// that alloca reserves for this type. For example, returns 12 or 16 for /// x86_fp80, depending on alignment. - uint64_t getTypeAllocSize(const Type* Ty) const { - // Round up to the next alignment boundary. - return RoundUpAlignment(getTypeStoreSize(Ty), getABITypeAlignment(Ty)); - } + uint64_t getTypeAllocSize(const Type* Ty) const; /// getTypeAllocSizeInBits - Return the offset in bits between successive /// objects of the specified type, including alignment padding; always a Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=97064&r1=97063&r2=97064&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Wed Feb 24 16:05:23 2010 @@ -660,7 +660,8 @@ unsigned CastOpc = IdxVT.bitsGT(PtrVT) ? ISD::TRUNCATE : ISD::ZERO_EXTEND; Tmp3 = DAG.getNode(CastOpc, dl, PtrVT, Tmp3); // Add the offset to the index. - unsigned EltSize = EltVT.getSizeInBits()/8; + unsigned EltSize = TLI.getTargetData()-> + getTypeAllocSize(EltVT.getTypeForEVT(*DAG.getContext())); Tmp3 = DAG.getNode(ISD::MUL, dl, IdxVT, Tmp3,DAG.getConstant(EltSize, IdxVT)); SDValue StackPtr2 = DAG.getNode(ISD::ADD, dl, IdxVT, Tmp3, StackPtr); // Store the scalar value. @@ -1512,8 +1513,9 @@ false, false, 0); // Add the offset to the index. - unsigned EltSize = - Vec.getValueType().getVectorElementType().getSizeInBits()/8; + unsigned EltSize = TLI.getTargetData()->getTypeAllocSize( + Vec.getValueType().getVectorElementType().getTypeForEVT(*DAG.getContext())); + Idx = DAG.getNode(ISD::MUL, dl, Idx.getValueType(), Idx, DAG.getConstant(EltSize, Idx.getValueType())); @@ -1548,7 +1550,8 @@ // Emit a store of each element to the stack slot. SmallVector Stores; - unsigned TypeByteSize = EltVT.getSizeInBits() / 8; + unsigned TypeByteSize = TLI.getTargetData()-> + getTypeAllocSize(EltVT.getTypeForEVT(*DAG.getContext())); // Store (in the right endianness) the elements to memory. for (unsigned i = 0, e = Node->getNumOperands(); i != e; ++i) { // Ignore undef elements. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp?rev=97064&r1=97063&r2=97064&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp Wed Feb 24 16:05:23 2010 @@ -966,7 +966,8 @@ Index = DAG.getNode(ISD::ZERO_EXTEND, dl, TLI.getPointerTy(), Index); // Calculate the element offset and add it to the pointer. - unsigned EltSize = EltVT.getSizeInBits() / 8; // FIXME: should be ABI size. + unsigned EltSize = TLI.getTargetData()-> + getTypeAllocSize(EltVT.getTypeForEVT(*DAG.getContext())); Index = DAG.getNode(ISD::MUL, dl, Index.getValueType(), Index, DAG.getConstant(EltSize, Index.getValueType())); Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp?rev=97064&r1=97063&r2=97064&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Wed Feb 24 16:05:23 2010 @@ -715,7 +715,8 @@ false, false, 0); // Increment the pointer to the other part. - unsigned IncrementSize = Lo.getValueType().getSizeInBits() / 8; + unsigned IncrementSize = TLI.getTargetData()-> + getTypeAllocSize(Lo.getValueType().getTypeForEVT(*DAG.getContext())); StackPtr = DAG.getNode(ISD::ADD, dl, StackPtr.getValueType(), StackPtr, DAG.getIntPtrConstant(IncrementSize)); @@ -757,7 +758,8 @@ Lo = DAG.getLoad(ISD::UNINDEXED, dl, ExtType, LoVT, Ch, Ptr, Offset, SV, SVOffset, LoMemVT, isVolatile, isNonTemporal, Alignment); - unsigned IncrementSize = LoMemVT.getSizeInBits()/8; + unsigned IncrementSize = TLI.getTargetData()-> + getTypeAllocSize(LoMemVT.getTypeForEVT(*DAG.getContext())); Ptr = DAG.getNode(ISD::ADD, dl, Ptr.getValueType(), Ptr, DAG.getIntPtrConstant(IncrementSize)); SVOffset += IncrementSize; @@ -1121,7 +1123,8 @@ EVT LoMemVT, HiMemVT; GetSplitDestVTs(MemoryVT, LoMemVT, HiMemVT); - unsigned IncrementSize = LoMemVT.getSizeInBits()/8; + unsigned IncrementSize = TLI.getTargetData()-> + getTypeAllocSize(LoMemVT.getTypeForEVT(*DAG.getContext())); if (isTruncating) Lo = DAG.getTruncStore(Ch, dl, Lo, Ptr, N->getSrcValue(), SVOffset, @@ -2182,7 +2185,8 @@ unsigned Offset = 0; while (LdWidth > 0) { - unsigned Increment = NewVTWidth / 8; + unsigned Increment = TLI.getTargetData()-> + getTypeAllocSize(NewVT.getTypeForEVT(*DAG.getContext())); Offset += Increment; BasePtr = DAG.getNode(ISD::ADD, dl, BasePtr.getValueType(), BasePtr, DAG.getIntPtrConstant(Increment)); @@ -2279,7 +2283,8 @@ // Load each element and widen unsigned WidenNumElts = WidenVT.getVectorNumElements(); SmallVector Ops(WidenNumElts); - unsigned Increment = LdEltVT.getSizeInBits() / 8; + unsigned Increment = TLI.getTargetData()-> + getTypeAllocSize(LdEltVT.getTypeForEVT(*DAG.getContext())); Ops[0] = DAG.getExtLoad(ExtType, dl, EltVT, Chain, BasePtr, SV, SVOffset, LdEltVT, isVolatile, isNonTemporal, Align); LdChain.push_back(Ops[0].getValue(1)); @@ -2331,7 +2336,8 @@ // Find the largest vector type we can store with EVT NewVT = FindMemType(DAG, TLI, StWidth, ValVT); unsigned NewVTWidth = NewVT.getSizeInBits(); - unsigned Increment = NewVTWidth / 8; + unsigned Increment = TLI.getTargetData()-> + getTypeAllocSize(NewVT.getTypeForEVT(*DAG.getContext())); if (NewVT.isVector()) { unsigned NumVTElts = NewVT.getVectorNumElements(); do { @@ -2399,7 +2405,8 @@ // the store. EVT StEltVT = StVT.getVectorElementType(); EVT ValEltVT = ValVT.getVectorElementType(); - unsigned Increment = ValEltVT.getSizeInBits() / 8; + unsigned Increment = TLI.getTargetData()-> + getTypeAllocSize(ValEltVT.getTypeForEVT(*DAG.getContext())); unsigned NumElts = StVT.getVectorNumElements(); SDValue EOp = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, dl, ValEltVT, ValOp, DAG.getIntPtrConstant(0)); Modified: llvm/trunk/lib/Target/TargetData.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetData.cpp?rev=97064&r1=97063&r2=97064&view=diff ============================================================================== --- llvm/trunk/lib/Target/TargetData.cpp (original) +++ llvm/trunk/lib/Target/TargetData.cpp Wed Feb 24 16:05:23 2010 @@ -455,7 +455,7 @@ return getPointerSizeInBits(); case Type::ArrayTyID: { const ArrayType *ATy = cast(Ty); - return getTypeAllocSizeInBits(ATy->getElementType())*ATy->getNumElements(); + return getTypeSizeInBits(ATy->getElementType())*ATy->getNumElements(); } case Type::StructTyID: // Get the layout annotation... which is lazily created on demand. @@ -484,6 +484,47 @@ return 0; } +/// getTypeStoreSize - Return the maximum number of bytes that may be +/// overwritten by storing the specified type. For example, returns 5 +/// for i36 and 10 for x86_fp80. +uint64_t TargetData::getTypeStoreSize(const Type *Ty) const { + // Arrays and vectors are allocated as sequences of elements. + if (const ArrayType *ATy = dyn_cast(Ty)) { + if (ATy->getNumElements() == 0) + return 0; + const Type *ElementType = ATy->getElementType(); + return getTypeAllocSize(ElementType) * (ATy->getNumElements() - 1) + + getTypeStoreSize(ElementType); + } + if (const VectorType *VTy = dyn_cast(Ty)) { + const Type *ElementType = VTy->getElementType(); + return getTypeAllocSize(ElementType) * (VTy->getNumElements() - 1) + + getTypeStoreSize(ElementType); + } + + return (getTypeSizeInBits(Ty)+7)/8; +} + +/// getTypeAllocSize - Return the offset in bytes between successive objects +/// of the specified type, including alignment padding. This is the amount +/// that alloca reserves for this type. For example, returns 12 or 16 for +/// x86_fp80, depending on alignment. +uint64_t TargetData::getTypeAllocSize(const Type* Ty) const { + // Arrays and vectors are allocated as sequences of elements. + // Note that this means that things like vectors-of-i1 are not bit-packed + // in memory (except on a hypothetical bit-addressable machine). If + // someone builds hardware with native vector-of-i1 stores and the idiom + // of bitcasting vectors to integers in order to bitpack them for storage + // isn't sufficient, TargetData may need new "size" concept. + if (const ArrayType *ATy = dyn_cast(Ty)) + return getTypeAllocSize(ATy->getElementType()) * ATy->getNumElements(); + if (const VectorType *VTy = dyn_cast(Ty)) + return getTypeAllocSize(VTy->getElementType()) * VTy->getNumElements(); + + // Round up to the next alignment boundary. + return RoundUpAlignment(getTypeStoreSize(Ty), getABITypeAlignment(Ty)); +} + /*! \param abi_or_pref Flag that determines which alignment is returned. true returns the ABI alignment, false returns the preferred alignment. Added: llvm/trunk/test/CodeGen/X86/vector-of-i1.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/vector-of-i1.ll?rev=97064&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/vector-of-i1.ll (added) +++ llvm/trunk/test/CodeGen/X86/vector-of-i1.ll Wed Feb 24 16:05:23 2010 @@ -0,0 +1,39 @@ +; RUN: llc < %s -march=x86-64 | FileCheck %s + +; Vectors of i1 are stored with each element having a +; different address. Since the address unit on x86 is 8 bits, +; that means each i1 value takes 8 bits of storage. + +; CHECK: store: +; CHECK: movb $1, 7(%rdi) +; CHECK: movb $1, 6(%rdi) +; CHECK: movb $0, 5(%rdi) +; CHECK: movb $0, 4(%rdi) +; CHECK: movb $1, 3(%rdi) +; CHECK: movb $0, 2(%rdi) +; CHECK: movb $1, 1(%rdi) +; CHECK: movb $0, (%rdi) +define void @store(<8 x i1>* %p) nounwind { + store <8 x i1> , <8 x i1>* %p + ret void +} + +; CHECK: variable_extract: +; CHECK: movb 7(%rdi), +; CHECK: movb 6(%rdi), +; CHECK: movb 5(%rdi), +define i32 @variable_extract(<8 x i1>* %p, i32 %n) nounwind { + %t = load <8 x i1>* %p + %s = extractelement <8 x i1> %t, i32 %n + %e = zext i1 %s to i32 + ret i32 %e +} + +; CHECK: constant_extract: +; CHECK: movzbl 3(%rdi), %eax +define i32 @constant_extract(<8 x i1>* %p, i32 %n) nounwind { + %t = load <8 x i1>* %p + %s = extractelement <8 x i1> %t, i32 3 + %e = zext i1 %s to i32 + ret i32 %e +} From bob.wilson at apple.com Wed Feb 24 16:15:54 2010 From: bob.wilson at apple.com (Bob Wilson) Date: Wed, 24 Feb 2010 22:15:54 -0000 Subject: [llvm-commits] [llvm] r97065 - in /llvm/trunk: lib/Target/ARM/ARMISelLowering.cpp test/CodeGen/ARM/neon_minmax.ll Message-ID: <20100224221554.266F92A6C136@llvm.org> Author: bwilson Date: Wed Feb 24 16:15:53 2010 New Revision: 97065 URL: http://llvm.org/viewvc/llvm-project?rev=97065&view=rev Log: Check for comparisons of +/- zero when optimizing less-than-or-equal and greater-than-or-equal SELECT_CCs to NEON vmin/vmax instructions. This is only allowed when UnsafeFPMath is set or when at least one of the operands is known to be nonzero. Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp llvm/trunk/test/CodeGen/ARM/neon_minmax.ll Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=97065&r1=97064&r2=97065&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Wed Feb 24 16:15:53 2010 @@ -3879,50 +3879,59 @@ unsigned Opcode = 0; bool IsReversed; - if (LHS == CondLHS && RHS == CondRHS) { + if (DAG.isEqualTo(LHS, CondLHS) && DAG.isEqualTo(RHS, CondRHS)) { IsReversed = false; // x CC y ? x : y - } else if (LHS == CondRHS && RHS == CondLHS) { + } else if (DAG.isEqualTo(LHS, CondRHS) && DAG.isEqualTo(RHS, CondLHS)) { IsReversed = true ; // x CC y ? y : x } else { return SDValue(); } + bool IsUnordered; switch (CC) { default: break; case ISD::SETOLT: case ISD::SETOLE: case ISD::SETLT: case ISD::SETLE: - // This can be vmin if we can prove that the LHS is not a NaN. - // (If either operand is NaN, the comparison will be false and the result - // will be the RHS, which matches vmin if RHS is the NaN.) - if (DAG.isKnownNeverNaN(LHS)) - Opcode = IsReversed ? ARMISD::FMAX : ARMISD::FMIN; - break; - case ISD::SETULT: case ISD::SETULE: - // Likewise, for ULT/ULE we need to know that RHS is not a NaN. - if (DAG.isKnownNeverNaN(RHS)) - Opcode = IsReversed ? ARMISD::FMAX : ARMISD::FMIN; + // If LHS is NaN, an ordered comparison will be false and the result will + // be the RHS, but vmin(NaN, RHS) = NaN. Avoid this by checking that LHS + // != NaN. Likewise, for unordered comparisons, check for RHS != NaN. + IsUnordered = (CC == ISD::SETULT || CC == ISD::SETULE); + if (!DAG.isKnownNeverNaN(IsUnordered ? RHS : LHS)) + break; + // For less-than-or-equal comparisons, "+0 <= -0" will be true but vmin + // will return -0, so vmin can only be used for unsafe math or if one of + // the operands is known to be nonzero. + if ((CC == ISD::SETLE || CC == ISD::SETOLE || CC == ISD::SETULE) && + !UnsafeFPMath && + !(DAG.isKnownNeverZero(LHS) || DAG.isKnownNeverZero(RHS))) + break; + Opcode = IsReversed ? ARMISD::FMAX : ARMISD::FMIN; break; case ISD::SETOGT: case ISD::SETOGE: case ISD::SETGT: case ISD::SETGE: - // This can be vmax if we can prove that the LHS is not a NaN. - // (If either operand is NaN, the comparison will be false and the result - // will be the RHS, which matches vmax if RHS is the NaN.) - if (DAG.isKnownNeverNaN(LHS)) - Opcode = IsReversed ? ARMISD::FMIN : ARMISD::FMAX; - break; - case ISD::SETUGT: case ISD::SETUGE: - // Likewise, for UGT/UGE we need to know that RHS is not a NaN. - if (DAG.isKnownNeverNaN(RHS)) - Opcode = IsReversed ? ARMISD::FMIN : ARMISD::FMAX; + // If LHS is NaN, an ordered comparison will be false and the result will + // be the RHS, but vmax(NaN, RHS) = NaN. Avoid this by checking that LHS + // != NaN. Likewise, for unordered comparisons, check for RHS != NaN. + IsUnordered = (CC == ISD::SETUGT || CC == ISD::SETUGE); + if (!DAG.isKnownNeverNaN(IsUnordered ? RHS : LHS)) + break; + // For greater-than-or-equal comparisons, "-0 >= +0" will be true but vmax + // will return +0, so vmax can only be used for unsafe math or if one of + // the operands is known to be nonzero. + if ((CC == ISD::SETGE || CC == ISD::SETOGE || CC == ISD::SETUGE) && + !UnsafeFPMath && + !(DAG.isKnownNeverZero(LHS) || DAG.isKnownNeverZero(RHS))) + break; + Opcode = IsReversed ? ARMISD::FMIN : ARMISD::FMAX; break; } Modified: llvm/trunk/test/CodeGen/ARM/neon_minmax.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/neon_minmax.ll?rev=97065&r1=97064&r2=97065&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/ARM/neon_minmax.ll (original) +++ llvm/trunk/test/CodeGen/ARM/neon_minmax.ll Wed Feb 24 16:15:53 2010 @@ -8,6 +8,14 @@ ret float %min1 } +define float @fmin_ole_zero(float %x) nounwind { +;CHECK: fmin_ole_zero: +;CHECK-NOT: vmin.f32 + %cond = fcmp ole float 0.0, %x + %min1 = select i1 %cond, float 0.0, float %x + ret float %min1 +} + define float @fmin_ult(float %x) nounwind { ;CHECK: fmin_ult: ;CHECK: vmin.f32 @@ -32,6 +40,14 @@ ret float %max1 } +define float @fmax_uge_zero(float %x) nounwind { +;CHECK: fmax_uge_zero: +;CHECK-NOT: vmax.f32 + %cond = fcmp uge float %x, 0.0 + %max1 = select i1 %cond, float %x, float 0.0 + ret float %max1 +} + define float @fmax_olt_reverse(float %x) nounwind { ;CHECK: fmax_olt_reverse: ;CHECK: vmax.f32 From sabre at nondot.org Wed Feb 24 16:33:41 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 24 Feb 2010 22:33:41 -0000 Subject: [llvm-commits] [llvm] r97069 - /llvm/trunk/autoconf/ExportMap.map Message-ID: <20100224223341.A80FF2A6C136@llvm.org> Author: lattner Date: Wed Feb 24 16:33:41 2010 New Revision: 97069 URL: http://llvm.org/viewvc/llvm-project?rev=97069&view=rev Log: fix PR5954, patch by Roman Divacky. I don't have a great way to test this myself (it's linux/bsd only), but Roman says it works. :) Modified: llvm/trunk/autoconf/ExportMap.map Modified: llvm/trunk/autoconf/ExportMap.map URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/ExportMap.map?rev=97069&r1=97068&r2=97069&view=diff ============================================================================== --- llvm/trunk/autoconf/ExportMap.map (original) +++ llvm/trunk/autoconf/ExportMap.map Wed Feb 24 16:33:41 2010 @@ -1,4 +1,7 @@ { global: main; + __progname; + environ; + local: *; }; From stoklund at 2pi.dk Wed Feb 24 16:43:17 2010 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Wed, 24 Feb 2010 22:43:17 -0000 Subject: [llvm-commits] [llvm] r97071 - in /llvm/trunk: lib/Target/ARM/ARMBaseRegisterInfo.cpp test/CodeGen/Thumb2/2010-02-24-BigStack.ll Message-ID: <20100224224317.3B4FD2A6C136@llvm.org> Author: stoklund Date: Wed Feb 24 16:43:17 2010 New Revision: 97071 URL: http://llvm.org/viewvc/llvm-project?rev=97071&view=rev Log: Create a stack frame on ARM when - Function uses all scratch registers AND - Function does not use any callee saved registers AND - Stack size is too big to address with immediate offsets. In this case a register must be scavenged to calculate the address of a stack object, and the scavenger needs a spare register or emergency spill slot. Added: llvm/trunk/test/CodeGen/Thumb2/2010-02-24-BigStack.ll Modified: llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp Modified: llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp?rev=97071&r1=97070&r2=97071&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp Wed Feb 24 16:43:17 2010 @@ -513,7 +513,7 @@ } /// estimateStackSize - Estimate and return the size of the frame. -static unsigned estimateStackSize(MachineFunction &MF, MachineFrameInfo *MFI) { +static unsigned estimateStackSize(MachineFunction &MF) { const MachineFrameInfo *FFI = MF.getFrameInfo(); int Offset = 0; for (int i = FFI->getObjectIndexBegin(); i != 0; ++i) { @@ -671,8 +671,16 @@ } } + // If any of the stack slot references may be out of range of an immediate + // offset, make sure a register (or a spill slot) is available for the + // register scavenger. Note that if we're indexing off the frame pointer, the + // effective stack size is 4 bytes larger since the FP points to the stack + // slot of the previous FP. + bool BigStack = RS && + estimateStackSize(MF) + (hasFP(MF) ? 4 : 0) >= estimateRSStackSizeLimit(MF); + bool ExtraCSSpill = false; - if (!CanEliminateFrame || cannotEliminateFrame(MF)) { + if (BigStack || !CanEliminateFrame || cannotEliminateFrame(MF)) { AFI->setHasStackFrame(true); // If LR is not spilled, but at least one of R4, R5, R6, and R7 is spilled. @@ -727,51 +735,43 @@ // callee-saved register or reserve a special spill slot to facilitate // register scavenging. Thumb1 needs a spill slot for stack pointer // adjustments also, even when the frame itself is small. - if (RS && !ExtraCSSpill) { - MachineFrameInfo *MFI = MF.getFrameInfo(); - // If any of the stack slot references may be out of range of an - // immediate offset, make sure a register (or a spill slot) is - // available for the register scavenger. Note that if we're indexing - // off the frame pointer, the effective stack size is 4 bytes larger - // since the FP points to the stack slot of the previous FP. - if (estimateStackSize(MF, MFI) + (hasFP(MF) ? 4 : 0) - >= estimateRSStackSizeLimit(MF)) { - // If any non-reserved CS register isn't spilled, just spill one or two - // extra. That should take care of it! - unsigned NumExtras = TargetAlign / 4; - SmallVector Extras; - while (NumExtras && !UnspilledCS1GPRs.empty()) { - unsigned Reg = UnspilledCS1GPRs.back(); - UnspilledCS1GPRs.pop_back(); + if (BigStack && !ExtraCSSpill) { + // If any non-reserved CS register isn't spilled, just spill one or two + // extra. That should take care of it! + unsigned NumExtras = TargetAlign / 4; + SmallVector Extras; + while (NumExtras && !UnspilledCS1GPRs.empty()) { + unsigned Reg = UnspilledCS1GPRs.back(); + UnspilledCS1GPRs.pop_back(); + if (!isReservedReg(MF, Reg)) { + Extras.push_back(Reg); + NumExtras--; + } + } + // For non-Thumb1 functions, also check for hi-reg CS registers + if (!AFI->isThumb1OnlyFunction()) { + while (NumExtras && !UnspilledCS2GPRs.empty()) { + unsigned Reg = UnspilledCS2GPRs.back(); + UnspilledCS2GPRs.pop_back(); if (!isReservedReg(MF, Reg)) { Extras.push_back(Reg); NumExtras--; } } - // For non-Thumb1 functions, also check for hi-reg CS registers - if (!AFI->isThumb1OnlyFunction()) { - while (NumExtras && !UnspilledCS2GPRs.empty()) { - unsigned Reg = UnspilledCS2GPRs.back(); - UnspilledCS2GPRs.pop_back(); - if (!isReservedReg(MF, Reg)) { - Extras.push_back(Reg); - NumExtras--; - } - } - } - if (Extras.size() && NumExtras == 0) { - for (unsigned i = 0, e = Extras.size(); i != e; ++i) { - MF.getRegInfo().setPhysRegUsed(Extras[i]); - AFI->setCSRegisterIsSpilled(Extras[i]); - } - } else if (!AFI->isThumb1OnlyFunction()) { - // note: Thumb1 functions spill to R12, not the stack. - // Reserve a slot closest to SP or frame pointer. - const TargetRegisterClass *RC = ARM::GPRRegisterClass; - RS->setScavengingFrameIndex(MFI->CreateStackObject(RC->getSize(), - RC->getAlignment(), - false)); + } + if (Extras.size() && NumExtras == 0) { + for (unsigned i = 0, e = Extras.size(); i != e; ++i) { + MF.getRegInfo().setPhysRegUsed(Extras[i]); + AFI->setCSRegisterIsSpilled(Extras[i]); } + } else if (!AFI->isThumb1OnlyFunction()) { + // note: Thumb1 functions spill to R12, not the stack. Reserve a slot + // closest to SP or frame pointer. + const TargetRegisterClass *RC = ARM::GPRRegisterClass; + MachineFrameInfo *MFI = MF.getFrameInfo(); + RS->setScavengingFrameIndex(MFI->CreateStackObject(RC->getSize(), + RC->getAlignment(), + false)); } } } Added: llvm/trunk/test/CodeGen/Thumb2/2010-02-24-BigStack.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Thumb2/2010-02-24-BigStack.ll?rev=97071&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/Thumb2/2010-02-24-BigStack.ll (added) +++ llvm/trunk/test/CodeGen/Thumb2/2010-02-24-BigStack.ll Wed Feb 24 16:43:17 2010 @@ -0,0 +1,15 @@ +; RUN: llc < %s -O0 -relocation-model=pic -disable-fp-elim -mcpu=cortex-a8 -mattr=+vfp2 +; This test creates a big stack frame without spilling any callee-saved registers. +; Make sure the whole stack frame is addrerssable wiothout scavenger crashes. +target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:64:64-v128:128:128-a0:0:32-n32" +target triple = "thumbv7-apple-darwin3.0.0-iphoneos" + +define arm_apcscc void @FindMin(double* %panelTDEL, i8* %dclOfRow, i32 %numRows, i32 %numCols, double* %retMin_RES_TDEL) { +entry: + %panelTDEL.addr = alloca double*, align 4 ; [#uses=1] + %panelResTDEL = alloca [2560 x double], align 4 ; <[2560 x double]*> [#uses=0] + store double* %panelTDEL, double** %panelTDEL.addr + store double* %retMin_RES_TDEL, double** undef + store i32 0, i32* undef + unreachable +} From sabre at nondot.org Wed Feb 24 16:44:06 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 24 Feb 2010 22:44:06 -0000 Subject: [llvm-commits] [llvm] r97072 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <20100224224406.D40992A6C136@llvm.org> Author: lattner Date: Wed Feb 24 16:44:06 2010 New Revision: 97072 URL: http://llvm.org/viewvc/llvm-project?rev=97072&view=rev Log: clean up various VT manipulations, patch by Micah Villmow! PR6337 Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=97072&r1=97071&r2=97072&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed Feb 24 16:44:06 2010 @@ -862,14 +862,14 @@ /// getNOT - Create a bitwise NOT operation as (XOR Val, -1). /// SDValue SelectionDAG::getNOT(DebugLoc DL, SDValue Val, EVT VT) { - EVT EltVT = VT.isVector() ? VT.getVectorElementType() : VT; + EVT EltVT = VT.getScalarType(); SDValue NegOne = getConstant(APInt::getAllOnesValue(EltVT.getSizeInBits()), VT); return getNode(ISD::XOR, DL, VT, Val, NegOne); } SDValue SelectionDAG::getConstant(uint64_t Val, EVT VT, bool isT) { - EVT EltVT = VT.isVector() ? VT.getVectorElementType() : VT; + EVT EltVT = VT.getScalarType(); assert((EltVT.getSizeInBits() >= 64 || (uint64_t)((int64_t)Val >> EltVT.getSizeInBits()) + 1 < 2) && "getConstant with a uint64_t value that doesn't fit in the type!"); @@ -883,7 +883,7 @@ SDValue SelectionDAG::getConstant(const ConstantInt &Val, EVT VT, bool isT) { assert(VT.isInteger() && "Cannot create FP integer constant!"); - EVT EltVT = VT.isVector() ? VT.getVectorElementType() : VT; + EVT EltVT = VT.getScalarType(); assert(Val.getBitWidth() == EltVT.getSizeInBits() && "APInt size does not match type size!"); @@ -926,8 +926,7 @@ SDValue SelectionDAG::getConstantFP(const ConstantFP& V, EVT VT, bool isTarget){ assert(VT.isFloatingPoint() && "Cannot create integer FP constant!"); - EVT EltVT = - VT.isVector() ? VT.getVectorElementType() : VT; + EVT EltVT = VT.getScalarType(); // Do the map lookup using the actual bit pattern for the floating point // value, so that we don't have problems with 0.0 comparing equal to -0.0, and @@ -961,8 +960,7 @@ } SDValue SelectionDAG::getConstantFP(double Val, EVT VT, bool isTarget) { - EVT EltVT = - VT.isVector() ? VT.getVectorElementType() : VT; + EVT EltVT = VT.getScalarType(); if (EltVT==MVT::f32) return getConstantFP(APFloat((float)Val), VT, isTarget); else @@ -3106,8 +3104,7 @@ /// operand. static SDValue getMemsetValue(SDValue Value, EVT VT, SelectionDAG &DAG, DebugLoc dl) { - unsigned NumBits = VT.isVector() ? - VT.getVectorElementType().getSizeInBits() : VT.getSizeInBits(); + unsigned NumBits = VT.getScalarType().getSizeInBits(); if (ConstantSDNode *C = dyn_cast(Value)) { APInt Val = APInt(NumBits, C->getZExtValue() & 255); unsigned Shift = 8; From sabre at nondot.org Wed Feb 24 16:52:52 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 24 Feb 2010 22:52:52 -0000 Subject: [llvm-commits] [llvm] r97074 - /llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Message-ID: <20100224225252.B9BC22A6C136@llvm.org> Author: lattner Date: Wed Feb 24 16:52:52 2010 New Revision: 97074 URL: http://llvm.org/viewvc/llvm-project?rev=97074&view=rev Log: fix a bug I introduced by checking the wrong node's VT in OPC_CheckChildXType Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h?rev=97074&r1=97073&r2=97074&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h (original) +++ llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Wed Feb 24 16:52:52 2010 @@ -494,9 +494,10 @@ MVT::SimpleValueType VT = (MVT::SimpleValueType)MatcherTable[MatcherIndex++]; - if (N.getOperand(ChildNo).getValueType() != VT) { + EVT ChildVT = N.getOperand(ChildNo).getValueType(); + if (ChildVT != VT) { // Handle the case when VT is iPTR. - if (VT != MVT::iPTR || N.getValueType() != TLI.getPointerTy()) + if (VT != MVT::iPTR || ChildVT != TLI.getPointerTy()) break; } continue; From isanbard at gmail.com Wed Feb 24 17:34:35 2010 From: isanbard at gmail.com (Bill Wendling) Date: Wed, 24 Feb 2010 23:34:35 -0000 Subject: [llvm-commits] [llvm] r97078 - in /llvm/trunk/lib/CodeGen/AsmPrinter: DwarfException.cpp DwarfPrinter.cpp DwarfPrinter.h Message-ID: <20100224233435.ED4492A6C136@llvm.org> Author: void Date: Wed Feb 24 17:34:35 2010 New Revision: 97078 URL: http://llvm.org/viewvc/llvm-project?rev=97078&view=rev Log: LLVM puts padding bytes in the __gcc_except_tab section after the GCC_except_table label but before the Lexception, which the FDE references. This causes problems as the FDE does not point to the start of an LSDA chunk. Use an unnormalized uleb128 for the call-site table length that includes the padding. Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.h Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp?rev=97078&r1=97077&r2=97078&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp Wed Feb 24 17:34:35 2010 @@ -638,18 +638,18 @@ const unsigned LandingPadSize = SizeOfEncodedValue(dwarf::DW_EH_PE_udata4); bool IsSJLJ = MAI->getExceptionHandlingType() == ExceptionHandling::SjLj; bool HaveTTData = IsSJLJ ? (!TypeInfos.empty() || !FilterIds.empty()) : true; - unsigned SizeSites; + unsigned CallSiteTableLength; if (IsSJLJ) - SizeSites = 0; + CallSiteTableLength = 0; else - SizeSites = CallSites.size() * + CallSiteTableLength = CallSites.size() * (SiteStartSize + SiteLengthSize + LandingPadSize); for (unsigned i = 0, e = CallSites.size(); i < e; ++i) { - SizeSites += MCAsmInfo::getULEB128Size(CallSites[i].Action); + CallSiteTableLength += MCAsmInfo::getULEB128Size(CallSites[i].Action); if (IsSJLJ) - SizeSites += MCAsmInfo::getULEB128Size(i); + CallSiteTableLength += MCAsmInfo::getULEB128Size(i); } // Type infos. @@ -698,7 +698,20 @@ Asm->OutStreamer.SwitchSection(LSDASection); Asm->EmitAlignment(2, 0, 0, false); + // Emit the LSDA. O << "GCC_except_table" << SubprogramCount << ":\n"; + EmitLabel("exception", SubprogramCount); + + if (IsSJLJ) { + SmallString<16> LSDAName; + raw_svector_ostream(LSDAName) << MAI->getPrivateGlobalPrefix() << + "_LSDA_" << Asm->getFunctionNumber(); + O << LSDAName.str() << ":\n"; + } + + // Emit the LSDA header. + EmitEncodingByte(dwarf::DW_EH_PE_omit, "@LPStart"); + EmitEncodingByte(TTypeEncoding, "@TType"); // The type infos need to be aligned. GCC does this by inserting padding just // before the type infos. However, this changes the size of the exception @@ -707,7 +720,7 @@ // So by increasing the size by inserting padding, you may increase the number // of bytes used for writing the size. If it increases, say by one byte, then // you now need to output one less byte of padding to get the type infos - // aligned. However this decreases the size of the exception table. This + // aligned. However this decreases the size of the exception table. This // changes the value you have to output for the exception table size. Due to // the variable length encoding, the number of bytes used for writing the // length may decrease. If so, you then have to increase the amount of @@ -716,41 +729,30 @@ // We chose another solution: don't output padding inside the table like GCC // does, instead output it before the table. unsigned SizeTypes = TypeInfos.size() * TypeFormatSize; - unsigned TyOffset = sizeof(int8_t) + // Call site format - MCAsmInfo::getULEB128Size(SizeSites) + // Call site table length - SizeSites + SizeActions + SizeTypes; - unsigned TotalSize = sizeof(int8_t) + // LPStart format - sizeof(int8_t) + // TType format - (HaveTTData ? - MCAsmInfo::getULEB128Size(TyOffset) : 0) + // TType base offset - TyOffset; + unsigned CallSiteTableLengthSize = + MCAsmInfo::getULEB128Size(CallSiteTableLength); + unsigned TTypeBaseOffset = + sizeof(int8_t) + // Call site format + CallSiteTableLengthSize + // Call site table length size + CallSiteTableLength + // Call site table length + SizeActions + // Actions size + SizeTypes; + unsigned TTypeBaseOffsetSize = MCAsmInfo::getULEB128Size(TTypeBaseOffset); + unsigned TotalSize = + sizeof(int8_t) + // LPStart format + sizeof(int8_t) + // TType format + (HaveTTData ? TTypeBaseOffsetSize : 0) + // TType base offset size + TTypeBaseOffset; // TType base offset unsigned SizeAlign = (4 - TotalSize) & 3; - for (unsigned i = 0; i != SizeAlign; ++i) { - Asm->EmitInt8(0); - EOL("Padding"); - } - - EmitLabel("exception", SubprogramCount); - - if (IsSJLJ) { - SmallString<16> LSDAName; - raw_svector_ostream(LSDAName) << MAI->getPrivateGlobalPrefix() << - "_LSDA_" << Asm->getFunctionNumber(); - O << LSDAName.str() << ":\n"; - } - - // Emit the header. - EmitEncodingByte(dwarf::DW_EH_PE_omit, "@LPStart"); - EmitEncodingByte(TTypeEncoding, "@TType"); - if (HaveTTData) - EmitULEB128(TyOffset, "@TType base offset"); + // Pad here for alignment. + EmitULEB128(TTypeBaseOffset + SizeAlign, "@TType base offset"); // SjLj Exception handling if (IsSJLJ) { EmitEncodingByte(dwarf::DW_EH_PE_udata4, "Call site"); - EmitULEB128(SizeSites, "Call site table length"); + EmitULEB128(CallSiteTableLength, "Call site table length", SizeAlign); // Emit the landing pad site information. unsigned idx = 0; @@ -791,7 +793,7 @@ // Emit the landing pad call site table. EmitEncodingByte(dwarf::DW_EH_PE_udata4, "Call site"); - EmitULEB128(SizeSites, "Call site table length"); + EmitULEB128(CallSiteTableLength, "Call site table length", SizeAlign); for (SmallVectorImpl::const_iterator I = CallSites.begin(), E = CallSites.end(); I != E; ++I) { Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp?rev=97078&r1=97077&r2=97078&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp Wed Feb 24 17:34:35 2010 @@ -159,29 +159,37 @@ Value >>= 7; IsMore = Value != Sign || ((Byte ^ Sign) & 0x40) != 0; if (IsMore) Byte |= 0x80; - Asm->OutStreamer.EmitIntValue(Byte, 1, /*addrspace*/0); } while (IsMore); } /// EmitULEB128 - emit the specified signed leb128 value. -void DwarfPrinter::EmitULEB128(unsigned Value, const char *Desc) const { +void DwarfPrinter::EmitULEB128(unsigned Value, const char *Desc, + unsigned PadTo) const { if (Asm->VerboseAsm && Desc) Asm->OutStreamer.AddComment(Desc); - if (MAI->hasLEB128()) { + if (MAI->hasLEB128() && PadTo == 0) { O << "\t.uleb128\t" << Value; Asm->OutStreamer.AddBlankLine(); return; } - // If we don't have .uleb128, emit as .bytes. + // If we don't have .uleb128 or we want to emit padding, emit as .bytes. do { unsigned char Byte = static_cast(Value & 0x7f); Value >>= 7; - if (Value) Byte |= 0x80; + if (Value || PadTo != 0) Byte |= 0x80; Asm->OutStreamer.EmitIntValue(Byte, 1, /*addrspace*/0); } while (Value); + + if (PadTo) + while (PadTo--) { + unsigned char Byte = (PadTo ? 0x80 : 0x00); + if (Asm->VerboseAsm) + Asm->OutStreamer.AddComment("Padding"); + Asm->OutStreamer.EmitIntValue(Byte, 1, /*addrspace*/0); + } } Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.h?rev=97078&r1=97077&r2=97078&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.h (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.h Wed Feb 24 17:34:35 2010 @@ -111,7 +111,8 @@ void EmitSLEB128(int Value, const char *Desc) const; /// EmitULEB128 - emit the specified unsigned leb128 value. - void EmitULEB128(unsigned Value, const char *Desc = 0) const; + void EmitULEB128(unsigned Value, const char *Desc = 0, + unsigned PadTo = 0) const; /// PrintLabelName - Print label name in form used by Dwarf writer. From sabre at nondot.org Wed Feb 24 18:03:03 2010 From: sabre at nondot.org (Chris Lattner) Date: Thu, 25 Feb 2010 00:03:03 -0000 Subject: [llvm-commits] [llvm] r97081 - /llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Message-ID: <20100225000303.646EC2A6C136@llvm.org> Author: lattner Date: Wed Feb 24 18:03:03 2010 New Revision: 97081 URL: http://llvm.org/viewvc/llvm-project?rev=97081&view=rev Log: add a fixme for an experiment that defeated me for the time being. Modified: llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Modified: llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp?rev=97081&r1=97080&r2=97081&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Wed Feb 24 18:03:03 2010 @@ -490,6 +490,10 @@ void MatcherGen::EmitMatcherCode() { // If the pattern has a predicate on it (e.g. only enabled when a subtarget // feature is around, do the check). + // FIXME: This should get emitted after the match code below to encourage + // sharing. This can't happen until we get an X86ISD::AddrMode node made by + // dag combine, eliminating the horrible side-effect-full stuff from + // X86's MatchAddress. if (!Pattern.getPredicateCheck().empty()) AddMatcherNode(new CheckPatternPredicateMatcherNode(Pattern.getPredicateCheck())); From clattner at apple.com Wed Feb 24 18:09:26 2010 From: clattner at apple.com (Chris Lattner) Date: Wed, 24 Feb 2010 16:09:26 -0800 Subject: [llvm-commits] [llvm] r97078 - in /llvm/trunk/lib/CodeGen/AsmPrinter: DwarfException.cpp DwarfPrinter.cpp DwarfPrinter.h In-Reply-To: <20100224233435.ED4492A6C136@llvm.org> References: <20100224233435.ED4492A6C136@llvm.org> Message-ID: On Feb 24, 2010, at 3:34 PM, Bill Wendling wrote: > > URL: http://llvm.org/viewvc/llvm-project?rev=97078&view=rev > Log: > LLVM puts padding bytes in the __gcc_except_tab section after the > GCC_except_table label but before the Lexception, which the FDE references. > This causes problems as the FDE does not point to the start of an LSDA chunk. > > Use an unnormalized uleb128 for the call-site table length that includes the > padding. Ok, I don't really understand, but: > > - // If we don't have .uleb128, emit as .bytes. > + // If we don't have .uleb128 or we want to emit padding, emit as .bytes. > do { > unsigned char Byte = static_cast(Value & 0x7f); > Value >>= 7; > - if (Value) Byte |= 0x80; > + if (Value || PadTo != 0) Byte |= 0x80; > Asm->OutStreamer.EmitIntValue(Byte, 1, /*addrspace*/0); > } while (Value); > + > + if (PadTo) > + while (PadTo--) { > + unsigned char Byte = (PadTo ? 0x80 : 0x00); > + if (Asm->VerboseAsm) > + Asm->OutStreamer.AddComment("Padding"); > + Asm->OutStreamer.EmitIntValue(Byte, 1, /*addrspace*/0); > + } Please use OutStreamer.EmitFill instead of a loop for stuff like this. Thanks for mc'izing! -Chris From isanbard at gmail.com Wed Feb 24 18:24:52 2010 From: isanbard at gmail.com (Bill Wendling) Date: Thu, 25 Feb 2010 00:24:52 -0000 Subject: [llvm-commits] [llvm] r97087 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp Message-ID: <20100225002452.6BBB52A6C136@llvm.org> Author: void Date: Wed Feb 24 18:24:52 2010 New Revision: 97087 URL: http://llvm.org/viewvc/llvm-project?rev=97087&view=rev Log: MC'ize padding when padding the ULEB128 value. Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp?rev=97087&r1=97086&r2=97087&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp Wed Feb 24 18:24:52 2010 @@ -183,13 +183,11 @@ Asm->OutStreamer.EmitIntValue(Byte, 1, /*addrspace*/0); } while (Value); - if (PadTo) - while (PadTo--) { - unsigned char Byte = (PadTo ? 0x80 : 0x00); - if (Asm->VerboseAsm) - Asm->OutStreamer.AddComment("Padding"); - Asm->OutStreamer.EmitIntValue(Byte, 1, /*addrspace*/0); - } + if (PadTo) { + if (PadTo > 1) + Asm->OutStreamer.EmitFill(PadTo - 1, 0x80/*fillval*/, 0/*addrspace*/); + Asm->OutStreamer.EmitFill(1, 0/*fillval*/, 0/*addrspace*/); + } } From jyasskin at google.com Wed Feb 24 19:21:38 2010 From: jyasskin at google.com (Jeffrey Yasskin) Date: Thu, 25 Feb 2010 01:21:38 -0000 Subject: [llvm-commits] [llvm] r97089 - /llvm/trunk/utils/GenLibDeps.pl Message-ID: <20100225012138.9540C2A6C136@llvm.org> Author: jyasskin Date: Wed Feb 24 19:21:38 2010 New Revision: 97089 URL: http://llvm.org/viewvc/llvm-project?rev=97089&view=rev Log: Filter the future all-of-llvm shared library out of the llvm-config results. I'm checking this in before the shared library so that I can tell if it breaks anything on its own. Modified: llvm/trunk/utils/GenLibDeps.pl Modified: llvm/trunk/utils/GenLibDeps.pl URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/GenLibDeps.pl?rev=97089&r1=97088&r2=97089&view=diff ============================================================================== --- llvm/trunk/utils/GenLibDeps.pl (original) +++ llvm/trunk/utils/GenLibDeps.pl Wed Feb 24 19:21:38 2010 @@ -70,6 +70,8 @@ my @files = readdir DIR; closedir DIR; my @libs = grep(/libLLVM.*\.(dylib|so|a)$/,sort(@files)); +# Omit the all-of-llvm shared library. + at libs = grep(!/libLLVM-\d\.\d(svn)?\.(dylib|so)/, @libs); my @objs = grep(/LLVM.*\.o$/,sort(@files)); # Declare the hashes we will use to keep track of the library and object file From sabre at nondot.org Wed Feb 24 19:56:48 2010 From: sabre at nondot.org (Chris Lattner) Date: Thu, 25 Feb 2010 01:56:48 -0000 Subject: [llvm-commits] [llvm] r97093 - in /llvm/trunk: include/llvm/CodeGen/DAGISelHeader.h utils/TableGen/DAGISelEmitter.cpp utils/TableGen/DAGISelMatcher.cpp utils/TableGen/DAGISelMatcher.h utils/TableGen/DAGISelMatcherEmitter.cpp utils/TableGen/DAGISelMatcherOpt.cpp Message-ID: <20100225015648.96C032A6C136@llvm.org> Author: lattner Date: Wed Feb 24 19:56:48 2010 New Revision: 97093 URL: http://llvm.org/viewvc/llvm-project?rev=97093&view=rev Log: rename PushMatcherNode -> ScopeMatcherNode to more accurately reflect what it does. Switch the sense of the Next and the Check arms to be more logical. No functionality change. Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h llvm/trunk/utils/TableGen/DAGISelEmitter.cpp llvm/trunk/utils/TableGen/DAGISelMatcher.cpp llvm/trunk/utils/TableGen/DAGISelMatcher.h llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h?rev=97093&r1=97092&r2=97093&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h (original) +++ llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Wed Feb 24 19:56:48 2010 @@ -219,7 +219,7 @@ enum BuiltinOpcodes { - OPC_Push, OPC_Push2, + OPC_Scope, OPC_Scope2, OPC_RecordNode, OPC_RecordChild0, OPC_RecordChild1, OPC_RecordChild2, OPC_RecordChild3, OPC_RecordChild4, OPC_RecordChild5, OPC_RecordChild6, OPC_RecordChild7, @@ -372,7 +372,7 @@ assert(MatcherIndex < TableSize && "Invalid index"); BuiltinOpcodes Opcode = (BuiltinOpcodes)MatcherTable[MatcherIndex++]; switch (Opcode) { - case OPC_Push: { + case OPC_Scope: { unsigned NumToSkip = MatcherTable[MatcherIndex++]; MatchScope NewEntry; NewEntry.FailIndex = MatcherIndex+NumToSkip; @@ -386,7 +386,7 @@ MatchScopes.push_back(NewEntry); continue; } - case OPC_Push2: { + case OPC_Scope2: { unsigned NumToSkip = GetInt2(MatcherTable, MatcherIndex); MatchScope NewEntry; NewEntry.FailIndex = MatcherIndex+NumToSkip; Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=97093&r1=97092&r2=97093&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Wed Feb 24 19:56:48 2010 @@ -1972,7 +1972,7 @@ if (Matcher == 0) Matcher = N; else - Matcher = new PushMatcherNode(N, Matcher); + Matcher = new ScopeMatcherNode(N, Matcher); } Matcher = OptimizeMatcher(Matcher); Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.cpp?rev=97093&r1=97092&r2=97093&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcher.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcher.cpp Wed Feb 24 19:56:48 2010 @@ -24,10 +24,10 @@ } -void PushMatcherNode::print(raw_ostream &OS, unsigned indent) const { - OS.indent(indent) << "Push\n"; - printNext(OS, indent+2); - Failure->print(OS, indent); +void ScopeMatcherNode::print(raw_ostream &OS, unsigned indent) const { + OS.indent(indent) << "Scope\n"; + Check->print(OS, indent+2); + printNext(OS, indent); } void RecordMatcherNode::print(raw_ostream &OS, unsigned indent) const { Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.h?rev=97093&r1=97092&r2=97093&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcher.h (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcher.h Wed Feb 24 19:56:48 2010 @@ -39,7 +39,7 @@ public: enum KindTy { // Matcher state manipulation. - Push, // Push a checking scope. + Scope, // Push a checking scope. RecordNode, // Record the current node. RecordChild, // Record a child of the current node. RecordMemRef, // Record the memref in the current node. @@ -100,24 +100,24 @@ void printNext(raw_ostream &OS, unsigned indent) const; }; -/// PushMatcherNode - This pushes a failure scope on the stack and evaluates -/// 'Next'. If 'Next' fails to match, it pops its scope and attempts to -/// match 'Failure'. -class PushMatcherNode : public MatcherNode { - OwningPtr Failure; +/// ScopeMatcherNode - This pushes a failure scope on the stack and evaluates +/// 'Check'. If 'Check' fails to match, it pops its scope and continues on to +/// 'Next'. +class ScopeMatcherNode : public MatcherNode { + OwningPtr Check; public: - PushMatcherNode(MatcherNode *next = 0, MatcherNode *failure = 0) - : MatcherNode(Push), Failure(failure) { + ScopeMatcherNode(MatcherNode *check = 0, MatcherNode *next = 0) + : MatcherNode(Scope), Check(check) { setNext(next); } - MatcherNode *getFailure() { return Failure.get(); } - const MatcherNode *getFailure() const { return Failure.get(); } - void setFailure(MatcherNode *N) { Failure.reset(N); } - OwningPtr &getFailurePtr() { return Failure; } + MatcherNode *getCheck() { return Check.get(); } + const MatcherNode *getCheck() const { return Check.get(); } + void setCheck(MatcherNode *N) { Check.reset(N); } + OwningPtr &getCheckPtr() { return Check; } static inline bool classof(const MatcherNode *N) { - return N->getKind() == Push; + return N->getKind() == Scope; } virtual void print(raw_ostream &OS, unsigned indent = 0) const; Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp?rev=97093&r1=97092&r2=97093&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Wed Feb 24 19:56:48 2010 @@ -155,7 +155,7 @@ OS.PadToColumn(Indent*2); switch (N->getKind()) { - case MatcherNode::Push: assert(0 && "Should be handled by caller"); + case MatcherNode::Scope: assert(0 && "Should be handled by caller"); case MatcherNode::RecordNode: OS << "OPC_RecordNode,"; OS.PadToColumn(CommentIndent) << "// " @@ -388,8 +388,8 @@ Histogram.resize(N->getKind()+1); Histogram[N->getKind()]++; - // Push is a special case since it is binary. - if (const PushMatcherNode *PMN = dyn_cast(N)) { + // Scope is a special case since it is binary. + if (const ScopeMatcherNode *SMN = dyn_cast(N)) { // We need to encode the child and the offset of the failure code before // emitting either of them. Handle this by buffering the output into a // string while we get the size. @@ -398,7 +398,7 @@ { raw_svector_ostream OS(TmpBuf); formatted_raw_ostream FOS(OS); - NextSize = EmitMatcherList(cast(N)->getNext(), + NextSize = EmitMatcherList(cast(N)->getCheck(), Indent+1, CurrentIdx+2, FOS); } @@ -408,7 +408,7 @@ TmpBuf.clear(); raw_svector_ostream OS(TmpBuf); formatted_raw_ostream FOS(OS); - NextSize = EmitMatcherList(cast(N)->getNext(), + NextSize = EmitMatcherList(cast(N)->getCheck(), Indent+1, CurrentIdx+3, FOS); if (NextSize > 65535) { errs() << @@ -421,14 +421,14 @@ OS.PadToColumn(Indent*2); if (NextSize < 256) - OS << "OPC_Push, " << NextSize << ",\n"; + OS << "OPC_Scope, " << NextSize << ",\n"; else - OS << "OPC_Push2, " << (NextSize&255) << ", " << (NextSize>>8) << ",\n"; + OS << "OPC_Scope2, " << (NextSize&255) << ", " << (NextSize>>8) <<",\n"; OS << TmpBuf.str(); Size += 2+NextSize; CurrentIdx += 2+NextSize; - N = PMN->getFailure(); + N = SMN->getNext(); continue; } @@ -514,7 +514,7 @@ for (unsigned i = 0, e = Histogram.size(); i != e; ++i) { OS << " // #"; switch ((MatcherNode::KindTy)i) { - case MatcherNode::Push: OS << "OPC_Push"; break; + case MatcherNode::Scope: OS << "OPC_Scope"; break; case MatcherNode::RecordNode: OS << "OPC_RecordNode"; break; case MatcherNode::RecordChild: OS << "OPC_RecordChild"; break; case MatcherNode::RecordMemRef: OS << "OPC_RecordMemRef"; break; Modified: llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp?rev=97093&r1=97092&r2=97093&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Wed Feb 24 19:56:48 2010 @@ -14,14 +14,14 @@ #include "DAGISelMatcher.h" using namespace llvm; -static void ContractNodes(OwningPtr &Matcher) { +static void ContractNodes(OwningPtr &MatcherPtr) { // If we reached the end of the chain, we're done. - MatcherNode *N = Matcher.get(); + MatcherNode *N = MatcherPtr.get(); if (N == 0) return; - // If we have a push node, walk down both edges. - if (PushMatcherNode *Push = dyn_cast(N)) - ContractNodes(Push->getFailurePtr()); + // If we have a scope node, walk down both edges. + if (ScopeMatcherNode *Push = dyn_cast(N)) + ContractNodes(Push->getCheckPtr()); // If we found a movechild node with a node that comes in a 'foochild' form, // transform it. @@ -35,25 +35,24 @@ if (New) { // Insert the new node. - New->setNext(Matcher.take()); - Matcher.reset(New); + New->setNext(MatcherPtr.take()); + MatcherPtr.reset(New); // Remove the old one. MC->setNext(MC->getNext()->takeNext()); - return ContractNodes(Matcher); + return ContractNodes(MatcherPtr); } } if (MoveChildMatcherNode *MC = dyn_cast(N)) if (MoveParentMatcherNode *MP = dyn_cast(MC->getNext())) { - Matcher.reset(MP->takeNext()); - return ContractNodes(Matcher); + MatcherPtr.reset(MP->takeNext()); + return ContractNodes(MatcherPtr); } ContractNodes(N->getNextPtr()); } - MatcherNode *llvm::OptimizeMatcher(MatcherNode *Matcher) { OwningPtr MatcherPtr(Matcher); ContractNodes(MatcherPtr); From sabre at nondot.org Wed Feb 24 19:57:41 2010 From: sabre at nondot.org (Chris Lattner) Date: Thu, 25 Feb 2010 01:57:41 -0000 Subject: [llvm-commits] [llvm] r97094 - /llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Message-ID: <20100225015741.E04492A6C136@llvm.org> Author: lattner Date: Wed Feb 24 19:57:41 2010 New Revision: 97094 URL: http://llvm.org/viewvc/llvm-project?rev=97094&view=rev Log: add some noop code to push it out of my tree. Modified: llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Modified: llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp?rev=97094&r1=97093&r2=97094&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Wed Feb 24 19:57:41 2010 @@ -53,8 +53,31 @@ ContractNodes(N->getNextPtr()); } +static void FactorNodes(OwningPtr &MatcherPtr) { + // If we reached the end of the chain, we're done. + MatcherNode *N = MatcherPtr.get(); + if (N == 0) return; + + // If this is not a push node, just scan for one. + if (!isa(N)) + return FactorNodes(N->getNextPtr()); + + // Okay, pull together the series of linear push nodes into a vector so we can + // inspect it more easily. + SmallVector OptionsToMatch; + + MatcherNode *CurNode = N; + for (; ScopeMatcherNode *PMN = dyn_cast(CurNode); + CurNode = PMN->getNext()) + OptionsToMatch.push_back(PMN->getCheck()); + OptionsToMatch.push_back(CurNode); + + +} + MatcherNode *llvm::OptimizeMatcher(MatcherNode *Matcher) { OwningPtr MatcherPtr(Matcher); ContractNodes(MatcherPtr); + FactorNodes(MatcherPtr); return MatcherPtr.take(); } From sabre at nondot.org Wed Feb 24 20:04:40 2010 From: sabre at nondot.org (Chris Lattner) Date: Thu, 25 Feb 2010 02:04:40 -0000 Subject: [llvm-commits] [llvm] r97096 - in /llvm/trunk/utils/TableGen: DAGISelEmitter.cpp DAGISelMatcher.cpp DAGISelMatcher.h DAGISelMatcherEmitter.cpp DAGISelMatcherGen.cpp DAGISelMatcherOpt.cpp Message-ID: <20100225020441.007172A6C136@llvm.org> Author: lattner Date: Wed Feb 24 20:04:40 2010 New Revision: 97096 URL: http://llvm.org/viewvc/llvm-project?rev=97096&view=rev Log: rename fooMatcherNode to fooMatcher. Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp llvm/trunk/utils/TableGen/DAGISelMatcher.cpp llvm/trunk/utils/TableGen/DAGISelMatcher.h llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=97096&r1=97095&r2=97096&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Wed Feb 24 20:04:40 2010 @@ -1945,7 +1945,7 @@ } #ifdef ENABLE_NEW_ISEL - MatcherNode *Matcher = 0; + Matcher *TheMatcher = 0; // Add all the patterns to a temporary list so we can sort them. std::vector Patterns; @@ -1967,18 +1967,18 @@ const PatternToMatch &Pattern = *Patterns.back(); Patterns.pop_back(); - MatcherNode *N = ConvertPatternToMatcher(Pattern, CGP); + Matcher *N = ConvertPatternToMatcher(Pattern, CGP); - if (Matcher == 0) - Matcher = N; + if (TheMatcher == 0) + TheMatcher = N; else - Matcher = new ScopeMatcherNode(N, Matcher); + TheMatcher = new ScopeMatcher(N, TheMatcher); } - Matcher = OptimizeMatcher(Matcher); + TheMatcher = OptimizeMatcher(TheMatcher); //Matcher->dump(); - EmitMatcherTable(Matcher, OS); - delete Matcher; + EmitMatcherTable(TheMatcher, OS); + delete TheMatcher; #else // At this point, we have full information about the 'Patterns' we need to Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.cpp?rev=97096&r1=97095&r2=97096&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcher.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcher.cpp Wed Feb 24 20:04:40 2010 @@ -14,144 +14,144 @@ #include "llvm/Support/raw_ostream.h" using namespace llvm; -void MatcherNode::dump() const { +void Matcher::dump() const { print(errs()); } -void MatcherNode::printNext(raw_ostream &OS, unsigned indent) const { +void Matcher::printNext(raw_ostream &OS, unsigned indent) const { if (Next) return Next->print(OS, indent); } -void ScopeMatcherNode::print(raw_ostream &OS, unsigned indent) const { +void ScopeMatcher::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "Scope\n"; Check->print(OS, indent+2); printNext(OS, indent); } -void RecordMatcherNode::print(raw_ostream &OS, unsigned indent) const { +void RecordMatcher::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "Record\n"; printNext(OS, indent); } -void RecordChildMatcherNode::print(raw_ostream &OS, unsigned indent) const { +void RecordChildMatcher::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "RecordChild: " << ChildNo << '\n'; printNext(OS, indent); } -void RecordMemRefMatcherNode::print(raw_ostream &OS, unsigned indent) const { +void RecordMemRefMatcher::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "RecordMemRef\n"; printNext(OS, indent); } -void CaptureFlagInputMatcherNode::print(raw_ostream &OS, unsigned indent) const{ +void CaptureFlagInputMatcher::print(raw_ostream &OS, unsigned indent) const{ OS.indent(indent) << "CaptureFlagInput\n"; printNext(OS, indent); } -void MoveChildMatcherNode::print(raw_ostream &OS, unsigned indent) const { +void MoveChildMatcher::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "MoveChild " << ChildNo << '\n'; printNext(OS, indent); } -void MoveParentMatcherNode::print(raw_ostream &OS, unsigned indent) const { +void MoveParentMatcher::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "MoveParent\n"; printNext(OS, indent); } -void CheckSameMatcherNode::print(raw_ostream &OS, unsigned indent) const { +void CheckSameMatcher::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckSame " << MatchNumber << '\n'; printNext(OS, indent); } -void CheckPatternPredicateMatcherNode:: +void CheckPatternPredicateMatcher:: print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckPatternPredicate " << Predicate << '\n'; printNext(OS, indent); } -void CheckPredicateMatcherNode::print(raw_ostream &OS, unsigned indent) const { +void CheckPredicateMatcher::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckPredicate " << PredName << '\n'; printNext(OS, indent); } -void CheckOpcodeMatcherNode::print(raw_ostream &OS, unsigned indent) const { +void CheckOpcodeMatcher::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckOpcode " << OpcodeName << '\n'; printNext(OS, indent); } -void CheckMultiOpcodeMatcherNode::print(raw_ostream &OS, unsigned indent) const { +void CheckMultiOpcodeMatcher::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckMultiOpcode \n"; printNext(OS, indent); } -void CheckTypeMatcherNode::print(raw_ostream &OS, unsigned indent) const { +void CheckTypeMatcher::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckType " << getEnumName(Type) << '\n'; printNext(OS, indent); } -void CheckChildTypeMatcherNode::print(raw_ostream &OS, unsigned indent) const { +void CheckChildTypeMatcher::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckChildType " << ChildNo << " " << getEnumName(Type) << '\n'; printNext(OS, indent); } -void CheckIntegerMatcherNode::print(raw_ostream &OS, unsigned indent) const { +void CheckIntegerMatcher::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckInteger " << Value << '\n'; printNext(OS, indent); } -void CheckCondCodeMatcherNode::print(raw_ostream &OS, unsigned indent) const { +void CheckCondCodeMatcher::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckCondCode ISD::" << CondCodeName << '\n'; printNext(OS, indent); } -void CheckValueTypeMatcherNode::print(raw_ostream &OS, unsigned indent) const { +void CheckValueTypeMatcher::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckValueType MVT::" << TypeName << '\n'; printNext(OS, indent); } -void CheckComplexPatMatcherNode::print(raw_ostream &OS, unsigned indent) const { +void CheckComplexPatMatcher::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckComplexPat " << Pattern.getSelectFunc() << '\n'; printNext(OS, indent); } -void CheckAndImmMatcherNode::print(raw_ostream &OS, unsigned indent) const { +void CheckAndImmMatcher::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckAndImm " << Value << '\n'; printNext(OS, indent); } -void CheckOrImmMatcherNode::print(raw_ostream &OS, unsigned indent) const { +void CheckOrImmMatcher::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckOrImm " << Value << '\n'; printNext(OS, indent); } -void CheckFoldableChainNodeMatcherNode::print(raw_ostream &OS, +void CheckFoldableChainNodeMatcher::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckFoldableChainNode\n"; printNext(OS, indent); } -void CheckChainCompatibleMatcherNode::print(raw_ostream &OS, +void CheckChainCompatibleMatcher::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckChainCompatible " << PreviousOp << "\n"; printNext(OS, indent); } -void EmitIntegerMatcherNode::print(raw_ostream &OS, unsigned indent) const { +void EmitIntegerMatcher::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "EmitInteger " << Val << " VT=" << VT << '\n'; printNext(OS, indent); } -void EmitStringIntegerMatcherNode:: +void EmitStringIntegerMatcher:: print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "EmitStringInteger " << Val << " VT=" << VT << '\n'; printNext(OS, indent); } -void EmitRegisterMatcherNode::print(raw_ostream &OS, unsigned indent) const { +void EmitRegisterMatcher::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "EmitRegister "; if (Reg) OS << Reg->getName(); @@ -161,31 +161,31 @@ printNext(OS, indent); } -void EmitConvertToTargetMatcherNode:: +void EmitConvertToTargetMatcher:: print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "EmitConvertToTarget " << Slot << '\n'; printNext(OS, indent); } -void EmitMergeInputChainsMatcherNode:: +void EmitMergeInputChainsMatcher:: print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "EmitMergeInputChains \n"; printNext(OS, indent); } -void EmitCopyToRegMatcherNode::print(raw_ostream &OS, unsigned indent) const { +void EmitCopyToRegMatcher::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "EmitCopyToReg \n"; printNext(OS, indent); } -void EmitNodeXFormMatcherNode::print(raw_ostream &OS, unsigned indent) const { +void EmitNodeXFormMatcher::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "EmitNodeXForm " << NodeXForm->getName() << " Slot=" << Slot << '\n'; printNext(OS, indent); } -void EmitNodeMatcherNode::print(raw_ostream &OS, unsigned indent) const { +void EmitNodeMatcher::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "EmitNode: " << OpcodeName << ": "; for (unsigned i = 0, e = VTs.size(); i != e; ++i) @@ -197,12 +197,12 @@ printNext(OS, indent); } -void MarkFlagResultsMatcherNode::print(raw_ostream &OS, unsigned indent) const { +void MarkFlagResultsMatcher::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "MarkFlagResults \n"; printNext(OS, indent); } -void CompleteMatchMatcherNode::print(raw_ostream &OS, unsigned indent) const { +void CompleteMatchMatcher::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CompleteMatch \n"; OS.indent(indent) << "Src = " << *Pattern.getSrcPattern() << "\n"; OS.indent(indent) << "Dst = " << *Pattern.getDstPattern() << "\n"; Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.h?rev=97096&r1=97095&r2=97096&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcher.h (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcher.h Wed Feb 24 20:04:40 2010 @@ -18,24 +18,24 @@ namespace llvm { class CodeGenDAGPatterns; - class MatcherNode; + class Matcher; class PatternToMatch; class raw_ostream; class ComplexPattern; class Record; -MatcherNode *ConvertPatternToMatcher(const PatternToMatch &Pattern, - const CodeGenDAGPatterns &CGP); -MatcherNode *OptimizeMatcher(MatcherNode *Matcher); -void EmitMatcherTable(const MatcherNode *Matcher, raw_ostream &OS); +Matcher *ConvertPatternToMatcher(const PatternToMatch &Pattern, + const CodeGenDAGPatterns &CGP); +Matcher *OptimizeMatcher(Matcher *Matcher); +void EmitMatcherTable(const Matcher *Matcher, raw_ostream &OS); -/// MatcherNode - Base class for all the the DAG ISel Matcher representation +/// Matcher - Base class for all the the DAG ISel Matcher representation /// nodes. -class MatcherNode { +class Matcher { // The next matcher node that is executed after this one. Null if this is the // last stage of a match. - OwningPtr Next; + OwningPtr Next; public: enum KindTy { // Matcher state manipulation. @@ -79,20 +79,20 @@ const KindTy Kind; protected: - MatcherNode(KindTy K) : Kind(K) {} + Matcher(KindTy K) : Kind(K) {} public: - virtual ~MatcherNode() {} + virtual ~Matcher() {} KindTy getKind() const { return Kind; } - MatcherNode *getNext() { return Next.get(); } - const MatcherNode *getNext() const { return Next.get(); } - void setNext(MatcherNode *C) { Next.reset(C); } - MatcherNode *takeNext() { return Next.take(); } + Matcher *getNext() { return Next.get(); } + const Matcher *getNext() const { return Next.get(); } + void setNext(Matcher *C) { Next.reset(C); } + Matcher *takeNext() { return Next.take(); } - OwningPtr &getNextPtr() { return Next; } + OwningPtr &getNextPtr() { return Next; } - static inline bool classof(const MatcherNode *) { return true; } + static inline bool classof(const Matcher *) { return true; } virtual void print(raw_ostream &OS, unsigned indent = 0) const = 0; void dump() const; @@ -100,76 +100,76 @@ void printNext(raw_ostream &OS, unsigned indent) const; }; -/// ScopeMatcherNode - This pushes a failure scope on the stack and evaluates +/// ScopeMatcher - This pushes a failure scope on the stack and evaluates /// 'Check'. If 'Check' fails to match, it pops its scope and continues on to /// 'Next'. -class ScopeMatcherNode : public MatcherNode { - OwningPtr Check; +class ScopeMatcher : public Matcher { + OwningPtr Check; public: - ScopeMatcherNode(MatcherNode *check = 0, MatcherNode *next = 0) - : MatcherNode(Scope), Check(check) { + ScopeMatcher(Matcher *check = 0, Matcher *next = 0) + : Matcher(Scope), Check(check) { setNext(next); } - MatcherNode *getCheck() { return Check.get(); } - const MatcherNode *getCheck() const { return Check.get(); } - void setCheck(MatcherNode *N) { Check.reset(N); } - OwningPtr &getCheckPtr() { return Check; } + Matcher *getCheck() { return Check.get(); } + const Matcher *getCheck() const { return Check.get(); } + void setCheck(Matcher *N) { Check.reset(N); } + OwningPtr &getCheckPtr() { return Check; } - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == Scope; } virtual void print(raw_ostream &OS, unsigned indent = 0) const; }; -/// RecordMatcherNode - Save the current node in the operand list. -class RecordMatcherNode : public MatcherNode { +/// RecordMatcher - Save the current node in the operand list. +class RecordMatcher : public Matcher { /// WhatFor - This is a string indicating why we're recording this. This /// should only be used for comment generation not anything semantic. std::string WhatFor; public: - RecordMatcherNode(const std::string &whatfor) - : MatcherNode(RecordNode), WhatFor(whatfor) {} + RecordMatcher(const std::string &whatfor) + : Matcher(RecordNode), WhatFor(whatfor) {} const std::string &getWhatFor() const { return WhatFor; } - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == RecordNode; } virtual void print(raw_ostream &OS, unsigned indent = 0) const; }; -/// RecordChildMatcherNode - Save a numbered child of the current node, or fail +/// RecordChildMatcher - Save a numbered child of the current node, or fail /// the match if it doesn't exist. This is logically equivalent to: /// MoveChild N + RecordNode + MoveParent. -class RecordChildMatcherNode : public MatcherNode { +class RecordChildMatcher : public Matcher { unsigned ChildNo; /// WhatFor - This is a string indicating why we're recording this. This /// should only be used for comment generation not anything semantic. std::string WhatFor; public: - RecordChildMatcherNode(unsigned childno, const std::string &whatfor) - : MatcherNode(RecordChild), ChildNo(childno), WhatFor(whatfor) {} + RecordChildMatcher(unsigned childno, const std::string &whatfor) + : Matcher(RecordChild), ChildNo(childno), WhatFor(whatfor) {} unsigned getChildNo() const { return ChildNo; } const std::string &getWhatFor() const { return WhatFor; } - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == RecordChild; } virtual void print(raw_ostream &OS, unsigned indent = 0) const; }; -/// RecordMemRefMatcherNode - Save the current node's memref. -class RecordMemRefMatcherNode : public MatcherNode { +/// RecordMemRefMatcher - Save the current node's memref. +class RecordMemRefMatcher : public Matcher { public: - RecordMemRefMatcherNode() : MatcherNode(RecordMemRef) {} + RecordMemRefMatcher() : Matcher(RecordMemRef) {} - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == RecordMemRef; } @@ -177,98 +177,95 @@ }; -/// CaptureFlagInputMatcherNode - If the current record has a flag input, record +/// CaptureFlagInputMatcher - If the current record has a flag input, record /// it so that it is used as an input to the generated code. -class CaptureFlagInputMatcherNode : public MatcherNode { +class CaptureFlagInputMatcher : public Matcher { public: - CaptureFlagInputMatcherNode() - : MatcherNode(CaptureFlagInput) {} + CaptureFlagInputMatcher() : Matcher(CaptureFlagInput) {} - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == CaptureFlagInput; } virtual void print(raw_ostream &OS, unsigned indent = 0) const; }; -/// MoveChildMatcherNode - This tells the interpreter to move into the +/// MoveChildMatcher - This tells the interpreter to move into the /// specified child node. -class MoveChildMatcherNode : public MatcherNode { +class MoveChildMatcher : public Matcher { unsigned ChildNo; public: - MoveChildMatcherNode(unsigned childNo) - : MatcherNode(MoveChild), ChildNo(childNo) {} + MoveChildMatcher(unsigned childNo) : Matcher(MoveChild), ChildNo(childNo) {} unsigned getChildNo() const { return ChildNo; } - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == MoveChild; } virtual void print(raw_ostream &OS, unsigned indent = 0) const; }; -/// MoveParentMatcherNode - This tells the interpreter to move to the parent +/// MoveParentMatcher - This tells the interpreter to move to the parent /// of the current node. -class MoveParentMatcherNode : public MatcherNode { +class MoveParentMatcher : public Matcher { public: - MoveParentMatcherNode() - : MatcherNode(MoveParent) {} + MoveParentMatcher() : Matcher(MoveParent) {} - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == MoveParent; } virtual void print(raw_ostream &OS, unsigned indent = 0) const; }; -/// CheckSameMatcherNode - This checks to see if this node is exactly the same +/// CheckSameMatcher - This checks to see if this node is exactly the same /// node as the specified match that was recorded with 'Record'. This is used /// when patterns have the same name in them, like '(mul GPR:$in, GPR:$in)'. -class CheckSameMatcherNode : public MatcherNode { +class CheckSameMatcher : public Matcher { unsigned MatchNumber; public: - CheckSameMatcherNode(unsigned matchnumber) - : MatcherNode(CheckSame), MatchNumber(matchnumber) {} + CheckSameMatcher(unsigned matchnumber) + : Matcher(CheckSame), MatchNumber(matchnumber) {} unsigned getMatchNumber() const { return MatchNumber; } - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == CheckSame; } virtual void print(raw_ostream &OS, unsigned indent = 0) const; }; -/// CheckPatternPredicateMatcherNode - This checks the target-specific predicate +/// CheckPatternPredicateMatcher - This checks the target-specific predicate /// to see if the entire pattern is capable of matching. This predicate does /// not take a node as input. This is used for subtarget feature checks etc. -class CheckPatternPredicateMatcherNode : public MatcherNode { +class CheckPatternPredicateMatcher : public Matcher { std::string Predicate; public: - CheckPatternPredicateMatcherNode(StringRef predicate) - : MatcherNode(CheckPatternPredicate), Predicate(predicate) {} + CheckPatternPredicateMatcher(StringRef predicate) + : Matcher(CheckPatternPredicate), Predicate(predicate) {} StringRef getPredicate() const { return Predicate; } - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == CheckPatternPredicate; } virtual void print(raw_ostream &OS, unsigned indent = 0) const; }; -/// CheckPredicateMatcherNode - This checks the target-specific predicate to +/// CheckPredicateMatcher - This checks the target-specific predicate to /// see if the node is acceptable. -class CheckPredicateMatcherNode : public MatcherNode { +class CheckPredicateMatcher : public Matcher { StringRef PredName; public: - CheckPredicateMatcherNode(StringRef predname) - : MatcherNode(CheckPredicate), PredName(predname) {} + CheckPredicateMatcher(StringRef predname) + : Matcher(CheckPredicate), PredName(predname) {} StringRef getPredicateName() const { return PredName; } - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == CheckPredicate; } @@ -276,35 +273,35 @@ }; -/// CheckOpcodeMatcherNode - This checks to see if the current node has the +/// CheckOpcodeMatcher - This checks to see if the current node has the /// specified opcode, if not it fails to match. -class CheckOpcodeMatcherNode : public MatcherNode { +class CheckOpcodeMatcher : public Matcher { StringRef OpcodeName; public: - CheckOpcodeMatcherNode(StringRef opcodename) - : MatcherNode(CheckOpcode), OpcodeName(opcodename) {} + CheckOpcodeMatcher(StringRef opcodename) + : Matcher(CheckOpcode), OpcodeName(opcodename) {} StringRef getOpcodeName() const { return OpcodeName; } - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == CheckOpcode; } virtual void print(raw_ostream &OS, unsigned indent = 0) const; }; -/// CheckMultiOpcodeMatcherNode - This checks to see if the current node has one +/// CheckMultiOpcodeMatcher - This checks to see if the current node has one /// of the specified opcode, if not it fails to match. -class CheckMultiOpcodeMatcherNode : public MatcherNode { +class CheckMultiOpcodeMatcher : public Matcher { SmallVector OpcodeNames; public: - CheckMultiOpcodeMatcherNode(const StringRef *opcodes, unsigned numops) - : MatcherNode(CheckMultiOpcode), OpcodeNames(opcodes, opcodes+numops) {} + CheckMultiOpcodeMatcher(const StringRef *opcodes, unsigned numops) + : Matcher(CheckMultiOpcode), OpcodeNames(opcodes, opcodes+numops) {} unsigned getNumOpcodeNames() const { return OpcodeNames.size(); } StringRef getOpcodeName(unsigned i) const { return OpcodeNames[i]; } - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == CheckMultiOpcode; } @@ -313,36 +310,36 @@ -/// CheckTypeMatcherNode - This checks to see if the current node has the +/// CheckTypeMatcher - This checks to see if the current node has the /// specified type, if not it fails to match. -class CheckTypeMatcherNode : public MatcherNode { +class CheckTypeMatcher : public Matcher { MVT::SimpleValueType Type; public: - CheckTypeMatcherNode(MVT::SimpleValueType type) - : MatcherNode(CheckType), Type(type) {} + CheckTypeMatcher(MVT::SimpleValueType type) + : Matcher(CheckType), Type(type) {} MVT::SimpleValueType getType() const { return Type; } - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == CheckType; } virtual void print(raw_ostream &OS, unsigned indent = 0) const; }; -/// CheckChildTypeMatcherNode - This checks to see if a child node has the +/// CheckChildTypeMatcher - This checks to see if a child node has the /// specified type, if not it fails to match. -class CheckChildTypeMatcherNode : public MatcherNode { +class CheckChildTypeMatcher : public Matcher { unsigned ChildNo; MVT::SimpleValueType Type; public: - CheckChildTypeMatcherNode(unsigned childno, MVT::SimpleValueType type) - : MatcherNode(CheckChildType), ChildNo(childno), Type(type) {} + CheckChildTypeMatcher(unsigned childno, MVT::SimpleValueType type) + : Matcher(CheckChildType), ChildNo(childno), Type(type) {} unsigned getChildNo() const { return ChildNo; } MVT::SimpleValueType getType() const { return Type; } - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == CheckChildType; } @@ -350,51 +347,51 @@ }; -/// CheckIntegerMatcherNode - This checks to see if the current node is a +/// CheckIntegerMatcher - This checks to see if the current node is a /// ConstantSDNode with the specified integer value, if not it fails to match. -class CheckIntegerMatcherNode : public MatcherNode { +class CheckIntegerMatcher : public Matcher { int64_t Value; public: - CheckIntegerMatcherNode(int64_t value) - : MatcherNode(CheckInteger), Value(value) {} + CheckIntegerMatcher(int64_t value) + : Matcher(CheckInteger), Value(value) {} int64_t getValue() const { return Value; } - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == CheckInteger; } virtual void print(raw_ostream &OS, unsigned indent = 0) const; }; -/// CheckCondCodeMatcherNode - This checks to see if the current node is a +/// CheckCondCodeMatcher - This checks to see if the current node is a /// CondCodeSDNode with the specified condition, if not it fails to match. -class CheckCondCodeMatcherNode : public MatcherNode { +class CheckCondCodeMatcher : public Matcher { StringRef CondCodeName; public: - CheckCondCodeMatcherNode(StringRef condcodename) - : MatcherNode(CheckCondCode), CondCodeName(condcodename) {} + CheckCondCodeMatcher(StringRef condcodename) + : Matcher(CheckCondCode), CondCodeName(condcodename) {} StringRef getCondCodeName() const { return CondCodeName; } - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == CheckCondCode; } virtual void print(raw_ostream &OS, unsigned indent = 0) const; }; -/// CheckValueTypeMatcherNode - This checks to see if the current node is a +/// CheckValueTypeMatcher - This checks to see if the current node is a /// VTSDNode with the specified type, if not it fails to match. -class CheckValueTypeMatcherNode : public MatcherNode { +class CheckValueTypeMatcher : public Matcher { StringRef TypeName; public: - CheckValueTypeMatcherNode(StringRef type_name) - : MatcherNode(CheckValueType), TypeName(type_name) {} + CheckValueTypeMatcher(StringRef type_name) + : Matcher(CheckValueType), TypeName(type_name) {} StringRef getTypeName() const { return TypeName; } - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == CheckValueType; } @@ -403,172 +400,172 @@ -/// CheckComplexPatMatcherNode - This node runs the specified ComplexPattern on +/// CheckComplexPatMatcher - This node runs the specified ComplexPattern on /// the current node. -class CheckComplexPatMatcherNode : public MatcherNode { +class CheckComplexPatMatcher : public Matcher { const ComplexPattern &Pattern; public: - CheckComplexPatMatcherNode(const ComplexPattern &pattern) - : MatcherNode(CheckComplexPat), Pattern(pattern) {} + CheckComplexPatMatcher(const ComplexPattern &pattern) + : Matcher(CheckComplexPat), Pattern(pattern) {} const ComplexPattern &getPattern() const { return Pattern; } - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == CheckComplexPat; } virtual void print(raw_ostream &OS, unsigned indent = 0) const; }; -/// CheckAndImmMatcherNode - This checks to see if the current node is an 'and' +/// CheckAndImmMatcher - This checks to see if the current node is an 'and' /// with something equivalent to the specified immediate. -class CheckAndImmMatcherNode : public MatcherNode { +class CheckAndImmMatcher : public Matcher { int64_t Value; public: - CheckAndImmMatcherNode(int64_t value) - : MatcherNode(CheckAndImm), Value(value) {} + CheckAndImmMatcher(int64_t value) + : Matcher(CheckAndImm), Value(value) {} int64_t getValue() const { return Value; } - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == CheckAndImm; } virtual void print(raw_ostream &OS, unsigned indent = 0) const; }; -/// CheckOrImmMatcherNode - This checks to see if the current node is an 'and' +/// CheckOrImmMatcher - This checks to see if the current node is an 'and' /// with something equivalent to the specified immediate. -class CheckOrImmMatcherNode : public MatcherNode { +class CheckOrImmMatcher : public Matcher { int64_t Value; public: - CheckOrImmMatcherNode(int64_t value) - : MatcherNode(CheckOrImm), Value(value) {} + CheckOrImmMatcher(int64_t value) + : Matcher(CheckOrImm), Value(value) {} int64_t getValue() const { return Value; } - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == CheckOrImm; } virtual void print(raw_ostream &OS, unsigned indent = 0) const; }; -/// CheckFoldableChainNodeMatcherNode - This checks to see if the current node +/// CheckFoldableChainNodeMatcher - This checks to see if the current node /// (which defines a chain operand) is safe to fold into a larger pattern. -class CheckFoldableChainNodeMatcherNode : public MatcherNode { +class CheckFoldableChainNodeMatcher : public Matcher { public: - CheckFoldableChainNodeMatcherNode() - : MatcherNode(CheckFoldableChainNode) {} + CheckFoldableChainNodeMatcher() + : Matcher(CheckFoldableChainNode) {} - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == CheckFoldableChainNode; } virtual void print(raw_ostream &OS, unsigned indent = 0) const; }; -/// CheckChainCompatibleMatcherNode - Verify that the current node's chain +/// CheckChainCompatibleMatcher - Verify that the current node's chain /// operand is 'compatible' with the specified recorded node's. -class CheckChainCompatibleMatcherNode : public MatcherNode { +class CheckChainCompatibleMatcher : public Matcher { unsigned PreviousOp; public: - CheckChainCompatibleMatcherNode(unsigned previousop) - : MatcherNode(CheckChainCompatible), PreviousOp(previousop) {} + CheckChainCompatibleMatcher(unsigned previousop) + : Matcher(CheckChainCompatible), PreviousOp(previousop) {} unsigned getPreviousOp() const { return PreviousOp; } - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == CheckChainCompatible; } virtual void print(raw_ostream &OS, unsigned indent = 0) const; }; -/// EmitIntegerMatcherNode - This creates a new TargetConstant. -class EmitIntegerMatcherNode : public MatcherNode { +/// EmitIntegerMatcher - This creates a new TargetConstant. +class EmitIntegerMatcher : public Matcher { int64_t Val; MVT::SimpleValueType VT; public: - EmitIntegerMatcherNode(int64_t val, MVT::SimpleValueType vt) - : MatcherNode(EmitInteger), Val(val), VT(vt) {} + EmitIntegerMatcher(int64_t val, MVT::SimpleValueType vt) + : Matcher(EmitInteger), Val(val), VT(vt) {} int64_t getValue() const { return Val; } MVT::SimpleValueType getVT() const { return VT; } - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == EmitInteger; } virtual void print(raw_ostream &OS, unsigned indent = 0) const; }; -/// EmitStringIntegerMatcherNode - A target constant whose value is represented +/// EmitStringIntegerMatcher - A target constant whose value is represented /// by a string. -class EmitStringIntegerMatcherNode : public MatcherNode { +class EmitStringIntegerMatcher : public Matcher { std::string Val; MVT::SimpleValueType VT; public: - EmitStringIntegerMatcherNode(const std::string &val, MVT::SimpleValueType vt) - : MatcherNode(EmitStringInteger), Val(val), VT(vt) {} + EmitStringIntegerMatcher(const std::string &val, MVT::SimpleValueType vt) + : Matcher(EmitStringInteger), Val(val), VT(vt) {} const std::string &getValue() const { return Val; } MVT::SimpleValueType getVT() const { return VT; } - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == EmitStringInteger; } virtual void print(raw_ostream &OS, unsigned indent = 0) const; }; -/// EmitRegisterMatcherNode - This creates a new TargetConstant. -class EmitRegisterMatcherNode : public MatcherNode { +/// EmitRegisterMatcher - This creates a new TargetConstant. +class EmitRegisterMatcher : public Matcher { /// Reg - The def for the register that we're emitting. If this is null, then /// this is a reference to zero_reg. Record *Reg; MVT::SimpleValueType VT; public: - EmitRegisterMatcherNode(Record *reg, MVT::SimpleValueType vt) - : MatcherNode(EmitRegister), Reg(reg), VT(vt) {} + EmitRegisterMatcher(Record *reg, MVT::SimpleValueType vt) + : Matcher(EmitRegister), Reg(reg), VT(vt) {} Record *getReg() const { return Reg; } MVT::SimpleValueType getVT() const { return VT; } - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == EmitRegister; } virtual void print(raw_ostream &OS, unsigned indent = 0) const; }; -/// EmitConvertToTargetMatcherNode - Emit an operation that reads a specified +/// EmitConvertToTargetMatcher - Emit an operation that reads a specified /// recorded node and converts it from being a ISD::Constant to /// ISD::TargetConstant, likewise for ConstantFP. -class EmitConvertToTargetMatcherNode : public MatcherNode { +class EmitConvertToTargetMatcher : public Matcher { unsigned Slot; public: - EmitConvertToTargetMatcherNode(unsigned slot) - : MatcherNode(EmitConvertToTarget), Slot(slot) {} + EmitConvertToTargetMatcher(unsigned slot) + : Matcher(EmitConvertToTarget), Slot(slot) {} unsigned getSlot() const { return Slot; } - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == EmitConvertToTarget; } virtual void print(raw_ostream &OS, unsigned indent = 0) const; }; -/// EmitMergeInputChainsMatcherNode - Emit a node that merges a list of input +/// EmitMergeInputChainsMatcher - Emit a node that merges a list of input /// chains together with a token factor. The list of nodes are the nodes in the /// matched pattern that have chain input/outputs. This node adds all input /// chains of these nodes if they are not themselves a node in the pattern. -class EmitMergeInputChainsMatcherNode : public MatcherNode { +class EmitMergeInputChainsMatcher : public Matcher { SmallVector ChainNodes; public: - EmitMergeInputChainsMatcherNode(const unsigned *nodes, unsigned NumNodes) - : MatcherNode(EmitMergeInputChains), ChainNodes(nodes, nodes+NumNodes) {} + EmitMergeInputChainsMatcher(const unsigned *nodes, unsigned NumNodes) + : Matcher(EmitMergeInputChains), ChainNodes(nodes, nodes+NumNodes) {} unsigned getNumNodes() const { return ChainNodes.size(); } @@ -577,27 +574,27 @@ return ChainNodes[i]; } - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == EmitMergeInputChains; } virtual void print(raw_ostream &OS, unsigned indent = 0) const; }; -/// EmitCopyToRegMatcherNode - Emit a CopyToReg node from a value to a physreg, +/// EmitCopyToRegMatcher - Emit a CopyToReg node from a value to a physreg, /// pushing the chain and flag results. /// -class EmitCopyToRegMatcherNode : public MatcherNode { +class EmitCopyToRegMatcher : public Matcher { unsigned SrcSlot; // Value to copy into the physreg. Record *DestPhysReg; public: - EmitCopyToRegMatcherNode(unsigned srcSlot, Record *destPhysReg) - : MatcherNode(EmitCopyToReg), SrcSlot(srcSlot), DestPhysReg(destPhysReg) {} + EmitCopyToRegMatcher(unsigned srcSlot, Record *destPhysReg) + : Matcher(EmitCopyToReg), SrcSlot(srcSlot), DestPhysReg(destPhysReg) {} unsigned getSrcSlot() const { return SrcSlot; } Record *getDestPhysReg() const { return DestPhysReg; } - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == EmitCopyToReg; } @@ -606,27 +603,27 @@ -/// EmitNodeXFormMatcherNode - Emit an operation that runs an SDNodeXForm on a +/// EmitNodeXFormMatcher - Emit an operation that runs an SDNodeXForm on a /// recorded node and records the result. -class EmitNodeXFormMatcherNode : public MatcherNode { +class EmitNodeXFormMatcher : public Matcher { unsigned Slot; Record *NodeXForm; public: - EmitNodeXFormMatcherNode(unsigned slot, Record *nodeXForm) - : MatcherNode(EmitNodeXForm), Slot(slot), NodeXForm(nodeXForm) {} + EmitNodeXFormMatcher(unsigned slot, Record *nodeXForm) + : Matcher(EmitNodeXForm), Slot(slot), NodeXForm(nodeXForm) {} unsigned getSlot() const { return Slot; } Record *getNodeXForm() const { return NodeXForm; } - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == EmitNodeXForm; } virtual void print(raw_ostream &OS, unsigned indent = 0) const; }; -/// EmitNodeMatcherNode - This signals a successful match and generates a node. -class EmitNodeMatcherNode : public MatcherNode { +/// EmitNodeMatcher - This signals a successful match and generates a node. +class EmitNodeMatcher : public Matcher { std::string OpcodeName; const SmallVector VTs; const SmallVector Operands; @@ -637,12 +634,12 @@ /// operands in the root of the pattern. The rest are appended to this node. int NumFixedArityOperands; public: - EmitNodeMatcherNode(const std::string &opcodeName, + EmitNodeMatcher(const std::string &opcodeName, const MVT::SimpleValueType *vts, unsigned numvts, const unsigned *operands, unsigned numops, bool hasChain, bool hasFlag, bool hasmemrefs, int numfixedarityoperands) - : MatcherNode(EmitNode), OpcodeName(opcodeName), + : Matcher(EmitNode), OpcodeName(opcodeName), VTs(vts, vts+numvts), Operands(operands, operands+numops), HasChain(hasChain), HasFlag(hasFlag), HasMemRefs(hasmemrefs), NumFixedArityOperands(numfixedarityoperands) {} @@ -666,21 +663,21 @@ bool hasMemRefs() const { return HasMemRefs; } int getNumFixedArityOperands() const { return NumFixedArityOperands; } - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == EmitNode; } virtual void print(raw_ostream &OS, unsigned indent = 0) const; }; -/// MarkFlagResultsMatcherNode - This node indicates which non-root nodes in the -/// pattern produce flags. This allows CompleteMatchMatcherNode to update them +/// MarkFlagResultsMatcher - This node indicates which non-root nodes in the +/// pattern produce flags. This allows CompleteMatchMatcher to update them /// with the output flag of the resultant code. -class MarkFlagResultsMatcherNode : public MatcherNode { +class MarkFlagResultsMatcher : public Matcher { SmallVector FlagResultNodes; public: - MarkFlagResultsMatcherNode(const unsigned *nodes, unsigned NumNodes) - : MatcherNode(MarkFlagResults), FlagResultNodes(nodes, nodes+NumNodes) {} + MarkFlagResultsMatcher(const unsigned *nodes, unsigned NumNodes) + : Matcher(MarkFlagResults), FlagResultNodes(nodes, nodes+NumNodes) {} unsigned getNumNodes() const { return FlagResultNodes.size(); } @@ -689,30 +686,30 @@ return FlagResultNodes[i]; } - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == MarkFlagResults; } virtual void print(raw_ostream &OS, unsigned indent = 0) const; }; -/// CompleteMatchMatcherNode - Complete a match by replacing the results of the +/// CompleteMatchMatcher - Complete a match by replacing the results of the /// pattern with the newly generated nodes. This also prints a comment /// indicating the source and dest patterns. -class CompleteMatchMatcherNode : public MatcherNode { +class CompleteMatchMatcher : public Matcher { SmallVector Results; const PatternToMatch &Pattern; public: - CompleteMatchMatcherNode(const unsigned *results, unsigned numresults, + CompleteMatchMatcher(const unsigned *results, unsigned numresults, const PatternToMatch &pattern) - : MatcherNode(CompleteMatch), Results(results, results+numresults), + : Matcher(CompleteMatch), Results(results, results+numresults), Pattern(pattern) {} unsigned getNumResults() const { return Results.size(); } unsigned getResult(unsigned R) const { return Results[R]; } const PatternToMatch &getPattern() const { return Pattern; } - static inline bool classof(const MatcherNode *N) { + static inline bool classof(const Matcher *N) { return N->getKind() == CompleteMatch; } Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp?rev=97096&r1=97095&r2=97096&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Wed Feb 24 20:04:40 2010 @@ -81,14 +81,14 @@ public: MatcherTableEmitter() {} - unsigned EmitMatcherList(const MatcherNode *N, unsigned Indent, + unsigned EmitMatcherList(const Matcher *N, unsigned Indent, unsigned StartIdx, formatted_raw_ostream &OS); void EmitPredicateFunctions(formatted_raw_ostream &OS); void EmitHistogram(formatted_raw_ostream &OS); private: - unsigned EmitMatcher(const MatcherNode *N, unsigned Indent, + unsigned EmitMatcher(const Matcher *N, unsigned Indent, formatted_raw_ostream &OS); unsigned getNodePredicate(StringRef PredName) { @@ -151,66 +151,65 @@ /// EmitMatcherOpcodes - Emit bytes for the specified matcher and return /// the number of bytes emitted. unsigned MatcherTableEmitter:: -EmitMatcher(const MatcherNode *N, unsigned Indent, formatted_raw_ostream &OS) { +EmitMatcher(const Matcher *N, unsigned Indent, formatted_raw_ostream &OS) { OS.PadToColumn(Indent*2); switch (N->getKind()) { - case MatcherNode::Scope: assert(0 && "Should be handled by caller"); - case MatcherNode::RecordNode: + case Matcher::Scope: assert(0 && "Should be handled by caller"); + case Matcher::RecordNode: OS << "OPC_RecordNode,"; OS.PadToColumn(CommentIndent) << "// " - << cast(N)->getWhatFor() << '\n'; + << cast(N)->getWhatFor() << '\n'; return 1; - case MatcherNode::RecordChild: - OS << "OPC_RecordChild" << cast(N)->getChildNo() + case Matcher::RecordChild: + OS << "OPC_RecordChild" << cast(N)->getChildNo() << ','; OS.PadToColumn(CommentIndent) << "// " - << cast(N)->getWhatFor() << '\n'; + << cast(N)->getWhatFor() << '\n'; return 1; - case MatcherNode::RecordMemRef: + case Matcher::RecordMemRef: OS << "OPC_RecordMemRef,\n"; return 1; - case MatcherNode::CaptureFlagInput: + case Matcher::CaptureFlagInput: OS << "OPC_CaptureFlagInput,\n"; return 1; - case MatcherNode::MoveChild: - OS << "OPC_MoveChild, " - << cast(N)->getChildNo() << ",\n"; + case Matcher::MoveChild: + OS << "OPC_MoveChild, " << cast(N)->getChildNo() << ",\n"; return 2; - case MatcherNode::MoveParent: + case Matcher::MoveParent: OS << "OPC_MoveParent,\n"; return 1; - case MatcherNode::CheckSame: + case Matcher::CheckSame: OS << "OPC_CheckSame, " - << cast(N)->getMatchNumber() << ",\n"; + << cast(N)->getMatchNumber() << ",\n"; return 2; - case MatcherNode::CheckPatternPredicate: { - StringRef Pred = cast(N)->getPredicate(); + case Matcher::CheckPatternPredicate: { + StringRef Pred = cast(N)->getPredicate(); OS << "OPC_CheckPatternPredicate, " << getPatternPredicate(Pred) << ','; OS.PadToColumn(CommentIndent) << "// " << Pred << '\n'; return 2; } - case MatcherNode::CheckPredicate: { - StringRef Pred = cast(N)->getPredicateName(); + case Matcher::CheckPredicate: { + StringRef Pred = cast(N)->getPredicateName(); OS << "OPC_CheckPredicate, " << getNodePredicate(Pred) << ','; OS.PadToColumn(CommentIndent) << "// " << Pred << '\n'; return 2; } - case MatcherNode::CheckOpcode: + case Matcher::CheckOpcode: OS << "OPC_CheckOpcode, " - << cast(N)->getOpcodeName() << ",\n"; + << cast(N)->getOpcodeName() << ",\n"; return 2; - case MatcherNode::CheckMultiOpcode: { - const CheckMultiOpcodeMatcherNode *CMO=cast(N); + case Matcher::CheckMultiOpcode: { + const CheckMultiOpcodeMatcher *CMO = cast(N); OS << "OPC_CheckMultiOpcode, " << CMO->getNumOpcodeNames() << ", "; for (unsigned i = 0, e = CMO->getNumOpcodeNames(); i != e; ++i) OS << CMO->getOpcodeName(i) << ", "; @@ -218,34 +217,34 @@ return 2 + CMO->getNumOpcodeNames(); } - case MatcherNode::CheckType: + case Matcher::CheckType: OS << "OPC_CheckType, " - << getEnumName(cast(N)->getType()) << ",\n"; + << getEnumName(cast(N)->getType()) << ",\n"; return 2; - case MatcherNode::CheckChildType: + case Matcher::CheckChildType: OS << "OPC_CheckChild" - << cast(N)->getChildNo() << "Type, " - << getEnumName(cast(N)->getType()) << ",\n"; + << cast(N)->getChildNo() << "Type, " + << getEnumName(cast(N)->getType()) << ",\n"; return 2; - case MatcherNode::CheckInteger: { - int64_t Val = cast(N)->getValue(); + case Matcher::CheckInteger: { + int64_t Val = cast(N)->getValue(); OS << "OPC_CheckInteger" << ClassifyInt(Val) << ", "; return EmitInt(Val, OS)+1; } - case MatcherNode::CheckCondCode: + case Matcher::CheckCondCode: OS << "OPC_CheckCondCode, ISD::" - << cast(N)->getCondCodeName() << ",\n"; + << cast(N)->getCondCodeName() << ",\n"; return 2; - case MatcherNode::CheckValueType: + case Matcher::CheckValueType: OS << "OPC_CheckValueType, MVT::" - << cast(N)->getTypeName() << ",\n"; + << cast(N)->getTypeName() << ",\n"; return 2; - case MatcherNode::CheckComplexPat: { + case Matcher::CheckComplexPat: { const ComplexPattern &Pattern = - cast(N)->getPattern(); + cast(N)->getPattern(); OS << "OPC_CheckComplexPat, " << getComplexPat(Pattern) << ','; OS.PadToColumn(CommentIndent) << "// " << Pattern.getSelectFunc(); OS << ": " << Pattern.getNumOperands() << " operands"; @@ -255,79 +254,79 @@ return 2; } - case MatcherNode::CheckAndImm: { - int64_t Val = cast(N)->getValue(); + case Matcher::CheckAndImm: { + int64_t Val = cast(N)->getValue(); OS << "OPC_CheckAndImm" << ClassifyInt(Val) << ", "; return EmitInt(Val, OS)+1; } - case MatcherNode::CheckOrImm: { - int64_t Val = cast(N)->getValue(); + case Matcher::CheckOrImm: { + int64_t Val = cast(N)->getValue(); OS << "OPC_CheckOrImm" << ClassifyInt(Val) << ", "; return EmitInt(Val, OS)+1; } - case MatcherNode::CheckFoldableChainNode: + case Matcher::CheckFoldableChainNode: OS << "OPC_CheckFoldableChainNode,\n"; return 1; - case MatcherNode::CheckChainCompatible: + case Matcher::CheckChainCompatible: OS << "OPC_CheckChainCompatible, " - << cast(N)->getPreviousOp() << ",\n"; + << cast(N)->getPreviousOp() << ",\n"; return 2; - case MatcherNode::EmitInteger: { - int64_t Val = cast(N)->getValue(); + case Matcher::EmitInteger: { + int64_t Val = cast(N)->getValue(); OS << "OPC_EmitInteger" << ClassifyInt(Val) << ", " - << getEnumName(cast(N)->getVT()) << ", "; + << getEnumName(cast(N)->getVT()) << ", "; return EmitInt(Val, OS)+2; } - case MatcherNode::EmitStringInteger: { - const std::string &Val = cast(N)->getValue(); + case Matcher::EmitStringInteger: { + const std::string &Val = cast(N)->getValue(); // These should always fit into one byte. OS << "OPC_EmitInteger1, " - << getEnumName(cast(N)->getVT()) << ", " + << getEnumName(cast(N)->getVT()) << ", " << Val << ",\n"; return 3; } - case MatcherNode::EmitRegister: + case Matcher::EmitRegister: OS << "OPC_EmitRegister, " - << getEnumName(cast(N)->getVT()) << ", "; - if (Record *R = cast(N)->getReg()) + << getEnumName(cast(N)->getVT()) << ", "; + if (Record *R = cast(N)->getReg()) OS << getQualifiedName(R) << ",\n"; else OS << "0 /*zero_reg*/,\n"; return 3; - case MatcherNode::EmitConvertToTarget: + case Matcher::EmitConvertToTarget: OS << "OPC_EmitConvertToTarget, " - << cast(N)->getSlot() << ",\n"; + << cast(N)->getSlot() << ",\n"; return 2; - case MatcherNode::EmitMergeInputChains: { - const EmitMergeInputChainsMatcherNode *MN = - cast(N); + case Matcher::EmitMergeInputChains: { + const EmitMergeInputChainsMatcher *MN = + cast(N); OS << "OPC_EmitMergeInputChains, " << MN->getNumNodes() << ", "; for (unsigned i = 0, e = MN->getNumNodes(); i != e; ++i) OS << MN->getNode(i) << ", "; OS << '\n'; return 2+MN->getNumNodes(); } - case MatcherNode::EmitCopyToReg: + case Matcher::EmitCopyToReg: OS << "OPC_EmitCopyToReg, " - << cast(N)->getSrcSlot() << ", " - << getQualifiedName(cast(N)->getDestPhysReg()) + << cast(N)->getSrcSlot() << ", " + << getQualifiedName(cast(N)->getDestPhysReg()) << ",\n"; return 3; - case MatcherNode::EmitNodeXForm: { - const EmitNodeXFormMatcherNode *XF = cast(N); + case Matcher::EmitNodeXForm: { + const EmitNodeXFormMatcher *XF = cast(N); OS << "OPC_EmitNodeXForm, " << getNodeXFormID(XF->getNodeXForm()) << ", " << XF->getSlot() << ','; OS.PadToColumn(CommentIndent) << "// "<getNodeXForm()->getName()<<'\n'; return 3; } - case MatcherNode::EmitNode: { - const EmitNodeMatcherNode *EN = cast(N); + case Matcher::EmitNode: { + const EmitNodeMatcher *EN = cast(N); OS << "OPC_EmitNode, TARGET_OPCODE(" << EN->getOpcodeName() << "), 0"; if (EN->hasChain()) OS << "|OPFL_Chain"; @@ -351,8 +350,8 @@ OS << '\n'; return 6+EN->getNumVTs()+NumOperandBytes; } - case MatcherNode::MarkFlagResults: { - const MarkFlagResultsMatcherNode *CFR = cast(N); + case Matcher::MarkFlagResults: { + const MarkFlagResultsMatcher *CFR = cast(N); OS << "OPC_MarkFlagResults, " << CFR->getNumNodes() << ", "; unsigned NumOperandBytes = 0; for (unsigned i = 0, e = CFR->getNumNodes(); i != e; ++i) @@ -360,8 +359,8 @@ OS << '\n'; return 2+NumOperandBytes; } - case MatcherNode::CompleteMatch: { - const CompleteMatchMatcherNode *CM = cast(N); + case Matcher::CompleteMatch: { + const CompleteMatchMatcher *CM = cast(N); OS << "OPC_CompleteMatch, " << CM->getNumResults() << ", "; unsigned NumResultBytes = 0; for (unsigned i = 0, e = CM->getNumResults(); i != e; ++i) @@ -380,7 +379,7 @@ /// EmitMatcherList - Emit the bytes for the specified matcher subtree. unsigned MatcherTableEmitter:: -EmitMatcherList(const MatcherNode *N, unsigned Indent, unsigned CurrentIdx, +EmitMatcherList(const Matcher *N, unsigned Indent, unsigned CurrentIdx, formatted_raw_ostream &OS) { unsigned Size = 0; while (N) { @@ -389,7 +388,7 @@ Histogram[N->getKind()]++; // Scope is a special case since it is binary. - if (const ScopeMatcherNode *SMN = dyn_cast(N)) { + if (const ScopeMatcher *SMN = dyn_cast(N)) { // We need to encode the child and the offset of the failure code before // emitting either of them. Handle this by buffering the output into a // string while we get the size. @@ -398,7 +397,7 @@ { raw_svector_ostream OS(TmpBuf); formatted_raw_ostream FOS(OS); - NextSize = EmitMatcherList(cast(N)->getCheck(), + NextSize = EmitMatcherList(cast(N)->getCheck(), Indent+1, CurrentIdx+2, FOS); } @@ -408,7 +407,7 @@ TmpBuf.clear(); raw_svector_ostream OS(TmpBuf); formatted_raw_ostream FOS(OS); - NextSize = EmitMatcherList(cast(N)->getCheck(), + NextSize = EmitMatcherList(cast(N)->getCheck(), Indent+1, CurrentIdx+3, FOS); if (NextSize > 65535) { errs() << @@ -513,44 +512,44 @@ OS << " // Opcode Histogram:\n"; for (unsigned i = 0, e = Histogram.size(); i != e; ++i) { OS << " // #"; - switch ((MatcherNode::KindTy)i) { - case MatcherNode::Scope: OS << "OPC_Scope"; break; - case MatcherNode::RecordNode: OS << "OPC_RecordNode"; break; - case MatcherNode::RecordChild: OS << "OPC_RecordChild"; break; - case MatcherNode::RecordMemRef: OS << "OPC_RecordMemRef"; break; - case MatcherNode::CaptureFlagInput: OS << "OPC_CaptureFlagInput"; break; - case MatcherNode::MoveChild: OS << "OPC_MoveChild"; break; - case MatcherNode::MoveParent: OS << "OPC_MoveParent"; break; - case MatcherNode::CheckSame: OS << "OPC_CheckSame"; break; - case MatcherNode::CheckPatternPredicate: + switch ((Matcher::KindTy)i) { + case Matcher::Scope: OS << "OPC_Scope"; break; + case Matcher::RecordNode: OS << "OPC_RecordNode"; break; + case Matcher::RecordChild: OS << "OPC_RecordChild"; break; + case Matcher::RecordMemRef: OS << "OPC_RecordMemRef"; break; + case Matcher::CaptureFlagInput: OS << "OPC_CaptureFlagInput"; break; + case Matcher::MoveChild: OS << "OPC_MoveChild"; break; + case Matcher::MoveParent: OS << "OPC_MoveParent"; break; + case Matcher::CheckSame: OS << "OPC_CheckSame"; break; + case Matcher::CheckPatternPredicate: OS << "OPC_CheckPatternPredicate"; break; - case MatcherNode::CheckPredicate: OS << "OPC_CheckPredicate"; break; - case MatcherNode::CheckOpcode: OS << "OPC_CheckOpcode"; break; - case MatcherNode::CheckMultiOpcode: OS << "OPC_CheckMultiOpcode"; break; - case MatcherNode::CheckType: OS << "OPC_CheckType"; break; - case MatcherNode::CheckChildType: OS << "OPC_CheckChildType"; break; - case MatcherNode::CheckInteger: OS << "OPC_CheckInteger"; break; - case MatcherNode::CheckCondCode: OS << "OPC_CheckCondCode"; break; - case MatcherNode::CheckValueType: OS << "OPC_CheckValueType"; break; - case MatcherNode::CheckComplexPat: OS << "OPC_CheckComplexPat"; break; - case MatcherNode::CheckAndImm: OS << "OPC_CheckAndImm"; break; - case MatcherNode::CheckOrImm: OS << "OPC_CheckOrImm"; break; - case MatcherNode::CheckFoldableChainNode: + case Matcher::CheckPredicate: OS << "OPC_CheckPredicate"; break; + case Matcher::CheckOpcode: OS << "OPC_CheckOpcode"; break; + case Matcher::CheckMultiOpcode: OS << "OPC_CheckMultiOpcode"; break; + case Matcher::CheckType: OS << "OPC_CheckType"; break; + case Matcher::CheckChildType: OS << "OPC_CheckChildType"; break; + case Matcher::CheckInteger: OS << "OPC_CheckInteger"; break; + case Matcher::CheckCondCode: OS << "OPC_CheckCondCode"; break; + case Matcher::CheckValueType: OS << "OPC_CheckValueType"; break; + case Matcher::CheckComplexPat: OS << "OPC_CheckComplexPat"; break; + case Matcher::CheckAndImm: OS << "OPC_CheckAndImm"; break; + case Matcher::CheckOrImm: OS << "OPC_CheckOrImm"; break; + case Matcher::CheckFoldableChainNode: OS << "OPC_CheckFoldableChainNode"; break; - case MatcherNode::CheckChainCompatible: + case Matcher::CheckChainCompatible: OS << "OPC_CheckChainCompatible"; break; - case MatcherNode::EmitInteger: OS << "OPC_EmitInteger"; break; - case MatcherNode::EmitStringInteger: OS << "OPC_EmitStringInteger"; break; - case MatcherNode::EmitRegister: OS << "OPC_EmitRegister"; break; - case MatcherNode::EmitConvertToTarget: + case Matcher::EmitInteger: OS << "OPC_EmitInteger"; break; + case Matcher::EmitStringInteger: OS << "OPC_EmitStringInteger"; break; + case Matcher::EmitRegister: OS << "OPC_EmitRegister"; break; + case Matcher::EmitConvertToTarget: OS << "OPC_EmitConvertToTarget"; break; - case MatcherNode::EmitMergeInputChains: + case Matcher::EmitMergeInputChains: OS << "OPC_EmitMergeInputChains"; break; - case MatcherNode::EmitCopyToReg: OS << "OPC_EmitCopyToReg"; break; - case MatcherNode::EmitNode: OS << "OPC_EmitNode"; break; - case MatcherNode::EmitNodeXForm: OS << "OPC_EmitNodeXForm"; break; - case MatcherNode::MarkFlagResults: OS << "OPC_MarkFlagResults"; break; - case MatcherNode::CompleteMatch: OS << "OPC_CompleteMatch"; break; + case Matcher::EmitCopyToReg: OS << "OPC_EmitCopyToReg"; break; + case Matcher::EmitNode: OS << "OPC_EmitNode"; break; + case Matcher::EmitNodeXForm: OS << "OPC_EmitNodeXForm"; break; + case Matcher::MarkFlagResults: OS << "OPC_MarkFlagResults"; break; + case Matcher::CompleteMatch: OS << "OPC_CompleteMatch"; break; } OS.PadToColumn(40) << " = " << Histogram[i] << '\n'; @@ -559,7 +558,7 @@ } -void llvm::EmitMatcherTable(const MatcherNode *Matcher, raw_ostream &O) { +void llvm::EmitMatcherTable(const Matcher *TheMatcher, raw_ostream &O) { formatted_raw_ostream OS(O); OS << "// The main instruction selector code.\n"; @@ -570,7 +569,7 @@ OS << " // Opcodes are emitted as 2 bytes, TARGET_OPCODE handles this.\n"; OS << " #define TARGET_OPCODE(X) X & 255, unsigned(X) >> 8\n"; OS << " static const unsigned char MatcherTable[] = {\n"; - unsigned TotalSize = MatcherEmitter.EmitMatcherList(Matcher, 5, 0, OS); + unsigned TotalSize = MatcherEmitter.EmitMatcherList(TheMatcher, 5, 0, OS); OS << " 0\n }; // Total Array size is " << (TotalSize+1) << " bytes\n\n"; MatcherEmitter.EmitHistogram(OS); Modified: llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp?rev=97096&r1=97095&r2=97096&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Wed Feb 24 20:04:40 2010 @@ -85,11 +85,11 @@ bool EmittedMergeInputChains; /// Matcher - This is the top level of the generated matcher, the result. - MatcherNode *Matcher; + Matcher *TheMatcher; /// CurPredicate - As we emit matcher nodes, this points to the latest check /// which should have future checks stuck into its Next position. - MatcherNode *CurPredicate; + Matcher *CurPredicate; public: MatcherGen(const PatternToMatch &pattern, const CodeGenDAGPatterns &cgp); @@ -100,10 +100,10 @@ void EmitMatcherCode(); void EmitResultCode(); - MatcherNode *GetMatcher() const { return Matcher; } - MatcherNode *GetCurPredicate() const { return CurPredicate; } + Matcher *GetMatcher() const { return TheMatcher; } + Matcher *GetCurPredicate() const { return CurPredicate; } private: - void AddMatcherNode(MatcherNode *NewNode); + void AddMatcher(Matcher *NewNode); void InferPossibleTypes(); // Matcher Generation. @@ -141,7 +141,7 @@ MatcherGen::MatcherGen(const PatternToMatch &pattern, const CodeGenDAGPatterns &cgp) : Pattern(pattern), CGP(cgp), NextRecordedOperandNo(0), - EmittedMergeInputChains(false), Matcher(0), CurPredicate(0) { + EmittedMergeInputChains(false), TheMatcher(0), CurPredicate(0) { // We need to produce the matcher tree for the patterns source pattern. To do // this we need to match the structure as well as the types. To do the type // matching, we want to figure out the fewest number of type checks we need to @@ -182,12 +182,12 @@ } -/// AddMatcherNode - Add a matcher node to the current graph we're building. -void MatcherGen::AddMatcherNode(MatcherNode *NewNode) { +/// AddMatcher - Add a matcher node to the current graph we're building. +void MatcherGen::AddMatcher(Matcher *NewNode) { if (CurPredicate != 0) CurPredicate->setNext(NewNode); else - Matcher = NewNode; + TheMatcher = NewNode; CurPredicate = NewNode; } @@ -202,11 +202,11 @@ // If there are node predicates for this node, generate their checks. for (unsigned i = 0, e = N->getPredicateFns().size(); i != e; ++i) - AddMatcherNode(new CheckPredicateMatcherNode(N->getPredicateFns()[i])); + AddMatcher(new CheckPredicateMatcher(N->getPredicateFns()[i])); // Direct match against an integer constant. if (IntInit *II = dynamic_cast(N->getLeafValue())) - return AddMatcherNode(new CheckIntegerMatcherNode(II->getValue())); + return AddMatcher(new CheckIntegerMatcher(II->getValue())); DefInit *DI = dynamic_cast(N->getLeafValue()); if (DI == 0) { @@ -225,16 +225,16 @@ // If we have a physreg reference like (mul gpr:$src, EAX) then we need to // record the register if (LeafRec->isSubClassOf("Register")) { - AddMatcherNode(new RecordMatcherNode("physreg input "+LeafRec->getName())); + AddMatcher(new RecordMatcher("physreg input "+LeafRec->getName())); PhysRegInputs.push_back(std::make_pair(LeafRec, NextRecordedOperandNo++)); return; } if (LeafRec->isSubClassOf("ValueType")) - return AddMatcherNode(new CheckValueTypeMatcherNode(LeafRec->getName())); + return AddMatcher(new CheckValueTypeMatcher(LeafRec->getName())); if (LeafRec->isSubClassOf("CondCode")) - return AddMatcherNode(new CheckCondCodeMatcherNode(LeafRec->getName())); + return AddMatcher(new CheckCondCodeMatcher(LeafRec->getName())); if (LeafRec->isSubClassOf("ComplexPattern")) { // We can't model ComplexPattern uses that don't have their name taken yet. @@ -253,19 +253,19 @@ const std::vector &OpNodes = CP.getRootNodes(); if (OpNodes.size() == 1) { StringRef OpName = CGP.getSDNodeInfo(OpNodes[0]).getEnumName(); - AddMatcherNode(new CheckOpcodeMatcherNode(OpName)); + AddMatcher(new CheckOpcodeMatcher(OpName)); } else if (!OpNodes.empty()) { SmallVector OpNames; for (unsigned i = 0, e = OpNodes.size(); i != e; i++) OpNames.push_back(CGP.getSDNodeInfo(OpNodes[i]).getEnumName()); - AddMatcherNode(new CheckMultiOpcodeMatcherNode(OpNames.data(), + AddMatcher(new CheckMultiOpcodeMatcher(OpNames.data(), OpNames.size())); } } // Emit a CheckComplexPat operation, which does the match (aborting if it // fails) and pushes the matched operands onto the recorded nodes list. - AddMatcherNode(new CheckComplexPatMatcherNode(CP)); + AddMatcher(new CheckComplexPatMatcher(CP)); // Record the right number of operands. NextRecordedOperandNo += CP.getNumOperands(); @@ -288,7 +288,7 @@ // but we want to produce the same selections that the old matcher does // for now. unsigned PrevOp = MatchedChainNodes[MatchedChainNodes.size()-2]; - AddMatcherNode(new CheckChainCompatibleMatcherNode(PrevOp)); + AddMatcher(new CheckChainCompatibleMatcher(PrevOp)); } } @@ -323,38 +323,38 @@ if (IntInit *II = dynamic_cast(N->getChild(1)->getLeafValue())) { if (!isPowerOf2_32(II->getValue())) { // Don't bother with single bits. if (N->getOperator()->getName() == "and") - AddMatcherNode(new CheckAndImmMatcherNode(II->getValue())); + AddMatcher(new CheckAndImmMatcher(II->getValue())); else - AddMatcherNode(new CheckOrImmMatcherNode(II->getValue())); + AddMatcher(new CheckOrImmMatcher(II->getValue())); // Match the LHS of the AND as appropriate. - AddMatcherNode(new MoveChildMatcherNode(0)); + AddMatcher(new MoveChildMatcher(0)); EmitMatchCode(N->getChild(0), NodeNoTypes->getChild(0)); - AddMatcherNode(new MoveParentMatcherNode()); + AddMatcher(new MoveParentMatcher()); return; } } } // Check that the current opcode lines up. - AddMatcherNode(new CheckOpcodeMatcherNode(CInfo.getEnumName())); + AddMatcher(new CheckOpcodeMatcher(CInfo.getEnumName())); // If there are node predicates for this node, generate their checks. for (unsigned i = 0, e = N->getPredicateFns().size(); i != e; ++i) - AddMatcherNode(new CheckPredicateMatcherNode(N->getPredicateFns()[i])); + AddMatcher(new CheckPredicateMatcher(N->getPredicateFns()[i])); // If this node has memory references (i.e. is a load or store), tell the // interpreter to capture them in the memref array. if (N->NodeHasProperty(SDNPMemOperand, CGP)) - AddMatcherNode(new RecordMemRefMatcherNode()); + AddMatcher(new RecordMemRefMatcher()); // If this node has a chain, then the chain is operand #0 is the SDNode, and // the child numbers of the node are all offset by one. unsigned OpNo = 0; if (N->NodeHasProperty(SDNPHasChain, CGP)) { // Record the node and remember it in our chained nodes list. - AddMatcherNode(new RecordMatcherNode("'" + N->getOperator()->getName() + + AddMatcher(new RecordMatcher("'" + N->getOperator()->getName() + "' chained node")); // Remember all of the input chains our pattern will match. MatchedChainNodes.push_back(NextRecordedOperandNo++); @@ -369,7 +369,7 @@ // but we want to produce the same selections that the old matcher does // for now. unsigned PrevOp = MatchedChainNodes[MatchedChainNodes.size()-2]; - AddMatcherNode(new CheckChainCompatibleMatcherNode(PrevOp)); + AddMatcher(new CheckChainCompatibleMatcher(PrevOp)); } // Don't look at the input chain when matching the tree pattern to the @@ -420,7 +420,7 @@ } if (NeedCheck) - AddMatcherNode(new CheckFoldableChainNodeMatcherNode()); + AddMatcher(new CheckFoldableChainNodeMatcher()); } } @@ -430,7 +430,7 @@ // TODO: This redundantly records nodes with both flags and chains. // Record the node and remember it in our chained nodes list. - AddMatcherNode(new RecordMatcherNode("'" + N->getOperator()->getName() + + AddMatcher(new RecordMatcher("'" + N->getOperator()->getName() + "' flag output node")); // Remember all of the nodes with output flags our pattern will match. MatchedFlagResultNodes.push_back(NextRecordedOperandNo++); @@ -440,14 +440,14 @@ // flag, capture it as the flag input of the pattern. if (N->NodeHasProperty(SDNPOptInFlag, CGP) || N->NodeHasProperty(SDNPInFlag, CGP)) - AddMatcherNode(new CaptureFlagInputMatcherNode()); + AddMatcher(new CaptureFlagInputMatcher()); for (unsigned i = 0, e = N->getNumChildren(); i != e; ++i, ++OpNo) { // Get the code suitable for matching this child. Move to the child, check // it then move back to the parent. - AddMatcherNode(new MoveChildMatcherNode(OpNo)); + AddMatcher(new MoveChildMatcher(OpNo)); EmitMatchCode(N->getChild(i), NodeNoTypes->getChild(i)); - AddMatcherNode(new MoveParentMatcherNode()); + AddMatcher(new MoveParentMatcher()); } } @@ -458,7 +458,7 @@ // need to do a type check. Emit the check, apply the tyep to NodeNoTypes and // reinfer any correlated types. if (NodeNoTypes->getExtTypes() != N->getExtTypes()) { - AddMatcherNode(new CheckTypeMatcherNode(N->getTypeNum(0))); + AddMatcher(new CheckTypeMatcher(N->getTypeNum(0))); NodeNoTypes->setTypes(N->getExtTypes()); InferPossibleTypes(); } @@ -470,13 +470,13 @@ if (VarMapEntry == 0) { // If it is a named node, we must emit a 'Record' opcode. VarMapEntry = ++NextRecordedOperandNo; - AddMatcherNode(new RecordMatcherNode("$" + N->getName())); + AddMatcher(new RecordMatcher("$" + N->getName())); } else { // If we get here, this is a second reference to a specific name. Since // we already have checked that the first reference is valid, we don't // have to recursively match it, just check that it's the same as the // previously named thing. - AddMatcherNode(new CheckSameMatcherNode(VarMapEntry-1)); + AddMatcher(new CheckSameMatcher(VarMapEntry-1)); return; } } @@ -495,8 +495,8 @@ // dag combine, eliminating the horrible side-effect-full stuff from // X86's MatchAddress. if (!Pattern.getPredicateCheck().empty()) - AddMatcherNode(new - CheckPatternPredicateMatcherNode(Pattern.getPredicateCheck())); + AddMatcher(new + CheckPatternPredicateMatcher(Pattern.getPredicateCheck())); // Emit the matcher for the pattern structure and types. EmitMatchCode(Pattern.getSrcPattern(), PatWithNoTypes); @@ -529,7 +529,7 @@ if (!N->isLeaf()) { StringRef OperatorName = N->getOperator()->getName(); if (OperatorName == "imm" || OperatorName == "fpimm") { - AddMatcherNode(new EmitConvertToTargetMatcherNode(SlotNo)); + AddMatcher(new EmitConvertToTargetMatcher(SlotNo)); ResultOps.push_back(NextRecordedOperandNo++); return; } @@ -543,7 +543,7 @@ assert(N->isLeaf() && "Must be a leaf"); if (IntInit *II = dynamic_cast(N->getLeafValue())) { - AddMatcherNode(new EmitIntegerMatcherNode(II->getValue(),N->getTypeNum(0))); + AddMatcher(new EmitIntegerMatcher(II->getValue(),N->getTypeNum(0))); ResultOps.push_back(NextRecordedOperandNo++); return; } @@ -551,14 +551,14 @@ // If this is an explicit register reference, handle it. if (DefInit *DI = dynamic_cast(N->getLeafValue())) { if (DI->getDef()->isSubClassOf("Register")) { - AddMatcherNode(new EmitRegisterMatcherNode(DI->getDef(), + AddMatcher(new EmitRegisterMatcher(DI->getDef(), N->getTypeNum(0))); ResultOps.push_back(NextRecordedOperandNo++); return; } if (DI->getDef()->getName() == "zero_reg") { - AddMatcherNode(new EmitRegisterMatcherNode(0, N->getTypeNum(0))); + AddMatcher(new EmitRegisterMatcher(0, N->getTypeNum(0))); ResultOps.push_back(NextRecordedOperandNo++); return; } @@ -567,7 +567,7 @@ // in COPY_TO_SUBREG instructions. if (DI->getDef()->isSubClassOf("RegisterClass")) { std::string Value = getQualifiedName(DI->getDef()) + "RegClassID"; - AddMatcherNode(new EmitStringIntegerMatcherNode(Value, MVT::i32)); + AddMatcher(new EmitStringIntegerMatcher(Value, MVT::i32)); ResultOps.push_back(NextRecordedOperandNo++); return; } @@ -675,7 +675,7 @@ "How can this node have chain if no inputs do?"); // Otherwise, we have to emit an operation to merge the input chains and // set this as the current input chain. - AddMatcherNode(new EmitMergeInputChainsMatcherNode + AddMatcher(new EmitMergeInputChainsMatcher (MatchedChainNodes.data(), MatchedChainNodes.size())); EmittedMergeInputChains = true; } @@ -687,7 +687,7 @@ // Emit all of the CopyToReg nodes for the input physical registers. These // occur in patterns like (mul:i8 AL:i8, GR8:i8:$src). for (unsigned i = 0, e = PhysRegInputs.size(); i != e; ++i) - AddMatcherNode(new EmitCopyToRegMatcherNode(PhysRegInputs[i].second, + AddMatcher(new EmitCopyToRegMatcher(PhysRegInputs[i].second, PhysRegInputs[i].first)); // Even if the node has no other flag inputs, the resultant node must be // flagged to the CopyFromReg nodes we just generated. @@ -747,7 +747,7 @@ // superset of the results of the old node, in the same places. E.g. turning // (add (load)) -> add32rm is ok because result #0 is the result and result #1 // is new. - AddMatcherNode(new EmitNodeMatcherNode(II.Namespace+"::"+II.TheDef->getName(), + AddMatcher(new EmitNodeMatcher(II.Namespace+"::"+II.TheDef->getName(), ResultVTs.data(), ResultVTs.size(), InstOps.data(), InstOps.size(), NodeHasChain, TreeHasInFlag, @@ -780,7 +780,7 @@ // The input currently must have produced exactly one result. assert(InputOps.size() == 1 && "Unexpected input to SDNodeXForm"); - AddMatcherNode(new EmitNodeXFormMatcherNode(InputOps[0], N->getOperator())); + AddMatcher(new EmitNodeXFormMatcher(InputOps[0], N->getOperator())); ResultOps.push_back(NextRecordedOperandNo++); } @@ -840,18 +840,18 @@ // If the matched pattern covers nodes which define a flag result, emit a node // that tells the matcher about them so that it can update their results. if (!MatchedFlagResultNodes.empty()) - AddMatcherNode(new MarkFlagResultsMatcherNode(MatchedFlagResultNodes.data(), + AddMatcher(new MarkFlagResultsMatcher(MatchedFlagResultNodes.data(), MatchedFlagResultNodes.size())); // We know that the resulting pattern has exactly one result/ // FIXME2: why? what about something like (set a,b,c, (complexpat)) // FIXME2: Implicit results should be pushed here I guess? - AddMatcherNode(new CompleteMatchMatcherNode(Ops.data(), Ops.size(), Pattern)); + AddMatcher(new CompleteMatchMatcher(Ops.data(), Ops.size(), Pattern)); } -MatcherNode *llvm::ConvertPatternToMatcher(const PatternToMatch &Pattern, +Matcher *llvm::ConvertPatternToMatcher(const PatternToMatch &Pattern, const CodeGenDAGPatterns &CGP) { MatcherGen Gen(Pattern, CGP); Modified: llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp?rev=97096&r1=97095&r2=97096&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Wed Feb 24 20:04:40 2010 @@ -14,24 +14,24 @@ #include "DAGISelMatcher.h" using namespace llvm; -static void ContractNodes(OwningPtr &MatcherPtr) { +static void ContractNodes(OwningPtr &MatcherPtr) { // If we reached the end of the chain, we're done. - MatcherNode *N = MatcherPtr.get(); + Matcher *N = MatcherPtr.get(); if (N == 0) return; // If we have a scope node, walk down both edges. - if (ScopeMatcherNode *Push = dyn_cast(N)) + if (ScopeMatcher *Push = dyn_cast(N)) ContractNodes(Push->getCheckPtr()); // If we found a movechild node with a node that comes in a 'foochild' form, // transform it. - if (MoveChildMatcherNode *MC = dyn_cast(N)) { - MatcherNode *New = 0; - if (RecordMatcherNode *RM = dyn_cast(MC->getNext())) - New = new RecordChildMatcherNode(MC->getChildNo(), RM->getWhatFor()); + if (MoveChildMatcher *MC = dyn_cast(N)) { + Matcher *New = 0; + if (RecordMatcher *RM = dyn_cast(MC->getNext())) + New = new RecordChildMatcher(MC->getChildNo(), RM->getWhatFor()); - if (CheckTypeMatcherNode *CT= dyn_cast(MC->getNext())) - New = new CheckChildTypeMatcherNode(MC->getChildNo(), CT->getType()); + if (CheckTypeMatcher *CT= dyn_cast(MC->getNext())) + New = new CheckChildTypeMatcher(MC->getChildNo(), CT->getType()); if (New) { // Insert the new node. @@ -43,9 +43,9 @@ } } - if (MoveChildMatcherNode *MC = dyn_cast(N)) - if (MoveParentMatcherNode *MP = - dyn_cast(MC->getNext())) { + if (MoveChildMatcher *MC = dyn_cast(N)) + if (MoveParentMatcher *MP = + dyn_cast(MC->getNext())) { MatcherPtr.reset(MP->takeNext()); return ContractNodes(MatcherPtr); } @@ -53,21 +53,21 @@ ContractNodes(N->getNextPtr()); } -static void FactorNodes(OwningPtr &MatcherPtr) { +static void FactorNodes(OwningPtr &MatcherPtr) { // If we reached the end of the chain, we're done. - MatcherNode *N = MatcherPtr.get(); + Matcher *N = MatcherPtr.get(); if (N == 0) return; // If this is not a push node, just scan for one. - if (!isa(N)) + if (!isa(N)) return FactorNodes(N->getNextPtr()); // Okay, pull together the series of linear push nodes into a vector so we can // inspect it more easily. - SmallVector OptionsToMatch; + SmallVector OptionsToMatch; - MatcherNode *CurNode = N; - for (; ScopeMatcherNode *PMN = dyn_cast(CurNode); + Matcher *CurNode = N; + for (; ScopeMatcher *PMN = dyn_cast(CurNode); CurNode = PMN->getNext()) OptionsToMatch.push_back(PMN->getCheck()); OptionsToMatch.push_back(CurNode); @@ -75,8 +75,8 @@ } -MatcherNode *llvm::OptimizeMatcher(MatcherNode *Matcher) { - OwningPtr MatcherPtr(Matcher); +Matcher *llvm::OptimizeMatcher(Matcher *TheMatcher) { + OwningPtr MatcherPtr(TheMatcher); ContractNodes(MatcherPtr); FactorNodes(MatcherPtr); return MatcherPtr.take(); From sabre at nondot.org Wed Feb 24 20:09:00 2010 From: sabre at nondot.org (Chris Lattner) Date: Thu, 25 Feb 2010 02:09:00 -0000 Subject: [llvm-commits] [llvm] r97097 - /llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Message-ID: <20100225020900.559ED2A6C136@llvm.org> Author: lattner Date: Wed Feb 24 20:09:00 2010 New Revision: 97097 URL: http://llvm.org/viewvc/llvm-project?rev=97097&view=rev Log: formatting. Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp?rev=97097&r1=97096&r2=97097&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Wed Feb 24 20:09:00 2010 @@ -536,15 +536,12 @@ case Matcher::CheckOrImm: OS << "OPC_CheckOrImm"; break; case Matcher::CheckFoldableChainNode: OS << "OPC_CheckFoldableChainNode"; break; - case Matcher::CheckChainCompatible: - OS << "OPC_CheckChainCompatible"; break; + case Matcher::CheckChainCompatible: OS << "OPC_CheckChainCompatible"; break; case Matcher::EmitInteger: OS << "OPC_EmitInteger"; break; case Matcher::EmitStringInteger: OS << "OPC_EmitStringInteger"; break; case Matcher::EmitRegister: OS << "OPC_EmitRegister"; break; - case Matcher::EmitConvertToTarget: - OS << "OPC_EmitConvertToTarget"; break; - case Matcher::EmitMergeInputChains: - OS << "OPC_EmitMergeInputChains"; break; + case Matcher::EmitConvertToTarget: OS << "OPC_EmitConvertToTarget"; break; + case Matcher::EmitMergeInputChains: OS << "OPC_EmitMergeInputChains"; break; case Matcher::EmitCopyToReg: OS << "OPC_EmitCopyToReg"; break; case Matcher::EmitNode: OS << "OPC_EmitNode"; break; case Matcher::EmitNodeXForm: OS << "OPC_EmitNodeXForm"; break; From johnny.chen at apple.com Wed Feb 24 20:21:11 2010 From: johnny.chen at apple.com (Johnny Chen) Date: Thu, 25 Feb 2010 02:21:11 -0000 Subject: [llvm-commits] [llvm] r97098 - /llvm/trunk/lib/Target/ARM/ARMInstrThumb.td Message-ID: <20100225022111.88E402A6C136@llvm.org> Author: johnny Date: Wed Feb 24 20:21:11 2010 New Revision: 97098 URL: http://llvm.org/viewvc/llvm-project?rev=97098&view=rev Log: Added tSVC and tTRAP for disassembly only. Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb.td?rev=97098&r1=97097&r2=97098&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrThumb.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrThumb.td Wed Feb 24 20:21:11 2010 @@ -343,6 +343,24 @@ T1Misc<{1,0,?,1,?,?,?}>; } +// A8.6.218 Supervisor Call (Software Interrupt) -- for disassembly only +// A8.6.16 B: Encoding T1 +// If Inst{11-8} == 0b1111 then SEE SVC +let isCall = 1 in { +def tSVC : T1I<(outs), (ins i32imm:$svc, pred:$cc), IIC_Br, "svc$cc\t$svc", []>, + Encoding16 { + let Inst{15-12} = 0b1101; + let Inst{11-8} = 0b1111; +} +} + +// A8.6.16 B: Encoding T1 -- for disassembly only +// If Inst{11-8} == 0b1110 then UNDEFINED +def tTRAP : T1I<(outs), (ins), IIC_Br, "trap", []>, Encoding16 { + let Inst{15-12} = 0b1101; + let Inst{11-8} = 0b1110; +} + //===----------------------------------------------------------------------===// // Load Store Instructions. // From gohman at apple.com Wed Feb 24 21:04:36 2010 From: gohman at apple.com (Dan Gohman) Date: Thu, 25 Feb 2010 03:04:36 -0000 Subject: [llvm-commits] [llvm] r97100 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Message-ID: <20100225030436.50DCA2A6C136@llvm.org> Author: djg Date: Wed Feb 24 21:04:36 2010 New Revision: 97100 URL: http://llvm.org/viewvc/llvm-project?rev=97100&view=rev Log: Truncate from i64 to i32 is "free" on x86-32, because it involves just discarding one of the registers. Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=97100&r1=97099&r2=97100&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed Feb 24 21:04:36 2010 @@ -7780,7 +7780,7 @@ unsigned NumBits2 = Ty2->getPrimitiveSizeInBits(); if (NumBits1 <= NumBits2) return false; - return Subtarget->is64Bit() || NumBits1 < 64; + return true; } bool X86TargetLowering::isTruncateFree(EVT VT1, EVT VT2) const { @@ -7790,7 +7790,7 @@ unsigned NumBits2 = VT2.getSizeInBits(); if (NumBits1 <= NumBits2) return false; - return Subtarget->is64Bit() || NumBits1 < 64; + return true; } bool X86TargetLowering::isZExtFree(const Type *Ty1, const Type *Ty2) const { From johnny.chen at apple.com Wed Feb 24 21:28:51 2010 From: johnny.chen at apple.com (Johnny Chen) Date: Thu, 25 Feb 2010 03:28:51 -0000 Subject: [llvm-commits] [llvm] r97105 - /llvm/trunk/lib/Target/ARM/ARMInstrThumb.td Message-ID: <20100225032851.DE6EF2A6C136@llvm.org> Author: johnny Date: Wed Feb 24 21:28:51 2010 New Revision: 97105 URL: http://llvm.org/viewvc/llvm-project?rev=97105&view=rev Log: Added tNOP for disassembly only. Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb.td?rev=97105&r1=97104&r2=97105&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrThumb.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrThumb.td Wed Feb 24 21:28:51 2010 @@ -135,6 +135,13 @@ [(ARMcallseq_start imm:$amt)]>, Requires<[IsThumb1Only]>; } +def tNOP : T1pI<(outs), (ins), NoItinerary, "nop", "", + [/* For disassembly only; pattern left blank */]>, + T1Encoding<0b101111> { + let Inst{9-8} = 0b11; + let Inst{7-0} = 0b00000000; +} + // The i32imm operand $val can be used by a debugger to store more information // about the breakpoint. def tBKPT : T1I<(outs), (ins i32imm:$val), NoItinerary, "bkpt\t$val", @@ -347,7 +354,7 @@ // A8.6.16 B: Encoding T1 // If Inst{11-8} == 0b1111 then SEE SVC let isCall = 1 in { -def tSVC : T1I<(outs), (ins i32imm:$svc, pred:$cc), IIC_Br, "svc$cc\t$svc", []>, +def tSVC : T1pI<(outs), (ins i32imm:$svc), IIC_Br, "svc", "\t$svc", []>, Encoding16 { let Inst{15-12} = 0b1101; let Inst{11-8} = 0b1111; From sanjiv.gupta at microchip.com Wed Feb 24 21:54:49 2010 From: sanjiv.gupta at microchip.com (Sanjiv Gupta) Date: Thu, 25 Feb 2010 03:54:49 -0000 Subject: [llvm-commits] [llvm] r97108 - /llvm/trunk/lib/Target/PIC16/PIC16DebugInfo.cpp Message-ID: <20100225035449.A01B72A6C136@llvm.org> Author: sgupta Date: Wed Feb 24 21:54:49 2010 New Revision: 97108 URL: http://llvm.org/viewvc/llvm-project?rev=97108&view=rev Log: Each field of auxiliary debug entry is only 1 byte long. Modified: llvm/trunk/lib/Target/PIC16/PIC16DebugInfo.cpp Modified: llvm/trunk/lib/Target/PIC16/PIC16DebugInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16DebugInfo.cpp?rev=97108&r1=97107&r2=97108&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16DebugInfo.cpp (original) +++ llvm/trunk/lib/Target/PIC16/PIC16DebugInfo.cpp Wed Feb 24 21:54:49 2010 @@ -419,7 +419,7 @@ if (TagName != "") O << ", " << TagName; for (int i = 0; i Author: pingbak Date: Wed Feb 24 19:53:17 2010 New Revision: 97091 URL: http://llvm.org/viewvc/llvm-project?rev=97091&view=rev Log: Large stack frame patch for the CellSPU: handle stack frames that exceed 8176 (511*16) bytes register displacement (D-form). NOTE: This is a potential headache, given the SPU's local core limitations, allowing the software developer to commit stack overrun suicide unknowingly. Also, large SPU stack frames will cause code size explosion. But, one presumes that the software developer knows what they're doing... Contributed by Kalle.Raiskila at nokia.com, edited slightly before commit. Modified: llvm/trunk/lib/Target/CellSPU/SPU.h llvm/trunk/lib/Target/CellSPU/SPURegisterInfo.cpp llvm/trunk/lib/Target/CellSPU/SPURegisterInfo.h Modified: llvm/trunk/lib/Target/CellSPU/SPU.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPU.h?rev=97091&r1=97090&r2=97091&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/SPU.h (original) +++ llvm/trunk/lib/Target/CellSPU/SPU.h Wed Feb 24 19:53:17 2010 @@ -66,9 +66,6 @@ //! Predicate test for an unsigned 10-bit value /*! \param Value The input value to be tested - - This predicate tests for an unsigned 10-bit value, returning the 10-bit value - as a short if true. */ inline bool isU10Constant(short Value) { return (Value == (Value & 0x3ff)); @@ -90,6 +87,70 @@ return (Value == (Value & 0x3ff)); } + //! Predicate test for a signed 14-bit value + /*! + \param Value The input value to be tested + */ + template + inline bool isS14Constant(T Value); + + template<> + inline bool isS14Constant(short Value) { + return (Value >= -(1 << 13) && Value <= (1 << 13) - 1); + } + + template<> + inline bool isS14Constant(int Value) { + return (Value >= -(1 << 13) && Value <= (1 << 13) - 1); + } + + template<> + inline bool isS14Constant(uint32_t Value) { + return (Value <= ((1 << 13) - 1)); + } + + template<> + inline bool isS14Constant(int64_t Value) { + return (Value >= -(1 << 13) && Value <= (1 << 13) - 1); + } + + template<> + inline bool isS14Constant(uint64_t Value) { + return (Value <= ((1 << 13) - 1)); + } + + //! Predicate test for a signed 16-bit value + /*! + \param Value The input value to be tested + */ + template + inline bool isS16Constant(T Value); + + template<> + inline bool isS16Constant(short Value) { + return true; + } + + template<> + inline bool isS16Constant(int Value) { + return (Value >= -(1 << 15) && Value <= (1 << 15) - 1); + } + + template<> + inline bool isS16Constant(uint32_t Value) { + return (Value <= ((1 << 15) - 1)); + } + + template<> + inline bool isS16Constant(int64_t Value) { + return (Value >= -(1 << 15) && Value <= (1 << 15) - 1); + } + + template<> + inline bool isS16Constant(uint64_t Value) { + return (Value <= ((1 << 15) - 1)); + } + extern Target TheCellSPUTarget; } Modified: llvm/trunk/lib/Target/CellSPU/SPURegisterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPURegisterInfo.cpp?rev=97091&r1=97090&r2=97091&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/SPURegisterInfo.cpp (original) +++ llvm/trunk/lib/Target/CellSPU/SPURegisterInfo.cpp Wed Feb 24 19:53:17 2010 @@ -28,6 +28,7 @@ #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/MachineLocation.h" #include "llvm/CodeGen/MachineRegisterInfo.h" +#include "llvm/CodeGen/RegisterScavenging.h" #include "llvm/CodeGen/ValueTypes.h" #include "llvm/Target/TargetFrameInfo.h" #include "llvm/Target/TargetInstrInfo.h" @@ -335,6 +336,7 @@ MachineBasicBlock &MBB = *MI.getParent(); MachineFunction &MF = *MBB.getParent(); MachineFrameInfo *MFI = MF.getFrameInfo(); + DebugLoc dl = II->getDebugLoc(); while (!MI.getOperand(i).isFI()) { ++i; @@ -363,11 +365,22 @@ // Replace the FrameIndex with base register with $sp (aka $r1) SPOp.ChangeToRegister(SPU::R1, false); - if (Offset > SPUFrameInfo::maxFrameOffset() - || Offset < SPUFrameInfo::minFrameOffset()) { - errs() << "Large stack adjustment (" - << Offset - << ") in SPURegisterInfo::eliminateFrameIndex."; + + // if 'Offset' doesn't fit to the D-form instruction's + // immediate, convert the instruction to X-form + // if the instruction is not an AI (which takes a s10 immediate), assume + // it is a load/store that can take a s14 immediate + if ( (MI.getOpcode() == SPU::AIr32 && !isS10Constant(Offset)) + || !isS14Constant(Offset) ) { + int newOpcode = convertDFormToXForm(MI.getOpcode()); + unsigned tmpReg = findScratchRegister(II, RS, &SPU::R32CRegClass, SPAdj); + BuildMI(MBB, II, dl, TII.get(SPU::ILr32), tmpReg ) + .addImm(Offset); + BuildMI(MBB, II, dl, TII.get(newOpcode), MI.getOperand(0).getReg()) + .addReg(tmpReg, RegState::Kill) + .addReg(SPU::R1); + // remove the replaced D-form instruction + MBB.erase(II); } else { MO.ChangeToImmediate(Offset); } @@ -422,6 +435,14 @@ MF.getRegInfo().setPhysRegUnused(SPU::R0); MF.getRegInfo().setPhysRegUnused(SPU::R1); MF.getRegInfo().setPhysRegUnused(SPU::R2); + + MachineFrameInfo *MFI = MF.getFrameInfo(); + const TargetRegisterClass *RC = &SPU::R32CRegClass; + RS->setScavengingFrameIndex(MFI->CreateStackObject(RC->getSize(), + RC->getAlignment(), + false)); + + } void SPURegisterInfo::emitPrologue(MachineFunction &MF) const @@ -466,7 +487,7 @@ // Adjust $sp by required amout BuildMI(MBB, MBBI, dl, TII.get(SPU::AIr32), SPU::R1).addReg(SPU::R1) .addImm(FrameSize); - } else if (FrameSize <= (1 << 16) - 1 && FrameSize >= -(1 << 16)) { + } else if (isS16Constant(FrameSize)) { // Frame size can be loaded into ILr32n, so temporarily spill $r2 and use // $r2 to adjust $sp: BuildMI(MBB, MBBI, dl, TII.get(SPU::STQDr128), SPU::R2) @@ -474,7 +495,7 @@ .addReg(SPU::R1); BuildMI(MBB, MBBI, dl, TII.get(SPU::ILr32), SPU::R2) .addImm(FrameSize); - BuildMI(MBB, MBBI, dl, TII.get(SPU::STQDr32), SPU::R1) + BuildMI(MBB, MBBI, dl, TII.get(SPU::STQXr32), SPU::R1) .addReg(SPU::R2) .addReg(SPU::R1); BuildMI(MBB, MBBI, dl, TII.get(SPU::Ar32), SPU::R1) @@ -573,7 +594,7 @@ .addReg(SPU::R2); BuildMI(MBB, MBBI, dl, TII.get(SPU::LQDr128), SPU::R0) .addImm(16) - .addReg(SPU::R2); + .addReg(SPU::R1); BuildMI(MBB, MBBI, dl, TII.get(SPU::SFIr32), SPU::R2). addReg(SPU::R2) .addImm(16); @@ -617,4 +638,42 @@ return SPUGenRegisterInfo::getDwarfRegNumFull(RegNum, 0); } +int +SPURegisterInfo::convertDFormToXForm(int dFormOpcode) const +{ + switch(dFormOpcode) + { + case SPU::AIr32: return SPU::Ar32; + case SPU::LQDr32: return SPU::LQXr32; + case SPU::LQDr128: return SPU::LQXr128; + case SPU::LQDv16i8: return SPU::LQXv16i8; + case SPU::LQDv4f32: return SPU::LQXv4f32; + case SPU::STQDr32: return SPU::STQXr32; + case SPU::STQDr128: return SPU::STQXr128; + case SPU::STQDv4i32: return SPU::STQXv4i32; + case SPU::STQDv4f32: return SPU::STQXv4f32; + + default: assert( false && "Unhandled D to X-form conversion"); + } + // default will assert, but need to return something to keep the + // compiler happy. + return dFormOpcode; +} + +// TODO this is already copied from PPC. Could this convenience function +// be moved to the RegScavenger class? +unsigned +SPURegisterInfo::findScratchRegister(MachineBasicBlock::iterator II, + RegScavenger *RS, + const TargetRegisterClass *RC, + int SPAdj) const +{ + assert(RS && "Register scavenging must be on"); + unsigned Reg = RS->FindUnusedReg(RC); + if (Reg == 0) + Reg = RS->scavengeRegister(RC, II, SPAdj); + assert( Reg && "Register scavenger failed"); + return Reg; +} + #include "SPUGenRegisterInfo.inc" Modified: llvm/trunk/lib/Target/CellSPU/SPURegisterInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPURegisterInfo.h?rev=97091&r1=97090&r2=97091&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/SPURegisterInfo.h (original) +++ llvm/trunk/lib/Target/CellSPU/SPURegisterInfo.h Wed Feb 24 19:53:17 2010 @@ -53,6 +53,10 @@ virtual const TargetRegisterClass* const * getCalleeSavedRegClasses(const MachineFunction *MF) const; + //! Allow for scavenging, so we can get scratch registers when needed. + virtual bool requiresRegisterScavenging(const MachineFunction &MF) const + { return true; } + //! Return the reserved registers BitVector getReservedRegs(const MachineFunction &MF) const; @@ -97,6 +101,21 @@ //! Get DWARF debugging register number int getDwarfRegNum(unsigned RegNum, bool isEH) const; + + //! Convert D-form load/store to X-form load/store + /*! + Converts a regiser displacement load/store into a register-indexed + load/store for large stack frames, when the stack frame exceeds the + range of a s10 displacement. + */ + int convertDFormToXForm(int dFormOpcode) const; + + //! Acquire an unused register in an emergency. + unsigned findScratchRegister(MachineBasicBlock::iterator II, + RegScavenger *RS, + const TargetRegisterClass *RC, + int SPAdj) const; + }; } // end namespace llvm From scottm at aero.org Wed Feb 24 20:32:54 2010 From: scottm at aero.org (Scott Michel) Date: Thu, 25 Feb 2010 02:32:54 -0000 Subject: [llvm-commits] [llvm] r97099 - in /llvm/trunk/lib/Target/CellSPU: SPU.h SPURegisterInfo.cpp SPURegisterInfo.h Message-ID: <20100225023254.B9DC42A6C136@llvm.org> Author: pingbak Date: Wed Feb 24 20:32:54 2010 New Revision: 97099 URL: http://llvm.org/viewvc/llvm-project?rev=97099&view=rev Log: Revert this patch for the time being. Needs more testing. Modified: llvm/trunk/lib/Target/CellSPU/SPU.h llvm/trunk/lib/Target/CellSPU/SPURegisterInfo.cpp llvm/trunk/lib/Target/CellSPU/SPURegisterInfo.h Modified: llvm/trunk/lib/Target/CellSPU/SPU.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPU.h?rev=97099&r1=97098&r2=97099&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/SPU.h (original) +++ llvm/trunk/lib/Target/CellSPU/SPU.h Wed Feb 24 20:32:54 2010 @@ -66,6 +66,9 @@ //! Predicate test for an unsigned 10-bit value /*! \param Value The input value to be tested + + This predicate tests for an unsigned 10-bit value, returning the 10-bit value + as a short if true. */ inline bool isU10Constant(short Value) { return (Value == (Value & 0x3ff)); @@ -87,70 +90,6 @@ return (Value == (Value & 0x3ff)); } - //! Predicate test for a signed 14-bit value - /*! - \param Value The input value to be tested - */ - template - inline bool isS14Constant(T Value); - - template<> - inline bool isS14Constant(short Value) { - return (Value >= -(1 << 13) && Value <= (1 << 13) - 1); - } - - template<> - inline bool isS14Constant(int Value) { - return (Value >= -(1 << 13) && Value <= (1 << 13) - 1); - } - - template<> - inline bool isS14Constant(uint32_t Value) { - return (Value <= ((1 << 13) - 1)); - } - - template<> - inline bool isS14Constant(int64_t Value) { - return (Value >= -(1 << 13) && Value <= (1 << 13) - 1); - } - - template<> - inline bool isS14Constant(uint64_t Value) { - return (Value <= ((1 << 13) - 1)); - } - - //! Predicate test for a signed 16-bit value - /*! - \param Value The input value to be tested - */ - template - inline bool isS16Constant(T Value); - - template<> - inline bool isS16Constant(short Value) { - return true; - } - - template<> - inline bool isS16Constant(int Value) { - return (Value >= -(1 << 15) && Value <= (1 << 15) - 1); - } - - template<> - inline bool isS16Constant(uint32_t Value) { - return (Value <= ((1 << 15) - 1)); - } - - template<> - inline bool isS16Constant(int64_t Value) { - return (Value >= -(1 << 15) && Value <= (1 << 15) - 1); - } - - template<> - inline bool isS16Constant(uint64_t Value) { - return (Value <= ((1 << 15) - 1)); - } - extern Target TheCellSPUTarget; } Modified: llvm/trunk/lib/Target/CellSPU/SPURegisterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPURegisterInfo.cpp?rev=97099&r1=97098&r2=97099&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/SPURegisterInfo.cpp (original) +++ llvm/trunk/lib/Target/CellSPU/SPURegisterInfo.cpp Wed Feb 24 20:32:54 2010 @@ -28,7 +28,6 @@ #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/MachineLocation.h" #include "llvm/CodeGen/MachineRegisterInfo.h" -#include "llvm/CodeGen/RegisterScavenging.h" #include "llvm/CodeGen/ValueTypes.h" #include "llvm/Target/TargetFrameInfo.h" #include "llvm/Target/TargetInstrInfo.h" @@ -336,7 +335,6 @@ MachineBasicBlock &MBB = *MI.getParent(); MachineFunction &MF = *MBB.getParent(); MachineFrameInfo *MFI = MF.getFrameInfo(); - DebugLoc dl = II->getDebugLoc(); while (!MI.getOperand(i).isFI()) { ++i; @@ -365,22 +363,11 @@ // Replace the FrameIndex with base register with $sp (aka $r1) SPOp.ChangeToRegister(SPU::R1, false); - - // if 'Offset' doesn't fit to the D-form instruction's - // immediate, convert the instruction to X-form - // if the instruction is not an AI (which takes a s10 immediate), assume - // it is a load/store that can take a s14 immediate - if ( (MI.getOpcode() == SPU::AIr32 && !isS10Constant(Offset)) - || !isS14Constant(Offset) ) { - int newOpcode = convertDFormToXForm(MI.getOpcode()); - unsigned tmpReg = findScratchRegister(II, RS, &SPU::R32CRegClass, SPAdj); - BuildMI(MBB, II, dl, TII.get(SPU::ILr32), tmpReg ) - .addImm(Offset); - BuildMI(MBB, II, dl, TII.get(newOpcode), MI.getOperand(0).getReg()) - .addReg(tmpReg, RegState::Kill) - .addReg(SPU::R1); - // remove the replaced D-form instruction - MBB.erase(II); + if (Offset > SPUFrameInfo::maxFrameOffset() + || Offset < SPUFrameInfo::minFrameOffset()) { + errs() << "Large stack adjustment (" + << Offset + << ") in SPURegisterInfo::eliminateFrameIndex."; } else { MO.ChangeToImmediate(Offset); } @@ -435,14 +422,6 @@ MF.getRegInfo().setPhysRegUnused(SPU::R0); MF.getRegInfo().setPhysRegUnused(SPU::R1); MF.getRegInfo().setPhysRegUnused(SPU::R2); - - MachineFrameInfo *MFI = MF.getFrameInfo(); - const TargetRegisterClass *RC = &SPU::R32CRegClass; - RS->setScavengingFrameIndex(MFI->CreateStackObject(RC->getSize(), - RC->getAlignment(), - false)); - - } void SPURegisterInfo::emitPrologue(MachineFunction &MF) const @@ -487,7 +466,7 @@ // Adjust $sp by required amout BuildMI(MBB, MBBI, dl, TII.get(SPU::AIr32), SPU::R1).addReg(SPU::R1) .addImm(FrameSize); - } else if (isS16Constant(FrameSize)) { + } else if (FrameSize <= (1 << 16) - 1 && FrameSize >= -(1 << 16)) { // Frame size can be loaded into ILr32n, so temporarily spill $r2 and use // $r2 to adjust $sp: BuildMI(MBB, MBBI, dl, TII.get(SPU::STQDr128), SPU::R2) @@ -495,7 +474,7 @@ .addReg(SPU::R1); BuildMI(MBB, MBBI, dl, TII.get(SPU::ILr32), SPU::R2) .addImm(FrameSize); - BuildMI(MBB, MBBI, dl, TII.get(SPU::STQXr32), SPU::R1) + BuildMI(MBB, MBBI, dl, TII.get(SPU::STQDr32), SPU::R1) .addReg(SPU::R2) .addReg(SPU::R1); BuildMI(MBB, MBBI, dl, TII.get(SPU::Ar32), SPU::R1) @@ -594,7 +573,7 @@ .addReg(SPU::R2); BuildMI(MBB, MBBI, dl, TII.get(SPU::LQDr128), SPU::R0) .addImm(16) - .addReg(SPU::R1); + .addReg(SPU::R2); BuildMI(MBB, MBBI, dl, TII.get(SPU::SFIr32), SPU::R2). addReg(SPU::R2) .addImm(16); @@ -638,42 +617,4 @@ return SPUGenRegisterInfo::getDwarfRegNumFull(RegNum, 0); } -int -SPURegisterInfo::convertDFormToXForm(int dFormOpcode) const -{ - switch(dFormOpcode) - { - case SPU::AIr32: return SPU::Ar32; - case SPU::LQDr32: return SPU::LQXr32; - case SPU::LQDr128: return SPU::LQXr128; - case SPU::LQDv16i8: return SPU::LQXv16i8; - case SPU::LQDv4f32: return SPU::LQXv4f32; - case SPU::STQDr32: return SPU::STQXr32; - case SPU::STQDr128: return SPU::STQXr128; - case SPU::STQDv4i32: return SPU::STQXv4i32; - case SPU::STQDv4f32: return SPU::STQXv4f32; - - default: assert( false && "Unhandled D to X-form conversion"); - } - // default will assert, but need to return something to keep the - // compiler happy. - return dFormOpcode; -} - -// TODO this is already copied from PPC. Could this convenience function -// be moved to the RegScavenger class? -unsigned -SPURegisterInfo::findScratchRegister(MachineBasicBlock::iterator II, - RegScavenger *RS, - const TargetRegisterClass *RC, - int SPAdj) const -{ - assert(RS && "Register scavenging must be on"); - unsigned Reg = RS->FindUnusedReg(RC); - if (Reg == 0) - Reg = RS->scavengeRegister(RC, II, SPAdj); - assert( Reg && "Register scavenger failed"); - return Reg; -} - #include "SPUGenRegisterInfo.inc" Modified: llvm/trunk/lib/Target/CellSPU/SPURegisterInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPURegisterInfo.h?rev=97099&r1=97098&r2=97099&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/SPURegisterInfo.h (original) +++ llvm/trunk/lib/Target/CellSPU/SPURegisterInfo.h Wed Feb 24 20:32:54 2010 @@ -53,10 +53,6 @@ virtual const TargetRegisterClass* const * getCalleeSavedRegClasses(const MachineFunction *MF) const; - //! Allow for scavenging, so we can get scratch registers when needed. - virtual bool requiresRegisterScavenging(const MachineFunction &MF) const - { return true; } - //! Return the reserved registers BitVector getReservedRegs(const MachineFunction &MF) const; @@ -101,21 +97,6 @@ //! Get DWARF debugging register number int getDwarfRegNum(unsigned RegNum, bool isEH) const; - - //! Convert D-form load/store to X-form load/store - /*! - Converts a regiser displacement load/store into a register-indexed - load/store for large stack frames, when the stack frame exceeds the - range of a s10 displacement. - */ - int convertDFormToXForm(int dFormOpcode) const; - - //! Acquire an unused register in an emergency. - unsigned findScratchRegister(MachineBasicBlock::iterator II, - RegScavenger *RS, - const TargetRegisterClass *RC, - int SPAdj) const; - }; } // end namespace llvm From jyasskin at google.com Thu Feb 25 00:34:33 2010 From: jyasskin at google.com (Jeffrey Yasskin) Date: Thu, 25 Feb 2010 06:34:33 -0000 Subject: [llvm-commits] [llvm] r97119 - in /llvm/trunk: Makefile Makefile.config.in Makefile.rules autoconf/configure.ac configure test/Makefile test/Unit/lit.cfg test/Unit/lit.site.cfg.in tools/llvm-shlib/ tools/llvm-shlib/Makefile unittests/Makefile.unittest Message-ID: <20100225063433.C5ECF2A6C136@llvm.org> Author: jyasskin Date: Thu Feb 25 00:34:33 2010 New Revision: 97119 URL: http://llvm.org/viewvc/llvm-project?rev=97119&view=rev Log: Try r96559 for the third time. This time the shared library is only built if --enable-shared is passed to configure. Added: llvm/trunk/tools/llvm-shlib/ llvm/trunk/tools/llvm-shlib/Makefile Modified: llvm/trunk/Makefile llvm/trunk/Makefile.config.in llvm/trunk/Makefile.rules llvm/trunk/autoconf/configure.ac llvm/trunk/configure llvm/trunk/test/Makefile llvm/trunk/test/Unit/lit.cfg llvm/trunk/test/Unit/lit.site.cfg.in llvm/trunk/unittests/Makefile.unittest Modified: llvm/trunk/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile?rev=97119&r1=97118&r2=97119&view=diff ============================================================================== --- llvm/trunk/Makefile (original) +++ llvm/trunk/Makefile Thu Feb 25 00:34:33 2010 @@ -30,8 +30,8 @@ DIRS := lib/System lib/Support utils OPTIONAL_DIRS := else - DIRS := lib/System lib/Support utils lib/VMCore lib tools/llvm-config \ - tools runtime docs unittests + DIRS := lib/System lib/Support utils lib/VMCore lib tools/llvm-shlib \ + tools/llvm-config tools runtime docs unittests OPTIONAL_DIRS := projects bindings endif @@ -43,6 +43,10 @@ include $(LEVEL)/Makefile.config +ifneq ($(ENABLE_SHARED),1) + DIRS := $(filter-out tools/llvm-shlib, $(DIRS)) +endif + ifeq ($(MAKECMDGOALS),libs-only) DIRS := $(filter-out tools runtime docs, $(DIRS)) OPTIONAL_DIRS := Modified: llvm/trunk/Makefile.config.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.config.in?rev=97119&r1=97118&r2=97119&view=diff ============================================================================== --- llvm/trunk/Makefile.config.in (original) +++ llvm/trunk/Makefile.config.in Thu Feb 25 00:34:33 2010 @@ -262,6 +262,9 @@ # Do we want to build with position independent code? ENABLE_PIC := @ENABLE_PIC@ +# Do we want to build a shared library and link the tools with it? +ENABLE_SHARED := @ENABLE_SHARED@ + # Use -fvisibility-inlines-hidden? ENABLE_VISIBILITY_INLINES_HIDDEN := @ENABLE_VISIBILITY_INLINES_HIDDEN@ @@ -272,6 +275,9 @@ # Enable JIT for this platform TARGET_HAS_JIT = @TARGET_HAS_JIT@ +# Environment variable to set to change the runtime shared library search path. +SHLIBPATH_VAR = @SHLIBPATH_VAR@ + # Shared library extension for host platform. SHLIBEXT = @SHLIBEXT@ Modified: llvm/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=97119&r1=97118&r2=97119&view=diff ============================================================================== --- llvm/trunk/Makefile.rules (original) +++ llvm/trunk/Makefile.rules Thu Feb 25 00:34:33 2010 @@ -623,11 +623,12 @@ ifneq ($(HOST_OS),Darwin) ifneq ($(DARWIN_MAJVERS),4) ifdef TOOLNAME -ifdef EXAMPLE_TOOL - LD.Flags += $(RPATH) -Wl,$(ExmplDir) $(RDYNAMIC) -else - LD.Flags += $(RPATH) -Wl,$(ToolDir) $(RDYNAMIC) -endif + LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib' + ifdef EXAMPLE_TOOL + LD.Flags += $(RPATH) -Wl,$(ExmplDir) $(RDYNAMIC) + else + LD.Flags += $(RPATH) -Wl,$(ToolDir) $(RDYNAMIC) + endif endif endif endif @@ -960,11 +961,16 @@ $(ToolDir)/$(strip $(TOOLNAME))$(EXEEXT): $(LLVM_CONFIG) +ifeq ($(ENABLE_SHARED), 1) +LLVMLibsOptions += -lLLVM-$(LLVMVersion) +LLVMLibsPaths += $(LibDir)/libLLVM-$(LLVMVersion)$(SHLIBEXT) +else LLVMLibsOptions += $(shell $(LLVM_CONFIG) --libs $(LINK_COMPONENTS)) LLVMLibsPaths += $(LLVM_CONFIG) \ $(shell $(LLVM_CONFIG) --libfiles $(LINK_COMPONENTS)) endif endif +endif ############################################################################### # Library Build Rules: Four ways to build a library @@ -1169,11 +1175,13 @@ # If neither BUILD_ARCHIVE or LOADABLE_MODULE are specified, default to # building an archive. #--------------------------------------------------------- +ifndef NO_BUILD_ARCHIVE ifndef BUILD_ARCHIVE ifndef LOADABLE_MODULE BUILD_ARCHIVE = 1 endif endif +endif #--------------------------------------------------------- # Archive Library Targets: Modified: llvm/trunk/autoconf/configure.ac URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=97119&r1=97118&r2=97119&view=diff ============================================================================== --- llvm/trunk/autoconf/configure.ac (original) +++ llvm/trunk/autoconf/configure.ac Thu Feb 25 00:34:33 2010 @@ -472,6 +472,18 @@ AC_DEFINE_UNQUOTED([ENABLE_PIC],$ENABLE_PIC, [Define if position independent code is enabled]) +dnl Allow building a shared library and linking tools against it. +AC_ARG_ENABLE(shared, + AS_HELP_STRING([--enable-shared], + [Build a shared library and link tools against it (default is NO)]),, + enableval=default) +case "$enableval" in + yes) AC_SUBST(ENABLE_SHARED,[1]) ;; + no) AC_SUBST(ENABLE_SHARED,[0]) ;; + default) AC_SUBST(ENABLE_SHARED,[0]) ;; + *) AC_MSG_ERROR([Invalid setting for --enable-shared. Use "yes" or "no"]) ;; +esac + dnl Allow specific targets to be specified for building (or not) TARGETS_TO_BUILD="" AC_ARG_ENABLE([targets],AS_HELP_STRING([--enable-targets], @@ -1336,6 +1348,10 @@ dnl the Makefiles so we can use it there too AC_SUBST(SHLIBEXT,$libltdl_cv_shlibext) +dnl Propagate the run-time library path variable that the libltdl +dnl checks found to the Makefiles so we can use it there too +AC_SUBST(SHLIBPATH_VAR,$libltdl_cv_shlibpath_var) + # Translate the various configuration directories and other basic # information into substitutions that will end up in Makefile.config.in # that these configured values can be used by the makefiles Modified: llvm/trunk/configure URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=97119&r1=97118&r2=97119&view=diff ============================================================================== --- llvm/trunk/configure (original) +++ llvm/trunk/configure Thu Feb 25 00:34:33 2010 @@ -689,6 +689,7 @@ ENABLE_DOXYGEN ENABLE_THREADS ENABLE_PIC +ENABLE_SHARED TARGETS_TO_BUILD LLVM_ENUM_TARGETS LLVM_ENUM_ASM_PRINTERS @@ -770,6 +771,7 @@ LLVMGCCDIR LLVMGCC_LANGS SHLIBEXT +SHLIBPATH_VAR LLVM_PREFIX LLVM_BINDIR LLVM_LIBDIR @@ -1402,6 +1404,8 @@ --enable-threads Use threads if available (default is YES) --enable-pic Build LLVM with Position Independent Code (default is YES) + --enable-shared Build a shared library and link tools against it + (default is NO) --enable-targets Build specific host targets: all or target1,target2,... Valid targets are: host, x86, x86_64, sparc, powerpc, alpha, arm, mips, spu, @@ -2327,7 +2331,7 @@ msp430-*) llvm_cv_target_arch="MSP430" ;; s390x-*) llvm_cv_target_arch="SystemZ" ;; bfin-*) llvm_cv_target_arch="Blackfin" ;; - microblaze-*) llvm_cv_target_arch="MBlaze" ;; + mblaze-*) llvm_cv_target_arch="MBlaze" ;; *) llvm_cv_target_arch="Unknown" ;; esac fi @@ -4867,6 +4871,25 @@ _ACEOF +# Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then + enableval=$enable_shared; +else + enableval=default +fi + +case "$enableval" in + yes) ENABLE_SHARED=1 + ;; + no) ENABLE_SHARED=0 + ;; + default) ENABLE_SHARED=0 + ;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-shared. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --enable-shared. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; } ;; +esac + TARGETS_TO_BUILD="" # Check whether --enable-targets was given. if test "${enable_targets+set}" = set; then @@ -11110,7 +11133,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <conf$$subs.sed <<_ACEOF +OPTIMIZE_OPTION!$OPTIMIZE_OPTION$ac_delim EXTRA_OPTIONS!$EXTRA_OPTIONS$ac_delim BINUTILS_INCDIR!$BINUTILS_INCDIR$ac_delim ENABLE_LLVMC_DYNAMIC!$ENABLE_LLVMC_DYNAMIC$ac_delim @@ -20870,6 +20897,7 @@ LLVMGCCDIR!$LLVMGCCDIR$ac_delim LLVMGCC_LANGS!$LLVMGCC_LANGS$ac_delim SHLIBEXT!$SHLIBEXT$ac_delim +SHLIBPATH_VAR!$SHLIBPATH_VAR$ac_delim LLVM_PREFIX!$LLVM_PREFIX$ac_delim LLVM_BINDIR!$LLVM_BINDIR$ac_delim LLVM_LIBDIR!$LLVM_LIBDIR$ac_delim @@ -20890,7 +20918,7 @@ LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 89; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 91; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 Modified: llvm/trunk/test/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Makefile?rev=97119&r1=97118&r2=97119&view=diff ============================================================================== --- llvm/trunk/test/Makefile (original) +++ llvm/trunk/test/Makefile Thu Feb 25 00:34:33 2010 @@ -198,4 +198,6 @@ -e "s#@LLVM_TOOLS_DIR@#$(ToolDir)#g" \ -e "s#@LLVMGCCDIR@#$(LLVMGCCDIR)#g" \ -e "s#@LLVM_BUILD_MODE@#$(BuildMode)#g" \ + -e "s#@ENABLE_SHARED@#$(ENABLE_SHARED)#g" \ + -e "s#@SHLIBPATH_VAR@#$(SHLIBPATH_VAR)#g" \ $(PROJ_SRC_DIR)/Unit/lit.site.cfg.in > $@ Modified: llvm/trunk/test/Unit/lit.cfg URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Unit/lit.cfg?rev=97119&r1=97118&r2=97119&view=diff ============================================================================== --- llvm/trunk/test/Unit/lit.cfg (original) +++ llvm/trunk/test/Unit/lit.cfg Thu Feb 25 00:34:33 2010 @@ -23,7 +23,14 @@ ### -import os +# If necessary, point the dynamic loader at libLLVM.so. +if config.enable_shared: + libdir = os.path.join(config.llvm_obj_root, config.llvm_build_mode, 'lib') + shlibpath = config.environment.get(config.shlibpath_var,'') + if shlibpath: + shlibpath = ':' + shlibpath + shlibpath = libdir + shlibpath + config.environment[config.shlibpath_var] = shlibpath # Check that the object root is known. if config.test_exec_root is None: Modified: llvm/trunk/test/Unit/lit.site.cfg.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Unit/lit.site.cfg.in?rev=97119&r1=97118&r2=97119&view=diff ============================================================================== --- llvm/trunk/test/Unit/lit.site.cfg.in (original) +++ llvm/trunk/test/Unit/lit.site.cfg.in Thu Feb 25 00:34:33 2010 @@ -5,6 +5,8 @@ config.llvm_tools_dir = "@LLVM_TOOLS_DIR@" config.llvmgcc_dir = "@LLVMGCCDIR@" config.llvm_build_mode = "@LLVM_BUILD_MODE@" +config.enable_shared = @ENABLE_SHARED@ +config.shlibpath_var = "@SHLIBPATH_VAR@" # Let the main config do the real work. lit.load_config(config, "@LLVM_SOURCE_DIR@/test/Unit/lit.cfg") Added: llvm/trunk/tools/llvm-shlib/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-shlib/Makefile?rev=97119&view=auto ============================================================================== --- llvm/trunk/tools/llvm-shlib/Makefile (added) +++ llvm/trunk/tools/llvm-shlib/Makefile Thu Feb 25 00:34:33 2010 @@ -0,0 +1,60 @@ +##===- tools/shlib/Makefile --------------------------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## + +LEVEL = ../.. + +LIBRARYNAME = LLVM-$(LLVMVersion) + +NO_BUILD_ARCHIVE = 1 +LINK_LIBS_IN_SHARED = 1 +SHARED_LIBRARY = 1 + +include $(LEVEL)/Makefile.common + +# Include all archives in libLLVM.(so|dylib) except the ones that have +# their own dynamic libraries. +Archives := $(wildcard $(LibDir)/libLLVM*.a) +SharedLibraries := $(wildcard $(LibDir)/libLLVM*$(SHLIBEXT)) +IncludeInLibLlvm := $(filter-out $(basename $(SharedLibraries)).a, $(Archives)) +LLVMLibsOptions := $(IncludeInLibLlvm:$(LibDir)/lib%.a=-l%) +LLVMLibsPaths := $(IncludeInLibLlvm) + +$(LibName.SO): $(LLVMLibsPaths) + +ifeq ($(HOST_OS),Darwin) + # set dylib internal version number to llvmCore submission number + ifdef LLVM_SUBMIT_VERSION + LLVMLibsOptions := $(LLVMLibsOptions) -Wl,-current_version \ + -Wl,$(LLVM_SUBMIT_VERSION).$(LLVM_SUBMIT_SUBVERSION) \ + -Wl,-compatibility_version -Wl,1 + endif + # Include everything from the .a's into the shared library. + LLVMLibsOptions := $(LLVMLibsOptions) -all_load + # extra options to override libtool defaults + LLVMLibsOptions := $(LLVMLibsOptions) \ + -avoid-version \ + -Wl,-dead_strip \ + -Wl,-seg1addr -Wl,0xE0000000 + + # Mac OS X 10.4 and earlier tools do not allow a second -install_name on command line + DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/') + ifneq ($(DARWIN_VERS),8) + LLVMLibsOptions := $(LLVMLibsOptions) \ + -Wl,-install_name \ + -Wl,"@executable_path/../lib/lib$(LIBRARYNAME)$(SHLIBEXT)" + endif +endif + +ifeq ($(HOST_OS), Linux) + # Include everything from the .a's into the shared library. + LLVMLibsOptions := -Wl,--whole-archive $(LLVMLibsOptions) \ + -Wl,--no-whole-archive + # Don't allow unresolved symbols. + LLVMLibsOptions += -Wl,--no-undefined +endif Modified: llvm/trunk/unittests/Makefile.unittest URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Makefile.unittest?rev=97119&r1=97118&r2=97119&view=diff ============================================================================== --- llvm/trunk/unittests/Makefile.unittest (original) +++ llvm/trunk/unittests/Makefile.unittest Thu Feb 25 00:34:33 2010 @@ -28,6 +28,15 @@ CPP.Flags += $(NO_VARIADIC_MACROS) TESTLIBS = -lGoogleTest -lUnitTestMain +ifeq ($(ENABLE_SHARED), 1) + # Add the absolute path to the dynamic library. This is ok because + # we'll never install unittests. + LD.Flags += $(RPATH) -Wl,$(LibDir) + # Also set {DYLD,LD}_LIBRARY_PATH because OSX ignores the rpath most + # of the time. + Run.Shared := $(SHLIBPATH_VAR)="$(LibDir)$${$(SHLIBPATH_VAR):+:}$$$(SHLIBPATH_VAR)" +endif + $(LLVMUnitTestExe): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths) $(Echo) Linking $(BuildMode) unit test $(TESTNAME) $(StripWarnMsg) $(Verb) $(Link) -o $@ $(TOOLLINKOPTS) $(ObjectsO) $(ProjLibsOptions) \ @@ -38,6 +47,6 @@ all:: $(LLVMUnitTestExe) unitcheck:: $(LLVMUnitTestExe) - $(LLVMUnitTestExe) + $(Run.Shared) $(LLVMUnitTestExe) endif From nicholas at mxc.ca Thu Feb 25 00:38:51 2010 From: nicholas at mxc.ca (Nick Lewycky) Date: Thu, 25 Feb 2010 06:38:51 -0000 Subject: [llvm-commits] [llvm] r97120 - /llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp Message-ID: <20100225063851.4EA6D2A6C136@llvm.org> Author: nicholas Date: Thu Feb 25 00:38:51 2010 New Revision: 97120 URL: http://llvm.org/viewvc/llvm-project?rev=97120&view=rev Log: Correct whitespace. Modified: llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp Modified: llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp?rev=97120&r1=97119&r2=97120&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp (original) +++ llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp Thu Feb 25 00:38:51 2010 @@ -317,7 +317,7 @@ GEPIndicesSet ToPromote; // If the pointer is always valid, any load with first index 0 is valid. - if(isByVal || AllCalleesPassInValidPointerForArgument(Arg)) + if (isByVal || AllCalleesPassInValidPointerForArgument(Arg)) SafeToUnconditionallyLoad.insert(IndicesVector(1, 0)); // First, iterate the entry block and mark loads of (geps of) arguments as From nicholas at mxc.ca Thu Feb 25 00:39:10 2010 From: nicholas at mxc.ca (Nick Lewycky) Date: Thu, 25 Feb 2010 06:39:10 -0000 Subject: [llvm-commits] [llvm] r97121 - /llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp Message-ID: <20100225063910.A7E722A6C136@llvm.org> Author: nicholas Date: Thu Feb 25 00:39:10 2010 New Revision: 97121 URL: http://llvm.org/viewvc/llvm-project?rev=97121&view=rev Log: Modernize comment. Modified: llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp Modified: llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp?rev=97121&r1=97120&r2=97121&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp (original) +++ llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp Thu Feb 25 00:39:10 2010 @@ -642,7 +642,7 @@ return false; } else if (isa(*UI) && isa(UI->getOperand(1))) { - // Ignore setcc X, null + // Ignore icmp X, null } else { //cerr << "NONTRAPPING USE: " << **UI; return false; From sabre at nondot.org Thu Feb 25 00:49:58 2010 From: sabre at nondot.org (Chris Lattner) Date: Thu, 25 Feb 2010 06:49:58 -0000 Subject: [llvm-commits] [llvm] r97123 - in /llvm/trunk/utils/TableGen: DAGISelMatcher.cpp DAGISelMatcher.h Message-ID: <20100225064958.5A9A42A6C136@llvm.org> Author: lattner Date: Thu Feb 25 00:49:58 2010 New Revision: 97123 URL: http://llvm.org/viewvc/llvm-project?rev=97123&view=rev Log: add methods to do equality checks and get hashes of Matchers Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.cpp llvm/trunk/utils/TableGen/DAGISelMatcher.h Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.cpp?rev=97123&r1=97122&r2=97123&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcher.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcher.cpp Thu Feb 25 00:49:58 2010 @@ -12,6 +12,7 @@ #include "CodeGenTarget.h" #include "Record.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/ADT/StringExtras.h" using namespace llvm; void Matcher::dump() const { @@ -23,7 +24,6 @@ return Next->print(OS, indent); } - void ScopeMatcher::print(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "Scope\n"; Check->print(OS, indent+2); @@ -209,3 +209,69 @@ printNext(OS, indent); } +// getHashImpl Implementation. + +unsigned CheckPatternPredicateMatcher::getHashImpl() const { + return HashString(Predicate); +} + +unsigned CheckPredicateMatcher::getHashImpl() const { + return HashString(PredName); +} + +unsigned CheckOpcodeMatcher::getHashImpl() const { + return HashString(OpcodeName); +} + +unsigned CheckMultiOpcodeMatcher::getHashImpl() const { + unsigned Result = 0; + for (unsigned i = 0, e = OpcodeNames.size(); i != e; ++i) + Result |= HashString(OpcodeNames[i]); + return Result; +} + +unsigned CheckCondCodeMatcher::getHashImpl() const { + return HashString(CondCodeName); +} + +unsigned CheckValueTypeMatcher::getHashImpl() const { + return HashString(TypeName); +} + +unsigned EmitStringIntegerMatcher::getHashImpl() const { + return HashString(Val) ^ VT; +} + +template +static unsigned HashUnsigneds(It I, It E) { + unsigned Result = 0; + for (; I != E; ++I) + Result = (Result<<3) ^ *I; + return Result; +} + +unsigned EmitMergeInputChainsMatcher::getHashImpl() const { + return HashUnsigneds(ChainNodes.begin(), ChainNodes.end()); +} + +bool EmitNodeMatcher::isEqualImpl(const Matcher *m) const { + const EmitNodeMatcher *M = cast(m); + return M->OpcodeName == OpcodeName && M->VTs == VTs && + M->Operands == Operands && M->HasChain == HasChain && + M->HasFlag == HasFlag && M->HasMemRefs == HasMemRefs && + M->NumFixedArityOperands == NumFixedArityOperands; +} + +unsigned EmitNodeMatcher::getHashImpl() const { + return (HashString(OpcodeName) << 4) | Operands.size(); +} + + +unsigned MarkFlagResultsMatcher::getHashImpl() const { + return HashUnsigneds(FlagResultNodes.begin(), FlagResultNodes.end()); +} + +unsigned CompleteMatchMatcher::getHashImpl() const { + return HashUnsigneds(Results.begin(), Results.end()) ^ + ((unsigned)(intptr_t)&Pattern << 8); +} Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.h?rev=97123&r1=97122&r2=97123&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcher.h (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcher.h Thu Feb 25 00:49:58 2010 @@ -94,10 +94,21 @@ static inline bool classof(const Matcher *) { return true; } + bool isEqual(const Matcher *M) const { + if (getKind() != M->getKind()) return false; + return isEqualImpl(M); + } + + unsigned getHash() const { + return (getHashImpl() << 4) ^ getKind(); + } + virtual void print(raw_ostream &OS, unsigned indent = 0) const = 0; void dump() const; protected: void printNext(raw_ostream &OS, unsigned indent) const; + virtual bool isEqualImpl(const Matcher *M) const = 0; + virtual unsigned getHashImpl() const = 0; }; /// ScopeMatcher - This pushes a failure scope on the stack and evaluates @@ -120,7 +131,10 @@ return N->getKind() == Scope; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const { return false; } + virtual unsigned getHashImpl() const { return 0; } }; /// RecordMatcher - Save the current node in the operand list. @@ -138,7 +152,10 @@ return N->getKind() == RecordNode; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const { return true; } + virtual unsigned getHashImpl() const { return 0; } }; /// RecordChildMatcher - Save a numbered child of the current node, or fail @@ -161,7 +178,12 @@ return N->getKind() == RecordChild; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const { + return cast(M)->getChildNo() == getChildNo(); + } + virtual unsigned getHashImpl() const { return getChildNo(); } }; /// RecordMemRefMatcher - Save the current node's memref. @@ -173,7 +195,10 @@ return N->getKind() == RecordMemRef; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const { return true; } + virtual unsigned getHashImpl() const { return 0; } }; @@ -187,7 +212,10 @@ return N->getKind() == CaptureFlagInput; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const { return true; } + virtual unsigned getHashImpl() const { return 0; } }; /// MoveChildMatcher - This tells the interpreter to move into the @@ -203,7 +231,12 @@ return N->getKind() == MoveChild; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const { + return cast(M)->getChildNo() == getChildNo(); + } + virtual unsigned getHashImpl() const { return getChildNo(); } }; /// MoveParentMatcher - This tells the interpreter to move to the parent @@ -216,7 +249,10 @@ return N->getKind() == MoveParent; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const { return true; } + virtual unsigned getHashImpl() const { return 0; } }; /// CheckSameMatcher - This checks to see if this node is exactly the same @@ -226,7 +262,7 @@ unsigned MatchNumber; public: CheckSameMatcher(unsigned matchnumber) - : Matcher(CheckSame), MatchNumber(matchnumber) {} + : Matcher(CheckSame), MatchNumber(matchnumber) {} unsigned getMatchNumber() const { return MatchNumber; } @@ -234,7 +270,12 @@ return N->getKind() == CheckSame; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const { + return cast(M)->getMatchNumber() == getMatchNumber(); + } + virtual unsigned getHashImpl() const { return getMatchNumber(); } }; /// CheckPatternPredicateMatcher - This checks the target-specific predicate @@ -244,7 +285,7 @@ std::string Predicate; public: CheckPatternPredicateMatcher(StringRef predicate) - : Matcher(CheckPatternPredicate), Predicate(predicate) {} + : Matcher(CheckPatternPredicate), Predicate(predicate) {} StringRef getPredicate() const { return Predicate; } @@ -252,7 +293,12 @@ return N->getKind() == CheckPatternPredicate; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const { + return cast(M)->getPredicate() == Predicate; + } + virtual unsigned getHashImpl() const; }; /// CheckPredicateMatcher - This checks the target-specific predicate to @@ -269,7 +315,12 @@ return N->getKind() == CheckPredicate; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const { + return cast(M)->PredName == PredName; + } + virtual unsigned getHashImpl() const; }; @@ -287,7 +338,12 @@ return N->getKind() == CheckOpcode; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const { + return cast(M)->OpcodeName == OpcodeName; + } + virtual unsigned getHashImpl() const; }; /// CheckMultiOpcodeMatcher - This checks to see if the current node has one @@ -305,7 +361,12 @@ return N->getKind() == CheckMultiOpcode; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const { + return cast(M)->OpcodeNames == OpcodeNames; + } + virtual unsigned getHashImpl() const; }; @@ -324,7 +385,12 @@ return N->getKind() == CheckType; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const { + return cast(this)->Type == Type; + } + virtual unsigned getHashImpl() const { return Type; } }; /// CheckChildTypeMatcher - This checks to see if a child node has the @@ -343,7 +409,13 @@ return N->getKind() == CheckChildType; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const { + return cast(M)->ChildNo == ChildNo && + cast(M)->Type == Type; + } + virtual unsigned getHashImpl() const { return (Type << 3) | ChildNo; } }; @@ -361,7 +433,12 @@ return N->getKind() == CheckInteger; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const { + return cast(M)->Value == Value; + } + virtual unsigned getHashImpl() const { return Value; } }; /// CheckCondCodeMatcher - This checks to see if the current node is a @@ -378,7 +455,12 @@ return N->getKind() == CheckCondCode; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const { + return cast(M)->CondCodeName == CondCodeName; + } + virtual unsigned getHashImpl() const; }; /// CheckValueTypeMatcher - This checks to see if the current node is a @@ -395,7 +477,12 @@ return N->getKind() == CheckValueType; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const { + return cast(M)->TypeName == TypeName; + } + virtual unsigned getHashImpl() const; }; @@ -414,7 +501,14 @@ return N->getKind() == CheckComplexPat; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const { + return &cast(M)->Pattern == &Pattern; + } + virtual unsigned getHashImpl() const { + return (unsigned)(intptr_t)&Pattern; + } }; /// CheckAndImmMatcher - This checks to see if the current node is an 'and' @@ -431,7 +525,12 @@ return N->getKind() == CheckAndImm; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const { + return cast(M)->Value == Value; + } + virtual unsigned getHashImpl() const { return Value; } }; /// CheckOrImmMatcher - This checks to see if the current node is an 'and' @@ -448,7 +547,12 @@ return N->getKind() == CheckOrImm; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const { + return cast(M)->Value == Value; + } + virtual unsigned getHashImpl() const { return Value; } }; /// CheckFoldableChainNodeMatcher - This checks to see if the current node @@ -462,7 +566,10 @@ return N->getKind() == CheckFoldableChainNode; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const { return true; } + virtual unsigned getHashImpl() const { return 0; } }; /// CheckChainCompatibleMatcher - Verify that the current node's chain @@ -479,7 +586,12 @@ return N->getKind() == CheckChainCompatible; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const { + return cast(this)->PreviousOp == PreviousOp; + } + virtual unsigned getHashImpl() const { return PreviousOp; } }; /// EmitIntegerMatcher - This creates a new TargetConstant. @@ -497,7 +609,13 @@ return N->getKind() == EmitInteger; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const { + return cast(M)->Val == Val && + cast(M)->VT == VT; + } + virtual unsigned getHashImpl() const { return (Val << 4) | VT; } }; /// EmitStringIntegerMatcher - A target constant whose value is represented @@ -516,7 +634,13 @@ return N->getKind() == EmitStringInteger; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const { + return cast(M)->Val == Val && + cast(M)->VT == VT; + } + virtual unsigned getHashImpl() const; }; /// EmitRegisterMatcher - This creates a new TargetConstant. @@ -536,7 +660,15 @@ return N->getKind() == EmitRegister; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const { + return cast(M)->Reg == Reg && + cast(M)->VT == VT; + } + virtual unsigned getHashImpl() const { + return ((unsigned)(intptr_t)Reg) << 4 | VT; + } }; /// EmitConvertToTargetMatcher - Emit an operation that reads a specified @@ -554,7 +686,12 @@ return N->getKind() == EmitConvertToTarget; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const { + return cast(M)->Slot == Slot; + } + virtual unsigned getHashImpl() const { return Slot; } }; /// EmitMergeInputChainsMatcher - Emit a node that merges a list of input @@ -578,7 +715,12 @@ return N->getKind() == EmitMergeInputChains; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const { + return cast(M)->ChainNodes == ChainNodes; + } + virtual unsigned getHashImpl() const; }; /// EmitCopyToRegMatcher - Emit a CopyToReg node from a value to a physreg, @@ -598,7 +740,15 @@ return N->getKind() == EmitCopyToReg; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const { + return cast(M)->SrcSlot == SrcSlot && + cast(M)->DestPhysReg == DestPhysReg; + } + virtual unsigned getHashImpl() const { + return SrcSlot ^ ((unsigned)(intptr_t)DestPhysReg << 4); + } }; @@ -619,7 +769,15 @@ return N->getKind() == EmitNodeXForm; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const { + return cast(M)->Slot == Slot && + cast(M)->NodeXForm == NodeXForm; + } + virtual unsigned getHashImpl() const { + return Slot ^ ((unsigned)(intptr_t)NodeXForm << 4); + } }; /// EmitNodeMatcher - This signals a successful match and generates a node. @@ -635,10 +793,10 @@ int NumFixedArityOperands; public: EmitNodeMatcher(const std::string &opcodeName, - const MVT::SimpleValueType *vts, unsigned numvts, - const unsigned *operands, unsigned numops, - bool hasChain, bool hasFlag, bool hasmemrefs, - int numfixedarityoperands) + const MVT::SimpleValueType *vts, unsigned numvts, + const unsigned *operands, unsigned numops, + bool hasChain, bool hasFlag, bool hasmemrefs, + int numfixedarityoperands) : Matcher(EmitNode), OpcodeName(opcodeName), VTs(vts, vts+numvts), Operands(operands, operands+numops), HasChain(hasChain), HasFlag(hasFlag), HasMemRefs(hasmemrefs), @@ -667,7 +825,10 @@ return N->getKind() == EmitNode; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const; + virtual unsigned getHashImpl() const; }; /// MarkFlagResultsMatcher - This node indicates which non-root nodes in the @@ -690,7 +851,12 @@ return N->getKind() == MarkFlagResults; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const { + return cast(M)->FlagResultNodes == FlagResultNodes; + } + virtual unsigned getHashImpl() const; }; /// CompleteMatchMatcher - Complete a match by replacing the results of the @@ -713,9 +879,14 @@ return N->getKind() == CompleteMatch; } +private: virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual bool isEqualImpl(const Matcher *M) const { + return cast(M)->Results == Results && + &cast(M)->Pattern == &Pattern; + } + virtual unsigned getHashImpl() const; }; - } // end namespace llvm From nicholas at mxc.ca Thu Feb 25 00:53:04 2010 From: nicholas at mxc.ca (Nick Lewycky) Date: Thu, 25 Feb 2010 06:53:04 -0000 Subject: [llvm-commits] [llvm] r97124 - /llvm/trunk/lib/VMCore/AsmWriter.cpp Message-ID: <20100225065304.C43F12A6C136@llvm.org> Author: nicholas Date: Thu Feb 25 00:53:04 2010 New Revision: 97124 URL: http://llvm.org/viewvc/llvm-project?rev=97124&view=rev Log: Dump the presence of attached metadata even if we don't know what it is. This format is not parsable, even if the module is legal. To get parsable output, dump the module instead of the function or smaller, since metadata kind are attached to the module (not the context). Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AsmWriter.cpp?rev=97124&r1=97123&r2=97124&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/AsmWriter.cpp (original) +++ llvm/trunk/lib/VMCore/AsmWriter.cpp Thu Feb 25 00:53:04 2010 @@ -1988,12 +1988,16 @@ } // Print Metadata info. - if (!MDNames.empty()) { - SmallVector, 4> InstMD; - I.getAllMetadata(InstMD); - for (unsigned i = 0, e = InstMD.size(); i != e; ++i) - Out << ", !" << MDNames[InstMD[i].first] - << " !" << Machine.getMetadataSlot(InstMD[i].second); + SmallVector, 4> InstMD; + I.getAllMetadata(InstMD); + for (unsigned i = 0, e = InstMD.size(); i != e; ++i) { + unsigned Kind = InstMD[i].first; + if (Kind < MDNames.size()) { + Out << ", !" << MDNames[Kind]; + } else { + Out << ", !"; + } + Out << " !" << Machine.getMetadataSlot(InstMD[i].second); } printInfoComment(I); } From sabre at nondot.org Thu Feb 25 00:53:39 2010 From: sabre at nondot.org (Chris Lattner) Date: Thu, 25 Feb 2010 06:53:39 -0000 Subject: [llvm-commits] [llvm] r97125 - in /llvm/trunk/utils/TableGen: DAGISelMatcher.cpp DAGISelMatcher.h Message-ID: <20100225065339.96E9F2A6C136@llvm.org> Author: lattner Date: Thu Feb 25 00:53:39 2010 New Revision: 97125 URL: http://llvm.org/viewvc/llvm-project?rev=97125&view=rev Log: factor the print method better. Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.cpp llvm/trunk/utils/TableGen/DAGISelMatcher.h Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.cpp?rev=97125&r1=97124&r2=97125&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcher.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcher.cpp Thu Feb 25 00:53:39 2010 @@ -16,176 +16,148 @@ using namespace llvm; void Matcher::dump() const { - print(errs()); + print(errs(), 0); } -void Matcher::printNext(raw_ostream &OS, unsigned indent) const { +void Matcher::print(raw_ostream &OS, unsigned indent) const { + printImpl(OS, indent); if (Next) return Next->print(OS, indent); } -void ScopeMatcher::print(raw_ostream &OS, unsigned indent) const { +void ScopeMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "Scope\n"; Check->print(OS, indent+2); - printNext(OS, indent); } -void RecordMatcher::print(raw_ostream &OS, unsigned indent) const { +void RecordMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "Record\n"; - printNext(OS, indent); } -void RecordChildMatcher::print(raw_ostream &OS, unsigned indent) const { +void RecordChildMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "RecordChild: " << ChildNo << '\n'; - printNext(OS, indent); } -void RecordMemRefMatcher::print(raw_ostream &OS, unsigned indent) const { +void RecordMemRefMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "RecordMemRef\n"; - printNext(OS, indent); } -void CaptureFlagInputMatcher::print(raw_ostream &OS, unsigned indent) const{ +void CaptureFlagInputMatcher::printImpl(raw_ostream &OS, unsigned indent) const{ OS.indent(indent) << "CaptureFlagInput\n"; - printNext(OS, indent); } -void MoveChildMatcher::print(raw_ostream &OS, unsigned indent) const { +void MoveChildMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "MoveChild " << ChildNo << '\n'; - printNext(OS, indent); } -void MoveParentMatcher::print(raw_ostream &OS, unsigned indent) const { +void MoveParentMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "MoveParent\n"; - printNext(OS, indent); } -void CheckSameMatcher::print(raw_ostream &OS, unsigned indent) const { +void CheckSameMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckSame " << MatchNumber << '\n'; - printNext(OS, indent); } void CheckPatternPredicateMatcher:: -print(raw_ostream &OS, unsigned indent) const { +printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckPatternPredicate " << Predicate << '\n'; - printNext(OS, indent); } -void CheckPredicateMatcher::print(raw_ostream &OS, unsigned indent) const { +void CheckPredicateMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckPredicate " << PredName << '\n'; - printNext(OS, indent); } -void CheckOpcodeMatcher::print(raw_ostream &OS, unsigned indent) const { +void CheckOpcodeMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckOpcode " << OpcodeName << '\n'; - printNext(OS, indent); } -void CheckMultiOpcodeMatcher::print(raw_ostream &OS, unsigned indent) const { +void CheckMultiOpcodeMatcher::printImpl(raw_ostream &OS, unsigned indent) const{ OS.indent(indent) << "CheckMultiOpcode \n"; - printNext(OS, indent); } -void CheckTypeMatcher::print(raw_ostream &OS, unsigned indent) const { +void CheckTypeMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckType " << getEnumName(Type) << '\n'; - printNext(OS, indent); } -void CheckChildTypeMatcher::print(raw_ostream &OS, unsigned indent) const { +void CheckChildTypeMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckChildType " << ChildNo << " " << getEnumName(Type) << '\n'; - printNext(OS, indent); } -void CheckIntegerMatcher::print(raw_ostream &OS, unsigned indent) const { +void CheckIntegerMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckInteger " << Value << '\n'; - printNext(OS, indent); } -void CheckCondCodeMatcher::print(raw_ostream &OS, unsigned indent) const { +void CheckCondCodeMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckCondCode ISD::" << CondCodeName << '\n'; - printNext(OS, indent); } -void CheckValueTypeMatcher::print(raw_ostream &OS, unsigned indent) const { +void CheckValueTypeMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckValueType MVT::" << TypeName << '\n'; - printNext(OS, indent); } -void CheckComplexPatMatcher::print(raw_ostream &OS, unsigned indent) const { +void CheckComplexPatMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckComplexPat " << Pattern.getSelectFunc() << '\n'; - printNext(OS, indent); } -void CheckAndImmMatcher::print(raw_ostream &OS, unsigned indent) const { +void CheckAndImmMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckAndImm " << Value << '\n'; - printNext(OS, indent); } -void CheckOrImmMatcher::print(raw_ostream &OS, unsigned indent) const { +void CheckOrImmMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckOrImm " << Value << '\n'; - printNext(OS, indent); } -void CheckFoldableChainNodeMatcher::print(raw_ostream &OS, +void CheckFoldableChainNodeMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckFoldableChainNode\n"; - printNext(OS, indent); } -void CheckChainCompatibleMatcher::print(raw_ostream &OS, +void CheckChainCompatibleMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckChainCompatible " << PreviousOp << "\n"; - printNext(OS, indent); } -void EmitIntegerMatcher::print(raw_ostream &OS, unsigned indent) const { +void EmitIntegerMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "EmitInteger " << Val << " VT=" << VT << '\n'; - printNext(OS, indent); } void EmitStringIntegerMatcher:: -print(raw_ostream &OS, unsigned indent) const { +printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "EmitStringInteger " << Val << " VT=" << VT << '\n'; - printNext(OS, indent); } -void EmitRegisterMatcher::print(raw_ostream &OS, unsigned indent) const { +void EmitRegisterMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "EmitRegister "; if (Reg) OS << Reg->getName(); else OS << "zero_reg"; OS << " VT=" << VT << '\n'; - printNext(OS, indent); } void EmitConvertToTargetMatcher:: -print(raw_ostream &OS, unsigned indent) const { +printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "EmitConvertToTarget " << Slot << '\n'; - printNext(OS, indent); } void EmitMergeInputChainsMatcher:: -print(raw_ostream &OS, unsigned indent) const { +printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "EmitMergeInputChains \n"; - printNext(OS, indent); } -void EmitCopyToRegMatcher::print(raw_ostream &OS, unsigned indent) const { +void EmitCopyToRegMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "EmitCopyToReg \n"; - printNext(OS, indent); } -void EmitNodeXFormMatcher::print(raw_ostream &OS, unsigned indent) const { +void EmitNodeXFormMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "EmitNodeXForm " << NodeXForm->getName() << " Slot=" << Slot << '\n'; - printNext(OS, indent); } -void EmitNodeMatcher::print(raw_ostream &OS, unsigned indent) const { +void EmitNodeMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "EmitNode: " << OpcodeName << ": "; for (unsigned i = 0, e = VTs.size(); i != e; ++i) @@ -194,19 +166,16 @@ for (unsigned i = 0, e = Operands.size(); i != e; ++i) OS << Operands[i] << ' '; OS << ")\n"; - printNext(OS, indent); } -void MarkFlagResultsMatcher::print(raw_ostream &OS, unsigned indent) const { +void MarkFlagResultsMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "MarkFlagResults \n"; - printNext(OS, indent); } -void CompleteMatchMatcher::print(raw_ostream &OS, unsigned indent) const { +void CompleteMatchMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CompleteMatch \n"; OS.indent(indent) << "Src = " << *Pattern.getSrcPattern() << "\n"; OS.indent(indent) << "Dst = " << *Pattern.getDstPattern() << "\n"; - printNext(OS, indent); } // getHashImpl Implementation. Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.h?rev=97125&r1=97124&r2=97125&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcher.h (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcher.h Thu Feb 25 00:53:39 2010 @@ -103,10 +103,10 @@ return (getHashImpl() << 4) ^ getKind(); } - virtual void print(raw_ostream &OS, unsigned indent = 0) const = 0; + void print(raw_ostream &OS, unsigned indent = 0) const; void dump() const; protected: - void printNext(raw_ostream &OS, unsigned indent) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const = 0; virtual bool isEqualImpl(const Matcher *M) const = 0; virtual unsigned getHashImpl() const = 0; }; @@ -132,7 +132,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return false; } virtual unsigned getHashImpl() const { return 0; } }; @@ -153,7 +153,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return true; } virtual unsigned getHashImpl() const { return 0; } }; @@ -179,7 +179,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return cast(M)->getChildNo() == getChildNo(); } @@ -196,7 +196,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return true; } virtual unsigned getHashImpl() const { return 0; } }; @@ -213,7 +213,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return true; } virtual unsigned getHashImpl() const { return 0; } }; @@ -232,7 +232,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return cast(M)->getChildNo() == getChildNo(); } @@ -250,7 +250,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return true; } virtual unsigned getHashImpl() const { return 0; } }; @@ -271,7 +271,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return cast(M)->getMatchNumber() == getMatchNumber(); } @@ -294,7 +294,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return cast(M)->getPredicate() == Predicate; } @@ -316,7 +316,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return cast(M)->PredName == PredName; } @@ -339,7 +339,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return cast(M)->OpcodeName == OpcodeName; } @@ -362,7 +362,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return cast(M)->OpcodeNames == OpcodeNames; } @@ -386,7 +386,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return cast(this)->Type == Type; } @@ -410,7 +410,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return cast(M)->ChildNo == ChildNo && cast(M)->Type == Type; @@ -434,7 +434,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return cast(M)->Value == Value; } @@ -456,7 +456,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return cast(M)->CondCodeName == CondCodeName; } @@ -478,7 +478,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return cast(M)->TypeName == TypeName; } @@ -502,7 +502,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return &cast(M)->Pattern == &Pattern; } @@ -526,7 +526,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return cast(M)->Value == Value; } @@ -548,7 +548,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return cast(M)->Value == Value; } @@ -567,7 +567,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return true; } virtual unsigned getHashImpl() const { return 0; } }; @@ -587,7 +587,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return cast(this)->PreviousOp == PreviousOp; } @@ -610,7 +610,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return cast(M)->Val == Val && cast(M)->VT == VT; @@ -635,7 +635,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return cast(M)->Val == Val && cast(M)->VT == VT; @@ -661,7 +661,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return cast(M)->Reg == Reg && cast(M)->VT == VT; @@ -687,7 +687,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return cast(M)->Slot == Slot; } @@ -716,7 +716,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return cast(M)->ChainNodes == ChainNodes; } @@ -741,7 +741,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return cast(M)->SrcSlot == SrcSlot && cast(M)->DestPhysReg == DestPhysReg; @@ -770,7 +770,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return cast(M)->Slot == Slot && cast(M)->NodeXForm == NodeXForm; @@ -826,7 +826,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const; virtual unsigned getHashImpl() const; }; @@ -852,7 +852,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return cast(M)->FlagResultNodes == FlagResultNodes; } @@ -880,7 +880,7 @@ } private: - virtual void print(raw_ostream &OS, unsigned indent = 0) const; + virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return cast(M)->Results == Results && &cast(M)->Pattern == &Pattern; From gohman at apple.com Thu Feb 25 00:57:05 2010 From: gohman at apple.com (Dan Gohman) Date: Thu, 25 Feb 2010 06:57:05 -0000 Subject: [llvm-commits] [llvm] r97126 - in /llvm/trunk: lib/Analysis/ScalarEvolution.cpp lib/Transforms/Scalar/IndVarSimplify.cpp lib/Transforms/Utils/LoopSimplify.cpp test/CodeGen/X86/2009-09-07-CoalescerBug.ll test/Transforms/IndVarSimplify/2003-09-12-MultiplePred.ll test/Transforms/LoopDeletion/simplify-then-delete.ll Message-ID: <20100225065705.B01622A6C131@llvm.org> Author: djg Date: Thu Feb 25 00:57:05 2010 New Revision: 97126 URL: http://llvm.org/viewvc/llvm-project?rev=97126&view=rev Log: Make LoopSimplify change conditional branches in loop exiting blocks which branch on undef to branch on a boolean constant for the edge exiting the loop. This helps ScalarEvolution compute trip counts for loops. Teach ScalarEvolution to recognize single-value PHIs, when safe, and ForgetSymbolicName to forget such single-value PHI nodes as apprpriate in ForgetSymbolicName. Added: llvm/trunk/test/Transforms/LoopDeletion/simplify-then-delete.ll Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp llvm/trunk/test/CodeGen/X86/2009-09-07-CoalescerBug.ll llvm/trunk/test/Transforms/IndVarSimplify/2003-09-12-MultiplePred.ll Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=97126&r1=97125&r2=97126&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Thu Feb 25 00:57:05 2010 @@ -2549,14 +2549,14 @@ /// the Scalars map if they reference SymName. This is used during PHI /// resolution. void -ScalarEvolution::ForgetSymbolicName(Instruction *I, const SCEV *SymName) { +ScalarEvolution::ForgetSymbolicName(Instruction *PN, const SCEV *SymName) { SmallVector Worklist; - PushDefUseChildren(I, Worklist); + PushDefUseChildren(PN, Worklist); SmallPtrSet Visited; - Visited.insert(I); + Visited.insert(PN); while (!Worklist.empty()) { - I = Worklist.pop_back_val(); + Instruction *I = Worklist.pop_back_val(); if (!Visited.insert(I)) continue; std::map::iterator It = @@ -2568,12 +2568,15 @@ continue; // SCEVUnknown for a PHI either means that it has an unrecognized - // structure, or it's a PHI that's in the progress of being computed - // by createNodeForPHI. In the former case, additional loop trip - // count information isn't going to change anything. In the later - // case, createNodeForPHI will perform the necessary updates on its - // own when it gets to that point. - if (!isa(I) || !isa(It->second)) { + // structure, it's a PHI that's in the progress of being computed + // by createNodeForPHI, or it's a single-value PHI. In the first case, + // additional loop trip count information isn't going to change anything. + // In the second case, createNodeForPHI will perform the necessary + // updates on its own when it gets to that point. In the third, we do + // want to forget the SCEVUnknown. + if (!isa(I) || + !isa(It->second) || + (I != PN && It->second == SymName)) { ValuesAtScopes.erase(It->second); Scalars.erase(It); } @@ -2696,9 +2699,21 @@ return SymbolicName; } - // It's tempting to recognize PHIs with a unique incoming value, however - // this leads passes like indvars to break LCSSA form. Fortunately, such - // PHIs are rare, as instcombine zaps them. + // If the PHI has a single incoming value, follow that value, unless the + // PHI's incoming blocks are in a different loop, in which case doing so + // risks breaking LCSSA form. Instcombine would normally zap these, but + // it doesn't have DominatorTree information, so it may miss cases. + if (Value *V = PN->hasConstantValue(DT)) { + bool AllSameLoop = true; + Loop *PNLoop = LI->getLoopFor(PN->getParent()); + for (size_t i = 0, e = PN->getNumIncomingValues(); i != e; ++i) + if (LI->getLoopFor(PN->getIncomingBlock(i)) != PNLoop) { + AllSameLoop = false; + break; + } + if (AllSameLoop) + return getSCEV(V); + } // If it's not a loop phi, we can't handle it yet. return getUnknown(PN); Modified: llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp?rev=97126&r1=97125&r2=97126&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp Thu Feb 25 00:57:05 2010 @@ -384,17 +384,18 @@ // in this loop, insert a canonical induction variable of the largest size. Value *IndVar = 0; if (NeedCannIV) { - // Check to see if the loop already has a canonical-looking induction - // variable. If one is present and it's wider than the planned canonical - // induction variable, temporarily remove it, so that the Rewriter - // doesn't attempt to reuse it. - PHINode *OldCannIV = L->getCanonicalInductionVariable(); - if (OldCannIV) { + // Check to see if the loop already has any canonical-looking induction + // variables. If any are present and wider than the planned canonical + // induction variable, temporarily remove them, so that the Rewriter + // doesn't attempt to reuse them. + SmallVector OldCannIVs; + while (PHINode *OldCannIV = L->getCanonicalInductionVariable()) { if (SE->getTypeSizeInBits(OldCannIV->getType()) > SE->getTypeSizeInBits(LargestType)) OldCannIV->removeFromParent(); else - OldCannIV = 0; + break; + OldCannIVs.push_back(OldCannIV); } IndVar = Rewriter.getOrInsertCanonicalInductionVariable(L, LargestType); @@ -404,17 +405,21 @@ DEBUG(dbgs() << "INDVARS: New CanIV: " << *IndVar << '\n'); // Now that the official induction variable is established, reinsert - // the old canonical-looking variable after it so that the IR remains - // consistent. It will be deleted as part of the dead-PHI deletion at + // any old canonical-looking variables after it so that the IR remains + // consistent. They will be deleted as part of the dead-PHI deletion at // the end of the pass. - if (OldCannIV) - OldCannIV->insertAfter(cast(IndVar)); + while (!OldCannIVs.empty()) { + PHINode *OldCannIV = OldCannIVs.pop_back_val(); + OldCannIV->insertBefore(L->getHeader()->getFirstNonPHI()); + } } // If we have a trip count expression, rewrite the loop's exit condition // using it. We can currently only handle loops with a single exit. ICmpInst *NewICmp = 0; - if (!isa(BackedgeTakenCount) && ExitingBlock) { + if (!isa(BackedgeTakenCount) && + !BackedgeTakenCount->isZero() && + ExitingBlock) { assert(NeedCannIV && "LinearFunctionTestReplace requires a canonical induction variable"); // Can't rewrite non-branch yet. Modified: llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp?rev=97126&r1=97125&r2=97126&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp (original) +++ llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp Thu Feb 25 00:57:05 2010 @@ -159,6 +159,22 @@ } } + // If there are exiting blocks with branches on undef, resolve the undef in + // the direction which will exit the loop. This will help simplify loop + // trip count computations. + SmallVector ExitingBlocks; + L->getExitingBlocks(ExitingBlocks); + for (SmallVectorImpl::iterator I = ExitingBlocks.begin(), + E = ExitingBlocks.end(); I != E; ++I) + if (BranchInst *BI = dyn_cast((*I)->getTerminator())) + if (BI->isConditional()) { + if (UndefValue *Cond = dyn_cast(BI->getCondition())) { + BI->setCondition(ConstantInt::get(Cond->getType(), + !L->contains(BI->getSuccessor(0)))); + Changed = true; + } + } + // Does the loop already have a preheader? If so, don't insert one. BasicBlock *Preheader = L->getLoopPreheader(); if (!Preheader) { @@ -250,8 +266,6 @@ break; } if (UniqueExit) { - SmallVector ExitingBlocks; - L->getExitingBlocks(ExitingBlocks); for (unsigned i = 0, e = ExitingBlocks.size(); i != e; ++i) { BasicBlock *ExitingBlock = ExitingBlocks[i]; if (!ExitingBlock->getSinglePredecessor()) continue; Modified: llvm/trunk/test/CodeGen/X86/2009-09-07-CoalescerBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2009-09-07-CoalescerBug.ll?rev=97126&r1=97125&r2=97126&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/2009-09-07-CoalescerBug.ll (original) +++ llvm/trunk/test/CodeGen/X86/2009-09-07-CoalescerBug.ll Thu Feb 25 00:57:05 2010 @@ -8,8 +8,7 @@ define i64 @hammer_time(i64 %modulep, i64 %physfree) nounwind ssp noredzone noimplicitfloat { ; CHECK: hammer_time: ; CHECK: movq $Xrsvd, %rax -; CHECK: movq $Xrsvd, %rsi -; CHECK: movq $Xrsvd, %rdi +; CHECK: movq $Xrsvd, %rcx entry: br i1 undef, label %if.then, label %if.end Modified: llvm/trunk/test/Transforms/IndVarSimplify/2003-09-12-MultiplePred.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/IndVarSimplify/2003-09-12-MultiplePred.ll?rev=97126&r1=97125&r2=97126&view=diff ============================================================================== --- llvm/trunk/test/Transforms/IndVarSimplify/2003-09-12-MultiplePred.ll (original) +++ llvm/trunk/test/Transforms/IndVarSimplify/2003-09-12-MultiplePred.ll Thu Feb 25 00:57:05 2010 @@ -7,7 +7,7 @@ LoopHead: ; preds = %LoopHead, %0, %0 %A = phi i32 [ 7, %0 ], [ 7, %0 ], [ %B, %LoopHead ] ; [#uses=1] %B = add i32 %A, 1 ; [#uses=2] - br i1 undef, label %LoopHead, label %Out + br i1 true, label %LoopHead, label %Out Out: ; preds = %LoopHead ret i32 %B Added: llvm/trunk/test/Transforms/LoopDeletion/simplify-then-delete.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopDeletion/simplify-then-delete.ll?rev=97126&view=auto ============================================================================== --- llvm/trunk/test/Transforms/LoopDeletion/simplify-then-delete.ll (added) +++ llvm/trunk/test/Transforms/LoopDeletion/simplify-then-delete.ll Thu Feb 25 00:57:05 2010 @@ -0,0 +1,65 @@ +; RUN: opt < %s -S -indvars -loop-deletion -simplifycfg | FileCheck %s +; PR5794 + +; Indvars and loop deletion should be able to eliminate all looping +; in this testcase. + +; CHECK: define i32 @pmat(i32 %m, i32 %n, double* %y) nounwind { +; CHECK-NEXT: entry: +; CHECK-NEXT: ret i32 0 +; CHECK-NEXT: } + +target datalayout = "e-p:64:64:64" + +define i32 @pmat(i32 %m, i32 %n, double* %y) nounwind { +entry: + %cmp4 = icmp sgt i32 %m, 0 + br i1 %cmp4, label %bb.n10, label %w.e12 + +w.c: + %cmp = icmp slt i32 %inc11, %m + br i1 %cmp, label %w.c2.p, label %w.c.w.e12c + +w.c.w.e12c: + br label %w.c.w.e12c.s + +w.c.w.e12c.s: + br label %w.e12 + +bb.n10: + %cmp51 = icmp sgt i32 %n, 0 + br i1 %cmp51, label %bb.n10.w.c.w.e12c.sc, label %bb.n10.bb.n10.sc + +bb.n10.bb.n10.sc: + br label %bb.n10.s + +bb.n10.w.c.w.e12c.sc: + br label %w.c.w.e12c.s + +bb.n10.s: + br label %w.c2.p + +w.c2.p: + %i.05 = phi i32 [ 0, %bb.n10.s ], [ %inc11, %w.c ] + br i1 false, label %bb.n, label %w.e + +w.c2: + br i1 undef, label %w.b6, label %w.c2.w.ec + +w.c2.w.ec: + br label %w.e + +bb.n: + br label %w.b6 + +w.b6: + br label %w.c2 + +w.e: + %i.08 = phi i32 [ undef, %w.c2.w.ec ], [ %i.05, %w.c2.p ] + %inc11 = add nsw i32 %i.08, 1 + br label %w.c + +w.e12: + ret i32 0 +} From nicholas at mxc.ca Thu Feb 25 01:12:41 2010 From: nicholas at mxc.ca (Nick Lewycky) Date: Wed, 24 Feb 2010 23:12:41 -0800 Subject: [llvm-commits] [llvm] r97126 - in /llvm/trunk: lib/Analysis/ScalarEvolution.cpp lib/Transforms/Scalar/IndVarSimplify.cpp lib/Transforms/Utils/LoopSimplify.cpp test/CodeGen/X86/2009-09-07-CoalescerBug.ll test/Transforms/IndVarSimplify/2003-09-12-MultiplePred.ll test/Transforms/LoopDeletion/simplify-then-delete.ll In-Reply-To: <20100225065705.B01622A6C131@llvm.org> References: <20100225065705.B01622A6C131@llvm.org> Message-ID: <4B8622E9.2010009@mxc.ca> Dan Gohman wrote: > Author: djg > Date: Thu Feb 25 00:57:05 2010 > New Revision: 97126 > > URL: http://llvm.org/viewvc/llvm-project?rev=97126&view=rev > Log: > Make LoopSimplify change conditional branches in loop exiting blocks > which branch on undef to branch on a boolean constant for the edge > exiting the loop. This helps ScalarEvolution compute trip counts for > loops. I'm confused. 'undef' is already a constant and ought to be more useful for optimization than i1 0 or i1 1. Are you sure this is the right fix? Nick > Teach ScalarEvolution to recognize single-value PHIs, when safe, and > ForgetSymbolicName to forget such single-value PHI nodes as apprpriate > in ForgetSymbolicName. > > Added: > llvm/trunk/test/Transforms/LoopDeletion/simplify-then-delete.ll > Modified: > llvm/trunk/lib/Analysis/ScalarEvolution.cpp > llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp > llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp > llvm/trunk/test/CodeGen/X86/2009-09-07-CoalescerBug.ll > llvm/trunk/test/Transforms/IndVarSimplify/2003-09-12-MultiplePred.ll > > Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=97126&r1=97125&r2=97126&view=diff > ============================================================================== > --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original) > +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Thu Feb 25 00:57:05 2010 > @@ -2549,14 +2549,14 @@ > /// the Scalars map if they reference SymName. This is used during PHI > /// resolution. > void > -ScalarEvolution::ForgetSymbolicName(Instruction *I, const SCEV *SymName) { > +ScalarEvolution::ForgetSymbolicName(Instruction *PN, const SCEV *SymName) { > SmallVector Worklist; > - PushDefUseChildren(I, Worklist); > + PushDefUseChildren(PN, Worklist); > > SmallPtrSet Visited; > - Visited.insert(I); > + Visited.insert(PN); > while (!Worklist.empty()) { > - I = Worklist.pop_back_val(); > + Instruction *I = Worklist.pop_back_val(); > if (!Visited.insert(I)) continue; > > std::map::iterator It = > @@ -2568,12 +2568,15 @@ > continue; > > // SCEVUnknown for a PHI either means that it has an unrecognized > - // structure, or it's a PHI that's in the progress of being computed > - // by createNodeForPHI. In the former case, additional loop trip > - // count information isn't going to change anything. In the later > - // case, createNodeForPHI will perform the necessary updates on its > - // own when it gets to that point. > - if (!isa(I) || !isa(It->second)) { > + // structure, it's a PHI that's in the progress of being computed > + // by createNodeForPHI, or it's a single-value PHI. In the first case, > + // additional loop trip count information isn't going to change anything. > + // In the second case, createNodeForPHI will perform the necessary > + // updates on its own when it gets to that point. In the third, we do > + // want to forget the SCEVUnknown. > + if (!isa(I) || > + !isa(It->second) || > + (I != PN&& It->second == SymName)) { > ValuesAtScopes.erase(It->second); > Scalars.erase(It); > } > @@ -2696,9 +2699,21 @@ > return SymbolicName; > } > > - // It's tempting to recognize PHIs with a unique incoming value, however > - // this leads passes like indvars to break LCSSA form. Fortunately, such > - // PHIs are rare, as instcombine zaps them. > + // If the PHI has a single incoming value, follow that value, unless the > + // PHI's incoming blocks are in a different loop, in which case doing so > + // risks breaking LCSSA form. Instcombine would normally zap these, but > + // it doesn't have DominatorTree information, so it may miss cases. > + if (Value *V = PN->hasConstantValue(DT)) { > + bool AllSameLoop = true; > + Loop *PNLoop = LI->getLoopFor(PN->getParent()); > + for (size_t i = 0, e = PN->getNumIncomingValues(); i != e; ++i) > + if (LI->getLoopFor(PN->getIncomingBlock(i)) != PNLoop) { > + AllSameLoop = false; > + break; > + } > + if (AllSameLoop) > + return getSCEV(V); > + } > > // If it's not a loop phi, we can't handle it yet. > return getUnknown(PN); > > Modified: llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp?rev=97126&r1=97125&r2=97126&view=diff > ============================================================================== > --- llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp (original) > +++ llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp Thu Feb 25 00:57:05 2010 > @@ -384,17 +384,18 @@ > // in this loop, insert a canonical induction variable of the largest size. > Value *IndVar = 0; > if (NeedCannIV) { > - // Check to see if the loop already has a canonical-looking induction > - // variable. If one is present and it's wider than the planned canonical > - // induction variable, temporarily remove it, so that the Rewriter > - // doesn't attempt to reuse it. > - PHINode *OldCannIV = L->getCanonicalInductionVariable(); > - if (OldCannIV) { > + // Check to see if the loop already has any canonical-looking induction > + // variables. If any are present and wider than the planned canonical > + // induction variable, temporarily remove them, so that the Rewriter > + // doesn't attempt to reuse them. > + SmallVector OldCannIVs; > + while (PHINode *OldCannIV = L->getCanonicalInductionVariable()) { > if (SE->getTypeSizeInBits(OldCannIV->getType())> > SE->getTypeSizeInBits(LargestType)) > OldCannIV->removeFromParent(); > else > - OldCannIV = 0; > + break; > + OldCannIVs.push_back(OldCannIV); > } > > IndVar = Rewriter.getOrInsertCanonicalInductionVariable(L, LargestType); > @@ -404,17 +405,21 @@ > DEBUG(dbgs()<< "INDVARS: New CanIV: "<< *IndVar<< '\n'); > > // Now that the official induction variable is established, reinsert > - // the old canonical-looking variable after it so that the IR remains > - // consistent. It will be deleted as part of the dead-PHI deletion at > + // any old canonical-looking variables after it so that the IR remains > + // consistent. They will be deleted as part of the dead-PHI deletion at > // the end of the pass. > - if (OldCannIV) > - OldCannIV->insertAfter(cast(IndVar)); > + while (!OldCannIVs.empty()) { > + PHINode *OldCannIV = OldCannIVs.pop_back_val(); > + OldCannIV->insertBefore(L->getHeader()->getFirstNonPHI()); > + } > } > > // If we have a trip count expression, rewrite the loop's exit condition > // using it. We can currently only handle loops with a single exit. > ICmpInst *NewICmp = 0; > - if (!isa(BackedgeTakenCount)&& ExitingBlock) { > + if (!isa(BackedgeTakenCount)&& > + !BackedgeTakenCount->isZero()&& > + ExitingBlock) { > assert(NeedCannIV&& > "LinearFunctionTestReplace requires a canonical induction variable"); > // Can't rewrite non-branch yet. > > Modified: llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp?rev=97126&r1=97125&r2=97126&view=diff > ============================================================================== > --- llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp (original) > +++ llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp Thu Feb 25 00:57:05 2010 > @@ -159,6 +159,22 @@ > } > } > > + // If there are exiting blocks with branches on undef, resolve the undef in > + // the direction which will exit the loop. This will help simplify loop > + // trip count computations. > + SmallVector ExitingBlocks; > + L->getExitingBlocks(ExitingBlocks); > + for (SmallVectorImpl::iterator I = ExitingBlocks.begin(), > + E = ExitingBlocks.end(); I != E; ++I) > + if (BranchInst *BI = dyn_cast((*I)->getTerminator())) > + if (BI->isConditional()) { > + if (UndefValue *Cond = dyn_cast(BI->getCondition())) { > + BI->setCondition(ConstantInt::get(Cond->getType(), > + !L->contains(BI->getSuccessor(0)))); > + Changed = true; > + } > + } > + > // Does the loop already have a preheader? If so, don't insert one. > BasicBlock *Preheader = L->getLoopPreheader(); > if (!Preheader) { > @@ -250,8 +266,6 @@ > break; > } > if (UniqueExit) { > - SmallVector ExitingBlocks; > - L->getExitingBlocks(ExitingBlocks); > for (unsigned i = 0, e = ExitingBlocks.size(); i != e; ++i) { > BasicBlock *ExitingBlock = ExitingBlocks[i]; > if (!ExitingBlock->getSinglePredecessor()) continue; > > Modified: llvm/trunk/test/CodeGen/X86/2009-09-07-CoalescerBug.ll > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2009-09-07-CoalescerBug.ll?rev=97126&r1=97125&r2=97126&view=diff > ============================================================================== > --- llvm/trunk/test/CodeGen/X86/2009-09-07-CoalescerBug.ll (original) > +++ llvm/trunk/test/CodeGen/X86/2009-09-07-CoalescerBug.ll Thu Feb 25 00:57:05 2010 > @@ -8,8 +8,7 @@ > define i64 @hammer_time(i64 %modulep, i64 %physfree) nounwind ssp noredzone noimplicitfloat { > ; CHECK: hammer_time: > ; CHECK: movq $Xrsvd, %rax > -; CHECK: movq $Xrsvd, %rsi > -; CHECK: movq $Xrsvd, %rdi > +; CHECK: movq $Xrsvd, %rcx > entry: > br i1 undef, label %if.then, label %if.end > > > Modified: llvm/trunk/test/Transforms/IndVarSimplify/2003-09-12-MultiplePred.ll > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/IndVarSimplify/2003-09-12-MultiplePred.ll?rev=97126&r1=97125&r2=97126&view=diff > ============================================================================== > --- llvm/trunk/test/Transforms/IndVarSimplify/2003-09-12-MultiplePred.ll (original) > +++ llvm/trunk/test/Transforms/IndVarSimplify/2003-09-12-MultiplePred.ll Thu Feb 25 00:57:05 2010 > @@ -7,7 +7,7 @@ > LoopHead: ; preds = %LoopHead, %0, %0 > %A = phi i32 [ 7, %0 ], [ 7, %0 ], [ %B, %LoopHead ] ; [#uses=1] > %B = add i32 %A, 1 ; [#uses=2] > - br i1 undef, label %LoopHead, label %Out > + br i1 true, label %LoopHead, label %Out > > Out: ; preds = %LoopHead > ret i32 %B > > Added: llvm/trunk/test/Transforms/LoopDeletion/simplify-then-delete.ll > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopDeletion/simplify-then-delete.ll?rev=97126&view=auto > ============================================================================== > --- llvm/trunk/test/Transforms/LoopDeletion/simplify-then-delete.ll (added) > +++ llvm/trunk/test/Transforms/LoopDeletion/simplify-then-delete.ll Thu Feb 25 00:57:05 2010 > @@ -0,0 +1,65 @@ > +; RUN: opt< %s -S -indvars -loop-deletion -simplifycfg | FileCheck %s > +; PR5794 > + > +; Indvars and loop deletion should be able to eliminate all looping > +; in this testcase. > + > +; CHECK: define i32 @pmat(i32 %m, i32 %n, double* %y) nounwind { > +; CHECK-NEXT: entry: > +; CHECK-NEXT: ret i32 0 > +; CHECK-NEXT: } > + > +target datalayout = "e-p:64:64:64" > + > +define i32 @pmat(i32 %m, i32 %n, double* %y) nounwind { > +entry: > + %cmp4 = icmp sgt i32 %m, 0 > + br i1 %cmp4, label %bb.n10, label %w.e12 > + > +w.c: > + %cmp = icmp slt i32 %inc11, %m > + br i1 %cmp, label %w.c2.p, label %w.c.w.e12c > + > +w.c.w.e12c: > + br label %w.c.w.e12c.s > + > +w.c.w.e12c.s: > + br label %w.e12 > + > +bb.n10: > + %cmp51 = icmp sgt i32 %n, 0 > + br i1 %cmp51, label %bb.n10.w.c.w.e12c.sc, label %bb.n10.bb.n10.sc > + > +bb.n10.bb.n10.sc: > + br label %bb.n10.s > + > +bb.n10.w.c.w.e12c.sc: > + br label %w.c.w.e12c.s > + > +bb.n10.s: > + br label %w.c2.p > + > +w.c2.p: > + %i.05 = phi i32 [ 0, %bb.n10.s ], [ %inc11, %w.c ] > + br i1 false, label %bb.n, label %w.e > + > +w.c2: > + br i1 undef, label %w.b6, label %w.c2.w.ec > + > +w.c2.w.ec: > + br label %w.e > + > +bb.n: > + br label %w.b6 > + > +w.b6: > + br label %w.c2 > + > +w.e: > + %i.08 = phi i32 [ undef, %w.c2.w.ec ], [ %i.05, %w.c2.p ] > + %inc11 = add nsw i32 %i.08, 1 > + br label %w.c > + > +w.e12: > + ret i32 0 > +} > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > From sabre at nondot.org Thu Feb 25 01:45:24 2010 From: sabre at nondot.org (Chris Lattner) Date: Thu, 25 Feb 2010 07:45:24 -0000 Subject: [llvm-commits] [llvm] r97130 - /llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Message-ID: <20100225074524.ADE122A6C131@llvm.org> Author: lattner Date: Thu Feb 25 01:45:24 2010 New Revision: 97130 URL: http://llvm.org/viewvc/llvm-project?rev=97130&view=rev Log: Implement the first half of redundancy factoring: efficiently splitting all the patterns under scope nodes into equality sets based on their first node. The second step is to rewrite the graph info a form that exposes the sharing. Before I do this, I want to redesign the Scope node. Modified: llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Modified: llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp?rev=97130&r1=97129&r2=97130&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Thu Feb 25 01:45:24 2010 @@ -12,6 +12,8 @@ //===----------------------------------------------------------------------===// #include "DAGISelMatcher.h" +#include "llvm/ADT/DenseMap.h" +#include using namespace llvm; static void ContractNodes(OwningPtr &MatcherPtr) { @@ -63,15 +65,98 @@ return FactorNodes(N->getNextPtr()); // Okay, pull together the series of linear push nodes into a vector so we can - // inspect it more easily. + // inspect it more easily. While we're at it, bucket them up by the hash + // code of their first predicate. SmallVector OptionsToMatch; + typedef DenseMap > HashTableTy; + HashTableTy MatchersByHash; Matcher *CurNode = N; for (; ScopeMatcher *PMN = dyn_cast(CurNode); - CurNode = PMN->getNext()) - OptionsToMatch.push_back(PMN->getCheck()); - OptionsToMatch.push_back(CurNode); + CurNode = PMN->getNext()) { + // Factor the subexpression. + FactorNodes(PMN->getCheckPtr()); + if (Matcher *Check = PMN->getCheck()) { + OptionsToMatch.push_back(Check); + MatchersByHash[Check->getHash()].push_back(Check); + } + } + + if (CurNode) { + OptionsToMatch.push_back(CurNode); + MatchersByHash[CurNode->getHash()].push_back(CurNode); + } + + SmallVector NewOptionsToMatch; + + // Now that we have bucketed up things by hash code, iterate over sets of + // matchers that all start with the same node. We would like to iterate over + // the hash table, but it isn't in deterministic order, emulate this by going + // about this slightly backwards. After each set of nodes is processed, we + // remove them from MatchersByHash. + for (unsigned i = 0, e = OptionsToMatch.size(); + i != e && !MatchersByHash.empty(); ++i) { + // Find the set of matchers that start with this node. + Matcher *Optn = OptionsToMatch[i]; + + // Find all nodes that hash to the same value. If there is no entry in the + // hash table, then we must have previously processed a node equal to this + // one. + HashTableTy::iterator DMI = MatchersByHash.find(Optn->getHash()); + if (DMI == MatchersByHash.end()) continue; + + std::vector &HashMembers = DMI->second; + assert(!HashMembers.empty() && "Should be removed if empty"); + + // Check to see if this node is in HashMembers, if not it was equal to a + // previous node and removed. + std::vector::iterator MemberSlot = + std::find(HashMembers.begin(), HashMembers.end(), Optn); + if (MemberSlot == HashMembers.end()) continue; + + // If the node *does* exist in HashMembers, then we've confirmed that it + // hasn't been processed as equal to a previous node. Process it now, start + // by removing it from the list of hash-equal nodes. + HashMembers.erase(MemberSlot); + + // Scan all of the hash members looking for ones that are equal, removing + // them from HashMembers, adding them to EqualMatchers. + SmallVector EqualMatchers; + + // Scan the vector backwards so we're generally removing from the end to + // avoid pointless data copying. + for (unsigned i = HashMembers.size(); i != 0; --i) { + if (!HashMembers[i-1]->isEqual(Optn)) continue; + + EqualMatchers.push_back(HashMembers[i-1]); + HashMembers.erase(HashMembers.begin()+i-1); + } + EqualMatchers.push_back(Optn); + + // Reverse the vector so that we preserve the match ordering. + std::reverse(EqualMatchers.begin(), EqualMatchers.end()); + + // If HashMembers is empty at this point, then we've gotten all nodes with + // the same hash, nuke the entry in the hash table. + if (HashMembers.empty()) + MatchersByHash.erase(Optn->getHash()); + + // Okay, we have the list of all matchers that start with the same node as + // Optn. If there is more than one in the set, we want to factor them. + if (EqualMatchers.size() == 1) { + NewOptionsToMatch.push_back(Optn); + continue; + } + + // Factor these checks by pulling the first node off each entry and + // discarding it, replacing it with... + // something amazing?? + + // FIXME: Need to change the Scope model. + } + + // Reassemble a new Scope node. } From nicholas at mxc.ca Thu Feb 25 02:30:17 2010 From: nicholas at mxc.ca (Nick Lewycky) Date: Thu, 25 Feb 2010 08:30:17 -0000 Subject: [llvm-commits] [llvm] r97132 - in /llvm/trunk/lib/Bitcode: Reader/BitcodeReader.cpp Writer/ValueEnumerator.cpp Message-ID: <20100225083017.D9FE12A6C130@llvm.org> Author: nicholas Date: Thu Feb 25 02:30:17 2010 New Revision: 97132 URL: http://llvm.org/viewvc/llvm-project?rev=97132&view=rev Log: Make the side-numbering of instructions used by metadata (which is needed to keep track of instructions that return void) per-function. This fixes PR5278. This breaks backwards compatibility with the metadata format. That's okay because we haven't released the metadata bitcode yet. Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp?rev=97132&r1=97131&r2=97132&view=diff ============================================================================== --- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp (original) +++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp Thu Feb 25 02:30:17 2010 @@ -1622,6 +1622,7 @@ if (Stream.EnterSubBlock(bitc::FUNCTION_BLOCK_ID)) return Error("Malformed block record"); + InstructionList.clear(); unsigned ModuleValueListSize = ValueList.size(); // Add all the function arguments to the value table. Modified: llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp?rev=97132&r1=97131&r2=97132&view=diff ============================================================================== --- llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp (original) +++ llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp Thu Feb 25 02:30:17 2010 @@ -39,8 +39,6 @@ /// ValueEnumerator - Enumerate module-level information. ValueEnumerator::ValueEnumerator(const Module *M) { - InstructionCount = 0; - // Enumerate the global variables. for (Module::const_global_iterator I = M->global_begin(), E = M->global_end(); I != E; ++I) @@ -377,6 +375,7 @@ void ValueEnumerator::incorporateFunction(const Function &F) { + InstructionCount = 0; NumModuleValues = Values.size(); // Adding function arguments to the value table. From nicholas at mxc.ca Thu Feb 25 02:31:45 2010 From: nicholas at mxc.ca (Nick Lewycky) Date: Thu, 25 Feb 2010 00:31:45 -0800 Subject: [llvm-commits] [llvm] r97132 - in /llvm/trunk/lib/Bitcode: Reader/BitcodeReader.cpp Writer/ValueEnumerator.cpp In-Reply-To: <20100225083017.D9FE12A6C130@llvm.org> References: <20100225083017.D9FE12A6C130@llvm.org> Message-ID: <4B863571.4090203@mxc.ca> I just want to clarify that you'll need to rebuild your llvm-gcc/clang because of this, or else 'make check' will fail for you. Nick Nick Lewycky wrote: > Author: nicholas > Date: Thu Feb 25 02:30:17 2010 > New Revision: 97132 > > URL: http://llvm.org/viewvc/llvm-project?rev=97132&view=rev > Log: > Make the side-numbering of instructions used by metadata (which is needed to > keep track of instructions that return void) per-function. This fixes PR5278. > > This breaks backwards compatibility with the metadata format. That's okay > because we haven't released the metadata bitcode yet. > > Modified: > llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp > llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp > > Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp?rev=97132&r1=97131&r2=97132&view=diff > ============================================================================== > --- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp (original) > +++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp Thu Feb 25 02:30:17 2010 > @@ -1622,6 +1622,7 @@ > if (Stream.EnterSubBlock(bitc::FUNCTION_BLOCK_ID)) > return Error("Malformed block record"); > > + InstructionList.clear(); > unsigned ModuleValueListSize = ValueList.size(); > > // Add all the function arguments to the value table. > > Modified: llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp?rev=97132&r1=97131&r2=97132&view=diff > ============================================================================== > --- llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp (original) > +++ llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp Thu Feb 25 02:30:17 2010 > @@ -39,8 +39,6 @@ > > /// ValueEnumerator - Enumerate module-level information. > ValueEnumerator::ValueEnumerator(const Module *M) { > - InstructionCount = 0; > - > // Enumerate the global variables. > for (Module::const_global_iterator I = M->global_begin(), > E = M->global_end(); I != E; ++I) > @@ -377,6 +375,7 @@ > > > void ValueEnumerator::incorporateFunction(const Function&F) { > + InstructionCount = 0; > NumModuleValues = Values.size(); > > // Adding function arguments to the value table. > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > From baldrick at free.fr Thu Feb 25 03:21:42 2010 From: baldrick at free.fr (Duncan Sands) Date: Thu, 25 Feb 2010 10:21:42 +0100 Subject: [llvm-commits] [llvm] r97078 - in /llvm/trunk/lib/CodeGen/AsmPrinter: DwarfException.cpp DwarfPrinter.cpp DwarfPrinter.h In-Reply-To: <20100224233435.ED4492A6C136@llvm.org> References: <20100224233435.ED4492A6C136@llvm.org> Message-ID: <4B864126.50701@free.fr> Hi Bill, thanks for doing this. > if (HaveTTData) > - EmitULEB128(TyOffset, "@TType base offset"); > + // Pad here for alignment. > + EmitULEB128(TTypeBaseOffset + SizeAlign, "@TType base offset"); This comment seems pretty obscure, can you please improve it. Best wishes, Duncan. From baldrick at free.fr Thu Feb 25 03:48:58 2010 From: baldrick at free.fr (Duncan Sands) Date: Thu, 25 Feb 2010 10:48:58 +0100 Subject: [llvm-commits] [llvm] r97078 - in /llvm/trunk/lib/CodeGen/AsmPrinter: DwarfException.cpp DwarfPrinter.cpp DwarfPrinter.h In-Reply-To: References: <20100224233435.ED4492A6C136@llvm.org> Message-ID: <4B86478A.8080504@free.fr> Hi Chris, >> LLVM puts padding bytes in the __gcc_except_tab section after the >> GCC_except_table label but before the Lexception, which the FDE references. >> This causes problems as the FDE does not point to the start of an LSDA chunk. >> >> Use an unnormalized uleb128 for the call-site table length that includes the >> padding. > > Ok, I don't really understand, but: unwind info is output in a table. The *end* of the table has to be 4 byte aligned. The size of the table is output immediately before the table in a variable length format. How does GCC align the end of the table? It inserts alignment bytes *inside* the table itself. This changes the size of the table. Since the size is output in a variable length format just before the table, if the number of bytes needed to output the size increases then the start of the table moves. This means that the end of the table may no longer be aligned! If this happens, then GCC recalculates the number of alignment bytes to use, recalculates the table size, and if the start of the table moved again it tries yet again, and so on, in the hope that the result will one day stabilize. I didn't like that method, so used a different one: LLVM outputs the alignment bytes before the table (and before the table size) - problem solved. Except that this was always a bit dubious - what if something is expecting the *start* of the table to be aligned too? (GCC aligns the start) But it seemed to work fine, so I just did it. However an Apple "linker guy" noticed it and came up with a clever suggestion that gives the best of both worlds: put the alignment padding inside the table size itself, by using extra redundant bytes when specifying the size. The variable length format being used (uleb128) does not *require* you to output a number using the minimum possible number of bytes, you can always use more. That's what Bill implemented (unfortunately the meat of the change was hidden by the large number of cosmetic tweaks), so now the start of the table is aligned, the end of the table is aligned, and we can feel pleasantly superior to GCC because we don't need a horrible loop :) Ciao, Duncan. From baldrick at free.fr Thu Feb 25 04:59:26 2010 From: baldrick at free.fr (Duncan Sands) Date: Thu, 25 Feb 2010 11:59:26 +0100 Subject: [llvm-commits] [llvm] r97064 - in /llvm/trunk: include/llvm/Target/TargetData.h lib/CodeGen/SelectionDAG/LegalizeDAG.cpp lib/CodeGen/SelectionDAG/LegalizeTypes.cpp lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp lib/Target/TargetData.cpp test/CodeGen/X86/vector-of-i1.ll In-Reply-To: <20100224220523.B6BB32A6C136@llvm.org> References: <20100224220523.B6BB32A6C136@llvm.org> Message-ID: <4B86580E.9060903@free.fr> Hi Dan, > Make getTypeSizeInBits work correctly for array types; it should return > the number of value bits, not the number of bits of allocation for in-memory > storage. > > Make getTypeStoreSize and getTypeAllocSize work consistently for arrays and > vectors. > > Fix several places in CodeGen which compute offsets into in-memory vectors > to use TargetData information. > > This fixes PR1784. thanks for doing this - it is an improvement, but unfortunately it does not really solve PR1784. In fact it doesn't address the most problematic issues at all. For example, bitcasting between vectors and integers. A bitcast of <8xi1> to i8 is currently legal. You have decided that <8 x i1> is 8 bytes long, the same as [8 x i1], and is stored as 8 consecutive bytes. This breaks the invariant that a bitcast from type S to type T is the same as storing an S to memory and loading it out again as a T. This is a pretty fundamental invariant to break! OK, suppose you decide that you don't want to break that invariant - you might want to say bitcast from <8xi1> to i8 is illegal, but a bitcast from <8xi1> to i64 is legal (same bitwidth). But then the legality or not of a bitcast becomes target dependent, which is also a big no no! As far as I can see, there are three possibilities: (1) Drop the invariant that bitcast from S to T is the same as "store to memory as type S, reload from memory as type T". This is what you chose. I don't think Chris will like this :) (2) Disallow bitcast of vectors. (3) Store vectors to memory in a target independent way. This is the opposite approach to the one you took. Personally I don't much like (1) ;) Another issue is that VectorType has a method called getBitWidth. This is defined as: inline unsigned getBitWidth() const { return NumElements * getElementType()->getPrimitiveSizeInBits(); } After your changes, most uses of this method are bogus as far as I can see. Actually, they were mostly bogus before your changes too! > /// getTypeStoreSize - Return the maximum number of bytes that may be > /// overwritten by storing the specified type. For example, returns 5 > /// for i36 and 10 for x86_fp80. > - uint64_t getTypeStoreSize(const Type *Ty) const { > - return (getTypeSizeInBits(Ty)+7)/8; > - } > + uint64_t getTypeStoreSize(const Type *Ty) const; It doesn't make any sense to change getTypeStoreSizeInBits without changing getTypeStoreSizeInBitsInBits, since they are the same method only one returns in bits, the other rounds up to bytes. I think you should revert the change to getTypeStoreSize, and modify getTypeStoreSizeInBitsInBits instead. > /// getTypeStoreSizeInBits - Return the maximum number of bits that may be > /// overwritten by storing the specified type; always a multiple of 8. For > @@ -208,10 +206,7 @@ > /// of the specified type, including alignment padding. This is the amount > /// that alloca reserves for this type. For example, returns 12 or 16 for > /// x86_fp80, depending on alignment. > - uint64_t getTypeAllocSize(const Type* Ty) const { > - // Round up to the next alignment boundary. > - return RoundUpAlignment(getTypeStoreSize(Ty), getABITypeAlignment(Ty)); > - } > + uint64_t getTypeAllocSize(const Type* Ty) const; Likewise, it makes no sense to modify getTypeAllocSize without modifying getTypeAllocSizeInBits: they are the same method, however one returns the result in bits, the other rounded up to bytes. I think you should revert the change to getTypeAllocSize, and modify getTypeAllocSizeInBits instead. In fact as far as I can see there is no need to change this method at all (see below) since your new logic always gives the same result as the old logic. > --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original) > +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Wed Feb 24 16:05:23 2010 > @@ -660,7 +660,8 @@ > unsigned CastOpc = IdxVT.bitsGT(PtrVT) ? ISD::TRUNCATE : ISD::ZERO_EXTEND; > Tmp3 = DAG.getNode(CastOpc, dl, PtrVT, Tmp3); > // Add the offset to the index. > - unsigned EltSize = EltVT.getSizeInBits()/8; > + unsigned EltSize = TLI.getTargetData()-> > + getTypeAllocSize(EltVT.getTypeForEVT(*DAG.getContext())); Please introduce a convenience method for getting the alloc size for a value type, and use that instead. By the way, the codegen logic for vector bitcast is still broken, but that's because vector bitcast is broken in the IR already. > --- llvm/trunk/lib/Target/TargetData.cpp (original) > +++ llvm/trunk/lib/Target/TargetData.cpp Wed Feb 24 16:05:23 2010 > @@ -455,7 +455,7 @@ > return getPointerSizeInBits(); > case Type::ArrayTyID: { > const ArrayType *ATy = cast(Ty); > - return getTypeAllocSizeInBits(ATy->getElementType())*ATy->getNumElements(); > + return getTypeSizeInBits(ATy->getElementType())*ATy->getNumElements(); This change is dangerous. You just changed the size in bits of [N x i1] to N, when previously it was probably 8*N. Did you audit all the places that make use of this method? > +/// getTypeStoreSize - Return the maximum number of bytes that may be > +/// overwritten by storing the specified type. For example, returns 5 > +/// for i36 and 10 for x86_fp80. The changes to this method are ok, but should have been made to getTypeStoreSizeInBits. > +uint64_t TargetData::getTypeStoreSize(const Type *Ty) const { > + // Arrays and vectors are allocated as sequences of elements. How they are allocated is not relevant here. How about this instead: // Arrays and vectors are stored as sequences of elements. > +/// getTypeAllocSize - Return the offset in bytes between successive objects > +/// of the specified type, including alignment padding. This is the amount > +/// that alloca reserves for this type. For example, returns 12 or 16 for > +/// x86_fp80, depending on alignment. > +uint64_t TargetData::getTypeAllocSize(const Type* Ty) const { > + // Arrays and vectors are allocated as sequences of elements. > + // Note that this means that things like vectors-of-i1 are not bit-packed > + // in memory (except on a hypothetical bit-addressable machine). If > + // someone builds hardware with native vector-of-i1 stores and the idiom > + // of bitcasting vectors to integers in order to bitpack them for storage > + // isn't sufficient, TargetData may need new "size" concept. > + if (const ArrayType *ATy = dyn_cast(Ty)) > + return getTypeAllocSize(ATy->getElementType()) * ATy->getNumElements(); > + if (const VectorType *VTy = dyn_cast(Ty)) > + return getTypeAllocSize(VTy->getElementType()) * VTy->getNumElements(); > + > + // Round up to the next alignment boundary. > + return RoundUpAlignment(getTypeStoreSize(Ty), getABITypeAlignment(Ty)); > +} This change is pointless since it doesn't actually change anything - the previous logic (round up the store size by the alignment) would give exactly the same result. Please revert this part. Ciao, Duncan. From gohman at apple.com Thu Feb 25 09:20:39 2010 From: gohman at apple.com (Dan Gohman) Date: Thu, 25 Feb 2010 15:20:39 -0000 Subject: [llvm-commits] [llvm] r97137 - in /llvm/trunk: include/llvm/Target/TargetData.h lib/CodeGen/SelectionDAG/LegalizeDAG.cpp lib/CodeGen/SelectionDAG/LegalizeTypes.cpp lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp lib/Target/TargetData.cpp test/CodeGen/X86/vector-of-i1.ll Message-ID: <20100225152039.EAA722A6C12C@llvm.org> Author: djg Date: Thu Feb 25 09:20:39 2010 New Revision: 97137 URL: http://llvm.org/viewvc/llvm-project?rev=97137&view=rev Log: Revert r97064. Duncan pointed out that bitcasts are defined in terms of store and load, which means bitcasting between scalar integer and vector has endian-specific results, which undermines this whole approach. Removed: llvm/trunk/test/CodeGen/X86/vector-of-i1.ll Modified: llvm/trunk/include/llvm/Target/TargetData.h llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp llvm/trunk/lib/Target/TargetData.cpp Modified: llvm/trunk/include/llvm/Target/TargetData.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetData.h?rev=97137&r1=97136&r2=97137&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetData.h (original) +++ llvm/trunk/include/llvm/Target/TargetData.h Thu Feb 25 09:20:39 2010 @@ -193,7 +193,9 @@ /// getTypeStoreSize - Return the maximum number of bytes that may be /// overwritten by storing the specified type. For example, returns 5 /// for i36 and 10 for x86_fp80. - uint64_t getTypeStoreSize(const Type *Ty) const; + uint64_t getTypeStoreSize(const Type *Ty) const { + return (getTypeSizeInBits(Ty)+7)/8; + } /// getTypeStoreSizeInBits - Return the maximum number of bits that may be /// overwritten by storing the specified type; always a multiple of 8. For @@ -206,7 +208,10 @@ /// of the specified type, including alignment padding. This is the amount /// that alloca reserves for this type. For example, returns 12 or 16 for /// x86_fp80, depending on alignment. - uint64_t getTypeAllocSize(const Type* Ty) const; + uint64_t getTypeAllocSize(const Type* Ty) const { + // Round up to the next alignment boundary. + return RoundUpAlignment(getTypeStoreSize(Ty), getABITypeAlignment(Ty)); + } /// getTypeAllocSizeInBits - Return the offset in bits between successive /// objects of the specified type, including alignment padding; always a Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=97137&r1=97136&r2=97137&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Thu Feb 25 09:20:39 2010 @@ -660,8 +660,7 @@ unsigned CastOpc = IdxVT.bitsGT(PtrVT) ? ISD::TRUNCATE : ISD::ZERO_EXTEND; Tmp3 = DAG.getNode(CastOpc, dl, PtrVT, Tmp3); // Add the offset to the index. - unsigned EltSize = TLI.getTargetData()-> - getTypeAllocSize(EltVT.getTypeForEVT(*DAG.getContext())); + unsigned EltSize = EltVT.getSizeInBits()/8; Tmp3 = DAG.getNode(ISD::MUL, dl, IdxVT, Tmp3,DAG.getConstant(EltSize, IdxVT)); SDValue StackPtr2 = DAG.getNode(ISD::ADD, dl, IdxVT, Tmp3, StackPtr); // Store the scalar value. @@ -1513,9 +1512,8 @@ false, false, 0); // Add the offset to the index. - unsigned EltSize = TLI.getTargetData()->getTypeAllocSize( - Vec.getValueType().getVectorElementType().getTypeForEVT(*DAG.getContext())); - + unsigned EltSize = + Vec.getValueType().getVectorElementType().getSizeInBits()/8; Idx = DAG.getNode(ISD::MUL, dl, Idx.getValueType(), Idx, DAG.getConstant(EltSize, Idx.getValueType())); @@ -1550,8 +1548,7 @@ // Emit a store of each element to the stack slot. SmallVector Stores; - unsigned TypeByteSize = TLI.getTargetData()-> - getTypeAllocSize(EltVT.getTypeForEVT(*DAG.getContext())); + unsigned TypeByteSize = EltVT.getSizeInBits() / 8; // Store (in the right endianness) the elements to memory. for (unsigned i = 0, e = Node->getNumOperands(); i != e; ++i) { // Ignore undef elements. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp?rev=97137&r1=97136&r2=97137&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp Thu Feb 25 09:20:39 2010 @@ -966,8 +966,7 @@ Index = DAG.getNode(ISD::ZERO_EXTEND, dl, TLI.getPointerTy(), Index); // Calculate the element offset and add it to the pointer. - unsigned EltSize = TLI.getTargetData()-> - getTypeAllocSize(EltVT.getTypeForEVT(*DAG.getContext())); + unsigned EltSize = EltVT.getSizeInBits() / 8; // FIXME: should be ABI size. Index = DAG.getNode(ISD::MUL, dl, Index.getValueType(), Index, DAG.getConstant(EltSize, Index.getValueType())); Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp?rev=97137&r1=97136&r2=97137&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Thu Feb 25 09:20:39 2010 @@ -715,8 +715,7 @@ false, false, 0); // Increment the pointer to the other part. - unsigned IncrementSize = TLI.getTargetData()-> - getTypeAllocSize(Lo.getValueType().getTypeForEVT(*DAG.getContext())); + unsigned IncrementSize = Lo.getValueType().getSizeInBits() / 8; StackPtr = DAG.getNode(ISD::ADD, dl, StackPtr.getValueType(), StackPtr, DAG.getIntPtrConstant(IncrementSize)); @@ -758,8 +757,7 @@ Lo = DAG.getLoad(ISD::UNINDEXED, dl, ExtType, LoVT, Ch, Ptr, Offset, SV, SVOffset, LoMemVT, isVolatile, isNonTemporal, Alignment); - unsigned IncrementSize = TLI.getTargetData()-> - getTypeAllocSize(LoMemVT.getTypeForEVT(*DAG.getContext())); + unsigned IncrementSize = LoMemVT.getSizeInBits()/8; Ptr = DAG.getNode(ISD::ADD, dl, Ptr.getValueType(), Ptr, DAG.getIntPtrConstant(IncrementSize)); SVOffset += IncrementSize; @@ -1123,8 +1121,7 @@ EVT LoMemVT, HiMemVT; GetSplitDestVTs(MemoryVT, LoMemVT, HiMemVT); - unsigned IncrementSize = TLI.getTargetData()-> - getTypeAllocSize(LoMemVT.getTypeForEVT(*DAG.getContext())); + unsigned IncrementSize = LoMemVT.getSizeInBits()/8; if (isTruncating) Lo = DAG.getTruncStore(Ch, dl, Lo, Ptr, N->getSrcValue(), SVOffset, @@ -2185,8 +2182,7 @@ unsigned Offset = 0; while (LdWidth > 0) { - unsigned Increment = TLI.getTargetData()-> - getTypeAllocSize(NewVT.getTypeForEVT(*DAG.getContext())); + unsigned Increment = NewVTWidth / 8; Offset += Increment; BasePtr = DAG.getNode(ISD::ADD, dl, BasePtr.getValueType(), BasePtr, DAG.getIntPtrConstant(Increment)); @@ -2283,8 +2279,7 @@ // Load each element and widen unsigned WidenNumElts = WidenVT.getVectorNumElements(); SmallVector Ops(WidenNumElts); - unsigned Increment = TLI.getTargetData()-> - getTypeAllocSize(LdEltVT.getTypeForEVT(*DAG.getContext())); + unsigned Increment = LdEltVT.getSizeInBits() / 8; Ops[0] = DAG.getExtLoad(ExtType, dl, EltVT, Chain, BasePtr, SV, SVOffset, LdEltVT, isVolatile, isNonTemporal, Align); LdChain.push_back(Ops[0].getValue(1)); @@ -2336,8 +2331,7 @@ // Find the largest vector type we can store with EVT NewVT = FindMemType(DAG, TLI, StWidth, ValVT); unsigned NewVTWidth = NewVT.getSizeInBits(); - unsigned Increment = TLI.getTargetData()-> - getTypeAllocSize(NewVT.getTypeForEVT(*DAG.getContext())); + unsigned Increment = NewVTWidth / 8; if (NewVT.isVector()) { unsigned NumVTElts = NewVT.getVectorNumElements(); do { @@ -2405,8 +2399,7 @@ // the store. EVT StEltVT = StVT.getVectorElementType(); EVT ValEltVT = ValVT.getVectorElementType(); - unsigned Increment = TLI.getTargetData()-> - getTypeAllocSize(ValEltVT.getTypeForEVT(*DAG.getContext())); + unsigned Increment = ValEltVT.getSizeInBits() / 8; unsigned NumElts = StVT.getVectorNumElements(); SDValue EOp = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, dl, ValEltVT, ValOp, DAG.getIntPtrConstant(0)); Modified: llvm/trunk/lib/Target/TargetData.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetData.cpp?rev=97137&r1=97136&r2=97137&view=diff ============================================================================== --- llvm/trunk/lib/Target/TargetData.cpp (original) +++ llvm/trunk/lib/Target/TargetData.cpp Thu Feb 25 09:20:39 2010 @@ -455,7 +455,7 @@ return getPointerSizeInBits(); case Type::ArrayTyID: { const ArrayType *ATy = cast(Ty); - return getTypeSizeInBits(ATy->getElementType())*ATy->getNumElements(); + return getTypeAllocSizeInBits(ATy->getElementType())*ATy->getNumElements(); } case Type::StructTyID: // Get the layout annotation... which is lazily created on demand. @@ -484,47 +484,6 @@ return 0; } -/// getTypeStoreSize - Return the maximum number of bytes that may be -/// overwritten by storing the specified type. For example, returns 5 -/// for i36 and 10 for x86_fp80. -uint64_t TargetData::getTypeStoreSize(const Type *Ty) const { - // Arrays and vectors are allocated as sequences of elements. - if (const ArrayType *ATy = dyn_cast(Ty)) { - if (ATy->getNumElements() == 0) - return 0; - const Type *ElementType = ATy->getElementType(); - return getTypeAllocSize(ElementType) * (ATy->getNumElements() - 1) + - getTypeStoreSize(ElementType); - } - if (const VectorType *VTy = dyn_cast(Ty)) { - const Type *ElementType = VTy->getElementType(); - return getTypeAllocSize(ElementType) * (VTy->getNumElements() - 1) + - getTypeStoreSize(ElementType); - } - - return (getTypeSizeInBits(Ty)+7)/8; -} - -/// getTypeAllocSize - Return the offset in bytes between successive objects -/// of the specified type, including alignment padding. This is the amount -/// that alloca reserves for this type. For example, returns 12 or 16 for -/// x86_fp80, depending on alignment. -uint64_t TargetData::getTypeAllocSize(const Type* Ty) const { - // Arrays and vectors are allocated as sequences of elements. - // Note that this means that things like vectors-of-i1 are not bit-packed - // in memory (except on a hypothetical bit-addressable machine). If - // someone builds hardware with native vector-of-i1 stores and the idiom - // of bitcasting vectors to integers in order to bitpack them for storage - // isn't sufficient, TargetData may need new "size" concept. - if (const ArrayType *ATy = dyn_cast(Ty)) - return getTypeAllocSize(ATy->getElementType()) * ATy->getNumElements(); - if (const VectorType *VTy = dyn_cast(Ty)) - return getTypeAllocSize(VTy->getElementType()) * VTy->getNumElements(); - - // Round up to the next alignment boundary. - return RoundUpAlignment(getTypeStoreSize(Ty), getABITypeAlignment(Ty)); -} - /*! \param abi_or_pref Flag that determines which alignment is returned. true returns the ABI alignment, false returns the preferred alignment. Removed: llvm/trunk/test/CodeGen/X86/vector-of-i1.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/vector-of-i1.ll?rev=97136&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/vector-of-i1.ll (original) +++ llvm/trunk/test/CodeGen/X86/vector-of-i1.ll (removed) @@ -1,39 +0,0 @@ -; RUN: llc < %s -march=x86-64 | FileCheck %s - -; Vectors of i1 are stored with each element having a -; different address. Since the address unit on x86 is 8 bits, -; that means each i1 value takes 8 bits of storage. - -; CHECK: store: -; CHECK: movb $1, 7(%rdi) -; CHECK: movb $1, 6(%rdi) -; CHECK: movb $0, 5(%rdi) -; CHECK: movb $0, 4(%rdi) -; CHECK: movb $1, 3(%rdi) -; CHECK: movb $0, 2(%rdi) -; CHECK: movb $1, 1(%rdi) -; CHECK: movb $0, (%rdi) -define void @store(<8 x i1>* %p) nounwind { - store <8 x i1> , <8 x i1>* %p - ret void -} - -; CHECK: variable_extract: -; CHECK: movb 7(%rdi), -; CHECK: movb 6(%rdi), -; CHECK: movb 5(%rdi), -define i32 @variable_extract(<8 x i1>* %p, i32 %n) nounwind { - %t = load <8 x i1>* %p - %s = extractelement <8 x i1> %t, i32 %n - %e = zext i1 %s to i32 - ret i32 %e -} - -; CHECK: constant_extract: -; CHECK: movzbl 3(%rdi), %eax -define i32 @constant_extract(<8 x i1>* %p, i32 %n) nounwind { - %t = load <8 x i1>* %p - %s = extractelement <8 x i1> %t, i32 3 - %e = zext i1 %s to i32 - ret i32 %e -} From baldrick at free.fr Thu Feb 25 09:29:36 2010 From: baldrick at free.fr (Duncan Sands) Date: Thu, 25 Feb 2010 16:29:36 +0100 Subject: [llvm-commits] [llvm] r97137 - in /llvm/trunk: include/llvm/Target/TargetData.h lib/CodeGen/SelectionDAG/LegalizeDAG.cpp lib/CodeGen/SelectionDAG/LegalizeTypes.cpp lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp lib/Target/TargetData.cpp test/CodeGen/X86/vector-of-i1.ll In-Reply-To: <20100225152039.EAA722A6C12C@llvm.org> References: <20100225152039.EAA722A6C12C@llvm.org> Message-ID: <4B869760.9040804@free.fr> Hi Dan, > Revert r97064. Duncan pointed out that bitcasts are defined in > terms of store and load, which means bitcasting between scalar > integer and vector has endian-specific results, which undermines > this whole approach. thanks for doing this. Do you have any ideas on how to go forwards with this? If we want to keep bitcast of vectors, then that implies that the way vectors are stored has to be close to target independent (for example, so that the legality of a bitcast is target independent, and that bitcast is reversible i.e. so that bitcast A to B, then back to A is a no-op), which basically forces vectors to be bitpacked. On the other hand, we could disallow bitcast of vectors. Ciao, Duncan. From gohman at apple.com Thu Feb 25 09:53:42 2010 From: gohman at apple.com (Dan Gohman) Date: Thu, 25 Feb 2010 15:53:42 -0000 Subject: [llvm-commits] [llvm] r97139 - /llvm/trunk/docs/AdvancedGetElementPtr.html Message-ID: <20100225155342.29F122A6C12C@llvm.org> Author: djg Date: Thu Feb 25 09:53:42 2010 New Revision: 97139 URL: http://llvm.org/viewvc/llvm-project?rev=97139&view=rev Log: Remove this paragraph. Vectors may not always have the same layout as arrays now. Modified: llvm/trunk/docs/AdvancedGetElementPtr.html Modified: llvm/trunk/docs/AdvancedGetElementPtr.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/AdvancedGetElementPtr.html?rev=97139&r1=97138&r2=97139&view=diff ============================================================================== --- llvm/trunk/docs/AdvancedGetElementPtr.html (original) +++ llvm/trunk/docs/AdvancedGetElementPtr.html Thu Feb 25 09:53:42 2010 @@ -281,10 +281,6 @@ not recommended. It leads to awkward special cases in the optimizers. In the future, it may be outright disallowed.

    -

    Instead, you should cast your pointer types and use arrays instead of - vectors for addressing. Arrays have the same in-memory representation - as vectors, so the addressing is interchangeable.

    - From gohman at apple.com Thu Feb 25 09:55:28 2010 From: gohman at apple.com (Dan Gohman) Date: Thu, 25 Feb 2010 15:55:28 -0000 Subject: [llvm-commits] [llvm] r97140 - /llvm/trunk/include/llvm/Constants.h Message-ID: <20100225155529.0198D2A6C12C@llvm.org> Author: djg Date: Thu Feb 25 09:55:28 2010 New Revision: 97140 URL: http://llvm.org/viewvc/llvm-project?rev=97140&view=rev Log: Add more information to the getSizeOf comment. Modified: llvm/trunk/include/llvm/Constants.h Modified: llvm/trunk/include/llvm/Constants.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Constants.h?rev=97140&r1=97139&r2=97140&view=diff ============================================================================== --- llvm/trunk/include/llvm/Constants.h (original) +++ llvm/trunk/include/llvm/Constants.h Thu Feb 25 09:55:28 2010 @@ -698,8 +698,9 @@ /// independent way (Note: the return type is an i64). static Constant *getAlignOf(const Type* Ty); - /// getSizeOf constant expr - computes the size of a type in a target - /// independent way (Note: the return type is an i64). + /// getSizeOf constant expr - computes the (alloc) size of a type (in + /// address-units, not bits) in a target independent way (Note: the return + /// type is an i64). /// static Constant *getSizeOf(const Type* Ty); From gohman at apple.com Thu Feb 25 10:05:33 2010 From: gohman at apple.com (Dan Gohman) Date: Thu, 25 Feb 2010 16:05:33 -0000 Subject: [llvm-commits] [llvm] r97141 - /llvm/trunk/lib/VMCore/ConstantFold.cpp Message-ID: <20100225160533.AB74A2A6C12C@llvm.org> Author: djg Date: Thu Feb 25 10:05:33 2010 New Revision: 97141 URL: http://llvm.org/viewvc/llvm-project?rev=97141&view=rev Log: Remove code which assumes it knows how vectors are stored in memory. Modified: llvm/trunk/lib/VMCore/ConstantFold.cpp Modified: llvm/trunk/lib/VMCore/ConstantFold.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ConstantFold.cpp?rev=97141&r1=97140&r2=97141&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/ConstantFold.cpp (original) +++ llvm/trunk/lib/VMCore/ConstantFold.cpp Thu Feb 25 10:05:33 2010 @@ -334,11 +334,7 @@ Constant *E = getFoldedSizeOf(ATy->getElementType(), DestTy, true); return ConstantExpr::getNUWMul(E, N); } - if (const VectorType *VTy = dyn_cast(Ty)) { - Constant *N = ConstantInt::get(DestTy, VTy->getNumElements()); - Constant *E = getFoldedSizeOf(VTy->getElementType(), DestTy, true); - return ConstantExpr::getNUWMul(E, N); - } + if (const StructType *STy = dyn_cast(Ty)) if (!STy->isPacked()) { unsigned NumElems = STy->getNumElements(); @@ -464,13 +460,7 @@ Constant *E = getFoldedSizeOf(ATy->getElementType(), DestTy, true); return ConstantExpr::getNUWMul(E, N); } - if (const VectorType *VTy = dyn_cast(Ty)) { - Constant *N = ConstantExpr::getCast(CastInst::getCastOpcode(FieldNo, false, - DestTy, false), - FieldNo, DestTy); - Constant *E = getFoldedSizeOf(VTy->getElementType(), DestTy, true); - return ConstantExpr::getNUWMul(E, N); - } + if (const StructType *STy = dyn_cast(Ty)) if (!STy->isPacked()) { unsigned NumElems = STy->getNumElements(); From gohman at apple.com Thu Feb 25 10:45:19 2010 From: gohman at apple.com (Dan Gohman) Date: Thu, 25 Feb 2010 16:45:19 -0000 Subject: [llvm-commits] [llvm] r97142 - in /llvm/trunk: lib/VMCore/ConstantFold.cpp test/Other/constant-fold-gep.ll Message-ID: <20100225164519.3B4872A6C12C@llvm.org> Author: djg Date: Thu Feb 25 10:45:19 2010 New Revision: 97142 URL: http://llvm.org/viewvc/llvm-project?rev=97142&view=rev Log: Teach the constant folder about union types. Modified: llvm/trunk/lib/VMCore/ConstantFold.cpp llvm/trunk/test/Other/constant-fold-gep.ll Modified: llvm/trunk/lib/VMCore/ConstantFold.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ConstantFold.cpp?rev=97142&r1=97141&r2=97142&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/ConstantFold.cpp (original) +++ llvm/trunk/lib/VMCore/ConstantFold.cpp Thu Feb 25 10:45:19 2010 @@ -357,6 +357,22 @@ } } + if (const UnionType *UTy = dyn_cast(Ty)) { + unsigned NumElems = UTy->getNumElements(); + // Check for a union with all members having the same size. + Constant *MemberSize = + getFoldedSizeOf(UTy->getElementType(0), DestTy, true); + bool AllSame = true; + for (unsigned i = 1; i != NumElems; ++i) + if (MemberSize != + getFoldedSizeOf(UTy->getElementType(i), DestTy, true)) { + AllSame = false; + break; + } + if (AllSame) + return MemberSize; + } + // Pointer size doesn't depend on the pointee type, so canonicalize them // to an arbitrary pointee. if (const PointerType *PTy = dyn_cast(Ty)) @@ -422,6 +438,24 @@ return MemberAlign; } + if (const UnionType *UTy = dyn_cast(Ty)) { + // Union alignment is the maximum alignment of any member. + // Without target data, we can't compare much, but we can check to see + // if all the members have the same alignment. + unsigned NumElems = UTy->getNumElements(); + // Check for a union with all members having the same alignment. + Constant *MemberAlign = + getFoldedAlignOf(UTy->getElementType(0), DestTy, true); + bool AllSame = true; + for (unsigned i = 1; i != NumElems; ++i) + if (MemberAlign != getFoldedAlignOf(UTy->getElementType(i), DestTy, true)) { + AllSame = false; + break; + } + if (AllSame) + return MemberAlign; + } + // Pointer alignment doesn't depend on the pointee type, so canonicalize them // to an arbitrary pointee. if (const PointerType *PTy = dyn_cast(Ty)) Modified: llvm/trunk/test/Other/constant-fold-gep.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/constant-fold-gep.ll?rev=97142&r1=97141&r2=97142&view=diff ============================================================================== --- llvm/trunk/test/Other/constant-fold-gep.ll (original) +++ llvm/trunk/test/Other/constant-fold-gep.ll Thu Feb 25 10:45:19 2010 @@ -69,6 +69,8 @@ ; PLAIN: @g = constant i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64) ; PLAIN: @h = constant i64 ptrtoint (i1** getelementptr (i1** null, i32 1) to i64) ; PLAIN: @i = constant i64 ptrtoint (i1** getelementptr (%2* null, i64 0, i32 1) to i64) +; PLAIN: @j = constant i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64) +; PLAIN: @k = constant i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64) ; OPT: @a = constant i64 mul (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 2310) ; OPT: @b = constant i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64) ; OPT: @c = constant i64 mul (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 2) @@ -78,6 +80,8 @@ ; OPT: @g = constant i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64) ; OPT: @h = constant i64 ptrtoint (i1** getelementptr (i1** null, i32 1) to i64) ; OPT: @i = constant i64 ptrtoint (i1** getelementptr (%2* null, i64 0, i32 1) to i64) +; OPT: @j = constant i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64) +; OPT: @k = constant i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64) ; TO: @a = constant i64 18480 ; TO: @b = constant i64 8 ; TO: @c = constant i64 16 @@ -87,6 +91,8 @@ ; TO: @g = constant i64 8 ; TO: @h = constant i64 8 ; TO: @i = constant i64 8 +; TO: @j = constant i64 8 +; TO: @k = constant i64 8 @a = constant i64 mul (i64 3, i64 mul (i64 ptrtoint ({[7 x double], [7 x double]}* getelementptr ({[7 x double], [7 x double]}* null, i64 11) to i64), i64 5)) @b = constant i64 ptrtoint ([13 x double]* getelementptr ({i1, [13 x double]}* null, i64 0, i32 1) to i64) @@ -97,6 +103,8 @@ @g = constant i64 ptrtoint ({double, double}* getelementptr ({i1, {double, double}}* null, i64 0, i32 1) to i64) @h = constant i64 ptrtoint (double** getelementptr (double** null, i64 1) to i64) @i = constant i64 ptrtoint (double** getelementptr ({i1, double*}* null, i64 0, i32 1) to i64) + at j = constant i64 ptrtoint (union {double, double}* getelementptr ({i1, union {double, double}}* null, i64 0, i32 1) to i64) + at k = constant i64 ptrtoint (union {double, double}* getelementptr (union {double, double}* null, i64 1) to i64) ; The target-dependent folder should cast GEP indices to integer-sized pointers. @@ -244,15 +252,23 @@ ; PLAIN: ret i64 %t ; PLAIN: } ; PLAIN: define i64 @fg() nounwind { -; PLAIN: %t = bitcast i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64) +; PLAIN: %t = bitcast i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64) to i64 ; PLAIN: ret i64 %t ; PLAIN: } ; PLAIN: define i64 @fh() nounwind { -; PLAIN: %t = bitcast i64 ptrtoint (i1** getelementptr (i1** null, i32 1) to i64) +; PLAIN: %t = bitcast i64 ptrtoint (i1** getelementptr (i1** null, i32 1) to i64) to i64 ; PLAIN: ret i64 %t ; PLAIN: } ; PLAIN: define i64 @fi() nounwind { -; PLAIN: %t = bitcast i64 ptrtoint (i1** getelementptr (%2* null, i64 0, i32 1) to i64) +; PLAIN: %t = bitcast i64 ptrtoint (i1** getelementptr (%2* null, i64 0, i32 1) to i64) to i64 +; PLAIN: ret i64 %t +; PLAIN: } +; PLAIN: define i64 @fj() nounwind { +; PLAIN: %t = bitcast i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64) to i64 +; PLAIN: ret i64 %t +; PLAIN: } +; PLAIN: define i64 @fk() nounwind { +; PLAIN: %t = bitcast i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64) to i64 ; PLAIN: ret i64 %t ; PLAIN: } ; OPT: define i64 @fa() nounwind { @@ -282,6 +298,12 @@ ; OPT: define i64 @fi() nounwind { ; OPT: ret i64 ptrtoint (i1** getelementptr (%2* null, i64 0, i32 1) to i64) ; OPT: } +; OPT: define i64 @fj() nounwind { +; OPT: ret i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64) +; OPT: } +; OPT: define i64 @fk() nounwind { +; OPT: ret i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64) +; OPT: } ; TO: define i64 @fa() nounwind { ; TO: ret i64 18480 ; TO: } @@ -309,6 +331,12 @@ ; TO: define i64 @fi() nounwind { ; TO: ret i64 8 ; TO: } +; TO: define i64 @fj() nounwind { +; TO: ret i64 8 +; TO: } +; TO: define i64 @fk() nounwind { +; TO: ret i64 8 +; TO: } ; SCEV: Classifying expressions for: @fa ; SCEV: %t = bitcast i64 mul (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 2310) to i64 ; SCEV: --> (2310 * sizeof(double)) @@ -328,14 +356,20 @@ ; SCEV: %t = bitcast i64 1 to i64 ; SCEV: --> 1 ; SCEV: Classifying expressions for: @fg -; SCEV: %t = bitcast i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64) +; SCEV: %t = bitcast i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64) to i64 ; SCEV: --> alignof(double) ; SCEV: Classifying expressions for: @fh -; SCEV: %t = bitcast i64 ptrtoint (i1** getelementptr (i1** null, i32 1) to i64) +; SCEV: %t = bitcast i64 ptrtoint (i1** getelementptr (i1** null, i32 1) to i64) to i64 ; SCEV: --> sizeof(i1*) ; SCEV: Classifying expressions for: @fi -; SCEV: %t = bitcast i64 ptrtoint (i1** getelementptr (%2* null, i64 0, i32 1) to i64) +; SCEV: %t = bitcast i64 ptrtoint (i1** getelementptr (%2* null, i64 0, i32 1) to i64) to i64 ; SCEV: --> alignof(i1*) +; SCEV: Classifying expressions for: @fj +; SCEV: %t = bitcast i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64) to i64 +; SCEV: --> alignof(double) +; SCEV: Classifying expressions for: @fk +; SCEV: %t = bitcast i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64) to i64 +; SCEV: --> sizeof(double) define i64 @fa() nounwind { %t = bitcast i64 mul (i64 3, i64 mul (i64 ptrtoint ({[7 x double], [7 x double]}* getelementptr ({[7 x double], [7 x double]}* null, i64 11) to i64), i64 5)) to i64 @@ -373,6 +407,14 @@ %t = bitcast i64 ptrtoint (double** getelementptr ({i1, double*}* null, i64 0, i32 1) to i64) to i64 ret i64 %t } +define i64 @fj() nounwind { + %t = bitcast i64 ptrtoint (union {double, double}* getelementptr ({i1, union {double, double}}* null, i64 0, i32 1) to i64) to i64 + ret i64 %t +} +define i64 @fk() nounwind { + %t = bitcast i64 ptrtoint (union {double, double}* getelementptr (union {double, double}* null, i64 1) to i64) to i64 + ret i64 %t +} ; PLAIN: define i64* @fM() nounwind { ; PLAIN: %t = bitcast i64* getelementptr (i64* null, i32 1) to i64* From gohman at apple.com Thu Feb 25 10:50:08 2010 From: gohman at apple.com (Dan Gohman) Date: Thu, 25 Feb 2010 16:50:08 -0000 Subject: [llvm-commits] [llvm] r97143 - /llvm/trunk/docs/LangRef.html Message-ID: <20100225165008.2CD022A6C12C@llvm.org> Author: djg Date: Thu Feb 25 10:50:07 2010 New Revision: 97143 URL: http://llvm.org/viewvc/llvm-project?rev=97143&view=rev Log: Clarify the description of pointer types, and move the address space content to its own paragraph. Modified: llvm/trunk/docs/LangRef.html Modified: llvm/trunk/docs/LangRef.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=97143&r1=97142&r2=97143&view=diff ============================================================================== --- llvm/trunk/docs/LangRef.html (original) +++ llvm/trunk/docs/LangRef.html Thu Feb 25 10:50:07 2010 @@ -1827,10 +1827,13 @@
    Overview:
    -

    As in many languages, the pointer type represents a pointer or reference to - another object, which must live in memory. Pointer types may have an optional - address space attribute defining the target-specific numbered address space - where the pointed-to object resides. The default address space is zero.

    +

    The pointer type is used to specify memory locations. + Pointers are commonly used to reference objects in memory.

    + +

    Pointer types may have an optional address space attribute defining the + numbered address space where the pointed-to object resides. The default + address space is number zero. The semantics of non-zero address + spaces are target-specific.

    Note that LLVM does not permit pointers to void (void*) nor does it permit pointers to labels (label*). Use i8* instead.

    From gohman at apple.com Thu Feb 25 10:51:32 2010 From: gohman at apple.com (Dan Gohman) Date: Thu, 25 Feb 2010 16:51:32 -0000 Subject: [llvm-commits] [llvm] r97144 - /llvm/trunk/docs/LangRef.html Message-ID: <20100225165132.28D992A6C12C@llvm.org> Author: djg Date: Thu Feb 25 10:51:31 2010 New Revision: 97144 URL: http://llvm.org/viewvc/llvm-project?rev=97144&view=rev Log: Fix a typo. Modified: llvm/trunk/docs/LangRef.html Modified: llvm/trunk/docs/LangRef.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=97144&r1=97143&r2=97144&view=diff ============================================================================== --- llvm/trunk/docs/LangRef.html (original) +++ llvm/trunk/docs/LangRef.html Thu Feb 25 10:51:31 2010 @@ -1792,7 +1792,7 @@ and the alignment requirements of the union as a whole will be the largest alignment requirement of any member.

    -

    Unions members are accessed using 'load and +

    Union members are accessed using 'load and 'store' by getting a pointer to a field with the 'getelementptr' instruction. Since all members are at offset zero, the getelementptr instruction does From sabre at nondot.org Thu Feb 25 11:39:34 2010 From: sabre at nondot.org (Chris Lattner) Date: Thu, 25 Feb 2010 17:39:34 -0000 Subject: [llvm-commits] [llvm] r97148 - /llvm/trunk/include/llvm/Target/TargetSelectionDAG.td Message-ID: <20100225173934.33A7E2A6C12C@llvm.org> Author: lattner Date: Thu Feb 25 11:39:34 2010 New Revision: 97148 URL: http://llvm.org/viewvc/llvm-project?rev=97148&view=rev Log: remove a dead PatLeaf, I previously changed all uses to use -1 instead. Modified: llvm/trunk/include/llvm/Target/TargetSelectionDAG.td Modified: llvm/trunk/include/llvm/Target/TargetSelectionDAG.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetSelectionDAG.td?rev=97148&r1=97147&r2=97148&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetSelectionDAG.td (original) +++ llvm/trunk/include/llvm/Target/TargetSelectionDAG.td Thu Feb 25 11:39:34 2010 @@ -479,7 +479,6 @@ def vtInt : PatLeaf<(vt), [{ return N->getVT().isInteger(); }]>; def vtFP : PatLeaf<(vt), [{ return N->getVT().isFloatingPoint(); }]>; -def immAllOnes : PatLeaf<(imm), [{ return N->isAllOnesValue(); }]>; def immAllOnesV: PatLeaf<(build_vector), [{ return ISD::isBuildVectorAllOnes(N); }]>; From johnny.chen at apple.com Thu Feb 25 11:51:03 2010 From: johnny.chen at apple.com (Johnny Chen) Date: Thu, 25 Feb 2010 17:51:03 -0000 Subject: [llvm-commits] [llvm] r97149 - /llvm/trunk/lib/Target/ARM/ARMInstrThumb.td Message-ID: <20100225175103.B7E062A6C12C@llvm.org> Author: johnny Date: Thu Feb 25 11:51:03 2010 New Revision: 97149 URL: http://llvm.org/viewvc/llvm-project?rev=97149&view=rev Log: Added the following 16-bit Thumb instructions for disassembly only: YIELD, WFE, WFI, SEV, SETEND. Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb.td?rev=97149&r1=97148&r2=97149&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrThumb.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrThumb.td Thu Feb 25 11:51:03 2010 @@ -142,6 +142,48 @@ let Inst{7-0} = 0b00000000; } +def tYIELD : T1pI<(outs), (ins), NoItinerary, "yield", "", + [/* For disassembly only; pattern left blank */]>, + T1Encoding<0b101111> { + let Inst{9-8} = 0b11; + let Inst{7-0} = 0b00010000; +} + +def tWFE : T1pI<(outs), (ins), NoItinerary, "wfe", "", + [/* For disassembly only; pattern left blank */]>, + T1Encoding<0b101111> { + let Inst{9-8} = 0b11; + let Inst{7-0} = 0b00100000; +} + +def tWFI : T1pI<(outs), (ins), NoItinerary, "wfi", "", + [/* For disassembly only; pattern left blank */]>, + T1Encoding<0b101111> { + let Inst{9-8} = 0b11; + let Inst{7-0} = 0b00110000; +} + +def tSEV : T1pI<(outs), (ins), NoItinerary, "sev", "", + [/* For disassembly only; pattern left blank */]>, + T1Encoding<0b101111> { + let Inst{9-8} = 0b11; + let Inst{7-0} = 0b01000000; +} + +def tSETENDBE : T1I<(outs), (ins), NoItinerary, "setend\tbe", + [/* For disassembly only; pattern left blank */]>, + T1Encoding<0b101101> { + let Inst{9-5} = 0b10010; + let Inst{3} = 1; +} + +def tSETENDLE : T1I<(outs), (ins), NoItinerary, "setend\tle", + [/* For disassembly only; pattern left blank */]>, + T1Encoding<0b101101> { + let Inst{9-5} = 0b10010; + let Inst{3} = 0; +} + // The i32imm operand $val can be used by a debugger to store more information // about the breakpoint. def tBKPT : T1I<(outs), (ins i32imm:$val), NoItinerary, "bkpt\t$val", From dpatel at apple.com Thu Feb 25 11:54:19 2010 From: dpatel at apple.com (Devang Patel) Date: Thu, 25 Feb 2010 09:54:19 -0800 Subject: [llvm-commits] [llvm] r97132 - in /llvm/trunk/lib/Bitcode: Reader/BitcodeReader.cpp Writer/ValueEnumerator.cpp In-Reply-To: <20100225083017.D9FE12A6C130@llvm.org> References: <20100225083017.D9FE12A6C130@llvm.org> Message-ID: On Feb 25, 2010, at 12:30 AM, Nick Lewycky wrote: > Author: nicholas > Date: Thu Feb 25 02:30:17 2010 > New Revision: 97132 > > URL: http://llvm.org/viewvc/llvm-project?rev=97132&view=rev > Log: > Make the side-numbering of instructions used by metadata (which is needed to > keep track of instructions that return void) per-function It is used to connect metadata with respective instruction when metadata is attached with an instruction. - Devang -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20100225/f11c49c5/attachment.html From daniel at zuster.org Thu Feb 25 12:07:07 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Thu, 25 Feb 2010 18:07:07 -0000 Subject: [llvm-commits] [llvm] r97150 - in /llvm/trunk/utils/git: ./ find-rev Message-ID: <20100225180707.E313F2A6C12E@llvm.org> Author: ddunbar Date: Thu Feb 25 12:07:07 2010 New Revision: 97150 URL: http://llvm.org/viewvc/llvm-project?rev=97150&view=rev Log: Add simple script for finding most-recent-rev-before-N in a git-svn repo; useful when bisecting multiple repos in sync. Added: llvm/trunk/utils/git/ llvm/trunk/utils/git/find-rev (with props) Added: llvm/trunk/utils/git/find-rev URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/git/find-rev?rev=97150&view=auto ============================================================================== --- llvm/trunk/utils/git/find-rev (added) +++ llvm/trunk/utils/git/find-rev Thu Feb 25 12:07:07 2010 @@ -0,0 +1,50 @@ +#!/usr/bin/python + +import os, sys, subprocess + +def main(): + from optparse import OptionParser, OptionGroup + parser = OptionParser("usage: %prog [options] ") + parser.add_option("", "--dump-section-data", dest="dumpSectionData", + help="Dump the contents of sections", + action="store_true", default=False) + (opts, args) = parser.parse_args() + + if len(args) != 2: + parser.error("invalid number of arguments") + + repo,rev = args + + try: + rev = int(rev) + except: + parser.error("invalid revision argument (not an integer)") + + os.chdir(repo) + p = subprocess.Popen(['git', 'rev-list', 'git-svn', '--pretty'], + stdout=subprocess.PIPE) + + bestRev = bestCommit = None + lastCommit = None + for ln in p.stdout: + if ln.startswith('commit '): + lastCommit = ln.split(' ',2)[1] + elif ln.startswith(' git-svn-id: '): + _,repo,_ = ln.strip().split(' ') + _,lrev = repo.rsplit('@',1) + lrev = int(lrev) + if lrev<=rev: + if bestRev is None or lrev>bestRev: + assert lastCommit + bestCommit = lastCommit + bestRev = lrev + if lrev == rev: + break + + if bestCommit is not None: + print bestCommit + sys.exit(0) + sys.exit(1) + +if __name__=='__main__': + main() Propchange: llvm/trunk/utils/git/find-rev ------------------------------------------------------------------------------ svn:executable = * From daniel at zuster.org Thu Feb 25 12:07:10 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Thu, 25 Feb 2010 18:07:10 -0000 Subject: [llvm-commits] [llvm] r97151 - /llvm/trunk/lib/Target/X86/X86MCAsmInfo.cpp Message-ID: <20100225180710.A0A012A6C12F@llvm.org> Author: ddunbar Date: Thu Feb 25 12:07:10 2010 New Revision: 97151 URL: http://llvm.org/viewvc/llvm-project?rev=97151&view=rev Log: Fix TextAlignFillValue in a few places Modified: llvm/trunk/lib/Target/X86/X86MCAsmInfo.cpp Modified: llvm/trunk/lib/Target/X86/X86MCAsmInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCAsmInfo.cpp?rev=97151&r1=97150&r2=97151&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86MCAsmInfo.cpp (original) +++ llvm/trunk/lib/Target/X86/X86MCAsmInfo.cpp Thu Feb 25 12:07:10 2010 @@ -75,6 +75,8 @@ AsmTransCBE = x86_asm_table; AssemblerDialect = AsmWriterFlavor; + TextAlignFillValue = 0x90; + PrivateGlobalPrefix = ".L"; WeakRefDirective = "\t.weak\t"; PCSymbol = "."; @@ -99,4 +101,6 @@ X86MCAsmInfoCOFF::X86MCAsmInfoCOFF(const Triple &Triple) { AsmTransCBE = x86_asm_table; AssemblerDialect = AsmWriterFlavor; + + TextAlignFillValue = 0x90; } From gohman at apple.com Thu Feb 25 12:16:04 2010 From: gohman at apple.com (Dan Gohman) Date: Thu, 25 Feb 2010 18:16:04 -0000 Subject: [llvm-commits] [llvm] r97154 - in /llvm/trunk/docs: AdvancedGetElementPtr.html GetElementPtr.html index.html Message-ID: <20100225181604.1FAAA2A6C12F@llvm.org> Author: djg Date: Thu Feb 25 12:16:03 2010 New Revision: 97154 URL: http://llvm.org/viewvc/llvm-project?rev=97154&view=rev Log: Merge the advanced getelementptr FAQ into the regular getelementptr FAQ. Removed: llvm/trunk/docs/AdvancedGetElementPtr.html Modified: llvm/trunk/docs/GetElementPtr.html llvm/trunk/docs/index.html Removed: llvm/trunk/docs/AdvancedGetElementPtr.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/AdvancedGetElementPtr.html?rev=97153&view=auto ============================================================================== --- llvm/trunk/docs/AdvancedGetElementPtr.html (original) +++ llvm/trunk/docs/AdvancedGetElementPtr.html (removed) @@ -1,358 +0,0 @@ - - - - - The Revenge Of The Often Misunderstood GEP Instruction - - - - - -

    - The Revenge Of The Often Misunderstood GEP Instruction -
    - - - - -
    -

    GEP was mysterious and wily at first, but it turned out that the basic - workings were fairly comprehensible. However the dragon was merely subdued; - now it's back, and it has more fundamental complexity to confront. This - document seeks to uncover misunderstandings of the GEP operator that tend - to persist past initial confusion about the funky "extra 0" thing. Here we - show that the GEP instruction is really not quite as simple as it seems, - even after the initial confusion is overcome.

    -
    - - - -
    -

    It's very similar; there are only subtle differences.

    - -

    With ptrtoint, you have to pick an integer type. One approach is to pick i64; - this is safe on everything LLVM supports (LLVM internally assumes pointers - are never wider than 64 bits in many places), and the optimizer will actually - narrow the i64 arithmetic down to the actual pointer size on targets which - don't support 64-bit arithmetic in most cases. However, there are some cases - where it doesn't do this. With GEP you can avoid this problem. - -

    Also, GEP carries additional pointer aliasing rules. It's invalid to take a - GEP from one object, address into a different separately allocated - object, and dereference it. IR producers (front-ends) must follow this rule, - and consumers (optimizers, specifically alias analysis) benefit from being - able to rely on it.

    - -

    And, GEP is more concise in common cases.

    - -

    However, for the underlying integer computation implied, there - is no difference.

    - -
    - - - -
    -

    You don't. The integer computation implied by a GEP is target-independent. - Typically what you'll need to do is make your backend pattern-match - expressions trees involving ADD, MUL, etc., which are what GEP is lowered - into. This has the advantage of letting your code work correctly in more - cases.

    - -

    GEP does use target-dependent parameters for the size and layout of data - types, which targets can customize.

    - -

    If you require support for addressing units which are not 8 bits, you'll - need to fix a lot of code in the backend, with GEP lowering being only a - small piece of the overall picture.

    - -
    - - - -
    -

    The specific type i32 is probably just a historical artifact, however it's - wide enough for all practical purposes, so there's been no need to change it. - It doesn't necessarily imply i32 address arithmetic; it's just an identifier - which identifies a field in a struct. Requiring that all struct indices be - the same reduces the range of possibilities for cases where two GEPs are - effectively the same but have distinct operand types.

    - -
    - - - -
    -

    GEPs don't natively support VLAs. LLVM's type system is entirely static, - and GEP address computations are guided by an LLVM type.

    - -

    VLA indices can be implemented as linearized indices. For example, an - expression like X[a][b][c], must be effectively lowered into a form - like X[a*m+b*n+c], so that it appears to the GEP as a single-dimensional - array reference.

    - -

    This means if you want to write an analysis which understands array - indices and you want to support VLAs, your code will have to be - prepared to reverse-engineer the linearization. One way to solve this - problem is to use the ScalarEvolution library, which always presents - VLA and non-VLA indexing in the same manner.

    - -
    - - - -
    -

    There are two senses in which an array index can be out of bounds.

    - -

    First, there's the array type which comes from the (static) type of - the first operand to the GEP. Indices greater than the number of elements - in the corresponding static array type are valid. There is no problem with - out of bounds indices in this sense. Indexing into an array only depends - on the size of the array element, not the number of elements.

    - -

    A common example of how this is used is arrays where the size is not known. - It's common to use array types with zero length to represent these. The - fact that the static type says there are zero elements is irrelevant; it's - perfectly valid to compute arbitrary element indices, as the computation - only depends on the size of the array element, not the number of - elements. Note that zero-sized arrays are not a special case here.

    - -

    This sense is unconnected with inbounds keyword. The - inbounds keyword is designed to describe low-level pointer - arithmetic overflow conditions, rather than high-level array - indexing rules. - -

    Analysis passes which wish to understand array indexing should not - assume that the static array type bounds are respected.

    - -

    The second sense of being out of bounds is computing an address that's - beyond the actual underlying allocated object.

    - -

    With the inbounds keyword, the result value of the GEP is - undefined if the address is outside the actual underlying allocated - object and not the address one-past-the-end.

    - -

    Without the inbounds keyword, there are no restrictions - on computing out-of-bounds addresses. Obviously, performing a load or - a store requires an address of allocated and sufficiently aligned - memory. But the GEP itself is only concerned with computing addresses.

    - -
    - - - -
    -

    Yes. This is basically a special case of array indices being out - of bounds.

    - -
    - - - -
    -

    Yes. If both addresses are within the same allocated object, or - one-past-the-end, you'll get the comparison result you expect. If either - is outside of it, integer arithmetic wrapping may occur, so the - comparison may not be meaningful.

    - -
    - - - -
    -

    Yes. There are no restrictions on bitcasting a pointer value to an arbitrary - pointer type. The types in a GEP serve only to define the parameters for the - underlying integer computation. They need not correspond with the actual - type of the underlying object.

    - -

    Furthermore, loads and stores don't have to use the same types as the type - of the underlying object. Types in this context serve only to specify - memory size and alignment. Beyond that there are merely a hint to the - optimizer indicating how the value will likely be used.

    - -
    - - - -
    -

    You can compute an address that way, but if you use GEP to do the add, - you can't use that pointer to actually access the object, unless the - object is managed outside of LLVM.

    - -

    The underlying integer computation is sufficiently defined; null has a - defined value -- zero -- and you can add whatever value you want to it.

    - -

    However, it's invalid to access (load from or store to) an LLVM-aware - object with such a pointer. This includes GlobalVariables, Allocas, and - objects pointed to by noalias pointers.

    - -

    If you really need this functionality, you can do the arithmetic with - explicit integer instructions, and use inttoptr to convert the result to - an address. Most of GEP's special aliasing rules do not apply to pointers - computed from ptrtoint, arithmetic, and inttoptr sequences.

    - -
    - - - -
    -

    As with arithmetic on null, You can use GEP to compute an address that - way, but you can't use that pointer to actually access the object if you - do, unless the object is managed outside of LLVM.

    - -

    Also as above, ptrtoint and inttoptr provide an alternative way to do this - which do not have this restriction.

    - -
    - - - -
    -

    You can't do type-based alias analysis using LLVM's built-in type system, - because LLVM has no restrictions on mixing types in addressing, loads or - stores.

    - -

    It would be possible to add special annotations to the IR, probably using - metadata, to describe a different type system (such as the C type system), - and do type-based aliasing on top of that. This is a much bigger - undertaking though.

    - -
    - - - - -
    -

    Some LLVM optimizers operate on GEPs by internally lowering them into - more primitive integer expressions, which allows them to be combined - with other integer expressions and/or split into multiple separate - integer expressions. If they've made non-trivial changes, translating - back into LLVM IR can involve reverse-engineering the structure of - the addressing in order to fit it into the static type of the original - first operand. It isn't always possibly to fully reconstruct this - structure; sometimes the underlying addressing doesn't correspond with - the static type at all. In such cases the optimizer instead will emit - a GEP with the base pointer casted to a simple address-unit pointer, - using the name "uglygep". This isn't pretty, but it's just as - valid, and it's sufficient to preserve the pointer aliasing guarantees - that GEP provides.

    - -
    - - - - -
    -

    Sort of. This hasn't always been forcefully disallowed, though it's - not recommended. It leads to awkward special cases in the optimizers. - In the future, it may be outright disallowed.

    - -
    - - - - -
    -

    Unknown.

    - -
    - - - - -
    -

    If the GEP has the inbounds keyword, the result value is - undefined.

    - -

    Otherwise, the result value is the result from evaluating the implied - two's complement integer computation. However, since there's no - guarantee of where an object will be allocated in the address space, - such values have limited meaning.

    - -
    - - - - -
    -

    None, except that the address space qualifier on the first operand pointer - type always matches the address space qualifier on the result type.

    - -
    - - - - -
    -

    The design of GEP has the following goals, in rough unofficial - order of priority:

    -
      -
    • Support C, C-like languages, and languages which can be - conceptually lowered into C (this covers a lot).
    • -
    • Support optimizations such as those that are common in - C compilers.
    • -
    • Provide a consistent method for computing addresses so that - address computations don't need to be a part of load and - store instructions in the IR.
    • -
    • Support non-C-like languages, to the extent that it doesn't - interfere with other goals.
    • -
    • Minimize target-specific information in the IR.
    • -
    -
    - - - -
    -
    - Valid CSS - Valid HTML 4.01 - The LLVM Compiler Infrastructure
    - Last modified: $Date$ -
    - - - Modified: llvm/trunk/docs/GetElementPtr.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/GetElementPtr.html?rev=97154&r1=97153&r2=97154&view=diff ============================================================================== --- llvm/trunk/docs/GetElementPtr.html (original) +++ llvm/trunk/docs/GetElementPtr.html Thu Feb 25 12:16:03 2010 @@ -17,7 +17,7 @@
    1. Introduction
    2. -
    3. The Questions +
    4. Address Computation
      1. Why is the extra 0 index required?
      2. What is dereferenced by GEP?
      3. @@ -25,6 +25,30 @@ subsequent ones?
      4. Why don't GEP x,0,0,1 and GEP x,1 alias?
      5. Why do GEP x,1,0,0 and GEP x,1 alias?
      6. +
      7. Can GEP index into vector elements? +
      8. Can GEP index into unions? +
      9. What effect do address spaces have on GEPs? +
      10. How is GEP different from ptrtoint, arithmetic, and inttoptr?
      11. +
      12. I'm writing a backend for a target which needs custom lowering for GEP. How do I do this? +
      13. How does VLA addressing work with GEPs? +
    5. +
    6. Rules +
        +
      1. What happens if an array index is out of bounds? +
      2. Can array indices be negative? +
      3. Can I compare two values computed with GEPs? +
      4. Can I do GEP with a different pointer type than the type of the underlying object? +
      5. Can I cast an object's address to integer and add it to null? +
      6. Can I compute the distance between two objects, and add that value to one address to compute the other address? +
      7. Can I do type-based alias analysis on LLVM IR? +
      8. What happens if a GEP computation overflows? +
      9. How can I tell if my front-end is following the rules? +
    7. +
    8. Rationale +
        +
      1. Why is GEP designed this way?
      2. +
      3. Why do struct member indices always use i32?
      4. +
      5. What's an uglygep?
    9. Summary
    @@ -37,9 +61,10 @@ +

    This document seeks to dispel the mystery and confusion surrounding LLVM's - GetElementPtr (GEP) instruction. Questions about the wiley GEP instruction are + GetElementPtr (GEP) instruction. Questions about the wily GEP instruction are probably the most frequently occurring questions once a developer gets down to coding with LLVM. Here we lay out the sources of confusion and show that the GEP instruction is really quite simple. @@ -47,22 +72,14 @@

    - +

    When people are first confronted with the GEP instruction, they tend to relate it to known concepts from other programming paradigms, most notably C - array indexing and field selection. However, GEP is a little different and - this leads to the following questions; all of which are answered in the - following sections.

    -
      -
    1. What is the first index of the GEP instruction? -
    2. -
    3. Why is the extra 0 index required?
    4. -
    5. What is dereferenced by GEP?
    6. -
    7. Why don't GEP x,0,0,1 and GEP x,1 alias?
    8. -
    9. Why do GEP x,1,0,0 and GEP x,1 alias?
    10. -
    + array indexing and field selection. GEP closely resembles C array indexing + and field selection, however it's is a little different and this leads to + the following questions.

    @@ -85,7 +102,7 @@

    it is natural to think that there is only one index, the selection of the field F. However, in this example, Foo is a pointer. That - pointer must be indexed explicitly in LLVM. C, on the other hand, indexs + pointer must be indexed explicitly in LLVM. C, on the other hand, indices through it transparently. To arrive at the same address location as the C code, you would provide the GEP instruction with two index operands. The first operand indexes through the pointer; the second operand indexes the @@ -155,7 +172,7 @@

    -%MyVar = unintialized global i32
    +%MyVar = uninitialized global i32
     ...
     %idx1 = getelementptr i32* %MyVar, i64 0
     %idx2 = getelementptr i32* %MyVar, i64 1
    @@ -210,7 +227,7 @@
       field of the structure %MyStruct. When people first look at it, they 
       wonder why the i64 0 index is needed. However, a closer inspection 
       of how globals and GEPs work reveals the need. Becoming aware of the following
    -  facts will dispell the confusion:

    + facts will dispel the confusion:

    1. The type of %MyStruct is not { float*, i32 } but rather { float*, i32 }*. That is, %MyStruct is a @@ -297,8 +314,8 @@
       %MyVar = global { [10 x i32 ] }
      -%idx1 = getlementptr { [10 x i32 ] }* %MyVar, i64 0, i32 0, i64 1
      -%idx2 = getlementptr { [10 x i32 ] }* %MyVar, i64 1
      +%idx1 = getelementptr { [10 x i32 ] }* %MyVar, i64 0, i32 0, i64 1
      +%idx2 = getelementptr { [10 x i32 ] }* %MyVar, i64 1
       
      @@ -326,8 +343,8 @@
       %MyVar = global { [10 x i32 ] }
      -%idx1 = getlementptr { [10 x i32 ] }* %MyVar, i64 1, i32 0, i64 0
      -%idx2 = getlementptr { [10 x i32 ] }* %MyVar, i64 1
      +%idx1 = getelementptr { [10 x i32 ] }* %MyVar, i64 1, i32 0, i64 0
      +%idx2 = getelementptr { [10 x i32 ] }* %MyVar, i64 1
       
      @@ -337,6 +354,352 @@
    + + +
    +

    This hasn't always been forcefully disallowed, though it's not recommended. + It leads to awkward special cases in the optimizers, and fundamental + inconsistency in the IR. In the future, it will probably be outright + disallowed.

    + +
    + + + + +
    +

    Unknown.

    + +
    + + + + +
    +

    None, except that the address space qualifier on the first operand pointer + type always matches the address space qualifier on the result type.

    + +
    + + + + +
    +

    It's very similar; there are only subtle differences.

    + +

    With ptrtoint, you have to pick an integer type. One approach is to pick i64; + this is safe on everything LLVM supports (LLVM internally assumes pointers + are never wider than 64 bits in many places), and the optimizer will actually + narrow the i64 arithmetic down to the actual pointer size on targets which + don't support 64-bit arithmetic in most cases. However, there are some cases + where it doesn't do this. With GEP you can avoid this problem. + +

    Also, GEP carries additional pointer aliasing rules. It's invalid to take a + GEP from one object, address into a different separately allocated + object, and dereference it. IR producers (front-ends) must follow this rule, + and consumers (optimizers, specifically alias analysis) benefit from being + able to rely on it. See the Rules section for more + information.

    + +

    And, GEP is more concise in common cases.

    + +

    However, for the underlying integer computation implied, there + is no difference.

    + +
    + + + + +
    +

    You don't. The integer computation implied by a GEP is target-independent. + Typically what you'll need to do is make your backend pattern-match + expressions trees involving ADD, MUL, etc., which are what GEP is lowered + into. This has the advantage of letting your code work correctly in more + cases.

    + +

    GEP does use target-dependent parameters for the size and layout of data + types, which targets can customize.

    + +

    If you require support for addressing units which are not 8 bits, you'll + need to fix a lot of code in the backend, with GEP lowering being only a + small piece of the overall picture.

    + +
    + + + + +
    +

    GEPs don't natively support VLAs. LLVM's type system is entirely static, + and GEP address computations are guided by an LLVM type.

    + +

    VLA indices can be implemented as linearized indices. For example, an + expression like X[a][b][c], must be effectively lowered into a form + like X[a*m+b*n+c], so that it appears to the GEP as a single-dimensional + array reference.

    + +

    This means if you want to write an analysis which understands array + indices and you want to support VLAs, your code will have to be + prepared to reverse-engineer the linearization. One way to solve this + problem is to use the ScalarEvolution library, which always presents + VLA and non-VLA indexing in the same manner.

    +
    + + + + + + + + +
    +

    There are two senses in which an array index can be out of bounds.

    + +

    First, there's the array type which comes from the (static) type of + the first operand to the GEP. Indices greater than the number of elements + in the corresponding static array type are valid. There is no problem with + out of bounds indices in this sense. Indexing into an array only depends + on the size of the array element, not the number of elements.

    + +

    A common example of how this is used is arrays where the size is not known. + It's common to use array types with zero length to represent these. The + fact that the static type says there are zero elements is irrelevant; it's + perfectly valid to compute arbitrary element indices, as the computation + only depends on the size of the array element, not the number of + elements. Note that zero-sized arrays are not a special case here.

    + +

    This sense is unconnected with inbounds keyword. The + inbounds keyword is designed to describe low-level pointer + arithmetic overflow conditions, rather than high-level array + indexing rules. + +

    Analysis passes which wish to understand array indexing should not + assume that the static array type bounds are respected.

    + +

    The second sense of being out of bounds is computing an address that's + beyond the actual underlying allocated object.

    + +

    With the inbounds keyword, the result value of the GEP is + undefined if the address is outside the actual underlying allocated + object and not the address one-past-the-end.

    + +

    Without the inbounds keyword, there are no restrictions + on computing out-of-bounds addresses. Obviously, performing a load or + a store requires an address of allocated and sufficiently aligned + memory. But the GEP itself is only concerned with computing addresses.

    + +
    + + + +
    +

    Yes. This is basically a special case of array indices being out + of bounds.

    + +
    + + + +
    +

    Yes. If both addresses are within the same allocated object, or + one-past-the-end, you'll get the comparison result you expect. If either + is outside of it, integer arithmetic wrapping may occur, so the + comparison may not be meaningful.

    + +
    + + + +
    +

    Yes. There are no restrictions on bitcasting a pointer value to an arbitrary + pointer type. The types in a GEP serve only to define the parameters for the + underlying integer computation. They need not correspond with the actual + type of the underlying object.

    + +

    Furthermore, loads and stores don't have to use the same types as the type + of the underlying object. Types in this context serve only to specify + memory size and alignment. Beyond that there are merely a hint to the + optimizer indicating how the value will likely be used.

    + +
    + + + +
    +

    You can compute an address that way, but if you use GEP to do the add, + you can't use that pointer to actually access the object, unless the + object is managed outside of LLVM.

    + +

    The underlying integer computation is sufficiently defined; null has a + defined value -- zero -- and you can add whatever value you want to it.

    + +

    However, it's invalid to access (load from or store to) an LLVM-aware + object with such a pointer. This includes GlobalVariables, Allocas, and + objects pointed to by noalias pointers.

    + +

    If you really need this functionality, you can do the arithmetic with + explicit integer instructions, and use inttoptr to convert the result to + an address. Most of GEP's special aliasing rules do not apply to pointers + computed from ptrtoint, arithmetic, and inttoptr sequences.

    + +
    + + + +
    +

    As with arithmetic on null, You can use GEP to compute an address that + way, but you can't use that pointer to actually access the object if you + do, unless the object is managed outside of LLVM.

    + +

    Also as above, ptrtoint and inttoptr provide an alternative way to do this + which do not have this restriction.

    + +
    + + + +
    +

    You can't do type-based alias analysis using LLVM's built-in type system, + because LLVM has no restrictions on mixing types in addressing, loads or + stores.

    + +

    It would be possible to add special annotations to the IR, probably using + metadata, to describe a different type system (such as the C type system), + and do type-based aliasing on top of that. This is a much bigger + undertaking though.

    + +
    + + + + +
    +

    If the GEP has the inbounds keyword, the result value is + undefined.

    + +

    Otherwise, the result value is the result from evaluating the implied + two's complement integer computation. However, since there's no + guarantee of where an object will be allocated in the address space, + such values have limited meaning.

    + +
    + + + + +
    +

    There is currently no checker for the getelementptr rules. Currently, + the only way to do this is to manually check each place in your front-end + where GetElementPtr operators are created.

    + +

    It's not possible to write a checker which could find all rule + violations statically. It would be possible to write a checker which + works by instrumenting the code with dynamic checks though. Alternatively, + it would be possible to write a static checker which catches a subset of + possible problems. However, no such checker exists today.

    + +
    + + + + + + + + +
    +

    The design of GEP has the following goals, in rough unofficial + order of priority:

    +
      +
    • Support C, C-like languages, and languages which can be + conceptually lowered into C (this covers a lot).
    • +
    • Support optimizations such as those that are common in + C compilers.
    • +
    • Provide a consistent method for computing addresses so that + address computations don't need to be a part of load and + store instructions in the IR.
    • +
    • Support non-C-like languages, to the extent that it doesn't + interfere with other goals.
    • +
    • Minimize target-specific information in the IR.
    • +
    +
    + + + +
    +

    The specific type i32 is probably just a historical artifact, however it's + wide enough for all practical purposes, so there's been no need to change it. + It doesn't necessarily imply i32 address arithmetic; it's just an identifier + which identifies a field in a struct. Requiring that all struct indices be + the same reduces the range of possibilities for cases where two GEPs are + effectively the same but have distinct operand types.

    + +
    + + + + +
    +

    Some LLVM optimizers operate on GEPs by internally lowering them into + more primitive integer expressions, which allows them to be combined + with other integer expressions and/or split into multiple separate + integer expressions. If they've made non-trivial changes, translating + back into LLVM IR can involve reverse-engineering the structure of + the addressing in order to fit it into the static type of the original + first operand. It isn't always possibly to fully reconstruct this + structure; sometimes the underlying addressing doesn't correspond with + the static type at all. In such cases the optimizer instead will emit + a GEP with the base pointer casted to a simple address-unit pointer, + using the name "uglygep". This isn't pretty, but it's just as + valid, and it's sufficient to preserve the pointer aliasing guarantees + that GEP provides.

    + +
    + + Modified: llvm/trunk/docs/index.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/index.html?rev=97154&r1=97153&r2=97154&view=diff ============================================================================== --- llvm/trunk/docs/index.html (original) +++ llvm/trunk/docs/index.html Thu Feb 25 12:16:03 2010 @@ -54,9 +54,6 @@ Multi-Stage Optimization - More details (quite old now).
  • GetElementPtr FAQ - Answers to some very frequent questions about LLVM's most frequently misunderstood instruction.
  • -
  • Advanced GetElementPtr FAQ - Answers -to questions about the GetElementPtr operator for those who have made it through -the first FAQ.
From gohman at apple.com Thu Feb 25 12:17:58 2010 From: gohman at apple.com (Dan Gohman) Date: Thu, 25 Feb 2010 18:17:58 -0000 Subject: [llvm-commits] [llvm] r97155 - /llvm/trunk/utils/vim/llvm.vim Message-ID: <20100225181758.D28B12A6C12E@llvm.org> Author: djg Date: Thu Feb 25 12:17:58 2010 New Revision: 97155 URL: http://llvm.org/viewvc/llvm-project?rev=97155&view=rev Log: Add the union keyword. Modified: llvm/trunk/utils/vim/llvm.vim Modified: llvm/trunk/utils/vim/llvm.vim URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/vim/llvm.vim?rev=97155&r1=97154&r2=97155&view=diff ============================================================================== --- llvm/trunk/utils/vim/llvm.vim (original) +++ llvm/trunk/utils/vim/llvm.vim Thu Feb 25 12:17:58 2010 @@ -57,6 +57,7 @@ syn keyword llvmKeyword addrspace section alias sideeffect c gc syn keyword llvmKeyword target datalayout triple syn keyword llvmKeyword blockaddress +syn keyword llvmKeyword union " Obsolete keywords. syn keyword llvmError uninitialized implementation From gohman at apple.com Thu Feb 25 12:18:49 2010 From: gohman at apple.com (Dan Gohman) Date: Thu, 25 Feb 2010 18:18:49 -0000 Subject: [llvm-commits] [llvm] r97156 - /llvm/trunk/docs/index.html Message-ID: <20100225181849.E4C432A6C12E@llvm.org> Author: djg Date: Thu Feb 25 12:18:49 2010 New Revision: 97156 URL: http://llvm.org/viewvc/llvm-project?rev=97156&view=rev Log: stkrc is gone. Modified: llvm/trunk/docs/index.html Modified: llvm/trunk/docs/index.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/index.html?rev=97156&r1=97155&r2=97156&view=diff ============================================================================== --- llvm/trunk/docs/index.html (original) +++ llvm/trunk/docs/index.html Thu Feb 25 12:18:49 2010 @@ -93,7 +93,6 @@ llvmc llvm-gcc, llvm-g++, - stkrc, bugpoint, llvm-bcanalyzer, From enderby at apple.com Thu Feb 25 12:46:04 2010 From: enderby at apple.com (Kevin Enderby) Date: Thu, 25 Feb 2010 18:46:04 -0000 Subject: [llvm-commits] [llvm] r97158 - in /llvm/trunk: lib/MC/MCParser/AsmParser.cpp test/MC/MachO/Darwin/optimal_nop.s Message-ID: <20100225184604.4C0B12A6C12C@llvm.org> Author: enderby Date: Thu Feb 25 12:46:04 2010 New Revision: 97158 URL: http://llvm.org/viewvc/llvm-project?rev=97158&view=rev Log: This is a patch to the assembler frontend to detect when aligning a text section with TextAlignFillValue and calls EmitCodeAlignment() instead of calling EmitValueToAlignment(). This allows x86 assembly code to be aligned with optimal nops. Added: llvm/trunk/test/MC/MachO/Darwin/optimal_nop.s Modified: llvm/trunk/lib/MC/MCParser/AsmParser.cpp Modified: llvm/trunk/lib/MC/MCParser/AsmParser.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/AsmParser.cpp?rev=97158&r1=97157&r2=97158&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCParser/AsmParser.cpp (original) +++ llvm/trunk/lib/MC/MCParser/AsmParser.cpp Thu Feb 25 12:46:04 2010 @@ -146,7 +146,7 @@ // FIXME: Target hook & command line option for initial section. Out.SwitchSection(getMachOSection("__TEXT", "__text", MCSectionMachO::S_ATTR_PURE_INSTRUCTIONS, - 0, SectionKind())); + 0, SectionKind::getText())); // Prime the lexer. @@ -1237,8 +1237,14 @@ } } - // FIXME: Target specific behavior about how the "extra" bytes are filled. - Out.EmitValueToAlignment(Alignment, FillExpr, ValueSize, MaxBytesToFill); + // FIXME: hard code the parser to use EmitCodeAlignment for text when using + // the TextAlignFillValue. + if(Out.getCurrentSection()->getKind().isText() && + Lexer.getMAI().getTextAlignFillValue() == FillExpr) + Out.EmitCodeAlignment(Alignment, MaxBytesToFill); + else + // FIXME: Target specific behavior about how the "extra" bytes are filled. + Out.EmitValueToAlignment(Alignment, FillExpr, ValueSize, MaxBytesToFill); return false; } Added: llvm/trunk/test/MC/MachO/Darwin/optimal_nop.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/Darwin/optimal_nop.s?rev=97158&view=auto ============================================================================== --- llvm/trunk/test/MC/MachO/Darwin/optimal_nop.s (added) +++ llvm/trunk/test/MC/MachO/Darwin/optimal_nop.s Thu Feb 25 12:46:04 2010 @@ -0,0 +1,156 @@ +// Validate that we can assemble this file exactly like the platform +// assembler. +// +// RUN: llvm-mc -filetype=obj -triple i386-apple-darwin10 -o %t.mc.o %s +// RUN: as -arch i386 -o %t.as.o %s +// RUN: diff %t.mc.o %t.as.o + +# 1 byte nop test + .align 4, 0 # start with 16 byte alignment filled with zeros + ret + # nop + # 0x90 + .align 1, 0x90 + ret +# 2 byte nop test + .align 4, 0 # start with 16 byte alignment filled with zeros + ret + ret + # xchg %ax,%ax + # 0x66, 0x90 + .align 2, 0x90 + ret +# 3 byte nop test + .align 4, 0 # start with 16 byte alignment filled with zeros + ret + # nopl (%[re]ax) + # 0x0f, 0x1f, 0x00 + .align 2, 0x90 + ret +# 4 byte nop test + .align 4, 0 # start with 16 byte alignment filled with zeros + ret + ret + ret + ret + # nopl 0(%[re]ax) + # 0x0f, 0x1f, 0x40, 0x00 + .align 3, 0x90 + ret +# 5 byte nop test + .align 4, 0 # start with 16 byte alignment filled with zeros + ret + ret + ret + # nopl 0(%[re]ax,%[re]ax,1) + # 0x0f, 0x1f, 0x44, 0x00, 0x00 + .align 3, 0x90 + ret +# 6 byte nop test + .align 4, 0 # start with 16 byte alignment filled with zeros + ret + ret + # nopw 0(%[re]ax,%[re]ax,1) + # 0x66, 0x0f, 0x1f, 0x44, 0x00, 0x00 + .align 3, 0x90 + ret +# 7 byte nop test + .align 4, 0 # start with 16 byte alignment filled with zeros + ret + # nopl 0L(%[re]ax) + # 0x0f, 0x1f, 0x80, 0x00, 0x00, 0x00, 0x00 + .align 3, 0x90 + ret +# 8 byte nop test + .align 4, 0 # start with 16 byte alignment filled with zeros + ret + ret + ret + ret + ret + ret + ret + ret + # nopl 0L(%[re]ax,%[re]ax,1) + # 0x0f, 0x1f, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00 + .align 3, 0x90 + ret +# 9 byte nop test + .align 4, 0 # start with 16 byte alignment filled with zeros + ret + ret + ret + ret + ret + ret + ret + # nopw 0L(%[re]ax,%[re]ax,1) + # 0x66, 0x0f, 0x1f, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00 + .align 4, 0x90 + ret +# 10 byte nop test + .align 4, 0 # start with 16 byte alignment filled with zeros + ret + ret + ret + ret + ret + ret + ret + # nopw %cs:0L(%[re]ax,%[re]ax,1) + # 0x66, 0x2e, 0x0f, 0x1f, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00 + .align 4, 0x90 + ret +# 11 byte nop test + .align 4, 0 # start with 16 byte alignment filled with zeros + ret + ret + ret + ret + ret + # nopw %cs:0L(%[re]ax,%[re]ax,1) + # 0x66, 0x2e, 0x0f, 0x1f, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00 + .align 4, 0x90 + ret +# 12 byte nop test + .align 4, 0 # start with 16 byte alignment filled with zeros + ret + ret + ret + ret + # nopw 0(%[re]ax,%[re]ax,1) + # nopw 0(%[re]ax,%[re]ax,1) + # 0x66, 0x0f, 0x1f, 0x44, 0x00, 0x00, + # 0x66, 0x0f, 0x1f, 0x44, 0x00, 0x00 + .align 4, 0x90 + ret +# 13 byte nop test + .align 4, 0 # start with 16 byte alignment filled with zeros + ret + ret + ret + # nopw 0(%[re]ax,%[re]ax,1) + # nopl 0L(%[re]ax) + # 0x66, 0x0f, 0x1f, 0x44, 0x00, 0x00, + # 0x0f, 0x1f, 0x80, 0x00, 0x00, 0x00, 0x00 + .align 4, 0x90 + ret +# 14 byte nop test + .align 4, 0 # start with 16 byte alignment filled with zeros + ret + ret + # nopl 0L(%[re]ax) + # nopl 0L(%[re]ax) + # 0x0f, 0x1f, 0x80, 0x00, 0x00, 0x00, 0x00, + # 0x0f, 0x1f, 0x80, 0x00, 0x00, 0x00, 0x00 + .align 4, 0x90 + ret +# 15 byte nop test + .align 4, 0 # start with 16 byte alignment filled with zeros + ret + # nopl 0L(%[re]ax) + # nopl 0L(%[re]ax,%[re]ax,1) + # 0x0f, 0x1f, 0x80, 0x00, 0x00, 0x00, 0x00, + # 0x0f, 0x1f, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00 + .align 4, 0x90 + ret From johnny.chen at apple.com Thu Feb 25 12:46:43 2010 From: johnny.chen at apple.com (Johnny Chen) Date: Thu, 25 Feb 2010 18:46:43 -0000 Subject: [llvm-commits] [llvm] r97159 - /llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Message-ID: <20100225184643.C5CAA2A6C12C@llvm.org> Author: johnny Date: Thu Feb 25 12:46:43 2010 New Revision: 97159 URL: http://llvm.org/viewvc/llvm-project?rev=97159&view=rev Log: Added the 32-bit Thumb instructions (MRS and MSR) for disassembly only. Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td?rev=97159&r1=97158&r2=97159&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Thu Feb 25 12:46:43 2010 @@ -1984,3 +1984,53 @@ [(set GPR:$dst, (ARMpic_add (load (ARMWrapper tconstpool:$addr)), imm:$cp))]>, Requires<[IsThumb2]>; + +//===----------------------------------------------------------------------===// +// Move between special register and ARM core register -- for disassembly only +// + +// Rd = Instr{11-8} +def t2MRS : T2I<(outs GPR:$dst), (ins), NoItinerary, "mrs", "\t$dst, cpsr", + [/* For disassembly only; pattern left blank */]> { + let Inst{31-27} = 0b11110; + let Inst{26} = 0; + let Inst{25-21} = 0b11111; + let Inst{20} = 0; // The R bit. + let Inst{15-14} = 0b10; + let Inst{12} = 0; +} + +// Rd = Instr{11-8} +def t2MRSsys : T2I<(outs GPR:$dst), (ins), NoItinerary, "mrs", "\t$dst, spsr", + [/* For disassembly only; pattern left blank */]> { + let Inst{31-27} = 0b11110; + let Inst{26} = 0; + let Inst{25-21} = 0b11111; + let Inst{20} = 1; // The R bit. + let Inst{15-14} = 0b10; + let Inst{12} = 0; +} + +// FIXME: mask is ignored for the time being. +// Rn = Inst{19-16} +def t2MSR : T2I<(outs), (ins GPR:$src), NoItinerary, "msr", "\tcpsr, $src", + [/* For disassembly only; pattern left blank */]> { + let Inst{31-27} = 0b11110; + let Inst{26} = 0; + let Inst{25-21} = 0b11100; + let Inst{20} = 0; // The R bit. + let Inst{15-14} = 0b10; + let Inst{12} = 0; +} + +// FIXME: mask is ignored for the time being. +// Rn = Inst{19-16} +def t2MSRsys : T2I<(outs), (ins GPR:$src), NoItinerary, "msr", "\tspsr, $src", + [/* For disassembly only; pattern left blank */]> { + let Inst{31-27} = 0b11110; + let Inst{26} = 0; + let Inst{25-21} = 0b11100; + let Inst{20} = 1; // The R bit. + let Inst{15-14} = 0b10; + let Inst{12} = 0; +} From sabre at nondot.org Thu Feb 25 13:00:39 2010 From: sabre at nondot.org (Chris Lattner) Date: Thu, 25 Feb 2010 19:00:39 -0000 Subject: [llvm-commits] [llvm] r97160 - in /llvm/trunk: include/llvm/CodeGen/DAGISelHeader.h test/CodeGen/X86/2006-10-07-ScalarSSEMiscompile.ll utils/TableGen/DAGISelEmitter.cpp utils/TableGen/DAGISelMatcher.cpp utils/TableGen/DAGISelMatcher.h utils/TableGen/DAGISelMatcherEmitter.cpp utils/TableGen/DAGISelMatcherOpt.cpp Message-ID: <20100225190039.E62782A6C12C@llvm.org> Author: lattner Date: Thu Feb 25 13:00:39 2010 New Revision: 97160 URL: http://llvm.org/viewvc/llvm-project?rev=97160&view=rev Log: change the scope node to include a list of children to be checked instead of to have a chained series of scope nodes. This makes the generated table smaller, improves the efficiency of the interpreter, and make the factoring optimization much more reasonable to implement. Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h llvm/trunk/test/CodeGen/X86/2006-10-07-ScalarSSEMiscompile.ll llvm/trunk/utils/TableGen/DAGISelEmitter.cpp llvm/trunk/utils/TableGen/DAGISelMatcher.cpp llvm/trunk/utils/TableGen/DAGISelMatcher.h llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h?rev=97160&r1=97159&r2=97160&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h (original) +++ llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Thu Feb 25 13:00:39 2010 @@ -219,7 +219,7 @@ enum BuiltinOpcodes { - OPC_Scope, OPC_Scope2, + OPC_Scope, OPC_RecordNode, OPC_RecordChild0, OPC_RecordChild1, OPC_RecordChild2, OPC_RecordChild3, OPC_RecordChild4, OPC_RecordChild5, OPC_RecordChild6, OPC_RecordChild7, @@ -374,20 +374,13 @@ switch (Opcode) { case OPC_Scope: { unsigned NumToSkip = MatcherTable[MatcherIndex++]; - MatchScope NewEntry; - NewEntry.FailIndex = MatcherIndex+NumToSkip; - NewEntry.NodeStackSize = NodeStack.size(); - NewEntry.NumRecordedNodes = RecordedNodes.size(); - NewEntry.NumMatchedMemRefs = MatchedMemRefs.size(); - NewEntry.InputChain = InputChain; - NewEntry.InputFlag = InputFlag; - NewEntry.HasChainNodesMatched = !ChainNodesMatched.empty(); - NewEntry.HasFlagResultNodesMatched = !FlagResultNodesMatched.empty(); - MatchScopes.push_back(NewEntry); - continue; - } - case OPC_Scope2: { - unsigned NumToSkip = GetInt2(MatcherTable, MatcherIndex); + if (NumToSkip & 128) + NumToSkip = GetVBR(NumToSkip, MatcherTable, MatcherIndex); + assert(NumToSkip != 0 && + "First entry of OPC_Scope shouldn't be 0, scope has no children?"); + + // Push a MatchScope which indicates where to go if the first child fails + // to match. MatchScope NewEntry; NewEntry.FailIndex = MatcherIndex+NumToSkip; NewEntry.NodeStackSize = NodeStack.size(); @@ -929,33 +922,54 @@ } } - // If the code reached this point, then the match failed pop out to the next - // match scope. - if (MatchScopes.empty()) { - CannotYetSelect(NodeToMatch); - return 0; - } - - const MatchScope &LastScope = MatchScopes.back(); - RecordedNodes.resize(LastScope.NumRecordedNodes); - NodeStack.resize(LastScope.NodeStackSize); - N = NodeStack.back(); + // If the code reached this point, then the match failed. See if there is + // another child to try in the current 'Scope', otherwise pop it until we + // find a case to check. + while (1) { + if (MatchScopes.empty()) { + CannotYetSelect(NodeToMatch); + return 0; + } + + // Restore the interpreter state back to the point where the scope was + // formed. + MatchScope &LastScope = MatchScopes.back(); + RecordedNodes.resize(LastScope.NumRecordedNodes); + NodeStack.resize(LastScope.NodeStackSize); + N = NodeStack.back(); - DEBUG(errs() << " Match failed at index " << MatcherIndex - << " continuing at " << LastScope.FailIndex << "\n"); - - if (LastScope.NumMatchedMemRefs != MatchedMemRefs.size()) - MatchedMemRefs.resize(LastScope.NumMatchedMemRefs); - MatcherIndex = LastScope.FailIndex; + DEBUG(errs() << " Match failed at index " << MatcherIndex + << " continuing at " << LastScope.FailIndex << "\n"); - InputChain = LastScope.InputChain; - InputFlag = LastScope.InputFlag; - if (!LastScope.HasChainNodesMatched) - ChainNodesMatched.clear(); - if (!LastScope.HasFlagResultNodesMatched) - FlagResultNodesMatched.clear(); + if (LastScope.NumMatchedMemRefs != MatchedMemRefs.size()) + MatchedMemRefs.resize(LastScope.NumMatchedMemRefs); + MatcherIndex = LastScope.FailIndex; + + InputChain = LastScope.InputChain; + InputFlag = LastScope.InputFlag; + if (!LastScope.HasChainNodesMatched) + ChainNodesMatched.clear(); + if (!LastScope.HasFlagResultNodesMatched) + FlagResultNodesMatched.clear(); - MatchScopes.pop_back(); + // Check to see what the offset is at the new MatcherIndex. If it is zero + // we have reached the end of this scope, otherwise we have another child + // in the current scope to try. + unsigned NumToSkip = MatcherTable[MatcherIndex++]; + if (NumToSkip & 128) + NumToSkip = GetVBR(NumToSkip, MatcherTable, MatcherIndex); + + // If we have another child in this scope to match, update FailIndex and + // try it. + if (NumToSkip != 0) { + LastScope.FailIndex = MatcherIndex+NumToSkip; + break; + } + + // End of this scope, pop it and try the next child in the containing + // scope. + MatchScopes.pop_back(); + } } } Modified: llvm/trunk/test/CodeGen/X86/2006-10-07-ScalarSSEMiscompile.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2006-10-07-ScalarSSEMiscompile.ll?rev=97160&r1=97159&r2=97160&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/2006-10-07-ScalarSSEMiscompile.ll (original) +++ llvm/trunk/test/CodeGen/X86/2006-10-07-ScalarSSEMiscompile.ll Thu Feb 25 13:00:39 2010 @@ -5,7 +5,7 @@ target datalayout = "e-p:32:32" target triple = "i686-apple-darwin8.7.2" -define <4 x float> @test(<4 x float> %A, <4 x float>* %B) { +define <4 x float> @test(<4 x float> %A, <4 x float>* %B) nounwind { %BV = load <4 x float>* %B ; <<4 x float>> [#uses=1] %tmp28 = tail call <4 x float> @llvm.x86.sse.sub.ss( <4 x float> %A, <4 x float> %BV ) ; <<4 x float>> [#uses=1] ret <4 x float> %tmp28 Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=97160&r1=97159&r2=97160&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Thu Feb 25 13:00:39 2010 @@ -1945,8 +1945,6 @@ } #ifdef ENABLE_NEW_ISEL - Matcher *TheMatcher = 0; - // Add all the patterns to a temporary list so we can sort them. std::vector Patterns; for (CodeGenDAGPatterns::ptm_iterator I = CGP.ptm_begin(), E = CGP.ptm_end(); @@ -1960,20 +1958,13 @@ PatternSortingPredicate2(CGP)); - // Walk the patterns backwards (since we append to the front of the generated - // code), building a matcher for each and adding it to the matcher for the - // whole target. - while (!Patterns.empty()) { - const PatternToMatch &Pattern = *Patterns.back(); - Patterns.pop_back(); - - Matcher *N = ConvertPatternToMatcher(Pattern, CGP); - - if (TheMatcher == 0) - TheMatcher = N; - else - TheMatcher = new ScopeMatcher(N, TheMatcher); - } + // Convert each pattern into Matcher's. + std::vector PatternMatchers; + for (unsigned i = 0, e = Patterns.size(); i != e; ++i) + PatternMatchers.push_back(ConvertPatternToMatcher(*Patterns[i], CGP)); + + Matcher *TheMatcher = new ScopeMatcher(&PatternMatchers[0], + PatternMatchers.size()); TheMatcher = OptimizeMatcher(TheMatcher); //Matcher->dump(); Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.cpp?rev=97160&r1=97159&r2=97160&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcher.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcher.cpp Thu Feb 25 13:00:39 2010 @@ -25,9 +25,18 @@ return Next->print(OS, indent); } +ScopeMatcher::~ScopeMatcher() { + for (unsigned i = 0, e = Children.size(); i != e; ++i) + delete Children[i]; +} + + +// printImpl methods. + void ScopeMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "Scope\n"; - Check->print(OS, indent+2); + for (unsigned i = 0, e = getNumChildren(); i != e; ++i) + getChild(i)->print(OS, indent+2); } void RecordMatcher::printImpl(raw_ostream &OS, unsigned indent) const { Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.h?rev=97160&r1=97159&r2=97160&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcher.h (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcher.h Thu Feb 25 13:00:39 2010 @@ -111,21 +111,32 @@ virtual unsigned getHashImpl() const = 0; }; -/// ScopeMatcher - This pushes a failure scope on the stack and evaluates -/// 'Check'. If 'Check' fails to match, it pops its scope and continues on to -/// 'Next'. +/// ScopeMatcher - This attempts to match each of its children to find the first +/// one that successfully matches. If one child fails, it tries the next child. +/// If none of the children match then this check fails. It never has a 'next'. class ScopeMatcher : public Matcher { - OwningPtr Check; + SmallVector Children; public: - ScopeMatcher(Matcher *check = 0, Matcher *next = 0) - : Matcher(Scope), Check(check) { - setNext(next); + ScopeMatcher(Matcher *const *children, unsigned numchildren) + : Matcher(Scope), Children(children, children+numchildren) { } + virtual ~ScopeMatcher(); - Matcher *getCheck() { return Check.get(); } - const Matcher *getCheck() const { return Check.get(); } - void setCheck(Matcher *N) { Check.reset(N); } - OwningPtr &getCheckPtr() { return Check; } + unsigned getNumChildren() const { return Children.size(); } + + Matcher *getChild(unsigned i) { return Children[i]; } + const Matcher *getChild(unsigned i) const { return Children[i]; } + + void resetChild(unsigned i, Matcher *N) { + delete Children[i]; + Children[i] = N; + } + + Matcher *takeChild(unsigned i) { + Matcher *Res = Children[i]; + Children[i] = 0; + return Res; + } static inline bool classof(const Matcher *N) { return N->getKind() == Scope; @@ -134,7 +145,7 @@ private: virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { return false; } - virtual unsigned getHashImpl() const { return 0; } + virtual unsigned getHashImpl() const { return 12312; } }; /// RecordMatcher - Save the current node in the operand list. Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp?rev=97160&r1=97159&r2=97160&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Thu Feb 25 13:00:39 2010 @@ -88,7 +88,7 @@ void EmitHistogram(formatted_raw_ostream &OS); private: - unsigned EmitMatcher(const Matcher *N, unsigned Indent, + unsigned EmitMatcher(const Matcher *N, unsigned Indent, unsigned CurrentIdx, formatted_raw_ostream &OS); unsigned getNodePredicate(StringRef PredName) { @@ -129,6 +129,17 @@ }; } // end anonymous namespace. +static unsigned GetVBRSize(unsigned Val) { + if (Val <= 127) return 1; + + unsigned NumBytes = 0; + while (Val >= 128) { + Val >>= 7; + ++NumBytes; + } + return NumBytes+1; +} + /// EmitVBRValue - Emit the specified value as a VBR, returning the number of /// bytes emitted. static unsigned EmitVBRValue(unsigned Val, raw_ostream &OS) { @@ -151,11 +162,58 @@ /// EmitMatcherOpcodes - Emit bytes for the specified matcher and return /// the number of bytes emitted. unsigned MatcherTableEmitter:: -EmitMatcher(const Matcher *N, unsigned Indent, formatted_raw_ostream &OS) { +EmitMatcher(const Matcher *N, unsigned Indent, unsigned CurrentIdx, + formatted_raw_ostream &OS) { OS.PadToColumn(Indent*2); switch (N->getKind()) { - case Matcher::Scope: assert(0 && "Should be handled by caller"); + case Matcher::Scope: { + const ScopeMatcher *SM = cast(N); + assert(SM->getNext() == 0 && "Shouldn't have next after scope"); + + unsigned StartIdx = CurrentIdx; + + // Emit all of the children. + for (unsigned i = 0, e = SM->getNumChildren(); i != e; ++i) { + if (i == 0) { + OS << "OPC_Scope, "; + ++CurrentIdx; + } else { + OS << "/*" << CurrentIdx << "*/"; + OS.PadToColumn(Indent*2) << "/*Scope*/ "; + } + + // We need to encode the child and the offset of the failure code before + // emitting either of them. Handle this by buffering the output into a + // string while we get the size. Unfortunately, the offset of the + // children depends on the VBR size of the child, so for large children we + // have to iterate a bit. + SmallString<128> TmpBuf; + unsigned ChildSize = 0; + unsigned VBRSize = 0; + do { + VBRSize = GetVBRSize(ChildSize); + + TmpBuf.clear(); + raw_svector_ostream OS(TmpBuf); + formatted_raw_ostream FOS(OS); + ChildSize = EmitMatcherList(cast(N)->getChild(i), + Indent+1, CurrentIdx+VBRSize, FOS); + } while (GetVBRSize(ChildSize) != VBRSize); + + assert(ChildSize != 0 && "Should not have a zero-sized child!"); + + CurrentIdx += EmitVBRValue(ChildSize, OS); + OS << '\n' << TmpBuf.str(); + CurrentIdx += ChildSize; + } + + // Emit a zero as a sentinel indicating end of 'Scope'. + OS << "/*" << CurrentIdx << "*/"; + OS.PadToColumn(Indent*2) << "0, /*End of Scope*/\n"; + return CurrentIdx - StartIdx + 1; + } + case Matcher::RecordNode: OS << "OPC_RecordNode,"; OS.PadToColumn(CommentIndent) << "// " @@ -387,52 +445,8 @@ Histogram.resize(N->getKind()+1); Histogram[N->getKind()]++; - // Scope is a special case since it is binary. - if (const ScopeMatcher *SMN = dyn_cast(N)) { - // We need to encode the child and the offset of the failure code before - // emitting either of them. Handle this by buffering the output into a - // string while we get the size. - SmallString<128> TmpBuf; - unsigned NextSize; - { - raw_svector_ostream OS(TmpBuf); - formatted_raw_ostream FOS(OS); - NextSize = EmitMatcherList(cast(N)->getCheck(), - Indent+1, CurrentIdx+2, FOS); - } - - // In the unlikely event that we have something too big to emit with a - // one byte offset, regenerate it with a two-byte one. - if (NextSize > 255) { - TmpBuf.clear(); - raw_svector_ostream OS(TmpBuf); - formatted_raw_ostream FOS(OS); - NextSize = EmitMatcherList(cast(N)->getCheck(), - Indent+1, CurrentIdx+3, FOS); - if (NextSize > 65535) { - errs() << - "Tblgen internal error: can't handle pattern this complex yet\n"; - exit(1); - } - } - - OS << "/*" << CurrentIdx << "*/"; - OS.PadToColumn(Indent*2); - - if (NextSize < 256) - OS << "OPC_Scope, " << NextSize << ",\n"; - else - OS << "OPC_Scope2, " << (NextSize&255) << ", " << (NextSize>>8) <<",\n"; - OS << TmpBuf.str(); - - Size += 2+NextSize; - CurrentIdx += 2+NextSize; - N = SMN->getNext(); - continue; - } - OS << "/*" << CurrentIdx << "*/"; - unsigned MatcherSize = EmitMatcher(N, Indent, OS); + unsigned MatcherSize = EmitMatcher(N, Indent, CurrentIdx, OS); Size += MatcherSize; CurrentIdx += MatcherSize; Modified: llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp?rev=97160&r1=97159&r2=97160&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Thu Feb 25 13:00:39 2010 @@ -21,9 +21,15 @@ Matcher *N = MatcherPtr.get(); if (N == 0) return; - // If we have a scope node, walk down both edges. - if (ScopeMatcher *Push = dyn_cast(N)) - ContractNodes(Push->getCheckPtr()); + // If we have a scope node, walk down all of the children. + if (ScopeMatcher *Scope = dyn_cast(N)) { + for (unsigned i = 0, e = Scope->getNumChildren(); i != e; ++i) { + OwningPtr Child(Scope->takeChild(i)); + ContractNodes(Child); + Scope->resetChild(i, Child.take()); + } + return; + } // If we found a movechild node with a node that comes in a 'foochild' form, // transform it. @@ -61,32 +67,31 @@ if (N == 0) return; // If this is not a push node, just scan for one. - if (!isa(N)) + ScopeMatcher *Scope = dyn_cast(N); + if (Scope == 0) return FactorNodes(N->getNextPtr()); - // Okay, pull together the series of linear push nodes into a vector so we can + // Okay, pull together the children of the scope node into a vector so we can // inspect it more easily. While we're at it, bucket them up by the hash // code of their first predicate. SmallVector OptionsToMatch; typedef DenseMap > HashTableTy; HashTableTy MatchersByHash; - Matcher *CurNode = N; - for (; ScopeMatcher *PMN = dyn_cast(CurNode); - CurNode = PMN->getNext()) { + for (unsigned i = 0, e = Scope->getNumChildren(); i != e; ++i) { // Factor the subexpression. - FactorNodes(PMN->getCheckPtr()); - if (Matcher *Check = PMN->getCheck()) { - OptionsToMatch.push_back(Check); - MatchersByHash[Check->getHash()].push_back(Check); + OwningPtr Child(Scope->takeChild(i)); + FactorNodes(Child); + + // FIXME: Eventually don't pass ownership back to the scope node. + Scope->resetChild(i, Child.take()); + + if (Matcher *N = Scope->getChild(i)) { + OptionsToMatch.push_back(N); + MatchersByHash[N->getHash()].push_back(N); } } - if (CurNode) { - OptionsToMatch.push_back(CurNode); - MatchersByHash[CurNode->getHash()].push_back(CurNode); - } - SmallVector NewOptionsToMatch; From johnny.chen at apple.com Thu Feb 25 13:05:29 2010 From: johnny.chen at apple.com (Johnny Chen) Date: Thu, 25 Feb 2010 19:05:29 -0000 Subject: [llvm-commits] [llvm] r97163 - /llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Message-ID: <20100225190529.2C3D62A6C12C@llvm.org> Author: johnny Date: Thu Feb 25 13:05:29 2010 New Revision: 97163 URL: http://llvm.org/viewvc/llvm-project?rev=97163&view=rev Log: Added the 32-bit Thumb instructions (BXJ) for disassembly only. Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td?rev=97163&r1=97162&r2=97163&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Thu Feb 25 13:05:29 2010 @@ -1939,6 +1939,17 @@ let Inst{15-8} = 0b10111111; } +// Branch and Exchange Jazelle -- for disassembly only +// Rm = Inst{19-16} +def t2BXJ : T2I<(outs), (ins GPR:$func), NoItinerary, "bxj", "\t$func", + [/* For disassembly only; pattern left blank */]> { + let Inst{31-27} = 0b11110; + let Inst{26} = 0; + let Inst{25-20} = 0b111100; + let Inst{15-14} = 0b10; + let Inst{12} = 0; +} + //===----------------------------------------------------------------------===// // Non-Instruction Patterns // From nlewycky at google.com Thu Feb 25 13:47:29 2010 From: nlewycky at google.com (Nick Lewycky) Date: Thu, 25 Feb 2010 11:47:29 -0800 Subject: [llvm-commits] [llvm] r97132 - in /llvm/trunk/lib/Bitcode: Reader/BitcodeReader.cpp Writer/ValueEnumerator.cpp In-Reply-To: References: <20100225083017.D9FE12A6C130@llvm.org> Message-ID: On 25 February 2010 09:54, Devang Patel wrote: > > On Feb 25, 2010, at 12:30 AM, Nick Lewycky wrote: > > Author: nicholas > Date: Thu Feb 25 02:30:17 2010 > New Revision: 97132 > > URL: http://llvm.org/viewvc/llvm-project?rev=97132&view=rev > Log: > Make the side-numbering of instructions used by metadata (which is needed > to > keep track of instructions that return void) per-function > > > It is used to connect metadata with respective instruction when metadata is > attached with an instruction. > Yes of course. The not-so-obvious part is why you needed a side-numbering instead of just using value IDs which is the basis for the rest of the bitcode format. The problem is that the value enumerator doesn't number void instructions, such as "ret", where you want to attach metadata. Just making the VE enumerate void instructions would break backwards compatibility too, since bitcode relies on the reader and writer to have a matching numbering scheme where we don't store the concrete numbers. After thinking about this, I think the right way to go forward is to create new FUNC_CODE_INST_FOO entries for the void instructions so that the bitcode reader knows it's expected to number them and the writer's VE can number everything. In any event, I'm happy now that the bug is fixed and the format is designed well enough that we can keep compatibility with future changes. I'm not planning any more changes here. Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20100225/87e790da/attachment.html From gohman at apple.com Thu Feb 25 13:58:34 2010 From: gohman at apple.com (Dan Gohman) Date: Thu, 25 Feb 2010 11:58:34 -0800 Subject: [llvm-commits] [llvm] r97126 - in /llvm/trunk: lib/Analysis/ScalarEvolution.cpp lib/Transforms/Scalar/IndVarSimplify.cpp lib/Transforms/Utils/LoopSimplify.cpp test/CodeGen/X86/2009-09-07-CoalescerBug.ll test/Transforms/IndVarSimplify/2003-09-12-MultiplePred.ll test/Transforms/LoopDeletion/simplify-then-delete.ll In-Reply-To: <4B8622E9.2010009@mxc.ca> References: <20100225065705.B01622A6C131@llvm.org> <4B8622E9.2010009@mxc.ca> Message-ID: <2891BEDB-3772-4C7A-9412-477583B9A7F8@apple.com> On Feb 24, 2010, at 11:12 PM, Nick Lewycky wrote: > Dan Gohman wrote: >> Author: djg >> Date: Thu Feb 25 00:57:05 2010 >> New Revision: 97126 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=97126&view=rev >> Log: >> Make LoopSimplify change conditional branches in loop exiting blocks >> which branch on undef to branch on a boolean constant for the edge >> exiting the loop. This helps ScalarEvolution compute trip counts for >> loops. > > I'm confused. 'undef' is already a constant and ought to be more > useful for optimization than i1 0 or i1 1. Are you sure this is the > right fix? If ScalarEvolution picks "false" and later JumpThreading, picks "true", badness could ensue. By modifying the branch, LoopSimplify ensures that all subsequent passes will use the same decision. Dan From johnny.chen at apple.com Thu Feb 25 14:25:24 2010 From: johnny.chen at apple.com (Johnny Chen) Date: Thu, 25 Feb 2010 20:25:24 -0000 Subject: [llvm-commits] [llvm] r97164 - /llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Message-ID: <20100225202524.BD2CA2A6C12C@llvm.org> Author: johnny Date: Thu Feb 25 14:25:24 2010 New Revision: 97164 URL: http://llvm.org/viewvc/llvm-project?rev=97164&view=rev Log: Added the following 32-bit Thumb instructions for disassembly only: SMC, RFE, and SRS. Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td?rev=97164&r1=97163&r2=97164&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Thu Feb 25 14:25:24 2010 @@ -1950,6 +1950,65 @@ let Inst{12} = 0; } +// Secure Monitor Call is a system instruction -- for disassembly only +// Option = Inst{19-16} +def t2SMC : T2I<(outs), (ins i32imm:$opt), NoItinerary, "smc", "\t$opt", + [/* For disassembly only; pattern left blank */]> { + let Inst{31-27} = 0b11110; + let Inst{26-20} = 0b1111111; + let Inst{15-12} = 0b1000; +} + +// Store Return State is a system instruction -- for disassembly only +def t2SRSDBW : T2I<(outs),(ins i32imm:$mode),NoItinerary,"srsdb","\tsp!, $mode", + [/* For disassembly only; pattern left blank */]> { + let Inst{31-27} = 0b11101; + let Inst{26-20} = 0b0000010; // W = 1 +} + +def t2SRSDB : T2I<(outs),(ins i32imm:$mode),NoItinerary,"srsdb","\tsp, $mode", + [/* For disassembly only; pattern left blank */]> { + let Inst{31-27} = 0b11101; + let Inst{26-20} = 0b0000000; // W = 0 +} + +def t2SRSIAW : T2I<(outs),(ins i32imm:$mode),NoItinerary,"srsia","\tsp!, $mode", + [/* For disassembly only; pattern left blank */]> { + let Inst{31-27} = 0b11101; + let Inst{26-20} = 0b0011010; // W = 1 +} + +def t2SRSIA : T2I<(outs), (ins i32imm:$mode),NoItinerary,"srsia","\tsp, $mode", + [/* For disassembly only; pattern left blank */]> { + let Inst{31-27} = 0b11101; + let Inst{26-20} = 0b0011000; // W = 0 +} + +// Return From Exception is a system instruction -- for disassembly only +def t2RFEDBW : T2I<(outs), (ins GPR:$base), NoItinerary, "rfedb", "\t$base!", + [/* For disassembly only; pattern left blank */]> { + let Inst{31-27} = 0b11101; + let Inst{26-20} = 0b0000011; // W = 1 +} + +def t2RFEDB : T2I<(outs), (ins GPR:$base), NoItinerary, "rfeab", "\t$base", + [/* For disassembly only; pattern left blank */]> { + let Inst{31-27} = 0b11101; + let Inst{26-20} = 0b0000001; // W = 0 +} + +def t2RFEIAW : T2I<(outs), (ins GPR:$base), NoItinerary, "rfeia", "\t$base!", + [/* For disassembly only; pattern left blank */]> { + let Inst{31-27} = 0b11101; + let Inst{26-20} = 0b0011011; // W = 1 +} + +def t2RFEIA : T2I<(outs), (ins GPR:$base), NoItinerary, "rfeia", "\t$base", + [/* For disassembly only; pattern left blank */]> { + let Inst{31-27} = 0b11101; + let Inst{26-20} = 0b0011001; // W = 0 +} + //===----------------------------------------------------------------------===// // Non-Instruction Patterns // From gohman at apple.com Thu Feb 25 14:30:49 2010 From: gohman at apple.com (Dan Gohman) Date: Thu, 25 Feb 2010 20:30:49 -0000 Subject: [llvm-commits] [llvm] r97165 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Message-ID: <20100225203049.730E42A6C12C@llvm.org> Author: djg Date: Thu Feb 25 14:30:49 2010 New Revision: 97165 URL: http://llvm.org/viewvc/llvm-project?rev=97165&view=rev Log: Fix ExpandVectorBuildThroughStack for the case where the operands are themselves vectors. Based on a patch by Micah Villmow for PR6338. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=97165&r1=97164&r2=97165&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Thu Feb 25 14:30:49 2010 @@ -1539,7 +1539,6 @@ // the result as a vector. // Create the stack frame object. EVT VT = Node->getValueType(0); - EVT OpVT = Node->getOperand(0).getValueType(); EVT EltVT = VT.getVectorElementType(); DebugLoc dl = Node->getDebugLoc(); SDValue FIPtr = DAG.CreateStackTemporary(VT); @@ -1559,8 +1558,9 @@ SDValue Idx = DAG.getConstant(Offset, FIPtr.getValueType()); Idx = DAG.getNode(ISD::ADD, dl, FIPtr.getValueType(), FIPtr, Idx); - // If EltVT smaller than OpVT, only store the bits necessary. - if (!OpVT.isVector() && EltVT.bitsLT(OpVT)) { + // If the destination vector element type is narrower than the source + // element type, only store the bits necessary. + if (EltVT.bitsLT(Node->getOperand(i).getValueType().getScalarType())) { Stores.push_back(DAG.getTruncStore(DAG.getEntryNode(), dl, Node->getOperand(i), Idx, SV, Offset, EltVT, false, false, 0)); From gohman at apple.com Thu Feb 25 14:54:59 2010 From: gohman at apple.com (Dan Gohman) Date: Thu, 25 Feb 2010 12:54:59 -0800 Subject: [llvm-commits] [llvm] r97064 - in /llvm/trunk: include/llvm/Target/TargetData.h lib/CodeGen/SelectionDAG/LegalizeDAG.cpp lib/CodeGen/SelectionDAG/LegalizeTypes.cpp lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp lib/Target/TargetData.cpp test/CodeGen/X86/vector-of-i1.ll In-Reply-To: <4B86580E.9060903@free.fr> References: <20100224220523.B6BB32A6C136@llvm.org> <4B86580E.9060903@free.fr> Message-ID: <1C7C78A7-E3D2-4FC2-AF3C-CEF74766117B@apple.com> On Feb 25, 2010, at 2:59 AM, Duncan Sands wrote: > Hi Dan, > >> Make getTypeSizeInBits work correctly for array types; it should return >> the number of value bits, not the number of bits of allocation for in-memory >> storage. >> >> Make getTypeStoreSize and getTypeAllocSize work consistently for arrays and >> vectors. >> >> Fix several places in CodeGen which compute offsets into in-memory vectors >> to use TargetData information. >> >> This fixes PR1784. > > thanks for doing this - it is an improvement, but unfortunately it does not > really solve PR1784. In fact it doesn't address the most problematic issues > at all. > > For example, bitcasting between vectors and integers. A bitcast of <8xi1> > to i8 is currently legal. You have decided that <8 x i1> is 8 bytes long, > the same as [8 x i1], and is stored as 8 consecutive bytes. This breaks the > invariant that a bitcast from type S to type T is the same as storing an S > to memory and loading it out again as a T. This is a pretty fundamental > invariant to break! OK, suppose you decide that you don't want to break that > invariant - you might want to say bitcast from <8xi1> to i8 is illegal, but > a bitcast from <8xi1> to i64 is legal (same bitwidth). But then the legality > or not of a bitcast becomes target dependent, which is also a big no no! > > As far as I can see, there are three possibilities: > > (1) Drop the invariant that bitcast from S to T is the same as "store to > memory as type S, reload from memory as type T". This is what you chose. > I don't think Chris will like this :) > (2) Disallow bitcast of vectors. > (3) Store vectors to memory in a target independent way. This is the > opposite approach to the one you took. > > Personally I don't much like (1) ;) I've now reverted the patch. I didn't consider that vector bitcast was an endian-sensitive operation, which sinks the ship. I don't think disallowing vector bitcasts is feasible. I also don't think it's worthwhile putting complicated bitpacking logic in the backend in the absense of anyone legitimately expecting to use it. I don't see a reasonable way to satisfy the new requirements within the backwards-compatible system. Dan From gohman at apple.com Thu Feb 25 14:56:26 2010 From: gohman at apple.com (Dan Gohman) Date: Thu, 25 Feb 2010 20:56:26 -0000 Subject: [llvm-commits] [llvm] r97167 - /llvm/trunk/tools/edis/ Message-ID: <20100225205626.1A8E92A6C12D@llvm.org> Author: djg Date: Thu Feb 25 14:56:25 2010 New Revision: 97167 URL: http://llvm.org/viewvc/llvm-project?rev=97167&view=rev Log: Add svn:ignore. Modified: llvm/trunk/tools/edis/ (props changed) Propchange: llvm/trunk/tools/edis/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Thu Feb 25 14:56:25 2010 @@ -0,0 +1,8 @@ +Debug +Release +Release-Asserts +Debug+Coverage-Asserts +Debug+Coverage +Release+Coverage +Debug+Checks +EDInfo.inc From baldrick at free.fr Thu Feb 25 14:59:43 2010 From: baldrick at free.fr (Duncan Sands) Date: Thu, 25 Feb 2010 20:59:43 -0000 Subject: [llvm-commits] [dragonegg] r97168 - /dragonegg/trunk/extras/do_self_strap Message-ID: <20100225205943.883C72A6C12C@llvm.org> Author: baldrick Date: Thu Feb 25 14:59:43 2010 New Revision: 97168 URL: http://llvm.org/viewvc/llvm-project?rev=97168&view=rev Log: Strip out debug info before comparing object files. This is mainly because debug info does not seem to always work deterministically. Add options for using separate build and/or install directories, which can be useful when debugging self-host failures. Modified: dragonegg/trunk/extras/do_self_strap Modified: dragonegg/trunk/extras/do_self_strap URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/extras/do_self_strap?rev=97168&r1=97167&r2=97168&view=diff ============================================================================== --- dragonegg/trunk/extras/do_self_strap (original) +++ dragonegg/trunk/extras/do_self_strap Thu Feb 25 14:59:43 2010 @@ -9,169 +9,222 @@ # This is all extreme overkill if all you want to do is try out dragonegg! If # that's your goal then I suggest you consult the README file one directory up. -DRAGONEGG_DIR=$PWD/dragonegg - -GCC_SRC_DIR=$PWD/gcc -GCC_OBJ_DIR=$PWD/gcc-objects -GCC_INS_DIR=$PWD/gcc-install - -LLVM_SRC_DIR=$PWD/llvm -LLVM_OBJ_DIR=$PWD/llvm-objects - - -COMPARE="cmp --ignore-initial=16" -GCC_OPTIONS="--enable-lto --enable-languages=c,c++ --disable-bootstrap --disable-multilib --enable-checking" -LLVM_OPTIONS="--enable-optimized --enable-assertions" -MAKE="nice -n 20 make -j2" -STAGES="0 1 2" +DRAGONEGG_SOURCE=$PWD/dragonegg # Where to check out the dragonegg source +GCC_SOURCE=$PWD/gcc # Where to check out the GCC source +LLVM_SOURCE=$PWD/llvm # Where to check out the LLVM source + +DRAGONEGG_BUILD_BASE=$PWD/dragonegg-build # Where to build dragonegg +GCC_BUILD_BASE=$PWD/gcc-build # Where to build GCC +LLVM_BUILD_BASE=$PWD/llvm-build # Where to build LLVM +GCC_INSTALL_BASE=$PWD/gcc-install # Where to install GCC + + +STAGES="0 1 2" # Determines how many times we build GCC, LLVM and dragonegg + +#USE_PER_STAGE_BUILD_DIRECTORIES=0 # Do not use per-stage build directories +USE_PER_STAGE_BUILD_DIRECTORIES=1 # Use per-stage build directories, helps + # when debugging self-host failures + +USE_PER_STAGE_INSTALL_DIRECTORIES=0 # Do not use per-stage install + # directories +#USE_PER_STAGE_INSTALL_DIRECTORIES=1 # Use per-stage install directories +# NOTE: turning on per-stage install directories automatically disables testing +# that dragonegg object files did not change from one stage to the next. This +# is because the GCC install directory name gets embedded in the object files +# due to use of __FILE__ in headers included from the GCC install directory. + + +# How to configure GCC. As a minimum you need to enable C and C++, but you can +# also enable other languages if you like. You must specify --enable-lto. The +# other flags are optional. The reason for --disable-multilib is that GCC fails +# to build on my machine without it (this is a GCC issue, and has nothing to do +# with dragonegg or LLVM). +GCC_OPTIONS="--enable-lto --enable-languages=c,c++ --disable-bootstrap \ + --disable-multilib --enable-checking" + +# How to configure LLVM. These are all optional. On my machine, the debugger +# refuses to work with dragonegg unless I build LLVM with --disable-threads. +LLVM_OPTIONS="--enable-optimized --enable-assertions \ + --disable-threads" + + +COMPARE="cmp --ignore-initial=16" # How to compare object files +MAKE="nice -n 20 make -j2" # How to run make +STRIP_DEBUG="strip --strip-debug" # How to remove debug info set -o errexit # Exit if any command fails shopt -s nullglob +# Turn off plugin version checking, otherwise the check may fail if all stages +# are not built on the same day, since the version contains the build date. +export dragonegg_disable_version_check=yes # Check out or update the dragonegg source -if [ -a $DRAGONEGG_DIR ] ; then +if [ -a $DRAGONEGG_SOURCE ] ; then echo "Updating dragonegg" - svn update $DRAGONEGG_DIR + svn update $DRAGONEGG_SOURCE else echo "Checking out dragonegg" - svn co http://llvm.org/svn/llvm-project/dragonegg/trunk $DRAGONEGG_DIR + svn co http://llvm.org/svn/llvm-project/dragonegg/trunk $DRAGONEGG_SOURCE fi # Check out or update the LLVM source -if [ -a $LLVM_SRC_DIR ] ; then +if [ -a $LLVM_SOURCE ] ; then echo "Updating LLVM" - svn update $LLVM_SRC_DIR + svn update $LLVM_SOURCE else echo "Checking out LLVM" - svn co http://llvm.org/svn/llvm-project/llvm/trunk $LLVM_SRC_DIR + svn co http://llvm.org/svn/llvm-project/llvm/trunk $LLVM_SOURCE fi # Check out or update the GCC source -if [ -a $GCC_SRC_DIR ] ; then +if [ -a $GCC_SOURCE ] ; then echo "Reverting any applied patches" - svn revert -R $GCC_SRC_DIR/gcc + svn revert -R $GCC_SOURCE/gcc echo "Updating GCC" - svn update $GCC_SRC_DIR + svn update $GCC_SOURCE else echo "Checking out GCC" - svn co svn://gcc.gnu.org/svn/gcc/trunk $GCC_SRC_DIR + svn co svn://gcc.gnu.org/svn/gcc/trunk $GCC_SOURCE fi # Apply any needed patches to GCC -for PATCH in $DRAGONEGG_DIR/gcc-patches/*.diff ; do +for PATCH in $DRAGONEGG_SOURCE/gcc-patches/*.diff ; do echo "Applying patch $PATCH" - patch -d $GCC_SRC_DIR -p1 < $PATCH + patch -d $GCC_SOURCE -p1 < $PATCH done PLUGIN_OPTION= # No plugin yet -PREV_STAGE= # No previous stage +PREV_DRAGONEGG_BUILD= # No previous dragonegg for STAGE in $STAGES ; do - # ==> begin: Build and install GCC - echo "Building stage $STAGE GCC" - echo "Cleaning out old GCC build" - rm -fr $GCC_OBJ_DIR - mkdir -p $GCC_OBJ_DIR - cd $GCC_OBJ_DIR + if (( USE_PER_STAGE_BUILD_DIRECTORIES )) ; then + DRAGONEGG_BUILD=$DRAGONEGG_BUILD_BASE-$STAGE + GCC_BUILD=$GCC_BUILD_BASE-$STAGE + LLVM_BUILD=$LLVM_BUILD_BASE-$STAGE + else + DRAGONEGG_BUILD=$DRAGONEGG_BUILD_BASE + GCC_BUILD=$GCC_BUILD_BASE + LLVM_BUILD=$LLVM_BUILD_BASE + fi - echo "Configuring stage $STAGE GCC" - $GCC_SRC_DIR/configure --prefix=$GCC_INS_DIR $GCC_OPTIONS + if (( USE_PER_STAGE_INSTALL_DIRECTORIES )) ; then + GCC_INSTALL=$GCC_INSTALL_BASE-$STAGE + else + GCC_INSTALL=$GCC_INSTALL_BASE + fi - echo "Compiling stage $STAGE GCC" + # ==> begin: Build and install GCC + echo "Building stage $STAGE GCC" + rm -fr $GCC_BUILD + mkdir -p $GCC_BUILD + cd $GCC_BUILD + # NOTE: the configure arguments need to be the same at each stage, because + # they are recorded in the plugin version information. If they differed, + # then object files from different stages would not compare the same. This + # is the reason for configuring with the same prefix at each stage, even if + # we intend to install in a different directory each time. + $GCC_SOURCE/configure --prefix=$GCC_INSTALL_BASE $GCC_OPTIONS $MAKE echo "Installing stage $STAGE GCC" + rm -fr $GCC_INSTALL $GCC_INSTALL_BASE $MAKE install + if [ "$GCC_INSTALL_BASE" != "$GCC_INSTALL" ] ; then + # Move the just built GCC to its definitive install directory. + mv $GCC_INSTALL_BASE $GCC_INSTALL + fi # <== end: Build and install GCC # From now on compile using the newly built GCC - export CC="$GCC_INS_DIR/bin/gcc $PLUGIN_OPTION" - export CXX="$GCC_INS_DIR/bin/g++ $PLUGIN_OPTION" + export CC="$GCC_INSTALL/bin/gcc $PLUGIN_OPTION" + export CXX="$GCC_INSTALL/bin/g++ $PLUGIN_OPTION" export GCC=$CC # Tells dragonegg what to build against # The built libstdc++ and libgcc may be more recent than the system versions. # Set the library path so that programs compiled with the just built GCC will # start successfully, rather than failing due to shared library dependencies. - export LD_LIBRARY_PATH=`$CC -print-search-dirs | grep "^libraries:" | sed "s/^libraries: *=//"`:$LD_LIBRARY_PATH + export LD_LIBRARY_PATH=`$CC -print-search-dirs | grep "^libraries:" | \ + sed "s/^libraries: *=//"`:$LD_LIBRARY_PATH # ==> begin: Build LLVM using the just built GCC echo "Building stage $STAGE LLVM" - echo "Cleaning out old LLVM build" - rm -fr $LLVM_OBJ_DIR - mkdir -p $LLVM_OBJ_DIR - cd $LLVM_OBJ_DIR - - echo "Configuring stage $STAGE LLVM" - $LLVM_SRC_DIR/configure $LLVM_OPTIONS - - echo "Compiling stage $STAGE LLVM" + rm -fr $LLVM_BUILD + mkdir -p $LLVM_BUILD + cd $LLVM_BUILD + $LLVM_SOURCE/configure $LLVM_OPTIONS $MAKE # <== end: Build LLVM using the just built GCC # From now on 'llvm-config' will be the just built one. - export LLVM_CONFIG=$LLVM_OBJ_DIR/*/bin/llvm-config + export LLVM_CONFIG=$LLVM_BUILD/*/bin/llvm-config # ==> begin: Build dragonegg using the just built GCC and LLVM. echo "Building pre-stage $STAGE dragonegg" - cd $DRAGONEGG_DIR - $MAKE clean - $MAKE - echo "Plugin is dragonegg.latest.so" - cp dragonegg.so dragonegg.latest.so - # <== end: Build dragonegg using the just built GCC and LLVM. + rm -fr $DRAGONEGG_BUILD-pre + mkdir -p $DRAGONEGG_BUILD-pre + cd $DRAGONEGG_BUILD-pre + $MAKE -f $DRAGONEGG_SOURCE/Makefile clean + SRC_DIR=$DRAGONEGG_SOURCE $MAKE -f $DRAGONEGG_SOURCE/Makefile + # <== end: Build dragonegg using the just built GCC and DRAGONEGG. - # From now on compile using the latest dragonegg - PLUGIN_OPTION="-fplugin=$DRAGONEGG_DIR/dragonegg.latest.so" - export CC="$GCC_INS_DIR/bin/gcc $PLUGIN_OPTION" - export CXX="$GCC_INS_DIR/bin/g++ $PLUGIN_OPTION" + # Compile using the just built dragonegg. + PLUGIN_OPTION="-fplugin=$DRAGONEGG_BUILD-pre/dragonegg.so" + export CC="$GCC_INSTALL/bin/gcc $PLUGIN_OPTION" + export CXX="$GCC_INSTALL/bin/g++ $PLUGIN_OPTION" export GCC=$CC # Tells dragonegg what to build against # ==> begin: Build dragonegg again using the just built dragonegg echo "Building stage $STAGE dragonegg with itself" - cd $DRAGONEGG_DIR - $MAKE clean - $MAKE - echo "Plugin is dragonegg.latest.so" - cp dragonegg.so dragonegg.latest.so + rm -fr $DRAGONEGG_BUILD + mkdir -p $DRAGONEGG_BUILD + cd $DRAGONEGG_BUILD + $MAKE -f $DRAGONEGG_SOURCE/Makefile clean + SRC_DIR=$DRAGONEGG_SOURCE $MAKE -f $DRAGONEGG_SOURCE/Makefile # <== end: Build dragonegg again using the just built dragonegg - # ==> begin: Compare the dragonegg objects with those from the previous stage - if [ "x$PREV_STAGE" != "x" ] ; then - echo "Comparing stage $STAGE dragonegg objects to stage $PREV_STAGE objects" - cd $DRAGONEGG_DIR - for O in *.o ; do - P=stage-$PREV_STAGE-objects/$O - echo "$O vs $P" - $COMPARE $O $P - done - fi - # <== end: Compare the dragonegg objects with those from the previous stage + # Compile using the self-built dragonegg. + PLUGIN_OPTION="-fplugin=$DRAGONEGG_BUILD/dragonegg.so" + export CC="$GCC_INSTALL/bin/gcc $PLUGIN_OPTION" + export CXX="$GCC_INSTALL/bin/g++ $PLUGIN_OPTION" + export GCC=$CC # Tells dragonegg what to build against + + # ==> begin: Compare the dragonegg objects with those from the previous stage + if (( !USE_PER_STAGE_INSTALL_DIRECTORIES )) ; then - # ==> begin: Save a copy of the plugin and the object files use to make it. - cd $DRAGONEGG_DIR + # ==> begin: Strip debug symbols from object files. + # There currently seems to something non-deterministic in LLVM's debug info + # logic. For the moment, just strip off debug info. + cd $DRAGONEGG_BUILD + for O in *.o ; do + $STRIP_DEBUG $O -o $O.stripped + done + # <== end: Strip debug symbols from object files. + + if [ "x$PREV_DRAGONEGG_BUILD" != "x" ] ; then + echo "Comparing $DRAGONEGG_BUILD objects to $PREV_DRAGONEGG_BUILD objects" + cd $DRAGONEGG_BUILD + for O in *.o.stripped ; do + P=$PREV_DRAGONEGG_BUILD/$O + $COMPARE $O $P + done + fi - echo "Self built dragonegg is dragonegg.$STAGE.so" - cp dragonegg.so dragonegg.$STAGE.so + fi + # <== end: Compare the dragonegg objects with those from the previous stage - SAVED_OBJECTS_DIR=stage-$STAGE-objects/ - echo "Moving objects to $SAVED_OBJECTS_DIR" - rm -fr $SAVED_OBJECTS_DIR - mkdir $SAVED_OBJECTS_DIR - mv *.o $SAVED_OBJECTS_DIR - # <== end: Save a copy of the plugin and the object files use to make it. - PREV_STAGE=$STAGE + PREV_DRAGONEGG_BUILD=$DRAGONEGG_BUILD done From dalej at apple.com Thu Feb 25 15:14:20 2010 From: dalej at apple.com (Dale Johannesen) Date: Thu, 25 Feb 2010 13:14:20 -0800 Subject: [llvm-commits] [dragonegg] r97168 - /dragonegg/trunk/extras/do_self_strap In-Reply-To: <20100225205943.883C72A6C12C@llvm.org> References: <20100225205943.883C72A6C12C@llvm.org> Message-ID: <07AAD3E9-1B69-42DB-882D-43A460C38851@apple.com> On Feb 25, 2010, at 12:59 PMPST, Duncan Sands wrote: > Author: baldrick > Date: Thu Feb 25 14:59:43 2010 > New Revision: 97168 > > URL: http://llvm.org/viewvc/llvm-project?rev=97168&view=rev > Log: > Strip out debug info before comparing object files. This is mainly > because debug info does not seem to always work deterministically. It should be deterministic. If you find llvm (as opposed to gcc) is producing nondeterministic info please file bugs. From isanbard at gmail.com Thu Feb 25 15:19:47 2010 From: isanbard at gmail.com (Bill Wendling) Date: Thu, 25 Feb 2010 21:19:47 -0000 Subject: [llvm-commits] [llvm] r97169 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp Message-ID: <20100225211947.353892A6C12C@llvm.org> Author: void Date: Thu Feb 25 15:19:47 2010 New Revision: 97169 URL: http://llvm.org/viewvc/llvm-project?rev=97169&view=rev Log: Make comment more meaningful. Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp?rev=97169&r1=97168&r2=97169&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp Thu Feb 25 15:19:47 2010 @@ -746,7 +746,8 @@ unsigned SizeAlign = (4 - TotalSize) & 3; if (HaveTTData) - // Pad here for alignment. + // Account for any extra padded that will be added to the call site table + // length. EmitULEB128(TTypeBaseOffset + SizeAlign, "@TType base offset"); // SjLj Exception handling From andreas.bolka at gmx.net Thu Feb 25 15:22:02 2010 From: andreas.bolka at gmx.net (Andreas Bolka) Date: Thu, 25 Feb 2010 22:22:02 +0100 Subject: [llvm-commits] [llvm] r97150 - in /llvm/trunk/utils/git: ./ find-rev In-Reply-To: <20100225180707.E313F2A6C12E@llvm.org> References: <20100225180707.E313F2A6C12E@llvm.org> Message-ID: <1267132728-sup-5715@strider> Hi Daniel, On Thu Feb 25 18:07:07 UTC 2010, Daniel Dunbar wrote: > New Revision: 97150 > > URL: http://llvm.org/viewvc/llvm-project?rev=97150&view=rev > Log: > Add simple script for finding most-recent-rev-before-N in a git-svn > repo; useful when bisecting multiple repos in sync. > > Added: > llvm/trunk/utils/git/ > llvm/trunk/utils/git/find-rev (with props) How about calling this script `find-rev-before` to avoid confusion with git-svn's `find-rev` command? -- Regards, Andreas From isanbard at gmail.com Thu Feb 25 15:23:24 2010 From: isanbard at gmail.com (Bill Wendling) Date: Thu, 25 Feb 2010 21:23:24 -0000 Subject: [llvm-commits] [llvm] r97170 - /llvm/trunk/docs/LangRef.html Message-ID: <20100225212324.745C52A6C12C@llvm.org> Author: void Date: Thu Feb 25 15:23:24 2010 New Revision: 97170 URL: http://llvm.org/viewvc/llvm-project?rev=97170&view=rev Log: Fix HTML. Modified: llvm/trunk/docs/LangRef.html Modified: llvm/trunk/docs/LangRef.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=97170&r1=97169&r2=97170&view=diff ============================================================================== --- llvm/trunk/docs/LangRef.html (original) +++ llvm/trunk/docs/LangRef.html Thu Feb 25 15:23:24 2010 @@ -4077,9 +4077,9 @@
Syntax:
-  <result> = load <ty>* <pointer>[, align <alignment>][, !nontemporal !]
-  <result> = volatile load <ty>* <pointer>[, align <alignment>][, !nontemporal !]
-  ! = !{ i32 1 }
+  <result> = load <ty>* <pointer>[, align <alignment>][, !nontemporal !<index>]
+  <result> = volatile load <ty>* <pointer>[, align <alignment>][, !nontemporal !<index>]
+  !<index> = !{ i32 1 }
 
Overview:
@@ -4094,21 +4094,21 @@ volatile load and store instructions.

-

The optional constant "align" argument specifies the alignment of the +

The optional constant align argument specifies the alignment of the operation (that is, the alignment of the memory address). A value of 0 or an - omitted "align" argument means that the operation has the preferential + omitted align argument means that the operation has the preferential alignment for the target. It is the responsibility of the code emitter to ensure that the alignment information is correct. Overestimating the - alignment results in an undefined behavior. Underestimating the alignment may + alignment results in undefined behavior. Underestimating the alignment may produce less efficient code. An alignment of 1 is always safe.

-

The optional !nontemporal metadata must reference a single metatadata - name corresponding to a metadata node with one i32 entry of - value 1. The existance of the !nontemporal metatadata on the - instruction tells the optimizer and code generator that this load is - not expected to be reused in the cache. The code generator may - select special instructions to save cache bandwidth, such as the - MOVNT intruction on x86.

+

The optional !nontemporal metadata must reference a single + metatadata name <index> corresponding to a metadata node with + one i32 entry of value 1. The existance of + the !nontemporal metatadata on the instruction tells the optimizer + and code generator that this load is not expected to be reused in the cache. + The code generator may select special instructions to save cache bandwidth, + such as the MOVNT intruction on x86.

Semantics:

The location of memory pointed to is loaded. If the value being loaded is of From daniel at zuster.org Thu Feb 25 16:09:09 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Thu, 25 Feb 2010 22:09:09 -0000 Subject: [llvm-commits] [llvm] r97171 - /llvm/trunk/test/lit.cfg Message-ID: <20100225220909.2B2392A6C12C@llvm.org> Author: ddunbar Date: Thu Feb 25 16:09:09 2010 New Revision: 97171 URL: http://llvm.org/viewvc/llvm-project?rev=97171&view=rev Log: tests: Propogate the HOME environment variable through to tests. I'm ambivalent about this, but it can be useful for users who use ccache, since the LLVMC tests are fond of calling gcc. Modified: llvm/trunk/test/lit.cfg Modified: llvm/trunk/test/lit.cfg URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lit.cfg?rev=97171&r1=97170&r2=97171&view=diff ============================================================================== --- llvm/trunk/test/lit.cfg (original) +++ llvm/trunk/test/lit.cfg Thu Feb 25 16:09:09 2010 @@ -45,6 +45,9 @@ config.environment['PATH'])) config.environment['PATH'] = path +# Propogate 'HOME' through the environment. +config.environment['HOME'] = os.environ['HOME'] + ### import os From daniel at zuster.org Thu Feb 25 16:12:37 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Thu, 25 Feb 2010 22:12:37 -0000 Subject: [llvm-commits] [test-suite] r97172 - /test-suite/trunk/Makefile.rules Message-ID: <20100225221237.780382A6C12C@llvm.org> Author: ddunbar Date: Thu Feb 25 16:12:37 2010 New Revision: 97172 URL: http://llvm.org/viewvc/llvm-project?rev=97172&view=rev Log: If LLVMCC_OPTION is unset, use LLVMGCC/LLVMGXX, for compatibility with old LLVM checkouts. Modified: test-suite/trunk/Makefile.rules Modified: test-suite/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Makefile.rules?rev=97172&r1=97171&r2=97172&view=diff ============================================================================== --- test-suite/trunk/Makefile.rules (original) +++ test-suite/trunk/Makefile.rules Thu Feb 25 16:12:37 2010 @@ -268,6 +268,10 @@ LLVMCXX := $(LLVMTOOLCURRENT)/clang++ endif endif + else + # Compatibility with older LLVM checkouts. + LLVMCC := $(LLVMGCC) + LLVMCXX := $(LLVMGXX) endif endif From sabre at nondot.org Thu Feb 25 16:33:52 2010 From: sabre at nondot.org (Chris Lattner) Date: Thu, 25 Feb 2010 22:33:52 -0000 Subject: [llvm-commits] [llvm] r97178 - in /llvm/trunk: lib/Transforms/IPO/GlobalOpt.cpp test/Transforms/GlobalOpt/2010-02-25-MallocPromote.ll Message-ID: <20100225223352.67C0F2A6C12C@llvm.org> Author: lattner Date: Thu Feb 25 16:33:52 2010 New Revision: 97178 URL: http://llvm.org/viewvc/llvm-project?rev=97178&view=rev Log: rewrite OptimizeGlobalAddressOfMalloc to fix PR6422, some bugs introduced when mallocinst was eliminated. Added: llvm/trunk/test/Transforms/GlobalOpt/2010-02-25-MallocPromote.ll Modified: llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp Modified: llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp?rev=97178&r1=97177&r2=97178&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp (original) +++ llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp Thu Feb 25 16:33:52 2010 @@ -813,55 +813,49 @@ static GlobalVariable *OptimizeGlobalAddressOfMalloc(GlobalVariable *GV, CallInst *CI, const Type *AllocTy, - Value* NElems, + ConstantInt *NElements, TargetData* TD) { - DEBUG(dbgs() << "PROMOTING GLOBAL: " << *GV << " CALL = " << *CI << '\n'); - - const Type *IntPtrTy = TD->getIntPtrType(GV->getContext()); + DEBUG(errs() << "PROMOTING GLOBAL: " << *GV << " CALL = " << *CI << '\n'); - // CI has either 0 or 1 bitcast uses (getMallocType() would otherwise have - // returned NULL and we would not be here). - BitCastInst *BCI = NULL; - for (Value::use_iterator UI = CI->use_begin(), E = CI->use_end(); UI != E; ) - if ((BCI = dyn_cast(cast(*UI++)))) - break; - - ConstantInt *NElements = cast(NElems); - if (NElements->getZExtValue() != 1) { - // If we have an array allocation, transform it to a single element - // allocation to make the code below simpler. - Type *NewTy = ArrayType::get(AllocTy, NElements->getZExtValue()); - unsigned TypeSize = TD->getTypeAllocSize(NewTy); - if (const StructType *ST = dyn_cast(NewTy)) - TypeSize = TD->getStructLayout(ST)->getSizeInBytes(); - Instruction *NewCI = CallInst::CreateMalloc(CI, IntPtrTy, NewTy, - ConstantInt::get(IntPtrTy, TypeSize)); - Value* Indices[2]; - Indices[0] = Indices[1] = Constant::getNullValue(IntPtrTy); - Value *NewGEP = GetElementPtrInst::Create(NewCI, Indices, Indices + 2, - NewCI->getName()+".el0", CI); - Value *Cast = new BitCastInst(NewGEP, CI->getType(), "el0", CI); - if (BCI) BCI->replaceAllUsesWith(NewGEP); - CI->replaceAllUsesWith(Cast); - if (BCI) BCI->eraseFromParent(); - CI->eraseFromParent(); - BCI = dyn_cast(NewCI); - CI = BCI ? extractMallocCallFromBitCast(BCI) : cast(NewCI); - } + const Type *GlobalType; + if (NElements->getZExtValue() == 1) + GlobalType = AllocTy; + else + // If we have an array allocation, the global variable is of an array. + GlobalType = ArrayType::get(AllocTy, NElements->getZExtValue()); // Create the new global variable. The contents of the malloc'd memory is // undefined, so initialize with an undef value. const Type *MAT = getMallocAllocatedType(CI); - Constant *Init = UndefValue::get(MAT); GlobalVariable *NewGV = new GlobalVariable(*GV->getParent(), MAT, false, - GlobalValue::InternalLinkage, Init, + GlobalValue::InternalLinkage, + UndefValue::get(MAT), GV->getName()+".body", GV, GV->isThreadLocal()); - // Anything that used the malloc or its bitcast now uses the global directly. - if (BCI) BCI->replaceAllUsesWith(NewGV); + // If there are bitcast users of the malloc (which is typical, usually we have + // a malloc + bitcast) then replace them with uses of the new global. Update + // other users to use the global as well. + BitCastInst *TheBC = 0; + while (!CI->use_empty()) { + Instruction *User = cast(CI->use_back()); + if (BitCastInst *BCI = dyn_cast(User)) { + if (BCI->getType() == NewGV->getType()) { + BCI->replaceAllUsesWith(NewGV); + BCI->eraseFromParent(); + } else { + BCI->setOperand(0, NewGV); + } + } else { + if (TheBC == 0) + TheBC = new BitCastInst(NewGV, CI->getType(), "newgv", CI); + User->replaceUsesOfWith(CI, TheBC); + } + } + + // Update Anything else that used the malloc or its bitcast now uses the global directly. CI->replaceAllUsesWith(new BitCastInst(NewGV, CI->getType(), "newgv", CI)); Constant *RepValue = NewGV; @@ -879,60 +873,60 @@ bool InitBoolUsed = false; // Loop over all uses of GV, processing them in turn. - std::vector Stores; - while (!GV->use_empty()) - if (LoadInst *LI = dyn_cast(GV->use_back())) { - while (!LI->use_empty()) { - Use &LoadUse = LI->use_begin().getUse(); - if (!isa(LoadUse.getUser())) - LoadUse = RepValue; - else { - ICmpInst *ICI = cast(LoadUse.getUser()); - // Replace the cmp X, 0 with a use of the bool value. - Value *LV = new LoadInst(InitBool, InitBool->getName()+".val", ICI); - InitBoolUsed = true; - switch (ICI->getPredicate()) { - default: llvm_unreachable("Unknown ICmp Predicate!"); - case ICmpInst::ICMP_ULT: - case ICmpInst::ICMP_SLT: // X < null -> always false - LV = ConstantInt::getFalse(GV->getContext()); - break; - case ICmpInst::ICMP_ULE: - case ICmpInst::ICMP_SLE: - case ICmpInst::ICMP_EQ: - LV = BinaryOperator::CreateNot(LV, "notinit", ICI); - break; - case ICmpInst::ICMP_NE: - case ICmpInst::ICMP_UGE: - case ICmpInst::ICMP_SGE: - case ICmpInst::ICMP_UGT: - case ICmpInst::ICMP_SGT: - break; // no change. - } - ICI->replaceAllUsesWith(LV); - ICI->eraseFromParent(); - } - } - LI->eraseFromParent(); - } else { - StoreInst *SI = cast(GV->use_back()); + while (!GV->use_empty()) { + if (StoreInst *SI = dyn_cast(GV->use_back())) { // The global is initialized when the store to it occurs. new StoreInst(ConstantInt::getTrue(GV->getContext()), InitBool, SI); SI->eraseFromParent(); + continue; } + + LoadInst *LI = cast(GV->use_back()); + while (!LI->use_empty()) { + Use &LoadUse = LI->use_begin().getUse(); + if (!isa(LoadUse.getUser())) { + LoadUse = RepValue; + continue; + } + + ICmpInst *ICI = cast(LoadUse.getUser()); + // Replace the cmp X, 0 with a use of the bool value. + Value *LV = new LoadInst(InitBool, InitBool->getName()+".val", ICI); + InitBoolUsed = true; + switch (ICI->getPredicate()) { + default: llvm_unreachable("Unknown ICmp Predicate!"); + case ICmpInst::ICMP_ULT: + case ICmpInst::ICMP_SLT: // X < null -> always false + LV = ConstantInt::getFalse(GV->getContext()); + break; + case ICmpInst::ICMP_ULE: + case ICmpInst::ICMP_SLE: + case ICmpInst::ICMP_EQ: + LV = BinaryOperator::CreateNot(LV, "notinit", ICI); + break; + case ICmpInst::ICMP_NE: + case ICmpInst::ICMP_UGE: + case ICmpInst::ICMP_SGE: + case ICmpInst::ICMP_UGT: + case ICmpInst::ICMP_SGT: + break; // no change. + } + ICI->replaceAllUsesWith(LV); + ICI->eraseFromParent(); + } + LI->eraseFromParent(); + } // If the initialization boolean was used, insert it, otherwise delete it. if (!InitBoolUsed) { while (!InitBool->use_empty()) // Delete initializations - cast(InitBool->use_back())->eraseFromParent(); + cast(InitBool->use_back())->eraseFromParent(); delete InitBool; } else GV->getParent()->getGlobalList().insert(GV, InitBool); - - // Now the GV is dead, nuke it and the malloc (both CI and BCI). + // Now the GV is dead, nuke it and the malloc.. GV->eraseFromParent(); - if (BCI) BCI->eraseFromParent(); CI->eraseFromParent(); // To further other optimizations, loop over all users of NewGV and try to @@ -1497,7 +1491,7 @@ // something. if (TD && NElements->getZExtValue() * TD->getTypeAllocSize(AllocTy) < 2048) { - GVI = OptimizeGlobalAddressOfMalloc(GV, CI, AllocTy, NElems, TD); + GVI = OptimizeGlobalAddressOfMalloc(GV, CI, AllocTy, NElements, TD); return true; } Added: llvm/trunk/test/Transforms/GlobalOpt/2010-02-25-MallocPromote.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalOpt/2010-02-25-MallocPromote.ll?rev=97178&view=auto ============================================================================== --- llvm/trunk/test/Transforms/GlobalOpt/2010-02-25-MallocPromote.ll (added) +++ llvm/trunk/test/Transforms/GlobalOpt/2010-02-25-MallocPromote.ll Thu Feb 25 16:33:52 2010 @@ -0,0 +1,17 @@ +; PR6422 +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128" +target triple = "x86_64-unknown-linux-gnu" + + at fixLRBT = internal global i32* null ; [#uses=2] + +declare noalias i8* @malloc(i32) + +define i32 @parser() nounwind { +bb918: + %malloccall.i10 = call i8* @malloc(i32 16) nounwind ; [#uses=1] + %0 = bitcast i8* %malloccall.i10 to i32* ; [#uses=1] + store i32* %0, i32** @fixLRBT, align 8 + %1 = load i32** @fixLRBT, align 8 ; [#uses=0] + %A = load i32* %1 + ret i32 %A +} From criswell at uiuc.edu Thu Feb 25 16:57:19 2010 From: criswell at uiuc.edu (John Criswell) Date: Thu, 25 Feb 2010 22:57:19 -0000 Subject: [llvm-commits] [llvm] r97179 - in /llvm/trunk: autoconf/configure.ac configure Message-ID: <20100225225719.3E4CF2A6C12C@llvm.org> Author: criswell Date: Thu Feb 25 16:57:19 2010 New Revision: 97179 URL: http://llvm.org/viewvc/llvm-project?rev=97179&view=rev Log: Added SAFECode (safecode) to the list of projects to automatically configure. Modified: llvm/trunk/autoconf/configure.ac llvm/trunk/configure Modified: llvm/trunk/autoconf/configure.ac URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=97179&r1=97178&r2=97179&view=diff ============================================================================== --- llvm/trunk/autoconf/configure.ac (original) +++ llvm/trunk/autoconf/configure.ac Thu Feb 25 16:57:19 2010 @@ -80,6 +80,7 @@ llvm-tv) AC_CONFIG_SUBDIRS([projects/llvm-tv]) ;; llvm-poolalloc) AC_CONFIG_SUBDIRS([projects/llvm-poolalloc]) ;; poolalloc) AC_CONFIG_SUBDIRS([projects/poolalloc]) ;; + safecode) AC_CONFIG_SUBDIRS([projects/safecode]) ;; llvm-kernel) AC_CONFIG_SUBDIRS([projects/llvm-kernel]) ;; *) AC_MSG_WARN([Unknown project (${i}) won't be configured automatically]) Modified: llvm/trunk/configure URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=97179&r1=97178&r2=97179&view=diff ============================================================================== --- llvm/trunk/configure (original) +++ llvm/trunk/configure Thu Feb 25 16:57:19 2010 @@ -813,6 +813,7 @@ projects/llvm-tv projects/llvm-poolalloc projects/poolalloc +projects/safecode projects/llvm-kernel' # Initialize some variables set by options. @@ -1979,6 +1980,8 @@ ;; poolalloc) subdirs="$subdirs projects/poolalloc" ;; + safecode) subdirs="$subdirs projects/safecode" + ;; llvm-kernel) subdirs="$subdirs projects/llvm-kernel" ;; *) @@ -11133,7 +11136,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < Author: djg Date: Thu Feb 25 17:41:41 2010 New Revision: 97181 URL: http://llvm.org/viewvc/llvm-project?rev=97181&view=rev Log: Fix a typo. Modified: llvm/trunk/docs/FAQ.html Modified: llvm/trunk/docs/FAQ.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/FAQ.html?rev=97181&r1=97180&r2=97181&view=diff ============================================================================== --- llvm/trunk/docs/FAQ.html (original) +++ llvm/trunk/docs/FAQ.html Thu Feb 25 17:41:41 2010 @@ -437,7 +437,7 @@

The GNUmakefile in the top-level directory of LLVM-GCC is a special Makefile used by Apple to invoke the build_gcc script after - setting up a special environment. This has the unforunate side-effect that + setting up a special environment. This has the unfortunate side-effect that trying to build LLVM-GCC with srcdir == objdir in a "non-Apple way" invokes the GNUmakefile instead of Makefile. Because the environment isn't set up correctly to do this, the build fails.

From isanbard at gmail.com Thu Feb 25 17:52:45 2010 From: isanbard at gmail.com (Bill Wendling) Date: Thu, 25 Feb 2010 23:52:45 -0000 Subject: [llvm-commits] [llvm] r97183 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp Message-ID: <20100225235245.0BE8C2A6C12D@llvm.org> Author: void Date: Thu Feb 25 17:52:44 2010 New Revision: 97183 URL: http://llvm.org/viewvc/llvm-project?rev=97183&view=rev Log: Catch a corner case where adding the padding to the "TType base offset" field will eliminate the need for padding in the "Call site table length". E.g., if we have this: GCC_except_table1: Lexception1: .byte 0xff ## @LPStart Encoding = omit .byte 0x9b ## @TType Encoding = indirect pcrel sdata4 .byte 0x7f ## @TType base offset .byte 0x03 ## Call site Encodi