From stpworld at narod.ru Mon Oct 31 01:07:03 2011 From: stpworld at narod.ru (Stepan Dyatkovskiy) Date: Mon, 31 Oct 2011 10:07:03 +0400 Subject: [llvm-commits] [LLVM, SwitchInst, case ranges] Auxiliary patch #1 In-Reply-To: <4EAA9B5D.802@narod.ru> References: <4EAA9B5D.802@narod.ru> Message-ID: <4EAE3B07.2040108@narod.ru> ping. -Stepan Stepan Dyatkovskiy wrote: > Hi all. The main discussion branch of this feature is here: > http://llvm.org/bugs/show_bug.cgi?id=1255 > > We need change SwitchInst internals: replace case value type from > "ConstantInt" to "APInt", then move case values out from operands > collection. To do that we need add APInt::isInitialized feature. We also > need extend SmallSet class adding Compare parameter to this template: > template > > > Please find attached patches for review. > > Regards, > Stepan. > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From craig.topper at gmail.com Mon Oct 31 02:16:38 2011 From: craig.topper at gmail.com (Craig Topper) Date: Mon, 31 Oct 2011 07:16:38 -0000 Subject: [llvm-commits] [llvm] r143336 - in /llvm/trunk: include/llvm/IntrinsicsX86.td test/CodeGen/X86/avx-intrinsics-x86.ll Message-ID: <20111031071638.1E7DC3524001@llvm.org> Author: ctopper Date: Mon Oct 31 02:16:37 2011 New Revision: 143336 URL: http://llvm.org/viewvc/llvm-project?rev=143336&view=rev Log: Fix operand type for int_x86_ssse3_phadd_sw_128 intrinsic Modified: llvm/trunk/include/llvm/IntrinsicsX86.td llvm/trunk/test/CodeGen/X86/avx-intrinsics-x86.ll Modified: llvm/trunk/include/llvm/IntrinsicsX86.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IntrinsicsX86.td?rev=143336&r1=143335&r2=143336&view=diff ============================================================================== --- llvm/trunk/include/llvm/IntrinsicsX86.td (original) +++ llvm/trunk/include/llvm/IntrinsicsX86.td Mon Oct 31 02:16:37 2011 @@ -627,8 +627,8 @@ Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], [IntrNoMem]>; def int_x86_ssse3_phadd_sw_128 : GCCBuiltin<"__builtin_ia32_phaddsw128">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, - llvm_v4i32_ty], [IntrNoMem]>; + Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, + llvm_v8i16_ty], [IntrNoMem]>; def int_x86_ssse3_phsub_w : GCCBuiltin<"__builtin_ia32_phsubw">, Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, Modified: llvm/trunk/test/CodeGen/X86/avx-intrinsics-x86.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx-intrinsics-x86.ll?rev=143336&r1=143335&r2=143336&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/avx-intrinsics-x86.ll (original) +++ llvm/trunk/test/CodeGen/X86/avx-intrinsics-x86.ll Mon Oct 31 02:16:37 2011 @@ -1743,12 +1743,12 @@ declare <4 x i32> @llvm.x86.ssse3.phadd.d.128(<4 x i32>, <4 x i32>) nounwind readnone -define <4 x i32> @test_x86_ssse3_phadd_sw_128(<4 x i32> %a0, <4 x i32> %a1) { +define <8 x i16> @test_x86_ssse3_phadd_sw_128(<8 x i16> %a0, <8 x i16> %a1) { ; CHECK: vphaddsw - %res = call <4 x i32> @llvm.x86.ssse3.phadd.sw.128(<4 x i32> %a0, <4 x i32> %a1) ; <<4 x i32>> [#uses=1] - ret <4 x i32> %res + %res = call <8 x i16> @llvm.x86.ssse3.phadd.sw.128(<8 x i16> %a0, <8 x i16> %a1) ; <<8 x i16>> [#uses=1] + ret <8 x i16> %res } -declare <4 x i32> @llvm.x86.ssse3.phadd.sw.128(<4 x i32>, <4 x i32>) nounwind readnone +declare <8 x i16> @llvm.x86.ssse3.phadd.sw.128(<8 x i16>, <8 x i16>) nounwind readnone define <8 x i16> @test_x86_ssse3_phadd_w_128(<8 x i16> %a0, <8 x i16> %a1) { From baldrick at free.fr Mon Oct 31 03:04:56 2011 From: baldrick at free.fr (Duncan Sands) Date: Mon, 31 Oct 2011 09:04:56 +0100 Subject: [llvm-commits] [llvm] r143326 - in /llvm/trunk: lib/Target/TargetMachine.cpp test/CodeGen/X86/dbg-file-name.ll tools/llc/llc.cpp In-Reply-To: <20111031010602.929713524001@llvm.org> References: <20111031010602.929713524001@llvm.org> Message-ID: <4EAE56A8.1020709@free.fr> Hi Nick, I forget if the .file directive stuff is in 3.0, but if it is I guess this should go in 3.0 too. Ciao, Duncan. On 10/31/11 02:06, Nick Lewycky wrote: > Author: nicholas > Date: Sun Oct 30 20:06:02 2011 > New Revision: 143326 > > URL: http://llvm.org/viewvc/llvm-project?rev=143326&view=rev > Log: > Switch new .file directive emission off by default, change llc's flag for it to > -enable-dwarf-directory. > > Modified: > llvm/trunk/lib/Target/TargetMachine.cpp > llvm/trunk/test/CodeGen/X86/dbg-file-name.ll > llvm/trunk/tools/llc/llc.cpp > > Modified: llvm/trunk/lib/Target/TargetMachine.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetMachine.cpp?rev=143326&r1=143325&r2=143326&view=diff > ============================================================================== > --- llvm/trunk/lib/Target/TargetMachine.cpp (original) > +++ llvm/trunk/lib/Target/TargetMachine.cpp Sun Oct 30 20:06:02 2011 > @@ -198,7 +198,7 @@ > MCSaveTempLabels(false), > MCUseLoc(true), > MCUseCFI(true), > - MCUseDwarfDirectory(true) { > + MCUseDwarfDirectory(false) { > // Typically it will be subtargets that will adjust FloatABIType from Default > // to Soft or Hard. > if (UseSoftFloat) > > Modified: llvm/trunk/test/CodeGen/X86/dbg-file-name.ll > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/dbg-file-name.ll?rev=143326&r1=143325&r2=143326&view=diff > ============================================================================== > --- llvm/trunk/test/CodeGen/X86/dbg-file-name.ll (original) > +++ llvm/trunk/test/CodeGen/X86/dbg-file-name.ll Sun Oct 30 20:06:02 2011 > @@ -1,4 +1,4 @@ > -; RUN: llc -mtriple x86_64-apple-darwin10.0.0< %s | FileCheck %s > +; RUN: llc -enable-dwarf-directory -mtriple x86_64-apple-darwin10.0.0< %s | FileCheck %s > > ; Radar 8884898 > ; CHECK: file 1 "/Users/manav/one/two" "simple.c" > > Modified: llvm/trunk/tools/llc/llc.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llc/llc.cpp?rev=143326&r1=143325&r2=143326&view=diff > ============================================================================== > --- llvm/trunk/tools/llc/llc.cpp (original) > +++ llvm/trunk/tools/llc/llc.cpp Sun Oct 30 20:06:02 2011 > @@ -133,8 +133,8 @@ > cl::opt DisableCFI("disable-cfi", cl::Hidden, > cl::desc("Do not use .cfi_* directives")); > > -cl::opt DisableDwarfDirectory("disable-dwarf-directory", cl::Hidden, > - cl::desc("Do not use file directives with an explicit directory.")); > +cl::opt EnableDwarfDirectory("enable-dwarf-directory", cl::Hidden, > + cl::desc("Use .file directives with an explicit directory.")); > > static cl::opt > DisableRedZone("disable-red-zone", > @@ -319,8 +319,8 @@ > if (DisableCFI) > Target.setMCUseCFI(false); > > - if (DisableDwarfDirectory) > - Target.setMCUseDwarfDirectory(false); > + if (EnableDwarfDirectory) > + Target.setMCUseDwarfDirectory(true); > > // Disable .loc support for older OS X versions. > if (TheTriple.isMacOSX()&& > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From nicholas at mxc.ca Mon Oct 31 03:54:51 2011 From: nicholas at mxc.ca (Nick Lewycky) Date: Mon, 31 Oct 2011 01:54:51 -0700 Subject: [llvm-commits] patch: smarter DSE Message-ID: <4EAE625B.7050108@mxc.ca> This patch teaches DSE to look for blocks that will unconditionally land in the particular free call, when handling a call to free. This is important for std::vector, see PR11240. Please review! Nick -------------- next part -------------- A non-text attachment was scrubbed... Name: pr11240-1.patch Type: text/x-patch Size: 5703 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111031/91ae4c1f/attachment.bin From nicholas at mxc.ca Mon Oct 31 03:55:27 2011 From: nicholas at mxc.ca (Nick Lewycky) Date: Mon, 31 Oct 2011 01:55:27 -0700 Subject: [llvm-commits] [llvm] r143326 - in /llvm/trunk: lib/Target/TargetMachine.cpp test/CodeGen/X86/dbg-file-name.ll tools/llc/llc.cpp In-Reply-To: <4EAE56A8.1020709@free.fr> References: <20111031010602.929713524001@llvm.org> <4EAE56A8.1020709@free.fr> Message-ID: <4EAE627F.3030701@mxc.ca> Duncan Sands wrote: > Hi Nick, I forget if the .file directive stuff is in 3.0, but if it is I guess > this should go in 3.0 too. It is not. I held off on the commit for a few days to wait for 3.0 to branch first. Nick > > Ciao, Duncan. > > On 10/31/11 02:06, Nick Lewycky wrote: >> Author: nicholas >> Date: Sun Oct 30 20:06:02 2011 >> New Revision: 143326 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=143326&view=rev >> Log: >> Switch new .file directive emission off by default, change llc's flag for it to >> -enable-dwarf-directory. >> >> Modified: >> llvm/trunk/lib/Target/TargetMachine.cpp >> llvm/trunk/test/CodeGen/X86/dbg-file-name.ll >> llvm/trunk/tools/llc/llc.cpp >> >> Modified: llvm/trunk/lib/Target/TargetMachine.cpp >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetMachine.cpp?rev=143326&r1=143325&r2=143326&view=diff >> ============================================================================== >> --- llvm/trunk/lib/Target/TargetMachine.cpp (original) >> +++ llvm/trunk/lib/Target/TargetMachine.cpp Sun Oct 30 20:06:02 2011 >> @@ -198,7 +198,7 @@ >> MCSaveTempLabels(false), >> MCUseLoc(true), >> MCUseCFI(true), >> - MCUseDwarfDirectory(true) { >> + MCUseDwarfDirectory(false) { >> // Typically it will be subtargets that will adjust FloatABIType from Default >> // to Soft or Hard. >> if (UseSoftFloat) >> >> Modified: llvm/trunk/test/CodeGen/X86/dbg-file-name.ll >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/dbg-file-name.ll?rev=143326&r1=143325&r2=143326&view=diff >> ============================================================================== >> --- llvm/trunk/test/CodeGen/X86/dbg-file-name.ll (original) >> +++ llvm/trunk/test/CodeGen/X86/dbg-file-name.ll Sun Oct 30 20:06:02 2011 >> @@ -1,4 +1,4 @@ >> -; RUN: llc -mtriple x86_64-apple-darwin10.0.0< %s | FileCheck %s >> +; RUN: llc -enable-dwarf-directory -mtriple x86_64-apple-darwin10.0.0< %s | FileCheck %s >> >> ; Radar 8884898 >> ; CHECK: file 1 "/Users/manav/one/two" "simple.c" >> >> Modified: llvm/trunk/tools/llc/llc.cpp >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llc/llc.cpp?rev=143326&r1=143325&r2=143326&view=diff >> ============================================================================== >> --- llvm/trunk/tools/llc/llc.cpp (original) >> +++ llvm/trunk/tools/llc/llc.cpp Sun Oct 30 20:06:02 2011 >> @@ -133,8 +133,8 @@ >> cl::opt DisableCFI("disable-cfi", cl::Hidden, >> cl::desc("Do not use .cfi_* directives")); >> >> -cl::opt DisableDwarfDirectory("disable-dwarf-directory", cl::Hidden, >> - cl::desc("Do not use file directives with an explicit directory.")); >> +cl::opt EnableDwarfDirectory("enable-dwarf-directory", cl::Hidden, >> + cl::desc("Use .file directives with an explicit directory.")); >> >> static cl::opt >> DisableRedZone("disable-red-zone", >> @@ -319,8 +319,8 @@ >> if (DisableCFI) >> Target.setMCUseCFI(false); >> >> - if (DisableDwarfDirectory) >> - Target.setMCUseDwarfDirectory(false); >> + if (EnableDwarfDirectory) >> + Target.setMCUseDwarfDirectory(true); >> >> // Disable .loc support for older OS X versions. >> if (TheTriple.isMacOSX()&& >> >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > From geek4civic at gmail.com Mon Oct 31 06:22:00 2011 From: geek4civic at gmail.com (NAKAMURA Takumi) Date: Mon, 31 Oct 2011 11:22:00 -0000 Subject: [llvm-commits] [llvm] r143348 - in /llvm/trunk/docs: AliasAnalysis.html BranchWeightMetadata.html Bugpoint.html CMake.html CodingStandards.html DebuggingJITedCode.html ExtendingLLVM.html GoldPlugin.html HowToReleaseLLVM.html HowToSubmitABug.html LinkTimeOptimization.html Packaging.html Projects.html SystemLibrary.html TableGenFundamentals.html TestingGuide.html UsingLibraries.html index.html Message-ID: <20111031112200.67E093524001@llvm.org> Author: chapuni Date: Mon Oct 31 06:21:59 2011 New Revision: 143348 URL: http://llvm.org/viewvc/llvm-project?rev=143348&view=rev Log: docs/*.html: Appease W3C Checker to add "charset=utf-8". Modified: llvm/trunk/docs/AliasAnalysis.html llvm/trunk/docs/BranchWeightMetadata.html llvm/trunk/docs/Bugpoint.html llvm/trunk/docs/CMake.html llvm/trunk/docs/CodingStandards.html llvm/trunk/docs/DebuggingJITedCode.html llvm/trunk/docs/ExtendingLLVM.html llvm/trunk/docs/GoldPlugin.html llvm/trunk/docs/HowToReleaseLLVM.html llvm/trunk/docs/HowToSubmitABug.html llvm/trunk/docs/LinkTimeOptimization.html llvm/trunk/docs/Packaging.html llvm/trunk/docs/Projects.html llvm/trunk/docs/SystemLibrary.html llvm/trunk/docs/TableGenFundamentals.html llvm/trunk/docs/TestingGuide.html llvm/trunk/docs/UsingLibraries.html llvm/trunk/docs/index.html Modified: llvm/trunk/docs/AliasAnalysis.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/AliasAnalysis.html?rev=143348&r1=143347&r2=143348&view=diff ============================================================================== --- llvm/trunk/docs/AliasAnalysis.html (original) +++ llvm/trunk/docs/AliasAnalysis.html Mon Oct 31 06:21:59 2011 @@ -2,6 +2,7 @@ "http://www.w3.org/TR/html4/strict.dtd"> + LLVM Alias Analysis Infrastructure Modified: llvm/trunk/docs/BranchWeightMetadata.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/BranchWeightMetadata.html?rev=143348&r1=143347&r2=143348&view=diff ============================================================================== --- llvm/trunk/docs/BranchWeightMetadata.html (original) +++ llvm/trunk/docs/BranchWeightMetadata.html Mon Oct 31 06:21:59 2011 @@ -2,6 +2,7 @@ "http://www.w3.org/TR/html4/strict.dtd"> + LLVM Branch Weight Metadata Modified: llvm/trunk/docs/Bugpoint.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/Bugpoint.html?rev=143348&r1=143347&r2=143348&view=diff ============================================================================== --- llvm/trunk/docs/Bugpoint.html (original) +++ llvm/trunk/docs/Bugpoint.html Mon Oct 31 06:21:59 2011 @@ -2,6 +2,7 @@ "http://www.w3.org/TR/html4/strict.dtd"> + LLVM bugpoint tool: design and usage Modified: llvm/trunk/docs/CMake.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CMake.html?rev=143348&r1=143347&r2=143348&view=diff ============================================================================== --- llvm/trunk/docs/CMake.html (original) +++ llvm/trunk/docs/CMake.html Mon Oct 31 06:21:59 2011 @@ -2,6 +2,7 @@ "http://www.w3.org/TR/html4/strict.dtd"> + Building LLVM with CMake Modified: llvm/trunk/docs/CodingStandards.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CodingStandards.html?rev=143348&r1=143347&r2=143348&view=diff ============================================================================== --- llvm/trunk/docs/CodingStandards.html (original) +++ llvm/trunk/docs/CodingStandards.html Mon Oct 31 06:21:59 2011 @@ -2,6 +2,7 @@ "http://www.w3.org/TR/html4/strict.dtd"> + LLVM Coding Standards Modified: llvm/trunk/docs/DebuggingJITedCode.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/DebuggingJITedCode.html?rev=143348&r1=143347&r2=143348&view=diff ============================================================================== --- llvm/trunk/docs/DebuggingJITedCode.html (original) +++ llvm/trunk/docs/DebuggingJITedCode.html Mon Oct 31 06:21:59 2011 @@ -2,6 +2,7 @@ "http://www.w3.org/TR/html4/strict.dtd"> + Debugging JITed Code With GDB Modified: llvm/trunk/docs/ExtendingLLVM.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ExtendingLLVM.html?rev=143348&r1=143347&r2=143348&view=diff ============================================================================== --- llvm/trunk/docs/ExtendingLLVM.html (original) +++ llvm/trunk/docs/ExtendingLLVM.html Mon Oct 31 06:21:59 2011 @@ -2,6 +2,7 @@ "http://www.w3.org/TR/html4/strict.dtd"> + Extending LLVM: Adding instructions, intrinsics, types, etc. Modified: llvm/trunk/docs/GoldPlugin.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/GoldPlugin.html?rev=143348&r1=143347&r2=143348&view=diff ============================================================================== --- llvm/trunk/docs/GoldPlugin.html (original) +++ llvm/trunk/docs/GoldPlugin.html Mon Oct 31 06:21:59 2011 @@ -2,6 +2,7 @@ "http://www.w3.org/TR/html4/strict.dtd"> + LLVM gold plugin Modified: llvm/trunk/docs/HowToReleaseLLVM.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/HowToReleaseLLVM.html?rev=143348&r1=143347&r2=143348&view=diff ============================================================================== --- llvm/trunk/docs/HowToReleaseLLVM.html (original) +++ llvm/trunk/docs/HowToReleaseLLVM.html Mon Oct 31 06:21:59 2011 @@ -2,6 +2,7 @@ "http://www.w3.org/TR/html4/strict.dtd"> + How To Release LLVM To The Public Modified: llvm/trunk/docs/HowToSubmitABug.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/HowToSubmitABug.html?rev=143348&r1=143347&r2=143348&view=diff ============================================================================== --- llvm/trunk/docs/HowToSubmitABug.html (original) +++ llvm/trunk/docs/HowToSubmitABug.html Mon Oct 31 06:21:59 2011 @@ -2,6 +2,7 @@ "http://www.w3.org/TR/html4/strict.dtd"> + How to submit an LLVM bug report Modified: llvm/trunk/docs/LinkTimeOptimization.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LinkTimeOptimization.html?rev=143348&r1=143347&r2=143348&view=diff ============================================================================== --- llvm/trunk/docs/LinkTimeOptimization.html (original) +++ llvm/trunk/docs/LinkTimeOptimization.html Mon Oct 31 06:21:59 2011 @@ -2,6 +2,7 @@ "http://www.w3.org/TR/html4/strict.dtd"> + LLVM Link Time Optimization: Design and Implementation Modified: llvm/trunk/docs/Packaging.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/Packaging.html?rev=143348&r1=143347&r2=143348&view=diff ============================================================================== --- llvm/trunk/docs/Packaging.html (original) +++ llvm/trunk/docs/Packaging.html Mon Oct 31 06:21:59 2011 @@ -2,6 +2,7 @@ "http://www.w3.org/TR/html4/strict.dtd"> + Advice on Packaging LLVM Modified: llvm/trunk/docs/Projects.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/Projects.html?rev=143348&r1=143347&r2=143348&view=diff ============================================================================== --- llvm/trunk/docs/Projects.html (original) +++ llvm/trunk/docs/Projects.html Mon Oct 31 06:21:59 2011 @@ -2,6 +2,7 @@ "http://www.w3.org/TR/html4/strict.dtd"> + Creating an LLVM Project Modified: llvm/trunk/docs/SystemLibrary.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/SystemLibrary.html?rev=143348&r1=143347&r2=143348&view=diff ============================================================================== --- llvm/trunk/docs/SystemLibrary.html (original) +++ llvm/trunk/docs/SystemLibrary.html Mon Oct 31 06:21:59 2011 @@ -2,6 +2,7 @@ "http://www.w3.org/TR/html4/strict.dtd"> + System Library Modified: llvm/trunk/docs/TableGenFundamentals.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/TableGenFundamentals.html?rev=143348&r1=143347&r2=143348&view=diff ============================================================================== --- llvm/trunk/docs/TableGenFundamentals.html (original) +++ llvm/trunk/docs/TableGenFundamentals.html Mon Oct 31 06:21:59 2011 @@ -2,6 +2,7 @@ "http://www.w3.org/TR/html4/strict.dtd"> + TableGen Fundamentals Modified: llvm/trunk/docs/TestingGuide.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/TestingGuide.html?rev=143348&r1=143347&r2=143348&view=diff ============================================================================== --- llvm/trunk/docs/TestingGuide.html (original) +++ llvm/trunk/docs/TestingGuide.html Mon Oct 31 06:21:59 2011 @@ -2,6 +2,7 @@ "http://www.w3.org/TR/html4/strict.dtd"> + LLVM Testing Infrastructure Guide Modified: llvm/trunk/docs/UsingLibraries.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/UsingLibraries.html?rev=143348&r1=143347&r2=143348&view=diff ============================================================================== --- llvm/trunk/docs/UsingLibraries.html (original) +++ llvm/trunk/docs/UsingLibraries.html Mon Oct 31 06:21:59 2011 @@ -1,7 +1,8 @@ - Using The LLVM Libraries + + Using The LLVM Libraries Modified: llvm/trunk/docs/index.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/index.html?rev=143348&r1=143347&r2=143348&view=diff ============================================================================== --- llvm/trunk/docs/index.html (original) +++ llvm/trunk/docs/index.html Mon Oct 31 06:21:59 2011 @@ -2,6 +2,7 @@ "http://www.w3.org/TR/html4/strict.dtd"> + Documentation for the LLVM System at SVN head From anton at korobeynikov.info Mon Oct 31 06:47:39 2011 From: anton at korobeynikov.info (Anton Korobeynikov) Date: Mon, 31 Oct 2011 14:47:39 +0300 Subject: [llvm-commits] [llvm] r143348 - in /llvm/trunk/docs: AliasAnalysis.html BranchWeightMetadata.html Bugpoint.html CMake.html CodingStandards.html DebuggingJITedCode.html ExtendingLLVM.html GoldPlugin.html HowToReleaseLLVM.html HowToSubmitABug.html Message-ID: Hi Takumi, > docs/*.html: Appease W3C Checker to add "charset=utf-8". Why this is necessary? The .html's should be latin-only. Do they contain some non-latin stuff? -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University From geek4civic at gmail.com Mon Oct 31 06:56:51 2011 From: geek4civic at gmail.com (NAKAMURA Takumi) Date: Mon, 31 Oct 2011 20:56:51 +0900 Subject: [llvm-commits] [llvm] r143348 - in /llvm/trunk/docs: AliasAnalysis.html BranchWeightMetadata.html Bugpoint.html CMake.html CodingStandards.html DebuggingJITedCode.html ExtendingLLVM.html GoldPlugin.html HowToReleaseLLVM.html HowToSubmitABug.html In-Reply-To: References: Message-ID: >> docs/*.html: Appease W3C Checker to add "charset=utf-8". > Why this is necessary? The .html's should be latin-only. Do they > contain some non-latin stuff? "To Appease W3C HTML Checker." You may invoke the W3C HTML Validator to press the icon in the bottom of each pages. At least, my environments (chrome and firefox 3.6 with Accept-Language: ja) are blamed w/o extra meta specifier. Please be patient. ...Takumi From geek4civic at gmail.com Mon Oct 31 08:04:26 2011 From: geek4civic at gmail.com (NAKAMURA Takumi) Date: Mon, 31 Oct 2011 13:04:26 -0000 Subject: [llvm-commits] [llvm] r143349 - in /llvm/trunk/docs: CodeGenerator.html GetElementPtr.html LangRef.html ProgrammersManual.html Message-ID: <20111031130426.5DE0D3524001@llvm.org> Author: chapuni Date: Mon Oct 31 08:04:26 2011 New Revision: 143349 URL: http://llvm.org/viewvc/llvm-project?rev=143349&view=rev Log: docs/*.html: Fix markups. Modified: llvm/trunk/docs/CodeGenerator.html llvm/trunk/docs/GetElementPtr.html llvm/trunk/docs/LangRef.html llvm/trunk/docs/ProgrammersManual.html Modified: llvm/trunk/docs/CodeGenerator.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CodeGenerator.html?rev=143349&r1=143348&r2=143349&view=diff ============================================================================== --- llvm/trunk/docs/CodeGenerator.html (original) +++ llvm/trunk/docs/CodeGenerator.html Mon Oct 31 08:04:26 2011 @@ -1813,6 +1813,8 @@ Prolog/Epilog Code Insertion +
+

Compact Unwind @@ -1927,6 +1929,8 @@

+ +

Late Machine Code Optimizations Modified: llvm/trunk/docs/GetElementPtr.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/GetElementPtr.html?rev=143349&r1=143348&r2=143349&view=diff ============================================================================== --- llvm/trunk/docs/GetElementPtr.html (original) +++ llvm/trunk/docs/GetElementPtr.html Mon Oct 31 08:04:26 2011 @@ -746,7 +746,7 @@ src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS"> Valid HTML 4.01 - The LLVM Compiler Infrastructure
+ The LLVM Compiler Infrastructure
Last modified: $Date$ Modified: llvm/trunk/docs/LangRef.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=143349&r1=143348&r2=143349&view=diff ============================================================================== --- llvm/trunk/docs/LangRef.html (original) +++ llvm/trunk/docs/LangRef.html Mon Oct 31 08:04:26 2011 @@ -1903,9 +1903,6 @@ possible to have a two dimensional array, using an array as the element type of another array.

- - -

Aggregate Types @@ -2213,6 +2210,8 @@ + +

Constants

@@ -6385,8 +6384,6 @@ - -

Accurate Garbage Collection Intrinsics @@ -7082,8 +7079,6 @@ - -

'llvm.exp.*' Intrinsic @@ -7184,6 +7179,8 @@ + +

Bit Manipulation Intrinsics Modified: llvm/trunk/docs/ProgrammersManual.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ProgrammersManual.html?rev=143349&r1=143348&r2=143349&view=diff ============================================================================== --- llvm/trunk/docs/ProgrammersManual.html (original) +++ llvm/trunk/docs/ProgrammersManual.html Mon Oct 31 08:04:26 2011 @@ -879,9 +879,6 @@ . Doing so avoids (relatively) expensive malloc/free calls, which dwarf the cost of adding the elements to the container.

- - -

Sequential Containers (std::vector, std::list, etc) From resistor at mac.com Mon Oct 31 12:17:32 2011 From: resistor at mac.com (Owen Anderson) Date: Mon, 31 Oct 2011 17:17:32 -0000 Subject: [llvm-commits] [llvm] r143351 - in /llvm/trunk: lib/Target/ARM/Disassembler/ARMDisassembler.cpp test/MC/Disassembler/ARM/neon.txt Message-ID: <20111031171732.CF12E3524001@llvm.org> Author: resistor Date: Mon Oct 31 12:17:32 2011 New Revision: 143351 URL: http://llvm.org/viewvc/llvm-project?rev=143351&view=rev Log: More not-crashing NEON disassembly updates for the vld refactoring. Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp llvm/trunk/test/MC/Disassembler/ARM/neon.txt Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp?rev=143351&r1=143350&r2=143351&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp (original) +++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp Mon Oct 31 12:17:32 2011 @@ -2142,6 +2142,10 @@ case ARM::VLD1d16Twb_fixed: case ARM::VLD1d32Twb_fixed: case ARM::VLD1d64Twb_fixed: + case ARM::VLD1d8Qwb_fixed: + case ARM::VLD1d16Qwb_fixed: + case ARM::VLD1d32Qwb_fixed: + case ARM::VLD1d64Qwb_fixed: case ARM::VLD1d8wb_register: case ARM::VLD1d16wb_register: case ARM::VLD1d32wb_register: Modified: llvm/trunk/test/MC/Disassembler/ARM/neon.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/neon.txt?rev=143351&r1=143350&r2=143351&view=diff ============================================================================== --- llvm/trunk/test/MC/Disassembler/ARM/neon.txt (original) +++ llvm/trunk/test/MC/Disassembler/ARM/neon.txt Mon Oct 31 12:17:32 2011 @@ -1859,4 +1859,6 @@ 0x1d 0x76 0x66 0xf4 # CHECK: vld1.8 {d23, d24, d25}, [r6, :64]! +0x9d 0x62 0x6f 0xf4 +# CHECK: vld1.32 {d22, d23, d24, d25}, [pc, :64]! From resistor at mac.com Mon Oct 31 12:23:49 2011 From: resistor at mac.com (Owen Anderson) Date: Mon, 31 Oct 2011 10:23:49 -0700 Subject: [llvm-commits] patch: smarter DSE In-Reply-To: <4EAE625B.7050108@mxc.ca> References: <4EAE625B.7050108@mxc.ca> Message-ID: Nick, Isn't what you're computing here an approximation of immediate post-dominance? If we really want to handle this properly, it seems like we should just use the actual post-dominance computation rather than approximating it. --Owen On Oct 31, 2011, at 1:54 AM, Nick Lewycky wrote: > This patch teaches DSE to look for blocks that will unconditionally land in the particular free call, when handling a call to free. This is important for std::vector, see PR11240. > > Please review! > > Nick > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From rafael.espindola at gmail.com Mon Oct 31 12:23:09 2011 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Mon, 31 Oct 2011 17:23:09 -0000 Subject: [llvm-commits] [llvm] r143352 - in /llvm/trunk/test/MC: AsmParser/2011-09-06-NoNewline.s X86/2011-09-06-NoNewline.s Message-ID: <20111031172309.7C7283524001@llvm.org> Author: rafael Date: Mon Oct 31 12:23:09 2011 New Revision: 143352 URL: http://llvm.org/viewvc/llvm-project?rev=143352&view=rev Log: Move test to the X86 directory, note the PR number and only run MC once. Added: llvm/trunk/test/MC/X86/2011-09-06-NoNewline.s Removed: llvm/trunk/test/MC/AsmParser/2011-09-06-NoNewline.s Removed: llvm/trunk/test/MC/AsmParser/2011-09-06-NoNewline.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/2011-09-06-NoNewline.s?rev=143351&view=auto ============================================================================== --- llvm/trunk/test/MC/AsmParser/2011-09-06-NoNewline.s (original) +++ llvm/trunk/test/MC/AsmParser/2011-09-06-NoNewline.s (removed) @@ -1,6 +0,0 @@ -// RUN: llvm-mc -triple i386-unknown-unknown %s -movl %gs:8, %eax -// RUN: llvm-mc -triple i386-unknown-unknown %s -movl %gs:8, %eax -// RUN: llvm-mc -triple i386-unknown-unknown %s -movl %gs:8, %eax \ No newline at end of file Added: llvm/trunk/test/MC/X86/2011-09-06-NoNewline.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/X86/2011-09-06-NoNewline.s?rev=143352&view=auto ============================================================================== --- llvm/trunk/test/MC/X86/2011-09-06-NoNewline.s (added) +++ llvm/trunk/test/MC/X86/2011-09-06-NoNewline.s Mon Oct 31 12:23:09 2011 @@ -0,0 +1,3 @@ +// RUN: llvm-mc -triple i386-unknown-unknown %s +// PR10869 +movl %gs:8, %eax \ No newline at end of file From gkistanova at gmail.com Mon Oct 31 12:27:56 2011 From: gkistanova at gmail.com (Galina Kistanova) Date: Mon, 31 Oct 2011 17:27:56 -0000 Subject: [llvm-commits] [zorg] r143354 - /zorg/trunk/buildbot/osuosl/master/config/builders.py Message-ID: <20111031172756.344583524001@llvm.org> Author: gkistanova Date: Mon Oct 31 12:27:55 2011 New Revision: 143354 URL: http://llvm.org/viewvc/llvm-project?rev=143354&view=rev Log: Change jobs for "arxan_bellini" builder. Modified: zorg/trunk/buildbot/osuosl/master/config/builders.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=143354&r1=143353&r2=143354&view=diff ============================================================================== --- zorg/trunk/buildbot/osuosl/master/config/builders.py (original) +++ zorg/trunk/buildbot/osuosl/master/config/builders.py Mon Oct 31 12:27:55 2011 @@ -48,7 +48,7 @@ {'name': "llvm-ppc-darwin", 'slavenames':["arxan_bellini"], 'builddir':"llvm-ppc-darwin", - 'factory': LLVMBuilder.getLLVMBuildFactory("ppc-darwin", jobs=1, clean=True, + 'factory': LLVMBuilder.getLLVMBuildFactory("ppc-darwin", jobs=2, clean=True, config_name = 'Release', env = { 'CC' : "/usr/bin/gcc-4.2", 'CXX': "/usr/bin/g++-4.2" }, From respindola at mozilla.com Mon Oct 31 12:39:25 2011 From: respindola at mozilla.com (=?ISO-8859-1?Q?Rafael_=C1vila_de_Esp=EDndola?=) Date: Mon, 31 Oct 2011 13:39:25 -0400 Subject: [llvm-commits] [patch][pr11202] Handle BB with address taken being deleted from codegen In-Reply-To: <4EA5C453.5050203@mozilla.com> References: <4EA5C453.5050203@mozilla.com> Message-ID: <4EAEDD4D.9020100@mozilla.com> Ping. On 10/24/2011 04:02 PM, Rafael ?vila de Esp?ndola wrote: > We currently handle the following cases when removing a BB that has its > address taken > > * An IL pass is deleting it, and no references to it were emitted so > far. In this case replaceAllUsesWith takes care of everything. > * An IL pass is deleting it, but a reference to it was already emitted. > When emitting the reference we created a CallbackVH, so now we get > notified about the deleting and remember to produce a dummy label for it . > > The case we are not handling in this bug is a BB that is referenced from > another function or global variable being remove by a codegen pass. > There are two problems > > * replaceAllUsesWith will not work once we are in Codegen, so we will > need to use dummy labels for both cases. > * MachineBasicBlock are not Values, so we cannot use CallbackVH. > > What this patch does is add a method to MMI that Codegen can use to > record that a MBB is being deleted. This is handled almost the same way > we handle and IL BB being deleted, but we have to keep the hash table > entry since the IL level BB will not be delete and can still be in use. > > Cheers, > Rafael From nlewycky at google.com Mon Oct 31 13:22:39 2011 From: nlewycky at google.com (Nick Lewycky) Date: Mon, 31 Oct 2011 11:22:39 -0700 Subject: [llvm-commits] patch: smarter DSE In-Reply-To: References: <4EAE625B.7050108@mxc.ca> Message-ID: On 31 October 2011 10:23, Owen Anderson wrote: > Nick, > > Isn't what you're computing here an approximation of immediate > post-dominance? If we really want to handle this properly, it seems like > we should just use the actual post-dominance computation rather than > approximating it. > Heh, an earlier version of my patch actually called that function FindPostIdoms. No, simply looking at postdoms would actually do the wrong thing. Consider a CFG "A -> {B, C}, B -> D, C -> D": the matching postdom tree is "D -> {A, B, C}". Given a free in block D we would look for and delete stores in A. Trouble is, those aren't necessarily dead as there may be uses in B and C. That's why I explicitly check through the preds. Nick --Owen > > On Oct 31, 2011, at 1:54 AM, Nick Lewycky wrote: > > > This patch teaches DSE to look for blocks that will unconditionally land > in the particular free call, when handling a call to free. This is > important for std::vector, see PR11240. > > > > Please review! > > > > Nick > > _______________________________________________ > > llvm-commits mailing list > > llvm-commits at cs.uiuc.edu > > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111031/a6abc3eb/attachment.html From grosbach at apple.com Mon Oct 31 14:11:23 2011 From: grosbach at apple.com (Jim Grosbach) Date: Mon, 31 Oct 2011 19:11:23 -0000 Subject: [llvm-commits] [llvm] r143356 - /llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp Message-ID: <20111031191123.6993B3524001@llvm.org> Author: grosbach Date: Mon Oct 31 14:11:23 2011 New Revision: 143356 URL: http://llvm.org/viewvc/llvm-project?rev=143356&view=rev Log: ARM writeback vs. stride operands for VST/VLD. The _fixed variants have a writeback operand, but not a stride operand. Split the conditional flag to distinguish the cases. Modified: llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp Modified: llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp?rev=143356&r1=143355&r2=143356&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp Mon Oct 31 14:11:23 2011 @@ -102,7 +102,8 @@ unsigned PseudoOpc; unsigned RealOpc; bool IsLoad; - bool HasWritebackOperand; + bool isUpdating; + bool hasWritebackOperand; NEONRegSpacing RegSpacing; unsigned char NumRegs; // D registers loaded or stored unsigned char RegElts; // elements per D register; used for lane ops @@ -128,238 +129,238 @@ } static const NEONLdStTableEntry NEONLdStTable[] = { -{ ARM::VLD1DUPq16Pseudo, ARM::VLD1DUPq16, true, false, SingleSpc, 2, 4,true}, -{ ARM::VLD1DUPq16Pseudo_UPD, ARM::VLD1DUPq16_UPD, true, true, SingleSpc, 2, 4,true}, -{ ARM::VLD1DUPq32Pseudo, ARM::VLD1DUPq32, true, false, SingleSpc, 2, 2,true}, -{ ARM::VLD1DUPq32Pseudo_UPD, ARM::VLD1DUPq32_UPD, true, true, SingleSpc, 2, 2,true}, -{ ARM::VLD1DUPq8Pseudo, ARM::VLD1DUPq8, true, false, SingleSpc, 2, 8,true}, -{ ARM::VLD1DUPq8Pseudo_UPD, ARM::VLD1DUPq8_UPD, true, true, SingleSpc, 2, 8,true}, - -{ ARM::VLD1LNq16Pseudo, ARM::VLD1LNd16, true, false, EvenDblSpc, 1, 4 ,true}, -{ ARM::VLD1LNq16Pseudo_UPD, ARM::VLD1LNd16_UPD, true, true, EvenDblSpc, 1, 4 ,true}, -{ ARM::VLD1LNq32Pseudo, ARM::VLD1LNd32, true, false, EvenDblSpc, 1, 2 ,true}, -{ ARM::VLD1LNq32Pseudo_UPD, ARM::VLD1LNd32_UPD, true, true, EvenDblSpc, 1, 2 ,true}, -{ ARM::VLD1LNq8Pseudo, ARM::VLD1LNd8, true, false, EvenDblSpc, 1, 8 ,true}, -{ ARM::VLD1LNq8Pseudo_UPD, ARM::VLD1LNd8_UPD, true, true, EvenDblSpc, 1, 8 ,true}, - -{ ARM::VLD1d64QPseudo, ARM::VLD1d64Q, true, false, SingleSpc, 4, 1 ,false}, -{ ARM::VLD1d64TPseudo, ARM::VLD1d64T, true, false, SingleSpc, 3, 1 ,false}, -{ ARM::VLD1q16Pseudo, ARM::VLD1q16, true, false, SingleSpc, 2, 4 ,false}, -{ ARM::VLD1q16PseudoWB_fixed, ARM::VLD1q16wb_fixed,true,false,SingleSpc, 2, 4 ,false}, -{ ARM::VLD1q16PseudoWB_register, ARM::VLD1q16wb_register, true, true, SingleSpc, 2, 4 ,false}, -{ ARM::VLD1q32Pseudo, ARM::VLD1q32, true, false, SingleSpc, 2, 2 ,false}, -{ ARM::VLD1q32PseudoWB_fixed, ARM::VLD1q32wb_fixed,true,false,SingleSpc, 2, 2 ,false}, -{ ARM::VLD1q32PseudoWB_register, ARM::VLD1q32wb_register, true, true, SingleSpc, 2, 2 ,false}, -{ ARM::VLD1q64Pseudo, ARM::VLD1q64, true, false, SingleSpc, 2, 1 ,false}, -{ ARM::VLD1q64PseudoWB_fixed, ARM::VLD1q64wb_fixed,true,false,SingleSpc, 2, 2 ,false}, -{ ARM::VLD1q64PseudoWB_register, ARM::VLD1q64wb_register, true, true, SingleSpc, 2, 1 ,false}, -{ ARM::VLD1q8Pseudo, ARM::VLD1q8, true, false, SingleSpc, 2, 8 ,false}, -{ ARM::VLD1q8PseudoWB_fixed, ARM::VLD1q8wb_fixed,true,false, SingleSpc, 2, 8 ,false}, -{ ARM::VLD1q8PseudoWB_register, ARM::VLD1q8wb_register,true,true,SingleSpc,2,8,false}, - -{ ARM::VLD2DUPd16Pseudo, ARM::VLD2DUPd16, true, false, SingleSpc, 2, 4,true}, -{ ARM::VLD2DUPd16Pseudo_UPD, ARM::VLD2DUPd16_UPD, true, true, SingleSpc, 2, 4,true}, -{ ARM::VLD2DUPd32Pseudo, ARM::VLD2DUPd32, true, false, SingleSpc, 2, 2,true}, -{ ARM::VLD2DUPd32Pseudo_UPD, ARM::VLD2DUPd32_UPD, true, true, SingleSpc, 2, 2,true}, -{ ARM::VLD2DUPd8Pseudo, ARM::VLD2DUPd8, true, false, SingleSpc, 2, 8,true}, -{ ARM::VLD2DUPd8Pseudo_UPD, ARM::VLD2DUPd8_UPD, true, true, SingleSpc, 2, 8,true}, - -{ ARM::VLD2LNd16Pseudo, ARM::VLD2LNd16, true, false, SingleSpc, 2, 4 ,true}, -{ ARM::VLD2LNd16Pseudo_UPD, ARM::VLD2LNd16_UPD, true, true, SingleSpc, 2, 4 ,true}, -{ ARM::VLD2LNd32Pseudo, ARM::VLD2LNd32, true, false, SingleSpc, 2, 2 ,true}, -{ ARM::VLD2LNd32Pseudo_UPD, ARM::VLD2LNd32_UPD, true, true, SingleSpc, 2, 2 ,true}, -{ ARM::VLD2LNd8Pseudo, ARM::VLD2LNd8, true, false, SingleSpc, 2, 8 ,true}, -{ ARM::VLD2LNd8Pseudo_UPD, ARM::VLD2LNd8_UPD, true, true, SingleSpc, 2, 8 ,true}, -{ ARM::VLD2LNq16Pseudo, ARM::VLD2LNq16, true, false, EvenDblSpc, 2, 4 ,true}, -{ ARM::VLD2LNq16Pseudo_UPD, ARM::VLD2LNq16_UPD, true, true, EvenDblSpc, 2, 4 ,true}, -{ ARM::VLD2LNq32Pseudo, ARM::VLD2LNq32, true, false, EvenDblSpc, 2, 2 ,true}, -{ ARM::VLD2LNq32Pseudo_UPD, ARM::VLD2LNq32_UPD, true, true, EvenDblSpc, 2, 2 ,true}, - -{ ARM::VLD2d16Pseudo, ARM::VLD2d16, true, false, SingleSpc, 2, 4 ,false}, -{ ARM::VLD2d16Pseudo_UPD, ARM::VLD2d16_UPD, true, true, SingleSpc, 2, 4 ,false}, -{ ARM::VLD2d32Pseudo, ARM::VLD2d32, true, false, SingleSpc, 2, 2 ,false}, -{ ARM::VLD2d32Pseudo_UPD, ARM::VLD2d32_UPD, true, true, SingleSpc, 2, 2 ,false}, -{ ARM::VLD2d8Pseudo, ARM::VLD2d8, true, false, SingleSpc, 2, 8 ,false}, -{ ARM::VLD2d8Pseudo_UPD, ARM::VLD2d8_UPD, true, true, SingleSpc, 2, 8 ,false}, - -{ ARM::VLD2q16Pseudo, ARM::VLD2q16, true, false, SingleSpc, 4, 4 ,false}, -{ ARM::VLD2q16Pseudo_UPD, ARM::VLD2q16_UPD, true, true, SingleSpc, 4, 4 ,false}, -{ ARM::VLD2q32Pseudo, ARM::VLD2q32, true, false, SingleSpc, 4, 2 ,false}, -{ ARM::VLD2q32Pseudo_UPD, ARM::VLD2q32_UPD, true, true, SingleSpc, 4, 2 ,false}, -{ ARM::VLD2q8Pseudo, ARM::VLD2q8, true, false, SingleSpc, 4, 8 ,false}, -{ ARM::VLD2q8Pseudo_UPD, ARM::VLD2q8_UPD, true, true, SingleSpc, 4, 8 ,false}, - -{ ARM::VLD3DUPd16Pseudo, ARM::VLD3DUPd16, true, false, SingleSpc, 3, 4,true}, -{ ARM::VLD3DUPd16Pseudo_UPD, ARM::VLD3DUPd16_UPD, true, true, SingleSpc, 3, 4,true}, -{ ARM::VLD3DUPd32Pseudo, ARM::VLD3DUPd32, true, false, SingleSpc, 3, 2,true}, -{ ARM::VLD3DUPd32Pseudo_UPD, ARM::VLD3DUPd32_UPD, true, true, SingleSpc, 3, 2,true}, -{ ARM::VLD3DUPd8Pseudo, ARM::VLD3DUPd8, true, false, SingleSpc, 3, 8,true}, -{ ARM::VLD3DUPd8Pseudo_UPD, ARM::VLD3DUPd8_UPD, true, true, SingleSpc, 3, 8,true}, - -{ ARM::VLD3LNd16Pseudo, ARM::VLD3LNd16, true, false, SingleSpc, 3, 4 ,true}, -{ ARM::VLD3LNd16Pseudo_UPD, ARM::VLD3LNd16_UPD, true, true, SingleSpc, 3, 4 ,true}, -{ ARM::VLD3LNd32Pseudo, ARM::VLD3LNd32, true, false, SingleSpc, 3, 2 ,true}, -{ ARM::VLD3LNd32Pseudo_UPD, ARM::VLD3LNd32_UPD, true, true, SingleSpc, 3, 2 ,true}, -{ ARM::VLD3LNd8Pseudo, ARM::VLD3LNd8, true, false, SingleSpc, 3, 8 ,true}, -{ ARM::VLD3LNd8Pseudo_UPD, ARM::VLD3LNd8_UPD, true, true, SingleSpc, 3, 8 ,true}, -{ ARM::VLD3LNq16Pseudo, ARM::VLD3LNq16, true, false, EvenDblSpc, 3, 4 ,true}, -{ ARM::VLD3LNq16Pseudo_UPD, ARM::VLD3LNq16_UPD, true, true, EvenDblSpc, 3, 4 ,true}, -{ ARM::VLD3LNq32Pseudo, ARM::VLD3LNq32, true, false, EvenDblSpc, 3, 2 ,true}, -{ ARM::VLD3LNq32Pseudo_UPD, ARM::VLD3LNq32_UPD, true, true, EvenDblSpc, 3, 2 ,true}, - -{ ARM::VLD3d16Pseudo, ARM::VLD3d16, true, false, SingleSpc, 3, 4 ,true}, -{ ARM::VLD3d16Pseudo_UPD, ARM::VLD3d16_UPD, true, true, SingleSpc, 3, 4 ,true}, -{ ARM::VLD3d32Pseudo, ARM::VLD3d32, true, false, SingleSpc, 3, 2 ,true}, -{ ARM::VLD3d32Pseudo_UPD, ARM::VLD3d32_UPD, true, true, SingleSpc, 3, 2 ,true}, -{ ARM::VLD3d8Pseudo, ARM::VLD3d8, true, false, SingleSpc, 3, 8 ,true}, -{ ARM::VLD3d8Pseudo_UPD, ARM::VLD3d8_UPD, true, true, SingleSpc, 3, 8 ,true}, - -{ ARM::VLD3q16Pseudo_UPD, ARM::VLD3q16_UPD, true, true, EvenDblSpc, 3, 4 ,true}, -{ ARM::VLD3q16oddPseudo, ARM::VLD3q16, true, false, OddDblSpc, 3, 4 ,true}, -{ ARM::VLD3q16oddPseudo_UPD, ARM::VLD3q16_UPD, true, true, OddDblSpc, 3, 4 ,true}, -{ ARM::VLD3q32Pseudo_UPD, ARM::VLD3q32_UPD, true, true, EvenDblSpc, 3, 2 ,true}, -{ ARM::VLD3q32oddPseudo, ARM::VLD3q32, true, false, OddDblSpc, 3, 2 ,true}, -{ ARM::VLD3q32oddPseudo_UPD, ARM::VLD3q32_UPD, true, true, OddDblSpc, 3, 2 ,true}, -{ ARM::VLD3q8Pseudo_UPD, ARM::VLD3q8_UPD, true, true, EvenDblSpc, 3, 8 ,true}, -{ ARM::VLD3q8oddPseudo, ARM::VLD3q8, true, false, OddDblSpc, 3, 8 ,true}, -{ ARM::VLD3q8oddPseudo_UPD, ARM::VLD3q8_UPD, true, true, OddDblSpc, 3, 8 ,true}, - -{ ARM::VLD4DUPd16Pseudo, ARM::VLD4DUPd16, true, false, SingleSpc, 4, 4,true}, -{ ARM::VLD4DUPd16Pseudo_UPD, ARM::VLD4DUPd16_UPD, true, true, SingleSpc, 4, 4,true}, -{ ARM::VLD4DUPd32Pseudo, ARM::VLD4DUPd32, true, false, SingleSpc, 4, 2,true}, -{ ARM::VLD4DUPd32Pseudo_UPD, ARM::VLD4DUPd32_UPD, true, true, SingleSpc, 4, 2,true}, -{ ARM::VLD4DUPd8Pseudo, ARM::VLD4DUPd8, true, false, SingleSpc, 4, 8,true}, -{ ARM::VLD4DUPd8Pseudo_UPD, ARM::VLD4DUPd8_UPD, true, true, SingleSpc, 4, 8,true}, - -{ ARM::VLD4LNd16Pseudo, ARM::VLD4LNd16, true, false, SingleSpc, 4, 4 ,true}, -{ ARM::VLD4LNd16Pseudo_UPD, ARM::VLD4LNd16_UPD, true, true, SingleSpc, 4, 4 ,true}, -{ ARM::VLD4LNd32Pseudo, ARM::VLD4LNd32, true, false, SingleSpc, 4, 2 ,true}, -{ ARM::VLD4LNd32Pseudo_UPD, ARM::VLD4LNd32_UPD, true, true, SingleSpc, 4, 2 ,true}, -{ ARM::VLD4LNd8Pseudo, ARM::VLD4LNd8, true, false, SingleSpc, 4, 8 ,true}, -{ ARM::VLD4LNd8Pseudo_UPD, ARM::VLD4LNd8_UPD, true, true, SingleSpc, 4, 8 ,true}, -{ ARM::VLD4LNq16Pseudo, ARM::VLD4LNq16, true, false, EvenDblSpc, 4, 4 ,true}, -{ ARM::VLD4LNq16Pseudo_UPD, ARM::VLD4LNq16_UPD, true, true, EvenDblSpc, 4, 4 ,true}, -{ ARM::VLD4LNq32Pseudo, ARM::VLD4LNq32, true, false, EvenDblSpc, 4, 2 ,true}, -{ ARM::VLD4LNq32Pseudo_UPD, ARM::VLD4LNq32_UPD, true, true, EvenDblSpc, 4, 2 ,true}, - -{ ARM::VLD4d16Pseudo, ARM::VLD4d16, true, false, SingleSpc, 4, 4 ,true}, -{ ARM::VLD4d16Pseudo_UPD, ARM::VLD4d16_UPD, true, true, SingleSpc, 4, 4 ,true}, -{ ARM::VLD4d32Pseudo, ARM::VLD4d32, true, false, SingleSpc, 4, 2 ,true}, -{ ARM::VLD4d32Pseudo_UPD, ARM::VLD4d32_UPD, true, true, SingleSpc, 4, 2 ,true}, -{ ARM::VLD4d8Pseudo, ARM::VLD4d8, true, false, SingleSpc, 4, 8 ,true}, -{ ARM::VLD4d8Pseudo_UPD, ARM::VLD4d8_UPD, true, true, SingleSpc, 4, 8 ,true}, - -{ ARM::VLD4q16Pseudo_UPD, ARM::VLD4q16_UPD, true, true, EvenDblSpc, 4, 4 ,true}, -{ ARM::VLD4q16oddPseudo, ARM::VLD4q16, true, false, OddDblSpc, 4, 4 ,true}, -{ ARM::VLD4q16oddPseudo_UPD, ARM::VLD4q16_UPD, true, true, OddDblSpc, 4, 4 ,true}, -{ ARM::VLD4q32Pseudo_UPD, ARM::VLD4q32_UPD, true, true, EvenDblSpc, 4, 2 ,true}, -{ ARM::VLD4q32oddPseudo, ARM::VLD4q32, true, false, OddDblSpc, 4, 2 ,true}, -{ ARM::VLD4q32oddPseudo_UPD, ARM::VLD4q32_UPD, true, true, OddDblSpc, 4, 2 ,true}, -{ ARM::VLD4q8Pseudo_UPD, ARM::VLD4q8_UPD, true, true, EvenDblSpc, 4, 8 ,true}, -{ ARM::VLD4q8oddPseudo, ARM::VLD4q8, true, false, OddDblSpc, 4, 8 ,true}, -{ ARM::VLD4q8oddPseudo_UPD, ARM::VLD4q8_UPD, true, true, OddDblSpc, 4, 8 ,true}, - -{ ARM::VST1LNq16Pseudo, ARM::VST1LNd16, false, false, EvenDblSpc, 1, 4 ,true}, -{ ARM::VST1LNq16Pseudo_UPD, ARM::VST1LNd16_UPD,false, true, EvenDblSpc, 1, 4 ,true}, -{ ARM::VST1LNq32Pseudo, ARM::VST1LNd32, false, false, EvenDblSpc, 1, 2 ,true}, -{ ARM::VST1LNq32Pseudo_UPD, ARM::VST1LNd32_UPD,false, true, EvenDblSpc, 1, 2 ,true}, -{ ARM::VST1LNq8Pseudo, ARM::VST1LNd8, false, false, EvenDblSpc, 1, 8 ,true}, -{ ARM::VST1LNq8Pseudo_UPD, ARM::VST1LNd8_UPD, false, true, EvenDblSpc, 1, 8 ,true}, - -{ ARM::VST1d64QPseudo, ARM::VST1d64Q, false, false, SingleSpc, 4, 1 ,true}, -{ ARM::VST1d64QPseudo_UPD, ARM::VST1d64Q_UPD, false, true, SingleSpc, 4, 1 ,true}, -{ ARM::VST1d64TPseudo, ARM::VST1d64T, false, false, SingleSpc, 3, 1 ,true}, -{ ARM::VST1d64TPseudo_UPD, ARM::VST1d64T_UPD, false, true, SingleSpc, 3, 1 ,true}, - -{ ARM::VST1q16Pseudo, ARM::VST1q16, false, false, SingleSpc, 2, 4 ,true}, -{ ARM::VST1q16Pseudo_UPD, ARM::VST1q16_UPD, false, true, SingleSpc, 2, 4 ,true}, -{ ARM::VST1q32Pseudo, ARM::VST1q32, false, false, SingleSpc, 2, 2 ,true}, -{ ARM::VST1q32Pseudo_UPD, ARM::VST1q32_UPD, false, true, SingleSpc, 2, 2 ,true}, -{ ARM::VST1q64Pseudo, ARM::VST1q64, false, false, SingleSpc, 2, 1 ,true}, -{ ARM::VST1q64Pseudo_UPD, ARM::VST1q64_UPD, false, true, SingleSpc, 2, 1 ,true}, -{ ARM::VST1q8Pseudo, ARM::VST1q8, false, false, SingleSpc, 2, 8 ,true}, -{ ARM::VST1q8Pseudo_UPD, ARM::VST1q8_UPD, false, true, SingleSpc, 2, 8 ,true}, - -{ ARM::VST2LNd16Pseudo, ARM::VST2LNd16, false, false, SingleSpc, 2, 4 ,true}, -{ ARM::VST2LNd16Pseudo_UPD, ARM::VST2LNd16_UPD, false, true, SingleSpc, 2, 4 ,true}, -{ ARM::VST2LNd32Pseudo, ARM::VST2LNd32, false, false, SingleSpc, 2, 2 ,true}, -{ ARM::VST2LNd32Pseudo_UPD, ARM::VST2LNd32_UPD, false, true, SingleSpc, 2, 2 ,true}, -{ ARM::VST2LNd8Pseudo, ARM::VST2LNd8, false, false, SingleSpc, 2, 8 ,true}, -{ ARM::VST2LNd8Pseudo_UPD, ARM::VST2LNd8_UPD, false, true, SingleSpc, 2, 8 ,true}, -{ ARM::VST2LNq16Pseudo, ARM::VST2LNq16, false, false, EvenDblSpc, 2, 4,true}, -{ ARM::VST2LNq16Pseudo_UPD, ARM::VST2LNq16_UPD, false, true, EvenDblSpc, 2, 4,true}, -{ ARM::VST2LNq32Pseudo, ARM::VST2LNq32, false, false, EvenDblSpc, 2, 2,true}, -{ ARM::VST2LNq32Pseudo_UPD, ARM::VST2LNq32_UPD, false, true, EvenDblSpc, 2, 2,true}, - -{ ARM::VST2d16Pseudo, ARM::VST2d16, false, false, SingleSpc, 2, 4 ,true}, -{ ARM::VST2d16Pseudo_UPD, ARM::VST2d16_UPD, false, true, SingleSpc, 2, 4 ,true}, -{ ARM::VST2d32Pseudo, ARM::VST2d32, false, false, SingleSpc, 2, 2 ,true}, -{ ARM::VST2d32Pseudo_UPD, ARM::VST2d32_UPD, false, true, SingleSpc, 2, 2 ,true}, -{ ARM::VST2d8Pseudo, ARM::VST2d8, false, false, SingleSpc, 2, 8 ,true}, -{ ARM::VST2d8Pseudo_UPD, ARM::VST2d8_UPD, false, true, SingleSpc, 2, 8 ,true}, - -{ ARM::VST2q16Pseudo, ARM::VST2q16, false, false, SingleSpc, 4, 4 ,true}, -{ ARM::VST2q16Pseudo_UPD, ARM::VST2q16_UPD, false, true, SingleSpc, 4, 4 ,true}, -{ ARM::VST2q32Pseudo, ARM::VST2q32, false, false, SingleSpc, 4, 2 ,true}, -{ ARM::VST2q32Pseudo_UPD, ARM::VST2q32_UPD, false, true, SingleSpc, 4, 2 ,true}, -{ ARM::VST2q8Pseudo, ARM::VST2q8, false, false, SingleSpc, 4, 8 ,true}, -{ ARM::VST2q8Pseudo_UPD, ARM::VST2q8_UPD, false, true, SingleSpc, 4, 8 ,true}, - -{ ARM::VST3LNd16Pseudo, ARM::VST3LNd16, false, false, SingleSpc, 3, 4 ,true}, -{ ARM::VST3LNd16Pseudo_UPD, ARM::VST3LNd16_UPD, false, true, SingleSpc, 3, 4 ,true}, -{ ARM::VST3LNd32Pseudo, ARM::VST3LNd32, false, false, SingleSpc, 3, 2 ,true}, -{ ARM::VST3LNd32Pseudo_UPD, ARM::VST3LNd32_UPD, false, true, SingleSpc, 3, 2 ,true}, -{ ARM::VST3LNd8Pseudo, ARM::VST3LNd8, false, false, SingleSpc, 3, 8 ,true}, -{ ARM::VST3LNd8Pseudo_UPD, ARM::VST3LNd8_UPD, false, true, SingleSpc, 3, 8 ,true}, -{ ARM::VST3LNq16Pseudo, ARM::VST3LNq16, false, false, EvenDblSpc, 3, 4,true}, -{ ARM::VST3LNq16Pseudo_UPD, ARM::VST3LNq16_UPD, false, true, EvenDblSpc, 3, 4,true}, -{ ARM::VST3LNq32Pseudo, ARM::VST3LNq32, false, false, EvenDblSpc, 3, 2,true}, -{ ARM::VST3LNq32Pseudo_UPD, ARM::VST3LNq32_UPD, false, true, EvenDblSpc, 3, 2,true}, - -{ ARM::VST3d16Pseudo, ARM::VST3d16, false, false, SingleSpc, 3, 4 ,true}, -{ ARM::VST3d16Pseudo_UPD, ARM::VST3d16_UPD, false, true, SingleSpc, 3, 4 ,true}, -{ ARM::VST3d32Pseudo, ARM::VST3d32, false, false, SingleSpc, 3, 2 ,true}, -{ ARM::VST3d32Pseudo_UPD, ARM::VST3d32_UPD, false, true, SingleSpc, 3, 2 ,true}, -{ ARM::VST3d8Pseudo, ARM::VST3d8, false, false, SingleSpc, 3, 8 ,true}, -{ ARM::VST3d8Pseudo_UPD, ARM::VST3d8_UPD, false, true, SingleSpc, 3, 8 ,true}, - -{ ARM::VST3q16Pseudo_UPD, ARM::VST3q16_UPD, false, true, EvenDblSpc, 3, 4 ,true}, -{ ARM::VST3q16oddPseudo, ARM::VST3q16, false, false, OddDblSpc, 3, 4 ,true}, -{ ARM::VST3q16oddPseudo_UPD, ARM::VST3q16_UPD, false, true, OddDblSpc, 3, 4 ,true}, -{ ARM::VST3q32Pseudo_UPD, ARM::VST3q32_UPD, false, true, EvenDblSpc, 3, 2 ,true}, -{ ARM::VST3q32oddPseudo, ARM::VST3q32, false, false, OddDblSpc, 3, 2 ,true}, -{ ARM::VST3q32oddPseudo_UPD, ARM::VST3q32_UPD, false, true, OddDblSpc, 3, 2 ,true}, -{ ARM::VST3q8Pseudo_UPD, ARM::VST3q8_UPD, false, true, EvenDblSpc, 3, 8 ,true}, -{ ARM::VST3q8oddPseudo, ARM::VST3q8, false, false, OddDblSpc, 3, 8 ,true}, -{ ARM::VST3q8oddPseudo_UPD, ARM::VST3q8_UPD, false, true, OddDblSpc, 3, 8 ,true}, - -{ ARM::VST4LNd16Pseudo, ARM::VST4LNd16, false, false, SingleSpc, 4, 4 ,true}, -{ ARM::VST4LNd16Pseudo_UPD, ARM::VST4LNd16_UPD, false, true, SingleSpc, 4, 4 ,true}, -{ ARM::VST4LNd32Pseudo, ARM::VST4LNd32, false, false, SingleSpc, 4, 2 ,true}, -{ ARM::VST4LNd32Pseudo_UPD, ARM::VST4LNd32_UPD, false, true, SingleSpc, 4, 2 ,true}, -{ ARM::VST4LNd8Pseudo, ARM::VST4LNd8, false, false, SingleSpc, 4, 8 ,true}, -{ ARM::VST4LNd8Pseudo_UPD, ARM::VST4LNd8_UPD, false, true, SingleSpc, 4, 8 ,true}, -{ ARM::VST4LNq16Pseudo, ARM::VST4LNq16, false, false, EvenDblSpc, 4, 4,true}, -{ ARM::VST4LNq16Pseudo_UPD, ARM::VST4LNq16_UPD, false, true, EvenDblSpc, 4, 4,true}, -{ ARM::VST4LNq32Pseudo, ARM::VST4LNq32, false, false, EvenDblSpc, 4, 2,true}, -{ ARM::VST4LNq32Pseudo_UPD, ARM::VST4LNq32_UPD, false, true, EvenDblSpc, 4, 2,true}, - -{ ARM::VST4d16Pseudo, ARM::VST4d16, false, false, SingleSpc, 4, 4 ,true}, -{ ARM::VST4d16Pseudo_UPD, ARM::VST4d16_UPD, false, true, SingleSpc, 4, 4 ,true}, -{ ARM::VST4d32Pseudo, ARM::VST4d32, false, false, SingleSpc, 4, 2 ,true}, -{ ARM::VST4d32Pseudo_UPD, ARM::VST4d32_UPD, false, true, SingleSpc, 4, 2 ,true}, -{ ARM::VST4d8Pseudo, ARM::VST4d8, false, false, SingleSpc, 4, 8 ,true}, -{ ARM::VST4d8Pseudo_UPD, ARM::VST4d8_UPD, false, true, SingleSpc, 4, 8 ,true}, - -{ ARM::VST4q16Pseudo_UPD, ARM::VST4q16_UPD, false, true, EvenDblSpc, 4, 4 ,true}, -{ ARM::VST4q16oddPseudo, ARM::VST4q16, false, false, OddDblSpc, 4, 4 ,true}, -{ ARM::VST4q16oddPseudo_UPD, ARM::VST4q16_UPD, false, true, OddDblSpc, 4, 4 ,true}, -{ ARM::VST4q32Pseudo_UPD, ARM::VST4q32_UPD, false, true, EvenDblSpc, 4, 2 ,true}, -{ ARM::VST4q32oddPseudo, ARM::VST4q32, false, false, OddDblSpc, 4, 2 ,true}, -{ ARM::VST4q32oddPseudo_UPD, ARM::VST4q32_UPD, false, true, OddDblSpc, 4, 2 ,true}, -{ ARM::VST4q8Pseudo_UPD, ARM::VST4q8_UPD, false, true, EvenDblSpc, 4, 8 ,true}, -{ ARM::VST4q8oddPseudo, ARM::VST4q8, false, false, OddDblSpc, 4, 8 ,true}, -{ ARM::VST4q8oddPseudo_UPD, ARM::VST4q8_UPD, false, true, OddDblSpc, 4, 8 ,true} +{ ARM::VLD1DUPq16Pseudo, ARM::VLD1DUPq16, true, false, false, SingleSpc, 2, 4,true}, +{ ARM::VLD1DUPq16Pseudo_UPD, ARM::VLD1DUPq16_UPD, true, true, true, SingleSpc, 2, 4,true}, +{ ARM::VLD1DUPq32Pseudo, ARM::VLD1DUPq32, true, false, false, SingleSpc, 2, 2,true}, +{ ARM::VLD1DUPq32Pseudo_UPD, ARM::VLD1DUPq32_UPD, true, true, true, SingleSpc, 2, 2,true}, +{ ARM::VLD1DUPq8Pseudo, ARM::VLD1DUPq8, true, false, false, SingleSpc, 2, 8,true}, +{ ARM::VLD1DUPq8Pseudo_UPD, ARM::VLD1DUPq8_UPD, true, true, true, SingleSpc, 2, 8,true}, + +{ ARM::VLD1LNq16Pseudo, ARM::VLD1LNd16, true, false, false, EvenDblSpc, 1, 4 ,true}, +{ ARM::VLD1LNq16Pseudo_UPD, ARM::VLD1LNd16_UPD, true, true, true, EvenDblSpc, 1, 4 ,true}, +{ ARM::VLD1LNq32Pseudo, ARM::VLD1LNd32, true, false, false, EvenDblSpc, 1, 2 ,true}, +{ ARM::VLD1LNq32Pseudo_UPD, ARM::VLD1LNd32_UPD, true, true, true, EvenDblSpc, 1, 2 ,true}, +{ ARM::VLD1LNq8Pseudo, ARM::VLD1LNd8, true, false, false, EvenDblSpc, 1, 8 ,true}, +{ ARM::VLD1LNq8Pseudo_UPD, ARM::VLD1LNd8_UPD, true, true, true, EvenDblSpc, 1, 8 ,true}, + +{ ARM::VLD1d64QPseudo, ARM::VLD1d64Q, true, false, false, SingleSpc, 4, 1 ,false}, +{ ARM::VLD1d64TPseudo, ARM::VLD1d64T, true, false, false, SingleSpc, 3, 1 ,false}, +{ ARM::VLD1q16Pseudo, ARM::VLD1q16, true, false, false, SingleSpc, 2, 4 ,false}, +{ ARM::VLD1q16PseudoWB_fixed, ARM::VLD1q16wb_fixed,true,false,false,SingleSpc, 2, 4 ,false}, +{ ARM::VLD1q16PseudoWB_register, ARM::VLD1q16wb_register, true, true, true, SingleSpc, 2, 4 ,false}, +{ ARM::VLD1q32Pseudo, ARM::VLD1q32, true, false, false, SingleSpc, 2, 2 ,false}, +{ ARM::VLD1q32PseudoWB_fixed, ARM::VLD1q32wb_fixed,true,false, false,SingleSpc, 2, 2 ,false}, +{ ARM::VLD1q32PseudoWB_register, ARM::VLD1q32wb_register, true, true, true, SingleSpc, 2, 2 ,false}, +{ ARM::VLD1q64Pseudo, ARM::VLD1q64, true, false, false, SingleSpc, 2, 1 ,false}, +{ ARM::VLD1q64PseudoWB_fixed, ARM::VLD1q64wb_fixed,true,false, false,SingleSpc, 2, 2 ,false}, +{ ARM::VLD1q64PseudoWB_register, ARM::VLD1q64wb_register, true, true, true, SingleSpc, 2, 1 ,false}, +{ ARM::VLD1q8Pseudo, ARM::VLD1q8, true, false, false, SingleSpc, 2, 8 ,false}, +{ ARM::VLD1q8PseudoWB_fixed, ARM::VLD1q8wb_fixed,true,false, false, SingleSpc, 2, 8 ,false}, +{ ARM::VLD1q8PseudoWB_register, ARM::VLD1q8wb_register,true,true, true,SingleSpc,2,8,false}, + +{ ARM::VLD2DUPd16Pseudo, ARM::VLD2DUPd16, true, false, false, SingleSpc, 2, 4,true}, +{ ARM::VLD2DUPd16Pseudo_UPD, ARM::VLD2DUPd16_UPD, true, true, true, SingleSpc, 2, 4,true}, +{ ARM::VLD2DUPd32Pseudo, ARM::VLD2DUPd32, true, false, false, SingleSpc, 2, 2,true}, +{ ARM::VLD2DUPd32Pseudo_UPD, ARM::VLD2DUPd32_UPD, true, true, true, SingleSpc, 2, 2,true}, +{ ARM::VLD2DUPd8Pseudo, ARM::VLD2DUPd8, true, false, false, SingleSpc, 2, 8,true}, +{ ARM::VLD2DUPd8Pseudo_UPD, ARM::VLD2DUPd8_UPD, true, true, true, SingleSpc, 2, 8,true}, + +{ ARM::VLD2LNd16Pseudo, ARM::VLD2LNd16, true, false, false, SingleSpc, 2, 4 ,true}, +{ ARM::VLD2LNd16Pseudo_UPD, ARM::VLD2LNd16_UPD, true, true, true, SingleSpc, 2, 4 ,true}, +{ ARM::VLD2LNd32Pseudo, ARM::VLD2LNd32, true, false, false, SingleSpc, 2, 2 ,true}, +{ ARM::VLD2LNd32Pseudo_UPD, ARM::VLD2LNd32_UPD, true, true, true, SingleSpc, 2, 2 ,true}, +{ ARM::VLD2LNd8Pseudo, ARM::VLD2LNd8, true, false, false, SingleSpc, 2, 8 ,true}, +{ ARM::VLD2LNd8Pseudo_UPD, ARM::VLD2LNd8_UPD, true, true, true, SingleSpc, 2, 8 ,true}, +{ ARM::VLD2LNq16Pseudo, ARM::VLD2LNq16, true, false, false, EvenDblSpc, 2, 4 ,true}, +{ ARM::VLD2LNq16Pseudo_UPD, ARM::VLD2LNq16_UPD, true, true, true, EvenDblSpc, 2, 4 ,true}, +{ ARM::VLD2LNq32Pseudo, ARM::VLD2LNq32, true, false, false, EvenDblSpc, 2, 2 ,true}, +{ ARM::VLD2LNq32Pseudo_UPD, ARM::VLD2LNq32_UPD, true, true, true, EvenDblSpc, 2, 2 ,true}, + +{ ARM::VLD2d16Pseudo, ARM::VLD2d16, true, false, false, SingleSpc, 2, 4 ,false}, +{ ARM::VLD2d16Pseudo_UPD, ARM::VLD2d16_UPD, true, true, true, SingleSpc, 2, 4 ,false}, +{ ARM::VLD2d32Pseudo, ARM::VLD2d32, true, false, false, SingleSpc, 2, 2 ,false}, +{ ARM::VLD2d32Pseudo_UPD, ARM::VLD2d32_UPD, true, true, true, SingleSpc, 2, 2 ,false}, +{ ARM::VLD2d8Pseudo, ARM::VLD2d8, true, false, false, SingleSpc, 2, 8 ,false}, +{ ARM::VLD2d8Pseudo_UPD, ARM::VLD2d8_UPD, true, true, true, SingleSpc, 2, 8 ,false}, + +{ ARM::VLD2q16Pseudo, ARM::VLD2q16, true, false, false, SingleSpc, 4, 4 ,false}, +{ ARM::VLD2q16Pseudo_UPD, ARM::VLD2q16_UPD, true, true, true, SingleSpc, 4, 4 ,false}, +{ ARM::VLD2q32Pseudo, ARM::VLD2q32, true, false, false, SingleSpc, 4, 2 ,false}, +{ ARM::VLD2q32Pseudo_UPD, ARM::VLD2q32_UPD, true, true, true, SingleSpc, 4, 2 ,false}, +{ ARM::VLD2q8Pseudo, ARM::VLD2q8, true, false, false, SingleSpc, 4, 8 ,false}, +{ ARM::VLD2q8Pseudo_UPD, ARM::VLD2q8_UPD, true, true, true, SingleSpc, 4, 8 ,false}, + +{ ARM::VLD3DUPd16Pseudo, ARM::VLD3DUPd16, true, false, false, SingleSpc, 3, 4,true}, +{ ARM::VLD3DUPd16Pseudo_UPD, ARM::VLD3DUPd16_UPD, true, true, true, SingleSpc, 3, 4,true}, +{ ARM::VLD3DUPd32Pseudo, ARM::VLD3DUPd32, true, false, false, SingleSpc, 3, 2,true}, +{ ARM::VLD3DUPd32Pseudo_UPD, ARM::VLD3DUPd32_UPD, true, true, true, SingleSpc, 3, 2,true}, +{ ARM::VLD3DUPd8Pseudo, ARM::VLD3DUPd8, true, false, false, SingleSpc, 3, 8,true}, +{ ARM::VLD3DUPd8Pseudo_UPD, ARM::VLD3DUPd8_UPD, true, true, true, SingleSpc, 3, 8,true}, + +{ ARM::VLD3LNd16Pseudo, ARM::VLD3LNd16, true, false, false, SingleSpc, 3, 4 ,true}, +{ ARM::VLD3LNd16Pseudo_UPD, ARM::VLD3LNd16_UPD, true, true, true, SingleSpc, 3, 4 ,true}, +{ ARM::VLD3LNd32Pseudo, ARM::VLD3LNd32, true, false, false, SingleSpc, 3, 2 ,true}, +{ ARM::VLD3LNd32Pseudo_UPD, ARM::VLD3LNd32_UPD, true, true, true, SingleSpc, 3, 2 ,true}, +{ ARM::VLD3LNd8Pseudo, ARM::VLD3LNd8, true, false, false, SingleSpc, 3, 8 ,true}, +{ ARM::VLD3LNd8Pseudo_UPD, ARM::VLD3LNd8_UPD, true, true, true, SingleSpc, 3, 8 ,true}, +{ ARM::VLD3LNq16Pseudo, ARM::VLD3LNq16, true, false, false, EvenDblSpc, 3, 4 ,true}, +{ ARM::VLD3LNq16Pseudo_UPD, ARM::VLD3LNq16_UPD, true, true, true, EvenDblSpc, 3, 4 ,true}, +{ ARM::VLD3LNq32Pseudo, ARM::VLD3LNq32, true, false, false, EvenDblSpc, 3, 2 ,true}, +{ ARM::VLD3LNq32Pseudo_UPD, ARM::VLD3LNq32_UPD, true, true, true, EvenDblSpc, 3, 2 ,true}, + +{ ARM::VLD3d16Pseudo, ARM::VLD3d16, true, false, false, SingleSpc, 3, 4 ,true}, +{ ARM::VLD3d16Pseudo_UPD, ARM::VLD3d16_UPD, true, true, true, SingleSpc, 3, 4 ,true}, +{ ARM::VLD3d32Pseudo, ARM::VLD3d32, true, false, false, SingleSpc, 3, 2 ,true}, +{ ARM::VLD3d32Pseudo_UPD, ARM::VLD3d32_UPD, true, true, true, SingleSpc, 3, 2 ,true}, +{ ARM::VLD3d8Pseudo, ARM::VLD3d8, true, false, false, SingleSpc, 3, 8 ,true}, +{ ARM::VLD3d8Pseudo_UPD, ARM::VLD3d8_UPD, true, true, true, SingleSpc, 3, 8 ,true}, + +{ ARM::VLD3q16Pseudo_UPD, ARM::VLD3q16_UPD, true, true, true, EvenDblSpc, 3, 4 ,true}, +{ ARM::VLD3q16oddPseudo, ARM::VLD3q16, true, false, false, OddDblSpc, 3, 4 ,true}, +{ ARM::VLD3q16oddPseudo_UPD, ARM::VLD3q16_UPD, true, true, true, OddDblSpc, 3, 4 ,true}, +{ ARM::VLD3q32Pseudo_UPD, ARM::VLD3q32_UPD, true, true, true, EvenDblSpc, 3, 2 ,true}, +{ ARM::VLD3q32oddPseudo, ARM::VLD3q32, true, false, false, OddDblSpc, 3, 2 ,true}, +{ ARM::VLD3q32oddPseudo_UPD, ARM::VLD3q32_UPD, true, true, true, OddDblSpc, 3, 2 ,true}, +{ ARM::VLD3q8Pseudo_UPD, ARM::VLD3q8_UPD, true, true, true, EvenDblSpc, 3, 8 ,true}, +{ ARM::VLD3q8oddPseudo, ARM::VLD3q8, true, false, false, OddDblSpc, 3, 8 ,true}, +{ ARM::VLD3q8oddPseudo_UPD, ARM::VLD3q8_UPD, true, true, true, OddDblSpc, 3, 8 ,true}, + +{ ARM::VLD4DUPd16Pseudo, ARM::VLD4DUPd16, true, false, false, SingleSpc, 4, 4,true}, +{ ARM::VLD4DUPd16Pseudo_UPD, ARM::VLD4DUPd16_UPD, true, true, true, SingleSpc, 4, 4,true}, +{ ARM::VLD4DUPd32Pseudo, ARM::VLD4DUPd32, true, false, false, SingleSpc, 4, 2,true}, +{ ARM::VLD4DUPd32Pseudo_UPD, ARM::VLD4DUPd32_UPD, true, true, true, SingleSpc, 4, 2,true}, +{ ARM::VLD4DUPd8Pseudo, ARM::VLD4DUPd8, true, false, false, SingleSpc, 4, 8,true}, +{ ARM::VLD4DUPd8Pseudo_UPD, ARM::VLD4DUPd8_UPD, true, true, true, SingleSpc, 4, 8,true}, + +{ ARM::VLD4LNd16Pseudo, ARM::VLD4LNd16, true, false, false, SingleSpc, 4, 4 ,true}, +{ ARM::VLD4LNd16Pseudo_UPD, ARM::VLD4LNd16_UPD, true, true, true, SingleSpc, 4, 4 ,true}, +{ ARM::VLD4LNd32Pseudo, ARM::VLD4LNd32, true, false, false, SingleSpc, 4, 2 ,true}, +{ ARM::VLD4LNd32Pseudo_UPD, ARM::VLD4LNd32_UPD, true, true, true, SingleSpc, 4, 2 ,true}, +{ ARM::VLD4LNd8Pseudo, ARM::VLD4LNd8, true, false, false, SingleSpc, 4, 8 ,true}, +{ ARM::VLD4LNd8Pseudo_UPD, ARM::VLD4LNd8_UPD, true, true, true, SingleSpc, 4, 8 ,true}, +{ ARM::VLD4LNq16Pseudo, ARM::VLD4LNq16, true, false, false, EvenDblSpc, 4, 4 ,true}, +{ ARM::VLD4LNq16Pseudo_UPD, ARM::VLD4LNq16_UPD, true, true, true, EvenDblSpc, 4, 4 ,true}, +{ ARM::VLD4LNq32Pseudo, ARM::VLD4LNq32, true, false, false, EvenDblSpc, 4, 2 ,true}, +{ ARM::VLD4LNq32Pseudo_UPD, ARM::VLD4LNq32_UPD, true, true, true, EvenDblSpc, 4, 2 ,true}, + +{ ARM::VLD4d16Pseudo, ARM::VLD4d16, true, false, false, SingleSpc, 4, 4 ,true}, +{ ARM::VLD4d16Pseudo_UPD, ARM::VLD4d16_UPD, true, true, true, SingleSpc, 4, 4 ,true}, +{ ARM::VLD4d32Pseudo, ARM::VLD4d32, true, false, false, SingleSpc, 4, 2 ,true}, +{ ARM::VLD4d32Pseudo_UPD, ARM::VLD4d32_UPD, true, true, true, SingleSpc, 4, 2 ,true}, +{ ARM::VLD4d8Pseudo, ARM::VLD4d8, true, false, false, SingleSpc, 4, 8 ,true}, +{ ARM::VLD4d8Pseudo_UPD, ARM::VLD4d8_UPD, true, true, true, SingleSpc, 4, 8 ,true}, + +{ ARM::VLD4q16Pseudo_UPD, ARM::VLD4q16_UPD, true, true, true, EvenDblSpc, 4, 4 ,true}, +{ ARM::VLD4q16oddPseudo, ARM::VLD4q16, true, false, false, OddDblSpc, 4, 4 ,true}, +{ ARM::VLD4q16oddPseudo_UPD, ARM::VLD4q16_UPD, true, true, true, OddDblSpc, 4, 4 ,true}, +{ ARM::VLD4q32Pseudo_UPD, ARM::VLD4q32_UPD, true, true, true, EvenDblSpc, 4, 2 ,true}, +{ ARM::VLD4q32oddPseudo, ARM::VLD4q32, true, false, false, OddDblSpc, 4, 2 ,true}, +{ ARM::VLD4q32oddPseudo_UPD, ARM::VLD4q32_UPD, true, true, true, OddDblSpc, 4, 2 ,true}, +{ ARM::VLD4q8Pseudo_UPD, ARM::VLD4q8_UPD, true, true, true, EvenDblSpc, 4, 8 ,true}, +{ ARM::VLD4q8oddPseudo, ARM::VLD4q8, true, false, false, OddDblSpc, 4, 8 ,true}, +{ ARM::VLD4q8oddPseudo_UPD, ARM::VLD4q8_UPD, true, true, true, OddDblSpc, 4, 8 ,true}, + +{ ARM::VST1LNq16Pseudo, ARM::VST1LNd16, false, false, false, EvenDblSpc, 1, 4 ,true}, +{ ARM::VST1LNq16Pseudo_UPD, ARM::VST1LNd16_UPD, false, true, true, EvenDblSpc, 1, 4 ,true}, +{ ARM::VST1LNq32Pseudo, ARM::VST1LNd32, false, false, false, EvenDblSpc, 1, 2 ,true}, +{ ARM::VST1LNq32Pseudo_UPD, ARM::VST1LNd32_UPD, false, true, true, EvenDblSpc, 1, 2 ,true}, +{ ARM::VST1LNq8Pseudo, ARM::VST1LNd8, false, false, false, EvenDblSpc, 1, 8 ,true}, +{ ARM::VST1LNq8Pseudo_UPD, ARM::VST1LNd8_UPD, false, true, true, EvenDblSpc, 1, 8 ,true}, + +{ ARM::VST1d64QPseudo, ARM::VST1d64Q, false, false, false, SingleSpc, 4, 1 ,true}, +{ ARM::VST1d64QPseudo_UPD, ARM::VST1d64Q_UPD, false, true, true, SingleSpc, 4, 1 ,true}, +{ ARM::VST1d64TPseudo, ARM::VST1d64T, false, false, false, SingleSpc, 3, 1 ,true}, +{ ARM::VST1d64TPseudo_UPD, ARM::VST1d64T_UPD, false, true, true, SingleSpc, 3, 1 ,true}, + +{ ARM::VST1q16Pseudo, ARM::VST1q16, false, false, false, SingleSpc, 2, 4 ,true}, +{ ARM::VST1q16Pseudo_UPD, ARM::VST1q16_UPD, false, true, true, SingleSpc, 2, 4 ,true}, +{ ARM::VST1q32Pseudo, ARM::VST1q32, false, false, false, SingleSpc, 2, 2 ,true}, +{ ARM::VST1q32Pseudo_UPD, ARM::VST1q32_UPD, false, true, true, SingleSpc, 2, 2 ,true}, +{ ARM::VST1q64Pseudo, ARM::VST1q64, false, false, false, SingleSpc, 2, 1 ,true}, +{ ARM::VST1q64Pseudo_UPD, ARM::VST1q64_UPD, false, true, true, SingleSpc, 2, 1 ,true}, +{ ARM::VST1q8Pseudo, ARM::VST1q8, false, false, false, SingleSpc, 2, 8 ,true}, +{ ARM::VST1q8Pseudo_UPD, ARM::VST1q8_UPD, false, true, true, SingleSpc, 2, 8 ,true}, + +{ ARM::VST2LNd16Pseudo, ARM::VST2LNd16, false, false, false, SingleSpc, 2, 4 ,true}, +{ ARM::VST2LNd16Pseudo_UPD, ARM::VST2LNd16_UPD, false, true, true, SingleSpc, 2, 4 ,true}, +{ ARM::VST2LNd32Pseudo, ARM::VST2LNd32, false, false, false, SingleSpc, 2, 2 ,true}, +{ ARM::VST2LNd32Pseudo_UPD, ARM::VST2LNd32_UPD, false, true, true, SingleSpc, 2, 2 ,true}, +{ ARM::VST2LNd8Pseudo, ARM::VST2LNd8, false, false, false, SingleSpc, 2, 8 ,true}, +{ ARM::VST2LNd8Pseudo_UPD, ARM::VST2LNd8_UPD, false, true, true, SingleSpc, 2, 8 ,true}, +{ ARM::VST2LNq16Pseudo, ARM::VST2LNq16, false, false, false, EvenDblSpc, 2, 4,true}, +{ ARM::VST2LNq16Pseudo_UPD, ARM::VST2LNq16_UPD, false, true, true, EvenDblSpc, 2, 4,true}, +{ ARM::VST2LNq32Pseudo, ARM::VST2LNq32, false, false, false, EvenDblSpc, 2, 2,true}, +{ ARM::VST2LNq32Pseudo_UPD, ARM::VST2LNq32_UPD, false, true, true, EvenDblSpc, 2, 2,true}, + +{ ARM::VST2d16Pseudo, ARM::VST2d16, false, false, false, SingleSpc, 2, 4 ,true}, +{ ARM::VST2d16Pseudo_UPD, ARM::VST2d16_UPD, false, true, true, SingleSpc, 2, 4 ,true}, +{ ARM::VST2d32Pseudo, ARM::VST2d32, false, false, false, SingleSpc, 2, 2 ,true}, +{ ARM::VST2d32Pseudo_UPD, ARM::VST2d32_UPD, false, true, true, SingleSpc, 2, 2 ,true}, +{ ARM::VST2d8Pseudo, ARM::VST2d8, false, false, false, SingleSpc, 2, 8 ,true}, +{ ARM::VST2d8Pseudo_UPD, ARM::VST2d8_UPD, false, true, true, SingleSpc, 2, 8 ,true}, + +{ ARM::VST2q16Pseudo, ARM::VST2q16, false, false, false, SingleSpc, 4, 4 ,true}, +{ ARM::VST2q16Pseudo_UPD, ARM::VST2q16_UPD, false, true, true, SingleSpc, 4, 4 ,true}, +{ ARM::VST2q32Pseudo, ARM::VST2q32, false, false, false, SingleSpc, 4, 2 ,true}, +{ ARM::VST2q32Pseudo_UPD, ARM::VST2q32_UPD, false, true, true, SingleSpc, 4, 2 ,true}, +{ ARM::VST2q8Pseudo, ARM::VST2q8, false, false, false, SingleSpc, 4, 8 ,true}, +{ ARM::VST2q8Pseudo_UPD, ARM::VST2q8_UPD, false, true, true, SingleSpc, 4, 8 ,true}, + +{ ARM::VST3LNd16Pseudo, ARM::VST3LNd16, false, false, false, SingleSpc, 3, 4 ,true}, +{ ARM::VST3LNd16Pseudo_UPD, ARM::VST3LNd16_UPD, false, true, true, SingleSpc, 3, 4 ,true}, +{ ARM::VST3LNd32Pseudo, ARM::VST3LNd32, false, false, false, SingleSpc, 3, 2 ,true}, +{ ARM::VST3LNd32Pseudo_UPD, ARM::VST3LNd32_UPD, false, true, true, SingleSpc, 3, 2 ,true}, +{ ARM::VST3LNd8Pseudo, ARM::VST3LNd8, false, false, false, SingleSpc, 3, 8 ,true}, +{ ARM::VST3LNd8Pseudo_UPD, ARM::VST3LNd8_UPD, false, true, true, SingleSpc, 3, 8 ,true}, +{ ARM::VST3LNq16Pseudo, ARM::VST3LNq16, false, false, false, EvenDblSpc, 3, 4,true}, +{ ARM::VST3LNq16Pseudo_UPD, ARM::VST3LNq16_UPD, false, true, true, EvenDblSpc, 3, 4,true}, +{ ARM::VST3LNq32Pseudo, ARM::VST3LNq32, false, false, false, EvenDblSpc, 3, 2,true}, +{ ARM::VST3LNq32Pseudo_UPD, ARM::VST3LNq32_UPD, false, true, true, EvenDblSpc, 3, 2,true}, + +{ ARM::VST3d16Pseudo, ARM::VST3d16, false, false, false, SingleSpc, 3, 4 ,true}, +{ ARM::VST3d16Pseudo_UPD, ARM::VST3d16_UPD, false, true, true, SingleSpc, 3, 4 ,true}, +{ ARM::VST3d32Pseudo, ARM::VST3d32, false, false, false, SingleSpc, 3, 2 ,true}, +{ ARM::VST3d32Pseudo_UPD, ARM::VST3d32_UPD, false, true, true, SingleSpc, 3, 2 ,true}, +{ ARM::VST3d8Pseudo, ARM::VST3d8, false, false, false, SingleSpc, 3, 8 ,true}, +{ ARM::VST3d8Pseudo_UPD, ARM::VST3d8_UPD, false, true, true, SingleSpc, 3, 8 ,true}, + +{ ARM::VST3q16Pseudo_UPD, ARM::VST3q16_UPD, false, true, true, EvenDblSpc, 3, 4 ,true}, +{ ARM::VST3q16oddPseudo, ARM::VST3q16, false, false, false, OddDblSpc, 3, 4 ,true}, +{ ARM::VST3q16oddPseudo_UPD, ARM::VST3q16_UPD, false, true, true, OddDblSpc, 3, 4 ,true}, +{ ARM::VST3q32Pseudo_UPD, ARM::VST3q32_UPD, false, true, true, EvenDblSpc, 3, 2 ,true}, +{ ARM::VST3q32oddPseudo, ARM::VST3q32, false, false, false, OddDblSpc, 3, 2 ,true}, +{ ARM::VST3q32oddPseudo_UPD, ARM::VST3q32_UPD, false, true, true, OddDblSpc, 3, 2 ,true}, +{ ARM::VST3q8Pseudo_UPD, ARM::VST3q8_UPD, false, true, true, EvenDblSpc, 3, 8 ,true}, +{ ARM::VST3q8oddPseudo, ARM::VST3q8, false, false, false, OddDblSpc, 3, 8 ,true}, +{ ARM::VST3q8oddPseudo_UPD, ARM::VST3q8_UPD, false, true, true, OddDblSpc, 3, 8 ,true}, + +{ ARM::VST4LNd16Pseudo, ARM::VST4LNd16, false, false, false, SingleSpc, 4, 4 ,true}, +{ ARM::VST4LNd16Pseudo_UPD, ARM::VST4LNd16_UPD, false, true, true, SingleSpc, 4, 4 ,true}, +{ ARM::VST4LNd32Pseudo, ARM::VST4LNd32, false, false, false, SingleSpc, 4, 2 ,true}, +{ ARM::VST4LNd32Pseudo_UPD, ARM::VST4LNd32_UPD, false, true, true, SingleSpc, 4, 2 ,true}, +{ ARM::VST4LNd8Pseudo, ARM::VST4LNd8, false, false, false, SingleSpc, 4, 8 ,true}, +{ ARM::VST4LNd8Pseudo_UPD, ARM::VST4LNd8_UPD, false, true, true, SingleSpc, 4, 8 ,true}, +{ ARM::VST4LNq16Pseudo, ARM::VST4LNq16, false, false, false, EvenDblSpc, 4, 4,true}, +{ ARM::VST4LNq16Pseudo_UPD, ARM::VST4LNq16_UPD, false, true, true, EvenDblSpc, 4, 4,true}, +{ ARM::VST4LNq32Pseudo, ARM::VST4LNq32, false, false, false, EvenDblSpc, 4, 2,true}, +{ ARM::VST4LNq32Pseudo_UPD, ARM::VST4LNq32_UPD, false, true, true, EvenDblSpc, 4, 2,true}, + +{ ARM::VST4d16Pseudo, ARM::VST4d16, false, false, false, SingleSpc, 4, 4 ,true}, +{ ARM::VST4d16Pseudo_UPD, ARM::VST4d16_UPD, false, true, true, SingleSpc, 4, 4 ,true}, +{ ARM::VST4d32Pseudo, ARM::VST4d32, false, false, false, SingleSpc, 4, 2 ,true}, +{ ARM::VST4d32Pseudo_UPD, ARM::VST4d32_UPD, false, true, true, SingleSpc, 4, 2 ,true}, +{ ARM::VST4d8Pseudo, ARM::VST4d8, false, false, false, SingleSpc, 4, 8 ,true}, +{ ARM::VST4d8Pseudo_UPD, ARM::VST4d8_UPD, false, true, true, SingleSpc, 4, 8 ,true}, + +{ ARM::VST4q16Pseudo_UPD, ARM::VST4q16_UPD, false, true, true, EvenDblSpc, 4, 4 ,true}, +{ ARM::VST4q16oddPseudo, ARM::VST4q16, false, false, false, OddDblSpc, 4, 4 ,true}, +{ ARM::VST4q16oddPseudo_UPD, ARM::VST4q16_UPD, false, true, true, OddDblSpc, 4, 4 ,true}, +{ ARM::VST4q32Pseudo_UPD, ARM::VST4q32_UPD, false, true, true, EvenDblSpc, 4, 2 ,true}, +{ ARM::VST4q32oddPseudo, ARM::VST4q32, false, false, false, OddDblSpc, 4, 2 ,true}, +{ ARM::VST4q32oddPseudo_UPD, ARM::VST4q32_UPD, false, true, true, OddDblSpc, 4, 2 ,true}, +{ ARM::VST4q8Pseudo_UPD, ARM::VST4q8_UPD, false, true, true, EvenDblSpc, 4, 8 ,true}, +{ ARM::VST4q8oddPseudo, ARM::VST4q8, false, false, false, OddDblSpc, 4, 8 ,true}, +{ ARM::VST4q8oddPseudo_UPD, ARM::VST4q8_UPD, false, true, true, OddDblSpc, 4, 8 ,true} }; /// LookupNEONLdSt - Search the NEONLdStTable for information about a NEON @@ -437,14 +438,14 @@ if (NumRegs > 3 && TableEntry->copyAllListRegs) MIB.addReg(D3, RegState::Define | getDeadRegState(DstIsDead)); - if (TableEntry->HasWritebackOperand) + if (TableEntry->isUpdating) MIB.addOperand(MI.getOperand(OpIdx++)); // Copy the addrmode6 operands. MIB.addOperand(MI.getOperand(OpIdx++)); MIB.addOperand(MI.getOperand(OpIdx++)); // Copy the am6offset operand. - if (TableEntry->HasWritebackOperand) + if (TableEntry->hasWritebackOperand) MIB.addOperand(MI.getOperand(OpIdx++)); // For an instruction writing double-spaced subregs, the pseudo instruction @@ -489,14 +490,14 @@ MachineInstrBuilder MIB = BuildMI(MBB, MBBI, MI.getDebugLoc(), TII->get(TableEntry->RealOpc)); unsigned OpIdx = 0; - if (TableEntry->HasWritebackOperand) + if (TableEntry->isUpdating) MIB.addOperand(MI.getOperand(OpIdx++)); // Copy the addrmode6 operands. MIB.addOperand(MI.getOperand(OpIdx++)); MIB.addOperand(MI.getOperand(OpIdx++)); // Copy the am6offset operand. - if (TableEntry->HasWritebackOperand) + if (TableEntry->hasWritebackOperand) MIB.addOperand(MI.getOperand(OpIdx++)); bool SrcIsKill = MI.getOperand(OpIdx).isKill(); @@ -566,14 +567,14 @@ MIB.addReg(D3, RegState::Define | getDeadRegState(DstIsDead)); } - if (TableEntry->HasWritebackOperand) + if (TableEntry->isUpdating) MIB.addOperand(MI.getOperand(OpIdx++)); // Copy the addrmode6 operands. MIB.addOperand(MI.getOperand(OpIdx++)); MIB.addOperand(MI.getOperand(OpIdx++)); // Copy the am6offset operand. - if (TableEntry->HasWritebackOperand) + if (TableEntry->hasWritebackOperand) MIB.addOperand(MI.getOperand(OpIdx++)); // Grab the super-register source. From baldrick at free.fr Mon Oct 31 15:07:09 2011 From: baldrick at free.fr (Duncan Sands) Date: Mon, 31 Oct 2011 20:07:09 -0000 Subject: [llvm-commits] [dragonegg] r143357 - /dragonegg/trunk/src/Convert.cpp Message-ID: <20111031200709.615D23524001@llvm.org> Author: baldrick Date: Mon Oct 31 15:07:09 2011 New Revision: 143357 URL: http://llvm.org/viewvc/llvm-project?rev=143357&view=rev Log: Fix a compile failure on 483.xalancbmk, caused by a minor GCC bug: what should be the same type in the caller and callee are two different (but equivalent) types (and not just variants of each other). Modified: dragonegg/trunk/src/Convert.cpp Modified: dragonegg/trunk/src/Convert.cpp URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Convert.cpp?rev=143357&r1=143356&r2=143357&view=diff ============================================================================== --- dragonegg/trunk/src/Convert.cpp (original) +++ dragonegg/trunk/src/Convert.cpp Mon Oct 31 15:07:09 2011 @@ -2802,6 +2802,20 @@ Client.clear(); } + // If the caller and callee disagree about a parameter type but the difference + // is trivial, correct the type used by the caller. + for (unsigned i = 0, e = std::min((unsigned)CallOperands.size(), + FTy->getNumParams()); + i != e; ++i) { + Type *ExpectedTy = FTy->getParamType(i); + Type *ActualTy = CallOperands[i]->getType(); + if (ActualTy == ExpectedTy) + continue; + assert(isa(ActualTy) && isa(ExpectedTy) && + "Type difference is not trivial!"); + CallOperands[i] = Builder.CreateBitCast(CallOperands[i], ExpectedTy); + } + // Unlike LLVM, GCC does not require that call statements provide a value for // every function argument (it passes rubbish for arguments with no value). // To get the same effect we pass 'undef' for any unspecified arguments. From nadav.rotem at intel.com Mon Oct 31 15:08:25 2011 From: nadav.rotem at intel.com (Nadav Rotem) Date: Mon, 31 Oct 2011 20:08:25 -0000 Subject: [llvm-commits] [llvm] r143358 - /llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Message-ID: <20111031200825.A2AD42A6C12C@llvm.org> Author: nadav Date: Mon Oct 31 15:08:25 2011 New Revision: 143358 URL: http://llvm.org/viewvc/llvm-project?rev=143358&view=rev Log: Cleanup. Document. Make sure that this build_vector optimization only runs before the op legalizer and that the used type is legal. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=143358&r1=143357&r2=143358&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Mon Oct 31 15:08:25 2011 @@ -6941,9 +6941,9 @@ // Check to see if this is a BUILD_VECTOR of a bunch of values // which come from any_extend or zero_extend nodes. If so, we can create // a new BUILD_VECTOR using bit-casts which may enable other BUILD_VECTOR - // optimizations. + // optimizations. We do not handle sign-extend because we can't fill the sign + // using shuffles. EVT SourceType = MVT::Other; - bool allExtend = true; bool allAnyExt = true; for (unsigned i = 0; i < NumInScalars; ++i) { SDValue In = N->getOperand(i); @@ -6953,9 +6953,9 @@ bool AnyExt = In.getOpcode() == ISD::ANY_EXTEND; bool ZeroExt = In.getOpcode() == ISD::ZERO_EXTEND; - // Abort non-extend incoming values. + // Abort if the element is not an extension. if (!ZeroExt && !AnyExt) { - allExtend = false; + SourceType = MVT::Other; break; } @@ -6964,10 +6964,11 @@ // Check that all of the widened source types are the same. if (SourceType == MVT::Other) + // First time. SourceType = InTy; else if (InTy != SourceType) { // Multiple income types. Abort. - allExtend = false; + SourceType = MVT::Other; break; } @@ -6975,17 +6976,27 @@ allAnyExt &= AnyExt; } - // And we are post type-legalization, - // If all of the values are Ext or undef, - // We have a non undef entry. - if (LegalTypes && allExtend && SourceType != MVT::Other) { + + // In order to have valid types, all of the inputs must be extended from the + // same source type and all of the inputs must be any or zero extend. + // Scalar sizes must be a power of two. + EVT OutScalarTy = N->getValueType(0).getScalarType(); + bool validTypes = SourceType != MVT::Other && + isPowerOf2_32(OutScalarTy.getSizeInBits()) && + isPowerOf2_32(SourceType.getSizeInBits()); + + // We perform this optimization post type-legalization because + // the type-legalizer often scalarizes integer-promoted vectors. + // Performing this optimization before may create bit-casts which + // will be type-legalized to complex code sequences. + // We perform this optimization only before the operation legalizer because we + // may introduce illegal operations. + if (LegalTypes && !LegalOperations && validTypes) { bool isLE = TLI.isLittleEndian(); - EVT InScalarTy = SourceType.getScalarType(); - EVT OutScalarTy = N->getValueType(0).getScalarType(); - unsigned ElemRatio = OutScalarTy.getSizeInBits()/InScalarTy.getSizeInBits(); + unsigned ElemRatio = OutScalarTy.getSizeInBits()/SourceType.getSizeInBits(); assert(ElemRatio > 1 && "Invalid element size ratio"); - SDValue Filler = allAnyExt ? DAG.getUNDEF(InScalarTy): - DAG.getConstant(0, InScalarTy); + SDValue Filler = allAnyExt ? DAG.getUNDEF(SourceType): + DAG.getConstant(0, SourceType); unsigned NewBVElems = ElemRatio * N->getValueType(0).getVectorNumElements(); SmallVector Ops(NewBVElems, Filler); @@ -6998,7 +7009,7 @@ Cast.getOpcode() == ISD::UNDEF) && "Invalid cast opcode"); SDValue In; if (Cast.getOpcode() == ISD::UNDEF) - In = DAG.getUNDEF(InScalarTy); + In = DAG.getUNDEF(SourceType); else In = Cast->getOperand(0); unsigned Index = isLE ? (i * ElemRatio) : @@ -7009,9 +7020,11 @@ } // The type of the new BUILD_VECTOR node. - EVT VecVT = EVT::getVectorVT(*DAG.getContext(), InScalarTy, NewBVElems); + EVT VecVT = EVT::getVectorVT(*DAG.getContext(), SourceType, NewBVElems); assert(VecVT.getSizeInBits() == N->getValueType(0).getSizeInBits() && "Invalid vector size"); + // Check if the new vector type is legal. + if (!isTypeLegal(VecVT)) return SDValue(); // Make the new BUILD_VECTOR. SDValue BV = DAG.getNode(ISD::BUILD_VECTOR, N->getDebugLoc(), From gkistanova at gmail.com Mon Oct 31 16:13:07 2011 From: gkistanova at gmail.com (Galina Kistanova) Date: Mon, 31 Oct 2011 21:13:07 -0000 Subject: [llvm-commits] [llvm] r143365 - in /llvm/trunk/docs: HowToAddABuilder.html index.html Message-ID: <20111031211307.322F63524001@llvm.org> Author: gkistanova Date: Mon Oct 31 16:13:06 2011 New Revision: 143365 URL: http://llvm.org/viewvc/llvm-project?rev=143365&view=rev Log: Added instruction how to add a builder to docs. Added: llvm/trunk/docs/HowToAddABuilder.html Modified: llvm/trunk/docs/index.html Added: llvm/trunk/docs/HowToAddABuilder.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/HowToAddABuilder.html?rev=143365&view=auto ============================================================================== --- llvm/trunk/docs/HowToAddABuilder.html (added) +++ llvm/trunk/docs/HowToAddABuilder.html Mon Oct 31 16:13:06 2011 @@ -0,0 +1,118 @@ + + + + + How To Add Your Build Configuration To LLVM Buildbot Infrastructure + + + + +

How To Release LLVM To The Public

+
    +
  1. Introduction
  2. +
  3. Steps To Add Builder To LLVM Buildbot
  4. +
+
+

Written by Galina Kistanova +

+
+ + +

Introduction

+ + +
+ +

This document contains information about adding private slave builder to + LLVM Buildbot Infrastructure: http://lab.llvm.org:8011 +

+ + +

Steps To Add Builder To LLVM Buildbot

+ +
+ +

Volunters can provade there build machines to work as slave builders to + public LLVM Buildbot. Below desrcibed recommended steps to implement this + task.

+ +

The steps are roughly as follows:

+ +
    +
  1. Check the existing build configurations to make sure the one you are + interested in is not covered yet or gets built on your computer much + faster than existing one. We prefer faster builds so developers will get + feedback sooner after changes get committed.

  2. + +
  3. The computer you will be registering with the LLVM buildbot + infrastructure should have all dependencies installed and you can + actually build your configuration successfully. You can build multiple + configurations on one computer.

  4. + +
  5. Install buildslave (currently we are using buildbot version 0.8.5). + Depending on the platform, buildslave could be available to download and + install with your packet manager, or you can download it directly from + http://trac.buildbot.net/ and install it manually.

  6. + +
  7. Create a designated user account your buildslave will be running + under.

  8. + +
  9. Choose the buildslave root directory (all builds will be placed under + it), buildslave access name and password the build master will be using + to authenticate your build slave.

  10. + +
  11. Then create a build slave in context of that buildslave account. + Point it to the lab.llvm.org port 9990
    + (see http://buildbot.net/buildbot/docs/current/full.html#creating-a-slave + for more details) by running the following command: +

    +
    +      $ buildslave create-slave buildslave-root-directory lab.llvm.org: 9990 \
    +      buildslave-access-name buildslave-access-password
    +      

  12. + +
  13. Fill the build slave description and admin name/e-mail. + Here is an example of the build slave description: +

    +
    +           Windows 7 x64
    +           Core i7 (2.66GHz), 16GB of RAM
    +           
    +           g++.exe (TDM-1 mingw32) 4.4.0
    +           GNU Binutils 2.19.1
    +           cmake version 2.8.4
    +           Microsoft(R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
    +      

  14. + +
  15. Make sure you can actually start the buildslave successfully. Then set + up your build slave to start automatically at the start up time. + See buildbot manual for help.

  16. + +
  17. Send a patch which adds your build slave and builder to zorg.
    + * slaves are added to
    +http://llvm.org/svn/llvm-project/zorg/trunk/buildbot/osuosl/master/config/slaves.py
    + * builders are added to
    +http://llvm.org/svn/llvm-project/zorg/trunk/buildbot/osuosl/master/config/builders.py

  18. + +
  19. Then send the buildslave access name and password directly to + Galina Kistanova + +

  20. Finally, the end!

  21. +
+ +
+ + +
+
+ Valid CSS + Valid HTML 4.01 + The LLVM Compiler Infrastructure +
+ Last modified: $Date: 2011-10-31 12:50:0 -0700 (Mon, 31 Oct 2011) $ +
+ + Modified: llvm/trunk/docs/index.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/index.html?rev=143365&r1=143364&r2=143365&view=diff ============================================================================== --- llvm/trunk/docs/index.html (original) +++ llvm/trunk/docs/index.html Mon Oct 31 16:13:06 2011 @@ -129,6 +129,10 @@ using the mozilla browser, and have chatzilla installed, you can join #llvm on irc.oftc.net directly. +
  • How To Add Your Build Configuration +To LLVM Buildbot Infrastructure - Instructions for adding new builder to +LLVM buildbot master.
  • + From kremenek at apple.com Mon Oct 31 16:23:15 2011 From: kremenek at apple.com (Ted Kremenek) Date: Mon, 31 Oct 2011 21:23:15 -0000 Subject: [llvm-commits] [llvm] r143366 - /llvm/trunk/docs/GettingStarted.html Message-ID: <20111031212315.A511F3524001@llvm.org> Author: kremenek Date: Mon Oct 31 16:23:15 2011 New Revision: 143366 URL: http://llvm.org/viewvc/llvm-project?rev=143366&view=rev Log: Update 'Getting Started' to suggest using GCC 4.2 or higher (or Clang). There is no reason to support older versions of GCC. Modified: llvm/trunk/docs/GettingStarted.html Modified: llvm/trunk/docs/GettingStarted.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/GettingStarted.html?rev=143366&r1=143365&r2=143366&view=diff ============================================================================== --- llvm/trunk/docs/GettingStarted.html (original) +++ llvm/trunk/docs/GettingStarted.html Mon Oct 31 16:23:15 2011 @@ -516,9 +516,8 @@

    LLVM is very demanding of the host C++ compiler, and as such tends to expose bugs in the compiler. In particular, several versions of GCC crash when trying -to compile LLVM. We routinely use GCC 3.3.3, 3.4.0, and Apple 4.0.1 -successfully with them (however, see important notes below). Other versions -of GCC will probably work as well. GCC versions listed +to compile LLVM. We routinely use GCC 4.2 (and higher) or Clang. +Other versions of GCC will probably work as well. GCC versions listed here are known to not work. If you are using one of these versions, please try to upgrade your GCC to something more recent. If you run into a problem with a version of GCC not listed here, please let From grosbach at apple.com Mon Oct 31 16:50:32 2011 From: grosbach at apple.com (Jim Grosbach) Date: Mon, 31 Oct 2011 21:50:32 -0000 Subject: [llvm-commits] [llvm] r143369 - in /llvm/trunk/lib/Target/ARM: ARMExpandPseudoInsts.cpp ARMISelDAGToDAG.cpp ARMInstrNEON.td AsmParser/ARMAsmParser.cpp Disassembler/ARMDisassembler.cpp Message-ID: <20111031215032.232A63524001@llvm.org> Author: grosbach Date: Mon Oct 31 16:50:31 2011 New Revision: 143369 URL: http://llvm.org/viewvc/llvm-project?rev=143369&view=rev Log: ARM VST1 w/ writeback assembly parsing and encoding. Modified: llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp llvm/trunk/lib/Target/ARM/ARMInstrNEON.td llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp Modified: llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp?rev=143369&r1=143368&r2=143369&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp Mon Oct 31 16:50:31 2011 @@ -273,13 +273,17 @@ { ARM::VST1d64TPseudo_UPD, ARM::VST1d64T_UPD, false, true, true, SingleSpc, 3, 1 ,true}, { ARM::VST1q16Pseudo, ARM::VST1q16, false, false, false, SingleSpc, 2, 4 ,true}, -{ ARM::VST1q16Pseudo_UPD, ARM::VST1q16_UPD, false, true, true, SingleSpc, 2, 4 ,true}, +{ ARM::VST1q16PseudoWB_fixed, ARM::VST1q16wb_fixed, false, true, false, SingleSpc, 2, 4 ,false}, +{ ARM::VST1q16PseudoWB_register, ARM::VST1q16wb_register, false, true, true, SingleSpc, 2, 4 ,false}, { ARM::VST1q32Pseudo, ARM::VST1q32, false, false, false, SingleSpc, 2, 2 ,true}, -{ ARM::VST1q32Pseudo_UPD, ARM::VST1q32_UPD, false, true, true, SingleSpc, 2, 2 ,true}, +{ ARM::VST1q32PseudoWB_fixed, ARM::VST1q32wb_fixed, false, true, false, SingleSpc, 2, 2 ,false}, +{ ARM::VST1q32PseudoWB_register, ARM::VST1q32wb_register, false, true, true, SingleSpc, 2, 2 ,false}, { ARM::VST1q64Pseudo, ARM::VST1q64, false, false, false, SingleSpc, 2, 1 ,true}, -{ ARM::VST1q64Pseudo_UPD, ARM::VST1q64_UPD, false, true, true, SingleSpc, 2, 1 ,true}, +{ ARM::VST1q64PseudoWB_fixed, ARM::VST1q64wb_fixed, false, true, false, SingleSpc, 2, 1 ,false}, +{ ARM::VST1q64PseudoWB_register, ARM::VST1q64wb_register, false, true, true, SingleSpc, 2, 1 ,false}, { ARM::VST1q8Pseudo, ARM::VST1q8, false, false, false, SingleSpc, 2, 8 ,true}, -{ ARM::VST1q8Pseudo_UPD, ARM::VST1q8_UPD, false, true, true, SingleSpc, 2, 8 ,true}, +{ ARM::VST1q8PseudoWB_fixed, ARM::VST1q8wb_fixed, false, true, false, SingleSpc, 2, 8 ,false}, +{ ARM::VST1q8PseudoWB_register, ARM::VST1q8wb_register, false, true, true, SingleSpc, 2, 8 ,false}, { ARM::VST2LNd16Pseudo, ARM::VST2LNd16, false, false, false, SingleSpc, 2, 4 ,true}, { ARM::VST2LNd16Pseudo_UPD, ARM::VST2LNd16_UPD, false, true, true, SingleSpc, 2, 4 ,true}, @@ -504,10 +508,12 @@ unsigned SrcReg = MI.getOperand(OpIdx++).getReg(); unsigned D0, D1, D2, D3; GetDSubRegs(SrcReg, RegSpc, TRI, D0, D1, D2, D3); - MIB.addReg(D0).addReg(D1); - if (NumRegs > 2) + MIB.addReg(D0); + if (NumRegs > 1 && TableEntry->copyAllListRegs) + MIB.addReg(D1); + if (NumRegs > 2 && TableEntry->copyAllListRegs) MIB.addReg(D2); - if (NumRegs > 3) + if (NumRegs > 3 && TableEntry->copyAllListRegs) MIB.addReg(D3); // Copy the predicate operands. @@ -1153,10 +1159,14 @@ case ARM::VST1q16Pseudo: case ARM::VST1q32Pseudo: case ARM::VST1q64Pseudo: - case ARM::VST1q8Pseudo_UPD: - case ARM::VST1q16Pseudo_UPD: - case ARM::VST1q32Pseudo_UPD: - case ARM::VST1q64Pseudo_UPD: + case ARM::VST1q8PseudoWB_fixed: + case ARM::VST1q16PseudoWB_fixed: + case ARM::VST1q32PseudoWB_fixed: + case ARM::VST1q64PseudoWB_fixed: + case ARM::VST1q8PseudoWB_register: + case ARM::VST1q16PseudoWB_register: + case ARM::VST1q32PseudoWB_register: + case ARM::VST1q64PseudoWB_register: case ARM::VST2d8Pseudo: case ARM::VST2d16Pseudo: case ARM::VST2d32Pseudo: Modified: llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp?rev=143369&r1=143368&r2=143369&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp Mon Oct 31 16:50:31 2011 @@ -1566,6 +1566,19 @@ case ARM::VLD1q16PseudoWB_fixed: return ARM::VLD1q16PseudoWB_register; case ARM::VLD1q32PseudoWB_fixed: return ARM::VLD1q32PseudoWB_register; case ARM::VLD1q64PseudoWB_fixed: return ARM::VLD1q64PseudoWB_register; + + case ARM::VST1d8wb_fixed: return ARM::VST1d8wb_register; + case ARM::VST1d16wb_fixed: return ARM::VST1d16wb_register; + case ARM::VST1d32wb_fixed: return ARM::VST1d32wb_register; + case ARM::VST1d64wb_fixed: return ARM::VST1d64wb_register; + case ARM::VST1q8wb_fixed: return ARM::VST1q8wb_register; + case ARM::VST1q16wb_fixed: return ARM::VST1q16wb_register; + case ARM::VST1q32wb_fixed: return ARM::VST1q32wb_register; + case ARM::VST1q64wb_fixed: return ARM::VST1q64wb_register; + case ARM::VST1q8PseudoWB_fixed: return ARM::VST1q8PseudoWB_register; + case ARM::VST1q16PseudoWB_fixed: return ARM::VST1q16PseudoWB_register; + case ARM::VST1q32PseudoWB_fixed: return ARM::VST1q32PseudoWB_register; + case ARM::VST1q64PseudoWB_fixed: return ARM::VST1q64PseudoWB_register; } return Opc; // If not one we handle, return it unchanged. } @@ -1635,11 +1648,12 @@ SDValue Inc = N->getOperand(AddrOpIdx + 1); // FIXME: VLD1 fixed increment doesn't need Reg0. Remove the reg0 // case entirely when the rest are updated to that form, too. - // Do that before committing this change. Likewise, the opcode - // update call will become unconditional. if (NumVecs == 1 && !isa(Inc.getNode())) Opc = getVLDSTRegisterUpdateOpcode(Opc); - if (NumVecs != 1 || !isa(Inc.getNode())) + // We use a VST1 for v1i64 even if the pseudo says vld2/3/4, so + // check for that explicitly too. Horribly hacky, but temporary. + if ((NumVecs != 1 && Opc != ARM::VLD1q64PseudoWB_fixed) || + !isa(Inc.getNode())) Ops.push_back(isa(Inc.getNode()) ? Reg0 : Inc); } Ops.push_back(Pred); @@ -1782,7 +1796,15 @@ Ops.push_back(Align); if (isUpdating) { SDValue Inc = N->getOperand(AddrOpIdx + 1); - Ops.push_back(isa(Inc.getNode()) ? Reg0 : Inc); + // FIXME: VST1 fixed increment doesn't need Reg0. Remove the reg0 + // case entirely when the rest are updated to that form, too. + if (NumVecs == 1 && !isa(Inc.getNode())) + Opc = getVLDSTRegisterUpdateOpcode(Opc); + // We use a VST1 for v1i64 even if the pseudo says vld2/3/4, so + // check for that explicitly too. Horribly hacky, but temporary. + if ((NumVecs != 1 && Opc != ARM::VST1q64PseudoWB_fixed) || + !isa(Inc.getNode())) + Ops.push_back(isa(Inc.getNode()) ? Reg0 : Inc); } Ops.push_back(SrcReg); Ops.push_back(Pred); @@ -2844,16 +2866,18 @@ } case ARMISD::VST1_UPD: { - unsigned DOpcodes[] = { ARM::VST1d8_UPD, ARM::VST1d16_UPD, - ARM::VST1d32_UPD, ARM::VST1d64_UPD }; - unsigned QOpcodes[] = { ARM::VST1q8Pseudo_UPD, ARM::VST1q16Pseudo_UPD, - ARM::VST1q32Pseudo_UPD, ARM::VST1q64Pseudo_UPD }; + unsigned DOpcodes[] = { ARM::VST1d8wb_fixed, ARM::VST1d16wb_fixed, + ARM::VST1d32wb_fixed, ARM::VST1d64wb_fixed }; + unsigned QOpcodes[] = { ARM::VST1q8PseudoWB_fixed, + ARM::VST1q16PseudoWB_fixed, + ARM::VST1q32PseudoWB_fixed, + ARM::VST1q64PseudoWB_fixed }; return SelectVST(N, true, 1, DOpcodes, QOpcodes, 0); } case ARMISD::VST2_UPD: { unsigned DOpcodes[] = { ARM::VST2d8Pseudo_UPD, ARM::VST2d16Pseudo_UPD, - ARM::VST2d32Pseudo_UPD, ARM::VST1q64Pseudo_UPD }; + ARM::VST2d32Pseudo_UPD, ARM::VST1q64PseudoWB_fixed}; unsigned QOpcodes[] = { ARM::VST2q8Pseudo_UPD, ARM::VST2q16Pseudo_UPD, ARM::VST2q32Pseudo_UPD }; return SelectVST(N, true, 2, DOpcodes, QOpcodes, 0); Modified: llvm/trunk/lib/Target/ARM/ARMInstrNEON.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrNEON.td?rev=143369&r1=143368&r2=143369&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrNEON.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrNEON.td Mon Oct 31 16:50:31 2011 @@ -1208,6 +1208,14 @@ : PseudoNLdSt<(outs GPR:$wb), (ins addrmode6:$addr, am6offset:$offset, QPR:$src), itin, "$addr.addr = $wb">; +class VSTQWBfixedPseudo + : PseudoNLdSt<(outs GPR:$wb), + (ins addrmode6:$addr, QPR:$src), itin, + "$addr.addr = $wb">; +class VSTQWBregisterPseudo + : PseudoNLdSt<(outs GPR:$wb), + (ins addrmode6:$addr, rGPR:$offset, QPR:$src), itin, + "$addr.addr = $wb">; class VSTQQPseudo : PseudoNLdSt<(outs), (ins addrmode6:$addr, QQPR:$src), itin, "">; class VSTQQWBPseudo @@ -1254,36 +1262,65 @@ def VST1q64Pseudo : VSTQPseudo; // ...with address register writeback: -class VST1DWB op7_4, string Dt> - : NLdSt<0, 0b00, 0b0111, op7_4, (outs GPR:$wb), - (ins addrmode6:$Rn, am6offset:$Rm, DPR:$Vd), IIC_VST1u, - "vst1", Dt, "\\{$Vd\\}, $Rn$Rm", "$Rn.addr = $wb", []> { - let Inst{4} = Rn{4}; - let DecoderMethod = "DecodeVSTInstruction"; -} -class VST1QWB op7_4, string Dt> - : NLdSt<0, 0b00, 0b1010, op7_4, (outs GPR:$wb), - (ins addrmode6:$Rn, am6offset:$Rm, DPR:$Vd, DPR:$src2), - IIC_VST1x2u, "vst1", Dt, "\\{$Vd, $src2\\}, $Rn$Rm", - "$Rn.addr = $wb", []> { - let Inst{5-4} = Rn{5-4}; - let DecoderMethod = "DecodeVSTInstruction"; +multiclass VST1DWB op7_4, string Dt> { + def _fixed : NLdSt<0,0b00, 0b0111,op7_4, (outs GPR:$wb), + (ins addrmode6:$Rn, VecListOneD:$Vd), IIC_VLD1u, + "vst1", Dt, "$Vd, $Rn!", + "$Rn.addr = $wb", []> { + let Rm = 0b1101; // NLdSt will assign to the right encoding bits. + let Inst{4} = Rn{4}; + let DecoderMethod = "DecodeVSTInstruction"; + let AsmMatchConverter = "cvtVSTwbFixed"; + } + def _register : NLdSt<0,0b00,0b0111,op7_4, (outs GPR:$wb), + (ins addrmode6:$Rn, rGPR:$Rm, VecListOneD:$Vd), + IIC_VLD1u, + "vst1", Dt, "$Vd, $Rn, $Rm", + "$Rn.addr = $wb", []> { + let Inst{4} = Rn{4}; + let DecoderMethod = "DecodeVSTInstruction"; + let AsmMatchConverter = "cvtVSTwbRegister"; + } +} +multiclass VST1QWB op7_4, string Dt> { + def _fixed : NLdSt<0,0b00,0b1010,op7_4, (outs GPR:$wb), + (ins addrmode6:$Rn, VecListTwoD:$Vd), IIC_VLD1x2u, + "vst1", Dt, "$Vd, $Rn!", + "$Rn.addr = $wb", []> { + let Rm = 0b1101; // NLdSt will assign to the right encoding bits. + let Inst{5-4} = Rn{5-4}; + let DecoderMethod = "DecodeVSTInstruction"; + let AsmMatchConverter = "cvtVSTwbFixed"; + } + def _register : NLdSt<0,0b00,0b1010,op7_4, (outs GPR:$wb), + (ins addrmode6:$Rn, rGPR:$Rm, VecListTwoD:$Vd), + IIC_VLD1x2u, + "vst1", Dt, "$Vd, $Rn, $Rm", + "$Rn.addr = $wb", []> { + let Inst{5-4} = Rn{5-4}; + let DecoderMethod = "DecodeVSTInstruction"; + let AsmMatchConverter = "cvtVSTwbRegister"; + } } -def VST1d8_UPD : VST1DWB<{0,0,0,?}, "8">; -def VST1d16_UPD : VST1DWB<{0,1,0,?}, "16">; -def VST1d32_UPD : VST1DWB<{1,0,0,?}, "32">; -def VST1d64_UPD : VST1DWB<{1,1,0,?}, "64">; - -def VST1q8_UPD : VST1QWB<{0,0,?,?}, "8">; -def VST1q16_UPD : VST1QWB<{0,1,?,?}, "16">; -def VST1q32_UPD : VST1QWB<{1,0,?,?}, "32">; -def VST1q64_UPD : VST1QWB<{1,1,?,?}, "64">; - -def VST1q8Pseudo_UPD : VSTQWBPseudo; -def VST1q16Pseudo_UPD : VSTQWBPseudo; -def VST1q32Pseudo_UPD : VSTQWBPseudo; -def VST1q64Pseudo_UPD : VSTQWBPseudo; +defm VST1d8wb : VST1DWB<{0,0,0,?}, "8">; +defm VST1d16wb : VST1DWB<{0,1,0,?}, "16">; +defm VST1d32wb : VST1DWB<{1,0,0,?}, "32">; +defm VST1d64wb : VST1DWB<{1,1,0,?}, "64">; + +defm VST1q8wb : VST1QWB<{0,0,?,?}, "8">; +defm VST1q16wb : VST1QWB<{0,1,?,?}, "16">; +defm VST1q32wb : VST1QWB<{1,0,?,?}, "32">; +defm VST1q64wb : VST1QWB<{1,1,?,?}, "64">; + +def VST1q8PseudoWB_fixed : VSTQWBfixedPseudo; +def VST1q16PseudoWB_fixed : VSTQWBfixedPseudo; +def VST1q32PseudoWB_fixed : VSTQWBfixedPseudo; +def VST1q64PseudoWB_fixed : VSTQWBfixedPseudo; +def VST1q8PseudoWB_register : VSTQWBregisterPseudo; +def VST1q16PseudoWB_register : VSTQWBregisterPseudo; +def VST1q32PseudoWB_register : VSTQWBregisterPseudo; +def VST1q64PseudoWB_register : VSTQWBregisterPseudo; // ...with 3 registers class VST1D3 op7_4, string Dt> Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp?rev=143369&r1=143368&r2=143369&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original) +++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Mon Oct 31 16:50:31 2011 @@ -202,6 +202,10 @@ const SmallVectorImpl &); bool cvtVLDwbRegister(MCInst &Inst, unsigned Opcode, const SmallVectorImpl &); + bool cvtVSTwbFixed(MCInst &Inst, unsigned Opcode, + const SmallVectorImpl &); + bool cvtVSTwbRegister(MCInst &Inst, unsigned Opcode, + const SmallVectorImpl &); bool validateInstruction(MCInst &Inst, const SmallVectorImpl &Ops); @@ -3429,6 +3433,36 @@ return true; } +bool ARMAsmParser:: +cvtVSTwbFixed(MCInst &Inst, unsigned Opcode, + const SmallVectorImpl &Operands) { + // Create a writeback register dummy placeholder. + Inst.addOperand(MCOperand::CreateImm(0)); + // Vn + ((ARMOperand*)Operands[4])->addAlignedMemoryOperands(Inst, 2); + // Vt + ((ARMOperand*)Operands[3])->addVecListTwoDOperands(Inst, 1); + // pred + ((ARMOperand*)Operands[1])->addCondCodeOperands(Inst, 2); + return true; +} + +bool ARMAsmParser:: +cvtVSTwbRegister(MCInst &Inst, unsigned Opcode, + const SmallVectorImpl &Operands) { + // Create a writeback register dummy placeholder. + Inst.addOperand(MCOperand::CreateImm(0)); + // Vn + ((ARMOperand*)Operands[4])->addAlignedMemoryOperands(Inst, 2); + // Vm + ((ARMOperand*)Operands[5])->addRegOperands(Inst, 1); + // Vt + ((ARMOperand*)Operands[3])->addVecListTwoDOperands(Inst, 1); + // pred + ((ARMOperand*)Operands[1])->addCondCodeOperands(Inst, 2); + return true; +} + /// Parse an ARM memory expression, return false if successful else return true /// or an error. The first token must be a '[' when called. bool ARMAsmParser:: Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp?rev=143369&r1=143368&r2=143369&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp (original) +++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp Mon Oct 31 16:50:31 2011 @@ -2183,14 +2183,22 @@ // Writeback Operand switch (Inst.getOpcode()) { - case ARM::VST1d8_UPD: - case ARM::VST1d16_UPD: - case ARM::VST1d32_UPD: - case ARM::VST1d64_UPD: - case ARM::VST1q8_UPD: - case ARM::VST1q16_UPD: - case ARM::VST1q32_UPD: - case ARM::VST1q64_UPD: + case ARM::VST1d8wb_fixed: + case ARM::VST1d16wb_fixed: + case ARM::VST1d32wb_fixed: + case ARM::VST1d64wb_fixed: + case ARM::VST1d8wb_register: + case ARM::VST1d16wb_register: + case ARM::VST1d32wb_register: + case ARM::VST1d64wb_register: + case ARM::VST1q8wb_fixed: + case ARM::VST1q16wb_fixed: + case ARM::VST1q32wb_fixed: + case ARM::VST1q64wb_fixed: + case ARM::VST1q8wb_register: + case ARM::VST1q16wb_register: + case ARM::VST1q32wb_register: + case ARM::VST1q64wb_register: case ARM::VST1d8T_UPD: case ARM::VST1d16T_UPD: case ARM::VST1d32T_UPD: @@ -2249,10 +2257,6 @@ case ARM::VST1q16: case ARM::VST1q32: case ARM::VST1q64: - case ARM::VST1q8_UPD: - case ARM::VST1q16_UPD: - case ARM::VST1q32_UPD: - case ARM::VST1q64_UPD: case ARM::VST1d8T: case ARM::VST1d16T: case ARM::VST1d32T: From lattner at apple.com Mon Oct 31 17:48:56 2011 From: lattner at apple.com (Tanya Lattner) Date: Mon, 31 Oct 2011 15:48:56 -0700 Subject: [llvm-commits] [PATCH] Updated lazily link patch Message-ID: <42169AB2-AAB9-4ECD-A0B1-6CE7C1B45C05@apple.com> Updated the patch with Peter's suggested changes. If there are no other comments, I'll commit. -Tanya The attached patch will only link functions marked with specific linkage (internal, private, linker_private, linker_private_weak, linker_private_weak_def_auto, linkonce, linkonce_odr, and available_externally) if they have uses in the destination module. Instead of automatically linking, these functions are placed onto a worklist to be processed in the final stage of linking. We iterate over the list and if any functions on the list have uses in the destination module, we link them in and repeat the process until no changes in the state (uses) has changed. This means that any functions in the LazilyLink worklist that have a use in the destination module will be linked in and none that don't. -------------- next part -------------- A non-text attachment was scrubbed... Name: LazyLink2.patch Type: application/octet-stream Size: 2650 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111031/56add0ea/attachment.obj From asl at math.spbu.ru Mon Oct 31 17:53:33 2011 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Tue, 1 Nov 2011 02:53:33 +0400 Subject: [llvm-commits] [LLVM, SwitchInst, case ranges] Auxiliary patch #1 In-Reply-To: <4EAB079D.6000606@free.fr> References: <4EAA9B5D.802@narod.ru> <4EAA9DE8.80000@free.fr> <485181319805488@web67.yandex.ru> <4EAB079D.6000606@free.fr> Message-ID: Hi Duncan, > be the opposite: they might make switches harder to work with and reason about > for no advantage. ?Which is it? ?Do you have an example where case ranges would > result in better code, or make it easier to produce better code? I think the typical example is some code which produces large switches. In the frontend we won't emit such large switches and end with explicit comparisons instead. Do you have some example of this from Ada world? I believe I saw something like this in Polyhedron, but I'm not sure. -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University From matthewbg at google.com Mon Oct 31 18:46:38 2011 From: matthewbg at google.com (Matt Beaumont-Gay) Date: Mon, 31 Oct 2011 23:46:38 -0000 Subject: [llvm-commits] [llvm] r143400 - in /llvm/trunk/test/Object: Inputs/ TestObjectFiles/ Message-ID: <20111031234639.1CE033524002@llvm.org> Author: matthewbg Date: Mon Oct 31 18:46:38 2011 New Revision: 143400 URL: http://llvm.org/viewvc/llvm-project?rev=143400&view=rev Log: Rename "TestObjectFiles" to "Inputs" (like the pattern for Clang tests) Added: llvm/trunk/test/Object/Inputs/ llvm/trunk/test/Object/Inputs/archive-test.a-coff-i386 - copied, changed from r143369, llvm/trunk/test/Object/TestObjectFiles/archive-test.a-coff-i386 llvm/trunk/test/Object/Inputs/trivial-object-test.coff-i386 - copied, changed from r143369, llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.coff-i386 llvm/trunk/test/Object/Inputs/trivial-object-test.coff-x86-64 - copied, changed from r143369, llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.coff-x86-64 llvm/trunk/test/Object/Inputs/trivial-object-test.elf-i386 - copied, changed from r143369, llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.elf-i386 llvm/trunk/test/Object/Inputs/trivial-object-test.elf-x86-64 - copied, changed from r143369, llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.elf-x86-64 llvm/trunk/test/Object/Inputs/trivial-object-test.macho-i386 - copied, changed from r143369, llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.macho-i386 llvm/trunk/test/Object/Inputs/trivial-object-test.macho-x86-64 - copied, changed from r143369, llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.macho-x86-64 llvm/trunk/test/Object/Inputs/trivial.ll - copied, changed from r143369, llvm/trunk/test/Object/TestObjectFiles/trivial.ll Removed: llvm/trunk/test/Object/TestObjectFiles/archive-test.a-coff-i386 llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.coff-i386 llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.coff-x86-64 llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.elf-i386 llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.elf-x86-64 llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.macho-i386 llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.macho-x86-64 llvm/trunk/test/Object/TestObjectFiles/trivial.ll Copied: llvm/trunk/test/Object/Inputs/archive-test.a-coff-i386 (from r143369, llvm/trunk/test/Object/TestObjectFiles/archive-test.a-coff-i386) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/Inputs/archive-test.a-coff-i386?p2=llvm/trunk/test/Object/Inputs/archive-test.a-coff-i386&p1=llvm/trunk/test/Object/TestObjectFiles/archive-test.a-coff-i386&r1=143369&r2=143400&rev=143400&view=diff ============================================================================== (empty) Copied: llvm/trunk/test/Object/Inputs/trivial-object-test.coff-i386 (from r143369, llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.coff-i386) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/Inputs/trivial-object-test.coff-i386?p2=llvm/trunk/test/Object/Inputs/trivial-object-test.coff-i386&p1=llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.coff-i386&r1=143369&r2=143400&rev=143400&view=diff ============================================================================== (empty) Copied: llvm/trunk/test/Object/Inputs/trivial-object-test.coff-x86-64 (from r143369, llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.coff-x86-64) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/Inputs/trivial-object-test.coff-x86-64?p2=llvm/trunk/test/Object/Inputs/trivial-object-test.coff-x86-64&p1=llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.coff-x86-64&r1=143369&r2=143400&rev=143400&view=diff ============================================================================== (empty) Copied: llvm/trunk/test/Object/Inputs/trivial-object-test.elf-i386 (from r143369, llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.elf-i386) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/Inputs/trivial-object-test.elf-i386?p2=llvm/trunk/test/Object/Inputs/trivial-object-test.elf-i386&p1=llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.elf-i386&r1=143369&r2=143400&rev=143400&view=diff ============================================================================== (empty) Copied: llvm/trunk/test/Object/Inputs/trivial-object-test.elf-x86-64 (from r143369, llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.elf-x86-64) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/Inputs/trivial-object-test.elf-x86-64?p2=llvm/trunk/test/Object/Inputs/trivial-object-test.elf-x86-64&p1=llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.elf-x86-64&r1=143369&r2=143400&rev=143400&view=diff ============================================================================== (empty) Copied: llvm/trunk/test/Object/Inputs/trivial-object-test.macho-i386 (from r143369, llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.macho-i386) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/Inputs/trivial-object-test.macho-i386?p2=llvm/trunk/test/Object/Inputs/trivial-object-test.macho-i386&p1=llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.macho-i386&r1=143369&r2=143400&rev=143400&view=diff ============================================================================== (empty) Copied: llvm/trunk/test/Object/Inputs/trivial-object-test.macho-x86-64 (from r143369, llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.macho-x86-64) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/Inputs/trivial-object-test.macho-x86-64?p2=llvm/trunk/test/Object/Inputs/trivial-object-test.macho-x86-64&p1=llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.macho-x86-64&r1=143369&r2=143400&rev=143400&view=diff ============================================================================== (empty) Copied: llvm/trunk/test/Object/Inputs/trivial.ll (from r143369, llvm/trunk/test/Object/TestObjectFiles/trivial.ll) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/Inputs/trivial.ll?p2=llvm/trunk/test/Object/Inputs/trivial.ll&p1=llvm/trunk/test/Object/TestObjectFiles/trivial.ll&r1=143369&r2=143400&rev=143400&view=diff ============================================================================== (empty) Removed: llvm/trunk/test/Object/TestObjectFiles/archive-test.a-coff-i386 URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/TestObjectFiles/archive-test.a-coff-i386?rev=143399&view=auto ============================================================================== Binary files llvm/trunk/test/Object/TestObjectFiles/archive-test.a-coff-i386 (original) and llvm/trunk/test/Object/TestObjectFiles/archive-test.a-coff-i386 (removed) differ Removed: llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.coff-i386 URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.coff-i386?rev=143399&view=auto ============================================================================== Binary files llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.coff-i386 (original) and llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.coff-i386 (removed) differ Removed: llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.coff-x86-64 URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.coff-x86-64?rev=143399&view=auto ============================================================================== Binary files llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.coff-x86-64 (original) and llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.coff-x86-64 (removed) differ Removed: llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.elf-i386 URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.elf-i386?rev=143399&view=auto ============================================================================== Binary files llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.elf-i386 (original) and llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.elf-i386 (removed) differ Removed: llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.elf-x86-64 URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.elf-x86-64?rev=143399&view=auto ============================================================================== Binary files llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.elf-x86-64 (original) and llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.elf-x86-64 (removed) differ Removed: llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.macho-i386 URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.macho-i386?rev=143399&view=auto ============================================================================== Binary files llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.macho-i386 (original) and llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.macho-i386 (removed) differ Removed: llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.macho-x86-64 URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.macho-x86-64?rev=143399&view=auto ============================================================================== Binary files llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.macho-x86-64 (original) and llvm/trunk/test/Object/TestObjectFiles/trivial-object-test.macho-x86-64 (removed) differ Removed: llvm/trunk/test/Object/TestObjectFiles/trivial.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/TestObjectFiles/trivial.ll?rev=143399&view=auto ============================================================================== --- llvm/trunk/test/Object/TestObjectFiles/trivial.ll (original) +++ llvm/trunk/test/Object/TestObjectFiles/trivial.ll (removed) @@ -1,12 +0,0 @@ - at .str = private unnamed_addr constant [13 x i8] c"Hello World\0A\00", align 1 - -define i32 @main() nounwind { -entry: - %call = tail call i32 @puts(i8* getelementptr inbounds ([13 x i8]* @.str, i32 0, i32 0)) nounwind - tail call void bitcast (void (...)* @SomeOtherFunction to void ()*)() nounwind - ret i32 0 -} - -declare i32 @puts(i8* nocapture) nounwind - -declare void @SomeOtherFunction(...) From tonic at nondot.org Mon Oct 31 18:46:51 2011 From: tonic at nondot.org (Tanya Lattner) Date: Mon, 31 Oct 2011 23:46:51 -0000 Subject: [llvm-commits] [llvm] r143401 - /llvm/trunk/docs/doxygen.cfg.in Message-ID: <20111031234651.3CD262A6C12C@llvm.org> Author: tbrethou Date: Mon Oct 31 18:46:50 2011 New Revision: 143401 URL: http://llvm.org/viewvc/llvm-project?rev=143401&view=rev Log: Reapply r141657. Also revert the change to CREATE_SUBDIRS as this is what caused the CSS to break on the website and generate the much longer URLs. Modified: llvm/trunk/docs/doxygen.cfg.in Modified: llvm/trunk/docs/doxygen.cfg.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/doxygen.cfg.in?rev=143401&r1=143400&r2=143401&view=diff ============================================================================== --- llvm/trunk/docs/doxygen.cfg.in (original) +++ llvm/trunk/docs/doxygen.cfg.in Mon Oct 31 18:46:50 2011 @@ -1,4 +1,4 @@ -# Doxyfile 1.5.6 +# Doxyfile 1.7.1 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project @@ -11,214 +11,219 @@ # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- -# Project related configuration options +# Project related configuration options #--------------------------------------------------------------------------- -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See # http://www.gnu.org/software/libiconv for the list of possible encodings. DOXYFILE_ENCODING = UTF-8 -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = LLVM -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = @PACKAGE_VERSION@ -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = @abs_top_builddir@/docs/doxygen -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. -CREATE_SUBDIRS = YES +CREATE_SUBDIRS = NO -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, -# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, -# Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, -# and Ukrainian. +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. OUTPUT_LANGUAGE = English -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" -ABBREVIATE_BRIEF = +ABBREVIATE_BRIEF = -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = NO -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the # path to strip. STRIP_FROM_PATH = ../.. -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. -STRIP_FROM_INC_PATH = +STRIP_FROM_INC_PATH = -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments # (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = NO -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring # an explicit \brief command for a brief description.) QT_AUTOBRIEF = NO -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO -# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 2 -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. -ALIASES = +ALIASES = -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = NO -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified # scopes will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for # Fortran. OPTIMIZE_FOR_FORTRAN = NO -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for # VHDL. OPTIMIZE_OUTPUT_VHDL = NO -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this +# tag. The format is ext=language, where ext is a file extension, and language +# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, +# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make +# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C +# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions +# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = NO @@ -228,414 +233,459 @@ CPP_CLI_SUPPORT = NO -# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -# Doxygen will parse them like normal C++ but will assume all classes use public +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public # instead of private inheritance when no explicit protection keyword is present. SIP_SUPPORT = NO -# For Microsoft's IDL there are propget and propput attributes to indicate getter -# and setter methods for a property. Setting this option to YES (the default) -# will make doxygen to replace the get and set methods by a property in the -# documentation. This will only work if the methods are indeed getting or -# setting a simple type. If this is not the case, or you want to show the +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen to replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the # methods anyway, you should set this option to NO. IDL_PROPERTY_SUPPORT = YES -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES -# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -# is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically -# be useful for C code in case the coding convention dictates that all compound +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. TYPEDEF_HIDES_STRUCT = NO +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penality. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will rougly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = YES -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO -# If the EXTRACT_STATIC tag is set to YES all static members of a file +# If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = YES -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base -# name of the file that contains the anonymous namespace. By default +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default # anonymous namespace are hidden. EXTRACT_ANON_NSPACES = NO -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen +# will list include files with double quotes in the documentation +# rather than with sharp brackets. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -# hierarchy of group names into alphabetical order. If set to NO (the default) +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen +# will sort the (brief and detailed) documentation of class members so that +# constructors and destructors are listed first. If set to NO (the default) +# the constructors will appear in the respective orders defined by +# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. +# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO +# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) # the group names will appear in their defined order. SORT_GROUP_NAMES = NO -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the +# Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES -# The ENABLED_SECTIONS tag can be used to enable conditional +# The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. -ENABLED_SECTIONS = +ENABLED_SECTIONS = -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = YES # Set the SHOW_FILES tag to NO to disable the generation of the Files page. -# This will remove the Files entry from the Quick Index and from the +# This will remove the Files entry from the Quick Index and from the # Folder Tree View (if specified). The default is YES. SHOW_FILES = YES -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the -# Namespaces page. This will remove the Namespaces entry from the Quick Index +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index # and from the Folder Tree View (if specified). The default is YES. SHOW_NAMESPACES = YES -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. -FILE_VERSION_FILTER = +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. The create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. +# You can optionally specify a file name after the option, if omitted +# DoxygenLayout.xml will be used as the name of the layout file. + +LAYOUT_FILE = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- -# The QUIET tag can be used to turn on/off the messages that are generated +# The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = NO -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = NO -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) -WARN_FORMAT = +WARN_FORMAT = -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written # to stderr. -WARN_LOGFILE = +WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = @abs_top_srcdir@/include \ @abs_top_srcdir@/lib \ @abs_top_srcdir@/docs/doxygen.intro -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for # the list of possible encodings. INPUT_ENCODING = UTF-8 -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 -FILE_PATTERNS = +FILE_PATTERNS = -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = YES -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. -EXCLUDE = +EXCLUDE = -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* -EXCLUDE_PATTERNS = +EXCLUDE_PATTERNS = -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test -EXCLUDE_SYMBOLS = +EXCLUDE_SYMBOLS = -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = @abs_top_srcdir@/examples -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left # blank all files are included. -EXAMPLE_PATTERNS = +EXAMPLE_PATTERNS = -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = YES -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = @abs_top_srcdir@/docs/img -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be # ignored. -INPUT_FILTER = +INPUT_FILTER = -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER # is applied to all files. -FILTER_PATTERNS = +FILTER_PATTERNS = -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO @@ -644,32 +694,32 @@ # configuration options related to source browsing #--------------------------------------------------------------------------- -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = YES -# Setting the INLINE_SOURCES tag to YES will include the body +# Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = NO -# If the REFERENCED_BY_RELATION tag is set to YES -# then for each documented function all documented +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES -# If the REFERENCES_RELATION tag is set to YES -# then for each documented function all documented entities +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES @@ -677,20 +727,21 @@ # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. Otherwise they will link to the documentstion. +# link to the source code. +# Otherwise they will link to the documentation. REFERENCES_LINK_SOURCE = YES -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES @@ -699,21 +750,21 @@ # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = YES -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 4 -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = llvm:: @@ -722,106 +773,149 @@ # configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a # standard header. HTML_HEADER = @abs_top_srcdir@/docs/doxygen.header -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = @abs_top_srcdir@/docs/doxygen.footer -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = @abs_top_srcdir@/docs/doxygen.css -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. +# Doxygen will adjust the colors in the stylesheet and background images +# according to this color. Hue is specified as an angle on a colorwheel, +# see http://en.wikipedia.org/wiki/Hue for more information. +# For instance the value 0 represents red, 60 is yellow, 120 is green, +# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. +# The allowed range is 0 to 359. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of +# the colors in the HTML output. For a value of 0 the output will use +# grayscales only. A value of 255 will produce the most vivid colors. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to +# the luminance component of the colors in the HTML output. Values below +# 100 gradually make the output lighter, whereas values above 100 make +# the output darker. The value divided by 100 is the actual gamma applied, +# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, +# and 100 does not change the gamma. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting +# this to NO can help when comparing the output of multiple runs. + +HTML_TIMESTAMP = YES + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) -# of the generated HTML documentation. +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). -GENERATE_HTMLHELP = NO +HTML_DYNAMIC_SECTIONS = NO -# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OSX 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find # it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. GENERATE_DOCSET = NO -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# feed. A documentation feed provides an umbrella under which multiple -# documentation sets from a single provider (such as a company or product suite) +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) # can be grouped. DOCSET_FEEDNAME = "Doxygen generated docs" -# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -# should uniquely identify the documentation set bundle. This should be a -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen # will append .docset to the name. DOCSET_BUNDLE_ID = org.doxygen.Project -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. For this to work a browser that supports -# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox -# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). +# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. -HTML_DYNAMIC_SECTIONS = NO +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be # written to the html output directory. -CHM_FILE = +CHM_FILE = -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. -HHC_LOCATION = +HHC_LOCATION = -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO @@ -830,203 +924,314 @@ # is used to encode HtmlHelp index (hhk), content (hhc) and project file # content. -CHM_INDEX_ENCODING = +CHM_INDEX_ENCODING = -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO -# The TOC_EXPAND flag can be set to YES to add extra items for group members +# The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated +# that can be used as input for Qt's qhelpgenerator to generate a +# Qt Compressed Help (.qch) of the generated HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to +# add. For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see +# +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's +# filter section matches. +# +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files +# will be generated, which together with the HTML files, form an Eclipse help +# plugin. To install this plugin and make it available under the help contents +# menu in Eclipse, the contents of the directory containing the HTML and XML +# files needs to be copied into the plugins directory of eclipse. The name of +# the directory within the plugins directory should be the same as +# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before +# the help appears. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have +# this name. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO -# This tag can be used to set the number of enum values (range [1..20]) +# This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. -# If the tag value is set to FRAME, a side panel will be generated -# containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. Other possible values -# for this tag are: HIERARCHIES, which will generate the Groups, Directories, -# and Class Hiererachy pages using a tree view instead of an ordered list; -# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which -# disables this behavior completely. For backwards compatibility with previous -# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE -# respectively. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. GENERATE_TREEVIEW = NO -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 -# Use this tag to change the font size of Latex formulas included -# as images in the HTML documentation. The default is 10. Note that -# when you change the font size after a successful doxygen run you need -# to manually remove any form_*.png images from the HTML output directory +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open +# links to external symbols imported via tag files in a separate window. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory # to force them to be regenerated. FORMULA_FONTSIZE = 10 +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are +# not supported properly for IE 6.0, but are supported on all modern browsers. +# Note that when changing this option you need to delete any form_*.png files +# in the HTML output before the changes have effect. + +FORMULA_TRANSPARENT = YES + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box +# for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using +# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets +# (GENERATE_DOCSET) there is already a search function so this one should +# typically be disabled. For large projects the javascript based search engine +# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. + +SEARCHENGINE = NO + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a PHP enabled web server instead of at the web client +# using Javascript. Doxygen will generate the search PHP script and index +# file to put on the web server. The advantage of the server +# based approach is that it scales better to large projects and allows +# full text search. The disadvances is that it is more difficult to setup +# and does not have live searching capabilities. + +SERVER_BASED_SEARCH = NO + #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = NO -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. -LATEX_OUTPUT = +LATEX_OUTPUT = -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. +# Note that when enabling USE_PDFLATEX this option is only used for +# generating bitmaps for formulas in the HTML output, but not in the +# Makefile that is written to the output directory. LATEX_CMD_NAME = latex -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = letter -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. -EXTRA_PACKAGES = +EXTRA_PACKAGES = -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! -LATEX_HEADER = +LATEX_HEADER = -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO +# If LATEX_SOURCE_CODE is set to YES then doxygen will include +# source code with syntax highlighting in the LaTeX output. +# Note that which sources are shown also depends on other settings +# such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. -RTF_OUTPUT = +RTF_OUTPUT = -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. -RTF_STYLESHEET_FILE = +RTF_STYLESHEET_FILE = -# Set optional variables used in the generation of an rtf document. +# Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. -RTF_EXTENSIONS_FILE = +RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. -MAN_OUTPUT = +MAN_OUTPUT = -# The MAN_EXTENSION tag determines the extension that is added to +# The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) -MAN_EXTENSION = +MAN_EXTENSION = -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO @@ -1035,33 +1240,33 @@ # configuration options related to the XML output #--------------------------------------------------------------------------- -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the # syntax of the XML files. -XML_SCHEMA = +XML_SCHEMA = -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the # syntax of the XML files. -XML_DTD = +XML_DTD = -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES @@ -1070,10 +1275,10 @@ # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO @@ -1082,338 +1287,346 @@ # configuration options related to the Perl module output #--------------------------------------------------------------------------- -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. -PERLMOD_MAKEVAR_PREFIX = +PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- -# Configuration options related to the preprocessor +# Configuration options related to the preprocessor #--------------------------------------------------------------------------- -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = ../include -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. -INCLUDE_FILE_PATTERNS = +INCLUDE_FILE_PATTERNS = -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator # instead of the = operator. -PREDEFINED = +PREDEFINED = -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. -EXPAND_AS_DEFINED = +EXPAND_AS_DEFINED = -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- -# Configuration::additions related to external references +# Configuration::additions related to external references #--------------------------------------------------------------------------- -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen +# If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. -TAGFILES = +TAGFILES = -# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. -GENERATE_TAGFILE = +GENERATE_TAGFILE = -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = YES -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES -# The PERL_PATH should be the absolute path and name of the perl script +# The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). -PERL_PATH = +PERL_PATH = #--------------------------------------------------------------------------- -# Configuration options related to the dot tool +# Configuration options related to the dot tool #--------------------------------------------------------------------------- -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more # powerful graphs. CLASS_DIAGRAMS = YES -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see -# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. -MSCGEN_PATH = +MSCGEN_PATH = -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = NO -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = YES -# By default doxygen will write a font called FreeSans.ttf to the output -# directory and reference it in all dot files that doxygen generates. This -# font does not include all possible unicode characters however, so when you need -# these (or just want a differently looking font) you can specify the font name -# using DOT_FONTNAME. You need need to make sure dot is able to find the font, -# which can be done by putting it in a standard location or by setting the -# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is +# allowed to run in parallel. When set to 0 (the default) doxygen will +# base this on the number of processors available in the system. You can set it +# explicitly to a value larger than 0 to get control over the balance +# between CPU load and processing speed. + +DOT_NUM_THREADS = 0 + +# By default doxygen will write a font called FreeSans.ttf to the output +# directory and reference it in all dot files that doxygen generates. This +# font does not include all possible unicode characters however, so when you need +# these (or just want a differently looking font) you can specify the font name +# using DOT_FONTNAME. You need need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory # containing the font. DOT_FONTNAME = FreeSans -# By default doxygen will tell dot to use the output directory to look for the -# FreeSans.ttf font (which doxygen will put there itself). If you specify a -# different font using DOT_FONTNAME you can set the path where dot +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot # can find it using this tag. -DOT_FONTPATH = +DOT_FONTPATH = -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO -# If set to YES, the inheritance and collaboration graphs will show the +# If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = YES -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES -# If the CALL_GRAPH and HAVE_DOT options are set to YES then -# doxygen will generate a call dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable call graphs +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs # for selected functions only using the \callgraph command. CALL_GRAPH = NO -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then -# doxygen will generate a caller dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable caller +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller # graphs for selected functions only using the \callergraph command. CALLER_GRAPH = NO -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png -# The tag DOT_PATH can be used to specify the path where the dot tool can be +# The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = @DOT@ -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the # \dotfile command). -DOTFILE_DIRS = +DOTFILE_DIRS = -# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of -# nodes that will be shown in the graph. If the number of nodes in a graph -# becomes larger than this value, doxygen will truncate the graph, which is -# visualized by representing a node as a red box. Note that doxygen if the -# number of direct children of the root node in a graph is already larger than -# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. DOT_GRAPH_MAX_NODES = 50 -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that the size of a graph can be further restricted by +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. MAX_DOT_GRAPH_DEPTH = 0 -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is enabled by default, which results in a transparent -# background. Warning: Depending on the platform used, enabling this option -# may lead to badly anti-aliased labels on the edges of a graph (i.e. they -# become hard to read). +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). DOT_TRANSPARENT = YES -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO From matthewbg at google.com Mon Oct 31 18:56:53 2011 From: matthewbg at google.com (Matt Beaumont-Gay) Date: Mon, 31 Oct 2011 23:56:53 -0000 Subject: [llvm-commits] [llvm] r143404 - in /llvm/trunk/test/Object: nm-archive.test nm-trivial-object.test objdump-disassembly-inline-relocations.test objdump-file-header.test objdump-relocations.test objdump-section-content.test objdump-sectionheaders.test objdump-symbol-table.test objdump-trivial-object.test Message-ID: <20111031235653.951F53524002@llvm.org> Author: matthewbg Date: Mon Oct 31 18:56:52 2011 New Revision: 143404 URL: http://llvm.org/viewvc/llvm-project?rev=143404&view=rev Log: Change the actual tests to match the input directory rename (duh) Modified: llvm/trunk/test/Object/nm-archive.test llvm/trunk/test/Object/nm-trivial-object.test llvm/trunk/test/Object/objdump-disassembly-inline-relocations.test llvm/trunk/test/Object/objdump-file-header.test llvm/trunk/test/Object/objdump-relocations.test llvm/trunk/test/Object/objdump-section-content.test llvm/trunk/test/Object/objdump-sectionheaders.test llvm/trunk/test/Object/objdump-symbol-table.test llvm/trunk/test/Object/objdump-trivial-object.test Modified: llvm/trunk/test/Object/nm-archive.test URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/nm-archive.test?rev=143404&r1=143403&r2=143404&view=diff ============================================================================== --- llvm/trunk/test/Object/nm-archive.test (original) +++ llvm/trunk/test/Object/nm-archive.test Mon Oct 31 18:56:52 2011 @@ -1,6 +1,6 @@ -RUN: llvm-nm %p/TestObjectFiles/archive-test.a-coff-i386 \ +RUN: llvm-nm %p/Inputs/archive-test.a-coff-i386 \ RUN: | FileCheck %s -check-prefix COFF -RUN: llvm-as %p/TestObjectFiles/trivial.ll -o=%t1 +RUN: llvm-as %p/Inputs/trivial.ll -o=%t1 RUN: llvm-ar rcs %t2 %t1 RUN: llvm-nm %t2 | FileCheck %s -check-prefix BITCODE Modified: llvm/trunk/test/Object/nm-trivial-object.test URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/nm-trivial-object.test?rev=143404&r1=143403&r2=143404&view=diff ============================================================================== --- llvm/trunk/test/Object/nm-trivial-object.test (original) +++ llvm/trunk/test/Object/nm-trivial-object.test Mon Oct 31 18:56:52 2011 @@ -1,10 +1,10 @@ -RUN: llvm-nm %p/TestObjectFiles/trivial-object-test.coff-i386 \ +RUN: llvm-nm %p/Inputs/trivial-object-test.coff-i386 \ RUN: | FileCheck %s -check-prefix COFF -RUN: llvm-nm %p/TestObjectFiles/trivial-object-test.coff-x86-64 \ +RUN: llvm-nm %p/Inputs/trivial-object-test.coff-x86-64 \ RUN: | FileCheck %s -check-prefix COFF -RUN: llvm-nm %p/TestObjectFiles/trivial-object-test.elf-i386 \ +RUN: llvm-nm %p/Inputs/trivial-object-test.elf-i386 \ RUN: | FileCheck %s -check-prefix ELF -RUN: llvm-nm %p/TestObjectFiles/trivial-object-test.elf-x86-64 \ +RUN: llvm-nm %p/Inputs/trivial-object-test.elf-x86-64 \ RUN: | FileCheck %s -check-prefix ELF COFF: 00000000 d .data Modified: llvm/trunk/test/Object/objdump-disassembly-inline-relocations.test URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/objdump-disassembly-inline-relocations.test?rev=143404&r1=143403&r2=143404&view=diff ============================================================================== --- llvm/trunk/test/Object/objdump-disassembly-inline-relocations.test (original) +++ llvm/trunk/test/Object/objdump-disassembly-inline-relocations.test Mon Oct 31 18:56:52 2011 @@ -1,6 +1,6 @@ -RUN: llvm-objdump -d -r %p/TestObjectFiles/trivial-object-test.coff-i386 \ +RUN: llvm-objdump -d -r %p/Inputs/trivial-object-test.coff-i386 \ RUN: | FileCheck %s -check-prefix COFF-i386 -RUN: llvm-objdump -d -r %p/TestObjectFiles/trivial-object-test.coff-x86-64 \ +RUN: llvm-objdump -d -r %p/Inputs/trivial-object-test.coff-x86-64 \ RUN: | FileCheck %s -check-prefix COFF-x86-64 COFF-i386: file format COFF-i386 Modified: llvm/trunk/test/Object/objdump-file-header.test URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/objdump-file-header.test?rev=143404&r1=143403&r2=143404&view=diff ============================================================================== --- llvm/trunk/test/Object/objdump-file-header.test (original) +++ llvm/trunk/test/Object/objdump-file-header.test Mon Oct 31 18:56:52 2011 @@ -1,6 +1,6 @@ -RUN: llvm-objdump -f %p/TestObjectFiles/trivial-object-test.coff-i386 \ +RUN: llvm-objdump -f %p/Inputs/trivial-object-test.coff-i386 \ RUN: | FileCheck %s -check-prefix COFF-i386 -RUN: llvm-objdump -f %p/TestObjectFiles/trivial-object-test.elf-i386 \ +RUN: llvm-objdump -f %p/Inputs/trivial-object-test.elf-i386 \ RUN: | FileCheck %s -check-prefix ELF-i386 XFAIL: * Modified: llvm/trunk/test/Object/objdump-relocations.test URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/objdump-relocations.test?rev=143404&r1=143403&r2=143404&view=diff ============================================================================== --- llvm/trunk/test/Object/objdump-relocations.test (original) +++ llvm/trunk/test/Object/objdump-relocations.test Mon Oct 31 18:56:52 2011 @@ -1,10 +1,10 @@ -RUN: llvm-objdump -r %p/TestObjectFiles/trivial-object-test.coff-i386 \ +RUN: llvm-objdump -r %p/Inputs/trivial-object-test.coff-i386 \ RUN: | FileCheck %s -check-prefix COFF-i386 -RUN: llvm-objdump -r %p/TestObjectFiles/trivial-object-test.coff-x86-64 \ +RUN: llvm-objdump -r %p/Inputs/trivial-object-test.coff-x86-64 \ RUN: | FileCheck %s -check-prefix COFF-x86-64 -RUN: llvm-objdump -r %p/TestObjectFiles/trivial-object-test.elf-i386 \ +RUN: llvm-objdump -r %p/Inputs/trivial-object-test.elf-i386 \ RUN: | FileCheck %s -check-prefix ELF-i386 -RUN: llvm-objdump -r %p/TestObjectFiles/trivial-object-test.elf-x86-64 \ +RUN: llvm-objdump -r %p/Inputs/trivial-object-test.elf-x86-64 \ RUN: | FileCheck %s -check-prefix ELF-x86-64 COFF-i386: .text Modified: llvm/trunk/test/Object/objdump-section-content.test URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/objdump-section-content.test?rev=143404&r1=143403&r2=143404&view=diff ============================================================================== --- llvm/trunk/test/Object/objdump-section-content.test (original) +++ llvm/trunk/test/Object/objdump-section-content.test Mon Oct 31 18:56:52 2011 @@ -1,6 +1,6 @@ -RUN: llvm-objdump -s %p/TestObjectFiles/trivial-object-test.coff-i386 \ +RUN: llvm-objdump -s %p/Inputs/trivial-object-test.coff-i386 \ RUN: | FileCheck %s -check-prefix COFF-i386 -RUN: llvm-objdump -s %p/TestObjectFiles/trivial-object-test.elf-i386 \ +RUN: llvm-objdump -s %p/Inputs/trivial-object-test.elf-i386 \ RUN: | FileCheck %s -check-prefix ELF-i386 COFF-i386: trivial-object-test.coff-i386: file format Modified: llvm/trunk/test/Object/objdump-sectionheaders.test URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/objdump-sectionheaders.test?rev=143404&r1=143403&r2=143404&view=diff ============================================================================== --- llvm/trunk/test/Object/objdump-sectionheaders.test (original) +++ llvm/trunk/test/Object/objdump-sectionheaders.test Mon Oct 31 18:56:52 2011 @@ -1,4 +1,4 @@ -; RUN: llvm-objdump -h %p/TestObjectFiles/trivial-object-test.elf-x86-64 \ +; RUN: llvm-objdump -h %p/Inputs/trivial-object-test.elf-x86-64 \ ; RUN: | FileCheck %s ; To verify this, use readelf -S, not objdump -h. Binutils objdump filters the Modified: llvm/trunk/test/Object/objdump-symbol-table.test URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/objdump-symbol-table.test?rev=143404&r1=143403&r2=143404&view=diff ============================================================================== --- llvm/trunk/test/Object/objdump-symbol-table.test (original) +++ llvm/trunk/test/Object/objdump-symbol-table.test Mon Oct 31 18:56:52 2011 @@ -1,6 +1,6 @@ -RUN: llvm-objdump -t %p/TestObjectFiles/trivial-object-test.coff-i386 \ +RUN: llvm-objdump -t %p/Inputs/trivial-object-test.coff-i386 \ RUN: | FileCheck %s -check-prefix COFF-i386 -RUN: llvm-objdump -t %p/TestObjectFiles/trivial-object-test.elf-i386 \ +RUN: llvm-objdump -t %p/Inputs/trivial-object-test.elf-i386 \ RUN: | FileCheck %s -check-prefix ELF-i386 COFF-i386: trivial-object-test.coff-i386: file format Modified: llvm/trunk/test/Object/objdump-trivial-object.test URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/objdump-trivial-object.test?rev=143404&r1=143403&r2=143404&view=diff ============================================================================== --- llvm/trunk/test/Object/objdump-trivial-object.test (original) +++ llvm/trunk/test/Object/objdump-trivial-object.test Mon Oct 31 18:56:52 2011 @@ -1,10 +1,10 @@ -RUN: llvm-objdump -d %p/TestObjectFiles/trivial-object-test.coff-i386 \ +RUN: llvm-objdump -d %p/Inputs/trivial-object-test.coff-i386 \ RUN: | FileCheck %s -check-prefix COFF-i386 -RUN: llvm-objdump -d %p/TestObjectFiles/trivial-object-test.coff-x86-64 \ +RUN: llvm-objdump -d %p/Inputs/trivial-object-test.coff-x86-64 \ RUN: | FileCheck %s -check-prefix COFF-x86-64 -RUN: llvm-objdump -d %p/TestObjectFiles/trivial-object-test.elf-i386 \ +RUN: llvm-objdump -d %p/Inputs/trivial-object-test.elf-i386 \ RUN: | FileCheck %s -check-prefix ELF-i386 -RUN: llvm-objdump -d %p/TestObjectFiles/trivial-object-test.elf-x86-64 \ +RUN: llvm-objdump -d %p/Inputs/trivial-object-test.elf-x86-64 \ RUN: | FileCheck %s -check-prefix ELF-x86-64 COFF-i386: file format COFF-i386 From dpatel at apple.com Mon Oct 31 18:58:52 2011 From: dpatel at apple.com (Devang Patel) Date: Mon, 31 Oct 2011 23:58:52 -0000 Subject: [llvm-commits] [llvm] r143405 - in /llvm/trunk: include/llvm/Transforms/Utils/ModuleUtils.h lib/Transforms/Utils/CMakeLists.txt lib/Transforms/Utils/ModuleUtils.cpp Message-ID: <20111031235852.51F0E3524002@llvm.org> Author: dpatel Date: Mon Oct 31 18:58:51 2011 New Revision: 143405 URL: http://llvm.org/viewvc/llvm-project?rev=143405&view=rev Log: Add utility to append a function to the list of global constructors. Patch by Kostya Serebryany. Added: llvm/trunk/include/llvm/Transforms/Utils/ModuleUtils.h llvm/trunk/lib/Transforms/Utils/ModuleUtils.cpp Modified: llvm/trunk/lib/Transforms/Utils/CMakeLists.txt Added: llvm/trunk/include/llvm/Transforms/Utils/ModuleUtils.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Utils/ModuleUtils.h?rev=143405&view=auto ============================================================================== --- llvm/trunk/include/llvm/Transforms/Utils/ModuleUtils.h (added) +++ llvm/trunk/include/llvm/Transforms/Utils/ModuleUtils.h Mon Oct 31 18:58:51 2011 @@ -0,0 +1,30 @@ +//===-- ModuleUtils.h - Functions to manipulate Modules ---------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This family of functions perform manipulations on Modules. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_TRANSFORMS_UTILS_MODULE_UTILS_H +#define LLVM_TRANSFORMS_UTILS_MODULE_UTILS_H + +namespace llvm { + +class Module; +class Function; + +/// Append F to the list of global ctors of module M with the given Priority. +/// This wraps the function in the appropriate structure and stores it along +/// side other global constructors. For details see +/// http://llvm.org/docs/LangRef.html#intg_global_ctors +void appendToGlobalCtors(Module &M, Function *F, int Priority); + +} // End llvm namespace + +#endif // LLVM_TRANSFORMS_UTILS_MODULE_UTILS_H Modified: llvm/trunk/lib/Transforms/Utils/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/CMakeLists.txt?rev=143405&r1=143404&r2=143405&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Utils/CMakeLists.txt (original) +++ llvm/trunk/lib/Transforms/Utils/CMakeLists.txt Mon Oct 31 18:58:51 2011 @@ -18,6 +18,7 @@ LowerInvoke.cpp LowerSwitch.cpp Mem2Reg.cpp + ModuleUtils.cpp PromoteMemoryToRegister.cpp SSAUpdater.cpp SimplifyCFG.cpp Added: llvm/trunk/lib/Transforms/Utils/ModuleUtils.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/ModuleUtils.cpp?rev=143405&view=auto ============================================================================== --- llvm/trunk/lib/Transforms/Utils/ModuleUtils.cpp (added) +++ llvm/trunk/lib/Transforms/Utils/ModuleUtils.cpp Mon Oct 31 18:58:51 2011 @@ -0,0 +1,55 @@ +//===-- ModuleUtils.cpp - Functions to manipulate Modules -----------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This family of functions perform manipulations on Modules. +// +//===----------------------------------------------------------------------===// + +#include "llvm/Transforms/Utils/ModuleUtils.h" +#include "llvm/DerivedTypes.h" +#include "llvm/Function.h" +#include "llvm/Module.h" +#include "llvm/Support/IRBuilder.h" +using namespace llvm; + +void llvm::appendToGlobalCtors(Module &M, Function *F, int Priority) { + IRBuilder<> IRB(M.getContext()); + FunctionType *FnTy = FunctionType::get(IRB.getVoidTy(), false); + StructType *Ty = StructType::get( + IRB.getInt32Ty(), PointerType::getUnqual(FnTy), NULL); + + Constant *RuntimeCtorInit = ConstantStruct::get( + Ty, IRB.getInt32(Priority), F, NULL); + + // Get the current set of static global constructors and add the new ctor + // to the list. + SmallVector CurrentCtors; + if (GlobalVariable * GVCtor = M.getNamedGlobal("llvm.global_ctors")) { + if (Constant *Init = GVCtor->getInitializer()) { + unsigned n = Init->getNumOperands(); + CurrentCtors.reserve(n + 1); + for (unsigned i = 0; i != n; ++i) + CurrentCtors.push_back(cast(Init->getOperand(i))); + } + GVCtor->eraseFromParent(); + } + + CurrentCtors.push_back(RuntimeCtorInit); + + // Create a new initializer. + ArrayType *AT = ArrayType::get(RuntimeCtorInit->getType(), + CurrentCtors.size()); + Constant *NewInit = ConstantArray::get(AT, CurrentCtors); + + // Create the new global variable and replace all uses of + // the old global variable with the new one. + (void)new GlobalVariable(M, NewInit->getType(), false, + GlobalValue::AppendingLinkage, NewInit, + "llvm.global_ctors"); +} From dpatel at apple.com Mon Oct 31 19:01:29 2011 From: dpatel at apple.com (Devang Patel) Date: Mon, 31 Oct 2011 17:01:29 -0700 Subject: [llvm-commits] appendToGlobalCtors In-Reply-To: References: Message-ID: On Oct 29, 2011, at 9:39 AM, Kostya Serebryany wrote: > Done both, new patch attached. > http://codereview.appspot.com/5330046 > Applied. r143405 Thanks! - Devang > --kcc > > On Fri, Oct 28, 2011 at 10:38 PM, Chris Lattner wrote: > > On Oct 28, 2011, at 1:41 PM, Kostya Serebryany wrote: > >> Hello, >> >> I would like to add a small utility function into llvm/Transforms/Utils. >> appendToGlobalCtors() adds a function to the list of global constructors. >> Currently it is used by AddressSanitizer; clattner suggested to move it to llvm/Transforms/Utils. >> >> Patch: http://codereview.appspot.com/5330046 (also in attachment). > > Great! Thanks for working on this, a few couple minor requests: > > +//===-- GlobalCtors.h - Functions to manipulate global ctors ----*- C++ -*-===// > > Transforms/Utils is kind of a mess, but I think it would be better to put this in a "ModuleUtils.h" file, which would be more general. The logic in GlobalOpt.cpp for manipulating llvm.global_ctors should be moved here eventually as well. > > > + GVCtor->setName("removed"); > + GVCtor->eraseFromParent(); > > No need for the setName call before eraseFromParent. > > Otherwise, looks great! > > -Chris > > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111031/c4c5cd22/attachment.html From eli.friedman at gmail.com Mon Oct 31 18:59:22 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Mon, 31 Oct 2011 23:59:22 -0000 Subject: [llvm-commits] [llvm] r143406 - /llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp Message-ID: <20111031235922.EDF723524002@llvm.org> Author: efriedma Date: Mon Oct 31 18:59:22 2011 New Revision: 143406 URL: http://llvm.org/viewvc/llvm-project?rev=143406&view=rev Log: Add support for new atomics to cpp backend. Misc other fixes while I'm here. PR11268. 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=143406&r1=143405&r2=143406&view=diff ============================================================================== --- llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp (original) +++ llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp Mon Oct 31 18:59:22 2011 @@ -1016,6 +1016,27 @@ return result; } +static StringRef ConvertAtomicOrdering(AtomicOrdering Ordering) { + switch (Ordering) { + case NotAtomic: return "NotAtomic"; + case Unordered: return "Unordered"; + case Monotonic: return "Monotonic"; + case Acquire: return "Acquire"; + case Release: return "Release"; + case AcquireRelease: return "AcquireRelease"; + case SequentiallyConsistent: return "SequentiallyConsistent"; + } + llvm_unreachable("Unknown ordering"); +} + +static StringRef ConvertAtomicSynchScope(SynchronizationScope SynchScope) { + switch (SynchScope) { + case SingleThread: return "SingleThread"; + case CrossThread: return "CrossThread"; + } + llvm_unreachable("Unknown synch scope"); +} + // printInstruction - This member is called for each Instruction in a function. void CppWriter::printInstruction(const Instruction *I, const std::string& bbname) { @@ -1237,15 +1258,33 @@ printEscapedString(load->getName()); Out << "\", " << (load->isVolatile() ? "true" : "false" ) << ", " << bbname << ");"; + if (load->getAlignment()) + nl(Out) << iName << "->setAlignment(" + << load->getAlignment() << ");"; + if (load->isAtomic()) { + StringRef Ordering = ConvertAtomicOrdering(load->getOrdering()); + StringRef CrossThread = ConvertAtomicSynchScope(load->getSynchScope()); + nl(Out) << iName << "->setAtomic(" + << Ordering << ", " << CrossThread << ");"; + } break; } case Instruction::Store: { const StoreInst* store = cast(I); - Out << " new StoreInst(" + Out << "StoreInst* " << iName << " = new StoreInst(" << opNames[0] << ", " << opNames[1] << ", " << (store->isVolatile() ? "true" : "false") << ", " << bbname << ");"; + if (store->getAlignment()) + nl(Out) << iName << "->setAlignment(" + << store->getAlignment() << ");"; + if (store->isAtomic()) { + StringRef Ordering = ConvertAtomicOrdering(store->getOrdering()); + StringRef CrossThread = ConvertAtomicSynchScope(store->getSynchScope()); + nl(Out) << iName << "->setAtomic(" + << Ordering << ", " << CrossThread << ");"; + } break; } case Instruction::GetElementPtr: { @@ -1447,6 +1486,60 @@ Out << "\", " << bbname << ");"; break; } + case Instruction::Fence: { + const FenceInst *fi = cast(I); + StringRef Ordering = ConvertAtomicOrdering(fi->getOrdering()); + StringRef CrossThread = ConvertAtomicSynchScope(fi->getSynchScope()); + Out << "FenceInst* " << iName + << " = new FenceInst(mod->getContext(), " + << Ordering << ", " << CrossThread + << ");"; + break; + } + case Instruction::AtomicCmpXchg: { + const AtomicCmpXchgInst *cxi = cast(I); + StringRef Ordering = ConvertAtomicOrdering(cxi->getOrdering()); + StringRef CrossThread = ConvertAtomicSynchScope(cxi->getSynchScope()); + Out << "AtomicCmpXchgInst* " << iName + << " = new AtomicCmpXchgInst(" + << opNames[0] << ", " << opNames[1] << ", " << opNames[2] << ", " + << Ordering << ", " << CrossThread + << ");"; + nl(Out) << iName << "->setName(\""; + printEscapedString(cxi->getName()); + Out << "\");"; + break; + } + case Instruction::AtomicRMW: { + const AtomicRMWInst *rmwi = cast(I); + StringRef Ordering = ConvertAtomicOrdering(rmwi->getOrdering()); + StringRef CrossThread = ConvertAtomicSynchScope(rmwi->getSynchScope()); + StringRef Operation; + switch (rmwi->getOperation()) { + case AtomicRMWInst::Xchg: Operation = "AtomicRMWInst::Xchg"; break; + case AtomicRMWInst::Add: Operation = "AtomicRMWInst::Add"; break; + case AtomicRMWInst::Sub: Operation = "AtomicRMWInst::Sub"; break; + case AtomicRMWInst::And: Operation = "AtomicRMWInst::And"; break; + case AtomicRMWInst::Nand: Operation = "AtomicRMWInst::Nand"; break; + case AtomicRMWInst::Or: Operation = "AtomicRMWInst::Or"; break; + case AtomicRMWInst::Xor: Operation = "AtomicRMWInst::Xor"; break; + case AtomicRMWInst::Max: Operation = "AtomicRMWInst::Max"; break; + case AtomicRMWInst::Min: Operation = "AtomicRMWInst::Min"; break; + case AtomicRMWInst::UMax: Operation = "AtomicRMWInst::UMax"; break; + case AtomicRMWInst::UMin: Operation = "AtomicRMWInst::UMin"; break; + case AtomicRMWInst::BAD_BINOP: llvm_unreachable("Bad atomic operation"); + } + Out << "AtomicRMWInst* " << iName + << " = new AtomicRMWInst(" + << Operation << ", " + << opNames[0] << ", " << opNames[1] << ", " + << Ordering << ", " << CrossThread + << ");"; + nl(Out) << iName << "->setName(\""; + printEscapedString(rmwi->getName()); + Out << "\");"; + break; + } } DefinedValues.insert(I); nl(Out); @@ -1623,7 +1716,9 @@ Out << "Value* " << getCppName(AI) << " = args++;"; nl(Out); if (AI->hasName()) { - Out << getCppName(AI) << "->setName(\"" << AI->getName() << "\");"; + Out << getCppName(AI) << "->setName(\""; + printEscapedString(AI->getName()); + Out << "\");"; nl(Out); } } From stoklund at 2pi.dk Mon Oct 31 19:02:31 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Tue, 01 Nov 2011 00:02:31 -0000 Subject: [llvm-commits] [llvm] r143407 - /llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp Message-ID: <20111101000231.972093524002@llvm.org> Author: stoklund Date: Mon Oct 31 19:02:31 2011 New Revision: 143407 URL: http://llvm.org/viewvc/llvm-project?rev=143407&view=rev Log: Update split candidate correctly when interference cache is full. No test case, spotted by inspection. Modified: llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp Modified: llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp?rev=143407&r1=143406&r2=143407&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp (original) +++ llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp Mon Oct 31 19:02:31 2011 @@ -1118,6 +1118,8 @@ } --NumCands; GlobalCand[Worst] = GlobalCand[NumCands]; + if (BestCand == NumCands) + BestCand = Worst; } if (GlobalCand.size() <= NumCands) From eli.friedman at gmail.com Mon Oct 31 19:32:23 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Mon, 31 Oct 2011 17:32:23 -0700 Subject: [llvm-commits] [llvm] r143406 - /llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp In-Reply-To: <20111031235922.EDF723524002@llvm.org> References: <20111031235922.EDF723524002@llvm.org> Message-ID: On Mon, Oct 31, 2011 at 4:59 PM, Eli Friedman wrote: > Author: efriedma > Date: Mon Oct 31 18:59:22 2011 > New Revision: 143406 > > URL: http://llvm.org/viewvc/llvm-project?rev=143406&view=rev > Log: > Add support for new atomics to cpp backend. ?Misc other fixes while I'm here. ?PR11268. Please take this for 3.0. -Eli > > 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=143406&r1=143405&r2=143406&view=diff > ============================================================================== > --- llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp (original) > +++ llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp Mon Oct 31 18:59:22 2011 > @@ -1016,6 +1016,27 @@ > ? return result; > ?} > > +static StringRef ConvertAtomicOrdering(AtomicOrdering Ordering) { > + ?switch (Ordering) { > + ? ?case NotAtomic: return "NotAtomic"; > + ? ?case Unordered: return "Unordered"; > + ? ?case Monotonic: return "Monotonic"; > + ? ?case Acquire: return "Acquire"; > + ? ?case Release: return "Release"; > + ? ?case AcquireRelease: return "AcquireRelease"; > + ? ?case SequentiallyConsistent: return "SequentiallyConsistent"; > + ?} > + ?llvm_unreachable("Unknown ordering"); > +} > + > +static StringRef ConvertAtomicSynchScope(SynchronizationScope SynchScope) { > + ?switch (SynchScope) { > + ? ?case SingleThread: return "SingleThread"; > + ? ?case CrossThread: return "CrossThread"; > + ?} > + ?llvm_unreachable("Unknown synch scope"); > +} > + > ?// printInstruction - This member is called for each Instruction in a function. > ?void CppWriter::printInstruction(const Instruction *I, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?const std::string& bbname) { > @@ -1237,15 +1258,33 @@ > ? ? printEscapedString(load->getName()); > ? ? Out << "\", " << (load->isVolatile() ? "true" : "false" ) > ? ? ? ? << ", " << bbname << ");"; > + ? ?if (load->getAlignment()) > + ? ? ?nl(Out) << iName << "->setAlignment(" > + ? ? ? ? ? ? ?<< load->getAlignment() << ");"; > + ? ?if (load->isAtomic()) { > + ? ? ?StringRef Ordering = ConvertAtomicOrdering(load->getOrdering()); > + ? ? ?StringRef CrossThread = ConvertAtomicSynchScope(load->getSynchScope()); > + ? ? ?nl(Out) << iName << "->setAtomic(" > + ? ? ? ? ? ? ?<< Ordering << ", " << CrossThread << ");"; > + ? ?} > ? ? break; > ? } > ? case Instruction::Store: { > ? ? const StoreInst* store = cast(I); > - ? ?Out << " new StoreInst(" > + ? ?Out << "StoreInst* " << iName << " = new StoreInst(" > ? ? ? ? << opNames[0] << ", " > ? ? ? ? << opNames[1] << ", " > ? ? ? ? << (store->isVolatile() ? "true" : "false") > ? ? ? ? << ", " << bbname << ");"; > + ? ?if (store->getAlignment()) > + ? ? ?nl(Out) << iName << "->setAlignment(" > + ? ? ? ? ? ? ?<< store->getAlignment() << ");"; > + ? ?if (store->isAtomic()) { > + ? ? ?StringRef Ordering = ConvertAtomicOrdering(store->getOrdering()); > + ? ? ?StringRef CrossThread = ConvertAtomicSynchScope(store->getSynchScope()); > + ? ? ?nl(Out) << iName << "->setAtomic(" > + ? ? ? ? ? ? ?<< Ordering << ", " << CrossThread << ");"; > + ? ?} > ? ? break; > ? } > ? case Instruction::GetElementPtr: { > @@ -1447,6 +1486,60 @@ > ? ? Out << "\", " << bbname << ");"; > ? ? break; > ? } > + ?case Instruction::Fence: { > + ? ?const FenceInst *fi = cast(I); > + ? ?StringRef Ordering = ConvertAtomicOrdering(fi->getOrdering()); > + ? ?StringRef CrossThread = ConvertAtomicSynchScope(fi->getSynchScope()); > + ? ?Out << "FenceInst* " << iName > + ? ? ? ?<< " = new FenceInst(mod->getContext(), " > + ? ? ? ?<< Ordering << ", " << CrossThread > + ? ? ? ?<< ");"; > + ? ?break; > + ?} > + ?case Instruction::AtomicCmpXchg: { > + ? ?const AtomicCmpXchgInst *cxi = cast(I); > + ? ?StringRef Ordering = ConvertAtomicOrdering(cxi->getOrdering()); > + ? ?StringRef CrossThread = ConvertAtomicSynchScope(cxi->getSynchScope()); > + ? ?Out << "AtomicCmpXchgInst* " << iName > + ? ? ? ?<< " = new AtomicCmpXchgInst(" > + ? ? ? ?<< opNames[0] << ", " << opNames[1] << ", " << opNames[2] << ", " > + ? ? ? ?<< Ordering << ", " << CrossThread > + ? ? ? ?<< ");"; > + ? ?nl(Out) << iName << "->setName(\""; > + ? ?printEscapedString(cxi->getName()); > + ? ?Out << "\");"; > + ? ?break; > + ?} > + ?case Instruction::AtomicRMW: { > + ? ?const AtomicRMWInst *rmwi = cast(I); > + ? ?StringRef Ordering = ConvertAtomicOrdering(rmwi->getOrdering()); > + ? ?StringRef CrossThread = ConvertAtomicSynchScope(rmwi->getSynchScope()); > + ? ?StringRef Operation; > + ? ?switch (rmwi->getOperation()) { > + ? ? ?case AtomicRMWInst::Xchg: Operation = "AtomicRMWInst::Xchg"; break; > + ? ? ?case AtomicRMWInst::Add: ?Operation = "AtomicRMWInst::Add"; break; > + ? ? ?case AtomicRMWInst::Sub: ?Operation = "AtomicRMWInst::Sub"; break; > + ? ? ?case AtomicRMWInst::And: ?Operation = "AtomicRMWInst::And"; break; > + ? ? ?case AtomicRMWInst::Nand: Operation = "AtomicRMWInst::Nand"; break; > + ? ? ?case AtomicRMWInst::Or: ? Operation = "AtomicRMWInst::Or"; break; > + ? ? ?case AtomicRMWInst::Xor: ?Operation = "AtomicRMWInst::Xor"; break; > + ? ? ?case AtomicRMWInst::Max: ?Operation = "AtomicRMWInst::Max"; break; > + ? ? ?case AtomicRMWInst::Min: ?Operation = "AtomicRMWInst::Min"; break; > + ? ? ?case AtomicRMWInst::UMax: Operation = "AtomicRMWInst::UMax"; break; > + ? ? ?case AtomicRMWInst::UMin: Operation = "AtomicRMWInst::UMin"; break; > + ? ? ?case AtomicRMWInst::BAD_BINOP: llvm_unreachable("Bad atomic operation"); > + ? ?} > + ? ?Out << "AtomicRMWInst* " << iName > + ? ? ? ?<< " = new AtomicRMWInst(" > + ? ? ? ?<< Operation << ", " > + ? ? ? ?<< opNames[0] << ", " << opNames[1] << ", " > + ? ? ? ?<< Ordering << ", " << CrossThread > + ? ? ? ?<< ");"; > + ? ?nl(Out) << iName << "->setName(\""; > + ? ?printEscapedString(rmwi->getName()); > + ? ?Out << "\");"; > + ? ?break; > + ?} > ? } > ? DefinedValues.insert(I); > ? nl(Out); > @@ -1623,7 +1716,9 @@ > ? ? ? Out << "Value* " << getCppName(AI) << " = args++;"; > ? ? ? nl(Out); > ? ? ? if (AI->hasName()) { > - ? ? ? ?Out << getCppName(AI) << "->setName(\"" << AI->getName() << "\");"; > + ? ? ? ?Out << getCppName(AI) << "->setName(\""; > + ? ? ? ?printEscapedString(AI->getName()); > + ? ? ? ?Out << "\");"; > ? ? ? ? nl(Out); > ? ? ? } > ? ? } > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > From hfinkel at anl.gov Mon Oct 31 19:50:33 2011 From: hfinkel at anl.gov (Hal Finkel) Date: Mon, 31 Oct 2011 19:50:33 -0500 Subject: [llvm-commits] [PATCH] BasicBlock Autovectorization Pass In-Reply-To: <1319928991.23036.957.camel@sapling> References: <1319909412.23036.851.camel@sapling> <1319914924.23036.852.camel@sapling> <1319919418.23036.881.camel@sapling> <1319928991.23036.957.camel@sapling> Message-ID: <1320108633.23036.1266.camel@sapling> I've attached the latest version of my autovectorization patch. This version is significantly faster (in compile time) than the version I posted a couple of days ago, and generally produces better output. At this point, next steps in enhancing the vectorization include: 1. Add an add/sub and/or alternating-negation vector intrinsic to provide for generating add-subtract, and more generally, asymmetric fma instructions. 2. Make -vectorize imply -unroll-allow-partial [Is there an easy way to do this?] 3. Add a -fvectorize flag to clang along the same lines. Updated vectorization benchmark: Loop llvm-v llvm gcc-v gcc ------------------------------------------- S000 9.00 9.59 4.55 10.04 S111 7.25 7.65 7.68 7.83 S1111 13.63 14.72 16.14 16.30 S112 16.60 17.45 16.54 17.52 S1112 12.99 13.87 14.83 14.84 S113 22.03 22.98 22.05 22.05 S1113 11.01 11.48 11.03 11.01 S114 13.14 13.81 13.53 13.48 S115 32.92 33.36 49.98 49.99 S1115 13.61 14.23 13.65 13.66 S116 46.90 49.43 49.54 48.11 S118 10.76 11.25 10.79 10.50 S119 8.68 9.09 11.83 11.82 S1119 8.75 9.15 4.31 11.87 S121 17.17 18.06 14.84 17.31 S122 7.53 7.70 6.11 6.11 S123 6.92 7.10 7.42 7.41 S124 9.60 9.84 9.42 9.33 S125 6.89 7.10 4.67 7.81 S126 2.33 2.55 2.57 2.37 S127 12.18 12.68 7.06 14.50 S128 11.66 12.41 12.42 11.52 S131 28.59 30.11 25.17 28.94 S132 17.04 17.04 15.53 21.03 S141 12.18 12.85 12.38 12.05 S151 28.61 30.11 24.89 28.95 S152 15.47 16.03 11.19 15.63 S161 6.00 6.12 5.52 5.46 S1161 14.40 14.50 8.80 8.79 S162 8.18 8.41 5.36 8.18 S171 14.05 7.96 2.81 5.70 S172 5.67 5.97 2.75 5.70 S173 30.17 31.69 18.15 30.13 S174 30.12 31.53 18.51 30.16 S175 5.75 6.04 4.94 5.77 S176 5.57 5.83 4.41 7.65 S211 16.23 16.89 16.82 16.38 S212 13.19 13.50 13.34 13.18 S1213 12.83 13.35 12.80 12.43 S221 10.86 11.09 8.65 8.63 S1221 5.71 6.03 5.40 6.05 S222 6.00 6.29 5.70 5.72 S231 22.23 24.22 22.36 22.11 S232 6.89 6.94 6.89 6.89 S1232 15.23 16.43 15.05 15.10 S233 55.17 59.98 54.21 49.56 S2233 27.07 29.71 29.68 28.40 S235 43.79 47.85 46.94 43.93 S241 31.00 31.72 32.53 31.01 S242 7.20 7.21 7.20 7.20 S243 16.48 16.99 17.69 16.84 S244 14.47 14.93 16.91 16.82 S1244 14.75 15.02 14.77 14.40 S2244 9.97 10.60 10.40 10.06 S251 34.20 35.55 19.70 34.38 S1251 55.09 57.11 41.77 56.11 S2251 15.64 16.26 17.02 15.70 S3251 15.55 16.52 19.60 15.34 S252 6.14 6.46 7.72 7.26 S253 11.18 11.52 14.40 14.40 S254 17.72 18.98 28.23 28.06 S255 5.93 6.14 9.96 9.95 S256 3.06 3.39 3.10 3.09 S257 2.12 2.31 2.21 2.20 S258 1.79 1.87 1.84 1.84 S261 12.01 12.22 10.98 10.95 S271 32.76 33.76 33.25 33.01 S272 14.93 15.52 15.39 15.26 S273 13.92 14.10 16.86 16.80 S274 17.77 18.53 18.15 17.89 S275 2.90 3.14 3.36 2.98 S2275 32.65 34.95 8.97 33.60 S276 41.38 41.97 40.80 40.55 S277 4.81 4.93 4.81 4.80 S278 14.41 14.76 14.70 14.66 S279 8.04 8.24 7.25 7.27 S1279 9.71 9.92 9.34 9.25 S2710 7.68 8.07 7.86 7.56 S2711 35.53 37.10 36.56 36.00 S2712 32.91 33.96 34.24 33.47 S281 10.75 11.32 12.46 12.02 S1281 104.13 78.11 57.78 68.06 S291 11.75 12.27 14.03 14.03 S292 6.70 6.91 9.94 9.96 S293 15.38 16.24 19.32 19.33 S2101 2.50 2.67 2.59 2.60 S2102 16.56 18.45 16.68 16.75 S2111 5.59 5.63 5.85 5.85 S311 72.04 72.27 72.23 72.03 S31111 6.37 6.01 6.00 6.00 S312 96.04 96.17 96.05 96.03 S313 36.03 36.61 36.03 36.02 S314 36.02 36.12 74.67 72.42 S315 9.11 9.21 9.35 9.30 S316 36.02 36.12 72.08 74.87 S317 444.96 444.94 451.82 451.78 S318 9.07 9.12 7.30 7.30 S319 34.49 36.46 34.42 34.19 S3110 8.53 8.61 4.11 4.11 S13110 5.75 5.78 12.12 12.12 S3111 3.60 3.64 3.60 3.60 S3112 7.21 7.30 7.21 7.20 S3113 33.68 34.18 60.21 60.20 S321 16.80 16.87 16.80 16.80 S322 12.42 12.64 12.60 12.60 S323 10.89 11.24 8.48 8.51 S331 4.23 4.36 7.20 7.20 S332 7.21 7.28 5.21 5.31 S341 4.76 5.04 7.23 7.20 S342 6.02 6.24 7.25 7.20 S343 2.02 2.16 2.16 2.01 S351 46.33 48.65 21.82 46.46 S1351 49.07 51.28 33.68 49.06 S352 57.65 58.44 57.68 57.64 S353 8.19 8.44 8.34 8.19 S421 24.17 25.29 20.62 22.46 S1421 25.09 26.16 15.85 24.76 S422 79.95 81.51 79.22 78.99 S423 154.93 155.21 154.56 154.38 S424 22.61 23.35 11.42 22.36 S431 56.88 59.82 27.59 57.16 S441 14.05 14.23 12.88 12.81 S442 5.99 6.13 6.96 6.90 S443 17.33 17.77 17.15 16.95 S451 48.94 48.99 49.03 49.14 S452 43.01 39.57 14.64 96.03 S453 28.07 28.07 14.60 14.40 S471 8.20 8.56 8.39 8.43 S481 10.89 11.23 12.04 12.00 S482 9.20 9.42 9.19 9.17 S491 11.25 11.60 11.37 11.28 S4112 8.20 8.45 9.13 8.94 S4113 8.64 8.95 8.86 8.85 S4114 11.82 12.35 12.18 11.77 S4115 8.27 8.51 8.95 8.59 S4116 3.22 3.22 6.02 5.94 S4117 13.96 9.69 10.16 9.98 S4121 8.19 8.44 4.04 8.17 va 28.39 29.33 23.58 48.46 vag 12.26 12.93 13.58 13.20 vas 13.36 14.15 13.03 12.47 vif 4.50 4.79 5.06 4.92 vpv 56.84 59.83 28.28 57.24 vtv 57.58 60.42 28.40 57.63 vpvtv 32.78 33.77 16.35 32.73 vpvts 5.78 6.07 2.99 6.38 vpvpv 32.78 33.84 16.54 32.85 vtvtv 32.76 33.75 16.84 35.97 vsumr 72.04 72.28 72.20 72.04 vdotr 72.05 73.22 72.42 72.04 vbor 227.55 381.18 99.80 372.05 -Hal On Sat, 2011-10-29 at 17:56 -0500, Hal Finkel wrote: > On Sat, 2011-10-29 at 15:16 -0500, Hal Finkel wrote: > > On Sat, 2011-10-29 at 14:02 -0500, Hal Finkel wrote: > > > On Sat, 2011-10-29 at 12:30 -0500, Hal Finkel wrote: > > > > Ralf, et al., > > > > > > > > Attached is the latest version of my autovectorization patch. llvmdev > > > > has been CC'd (as had been suggested to me); this e-mail contains > > > > additional benchmark results. > > > > > > > > First, these are preliminary results because I did not do the things > > > > necessary to make them real (explicitly quiet the machine, bind the > > > > processes to one cpu, etc.). But they should be good enough for > > > > discussion. > > > > > > > > I'm using LLVM head r143101, with the attached patch applied, and clang > > > > head r143100 on an x86_64 machine (some kind of Intel Xeon). For the gcc > > > > comparison, I'm using build Ubuntu 4.4.3-4ubuntu5. gcc was run -O3 > > > > without any other optimization flags. opt was run -vectorize > > > > -unroll-allow-partial -O3 with no other optimization flags (the patch > > > > adds the -vectorize option). > > > > > > And opt had also been given the flag: -bb-vectorize-vector-bits=256 > > > > And this was a mistake (because the machine on which the benchmarks were > > run does not have AVX). I've rerun, see better results below... > > > > > > > > -Hal > > > > > > > llc was just given -O3. > > > > > > > > Below I've included results using the benchmark program by Maleki, et > > > > al. See: > > > > An Evaluation of Vectorizing Compilers - PACT'11 > > > > (http://polaris.cs.uiuc.edu/~garzaran/doc/pact11.pdf). The source of > > > > their benchmark program was retrieved from: > > > > http://polaris.cs.uiuc.edu/~maleki1/TSVC.tar.gz > > > > > > > > Also, when using clang, I had to pass -Dinline= on the command line: > > > > when using -emit-llvm, clang appears not to emit code for functions > > > > declared inline. This is a bug, but I've not yet tracked it down. There > > > > are two such small functions in the benchmark program, and the regular > > > > inliner *should* catch them anyway. > > > > > > > > Results: > > > > 0. Name of the loop > > > > 1. Time using LLVM with vectorization > > > > 2. Time using LLVM without vectorization > > > > 3. Time using gcc with vectorization > > > > 4. Time using gcc without vectorization > > As Peter Collingbourne indirectly pointed out to me, clang's > optimizations are still important (even if it is emitting only llvm). > I've rerun the llvm code generation steps, adding -O3 to clang. Here are > the results (they are significantly better): > > Loop llvm-v llvm gcc-v gcc > ------------------------------------------- > S000 9.10 9.59 4.55 10.04 > S111 7.29 7.65 7.68 7.83 > S1111 13.87 14.72 16.14 16.30 > S112 16.67 17.45 16.54 17.52 > S1112 13.16 13.87 14.83 14.84 > S113 22.14 22.98 22.05 22.05 > S1113 11.06 11.48 11.03 11.01 > S114 13.21 13.81 13.53 13.48 > S115 32.82 33.36 49.98 49.99 > S1115 13.67 14.23 13.65 13.66 > S116 47.37 49.43 49.54 48.11 > S118 10.81 11.25 10.79 10.50 > S119 8.73 9.09 11.83 11.82 > S1119 8.82 9.15 4.31 11.87 > S121 17.29 18.06 14.84 17.31 > S122 7.53 7.70 6.11 6.11 > S123 6.93 7.10 7.42 7.41 > S124 9.63 9.84 9.42 9.33 > S125 6.94 7.10 4.67 7.81 > S126 2.34 2.55 2.57 2.37 > S127 12.23 12.68 7.06 14.50 > S128 11.78 12.41 12.42 11.52 > S131 28.79 30.11 25.17 28.94 > S132 17.04 17.04 15.53 21.03 > S141 12.26 12.85 12.38 12.05 > S151 28.79 30.11 24.89 28.95 > S152 15.53 16.03 11.19 15.63 > S161 6.00 6.12 5.52 5.46 > S1161 14.40 14.50 8.80 8.79 > S162 8.19 8.41 5.36 8.18 > S171 15.41 7.96 2.81 5.70 > S172 5.70 5.97 2.75 5.70 > S173 30.32 31.69 18.15 30.13 > S174 30.20 31.53 18.51 30.16 > S175 5.79 6.04 4.94 5.77 > S176 5.59 5.83 4.41 7.65 > S211 16.31 16.89 16.82 16.38 > S212 13.23 13.50 13.34 13.18 > S1213 12.82 13.35 12.80 12.43 > S221 10.87 11.09 8.65 8.63 > S1221 5.72 6.03 5.40 6.05 > S222 6.01 6.29 5.70 5.72 > S231 22.38 24.22 22.36 22.11 > S232 6.89 6.94 6.89 6.89 > S1232 15.31 16.43 15.05 15.10 > S233 55.47 59.98 54.21 49.56 > S2233 27.23 29.71 29.68 28.40 > S235 44.08 47.85 46.94 43.93 > S241 31.14 31.72 32.53 31.01 > S242 7.20 7.21 7.20 7.20 > S243 16.54 16.99 17.69 16.84 > S244 14.51 14.93 16.91 16.82 > S1244 14.72 15.02 14.77 14.40 > S2244 10.09 10.60 10.40 10.06 > S251 34.42 35.55 19.70 34.38 > S1251 55.39 57.11 41.77 56.11 > S2251 15.69 16.26 17.02 15.70 > S3251 15.69 16.52 19.60 15.34 > S252 6.18 6.46 7.72 7.26 > S253 11.19 11.52 14.40 14.40 > S254 18.00 18.98 28.23 28.06 > S255 5.94 6.14 9.96 9.95 > S256 3.09 3.39 3.10 3.09 > S257 2.13 2.31 2.21 2.20 > S258 1.80 1.87 1.84 1.84 > S261 12.00 12.22 10.98 10.95 > S271 32.81 33.76 33.25 33.01 > S272 15.04 15.52 15.39 15.26 > S273 13.93 14.10 16.86 16.80 > S274 17.83 18.53 18.15 17.89 > S275 2.92 3.14 3.36 2.98 > S2275 32.81 34.95 8.97 33.60 > S276 41.26 41.97 40.80 40.55 > S277 4.80 4.93 4.81 4.80 > S278 14.43 14.76 14.70 14.66 > S279 8.05 8.24 7.25 7.27 > S1279 9.72 9.92 9.34 9.25 > S2710 7.73 8.07 7.86 7.56 > S2711 36.49 37.10 36.56 36.00 > S2712 32.96 33.96 34.24 33.47 > S281 10.80 11.32 12.46 12.02 > S1281 79.10 78.11 57.78 68.06 > S291 11.79 12.27 14.03 14.03 > S292 6.70 6.91 9.94 9.96 > S293 15.50 16.24 19.32 19.33 > S2101 2.56 2.67 2.59 2.60 > S2102 16.74 18.45 16.68 16.75 > S2111 5.59 5.63 5.85 5.85 > S311 72.04 72.27 72.23 72.03 > S31111 7.50 6.01 6.00 6.00 > S312 96.04 96.17 96.05 96.03 > S313 36.02 36.61 36.03 36.02 > S314 36.01 36.12 74.67 72.42 > S315 9.11 9.21 9.35 9.30 > S316 36.01 36.12 72.08 74.87 > S317 444.91 444.94 451.82 451.78 > S318 9.07 9.12 7.30 7.30 > S319 34.57 36.46 34.42 34.19 > S3110 8.52 8.61 4.11 4.11 > S13110 5.75 5.78 12.12 12.12 > S3111 3.60 3.64 3.60 3.60 > S3112 7.20 7.30 7.21 7.20 > S3113 33.68 34.18 60.21 60.20 > S321 16.80 16.87 16.80 16.80 > S322 12.42 12.64 12.60 12.60 > S323 10.88 11.24 8.48 8.51 > S331 4.23 4.36 7.20 7.20 > S332 7.20 7.28 5.21 5.31 > S341 4.80 5.04 7.23 7.20 > S342 6.01 6.24 7.25 7.20 > S343 2.04 2.16 2.16 2.01 > S351 46.63 48.65 21.82 46.46 > S1351 49.37 51.28 33.68 49.06 > S352 57.64 58.44 57.68 57.64 > S353 8.21 8.44 8.34 8.19 > S421 24.26 25.29 20.62 22.46 > S1421 25.18 26.16 15.85 24.76 > S422 80.08 81.51 79.22 78.99 > S423 155.02 155.21 154.56 154.38 > S424 22.62 23.35 11.42 22.36 > S431 57.22 59.82 27.59 57.16 > S441 13.27 14.23 12.88 12.81 > S442 5.99 6.13 6.96 6.90 > S443 17.37 17.77 17.15 16.95 > S451 48.92 48.99 49.03 49.14 > S452 42.97 39.57 14.64 96.03 > S453 28.06 28.07 14.60 14.40 > S471 8.27 8.56 8.39 8.43 > S481 10.93 11.23 12.04 12.00 > S482 9.21 9.42 9.19 9.17 > S491 11.31 11.60 11.37 11.28 > S4112 8.21 8.45 9.13 8.94 > S4113 8.65 8.95 8.86 8.85 > S4114 11.87 12.35 12.18 11.77 > S4115 8.28 8.51 8.95 8.59 > S4116 3.23 3.22 6.02 5.94 > S4117 13.97 9.69 10.16 9.98 > S4121 8.20 8.44 4.04 8.17 > va 28.50 29.33 23.58 48.46 > vag 12.37 12.93 13.58 13.20 > vas 13.46 14.15 13.03 12.47 > vif 4.55 4.79 5.06 4.92 > vpv 57.21 59.83 28.28 57.24 > vtv 57.92 60.42 28.40 57.63 > vpvtv 32.84 33.77 16.35 32.73 > vpvts 5.82 6.07 2.99 6.38 > vpvpv 32.87 33.84 16.54 32.85 > vtvtv 32.82 33.75 16.84 35.97 > vsumr 72.03 72.28 72.20 72.04 > vdotr 72.05 73.22 72.42 72.04 > vbor 205.24 381.18 99.80 372.05 > > I apologize for the multiple e-mails with a long list of numbers, but I > think that this was worth it (and I did not want to be unfair to the > clang developers). > > -Hal > > > > > Here are improved results where the correct (and default) > > vector-register size was used. > > > > Loop llvm-v llvm gcc-v gcc > > ------------------------------------------- > > S000 9.09 9.49 4.55 10.04 > > S111 7.28 7.37 7.68 7.83 > > S1111 13.78 14.48 16.14 16.30 > > S112 16.67 17.41 16.54 17.52 > > S1112 13.12 14.21 14.83 14.84 > > S113 22.12 22.88 22.05 22.05 > > S1113 11.06 11.42 11.03 11.01 > > S114 13.23 13.75 13.53 13.48 > > S115 32.76 33.24 49.98 49.99 > > S1115 13.68 14.18 13.65 13.66 > > S116 47.42 49.40 49.54 48.11 > > S118 10.84 11.26 10.79 10.50 > > S119 8.74 9.07 11.83 11.82 > > S1119 8.81 9.14 4.31 11.87 > > S121 17.28 18.78 14.84 17.31 > > S122 7.53 7.54 6.11 6.11 > > S123 6.90 7.38 7.42 7.41 > > S124 9.60 9.77 9.42 9.33 > > S125 6.92 7.22 4.67 7.81 > > S126 2.34 2.53 2.57 2.37 > > S127 12.19 12.97 7.06 14.50 > > S128 11.74 12.43 12.42 11.52 > > S131 28.75 29.91 25.17 28.94 > > S132 17.04 17.04 15.53 21.03 > > S141 12.28 12.26 12.38 12.05 > > S151 28.80 29.43 24.89 28.95 > > S152 15.54 16.03 11.19 15.63 > > S161 6.00 6.06 5.52 5.46 > > S1161 14.39 14.40 8.80 8.79 > > S162 8.19 9.05 5.36 8.18 > > S171 15.41 7.94 2.81 5.70 > > S172 5.71 5.89 2.75 5.70 > > S173 30.31 30.92 18.15 30.13 > > S174 30.18 31.66 18.51 30.16 > > S175 5.78 6.18 4.94 5.77 > > S176 5.59 5.83 4.41 7.65 > > S211 16.27 17.14 16.82 16.38 > > S212 13.21 14.28 13.34 13.18 > > S1213 12.81 13.46 12.80 12.43 > > S221 10.86 11.09 8.65 8.63 > > S1221 5.72 6.04 5.40 6.05 > > S222 6.02 6.26 5.70 5.72 > > S231 22.33 22.94 22.36 22.11 > > S232 6.88 6.88 6.89 6.89 > > S1232 15.30 15.34 15.05 15.10 > > S233 55.38 58.55 54.21 49.56 > > S2233 27.08 29.77 29.68 28.40 > > S235 44.00 44.92 46.94 43.93 > > S241 31.09 31.35 32.53 31.01 > > S242 7.19 7.20 7.20 7.20 > > S243 16.52 17.09 17.69 16.84 > > S244 14.45 14.83 16.91 16.82 > > S1244 14.71 14.83 14.77 14.40 > > S2244 10.04 10.62 10.40 10.06 > > S251 34.15 35.75 19.70 34.38 > > S1251 55.23 57.84 41.77 56.11 > > S2251 15.73 15.87 17.02 15.70 > > S3251 15.66 16.21 19.60 15.34 > > S252 6.18 6.32 7.72 7.26 > > S253 11.14 11.38 14.40 14.40 > > S254 18.41 18.70 28.23 28.06 > > S255 5.93 6.09 9.96 9.95 > > S256 3.08 3.42 3.10 3.09 > > S257 2.13 2.25 2.21 2.20 > > S258 1.79 1.82 1.84 1.84 > > S261 12.00 12.08 10.98 10.95 > > S271 32.82 33.04 33.25 33.01 > > S272 14.98 15.82 15.39 15.26 > > S273 13.92 14.04 16.86 16.80 > > S274 17.83 18.31 18.15 17.89 > > S275 2.92 3.02 3.36 2.98 > > S2275 32.80 33.50 8.97 33.60 > > S276 39.43 39.44 40.80 40.55 > > S277 4.80 4.80 4.81 4.80 > > S278 14.41 14.42 14.70 14.66 > > S279 8.03 8.29 7.25 7.27 > > S1279 9.71 10.06 9.34 9.25 > > S2710 7.71 8.04 7.86 7.56 > > S2711 35.53 35.55 36.56 36.00 > > S2712 32.94 33.17 34.24 33.47 > > S281 10.79 11.09 12.46 12.02 > > S1281 79.13 77.55 57.78 68.06 > > S291 11.80 11.78 14.03 14.03 > > S292 7.77 7.78 9.94 9.96 > > S293 15.50 15.87 19.32 19.33 > > S2101 2.56 2.58 2.59 2.60 > > S2102 16.71 17.53 16.68 16.75 > > S2111 5.60 5.60 5.85 5.85 > > S311 72.03 72.03 72.23 72.03 > > S31111 7.49 6.00 6.00 6.00 > > S312 96.04 96.04 96.05 96.03 > > S313 36.02 36.13 36.03 36.02 > > S314 36.01 36.07 74.67 72.42 > > S315 8.96 8.99 9.35 9.30 > > S316 36.02 36.06 72.08 74.87 > > S317 444.93 444.94 451.82 451.78 > > S318 9.05 9.07 7.30 7.30 > > S319 34.54 36.53 34.42 34.19 > > S3110 8.51 8.57 4.11 4.11 > > S13110 5.75 5.77 12.12 12.12 > > S3111 3.60 3.62 3.60 3.60 > > S3112 7.19 7.30 7.21 7.20 > > S3113 35.13 35.47 60.21 60.20 > > S321 16.79 16.81 16.80 16.80 > > S322 12.42 12.60 12.60 12.60 > > S323 10.86 11.02 8.48 8.51 > > S331 4.23 4.23 7.20 7.20 > > S332 7.20 7.21 5.21 5.31 > > S341 4.79 4.85 7.23 7.20 > > S342 6.01 6.09 7.25 7.20 > > S343 2.04 2.06 2.16 2.01 > > S351 46.61 47.34 21.82 46.46 > > S1351 49.28 50.35 33.68 49.06 > > S352 57.65 58.04 57.68 57.64 > > S353 8.21 8.38 8.34 8.19 > > S421 42.94 43.34 20.62 22.46 > > S1421 25.15 25.81 15.85 24.76 > > S422 87.39 87.53 79.22 78.99 > > S423 155.01 155.29 154.56 154.38 > > S424 36.51 37.51 11.42 22.36 > > S431 57.10 60.66 27.59 57.16 > > S441 14.04 13.29 12.88 12.81 > > S442 6.00 6.00 6.96 6.90 > > S443 17.28 17.77 17.15 16.95 > > S451 48.92 49.08 49.03 49.14 > > S452 42.98 39.32 14.64 96.03 > > S453 28.05 28.06 14.60 14.40 > > S471 8.24 8.65 8.39 8.43 > > S481 10.88 11.15 12.04 12.00 > > S482 9.21 9.31 9.19 9.17 > > S491 11.26 11.38 11.37 11.28 > > S4112 8.21 8.36 9.13 8.94 > > S4113 8.65 8.81 8.86 8.85 > > S4114 11.82 12.15 12.18 11.77 > > S4115 8.28 8.46 8.95 8.59 > > S4116 3.22 3.23 6.02 5.94 > > S4117 13.95 9.61 10.16 9.98 > > S4121 8.21 8.26 4.04 8.17 > > va 28.46 28.58 23.58 48.46 > > vag 12.35 12.36 13.58 13.20 > > vas 13.45 13.49 13.03 12.47 > > vif 4.55 4.57 5.06 4.92 > > vpv 57.08 57.22 28.28 57.24 > > vtv 57.81 57.83 28.40 57.63 > > vpvtv 32.82 32.84 16.35 32.73 > > vpvts 5.82 5.83 2.99 6.38 > > vpvpv 32.87 32.89 16.54 32.85 > > vtvtv 32.82 32.80 16.84 35.97 > > vsumr 72.04 72.03 72.20 72.04 > > vdotr 72.06 72.05 72.42 72.04 > > vbor 205.24 380.81 99.80 372.05 > > > > -Hal > > > > > > > > > > Loop llvm-v llvm gcc-v gcc > > > > ------------------------------------------- > > > > S000 9.59 9.49 4.55 10.04 > > > > S111 7.67 7.37 7.68 7.83 > > > > S1111 13.98 14.48 16.14 16.30 > > > > S112 17.43 17.41 16.54 17.52 > > > > S1112 13.87 14.21 14.83 14.84 > > > > S113 22.97 22.88 22.05 22.05 > > > > S1113 11.46 11.42 11.03 11.01 > > > > S114 13.47 13.75 13.53 13.48 > > > > S115 33.06 33.24 49.98 49.99 > > > > S1115 13.91 14.18 13.65 13.66 > > > > S116 48.74 49.40 49.54 48.11 > > > > S118 11.04 11.26 10.79 10.50 > > > > S119 8.97 9.07 11.83 11.82 > > > > S1119 9.04 9.14 4.31 11.87 > > > > S121 18.06 18.78 14.84 17.31 > > > > S122 7.58 7.54 6.11 6.11 > > > > S123 7.02 7.38 7.42 7.41 > > > > S124 9.62 9.77 9.42 9.33 > > > > S125 7.14 7.22 4.67 7.81 > > > > S126 2.32 2.53 2.57 2.37 > > > > S127 12.87 12.97 7.06 14.50 > > > > S128 12.58 12.43 12.42 11.52 > > > > S131 29.91 29.91 25.17 28.94 > > > > S132 17.04 17.04 15.53 21.03 > > > > S141 12.59 12.26 12.38 12.05 > > > > S151 28.92 29.43 24.89 28.95 > > > > S152 15.68 16.03 11.19 15.63 > > > > S161 6.06 6.06 5.52 5.46 > > > > S1161 14.46 14.40 8.80 8.79 > > > > S162 8.31 9.05 5.36 8.18 > > > > S171 15.47 7.94 2.81 5.70 > > > > S172 5.92 5.89 2.75 5.70 > > > > S173 31.59 30.92 18.15 30.13 > > > > S174 31.16 31.66 18.51 30.16 > > > > S175 5.80 6.18 4.94 5.77 > > > > S176 5.69 5.83 4.41 7.65 > > > > S211 16.56 17.14 16.82 16.38 > > > > S212 13.46 14.28 13.34 13.18 > > > > S1213 13.12 13.46 12.80 12.43 > > > > S221 10.88 11.09 8.65 8.63 > > > > S1221 5.80 6.04 5.40 6.05 > > > > S222 6.01 6.26 5.70 5.72 > > > > S231 23.78 22.94 22.36 22.11 > > > > S232 6.88 6.88 6.89 6.89 > > > > S1232 16.00 15.34 15.05 15.10 > > > > S233 57.48 58.55 54.21 49.56 > > > > S2233 27.65 29.77 29.68 28.40 > > > > S235 46.40 44.92 46.94 43.93 > > > > S241 31.62 31.35 32.53 31.01 > > > > S242 7.20 7.20 7.20 7.20 > > > > S243 16.78 17.09 17.69 16.84 > > > > S244 14.64 14.83 16.91 16.82 > > > > S1244 14.98 14.83 14.77 14.40 > > > > S2244 10.47 10.62 10.40 10.06 > > > > S251 35.10 35.75 19.70 34.38 > > > > S1251 56.65 57.84 41.77 56.11 > > > > S2251 15.96 15.87 17.02 15.70 > > > > S3251 16.41 16.21 19.60 15.34 > > > > S252 7.24 6.32 7.72 7.26 > > > > S253 12.55 11.38 14.40 14.40 > > > > S254 19.08 18.70 28.23 28.06 > > > > S255 5.94 6.09 9.96 9.95 > > > > S256 3.14 3.42 3.10 3.09 > > > > S257 2.18 2.25 2.21 2.20 > > > > S258 1.80 1.82 1.84 1.84 > > > > S261 12.00 12.08 10.98 10.95 > > > > S271 32.93 33.04 33.25 33.01 > > > > S272 15.48 15.82 15.39 15.26 > > > > S273 13.99 14.04 16.86 16.80 > > > > S274 18.38 18.31 18.15 17.89 > > > > S275 3.02 3.02 3.36 2.98 > > > > S2275 33.71 33.50 8.97 33.60 > > > > S276 39.52 39.44 40.80 40.55 > > > > S277 4.81 4.80 4.81 4.80 > > > > S278 14.43 14.42 14.70 14.66 > > > > S279 8.10 8.29 7.25 7.27 > > > > S1279 9.77 10.06 9.34 9.25 > > > > S2710 7.85 8.04 7.86 7.56 > > > > S2711 35.54 35.55 36.56 36.00 > > > > S2712 33.16 33.17 34.24 33.47 > > > > S281 10.97 11.09 12.46 12.02 > > > > S1281 79.37 77.55 57.78 68.06 > > > > S291 11.94 11.78 14.03 14.03 > > > > S292 7.88 7.78 9.94 9.96 > > > > S293 15.90 15.87 19.32 19.33 > > > > S2101 2.59 2.58 2.59 2.60 > > > > S2102 17.63 17.53 16.68 16.75 > > > > S2111 5.63 5.60 5.85 5.85 > > > > S311 72.07 72.03 72.23 72.03 > > > > S31111 7.49 6.00 6.00 6.00 > > > > S312 96.06 96.04 96.05 96.03 > > > > S313 36.50 36.13 36.03 36.02 > > > > S314 36.10 36.07 74.67 72.42 > > > > S315 9.00 8.99 9.35 9.30 > > > > S316 36.11 36.06 72.08 74.87 > > > > S317 444.92 444.94 451.82 451.78 > > > > S318 9.04 9.07 7.30 7.30 > > > > S319 34.76 36.53 34.42 34.19 > > > > S3110 8.53 8.57 4.11 4.11 > > > > S13110 5.76 5.77 12.12 12.12 > > > > S3111 3.60 3.62 3.60 3.60 > > > > S3112 7.20 7.30 7.21 7.20 > > > > S3113 35.12 35.47 60.21 60.20 > > > > S321 16.81 16.81 16.80 16.80 > > > > S322 12.42 12.60 12.60 12.60 > > > > S323 10.93 11.02 8.48 8.51 > > > > S331 4.23 4.23 7.20 7.20 > > > > S332 7.21 7.21 5.21 5.31 > > > > S341 4.74 4.85 7.23 7.20 > > > > S342 6.02 6.09 7.25 7.20 > > > > S343 2.14 2.06 2.16 2.01 > > > > S351 49.26 47.34 21.82 46.46 > > > > S1351 50.85 50.35 33.68 49.06 > > > > S352 58.14 58.04 57.68 57.64 > > > > S353 8.35 8.38 8.34 8.19 > > > > S421 43.13 43.34 20.62 22.46 > > > > S1421 25.25 25.81 15.85 24.76 > > > > S422 88.36 87.53 79.22 78.99 > > > > S423 155.13 155.29 154.56 154.38 > > > > S424 37.11 37.51 11.42 22.36 > > > > S431 58.22 60.66 27.59 57.16 > > > > S441 14.05 13.29 12.88 12.81 > > > > S442 6.08 6.00 6.96 6.90 > > > > S443 17.60 17.77 17.15 16.95 > > > > S451 48.95 49.08 49.03 49.14 > > > > S452 42.98 39.32 14.64 96.03 > > > > S453 28.06 28.06 14.60 14.40 > > > > S471 8.53 8.65 8.39 8.43 > > > > S481 10.98 11.15 12.04 12.00 > > > > S482 9.31 9.31 9.19 9.17 > > > > S491 11.54 11.38 11.37 11.28 > > > > S4112 8.21 8.36 9.13 8.94 > > > > S4113 8.77 8.81 8.86 8.85 > > > > S4114 12.32 12.15 12.18 11.77 > > > > S4115 8.48 8.46 8.95 8.59 > > > > S4116 3.21 3.23 6.02 5.94 > > > > S4117 14.08 9.61 10.16 9.98 > > > > S4121 8.53 8.26 4.04 8.17 > > > > va 30.09 28.58 23.58 48.46 > > > > vag 12.35 12.36 13.58 13.20 > > > > vas 13.74 13.49 13.03 12.47 > > > > vif 4.49 4.57 5.06 4.92 > > > > vpv 58.59 57.22 28.28 57.24 > > > > vtv 59.15 57.83 28.40 57.63 > > > > vpvtv 33.18 32.84 16.35 32.73 > > > > vpvts 5.99 5.83 2.99 6.38 > > > > vpvpv 33.25 32.89 16.54 32.85 > > > > vtvtv 32.83 32.80 16.84 35.97 > > > > vsumr 72.03 72.03 72.20 72.04 > > > > vdotr 72.05 72.05 72.42 72.04 > > > > vbor 205.22 380.81 99.80 372.05 > > > > > > > > I've yet to go through these in detail (they just finished running 5 > > > > minutes ago). But for the curious (and I've had several requests for > > > > benchmarks), here you go. There is obviously more work to do. > > > > > > > > -Hal > > > > > > > > On Fri, 2011-10-28 at 14:30 +0200, Ralf Karrenberg wrote: > > > > > Hi Hal, > > > > > > > > > > those numbers look very promising, great work! :) > > > > > > > > > > Best, > > > > > Ralf > > > > > > > > > > ----- Original Message ----- > > > > > > From: "Hal Finkel" > > > > > > To: "Bruno Cardoso Lopes" > > > > > > Cc: llvm-commits at cs.uiuc.edu > > > > > > Sent: Freitag, 28. Oktober 2011 13:50:00 > > > > > > Subject: Re: [llvm-commits] [PATCH] BasicBlock Autovectorization Pass > > > > > > > > > > > > Bruno, et al., > > > > > > > > > > > > I've attached a new version of the patch that contains improvements > > > > > > (and > > > > > > a critical bug fix [the code output is not more right, but the pass > > > > > > in > > > > > > the older patch would crash in certain cases and now does not]) > > > > > > compared > > > > > > to previous versions that I've posted. > > > > > > > > > > > > First, these are preliminary results because I did not do the things > > > > > > necessary to make them real (explicitly quiet the machine, bind the > > > > > > processes to one cpu, etc.). But they should be good enough for > > > > > > discussion. > > > > > > > > > > > > I'm using LLVM head r143101, with the attached patch applied, and > > > > > > clang > > > > > > head r143100 on an x86_64 machine (some kind of Intel Xeon). For the > > > > > > gcc > > > > > > comparison, I'm using build Ubuntu 4.4.3-4ubuntu5. gcc was run -O3 > > > > > > without any other optimization flags. opt was run -vectorize > > > > > > -unroll-allow-partial -O3 with no other optimization flags (the patch > > > > > > adds the -vectorize option). llc was just given -O3. > > > > > > > > > > > > It is not difficult to construct an example in which vectorization > > > > > > would > > > > > > be useful: take a loop that does more computation than load/stores, > > > > > > and > > > > > > (partially) unroll it. Here is a simple case: > > > > > > > > > > > > #define ITER 5000 > > > > > > #define NUM 200 > > > > > > double a[NUM][NUM]; > > > > > > double b[NUM][NUM]; > > > > > > > > > > > > ... > > > > > > > > > > > > int main() > > > > > > { > > > > > > ... > > > > > > > > > > > > for (int i = 0; i < ITER; ++i) { > > > > > > for (int x = 0; x < NUM; ++x) > > > > > > for (int y = 0; y < NUM; ++y) { > > > > > > double v = a[x][y], w = b[x][y]; > > > > > > double z1 = v*w; > > > > > > double z2 = v+w; > > > > > > double z3 = z1*z2; > > > > > > double z4 = z3+v; > > > > > > double z5 = z2+w; > > > > > > double z6 = z4*z5; > > > > > > double z7 = z4+z5; > > > > > > a[x][y] = v*v-z6; > > > > > > b[x][y] = w-z7; > > > > > > } > > > > > > } > > > > > > > > > > > > ... > > > > > > > > > > > > return 0; > > > > > > } > > > > > > > > > > > > Results: > > > > > > gcc -03: 0m1.790s > > > > > > llvm -vectorize: 0m2.360s > > > > > > llvm: 0m2.780s > > > > > > gcc -fno-tree-vectorize: 0m2.810s > > > > > > (these are the user times after I've run enough for the times to > > > > > > settle > > > > > > to three decimal places) > > > > > > > > > > > > So the vectorization gives a ~15% improvement in the running time. > > > > > > gcc's > > > > > > vectorization still does a much better job, however (yielding an ~36% > > > > > > improvement). So there is still work to do ;) > > > > > > > > > > > > Additionally, I've checked the autovectorization on some classic > > > > > > numerical benchmarks from netlib. On these benchmarks, clang/llvm > > > > > > already do a good job compared to gcc (gcc is only about 10% better, > > > > > > and > > > > > > this is true regardless of whether gcc's vectorization is on or off). > > > > > > For these cases, autovectorization provides an insignificant speedup > > > > > > in > > > > > > most cases (but does not tend to make things worse, just not really > > > > > > any > > > > > > better either). Because gcc's vectorization also did not really help > > > > > > gcc > > > > > > in these cases, I'm not surprised. A good collection of these is > > > > > > available here: > > > > > > http://www.roylongbottom.org.uk/classic_benchmarks.tar.gz > > > > > > > > > > > > I've yet to run the test suite using the pass to validate it. That is > > > > > > something that I plan to do. Actually, the "Livermore Loops" test in > > > > > > the > > > > > > aforementioned archive contains checksums to validate the results, > > > > > > and > > > > > > it looks like 1 or 2 of the loop results are wrong with vectorization > > > > > > turned on, so I'll have to investigate that. > > > > > > > > > > > > -Hal > > > > > > > > > > > > On Wed, 2011-10-26 at 18:49 -0200, Bruno Cardoso Lopes wrote: > > > > > > > Hi Hal, > > > > > > > > > > > > > > On Fri, Oct 21, 2011 at 7:04 PM, Hal Finkel > > > > > > > wrote: > > > > > > > > I've attached an initial version of a basic-block > > > > > > > > autovectorization > > > > > > > > pass. It works by searching a basic block for pairable > > > > > > > > (independent) > > > > > > > > instructions, and, using a chain-seeking heuristic, selects > > > > > > > > pairings > > > > > > > > likely to provide an overall speedup (if such pairings can be > > > > > > > > found). > > > > > > > > The selected pairs are then fused and, if necessary, other > > > > > > > > instructions > > > > > > > > are moved in order to maintain data-flow consistency. This works > > > > > > > > only > > > > > > > > within one basic block, but can do loop vectorization in > > > > > > > > combination > > > > > > > > with (partial) unrolling. The basic idea was inspired by the > > > > > > > > Vienna MAP > > > > > > > > Vectorizor, which has been used to vectorize FFT kernels, but the > > > > > > > > algorithm used here is different. > > > > > > > > > > > > > > > > To try it, use -bb-vectorize with opt. There are a few options: > > > > > > > > -bb-vectorize-req-chain-depth: default: 3 -- The depth of the > > > > > > > > chain of > > > > > > > > instruction pairs necessary in order to consider the pairs that > > > > > > > > compose > > > > > > > > the chain worthy of vectorization. > > > > > > > > -bb-vectorize-vector-bits: default: 128 -- The size of the target > > > > > > > > vector > > > > > > > > registers > > > > > > > > -bb-vectorize-no-ints -- Don't consider integer instructions > > > > > > > > -bb-vectorize-no-floats -- Don't consider floating-point > > > > > > > > instructions > > > > > > > > > > > > > > > > The vectorizor generates a lot of insert_element/extract_element > > > > > > > > pairs; > > > > > > > > The assumption is that other passes will turn these into shuffles > > > > > > > > when > > > > > > > > possible (it looks like some work is necessary here). It will > > > > > > > > also > > > > > > > > vectorize vector instructions, and generates shuffles in this > > > > > > > > case > > > > > > > > (again, other passes should combine these as appropriate). > > > > > > > > > > > > > > > > Currently, it does not fuse load or store instructions, but that > > > > > > > > is a > > > > > > > > feature that I'd like to add. Of course, alignment information is > > > > > > > > an > > > > > > > > issue for load/store vectorization (or maybe I should just fuse > > > > > > > > them > > > > > > > > anyway and let isel deal with unaligned cases?). > > > > > > > > > > > > > > > > Also, support needs to be added for fusing known intrinsics (fma, > > > > > > > > etc.), > > > > > > > > and, as has been discussed on llvmdev, we should add some > > > > > > > > intrinsics to > > > > > > > > allow the generation of addsub-type instructions. > > > > > > > > > > > > > > > > I've included a few tests, but it needs more. Please review (I'll > > > > > > > > commit > > > > > > > > if and when everyone is happy). > > > > > > > > > > > > > > > > Thanks in advance, > > > > > > > > Hal > > > > > > > > > > > > > > > > P.S. There is another option (not so useful right now, but could > > > > > > > > be): > > > > > > > > -bb-vectorize-fast-dep -- Don't do a full inter-instruction > > > > > > > > dependency > > > > > > > > analysis; instead stop looking for instruction pairs after the > > > > > > > > first use > > > > > > > > of an instruction's value. [This makes the pass faster, but would > > > > > > > > require a data-dependence-based reordering pass in order to be > > > > > > > > effective]. > > > > > > > > > > > > > > Cool! :) > > > > > > > Have you run this pass with any benchmark or the llvm testsuite? > > > > > > > Does > > > > > > > it presents any regression? > > > > > > > Do you have any performance results? > > > > > > > Cheers, > > > > > > > > > > > > > > > > > > > -- > > > > > > Hal Finkel > > > > > > Postdoctoral Appointee > > > > > > Leadership Computing Facility > > > > > > Argonne National Laboratory > > > > > > > > > > > > _______________________________________________ > > > > > > llvm-commits mailing list > > > > > > llvm-commits at cs.uiuc.edu > > > > > > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > > > > > > > > > > > > > _______________________________________________ > > > > llvm-commits mailing list > > > > llvm-commits at cs.uiuc.edu > > > > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > > > > > -- Hal Finkel Postdoctoral Appointee Leadership Computing Facility Argonne National Laboratory -------------- next part -------------- A non-text attachment was scrubbed... Name: llvm_bb_vectorize-20111031-2.diff Type: text/x-patch Size: 77125 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111031/d020bfe3/attachment-0001.bin From grosbach at apple.com Mon Oct 31 20:24:45 2011 From: grosbach at apple.com (Jim Grosbach) Date: Tue, 01 Nov 2011 01:24:45 -0000 Subject: [llvm-commits] [llvm] r143413 - in /llvm/trunk/lib/Target/ARM: ARMInstrFormats.td AsmParser/ARMAsmParser.cpp MCTargetDesc/ARMAsmBackend.cpp Message-ID: <20111101012446.08E003524002@llvm.org> Author: grosbach Date: Mon Oct 31 20:24:45 2011 New Revision: 143413 URL: http://llvm.org/viewvc/llvm-project?rev=143413&view=rev Log: ARM VLD/VST assembly parsing for symbolic address operands. Modified: llvm/trunk/lib/Target/ARM/ARMInstrFormats.td llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp Modified: llvm/trunk/lib/Target/ARM/ARMInstrFormats.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrFormats.td?rev=143413&r1=143412&r2=143413&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrFormats.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrFormats.td Mon Oct 31 20:24:45 2011 @@ -290,6 +290,26 @@ let DecoderNamespace = "Thumb"; } +// Pseudo-instructions for alternate assembly syntax (never used by codegen). +// These are aliases that require C++ handling to convert to the target +// instruction, while InstAliases can be handled directly by tblgen. +class AsmPseudoInst + : InstTemplate { + let OutOperandList = (ops); + let InOperandList = iops; + let Pattern = []; + let isCodeGenOnly = 0; // So we get asm matcher for it. + let isPseudo = 1; +} + +class ARMAsmPseudo : AsmPseudoInst, Requires<[IsARM]>; +class tAsmPseudo : AsmPseudoInst, Requires<[IsThumb]>; +class t2AsmPseudo : AsmPseudoInst, Requires<[IsThumb2]>; +class VFP2AsmPseudo : AsmPseudoInst, Requires<[HasVFP2]>; +class NEONAsmPseudo : AsmPseudoInst, Requires<[HasNEON]>; + +// Pseudo instructions for the code generator. class PseudoInst pattern> : InstTemplate { Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp?rev=143413&r1=143412&r2=143413&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original) +++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Mon Oct 31 20:24:45 2011 @@ -761,6 +761,11 @@ return (Val > -256 && Val < 256) || Val == INT32_MIN; } bool isAddrMode5() const { + // If we have an immediate that's not a constant, treat it as a label + // reference needing a fixup. If it is a constant, it's something else + // and we reject it. + if (Kind == k_Immediate && !isa(getImm())) + return true; if (!isMemory() || Memory.Alignment != 0) return false; // Check for register offset. if (Memory.OffsetRegNum) return false; @@ -768,7 +773,7 @@ if (!Memory.OffsetImm) return true; int64_t Val = Memory.OffsetImm->getValue(); return (Val >= -1020 && Val <= 1020 && ((Val & 3) == 0)) || - Val == INT32_MIN; + Val == INT32_MIN; } bool isMemTBB() const { if (!isMemory() || !Memory.OffsetRegNum || Memory.isNegative || @@ -1375,6 +1380,15 @@ void addAddrMode5Operands(MCInst &Inst, unsigned N) const { assert(N == 2 && "Invalid number of operands!"); + // If we have an immediate that's not a constant, treat it as a label + // reference needing a fixup. If it is a constant, it's something else + // and we reject it. + if (isImm()) { + Inst.addOperand(MCOperand::CreateExpr(getImm())); + Inst.addOperand(MCOperand::CreateImm(0)); + return; + } + // The lower two bits are always zero and as such are not encoded. int32_t Val = Memory.OffsetImm ? Memory.OffsetImm->getValue() / 4 : 0; ARM_AM::AddrOpc AddSub = Val < 0 ? ARM_AM::sub : ARM_AM::add; Modified: llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp?rev=143413&r1=143412&r2=143413&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp (original) +++ llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp Mon Oct 31 20:24:45 2011 @@ -63,7 +63,7 @@ { "fixup_arm_ldst_pcrel_12", 1, 24, MCFixupKindInfo::FKF_IsPCRel }, { "fixup_t2_ldst_pcrel_12", 0, 32, MCFixupKindInfo::FKF_IsPCRel | MCFixupKindInfo::FKF_IsAlignedDownTo32Bits}, -{ "fixup_arm_pcrel_10", 1, 24, MCFixupKindInfo::FKF_IsPCRel }, +{ "fixup_arm_pcrel_10", 0, 32, MCFixupKindInfo::FKF_IsPCRel }, { "fixup_t2_pcrel_10", 0, 32, MCFixupKindInfo::FKF_IsPCRel | MCFixupKindInfo::FKF_IsAlignedDownTo32Bits}, { "fixup_thumb_adr_pcrel_10",0, 8, MCFixupKindInfo::FKF_IsPCRel | From maruel at google.com Mon Oct 31 11:01:46 2011 From: maruel at google.com (Marc-Antoine Ruel) Date: Mon, 31 Oct 2011 12:01:46 -0400 Subject: [llvm-commits] [patch] Try to find clang if gcc is not found Message-ID: Note that I initially attached the diff to a bug at http://llvm.org/bugs/show_bug.cgi?id=11278 but a colleague recommended to me to send it to this list; --- Try to find clang if gcc is not found Repro: - On a system without gcc installed (like Windows): - Build llvm+clang with MSVS2010. I used MinSizeRel configuration but it shouldn't matter. - Add ...\build\bin\MinSizeRel to PATH to make sure all llvm tools and clang are in PATH. - echo int main() { return 0; } > hello.c - clang -c hello.c -emit-llvm -o hello.bc - llc -filetype=obj hello.bc - llvm-ld hello.obj -o=hello.ld.exe -native Result: llvm-ld: Failed to find gcc Expected: Uses clang. Notes: I kept the behavior to try to find gcc first and only fallback to clang if gcc is not found to reduce the side-effects of this patch. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111031/403fd241/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: find_clang.diff Type: application/octet-stream Size: 4884 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111031/403fd241/attachment.obj From kyriakos at xmos.com Mon Oct 31 12:30:48 2011 From: kyriakos at xmos.com (Kyriakos Georgiou) Date: Mon, 31 Oct 2011 17:30:48 +0000 Subject: [llvm-commits] Handling of DebugLocs during CSE of SelectionDAG nodes. Message-ID: Regarding thread : http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-September/043205.html the approach of throwing away the line number information on the merged node is implemented in the attached patch. Kyriakos Georgiou | XMOS www.xmos.com -------------- next part -------------- A non-text attachment was scrubbed... Name: debugLocHandlingSelectionDAG.diff Type: text/x-patch Size: 3639 bytes Desc: debugLocHandlingSelectionDAG.diff Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111031/3f0f2ec8/attachment.bin From Kevin.Harris at unisys.com Mon Oct 31 15:22:43 2011 From: Kevin.Harris at unisys.com (Harris, Kevin) Date: Mon, 31 Oct 2011 15:22:43 -0500 Subject: [llvm-commits] Tentative header modifications to resolve Bugzilla 11257 (unnecessary "Unused parameter" warnings) Message-ID: <451DDDBC99EEAD40911267DB962DEC7C6BDFF61953@USEA-EXCH8.na.uis.unisys.com> At Eli's request, I'm submitting my tentative edits for resolving the compile warnings for 4 headers. In effect, this is an attachment to Bugzilla 11257, which reports "Unused parameter" warnings for these 4 headers, when compiled with gcc 4.5.3, using "-Wall -Wextra -Wshadow" compilation warnings options. I make no claim to the desirability of these particular edits, other than the fact that they resolve the warnings in a way that is semantically innocuous and results in little or no compilation performance impact after optimization. Note that the first edit to the first of these 4 files is actually intended to fix a "shadow" warning in the same file (see Bugzilla 11256) rather than an "Unused parameter" warning. -Kevin Index: llvm/rc1/include/llvm/Analysis/CFGPrinter.h =================================================================== --- llvm/rc1/include/llvm/Analysis/CFGPrinter.h (revision 143139) +++ llvm/rc1/include/llvm/Analysis/CFGPrinter.h (working copy) @@ -26,7 +26,7 @@ template<> struct DOTGraphTraits : public DefaultDOTGraphTraits { - DOTGraphTraits (bool isSimple=false) : DefaultDOTGraphTraits(isSimple) {} + DOTGraphTraits (bool isSimple1=false) : DefaultDOTGraphTraits(isSimple1) {} static std::string getGraphName(const Function *F) { return "CFG for '" + F->getNameStr() + "' function"; @@ -41,7 +41,7 @@ raw_string_ostream OS(Str); WriteAsOperand(OS, Node, false); - return OS.str(); + if (Graph == NULL) {return OS.str();} else {return OS.str();} } static std::string getCompleteNodeLabel(const BasicBlock *Node, @@ -69,7 +69,7 @@ --i; } - return OutStr; + if (Graph == NULL) {return OutStr;} else {return OutStr;} } std::string getNodeLabel(const BasicBlock *Node, Index: llvm/rc1/include/llvm/Assembly/AssemblyAnnotationWriter.h =================================================================== --- llvm/rc1/include/llvm/Assembly/AssemblyAnnotationWriter.h (revision 143139) +++ llvm/rc1/include/llvm/Assembly/AssemblyAnnotationWriter.h (working copy) @@ -33,29 +33,37 @@ /// emitFunctionAnnot - This may be implemented to emit a string right before /// the start of a function. virtual void emitFunctionAnnot(const Function *F, - formatted_raw_ostream &OS) {} + formatted_raw_ostream &OS) { + if (F == NULL || OS.DELETE_STREAM) return; + } /// emitBasicBlockStartAnnot - This may be implemented to emit a string right /// after the basic block label, but before the first instruction in the /// block. virtual void emitBasicBlockStartAnnot(const BasicBlock *BB, formatted_raw_ostream &OS) { + if (BB == NULL || OS.DELETE_STREAM) return; } /// emitBasicBlockEndAnnot - This may be implemented to emit a string right /// after the basic block. virtual void emitBasicBlockEndAnnot(const BasicBlock *BB, formatted_raw_ostream &OS) { + if (BB == NULL || OS.DELETE_STREAM) return; } /// emitInstructionAnnot - This may be implemented to emit a string right /// before an instruction is emitted. virtual void emitInstructionAnnot(const Instruction *I, - formatted_raw_ostream &OS) {} + formatted_raw_ostream &OS) { + if (I == NULL || OS.DELETE_STREAM) return; + } /// printInfoComment - This may be implemented to emit a comment to the /// right of an instruction or global value. - virtual void printInfoComment(const Value &V, formatted_raw_ostream &OS) {} + virtual void printInfoComment(const Value &V, formatted_raw_ostream &OS) { + if (V.hasName() || OS.DELETE_STREAM) return; + } }; } // End llvm namespace Index: llvm/rc1/include/llvm/ExecutionEngine/JITEventListener.h =================================================================== --- llvm/rc1/include/llvm/ExecutionEngine/JITEventListener.h (revision 143139) +++ llvm/rc1/include/llvm/ExecutionEngine/JITEventListener.h (working copy) @@ -61,7 +61,9 @@ /// if you should happen to need that. virtual void NotifyFunctionEmitted(const Function &F, void *Code, size_t Size, - const EmittedFunctionDetails &Details) {} + const EmittedFunctionDetails &Details) { + if (F.isNullValue() || Code == NULL || Size == 0 || Details.MF == NULL) return; + } /// NotifyFreeingMachineCode - Called from freeMachineCodeForFunction(), after /// the global mapping is removed, but before the machine code is returned to @@ -71,7 +73,9 @@ /// parameter to a previous NotifyFunctionEmitted call. The Function passed /// to NotifyFunctionEmitted may have been destroyed by the time of the /// matching NotifyFreeingMachineCode call. - virtual void NotifyFreeingMachineCode(void *OldPtr) {} + virtual void NotifyFreeingMachineCode(void *OldPtr) { + if (OldPtr == NULL) return; + } }; // This returns NULL if support isn't available. Index: llvm/rc1/include/llvm/Support/DOTGraphTraits.h =================================================================== --- llvm/rc1/include/llvm/Support/DOTGraphTraits.h (revision 143139) +++ llvm/rc1/include/llvm/Support/DOTGraphTraits.h (working copy) @@ -62,7 +62,7 @@ /// isNodeHidden - If the function returns true, the given node is not /// displayed in the graph. static bool isNodeHidden(const void *Node) { - return false; + if (Node == NULL) {return false;} else {return false;} } /// getNodeLabel - Given a node and a pointer to the top level graph, return @@ -127,13 +127,13 @@ /// numEdgeDestLabels - If hasEdgeDestLabels, this function returns the /// number of incoming edge labels the given node has. static unsigned numEdgeDestLabels(const void *Node) { - return 0; + if (Node == NULL) {return 0;} else {return 0;} } /// getEdgeDestLabel - If hasEdgeDestLabels, this function returns the /// incoming edge label with the given index in the given node. static std::string getEdgeDestLabel(const void *Node, unsigned i) { - return ""; + if (Node == NULL || i == 0) {return "";} else {return "";} } /// addCustomGraphFeatures - If a graph is made up of more than just From peter_cooper at apple.com Mon Oct 31 19:38:58 2011 From: peter_cooper at apple.com (Peter Cooper) Date: Mon, 31 Oct 2011 17:38:58 -0700 Subject: [llvm-commits] patch: partial DSE Message-ID: <94CCF474-AEAB-42EE-8667-47D93735B2F0@apple.com> Hi Please review this patch to allow DSE to trim stores as opposed to deleting them. The logic here is that if the end of the earlier store is dead because of a later store then the length of the earlier store will be trimmed in size to avoid writing dead memory. The only time i won't do this is if the original store was likely to use vector writes which if shortened would end up as multiple scalar writes and so is less efficient. Any help removing the magic vector size (16) constant would be good too :) Pete -------------- next part -------------- A non-text attachment was scrubbed... Name: dse.patch Type: application/octet-stream Size: 12587 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111031/b18da2f1/attachment.obj From eli.friedman at gmail.com Mon Oct 31 22:11:42 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Tue, 01 Nov 2011 03:11:42 -0000 Subject: [llvm-commits] [llvm] r143420 - in /llvm/trunk/test/DebugInfo: 2011-09-26-GlobalVarContext.ll X86/2011-09-26-GlobalVarContext.ll Message-ID: <20111101031142.372D73524002@llvm.org> Author: efriedma Date: Mon Oct 31 22:11:41 2011 New Revision: 143420 URL: http://llvm.org/viewvc/llvm-project?rev=143420&view=rev Log: Move test requiring x86 backend into X86 directory. Added: llvm/trunk/test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll - copied unchanged from r143419, llvm/trunk/test/DebugInfo/2011-09-26-GlobalVarContext.ll Removed: llvm/trunk/test/DebugInfo/2011-09-26-GlobalVarContext.ll Removed: llvm/trunk/test/DebugInfo/2011-09-26-GlobalVarContext.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/2011-09-26-GlobalVarContext.ll?rev=143419&view=auto ============================================================================== --- llvm/trunk/test/DebugInfo/2011-09-26-GlobalVarContext.ll (original) +++ llvm/trunk/test/DebugInfo/2011-09-26-GlobalVarContext.ll (removed) @@ -1,47 +0,0 @@ -; RUN: llc -mtriple=x86_64-pc-linux-gnu -asm-verbose %s -o - | FileCheck %s - -; ModuleID = 'test.c' - - at GLB = common global i32 0, align 4 - -define i32 @f() nounwind { - %LOC = alloca i32, align 4 - call void @llvm.dbg.declare(metadata !{i32* %LOC}, metadata !15), !dbg !17 - %1 = load i32* @GLB, align 4, !dbg !18 - store i32 %1, i32* %LOC, align 4, !dbg !18 - %2 = load i32* @GLB, align 4, !dbg !19 - ret i32 %2, !dbg !19 -} - -declare void @llvm.dbg.declare(metadata, metadata) nounwind readnone - -!llvm.dbg.cu = !{!0} - -!0 = metadata !{i32 720913, i32 0, i32 12, metadata !"test.c", metadata !"/work/llvm/vanilla/test/DebugInfo", metadata !"clang version 3.0 (trunk)", i1 true, i1 false, metadata !"", i32 0, metadata !1, metadata !1, metadata !3, metadata !12} ; [ DW_TAG_compile_unit ] -!1 = metadata !{metadata !2} -!2 = metadata !{i32 0} -!3 = metadata !{metadata !4} -!4 = metadata !{metadata !5} -!5 = metadata !{i32 720942, i32 0, metadata !6, metadata !"f", metadata !"f", metadata !"", metadata !6, i32 3, metadata !7, i1 false, i1 true, i32 0, i32 0, i32 0, i32 0, i1 false, i32 ()* @f, null, null, metadata !10} ; [ DW_TAG_subprogram ] -!6 = metadata !{i32 720937, metadata !"test.c", metadata !"/work/llvm/vanilla/test/DebugInfo", null} ; [ DW_TAG_file_type ] -!7 = metadata !{i32 720917, i32 0, metadata !"", i32 0, i32 0, i64 0, i64 0, i32 0, i32 0, i32 0, metadata !8, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] -!8 = metadata !{metadata !9} -!9 = metadata !{i32 720932, null, metadata !"int", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] -!10 = metadata !{metadata !11} -!11 = metadata !{i32 720932} ; [ DW_TAG_base_type ] -!12 = metadata !{metadata !13} -!13 = metadata !{metadata !14} -!14 = metadata !{i32 720948, i32 0, null, metadata !"GLB", metadata !"GLB", metadata !"", metadata !6, i32 1, metadata !9, i32 0, i32 1, i32* @GLB} ; [ DW_TAG_variable ] -!15 = metadata !{i32 721152, metadata !16, metadata !"LOC", metadata !6, i32 4, metadata !9, i32 0, i32 0} ; [ DW_TAG_auto_variable ] -!16 = metadata !{i32 720907, metadata !5, i32 3, i32 9, metadata !6, i32 0} ; [ DW_TAG_lexical_block ] -!17 = metadata !{i32 4, i32 9, metadata !16, null} -!18 = metadata !{i32 4, i32 23, metadata !16, null} -!19 = metadata !{i32 5, i32 5, metadata !16, null} - -; CHECK: .long .Lstring3 -; CHECK: .byte 1 -; CHECK: .byte 1 - -; CHECK: .long .Lstring6 -; CHECK: .byte 1 -; CHECK: .byte 4 From eli.friedman at gmail.com Mon Oct 31 22:12:47 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Tue, 01 Nov 2011 03:12:47 -0000 Subject: [llvm-commits] [llvm] r143421 - in /llvm/trunk/test/DebugInfo: X86/stringpool.ll stringpool.ll Message-ID: <20111101031247.588373524002@llvm.org> Author: efriedma Date: Mon Oct 31 22:12:47 2011 New Revision: 143421 URL: http://llvm.org/viewvc/llvm-project?rev=143421&view=rev Log: Move another test requiring x86 into X86 directory. Added: llvm/trunk/test/DebugInfo/X86/stringpool.ll - copied unchanged from r143419, llvm/trunk/test/DebugInfo/stringpool.ll Removed: llvm/trunk/test/DebugInfo/stringpool.ll Removed: llvm/trunk/test/DebugInfo/stringpool.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/stringpool.ll?rev=143420&view=auto ============================================================================== --- llvm/trunk/test/DebugInfo/stringpool.ll (original) +++ llvm/trunk/test/DebugInfo/stringpool.ll (removed) @@ -1,44 +0,0 @@ -; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s --check-prefix=LINUX -; RUN: llc -mtriple=x86_64-darwin < %s | FileCheck %s --check-prefix=DARWIN - - at yyyy = common global i32 0, align 4 - -!llvm.dbg.cu = !{!0} - -!0 = metadata !{i32 720913, i32 0, i32 12, metadata !"z.c", metadata !"/home/nicholas", metadata !"clang version 3.1 (trunk 143009)", i1 true, i1 true, metadata !"", i32 0, metadata !1, metadata !1, metadata !1, metadata !3} ; [ DW_TAG_compile_unit ] -!1 = metadata !{metadata !2} -!2 = metadata !{i32 0} -!3 = metadata !{metadata !4} -!4 = metadata !{metadata !5} -!5 = metadata !{i32 720948, i32 0, null, metadata !"yyyy", metadata !"yyyy", metadata !"", metadata !6, i32 1, metadata !7, i32 0, i32 1, i32* @yyyy} ; [ DW_TAG_variable ] -!6 = metadata !{i32 720937, metadata !"z.c", metadata !"/home/nicholas", null} ; [ DW_TAG_file_type ] -!7 = metadata !{i32 720932, null, metadata !"int", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] - -; Verify that we refer to 'yyyy' with a relocation. -; LINUX: .long .Lstring3 # DW_AT_name -; LINUX-NEXT: .long 39 # DW_AT_type -; LINUX-NEXT: .byte 1 # DW_AT_external -; LINUX-NEXT: .byte 1 # DW_AT_decl_file -; LINUX-NEXT: .byte 1 # DW_AT_decl_line -; LINUX-NEXT: .byte 9 # DW_AT_location -; LINUX-NEXT: .byte 3 -; LINUX-NEXT: .quad yyyy - -; Verify that we refer to 'yyyy' without a relocation. -; DARWIN: Lset5 = Lstring3-Lsection_str ## DW_AT_name -; DARWIN-NEXT: .long Lset5 -; DARWIN-NEXT: .long 39 ## DW_AT_type -; DARWIN-NEXT: .byte 1 ## DW_AT_external -; DARWIN-NEXT: .byte 1 ## DW_AT_decl_file -; DARWIN-NEXT: .byte 1 ## DW_AT_decl_line -; DARWIN-NEXT: .byte 9 ## DW_AT_location -; DARWIN-NEXT: .byte 3 -; DARWIN-NEXT: .quad _yyyy - -; Verify that "yyyy" ended up in the stringpool. -; LINUX: .section .debug_str,"MS", at progbits,1 -; LINUX-NOT: .section -; LINUX: yyyy -; DARWIN: .section __DWARF,__debug_str,regular,debug -; DARWIN-NOT: .section -; DARWIN: yyyy From eli.friedman at gmail.com Mon Oct 31 22:21:17 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Tue, 01 Nov 2011 03:21:17 -0000 Subject: [llvm-commits] [llvm] r143422 - /llvm/trunk/test/Object/TestObjectFiles/ Message-ID: <20111101032117.D0F6E2A6C12C@llvm.org> Author: efriedma Date: Mon Oct 31 22:21:17 2011 New Revision: 143422 URL: http://llvm.org/viewvc/llvm-project?rev=143422&view=rev Log: Remove empty directory. Removed: llvm/trunk/test/Object/TestObjectFiles/ From eli.friedman at gmail.com Mon Oct 31 22:21:49 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Tue, 01 Nov 2011 03:21:49 -0000 Subject: [llvm-commits] [llvm] r143424 - in /llvm/trunk/test/Object: X86/ X86/dg.exp X86/objdump-disassembly-inline-relocations.test X86/objdump-trivial-object.test objdump-disassembly-inline-relocations.test objdump-trivial-object.test Message-ID: <20111101032149.13E8F3524002@llvm.org> Author: efriedma Date: Mon Oct 31 22:21:48 2011 New Revision: 143424 URL: http://llvm.org/viewvc/llvm-project?rev=143424&view=rev Log: Move x86-specific tests into X86 folder. Added: llvm/trunk/test/Object/X86/ llvm/trunk/test/Object/X86/dg.exp llvm/trunk/test/Object/X86/objdump-disassembly-inline-relocations.test - copied, changed from r143419, llvm/trunk/test/Object/objdump-disassembly-inline-relocations.test llvm/trunk/test/Object/X86/objdump-trivial-object.test - copied, changed from r143419, llvm/trunk/test/Object/objdump-trivial-object.test Removed: llvm/trunk/test/Object/objdump-disassembly-inline-relocations.test llvm/trunk/test/Object/objdump-trivial-object.test Added: llvm/trunk/test/Object/X86/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/X86/dg.exp?rev=143424&view=auto ============================================================================== --- llvm/trunk/test/Object/X86/dg.exp (added) +++ llvm/trunk/test/Object/X86/dg.exp Mon Oct 31 22:21:48 2011 @@ -0,0 +1,5 @@ +load_lib llvm.exp + +if { [llvm_supports_target X86] } { + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{test}]] +} Copied: llvm/trunk/test/Object/X86/objdump-disassembly-inline-relocations.test (from r143419, llvm/trunk/test/Object/objdump-disassembly-inline-relocations.test) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/X86/objdump-disassembly-inline-relocations.test?p2=llvm/trunk/test/Object/X86/objdump-disassembly-inline-relocations.test&p1=llvm/trunk/test/Object/objdump-disassembly-inline-relocations.test&r1=143419&r2=143424&rev=143424&view=diff ============================================================================== --- llvm/trunk/test/Object/objdump-disassembly-inline-relocations.test (original) +++ llvm/trunk/test/Object/X86/objdump-disassembly-inline-relocations.test Mon Oct 31 22:21:48 2011 @@ -1,6 +1,6 @@ -RUN: llvm-objdump -d -r %p/Inputs/trivial-object-test.coff-i386 \ +RUN: llvm-objdump -d -r %p/../Inputs/trivial-object-test.coff-i386 \ RUN: | FileCheck %s -check-prefix COFF-i386 -RUN: llvm-objdump -d -r %p/Inputs/trivial-object-test.coff-x86-64 \ +RUN: llvm-objdump -d -r %p/../Inputs/trivial-object-test.coff-x86-64 \ RUN: | FileCheck %s -check-prefix COFF-x86-64 COFF-i386: file format COFF-i386 Copied: llvm/trunk/test/Object/X86/objdump-trivial-object.test (from r143419, llvm/trunk/test/Object/objdump-trivial-object.test) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/X86/objdump-trivial-object.test?p2=llvm/trunk/test/Object/X86/objdump-trivial-object.test&p1=llvm/trunk/test/Object/objdump-trivial-object.test&r1=143419&r2=143424&rev=143424&view=diff ============================================================================== --- llvm/trunk/test/Object/objdump-trivial-object.test (original) +++ llvm/trunk/test/Object/X86/objdump-trivial-object.test Mon Oct 31 22:21:48 2011 @@ -1,10 +1,10 @@ -RUN: llvm-objdump -d %p/Inputs/trivial-object-test.coff-i386 \ +RUN: llvm-objdump -d %p/../Inputs/trivial-object-test.coff-i386 \ RUN: | FileCheck %s -check-prefix COFF-i386 -RUN: llvm-objdump -d %p/Inputs/trivial-object-test.coff-x86-64 \ +RUN: llvm-objdump -d %p/../Inputs/trivial-object-test.coff-x86-64 \ RUN: | FileCheck %s -check-prefix COFF-x86-64 -RUN: llvm-objdump -d %p/Inputs/trivial-object-test.elf-i386 \ +RUN: llvm-objdump -d %p/../Inputs/trivial-object-test.elf-i386 \ RUN: | FileCheck %s -check-prefix ELF-i386 -RUN: llvm-objdump -d %p/Inputs/trivial-object-test.elf-x86-64 \ +RUN: llvm-objdump -d %p/../Inputs/trivial-object-test.elf-x86-64 \ RUN: | FileCheck %s -check-prefix ELF-x86-64 COFF-i386: file format COFF-i386 Removed: llvm/trunk/test/Object/objdump-disassembly-inline-relocations.test URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/objdump-disassembly-inline-relocations.test?rev=143423&view=auto ============================================================================== --- llvm/trunk/test/Object/objdump-disassembly-inline-relocations.test (original) +++ llvm/trunk/test/Object/objdump-disassembly-inline-relocations.test (removed) @@ -1,32 +0,0 @@ -RUN: llvm-objdump -d -r %p/Inputs/trivial-object-test.coff-i386 \ -RUN: | FileCheck %s -check-prefix COFF-i386 -RUN: llvm-objdump -d -r %p/Inputs/trivial-object-test.coff-x86-64 \ -RUN: | FileCheck %s -check-prefix COFF-x86-64 - -COFF-i386: file format COFF-i386 -COFF-i386: Disassembly of section .text: -COFF-i386: 0: 83 ec 0c subl $12, %esp -COFF-i386: 3: c7 44 24 08 00 00 00 00 movl $0, 8(%esp) -COFF-i386: b: c7 04 24 00 00 00 00 movl $0, (%esp) -COFF-i386: e: IMAGE_REL_I386_DIR32 L_.str -COFF-i386: 12: e8 00 00 00 00 calll 0 -COFF-i386: 13: IMAGE_REL_I386_REL32 _puts -COFF-i386: 17: e8 00 00 00 00 calll 0 -COFF-i386: 18: IMAGE_REL_I386_REL32 _SomeOtherFunction -COFF-i386: 1c: 8b 44 24 08 movl 8(%esp), %eax -COFF-i386: 20: 83 c4 0c addl $12, %esp -COFF-i386: 23: c3 ret - -COFF-x86-64: file format COFF-x86-64 -COFF-x86-64: Disassembly of section .text: -COFF-x86-64: 0: 48 83 ec 28 subq $40, %rsp -COFF-x86-64: 4: c7 44 24 24 00 00 00 00 movl $0, 36(%rsp) -COFF-x86-64: c: 48 8d 0d 00 00 00 00 leaq (%rip), %rcx -COFF-x86-64: f: IMAGE_REL_AMD64_REL32 L.str -COFF-x86-64: 13: e8 00 00 00 00 callq 0 -COFF-x86-64: 14: IMAGE_REL_AMD64_REL32 puts -COFF-x86-64: 18: e8 00 00 00 00 callq 0 -COFF-x86-64: 19: IMAGE_REL_AMD64_REL32 SomeOtherFunction -COFF-x86-64: 1d: 8b 44 24 24 movl 36(%rsp), %eax -COFF-x86-64: 21: 48 83 c4 28 addq $40, %rsp -COFF-x86-64: 25: c3 ret Removed: llvm/trunk/test/Object/objdump-trivial-object.test URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/objdump-trivial-object.test?rev=143423&view=auto ============================================================================== --- llvm/trunk/test/Object/objdump-trivial-object.test (original) +++ llvm/trunk/test/Object/objdump-trivial-object.test (removed) @@ -1,54 +0,0 @@ -RUN: llvm-objdump -d %p/Inputs/trivial-object-test.coff-i386 \ -RUN: | FileCheck %s -check-prefix COFF-i386 -RUN: llvm-objdump -d %p/Inputs/trivial-object-test.coff-x86-64 \ -RUN: | FileCheck %s -check-prefix COFF-x86-64 -RUN: llvm-objdump -d %p/Inputs/trivial-object-test.elf-i386 \ -RUN: | FileCheck %s -check-prefix ELF-i386 -RUN: llvm-objdump -d %p/Inputs/trivial-object-test.elf-x86-64 \ -RUN: | FileCheck %s -check-prefix ELF-x86-64 - -COFF-i386: file format COFF-i386 -COFF-i386: Disassembly of section .text: -COFF-i386: 0: 83 ec 0c subl $12, %esp -COFF-i386: 3: c7 44 24 08 00 00 00 00 movl $0, 8(%esp) -COFF-i386: b: c7 04 24 00 00 00 00 movl $0, (%esp) -COFF-i386: 12: e8 00 00 00 00 calll 0 -COFF-i386: 17: e8 00 00 00 00 calll 0 -COFF-i386: 1c: 8b 44 24 08 movl 8(%esp), %eax -COFF-i386: 20: 83 c4 0c addl $12, %esp -COFF-i386: 23: c3 ret - -COFF-x86-64: file format COFF-x86-64 -COFF-x86-64: Disassembly of section .text: -COFF-x86-64: 0: 48 83 ec 28 subq $40, %rsp -COFF-x86-64: 4: c7 44 24 24 00 00 00 00 movl $0, 36(%rsp) -COFF-x86-64: c: 48 8d 0d 00 00 00 00 leaq (%rip), %rcx -COFF-x86-64: 13: e8 00 00 00 00 callq 0 -COFF-x86-64: 18: e8 00 00 00 00 callq 0 -COFF-x86-64: 1d: 8b 44 24 24 movl 36(%rsp), %eax -COFF-x86-64: 21: 48 83 c4 28 addq $40, %rsp -COFF-x86-64: 25: c3 ret - - -ELF-i386: file format ELF32-i386 -ELF-i386: Disassembly of section .text: -ELF-i386: 0: 83 ec 0c subl $12, %esp -ELF-i386: 3: c7 44 24 08 00 00 00 00 movl $0, 8(%esp) -ELF-i386: b: c7 04 24 00 00 00 00 movl $0, (%esp) -ELF-i386: 12: e8 fc ff ff ff calll -4 -ELF-i386: 17: e8 fc ff ff ff calll -4 -ELF-i386: 1c: 8b 44 24 08 movl 8(%esp), %eax -ELF-i386: 20: 83 c4 0c addl $12, %esp -ELF-i386: 23: c3 ret - -ELF-x86-64: file format ELF64-x86-64 -ELF-x86-64: Disassembly of section .text: -ELF-x86-64: 0: 48 83 ec 08 subq $8, %rsp -ELF-x86-64: 4: c7 44 24 04 00 00 00 00 movl $0, 4(%rsp) -ELF-x86-64: c: bf 00 00 00 00 movl $0, %edi -ELF-x86-64: 11: e8 00 00 00 00 callq 0 -ELF-x86-64: 16: 30 c0 xorb %al, %al -ELF-x86-64: 18: e8 00 00 00 00 callq 0 -ELF-x86-64: 1d: 8b 44 24 04 movl 4(%rsp), %eax -ELF-x86-64: 21: 48 83 c4 08 addq $8, %rsp -ELF-x86-64: 25: c3 ret From isanbard at gmail.com Mon Oct 31 23:08:23 2011 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 01 Nov 2011 04:08:23 -0000 Subject: [llvm-commits] [llvm] r143431 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20111101040823.C2FBF3524002@llvm.org> Author: void Date: Mon Oct 31 23:08:23 2011 New Revision: 143431 URL: http://llvm.org/viewvc/llvm-project?rev=143431&view=rev Log: Add LuaAV to external projects list. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=143431&r1=143430&r2=143431&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Mon Oct 31 23:08:23 2011 @@ -418,6 +418,19 @@ +

    LuaAV

    + +
    + +

    LuaAV is a real-time + audiovisual scripting environment based around the Lua language and a + collection of libraries for sound, graphics, and other media protocols. LuaAV + uses LLVM and Clang to JIT compile efficient user-defined audio synthesis + routines specified in a declarative syntax.

    + +
    + +

    Mono

    From isanbard at gmail.com Mon Oct 31 23:18:24 2011 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 01 Nov 2011 04:18:24 -0000 Subject: [llvm-commits] [dragonegg] r143434 - in /dragonegg/branches/release_30: ./ src/Convert.cpp Message-ID: <20111101041824.5CCCC3524002@llvm.org> Author: void Date: Mon Oct 31 23:18:24 2011 New Revision: 143434 URL: http://llvm.org/viewvc/llvm-project?rev=143434&view=rev Log: Merging r143357: ------------------------------------------------------------------------ r143357 | baldrick | 2011-10-31 13:07:09 -0700 (Mon, 31 Oct 2011) | 5 lines Fix a compile failure on 483.xalancbmk, caused by a minor GCC bug: what should be the same type in the caller and callee are two different (but equivalent) types (and not just variants of each other). ------------------------------------------------------------------------ Modified: dragonegg/branches/release_30/ (props changed) dragonegg/branches/release_30/src/Convert.cpp Propchange: dragonegg/branches/release_30/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Mon Oct 31 23:18:24 2011 @@ -1 +1 @@ -/dragonegg/trunk:142351,142575,142651 +/dragonegg/trunk:142351,142575,142651,143357 Modified: dragonegg/branches/release_30/src/Convert.cpp URL: http://llvm.org/viewvc/llvm-project/dragonegg/branches/release_30/src/Convert.cpp?rev=143434&r1=143433&r2=143434&view=diff ============================================================================== --- dragonegg/branches/release_30/src/Convert.cpp (original) +++ dragonegg/branches/release_30/src/Convert.cpp Mon Oct 31 23:18:24 2011 @@ -2802,6 +2802,20 @@ Client.clear(); } + // If the caller and callee disagree about a parameter type but the difference + // is trivial, correct the type used by the caller. + for (unsigned i = 0, e = std::min((unsigned)CallOperands.size(), + FTy->getNumParams()); + i != e; ++i) { + Type *ExpectedTy = FTy->getParamType(i); + Type *ActualTy = CallOperands[i]->getType(); + if (ActualTy == ExpectedTy) + continue; + assert(isa(ActualTy) && isa(ExpectedTy) && + "Type difference is not trivial!"); + CallOperands[i] = Builder.CreateBitCast(CallOperands[i], ExpectedTy); + } + // Unlike LLVM, GCC does not require that call statements provide a value for // every function argument (it passes rubbish for arguments with no value). // To get the same effect we pass 'undef' for any unspecified arguments. From eli.friedman at gmail.com Mon Oct 31 23:40:56 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Tue, 01 Nov 2011 04:40:56 -0000 Subject: [llvm-commits] [llvm] r143435 - /llvm/trunk/tools/bugpoint/CrashDebugger.cpp Message-ID: <20111101044056.882F43524002@llvm.org> Author: efriedma Date: Mon Oct 31 23:40:56 2011 New Revision: 143435 URL: http://llvm.org/viewvc/llvm-project?rev=143435&view=rev Log: A couple misc fixes so that bugpoint doesn't explode reducing code containing landingpads. Modified: llvm/trunk/tools/bugpoint/CrashDebugger.cpp Modified: llvm/trunk/tools/bugpoint/CrashDebugger.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/CrashDebugger.cpp?rev=143435&r1=143434&r2=143435&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/CrashDebugger.cpp (original) +++ llvm/trunk/tools/bugpoint/CrashDebugger.cpp Mon Oct 31 23:40:56 2011 @@ -401,7 +401,8 @@ for (Function::iterator FI = MI->begin(), FE = MI->end(); FI != FE; ++FI) for (BasicBlock::iterator I = FI->begin(), E = FI->end(); I != E;) { Instruction *Inst = I++; - if (!Instructions.count(Inst) && !isa(Inst)) { + if (!Instructions.count(Inst) && !isa(Inst) && + !isa(Inst)) { if (!Inst->getType()->isVoidTy()) Inst->replaceAllUsesWith(UndefValue::get(Inst->getType())); Inst->eraseFromParent(); @@ -574,6 +575,9 @@ } else { if (BugpointIsInterrupted) goto ExitLoops; + if (isa(I)) + continue; + outs() << "Checking instruction: " << *I; Module *M = BD.deleteInstructionFromProgram(I, Simplification); From eli.friedman at gmail.com Mon Oct 31 23:49:29 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Tue, 01 Nov 2011 04:49:29 -0000 Subject: [llvm-commits] [llvm] r143437 - in /llvm/trunk: lib/Transforms/InstCombine/InstructionCombining.cpp test/Transforms/InstCombine/crash.ll Message-ID: <20111101044929.AC5CA2A6C12C@llvm.org> Author: efriedma Date: Mon Oct 31 23:49:29 2011 New Revision: 143437 URL: http://llvm.org/viewvc/llvm-project?rev=143437&view=rev Log: Make sure we use the right insertion point when instcombine replaces a PHI with another instruction. (Specifically, don't insert an arbitrary instruction before a PHI.) Fixes PR11275. Modified: llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp llvm/trunk/test/Transforms/InstCombine/crash.ll Modified: llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp?rev=143437&r1=143436&r2=143437&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp Mon Oct 31 23:49:29 2011 @@ -2028,9 +2028,10 @@ BasicBlock *InstParent = I->getParent(); BasicBlock::iterator InsertPos = I; - if (!isa(Result)) // If combining a PHI, don't insert - while (isa(InsertPos)) // middle of a block of PHIs. - ++InsertPos; + // If we replace a PHI with something that isn't a PHI, fix up the + // insertion point. + if (!isa(Result) && isa(InsertPos)) + InsertPos = InstParent->getFirstInsertionPt(); InstParent->getInstList().insert(InsertPos, Result); Modified: llvm/trunk/test/Transforms/InstCombine/crash.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/crash.ll?rev=143437&r1=143436&r2=143437&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/crash.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/crash.ll Mon Oct 31 23:49:29 2011 @@ -374,3 +374,28 @@ return: ; No predecessors! ret void } + +; PR11275 +declare void @test18b() noreturn +declare void @test18foo(double**) +declare void @test18a() noreturn +define fastcc void @test18x(i8* %t0, i1 %b) uwtable align 2 { +entry: + br i1 %b, label %e1, label %e2 +e1: + %t2 = bitcast i8* %t0 to double** + invoke void @test18b() noreturn + to label %u unwind label %lpad +e2: + %t4 = bitcast i8* %t0 to double** + invoke void @test18a() noreturn + to label %u unwind label %lpad +lpad: + %t5 = phi double** [ %t2, %e1 ], [ %t4, %e2 ] + %lpad.nonloopexit262 = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + cleanup + call void @test18foo(double** %t5) + unreachable +u: + unreachable +} From isanbard at gmail.com Mon Oct 31 23:53:17 2011 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 01 Nov 2011 04:53:17 -0000 Subject: [llvm-commits] [dragonegg] r143442 - /dragonegg/tags/RELEASE_30/rc2/ Message-ID: <20111101045317.A8A622A6C12C@llvm.org> Author: void Date: Mon Oct 31 23:53:17 2011 New Revision: 143442 URL: http://llvm.org/viewvc/llvm-project?rev=143442&view=rev Log: Creating release candidate 2 from release_30 branch Added: dragonegg/tags/RELEASE_30/rc2/ (props changed) - copied from r143441, dragonegg/branches/release_30/ Propchange: dragonegg/tags/RELEASE_30/rc2/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Mon Oct 31 23:53:17 2011 @@ -0,0 +1,2 @@ +*.d +target Propchange: dragonegg/tags/RELEASE_30/rc2/ ------------------------------------------------------------------------------ svn:mergeinfo = /dragonegg/trunk:142351,142575,142651,143357 From isanbard at gmail.com Mon Oct 31 23:53:26 2011 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 01 Nov 2011 04:53:26 -0000 Subject: [llvm-commits] [test-suite] r143443 - /test-suite/tags/RELEASE_30/rc2/ Message-ID: <20111101045326.58B523524002@llvm.org> Author: void Date: Mon Oct 31 23:53:26 2011 New Revision: 143443 URL: http://llvm.org/viewvc/llvm-project?rev=143443&view=rev Log: Creating release candidate 2 from release_30 branch Added: test-suite/tags/RELEASE_30/rc2/ (props changed) - copied from r143442, test-suite/branches/release_30/ Propchange: test-suite/tags/RELEASE_30/rc2/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Mon Oct 31 23:53:26 2011 @@ -0,0 +1,4 @@ +Makefile.config +config.log +config.status +mklib Propchange: test-suite/tags/RELEASE_30/rc2/ ------------------------------------------------------------------------------ svn:mergeinfo = /test-suite/trunk:142659 From isanbard at gmail.com Mon Oct 31 23:53:34 2011 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 01 Nov 2011 04:53:34 -0000 Subject: [llvm-commits] [compiler-rt] r143444 - /compiler-rt/tags/RELEASE_30/rc2/ Message-ID: <20111101045334.E388B2A6C12C@llvm.org> Author: void Date: Mon Oct 31 23:53:34 2011 New Revision: 143444 URL: http://llvm.org/viewvc/llvm-project?rev=143444&view=rev Log: Creating release candidate 2 from release_30 branch Added: compiler-rt/tags/RELEASE_30/rc2/ - copied from r143443, compiler-rt/branches/release_30/ From eli.friedman at gmail.com Tue Nov 1 00:11:02 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Tue, 01 Nov 2011 05:11:02 -0000 Subject: [llvm-commits] [llvm] r143452 - in /llvm/trunk: include/llvm/Support/PathV1.h lib/Support/Path.cpp lib/Support/Unix/Path.inc lib/Support/Windows/Path.inc Message-ID: <20111101051102.789493524002@llvm.org> Author: efriedma Date: Tue Nov 1 00:11:01 2011 New Revision: 143452 URL: http://llvm.org/viewvc/llvm-project?rev=143452&view=rev Log: Remove a couple unused methods. PR11201. Modified: llvm/trunk/include/llvm/Support/PathV1.h llvm/trunk/lib/Support/Path.cpp llvm/trunk/lib/Support/Unix/Path.inc llvm/trunk/lib/Support/Windows/Path.inc Modified: llvm/trunk/include/llvm/Support/PathV1.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/PathV1.h?rev=143452&r1=143451&r2=143452&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/PathV1.h (original) +++ llvm/trunk/include/llvm/Support/PathV1.h Tue Nov 1 00:11:01 2011 @@ -131,20 +131,6 @@ /// @brief Find a library. static Path FindLibrary(std::string& short_name); - /// Construct a path to the default LLVM configuration directory. The - /// implementation must ensure that this is a well-known (same on many - /// systems) directory in which llvm configuration files exist. For - /// example, on Unix, the /etc/llvm directory has been selected. - /// @brief Construct a path to the default LLVM configuration directory - static Path GetLLVMDefaultConfigDir(); - - /// Construct a path to the LLVM installed configuration directory. The - /// implementation must ensure that this refers to the "etc" directory of - /// the LLVM installation. This is the location where configuration files - /// will be located for a particular installation of LLVM on a machine. - /// @brief Construct a path to the LLVM installed configuration directory - static Path GetLLVMConfigDir(); - /// Construct a path to the current user's home directory. The /// implementation must use an operating system specific mechanism for /// determining the user's home directory. For example, the environment Modified: llvm/trunk/lib/Support/Path.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Path.cpp?rev=143452&r1=143451&r2=143452&view=diff ============================================================================== --- llvm/trunk/lib/Support/Path.cpp (original) +++ llvm/trunk/lib/Support/Path.cpp Tue Nov 1 00:11:01 2011 @@ -38,16 +38,6 @@ return path < that.path; } -Path -Path::GetLLVMConfigDir() { - Path result; -#ifdef LLVM_ETCDIR - if (result.set(LLVM_ETCDIR)) - return result; -#endif - return GetLLVMDefaultConfigDir(); -} - LLVMFileType sys::IdentifyFileType(const char *magic, unsigned length) { assert(magic && "Invalid magic number string"); Modified: llvm/trunk/lib/Support/Unix/Path.inc URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Path.inc?rev=143452&r1=143451&r2=143452&view=diff ============================================================================== --- llvm/trunk/lib/Support/Unix/Path.inc (original) +++ llvm/trunk/lib/Support/Unix/Path.inc Tue Nov 1 00:11:01 2011 @@ -235,11 +235,6 @@ } Path -Path::GetLLVMDefaultConfigDir() { - return Path("/etc/llvm/"); -} - -Path Path::GetUserHomeDirectory() { const char* home = getenv("HOME"); Path result; Modified: llvm/trunk/lib/Support/Windows/Path.inc URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Path.inc?rev=143452&r1=143451&r2=143452&view=diff ============================================================================== --- llvm/trunk/lib/Support/Windows/Path.inc (original) +++ llvm/trunk/lib/Support/Windows/Path.inc Tue Nov 1 00:11:01 2011 @@ -277,14 +277,6 @@ } Path -Path::GetLLVMDefaultConfigDir() { - Path ret = GetUserHomeDirectory(); - if (!ret.appendComponent(".llvm")) - assert(0 && "Failed to append .llvm"); - return ret; -} - -Path Path::GetUserHomeDirectory() { char buff[MAX_PATH]; HRESULT res = SHGetFolderPathA(NULL, From baldrick at free.fr Tue Nov 1 01:56:10 2011 From: baldrick at free.fr (Duncan Sands) Date: Tue, 01 Nov 2011 07:56:10 +0100 Subject: [llvm-commits] [LLVM, SwitchInst, case ranges] Auxiliary patch #1 In-Reply-To: References: <4EAA9B5D.802@narod.ru> <4EAA9DE8.80000@free.fr> <485181319805488@web67.yandex.ru> <4EAB079D.6000606@free.fr> Message-ID: <4EAF980A.4010206@free.fr> Hi Anton, >> be the opposite: they might make switches harder to work with and reason about >> for no advantage. Which is it? Do you have an example where case ranges would >> result in better code, or make it easier to produce better code? > I think the typical example is some code which produces large > switches. In the frontend we > won't emit such large switches and end with explicit comparisons instead. > > Do you have some example of this from Ada world? I believe I saw > something like this in Polyhedron, but I'm not sure. this happens all the time with Ada, for example with ranges like "all negative numbers". Currently the front-end emits explicit compares and branches for the big ranges (more than 64 cases), and a switch for the rest. If LLVM switches had ranges, would LLVM produce better code for this kind of thing? Ciao, Duncan. From craig.topper at gmail.com Tue Nov 1 02:25:23 2011 From: craig.topper at gmail.com (Craig Topper) Date: Tue, 01 Nov 2011 07:25:23 -0000 Subject: [llvm-commits] [llvm] r143455 - in /llvm/trunk: include/llvm/IntrinsicsX86.td test/CodeGen/X86/avx-intrinsics-x86.ll Message-ID: <20111101072523.88EF52A6C12C@llvm.org> Author: ctopper Date: Tue Nov 1 02:25:22 2011 New Revision: 143455 URL: http://llvm.org/viewvc/llvm-project?rev=143455&view=rev Log: Fix operand type for x86 pmadd_ub_sw intrinsic. Modified: llvm/trunk/include/llvm/IntrinsicsX86.td llvm/trunk/test/CodeGen/X86/avx-intrinsics-x86.ll Modified: llvm/trunk/include/llvm/IntrinsicsX86.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IntrinsicsX86.td?rev=143455&r1=143454&r2=143455&view=diff ============================================================================== --- llvm/trunk/include/llvm/IntrinsicsX86.td (original) +++ llvm/trunk/include/llvm/IntrinsicsX86.td Tue Nov 1 02:25:22 2011 @@ -655,8 +655,8 @@ Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], [IntrNoMem]>; def int_x86_ssse3_pmadd_ub_sw_128 : GCCBuiltin<"__builtin_ia32_pmaddubsw128">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_v8i16_ty], [IntrNoMem]>; + Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty, + llvm_v16i8_ty], [IntrNoMem]>; } // Packed multiply high with round and scale Modified: llvm/trunk/test/CodeGen/X86/avx-intrinsics-x86.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx-intrinsics-x86.ll?rev=143455&r1=143454&r2=143455&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/avx-intrinsics-x86.ll (original) +++ llvm/trunk/test/CodeGen/X86/avx-intrinsics-x86.ll Tue Nov 1 02:25:22 2011 @@ -1783,12 +1783,12 @@ declare <8 x i16> @llvm.x86.ssse3.phsub.w.128(<8 x i16>, <8 x i16>) nounwind readnone -define <8 x i16> @test_x86_ssse3_pmadd_ub_sw_128(<8 x i16> %a0, <8 x i16> %a1) { +define <8 x i16> @test_x86_ssse3_pmadd_ub_sw_128(<16 x i8> %a0, <16 x i8> %a1) { ; CHECK: vpmaddubsw - %res = call <8 x i16> @llvm.x86.ssse3.pmadd.ub.sw.128(<8 x i16> %a0, <8 x i16> %a1) ; <<8 x i16>> [#uses=1] + %res = call <8 x i16> @llvm.x86.ssse3.pmadd.ub.sw.128(<16 x i8> %a0, <16 x i8> %a1) ; <<8 x i16>> [#uses=1] ret <8 x i16> %res } -declare <8 x i16> @llvm.x86.ssse3.pmadd.ub.sw.128(<8 x i16>, <8 x i16>) nounwind readnone +declare <8 x i16> @llvm.x86.ssse3.pmadd.ub.sw.128(<16 x i8>, <16 x i8>) nounwind readnone define <8 x i16> @test_x86_ssse3_pmul_hr_sw_128(<8 x i16> %a0, <8 x i16> %a1) { From baldrick at free.fr Tue Nov 1 04:22:51 2011 From: baldrick at free.fr (Duncan Sands) Date: Tue, 01 Nov 2011 09:22:51 -0000 Subject: [llvm-commits] [test-suite] r143456 - in /test-suite/trunk: Makefile.dummylib MultiSource/Makefile.multisrc Message-ID: <20111101092251.733523524002@llvm.org> Author: baldrick Date: Tue Nov 1 04:22:51 2011 New Revision: 143456 URL: http://llvm.org/viewvc/llvm-project?rev=143456&view=rev Log: In two cases where llvm-ld is being used as a simple bitcode linker use llvm-link instead. It's not clear where llvm-ld is going: if it will be removed or turned into a real linker. Whichever one it is it seems pointless to use it for this. Modified: test-suite/trunk/Makefile.dummylib 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=143456&r1=143455&r2=143456&view=diff ============================================================================== --- test-suite/trunk/Makefile.dummylib (original) +++ test-suite/trunk/Makefile.dummylib Tue Nov 1 04:22:51 2011 @@ -20,4 +20,4 @@ LINKED_PROGS := $(PROGRAMS_TO_TEST:%=Output/%.lib.bc) $(LINKED_PROGS): Output/%.lib.bc: Output/%.llvm.bc $(DUMMYLIB) - $(LLVMLD) --link-as-library $< $(DUMMYLIB) -o $@ + $(LLINK) $< $(DUMMYLIB) -o $@ Modified: test-suite/trunk/MultiSource/Makefile.multisrc URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Makefile.multisrc?rev=143456&r1=143455&r2=143456&view=diff ============================================================================== --- test-suite/trunk/MultiSource/Makefile.multisrc (original) +++ test-suite/trunk/MultiSource/Makefile.multisrc Tue Nov 1 04:22:51 2011 @@ -75,8 +75,8 @@ ifndef USE_PRECOMPILED_BYTECODE $(PROGRAMS_TO_TEST:%=Output/%.linked.rbc): \ -Output/%.linked.rbc: $(LObjects) $(LLVMLD) - -$(LLVMLD) -link-as-library -disable-opt $(LObjects) -o $@ +Output/%.linked.rbc: $(LObjects) $(LLINK) + -$(LLINK) $(LObjects) -o $@ $(PROGRAMS_TO_TEST:%=Output/%.LOC.txt): \ Output/%.LOC.txt: $(Source) From richard at xmos.com Tue Nov 1 05:41:28 2011 From: richard at xmos.com (Richard Osborne) Date: Tue, 01 Nov 2011 10:41:28 -0000 Subject: [llvm-commits] [llvm] r143457 - in /llvm/trunk/test/CodeGen/XCore: cos.ll exp.ll exp2.ll fneg.ll getid.ll load.ll log.ll log10.ll log2.ll pow.ll powi.ll private.ll sin.ll sqrt.ll store.ll trap.ll unaligned_store_combine.ll Message-ID: <20111101104129.121FB2A6C12C@llvm.org> Author: friedgold Date: Tue Nov 1 05:41:28 2011 New Revision: 143457 URL: http://llvm.org/viewvc/llvm-project?rev=143457&view=rev Log: Move various XCore tests to FileCheck Modified: llvm/trunk/test/CodeGen/XCore/cos.ll llvm/trunk/test/CodeGen/XCore/exp.ll llvm/trunk/test/CodeGen/XCore/exp2.ll llvm/trunk/test/CodeGen/XCore/fneg.ll llvm/trunk/test/CodeGen/XCore/getid.ll llvm/trunk/test/CodeGen/XCore/load.ll llvm/trunk/test/CodeGen/XCore/log.ll llvm/trunk/test/CodeGen/XCore/log10.ll llvm/trunk/test/CodeGen/XCore/log2.ll llvm/trunk/test/CodeGen/XCore/pow.ll llvm/trunk/test/CodeGen/XCore/powi.ll llvm/trunk/test/CodeGen/XCore/private.ll llvm/trunk/test/CodeGen/XCore/sin.ll llvm/trunk/test/CodeGen/XCore/sqrt.ll llvm/trunk/test/CodeGen/XCore/store.ll llvm/trunk/test/CodeGen/XCore/trap.ll llvm/trunk/test/CodeGen/XCore/unaligned_store_combine.ll Modified: llvm/trunk/test/CodeGen/XCore/cos.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/cos.ll?rev=143457&r1=143456&r2=143457&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/XCore/cos.ll (original) +++ llvm/trunk/test/CodeGen/XCore/cos.ll Tue Nov 1 05:41:28 2011 @@ -1,15 +1,17 @@ -; RUN: llc < %s -march=xcore > %t1.s -; RUN: grep "bl cosf" %t1.s | count 1 -; RUN: grep "bl cos" %t1.s | count 2 +; RUN: llc < %s -march=xcore | FileCheck %s declare double @llvm.cos.f64(double) define double @test(double %F) { +; CHECK: test: +; CHECK: bl cos %result = call double @llvm.cos.f64(double %F) ret double %result } declare float @llvm.cos.f32(float) +; CHECK: testf: +; CHECK: bl cosf define float @testf(float %F) { %result = call float @llvm.cos.f32(float %F) ret float %result Modified: llvm/trunk/test/CodeGen/XCore/exp.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/exp.ll?rev=143457&r1=143456&r2=143457&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/XCore/exp.ll (original) +++ llvm/trunk/test/CodeGen/XCore/exp.ll Tue Nov 1 05:41:28 2011 @@ -1,9 +1,9 @@ -; RUN: llc < %s -march=xcore > %t1.s -; RUN: grep "bl expf" %t1.s | count 1 -; RUN: grep "bl exp" %t1.s | count 2 +; RUN: llc < %s -march=xcore | FileCheck %s declare double @llvm.exp.f64(double) define double @test(double %F) { +; CHECK: test: +; CHECK: bl exp %result = call double @llvm.exp.f64(double %F) ret double %result } @@ -11,6 +11,8 @@ declare float @llvm.exp.f32(float) define float @testf(float %F) { +; CHECK: testf: +; CHECK: bl expf %result = call float @llvm.exp.f32(float %F) ret float %result } Modified: llvm/trunk/test/CodeGen/XCore/exp2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/exp2.ll?rev=143457&r1=143456&r2=143457&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/XCore/exp2.ll (original) +++ llvm/trunk/test/CodeGen/XCore/exp2.ll Tue Nov 1 05:41:28 2011 @@ -1,9 +1,9 @@ -; RUN: llc < %s -march=xcore > %t1.s -; RUN: grep "bl exp2f" %t1.s | count 1 -; RUN: grep "bl exp2" %t1.s | count 2 +; RUN: llc < %s -march=xcore | FileCheck %s declare double @llvm.exp2.f64(double) define double @test(double %F) { +; CHECK: test: +; CHECK: bl exp2 %result = call double @llvm.exp2.f64(double %F) ret double %result } @@ -11,6 +11,8 @@ declare float @llvm.exp2.f32(float) define float @testf(float %F) { +; CHECK: testf: +; CHECK: bl exp2f %result = call float @llvm.exp2.f32(float %F) ret float %result } Modified: llvm/trunk/test/CodeGen/XCore/fneg.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/fneg.ll?rev=143457&r1=143456&r2=143457&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/XCore/fneg.ll (original) +++ llvm/trunk/test/CodeGen/XCore/fneg.ll Tue Nov 1 05:41:28 2011 @@ -1,6 +1,8 @@ -; RUN: llc < %s -march=xcore | grep "xor" | count 1 +; RUN: llc < %s -march=xcore | FileCheck %s define i1 @test(double %F) nounwind { entry: +; CHECK: test: +; CHECK: xor %0 = fsub double -0.000000e+00, %F %1 = fcmp olt double 0.000000e+00, %0 ret i1 %1 Modified: llvm/trunk/test/CodeGen/XCore/getid.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/getid.ll?rev=143457&r1=143456&r2=143457&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/XCore/getid.ll (original) +++ llvm/trunk/test/CodeGen/XCore/getid.ll Tue Nov 1 05:41:28 2011 @@ -1,8 +1,10 @@ -; RUN: llc < %s -march=xcore > %t1.s -; RUN: grep "get r11, id" %t1.s | count 1 +; RUN: llc < %s -march=xcore | FileCheck %s declare i32 @llvm.xcore.getid() define i32 @test() { +; CHECK: test: +; CHECK: get r11, id +; CHECK-NEXT: mov r0, r11 %result = call i32 @llvm.xcore.getid() ret i32 %result } Modified: llvm/trunk/test/CodeGen/XCore/load.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/load.ll?rev=143457&r1=143456&r2=143457&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/XCore/load.ll (original) +++ llvm/trunk/test/CodeGen/XCore/load.ll Tue Nov 1 05:41:28 2011 @@ -1,15 +1,9 @@ -; RUN: llc < %s -march=xcore > %t1.s -; RUN: not grep add %t1.s -; RUN: not grep ldaw %t1.s -; RUN: not grep lda16 %t1.s -; RUN: not grep zext %t1.s -; RUN: not grep sext %t1.s -; RUN: grep "ldw" %t1.s | count 2 -; RUN: grep "ld16s" %t1.s | count 1 -; RUN: grep "ld8u" %t1.s | count 1 +; RUN: llc < %s -march=xcore | FileCheck %s define i32 @load32(i32* %p, i32 %offset) nounwind { entry: +; CHECK: load32: +; CHECK: ldw r0, r0[r1] %0 = getelementptr i32* %p, i32 %offset %1 = load i32* %0, align 4 ret i32 %1 @@ -17,6 +11,8 @@ define i32 @load32_imm(i32* %p) nounwind { entry: +; CHECK: load32_imm: +; CHECK: ldw r0, r0[11] %0 = getelementptr i32* %p, i32 11 %1 = load i32* %0, align 4 ret i32 %1 @@ -24,6 +20,9 @@ define i32 @load16(i16* %p, i32 %offset) nounwind { entry: +; CHECK: load16: +; CHECK: ld16s r0, r0[r1] +; CHECK-NOT: sext %0 = getelementptr i16* %p, i32 %offset %1 = load i16* %0, align 2 %2 = sext i16 %1 to i32 @@ -32,6 +31,9 @@ define i32 @load8(i8* %p, i32 %offset) nounwind { entry: +; CHECK: load8: +; CHECK: ld8u r0, r0[r1] +; CHECK-NOT: zext %0 = getelementptr i8* %p, i32 %offset %1 = load i8* %0, align 1 %2 = zext i8 %1 to i32 Modified: llvm/trunk/test/CodeGen/XCore/log.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/log.ll?rev=143457&r1=143456&r2=143457&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/XCore/log.ll (original) +++ llvm/trunk/test/CodeGen/XCore/log.ll Tue Nov 1 05:41:28 2011 @@ -1,9 +1,9 @@ -; RUN: llc < %s -march=xcore > %t1.s -; RUN: grep "bl logf" %t1.s | count 1 -; RUN: grep "bl log" %t1.s | count 2 +; RUN: llc < %s -march=xcore | FileCheck %s declare double @llvm.log.f64(double) define double @test(double %F) { +; CHECK: test: +; CHECK: bl log %result = call double @llvm.log.f64(double %F) ret double %result } @@ -11,6 +11,8 @@ declare float @llvm.log.f32(float) define float @testf(float %F) { +; CHECK: testf: +; CHECK: bl logf %result = call float @llvm.log.f32(float %F) ret float %result } Modified: llvm/trunk/test/CodeGen/XCore/log10.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/log10.ll?rev=143457&r1=143456&r2=143457&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/XCore/log10.ll (original) +++ llvm/trunk/test/CodeGen/XCore/log10.ll Tue Nov 1 05:41:28 2011 @@ -1,9 +1,9 @@ -; RUN: llc < %s -march=xcore > %t1.s -; RUN: grep "bl log10f" %t1.s | count 1 -; RUN: grep "bl log10" %t1.s | count 2 +; RUN: llc < %s -march=xcore | FileCheck %s declare double @llvm.log10.f64(double) define double @test(double %F) { +; CHECK: test: +; CHECK: bl log10 %result = call double @llvm.log10.f64(double %F) ret double %result } @@ -11,6 +11,8 @@ declare float @llvm.log10.f32(float) define float @testf(float %F) { +; CHECK: testf: +; CHECK: bl log10f %result = call float @llvm.log10.f32(float %F) ret float %result } Modified: llvm/trunk/test/CodeGen/XCore/log2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/log2.ll?rev=143457&r1=143456&r2=143457&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/XCore/log2.ll (original) +++ llvm/trunk/test/CodeGen/XCore/log2.ll Tue Nov 1 05:41:28 2011 @@ -1,9 +1,9 @@ -; RUN: llc < %s -march=xcore > %t1.s -; RUN: grep "bl log2f" %t1.s | count 1 -; RUN: grep "bl log2" %t1.s | count 2 +; RUN: llc < %s -march=xcore | FileCheck %s declare double @llvm.log2.f64(double) define double @test(double %F) { +; CHECK: test: +; CHECK: bl log2 %result = call double @llvm.log2.f64(double %F) ret double %result } @@ -11,6 +11,8 @@ declare float @llvm.log2.f32(float) define float @testf(float %F) { +; CHECK: testf: +; CHECK: bl log2f %result = call float @llvm.log2.f32(float %F) ret float %result } Modified: llvm/trunk/test/CodeGen/XCore/pow.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/pow.ll?rev=143457&r1=143456&r2=143457&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/XCore/pow.ll (original) +++ llvm/trunk/test/CodeGen/XCore/pow.ll Tue Nov 1 05:41:28 2011 @@ -1,9 +1,9 @@ -; RUN: llc < %s -march=xcore > %t1.s -; RUN: grep "bl powf" %t1.s | count 1 -; RUN: grep "bl pow" %t1.s | count 2 +; RUN: llc < %s -march=xcore | FileCheck %s declare double @llvm.pow.f64(double, double) define double @test(double %F, double %power) { +; CHECK: test: +; CHECK: bl pow %result = call double @llvm.pow.f64(double %F, double %power) ret double %result } @@ -11,6 +11,8 @@ declare float @llvm.pow.f32(float, float) define float @testf(float %F, float %power) { +; CHECK: testf: +; CHECK: bl powf %result = call float @llvm.pow.f32(float %F, float %power) ret float %result } Modified: llvm/trunk/test/CodeGen/XCore/powi.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/powi.ll?rev=143457&r1=143456&r2=143457&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/XCore/powi.ll (original) +++ llvm/trunk/test/CodeGen/XCore/powi.ll Tue Nov 1 05:41:28 2011 @@ -1,9 +1,9 @@ -; RUN: llc < %s -march=xcore > %t1.s -; RUN: grep "bl __powidf2" %t1.s | count 1 -; RUN: grep "bl __powisf2" %t1.s | count 1 +; RUN: llc < %s -march=xcore | FileCheck %s declare double @llvm.powi.f64(double, i32) define double @test(double %F, i32 %power) { +; CHECK: test: +; CHECK: bl __powidf2 %result = call double @llvm.powi.f64(double %F, i32 %power) ret double %result } @@ -11,6 +11,8 @@ declare float @llvm.powi.f32(float, i32) define float @testf(float %F, i32 %power) { +; CHECK: testf: +; CHECK: bl __powisf2 %result = call float @llvm.powi.f32(float %F, i32 %power) ret float %result } Modified: llvm/trunk/test/CodeGen/XCore/private.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/private.ll?rev=143457&r1=143456&r2=143457&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/XCore/private.ll (original) +++ llvm/trunk/test/CodeGen/XCore/private.ll Tue Nov 1 05:41:28 2011 @@ -1,19 +1,21 @@ ; Test to make sure that the 'private' is used correctly. ; -; RUN: llc < %s -march=xcore > %t -; RUN: grep .Lfoo: %t -; RUN: grep bl.*\.Lfoo %t -; RUN: grep .Lbaz: %t -; RUN: grep ldw.*\.Lbaz %t +; RUN: llc < %s -march=xcore | FileCheck %s define private void @foo() { +; CHECK: .Lfoo: ret void } @baz = private global i32 4 define i32 @bar() { +; CHECK: bar: +; CHECK: bl .Lfoo +; CHECK: ldw r0, dp[.Lbaz] call void @foo() %1 = load i32* @baz, align 4 ret i32 %1 } + +; CHECK: .Lbaz: Modified: llvm/trunk/test/CodeGen/XCore/sin.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/sin.ll?rev=143457&r1=143456&r2=143457&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/XCore/sin.ll (original) +++ llvm/trunk/test/CodeGen/XCore/sin.ll Tue Nov 1 05:41:28 2011 @@ -1,9 +1,9 @@ -; RUN: llc < %s -march=xcore > %t1.s -; RUN: grep "bl sinf" %t1.s | count 1 -; RUN: grep "bl sin" %t1.s | count 2 +; RUN: llc < %s -march=xcore | FileCheck %s declare double @llvm.sin.f64(double) define double @test(double %F) { +; CHECK: test: +; CHECK: bl sin %result = call double @llvm.sin.f64(double %F) ret double %result } @@ -11,6 +11,8 @@ declare float @llvm.sin.f32(float) define float @testf(float %F) { +; CHECK: testf: +; CHECK: bl sinf %result = call float @llvm.sin.f32(float %F) ret float %result } Modified: llvm/trunk/test/CodeGen/XCore/sqrt.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/sqrt.ll?rev=143457&r1=143456&r2=143457&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/XCore/sqrt.ll (original) +++ llvm/trunk/test/CodeGen/XCore/sqrt.ll Tue Nov 1 05:41:28 2011 @@ -1,9 +1,9 @@ -; RUN: llc < %s -march=xcore > %t1.s -; RUN: grep "bl sqrtf" %t1.s | count 1 -; RUN: grep "bl sqrt" %t1.s | count 2 +; RUN: llc < %s -march=xcore | FileCheck %s declare double @llvm.sqrt.f64(double) define double @test(double %F) { +; CHECK: test: +; CHECK: bl sqrt %result = call double @llvm.sqrt.f64(double %F) ret double %result } @@ -11,6 +11,8 @@ declare float @llvm.sqrt.f32(float) define float @testf(float %F) { +; CHECK: testf: +; CHECK: bl sqrtf %result = call float @llvm.sqrt.f32(float %F) ret float %result } Modified: llvm/trunk/test/CodeGen/XCore/store.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/store.ll?rev=143457&r1=143456&r2=143457&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/XCore/store.ll (original) +++ llvm/trunk/test/CodeGen/XCore/store.ll Tue Nov 1 05:41:28 2011 @@ -1,13 +1,9 @@ -; RUN: llc < %s -march=xcore > %t1.s -; RUN: not grep add %t1.s -; RUN: not grep ldaw %t1.s -; RUN: not grep lda16 %t1.s -; RUN: grep "stw" %t1.s | count 2 -; RUN: grep "st16" %t1.s | count 1 -; RUN: grep "st8" %t1.s | count 1 +; RUN: llc < %s -march=xcore | FileCheck %s define void @store32(i32* %p, i32 %offset, i32 %val) nounwind { entry: +; CHECK: store32: +; CHECK: stw r2, r0[r1] %0 = getelementptr i32* %p, i32 %offset store i32 %val, i32* %0, align 4 ret void @@ -15,6 +11,8 @@ define void @store32_imm(i32* %p, i32 %val) nounwind { entry: +; CHECK: store32_imm: +; CHECK: stw r1, r0[11] %0 = getelementptr i32* %p, i32 11 store i32 %val, i32* %0, align 4 ret void @@ -22,6 +20,8 @@ define void @store16(i16* %p, i32 %offset, i16 %val) nounwind { entry: +; CHECK: store16: +; CHECK: st16 r2, r0[r1] %0 = getelementptr i16* %p, i32 %offset store i16 %val, i16* %0, align 2 ret void @@ -29,6 +29,8 @@ define void @store8(i8* %p, i32 %offset, i8 %val) nounwind { entry: +; CHECK: store8: +; CHECK: st8 r2, r0[r1] %0 = getelementptr i8* %p, i32 %offset store i8 %val, i8* %0, align 1 ret void Modified: llvm/trunk/test/CodeGen/XCore/trap.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/trap.ll?rev=143457&r1=143456&r2=143457&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/XCore/trap.ll (original) +++ llvm/trunk/test/CodeGen/XCore/trap.ll Tue Nov 1 05:41:28 2011 @@ -1,8 +1,9 @@ -; RUN: llc < %s -march=xcore > %t1.s -; RUN: grep "ecallf" %t1.s | count 1 -; RUN: grep "ldc" %t1.s | count 1 +; RUN: llc < %s -march=xcore | FileCheck %s define i32 @test() noreturn nounwind { entry: +; CHECK: test: +; CHECK: ldc +; CHECK: ecallf tail call void @llvm.trap( ) unreachable } Modified: llvm/trunk/test/CodeGen/XCore/unaligned_store_combine.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/unaligned_store_combine.ll?rev=143457&r1=143456&r2=143457&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/XCore/unaligned_store_combine.ll (original) +++ llvm/trunk/test/CodeGen/XCore/unaligned_store_combine.ll Tue Nov 1 05:41:28 2011 @@ -1,11 +1,12 @@ -; RUN: llc < %s -march=xcore > %t1.s -; RUN: grep "bl memmove" %t1.s | count 1 -; RUN: grep "ldc r., 8" %t1.s | count 1 +; RUN: llc < %s -march=xcore | FileCheck %s ; Unaligned load / store pair. Should be combined into a memmove ; of size 8 define void @f(i64* %dst, i64* %src) nounwind { entry: +; CHECK: f: +; CHECK: ldc r2, 8 +; CHECK: bl memmove %0 = load i64* %src, align 1 store i64 %0, i64* %dst, align 1 ret void From richard at xmos.com Tue Nov 1 05:51:48 2011 From: richard at xmos.com (Richard Osborne) Date: Tue, 01 Nov 2011 10:51:48 -0000 Subject: [llvm-commits] [llvm] r143458 - in /llvm/trunk/test/CodeGen/XCore: cos.ll exp.ll exp2.ll float-intrinsics.ll log.ll log10.ll log2.ll pow.ll powi.ll sin.ll sqrt.ll Message-ID: <20111101105148.D19333524001@llvm.org> Author: friedgold Date: Tue Nov 1 05:51:48 2011 New Revision: 143458 URL: http://llvm.org/viewvc/llvm-project?rev=143458&view=rev Log: Combine various XCore tests for floating point intrinsic support into a single test. Added: llvm/trunk/test/CodeGen/XCore/float-intrinsics.ll Removed: llvm/trunk/test/CodeGen/XCore/cos.ll llvm/trunk/test/CodeGen/XCore/exp.ll llvm/trunk/test/CodeGen/XCore/exp2.ll llvm/trunk/test/CodeGen/XCore/log.ll llvm/trunk/test/CodeGen/XCore/log10.ll llvm/trunk/test/CodeGen/XCore/log2.ll llvm/trunk/test/CodeGen/XCore/pow.ll llvm/trunk/test/CodeGen/XCore/powi.ll llvm/trunk/test/CodeGen/XCore/sin.ll llvm/trunk/test/CodeGen/XCore/sqrt.ll Removed: llvm/trunk/test/CodeGen/XCore/cos.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/cos.ll?rev=143457&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/XCore/cos.ll (original) +++ llvm/trunk/test/CodeGen/XCore/cos.ll (removed) @@ -1,18 +0,0 @@ -; RUN: llc < %s -march=xcore | FileCheck %s -declare double @llvm.cos.f64(double) - -define double @test(double %F) { -; CHECK: test: -; CHECK: bl cos - %result = call double @llvm.cos.f64(double %F) - ret double %result -} - -declare float @llvm.cos.f32(float) - -; CHECK: testf: -; CHECK: bl cosf -define float @testf(float %F) { - %result = call float @llvm.cos.f32(float %F) - ret float %result -} Removed: llvm/trunk/test/CodeGen/XCore/exp.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/exp.ll?rev=143457&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/XCore/exp.ll (original) +++ llvm/trunk/test/CodeGen/XCore/exp.ll (removed) @@ -1,18 +0,0 @@ -; RUN: llc < %s -march=xcore | FileCheck %s -declare double @llvm.exp.f64(double) - -define double @test(double %F) { -; CHECK: test: -; CHECK: bl exp - %result = call double @llvm.exp.f64(double %F) - ret double %result -} - -declare float @llvm.exp.f32(float) - -define float @testf(float %F) { -; CHECK: testf: -; CHECK: bl expf - %result = call float @llvm.exp.f32(float %F) - ret float %result -} Removed: llvm/trunk/test/CodeGen/XCore/exp2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/exp2.ll?rev=143457&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/XCore/exp2.ll (original) +++ llvm/trunk/test/CodeGen/XCore/exp2.ll (removed) @@ -1,18 +0,0 @@ -; RUN: llc < %s -march=xcore | FileCheck %s -declare double @llvm.exp2.f64(double) - -define double @test(double %F) { -; CHECK: test: -; CHECK: bl exp2 - %result = call double @llvm.exp2.f64(double %F) - ret double %result -} - -declare float @llvm.exp2.f32(float) - -define float @testf(float %F) { -; CHECK: testf: -; CHECK: bl exp2f - %result = call float @llvm.exp2.f32(float %F) - ret float %result -} Added: llvm/trunk/test/CodeGen/XCore/float-intrinsics.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/float-intrinsics.ll?rev=143458&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/XCore/float-intrinsics.ll (added) +++ llvm/trunk/test/CodeGen/XCore/float-intrinsics.ll Tue Nov 1 05:51:48 2011 @@ -0,0 +1,171 @@ +; RUN: llc < %s -march=xcore | FileCheck %s +declare double @llvm.cos.f64(double) +declare double @llvm.exp.f64(double) +declare double @llvm.exp2.f64(double) +declare double @llvm.log.f64(double) +declare double @llvm.log10.f64(double) +declare double @llvm.log2.f64(double) +declare double @llvm.pow.f64(double, double) +declare double @llvm.powi.f64(double, i32) +declare double @llvm.sin.f64(double) +declare double @llvm.sqrt.f64(double) + +define double @cos(double %F) { +; CHECK: cos: +; CHECK: bl cos + %result = call double @llvm.cos.f64(double %F) + ret double %result +} + +declare float @llvm.cos.f32(float) + +; CHECK: cosf: +; CHECK: bl cosf +define float @cosf(float %F) { + %result = call float @llvm.cos.f32(float %F) + ret float %result +} + +define double @exp(double %F) { +; CHECK: exp: +; CHECK: bl exp + %result = call double @llvm.exp.f64(double %F) + ret double %result +} + +declare float @llvm.exp.f32(float) + +define float @expf(float %F) { +; CHECK: expf: +; CHECK: bl expf + %result = call float @llvm.exp.f32(float %F) + ret float %result +} + +define double @exp2(double %F) { +; CHECK: exp2: +; CHECK: bl exp2 + %result = call double @llvm.exp2.f64(double %F) + ret double %result +} + +declare float @llvm.exp2.f32(float) + +define float @exp2f(float %F) { +; CHECK: exp2f: +; CHECK: bl exp2f + %result = call float @llvm.exp2.f32(float %F) + ret float %result +} + +define double @log(double %F) { +; CHECK: log: +; CHECK: bl log + %result = call double @llvm.log.f64(double %F) + ret double %result +} + +declare float @llvm.log.f32(float) + +define float @logf(float %F) { +; CHECK: logf: +; CHECK: bl logf + %result = call float @llvm.log.f32(float %F) + ret float %result +} + +define double @log10(double %F) { +; CHECK: log10: +; CHECK: bl log10 + %result = call double @llvm.log10.f64(double %F) + ret double %result +} + +declare float @llvm.log10.f32(float) + +define float @log10f(float %F) { +; CHECK: log10f: +; CHECK: bl log10f + %result = call float @llvm.log10.f32(float %F) + ret float %result +} + +define double @log2(double %F) { +; CHECK: log2: +; CHECK: bl log2 + %result = call double @llvm.log2.f64(double %F) + ret double %result +} + +declare float @llvm.log2.f32(float) + +define float @log2f(float %F) { +; CHECK: log2f: +; CHECK: bl log2f + %result = call float @llvm.log2.f32(float %F) + ret float %result +} + +define double @pow(double %F, double %power) { +; CHECK: pow: +; CHECK: bl pow + %result = call double @llvm.pow.f64(double %F, double %power) + ret double %result +} + +declare float @llvm.pow.f32(float, float) + +define float @powf(float %F, float %power) { +; CHECK: powf: +; CHECK: bl powf + %result = call float @llvm.pow.f32(float %F, float %power) + ret float %result +} + +define double @powi(double %F, i32 %power) { +; CHECK: powi: +; CHECK: bl __powidf2 + %result = call double @llvm.powi.f64(double %F, i32 %power) + ret double %result +} + +declare float @llvm.powi.f32(float, i32) + +define float @powif(float %F, i32 %power) { +; CHECK: powif: +; CHECK: bl __powisf2 + %result = call float @llvm.powi.f32(float %F, i32 %power) + ret float %result +} + +define double @sin(double %F) { +; CHECK: sin: +; CHECK: bl sin + %result = call double @llvm.sin.f64(double %F) + ret double %result +} + +declare float @llvm.sin.f32(float) + +define float @sinf(float %F) { +; CHECK: sinf: +; CHECK: bl sinf + %result = call float @llvm.sin.f32(float %F) + ret float %result +} + +define double @sqrt(double %F) { +; CHECK: sqrt: +; CHECK: bl sqrt + %result = call double @llvm.sqrt.f64(double %F) + ret double %result +} + +declare float @llvm.sqrt.f32(float) + +define float @sqrtf(float %F) { +; CHECK: sqrtf: +; CHECK: bl sqrtf + %result = call float @llvm.sqrt.f32(float %F) + ret float %result +} Removed: llvm/trunk/test/CodeGen/XCore/log.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/log.ll?rev=143457&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/XCore/log.ll (original) +++ llvm/trunk/test/CodeGen/XCore/log.ll (removed) @@ -1,18 +0,0 @@ -; RUN: llc < %s -march=xcore | FileCheck %s -declare double @llvm.log.f64(double) - -define double @test(double %F) { -; CHECK: test: -; CHECK: bl log - %result = call double @llvm.log.f64(double %F) - ret double %result -} - -declare float @llvm.log.f32(float) - -define float @testf(float %F) { -; CHECK: testf: -; CHECK: bl logf - %result = call float @llvm.log.f32(float %F) - ret float %result -} Removed: llvm/trunk/test/CodeGen/XCore/log10.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/log10.ll?rev=143457&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/XCore/log10.ll (original) +++ llvm/trunk/test/CodeGen/XCore/log10.ll (removed) @@ -1,18 +0,0 @@ -; RUN: llc < %s -march=xcore | FileCheck %s -declare double @llvm.log10.f64(double) - -define double @test(double %F) { -; CHECK: test: -; CHECK: bl log10 - %result = call double @llvm.log10.f64(double %F) - ret double %result -} - -declare float @llvm.log10.f32(float) - -define float @testf(float %F) { -; CHECK: testf: -; CHECK: bl log10f - %result = call float @llvm.log10.f32(float %F) - ret float %result -} Removed: llvm/trunk/test/CodeGen/XCore/log2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/log2.ll?rev=143457&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/XCore/log2.ll (original) +++ llvm/trunk/test/CodeGen/XCore/log2.ll (removed) @@ -1,18 +0,0 @@ -; RUN: llc < %s -march=xcore | FileCheck %s -declare double @llvm.log2.f64(double) - -define double @test(double %F) { -; CHECK: test: -; CHECK: bl log2 - %result = call double @llvm.log2.f64(double %F) - ret double %result -} - -declare float @llvm.log2.f32(float) - -define float @testf(float %F) { -; CHECK: testf: -; CHECK: bl log2f - %result = call float @llvm.log2.f32(float %F) - ret float %result -} Removed: llvm/trunk/test/CodeGen/XCore/pow.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/pow.ll?rev=143457&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/XCore/pow.ll (original) +++ llvm/trunk/test/CodeGen/XCore/pow.ll (removed) @@ -1,18 +0,0 @@ -; RUN: llc < %s -march=xcore | FileCheck %s -declare double @llvm.pow.f64(double, double) - -define double @test(double %F, double %power) { -; CHECK: test: -; CHECK: bl pow - %result = call double @llvm.pow.f64(double %F, double %power) - ret double %result -} - -declare float @llvm.pow.f32(float, float) - -define float @testf(float %F, float %power) { -; CHECK: testf: -; CHECK: bl powf - %result = call float @llvm.pow.f32(float %F, float %power) - ret float %result -} Removed: llvm/trunk/test/CodeGen/XCore/powi.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/powi.ll?rev=143457&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/XCore/powi.ll (original) +++ llvm/trunk/test/CodeGen/XCore/powi.ll (removed) @@ -1,18 +0,0 @@ -; RUN: llc < %s -march=xcore | FileCheck %s -declare double @llvm.powi.f64(double, i32) - -define double @test(double %F, i32 %power) { -; CHECK: test: -; CHECK: bl __powidf2 - %result = call double @llvm.powi.f64(double %F, i32 %power) - ret double %result -} - -declare float @llvm.powi.f32(float, i32) - -define float @testf(float %F, i32 %power) { -; CHECK: testf: -; CHECK: bl __powisf2 - %result = call float @llvm.powi.f32(float %F, i32 %power) - ret float %result -} Removed: llvm/trunk/test/CodeGen/XCore/sin.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/sin.ll?rev=143457&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/XCore/sin.ll (original) +++ llvm/trunk/test/CodeGen/XCore/sin.ll (removed) @@ -1,18 +0,0 @@ -; RUN: llc < %s -march=xcore | FileCheck %s -declare double @llvm.sin.f64(double) - -define double @test(double %F) { -; CHECK: test: -; CHECK: bl sin - %result = call double @llvm.sin.f64(double %F) - ret double %result -} - -declare float @llvm.sin.f32(float) - -define float @testf(float %F) { -; CHECK: testf: -; CHECK: bl sinf - %result = call float @llvm.sin.f32(float %F) - ret float %result -} Removed: llvm/trunk/test/CodeGen/XCore/sqrt.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/sqrt.ll?rev=143457&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/XCore/sqrt.ll (original) +++ llvm/trunk/test/CodeGen/XCore/sqrt.ll (removed) @@ -1,18 +0,0 @@ -; RUN: llc < %s -march=xcore | FileCheck %s -declare double @llvm.sqrt.f64(double) - -define double @test(double %F) { -; CHECK: test: -; CHECK: bl sqrt - %result = call double @llvm.sqrt.f64(double %F) - ret double %result -} - -declare float @llvm.sqrt.f32(float) - -define float @testf(float %F) { -; CHECK: testf: -; CHECK: bl sqrtf - %result = call float @llvm.sqrt.f32(float %F) - ret float %result -} From richard at xmos.com Tue Nov 1 06:31:53 2011 From: richard at xmos.com (Richard Osborne) Date: Tue, 01 Nov 2011 11:31:53 -0000 Subject: [llvm-commits] [llvm] r143459 - in /llvm/trunk: lib/Target/XCore/XCoreISelDAGToDAG.cpp test/CodeGen/XCore/global_negative_offset.ll Message-ID: <20111101113153.C9A633524001@llvm.org> Author: friedgold Date: Tue Nov 1 06:31:53 2011 New Revision: 143459 URL: http://llvm.org/viewvc/llvm-project?rev=143459&view=rev Log: Don't fold negative offsets into cp / dp accesses to avoid relocation errors. This can happen if the address + addend is less than the start of the cp / dp. Added: llvm/trunk/test/CodeGen/XCore/global_negative_offset.ll Modified: llvm/trunk/lib/Target/XCore/XCoreISelDAGToDAG.cpp Modified: llvm/trunk/lib/Target/XCore/XCoreISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreISelDAGToDAG.cpp?rev=143459&r1=143458&r2=143459&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/XCore/XCoreISelDAGToDAG.cpp Tue Nov 1 06:31:53 2011 @@ -120,7 +120,7 @@ ConstantSDNode *CN = 0; if ((Addr.getOperand(0).getOpcode() == XCoreISD::DPRelativeWrapper) && (CN = dyn_cast(Addr.getOperand(1))) - && (CN->getSExtValue() % 4 == 0)) { + && (CN->getSExtValue() % 4 == 0 && CN->getSExtValue() >= 0)) { // Constant word offset from a object in the data region Base = Addr.getOperand(0).getOperand(0); Offset = CurDAG->getTargetConstant(CN->getSExtValue(), MVT::i32); @@ -141,7 +141,7 @@ ConstantSDNode *CN = 0; if ((Addr.getOperand(0).getOpcode() == XCoreISD::CPRelativeWrapper) && (CN = dyn_cast(Addr.getOperand(1))) - && (CN->getSExtValue() % 4 == 0)) { + && (CN->getSExtValue() % 4 == 0 && CN->getSExtValue() >= 0)) { // Constant word offset from a object in the data region Base = Addr.getOperand(0).getOperand(0); Offset = CurDAG->getTargetConstant(CN->getSExtValue(), MVT::i32); Added: llvm/trunk/test/CodeGen/XCore/global_negative_offset.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/global_negative_offset.ll?rev=143459&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/XCore/global_negative_offset.ll (added) +++ llvm/trunk/test/CodeGen/XCore/global_negative_offset.ll Tue Nov 1 06:31:53 2011 @@ -0,0 +1,25 @@ +; RUN: llc < %s -march=xcore | FileCheck %s + +; Don't fold negative offsets into cp / dp accesses to avoid a relocation +; error if the address + addend is less than the start of the cp / dp. + + at a = external constant [0 x i32], section ".cp.rodata" + at b = external global [0 x i32] + +define i32 *@f() nounwind { +entry: +; CHECK: f: +; CHECK: ldaw r11, cp[a] +; CHECK: sub r0, r11, 4 + %0 = getelementptr [0 x i32]* @a, i32 0, i32 -1 + ret i32* %0 +} + +define i32 *@g() nounwind { +entry: +; CHECK: g: +; CHECK: ldaw [[REG:r[0-9]+]], dp[b] +; CHECK: sub r0, [[REG]], 4 + %0 = getelementptr [0 x i32]* @b, i32 0, i32 -1 + ret i32* %0 +} From richard at xmos.com Tue Nov 1 08:07:53 2011 From: richard at xmos.com (Richard Osborne) Date: Tue, 1 Nov 2011 13:07:53 +0000 Subject: [llvm-commits] [PATCH] Don't introduce custom nodes when building divide by constant after legalization Message-ID: <4EAFEF29.7080004@xmos.com> This patch changes TargetLowering::BuildSDIV() and TargetLowering::BuildUDIV() so they avoid introducing nodes that require custom handling after legalization has taken place. This fixes PR11283. -- Richard Osborne | XMOS http://www.xmos.com -------------- next part -------------- A non-text attachment was scrubbed... Name: div-dag-combine-bug.patch Type: text/x-patch Size: 6151 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111101/c27d76ae/attachment.bin From baldrick at free.fr Tue Nov 1 08:38:02 2011 From: baldrick at free.fr (Duncan Sands) Date: Tue, 01 Nov 2011 13:38:02 -0000 Subject: [llvm-commits] [test-suite] r143460 - /test-suite/trunk/Makefile.programs Message-ID: <20111101133802.10EC22A6C12C@llvm.org> Author: baldrick Date: Tue Nov 1 08:38:01 2011 New Revision: 143460 URL: http://llvm.org/viewvc/llvm-project?rev=143460&view=rev Log: On Debian testing and recent Ubuntu systems llvm-ld fails to find libc, causing every test in the nightly testsuite to fail. But llvm-ld is only using libc to work out which symbols to internalize, not for linking with it. How can libc effect which symbols are internalized? I can see two possibilities: either libc makes use of a function defined in the bitcode (which it clearly doesn't) or a weak function occurs both in the bitcode and in libc (in which case using the bitcode's copy should be OK). Thus there doesn't seem to any point in looking at libc and comparable system libraries (eg: libstdc++) when internalizing, and this is confirmed by my testing: not passing -lc or $(LIBS) when invoking llvm-ld doesn't cause any failures. So a simple fix for the Debian issue would be simply not to pass them to llvm-ld. But then the question arises: why use llvm-ld at all rather than "opt -std-link-opts"? This patch goes all the way and drops llvm-ld in favour of "opt -std-link-opts". It also removes some apparently pointless Makefile rules, which I suspect exist because llvm-ld produces two output files, X (a script) and X.bc (the bitcode). With this llvm-ld is not used by the nightly testsuite at all. It works for me, but since I don't know the nightly testsuite infrastructure well I may have broken something, so please review. 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=143460&r1=143459&r2=143460&view=diff ============================================================================== --- test-suite/trunk/Makefile.programs (original) +++ test-suite/trunk/Makefile.programs Tue Nov 1 08:38:01 2011 @@ -309,53 +309,28 @@ # optimization... $(PROGRAMS_TO_TEST:%=Output/%.llvm.bc): \ -Output/%.llvm.bc: Output/%.linked.bc $(LLVM_LDDPROG) - $(RUNTOOLSAFELY) $(LLVMLD) -info-output-file=$(CURDIR)/$@.info $(STATS) $< \ - $(EXTRA_LINKTIME_OPT_FLAGS) $(LLVMLD_FLAGS) -lc $(LIBS) -o Output/$*.llvm -ifneq ($(OPTPASSES),) - $(RUNTOOLSAFELY) $(LOPT) -q $(OPTPASSES) $@ -o $@.tmp - $(MV) -f $@.tmp $@ -endif - -$(PROGRAMS_TO_TEST:%=Output/%.llvm): \ -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),) - $(RUNTOOLSAFELY) $(LOPT) -q $(OPTPASSES) $@ -o $@.tmp - $(MV) -f $@.tmp $@ -endif +Output/%.llvm.bc: Output/%.linked.bc $(LOPT) + $(RUNTOOLSAFELY) $(LOPT) -std-link-opts $(OPTPASSES) \ + -info-output-file=$(CURDIR)/$@.info \ + $(STATS) $< $(EXTRA_LINKTIME_OPT_FLAGS) -o $@ $(PROGRAMS_TO_TEST:%=Output/%.llvm.optbeta.bc): \ -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 $(LLVMLD) - $(RUNTOOLSAFELY) $(LLVMLD) -info-output-file=$(CURDIR)/$@.info $(STATS) $< \ - $(EXTRA_LINKTIME_OPT_FLAGS) $(LLVMLD_FLAGS) -lc $(LIBS) -o Output/$*.llvm.optbeta +Output/%.llvm.optbeta.bc: Output/%.linked.optbeta.bc $(LOPT) + $(RUNTOOLSAFELY) $(LOPT) -std-link-opts \ + -info-output-file=$(CURDIR)/$@.info \ + $(STATS) $< $(EXTRA_LINKTIME_OPT_FLAGS) -o $@ $(PROGRAMS_TO_TEST:%=Output/%.noopt-llvm.bc): \ -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 $(LLVMLD) - $(RUNTOOLSAFELY) $(LLVMLD) -disable-opt -info-output-file=$(CURDIR)/$@.info $(STATS) $< \ - $(LLVMLD_FLAGS) -lc $(LIBS) -o Output/$*.noopt-llvm - +Output/%.noopt-llvm.bc: Output/%.linked.rbc $(LOPT) + $(RUNTOOLSAFELY) $(LOPT) \ + -info-output-file=$(CURDIR)/$@.info \ + $(STATS) $< -o $@ $(PROGRAMS_TO_TEST:%=Output/%.nollvm-ldopt-llvm.bc): \ -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 $(LLVMLD) - $(RUNTOOLSAFELY) $(LLVMLD) -disable-opt -info-output-file=$(CURDIR)/$@.info $(STATS) $< \ - $(LLVMLD_FLAGS) -lc $(LIBS) -o Output/$*.nollvm-ldopt-llvm +Output/%.nollvm-ldopt-llvm.bc: Output/%.linked.bc $(LOPT) + $(RUNTOOLSAFELY) $(LOPT) \ + -info-output-file=$(CURDIR)/$@.info \ + $(STATS) $< -o $@ endif # ifndef DISABLE_FOR_LLVM_PROGRAMS @@ -372,7 +347,7 @@ ifneq ($(ARCH),x86) ifneq ($(ARCH),x86_64) LLCFLAGS += -enable-correct-eh-support -LLVMLD_FLAGS += -disable-inlining +EXTRA_LINKTIME_OPT_FLAGS += -disable-inlining endif endif endif From baldrick at free.fr Tue Nov 1 09:11:32 2011 From: baldrick at free.fr (Duncan Sands) Date: Tue, 01 Nov 2011 14:11:32 -0000 Subject: [llvm-commits] [zorg] r143461 - /zorg/trunk/buildbot/osuosl/master/config/builders.py Message-ID: <20111101141132.40BA72A6C12C@llvm.org> Author: baldrick Date: Tue Nov 1 09:11:32 2011 New Revision: 143461 URL: http://llvm.org/viewvc/llvm-project?rev=143461&view=rev Log: Tramp3d-v4 fails on the only active builder using this list due to include-next not working properly. Modified: zorg/trunk/buildbot/osuosl/master/config/builders.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=143461&r1=143460&r2=143461&view=diff ============================================================================== --- zorg/trunk/buildbot/osuosl/master/config/builders.py (original) +++ zorg/trunk/buildbot/osuosl/master/config/builders.py Tue Nov 1 09:11:32 2011 @@ -163,9 +163,12 @@ ] clang_x86_64_linux_xfails = [ + 'GCCAS.MultiSource/Benchmarks/tramp3d-v4/tramp3d-v4', + 'Bytecode.MultiSource/Benchmarks/tramp3d-v4/tramp3d-v4', 'LLC.SingleSource/Regression/C++/EH/ConditionalExpr', 'LLC.SingleSource/UnitTests/Vector/SSE/sse.expandfft', 'LLC.SingleSource/UnitTests/Vector/SSE/sse.stepfft', + 'LLC_compile.MultiSource/Benchmarks/tramp3d-v4/tramp3d-v4', 'LLC_compile.SingleSource/Regression/C++/EH/ConditionalExpr', 'LLC_compile.SingleSource/UnitTests/Vector/SSE/sse.expandfft', 'LLC_compile.SingleSource/UnitTests/Vector/SSE/sse.stepfft', From spop at codeaurora.org Tue Nov 1 11:44:33 2011 From: spop at codeaurora.org (Sebastian Pop) Date: Tue, 1 Nov 2011 11:44:33 -0500 Subject: [llvm-commits] [cfe-commits] Ping^2: Fix for bug 11060: configure --target does not work In-Reply-To: <20111028030122.GA2196@britannica.bec.de> References: <64775AFC-9ADD-4C75-86EE-9688036285EB@apple.com> <20111026165442.GD19773@britannica.bec.de> <20111027022913.GA21866@britannica.bec.de> <20111028030122.GA2196@britannica.bec.de> Message-ID: Hi, On Thu, Oct 27, 2011 at 10:01 PM, Joerg Sonnenberger wrote: >> 2. derive LLVM_HOSTTRIPLE from $target as you proposed, then rename >> LLVM_HOSTTRIPLE into something more meaningful, like what I proposed >> LLVM_DEFAULT_TARGET. > The second makes sure that everything is consistent from the start, no > chance of forgetting something in the middle. So yes, (2) is fine with > me, but the "rename to something meaningful" part has to be part of a > larger API change, since the host vs target misnaming is very sticky. Here are the amended patches for this change. Tested on amd64-linux and cross to ARM. Ok with these changes? Thanks, Sebastian -- Qualcomm Innovation Center, Inc is a member of Code Aurora Forum -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-derive-LLVM_HOSTTRIPLE-from-target.patch Type: text/x-diff Size: 2227 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111101/194e1429/attachment-0004.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: 0002-rename-LLVM_HOSTTRIPLE-into-LLVM_DEFAULT_TARGET_TRIP.patch Type: text/x-diff Size: 6904 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111101/194e1429/attachment-0005.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: 0003-rename-getHostTriple-into-getDefaultTargetTriple.patch Type: text/x-diff Size: 8529 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111101/194e1429/attachment-0006.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-rename-getHostTriple-into-getDefaultTargetTriple-in-.patch Type: text/x-diff Size: 4476 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111101/194e1429/attachment-0007.bin From echristo at apple.com Tue Nov 1 12:23:47 2011 From: echristo at apple.com (Eric Christopher) Date: Tue, 01 Nov 2011 10:23:47 -0700 Subject: [llvm-commits] [cfe-commits] Ping^2: Fix for bug 11060: configure --target does not work In-Reply-To: References: <64775AFC-9ADD-4C75-86EE-9688036285EB@apple.com> <20111026165442.GD19773@britannica.bec.de> <20111027022913.GA21866@britannica.bec.de> <20111028030122.GA2196@britannica.bec.de> Message-ID: <891D7D3C-5983-4EA1-A34F-423A18F5CD49@apple.com> On Nov 1, 2011, at 9:44 AM, Sebastian Pop wrote: > Hi, > > On Thu, Oct 27, 2011 at 10:01 PM, Joerg Sonnenberger > wrote: >>> 2. derive LLVM_HOSTTRIPLE from $target as you proposed, then rename >>> LLVM_HOSTTRIPLE into something more meaningful, like what I proposed >>> LLVM_DEFAULT_TARGET. >> The second makes sure that everything is consistent from the start, no >> chance of forgetting something in the middle. So yes, (2) is fine with >> me, but the "rename to something meaningful" part has to be part of a >> larger API change, since the host vs target misnaming is very sticky. > > Here are the amended patches for this change. > Tested on amd64-linux and cross to ARM. > Ok with these changes? Yep. Need me to commit them? -eric From daniel at zuster.org Tue Nov 1 12:46:12 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 01 Nov 2011 17:46:12 -0000 Subject: [llvm-commits] [llvm] r143468 - /llvm/trunk/include/llvm/Support/Compiler.h Message-ID: <20111101174612.B19292A6C12C@llvm.org> Author: ddunbar Date: Tue Nov 1 12:46:12 2011 New Revision: 143468 URL: http://llvm.org/viewvc/llvm-project?rev=143468&view=rev Log: Support/Compiler: Add LLVM_EXTENSION for use where we want to hide pedantic diags. Modified: llvm/trunk/include/llvm/Support/Compiler.h Modified: llvm/trunk/include/llvm/Support/Compiler.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Compiler.h?rev=143468&r1=143467&r2=143468&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/Compiler.h (original) +++ llvm/trunk/include/llvm/Support/Compiler.h Tue Nov 1 12:46:12 2011 @@ -111,6 +111,14 @@ #define LLVM_ATTRIBUTE_NORETURN #endif +// LLVM_EXTENSION - Support compilers where we have a keyword to suppress +// pedantic diagnostics. +#ifdef __GNUC__ +#define LLVM_EXTENSION __extension__ +#else +#define LLVM_EXTENSION +#endif + // LLVM_ATTRIBUTE_DEPRECATED(decl, "message") #if __has_feature(attribute_deprecated_with_message) # define LLVM_ATTRIBUTE_DEPRECATED(decl, message) \ From grosbach at apple.com Tue Nov 1 13:10:23 2011 From: grosbach at apple.com (Jim Grosbach) Date: Tue, 01 Nov 2011 18:10:23 -0000 Subject: [llvm-commits] [llvm] r143472 - /llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp Message-ID: <20111101181023.BCC4E2A6C12D@llvm.org> Author: grosbach Date: Tue Nov 1 13:10:23 2011 New Revision: 143472 URL: http://llvm.org/viewvc/llvm-project?rev=143472&view=rev Log: Ignore MachO symbol flags in the upper nibble of n_desc. They don't impact the MCJIT rtdyld, so just mask them off for now. Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp?rev=143472&r1=143471&r2=143472&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp (original) +++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp Tue Nov 1 13:10:23 2011 @@ -176,7 +176,8 @@ continue; // Flags == 0x8 marks a thumb function for ARM, which is fine as it // doesn't require any special handling here. - if (STE->Flags != 0x0 && STE->Flags != 0x8) + // Flags in the upper nibble we don't care about. + if ((STE->Flags & 0xf) != 0x0 && STE->Flags != 0x8) continue; // Remember the symbol. @@ -313,7 +314,8 @@ // FIXME: Check the symbol type and flags. if (STE->Type != 0xF) // external, defined in this section. continue; - if (STE->Flags != 0x0) + // Flags in the upper nibble we don't care about. + if ((STE->Flags & 0xf) != 0x0) continue; // Remember the symbol. From dpatel at apple.com Tue Nov 1 13:14:14 2011 From: dpatel at apple.com (Devang Patel) Date: Tue, 01 Nov 2011 11:14:14 -0700 Subject: [llvm-commits] patch: partial DSE In-Reply-To: <94CCF474-AEAB-42EE-8667-47D93735B2F0@apple.com> References: <94CCF474-AEAB-42EE-8667-47D93735B2F0@apple.com> Message-ID: On Oct 31, 2011, at 5:38 PM, Peter Cooper wrote: > Hi > > Please review this patch to allow DSE to trim stores as opposed to deleting them. > > The logic here is that if the end of the earlier store is dead because of a later store then the length of the earlier store will be trimmed in size to avoid writing dead memory. The only time i won't do this is if the original store was likely to use vector writes which if shortened would end up as multiple scalar writes and so is less efficient. + if (OR == OverwriteComplete) { + DEBUG(dbgs() << "DSE: Remove Dead Store:\n DEAD: " + << *DepWrite << "\n KILLER: " << *Inst << '\n'); + + if (OR == OverwriteComplete) { You're checking the same thing twice here. - Devang From spop at codeaurora.org Tue Nov 1 13:15:42 2011 From: spop at codeaurora.org (Sebastian Pop) Date: Tue, 1 Nov 2011 13:15:42 -0500 Subject: [llvm-commits] [cfe-commits] Ping^2: Fix for bug 11060: configure --target does not work In-Reply-To: <891D7D3C-5983-4EA1-A34F-423A18F5CD49@apple.com> References: <64775AFC-9ADD-4C75-86EE-9688036285EB@apple.com> <20111026165442.GD19773@britannica.bec.de> <20111027022913.GA21866@britannica.bec.de> <20111028030122.GA2196@britannica.bec.de> <891D7D3C-5983-4EA1-A34F-423A18F5CD49@apple.com> Message-ID: On Tue, Nov 1, 2011 at 12:23 PM, Eric Christopher wrote: > > On Nov 1, 2011, at 9:44 AM, Sebastian Pop wrote: > >> Hi, >> >> On Thu, Oct 27, 2011 at 10:01 PM, Joerg Sonnenberger >> wrote: >>>> 2. derive LLVM_HOSTTRIPLE from $target as you proposed, then rename >>>> LLVM_HOSTTRIPLE into something more meaningful, like what I proposed >>>> LLVM_DEFAULT_TARGET. >>> The second makes sure that everything is consistent from the start, no >>> chance of forgetting something in the middle. So yes, (2) is fine with >>> me, but the "rename to something meaningful" part has to be part of a >>> larger API change, since the host vs target misnaming is very sticky. >> >> Here are the amended patches for this change. >> Tested on amd64-linux and cross to ARM. >> Ok with these changes? > > Yep. Need me to commit them? Yes please. Should I contact Chris to get svn write access as well? Thanks, Sebastian -- Qualcomm Innovation Center, Inc is a member of Code Aurora Forum From dpatel at apple.com Tue Nov 1 13:18:12 2011 From: dpatel at apple.com (Devang Patel) Date: Tue, 01 Nov 2011 11:18:12 -0700 Subject: [llvm-commits] Handling of DebugLocs during CSE of SelectionDAG nodes. In-Reply-To: References: Message-ID: <5C93DD9F-64D2-43FC-8795-DF5AC4D50E38@apple.com> On Oct 31, 2011, at 10:30 AM, Kyriakos Georgiou wrote: > Regarding thread : > > http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-September/043205.html > > the approach of throwing away the line number information on the merged node is > implemented in the attached patch. + if (SDNode *ON = CSEMap.FindNodeOrInsertPos(ID, IP)) { + DebugLoc dlN = N->getDebugLoc(); + DebugLoc dlON = ON->getDebugLoc(); + // Throw away the line number information on the merged node since it is + // not possible to preserve the information that operation is associated + // with multiple lines. This will make the debugger work better at -O0. + if (!(dlON.isUnknown()) && (OptLevel != CodeGenOpt::None) && (dlN != dlON)) { + ON->setDebugLoc(DebugLoc()); + } This logic could be separated out in a utility function. Do you have any test cases ? - Devang From clattner at apple.com Tue Nov 1 13:25:21 2011 From: clattner at apple.com (Chris Lattner) Date: Tue, 01 Nov 2011 11:25:21 -0700 Subject: [llvm-commits] [cfe-commits] Ping^2: Fix for bug 11060: configure --target does not work In-Reply-To: References: <64775AFC-9ADD-4C75-86EE-9688036285EB@apple.com> <20111026165442.GD19773@britannica.bec.de> <20111027022913.GA21866@britannica.bec.de> <20111028030122.GA2196@britannica.bec.de> <891D7D3C-5983-4EA1-A34F-423A18F5CD49@apple.com> Message-ID: <2339F73F-64A1-4A5E-8987-F896661193BD@apple.com> On Nov 1, 2011, at 11:15 AM, Sebastian Pop wrote: >>> >>> Here are the amended patches for this change. >>> Tested on amd64-linux and cross to ARM. >>> Ok with these changes? >> >> Yep. Need me to commit them? > > Yes please. > Should I contact Chris to get svn write access as well? Yep, please do. Just read through llvm/docs/DeveloperPolicy.html and send me the requested info (offline) -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111101/7e1dcf44/attachment.html From hfinkel at anl.gov Tue Nov 1 13:32:36 2011 From: hfinkel at anl.gov (Hal Finkel) Date: Tue, 01 Nov 2011 13:32:36 -0500 Subject: [llvm-commits] [PATCH] BasicBlock Autovectorization Pass In-Reply-To: <1320108633.23036.1266.camel@sapling> References: <1319909412.23036.851.camel@sapling> <1319914924.23036.852.camel@sapling> <1319919418.23036.881.camel@sapling> <1319928991.23036.957.camel@sapling> <1320108633.23036.1266.camel@sapling> Message-ID: <1320172356.23036.1298.camel@sapling> Any objections to me committing this? [And some relevant docs changes] I think that it is ready at this point. Thanks in advance, Hal On Mon, 2011-10-31 at 19:50 -0500, Hal Finkel wrote: > I've attached the latest version of my autovectorization patch. This > version is significantly faster (in compile time) than the version I > posted a couple of days ago, and generally produces better output. > > At this point, next steps in enhancing the vectorization include: > 1. Add an add/sub and/or alternating-negation vector intrinsic to > provide for generating add-subtract, and more generally, asymmetric fma > instructions. > 2. Make -vectorize imply -unroll-allow-partial [Is there an easy way to > do this?] > 3. Add a -fvectorize flag to clang along the same lines. > > Updated vectorization benchmark: > Loop llvm-v llvm gcc-v gcc > ------------------------------------------- > S000 9.00 9.59 4.55 10.04 > S111 7.25 7.65 7.68 7.83 > S1111 13.63 14.72 16.14 16.30 > S112 16.60 17.45 16.54 17.52 > S1112 12.99 13.87 14.83 14.84 > S113 22.03 22.98 22.05 22.05 > S1113 11.01 11.48 11.03 11.01 > S114 13.14 13.81 13.53 13.48 > S115 32.92 33.36 49.98 49.99 > S1115 13.61 14.23 13.65 13.66 > S116 46.90 49.43 49.54 48.11 > S118 10.76 11.25 10.79 10.50 > S119 8.68 9.09 11.83 11.82 > S1119 8.75 9.15 4.31 11.87 > S121 17.17 18.06 14.84 17.31 > S122 7.53 7.70 6.11 6.11 > S123 6.92 7.10 7.42 7.41 > S124 9.60 9.84 9.42 9.33 > S125 6.89 7.10 4.67 7.81 > S126 2.33 2.55 2.57 2.37 > S127 12.18 12.68 7.06 14.50 > S128 11.66 12.41 12.42 11.52 > S131 28.59 30.11 25.17 28.94 > S132 17.04 17.04 15.53 21.03 > S141 12.18 12.85 12.38 12.05 > S151 28.61 30.11 24.89 28.95 > S152 15.47 16.03 11.19 15.63 > S161 6.00 6.12 5.52 5.46 > S1161 14.40 14.50 8.80 8.79 > S162 8.18 8.41 5.36 8.18 > S171 14.05 7.96 2.81 5.70 > S172 5.67 5.97 2.75 5.70 > S173 30.17 31.69 18.15 30.13 > S174 30.12 31.53 18.51 30.16 > S175 5.75 6.04 4.94 5.77 > S176 5.57 5.83 4.41 7.65 > S211 16.23 16.89 16.82 16.38 > S212 13.19 13.50 13.34 13.18 > S1213 12.83 13.35 12.80 12.43 > S221 10.86 11.09 8.65 8.63 > S1221 5.71 6.03 5.40 6.05 > S222 6.00 6.29 5.70 5.72 > S231 22.23 24.22 22.36 22.11 > S232 6.89 6.94 6.89 6.89 > S1232 15.23 16.43 15.05 15.10 > S233 55.17 59.98 54.21 49.56 > S2233 27.07 29.71 29.68 28.40 > S235 43.79 47.85 46.94 43.93 > S241 31.00 31.72 32.53 31.01 > S242 7.20 7.21 7.20 7.20 > S243 16.48 16.99 17.69 16.84 > S244 14.47 14.93 16.91 16.82 > S1244 14.75 15.02 14.77 14.40 > S2244 9.97 10.60 10.40 10.06 > S251 34.20 35.55 19.70 34.38 > S1251 55.09 57.11 41.77 56.11 > S2251 15.64 16.26 17.02 15.70 > S3251 15.55 16.52 19.60 15.34 > S252 6.14 6.46 7.72 7.26 > S253 11.18 11.52 14.40 14.40 > S254 17.72 18.98 28.23 28.06 > S255 5.93 6.14 9.96 9.95 > S256 3.06 3.39 3.10 3.09 > S257 2.12 2.31 2.21 2.20 > S258 1.79 1.87 1.84 1.84 > S261 12.01 12.22 10.98 10.95 > S271 32.76 33.76 33.25 33.01 > S272 14.93 15.52 15.39 15.26 > S273 13.92 14.10 16.86 16.80 > S274 17.77 18.53 18.15 17.89 > S275 2.90 3.14 3.36 2.98 > S2275 32.65 34.95 8.97 33.60 > S276 41.38 41.97 40.80 40.55 > S277 4.81 4.93 4.81 4.80 > S278 14.41 14.76 14.70 14.66 > S279 8.04 8.24 7.25 7.27 > S1279 9.71 9.92 9.34 9.25 > S2710 7.68 8.07 7.86 7.56 > S2711 35.53 37.10 36.56 36.00 > S2712 32.91 33.96 34.24 33.47 > S281 10.75 11.32 12.46 12.02 > S1281 104.13 78.11 57.78 68.06 > S291 11.75 12.27 14.03 14.03 > S292 6.70 6.91 9.94 9.96 > S293 15.38 16.24 19.32 19.33 > S2101 2.50 2.67 2.59 2.60 > S2102 16.56 18.45 16.68 16.75 > S2111 5.59 5.63 5.85 5.85 > S311 72.04 72.27 72.23 72.03 > S31111 6.37 6.01 6.00 6.00 > S312 96.04 96.17 96.05 96.03 > S313 36.03 36.61 36.03 36.02 > S314 36.02 36.12 74.67 72.42 > S315 9.11 9.21 9.35 9.30 > S316 36.02 36.12 72.08 74.87 > S317 444.96 444.94 451.82 451.78 > S318 9.07 9.12 7.30 7.30 > S319 34.49 36.46 34.42 34.19 > S3110 8.53 8.61 4.11 4.11 > S13110 5.75 5.78 12.12 12.12 > S3111 3.60 3.64 3.60 3.60 > S3112 7.21 7.30 7.21 7.20 > S3113 33.68 34.18 60.21 60.20 > S321 16.80 16.87 16.80 16.80 > S322 12.42 12.64 12.60 12.60 > S323 10.89 11.24 8.48 8.51 > S331 4.23 4.36 7.20 7.20 > S332 7.21 7.28 5.21 5.31 > S341 4.76 5.04 7.23 7.20 > S342 6.02 6.24 7.25 7.20 > S343 2.02 2.16 2.16 2.01 > S351 46.33 48.65 21.82 46.46 > S1351 49.07 51.28 33.68 49.06 > S352 57.65 58.44 57.68 57.64 > S353 8.19 8.44 8.34 8.19 > S421 24.17 25.29 20.62 22.46 > S1421 25.09 26.16 15.85 24.76 > S422 79.95 81.51 79.22 78.99 > S423 154.93 155.21 154.56 154.38 > S424 22.61 23.35 11.42 22.36 > S431 56.88 59.82 27.59 57.16 > S441 14.05 14.23 12.88 12.81 > S442 5.99 6.13 6.96 6.90 > S443 17.33 17.77 17.15 16.95 > S451 48.94 48.99 49.03 49.14 > S452 43.01 39.57 14.64 96.03 > S453 28.07 28.07 14.60 14.40 > S471 8.20 8.56 8.39 8.43 > S481 10.89 11.23 12.04 12.00 > S482 9.20 9.42 9.19 9.17 > S491 11.25 11.60 11.37 11.28 > S4112 8.20 8.45 9.13 8.94 > S4113 8.64 8.95 8.86 8.85 > S4114 11.82 12.35 12.18 11.77 > S4115 8.27 8.51 8.95 8.59 > S4116 3.22 3.22 6.02 5.94 > S4117 13.96 9.69 10.16 9.98 > S4121 8.19 8.44 4.04 8.17 > va 28.39 29.33 23.58 48.46 > vag 12.26 12.93 13.58 13.20 > vas 13.36 14.15 13.03 12.47 > vif 4.50 4.79 5.06 4.92 > vpv 56.84 59.83 28.28 57.24 > vtv 57.58 60.42 28.40 57.63 > vpvtv 32.78 33.77 16.35 32.73 > vpvts 5.78 6.07 2.99 6.38 > vpvpv 32.78 33.84 16.54 32.85 > vtvtv 32.76 33.75 16.84 35.97 > vsumr 72.04 72.28 72.20 72.04 > vdotr 72.05 73.22 72.42 72.04 > vbor 227.55 381.18 99.80 372.05 > > -Hal > > On Sat, 2011-10-29 at 17:56 -0500, Hal Finkel wrote: > > On Sat, 2011-10-29 at 15:16 -0500, Hal Finkel wrote: > > > On Sat, 2011-10-29 at 14:02 -0500, Hal Finkel wrote: > > > > On Sat, 2011-10-29 at 12:30 -0500, Hal Finkel wrote: > > > > > Ralf, et al., > > > > > > > > > > Attached is the latest version of my autovectorization patch. llvmdev > > > > > has been CC'd (as had been suggested to me); this e-mail contains > > > > > additional benchmark results. > > > > > > > > > > First, these are preliminary results because I did not do the things > > > > > necessary to make them real (explicitly quiet the machine, bind the > > > > > processes to one cpu, etc.). But they should be good enough for > > > > > discussion. > > > > > > > > > > I'm using LLVM head r143101, with the attached patch applied, and clang > > > > > head r143100 on an x86_64 machine (some kind of Intel Xeon). For the gcc > > > > > comparison, I'm using build Ubuntu 4.4.3-4ubuntu5. gcc was run -O3 > > > > > without any other optimization flags. opt was run -vectorize > > > > > -unroll-allow-partial -O3 with no other optimization flags (the patch > > > > > adds the -vectorize option). > > > > > > > > And opt had also been given the flag: -bb-vectorize-vector-bits=256 > > > > > > And this was a mistake (because the machine on which the benchmarks were > > > run does not have AVX). I've rerun, see better results below... > > > > > > > > > > > -Hal > > > > > > > > > llc was just given -O3. > > > > > > > > > > Below I've included results using the benchmark program by Maleki, et > > > > > al. See: > > > > > An Evaluation of Vectorizing Compilers - PACT'11 > > > > > (http://polaris.cs.uiuc.edu/~garzaran/doc/pact11.pdf). The source of > > > > > their benchmark program was retrieved from: > > > > > http://polaris.cs.uiuc.edu/~maleki1/TSVC.tar.gz > > > > > > > > > > Also, when using clang, I had to pass -Dinline= on the command line: > > > > > when using -emit-llvm, clang appears not to emit code for functions > > > > > declared inline. This is a bug, but I've not yet tracked it down. There > > > > > are two such small functions in the benchmark program, and the regular > > > > > inliner *should* catch them anyway. > > > > > > > > > > Results: > > > > > 0. Name of the loop > > > > > 1. Time using LLVM with vectorization > > > > > 2. Time using LLVM without vectorization > > > > > 3. Time using gcc with vectorization > > > > > 4. Time using gcc without vectorization > > > > As Peter Collingbourne indirectly pointed out to me, clang's > > optimizations are still important (even if it is emitting only llvm). > > I've rerun the llvm code generation steps, adding -O3 to clang. Here are > > the results (they are significantly better): > > > > Loop llvm-v llvm gcc-v gcc > > ------------------------------------------- > > S000 9.10 9.59 4.55 10.04 > > S111 7.29 7.65 7.68 7.83 > > S1111 13.87 14.72 16.14 16.30 > > S112 16.67 17.45 16.54 17.52 > > S1112 13.16 13.87 14.83 14.84 > > S113 22.14 22.98 22.05 22.05 > > S1113 11.06 11.48 11.03 11.01 > > S114 13.21 13.81 13.53 13.48 > > S115 32.82 33.36 49.98 49.99 > > S1115 13.67 14.23 13.65 13.66 > > S116 47.37 49.43 49.54 48.11 > > S118 10.81 11.25 10.79 10.50 > > S119 8.73 9.09 11.83 11.82 > > S1119 8.82 9.15 4.31 11.87 > > S121 17.29 18.06 14.84 17.31 > > S122 7.53 7.70 6.11 6.11 > > S123 6.93 7.10 7.42 7.41 > > S124 9.63 9.84 9.42 9.33 > > S125 6.94 7.10 4.67 7.81 > > S126 2.34 2.55 2.57 2.37 > > S127 12.23 12.68 7.06 14.50 > > S128 11.78 12.41 12.42 11.52 > > S131 28.79 30.11 25.17 28.94 > > S132 17.04 17.04 15.53 21.03 > > S141 12.26 12.85 12.38 12.05 > > S151 28.79 30.11 24.89 28.95 > > S152 15.53 16.03 11.19 15.63 > > S161 6.00 6.12 5.52 5.46 > > S1161 14.40 14.50 8.80 8.79 > > S162 8.19 8.41 5.36 8.18 > > S171 15.41 7.96 2.81 5.70 > > S172 5.70 5.97 2.75 5.70 > > S173 30.32 31.69 18.15 30.13 > > S174 30.20 31.53 18.51 30.16 > > S175 5.79 6.04 4.94 5.77 > > S176 5.59 5.83 4.41 7.65 > > S211 16.31 16.89 16.82 16.38 > > S212 13.23 13.50 13.34 13.18 > > S1213 12.82 13.35 12.80 12.43 > > S221 10.87 11.09 8.65 8.63 > > S1221 5.72 6.03 5.40 6.05 > > S222 6.01 6.29 5.70 5.72 > > S231 22.38 24.22 22.36 22.11 > > S232 6.89 6.94 6.89 6.89 > > S1232 15.31 16.43 15.05 15.10 > > S233 55.47 59.98 54.21 49.56 > > S2233 27.23 29.71 29.68 28.40 > > S235 44.08 47.85 46.94 43.93 > > S241 31.14 31.72 32.53 31.01 > > S242 7.20 7.21 7.20 7.20 > > S243 16.54 16.99 17.69 16.84 > > S244 14.51 14.93 16.91 16.82 > > S1244 14.72 15.02 14.77 14.40 > > S2244 10.09 10.60 10.40 10.06 > > S251 34.42 35.55 19.70 34.38 > > S1251 55.39 57.11 41.77 56.11 > > S2251 15.69 16.26 17.02 15.70 > > S3251 15.69 16.52 19.60 15.34 > > S252 6.18 6.46 7.72 7.26 > > S253 11.19 11.52 14.40 14.40 > > S254 18.00 18.98 28.23 28.06 > > S255 5.94 6.14 9.96 9.95 > > S256 3.09 3.39 3.10 3.09 > > S257 2.13 2.31 2.21 2.20 > > S258 1.80 1.87 1.84 1.84 > > S261 12.00 12.22 10.98 10.95 > > S271 32.81 33.76 33.25 33.01 > > S272 15.04 15.52 15.39 15.26 > > S273 13.93 14.10 16.86 16.80 > > S274 17.83 18.53 18.15 17.89 > > S275 2.92 3.14 3.36 2.98 > > S2275 32.81 34.95 8.97 33.60 > > S276 41.26 41.97 40.80 40.55 > > S277 4.80 4.93 4.81 4.80 > > S278 14.43 14.76 14.70 14.66 > > S279 8.05 8.24 7.25 7.27 > > S1279 9.72 9.92 9.34 9.25 > > S2710 7.73 8.07 7.86 7.56 > > S2711 36.49 37.10 36.56 36.00 > > S2712 32.96 33.96 34.24 33.47 > > S281 10.80 11.32 12.46 12.02 > > S1281 79.10 78.11 57.78 68.06 > > S291 11.79 12.27 14.03 14.03 > > S292 6.70 6.91 9.94 9.96 > > S293 15.50 16.24 19.32 19.33 > > S2101 2.56 2.67 2.59 2.60 > > S2102 16.74 18.45 16.68 16.75 > > S2111 5.59 5.63 5.85 5.85 > > S311 72.04 72.27 72.23 72.03 > > S31111 7.50 6.01 6.00 6.00 > > S312 96.04 96.17 96.05 96.03 > > S313 36.02 36.61 36.03 36.02 > > S314 36.01 36.12 74.67 72.42 > > S315 9.11 9.21 9.35 9.30 > > S316 36.01 36.12 72.08 74.87 > > S317 444.91 444.94 451.82 451.78 > > S318 9.07 9.12 7.30 7.30 > > S319 34.57 36.46 34.42 34.19 > > S3110 8.52 8.61 4.11 4.11 > > S13110 5.75 5.78 12.12 12.12 > > S3111 3.60 3.64 3.60 3.60 > > S3112 7.20 7.30 7.21 7.20 > > S3113 33.68 34.18 60.21 60.20 > > S321 16.80 16.87 16.80 16.80 > > S322 12.42 12.64 12.60 12.60 > > S323 10.88 11.24 8.48 8.51 > > S331 4.23 4.36 7.20 7.20 > > S332 7.20 7.28 5.21 5.31 > > S341 4.80 5.04 7.23 7.20 > > S342 6.01 6.24 7.25 7.20 > > S343 2.04 2.16 2.16 2.01 > > S351 46.63 48.65 21.82 46.46 > > S1351 49.37 51.28 33.68 49.06 > > S352 57.64 58.44 57.68 57.64 > > S353 8.21 8.44 8.34 8.19 > > S421 24.26 25.29 20.62 22.46 > > S1421 25.18 26.16 15.85 24.76 > > S422 80.08 81.51 79.22 78.99 > > S423 155.02 155.21 154.56 154.38 > > S424 22.62 23.35 11.42 22.36 > > S431 57.22 59.82 27.59 57.16 > > S441 13.27 14.23 12.88 12.81 > > S442 5.99 6.13 6.96 6.90 > > S443 17.37 17.77 17.15 16.95 > > S451 48.92 48.99 49.03 49.14 > > S452 42.97 39.57 14.64 96.03 > > S453 28.06 28.07 14.60 14.40 > > S471 8.27 8.56 8.39 8.43 > > S481 10.93 11.23 12.04 12.00 > > S482 9.21 9.42 9.19 9.17 > > S491 11.31 11.60 11.37 11.28 > > S4112 8.21 8.45 9.13 8.94 > > S4113 8.65 8.95 8.86 8.85 > > S4114 11.87 12.35 12.18 11.77 > > S4115 8.28 8.51 8.95 8.59 > > S4116 3.23 3.22 6.02 5.94 > > S4117 13.97 9.69 10.16 9.98 > > S4121 8.20 8.44 4.04 8.17 > > va 28.50 29.33 23.58 48.46 > > vag 12.37 12.93 13.58 13.20 > > vas 13.46 14.15 13.03 12.47 > > vif 4.55 4.79 5.06 4.92 > > vpv 57.21 59.83 28.28 57.24 > > vtv 57.92 60.42 28.40 57.63 > > vpvtv 32.84 33.77 16.35 32.73 > > vpvts 5.82 6.07 2.99 6.38 > > vpvpv 32.87 33.84 16.54 32.85 > > vtvtv 32.82 33.75 16.84 35.97 > > vsumr 72.03 72.28 72.20 72.04 > > vdotr 72.05 73.22 72.42 72.04 > > vbor 205.24 381.18 99.80 372.05 > > > > I apologize for the multiple e-mails with a long list of numbers, but I > > think that this was worth it (and I did not want to be unfair to the > > clang developers). > > > > -Hal > > > > > > > > Here are improved results where the correct (and default) > > > vector-register size was used. > > > > > > Loop llvm-v llvm gcc-v gcc > > > ------------------------------------------- > > > S000 9.09 9.49 4.55 10.04 > > > S111 7.28 7.37 7.68 7.83 > > > S1111 13.78 14.48 16.14 16.30 > > > S112 16.67 17.41 16.54 17.52 > > > S1112 13.12 14.21 14.83 14.84 > > > S113 22.12 22.88 22.05 22.05 > > > S1113 11.06 11.42 11.03 11.01 > > > S114 13.23 13.75 13.53 13.48 > > > S115 32.76 33.24 49.98 49.99 > > > S1115 13.68 14.18 13.65 13.66 > > > S116 47.42 49.40 49.54 48.11 > > > S118 10.84 11.26 10.79 10.50 > > > S119 8.74 9.07 11.83 11.82 > > > S1119 8.81 9.14 4.31 11.87 > > > S121 17.28 18.78 14.84 17.31 > > > S122 7.53 7.54 6.11 6.11 > > > S123 6.90 7.38 7.42 7.41 > > > S124 9.60 9.77 9.42 9.33 > > > S125 6.92 7.22 4.67 7.81 > > > S126 2.34 2.53 2.57 2.37 > > > S127 12.19 12.97 7.06 14.50 > > > S128 11.74 12.43 12.42 11.52 > > > S131 28.75 29.91 25.17 28.94 > > > S132 17.04 17.04 15.53 21.03 > > > S141 12.28 12.26 12.38 12.05 > > > S151 28.80 29.43 24.89 28.95 > > > S152 15.54 16.03 11.19 15.63 > > > S161 6.00 6.06 5.52 5.46 > > > S1161 14.39 14.40 8.80 8.79 > > > S162 8.19 9.05 5.36 8.18 > > > S171 15.41 7.94 2.81 5.70 > > > S172 5.71 5.89 2.75 5.70 > > > S173 30.31 30.92 18.15 30.13 > > > S174 30.18 31.66 18.51 30.16 > > > S175 5.78 6.18 4.94 5.77 > > > S176 5.59 5.83 4.41 7.65 > > > S211 16.27 17.14 16.82 16.38 > > > S212 13.21 14.28 13.34 13.18 > > > S1213 12.81 13.46 12.80 12.43 > > > S221 10.86 11.09 8.65 8.63 > > > S1221 5.72 6.04 5.40 6.05 > > > S222 6.02 6.26 5.70 5.72 > > > S231 22.33 22.94 22.36 22.11 > > > S232 6.88 6.88 6.89 6.89 > > > S1232 15.30 15.34 15.05 15.10 > > > S233 55.38 58.55 54.21 49.56 > > > S2233 27.08 29.77 29.68 28.40 > > > S235 44.00 44.92 46.94 43.93 > > > S241 31.09 31.35 32.53 31.01 > > > S242 7.19 7.20 7.20 7.20 > > > S243 16.52 17.09 17.69 16.84 > > > S244 14.45 14.83 16.91 16.82 > > > S1244 14.71 14.83 14.77 14.40 > > > S2244 10.04 10.62 10.40 10.06 > > > S251 34.15 35.75 19.70 34.38 > > > S1251 55.23 57.84 41.77 56.11 > > > S2251 15.73 15.87 17.02 15.70 > > > S3251 15.66 16.21 19.60 15.34 > > > S252 6.18 6.32 7.72 7.26 > > > S253 11.14 11.38 14.40 14.40 > > > S254 18.41 18.70 28.23 28.06 > > > S255 5.93 6.09 9.96 9.95 > > > S256 3.08 3.42 3.10 3.09 > > > S257 2.13 2.25 2.21 2.20 > > > S258 1.79 1.82 1.84 1.84 > > > S261 12.00 12.08 10.98 10.95 > > > S271 32.82 33.04 33.25 33.01 > > > S272 14.98 15.82 15.39 15.26 > > > S273 13.92 14.04 16.86 16.80 > > > S274 17.83 18.31 18.15 17.89 > > > S275 2.92 3.02 3.36 2.98 > > > S2275 32.80 33.50 8.97 33.60 > > > S276 39.43 39.44 40.80 40.55 > > > S277 4.80 4.80 4.81 4.80 > > > S278 14.41 14.42 14.70 14.66 > > > S279 8.03 8.29 7.25 7.27 > > > S1279 9.71 10.06 9.34 9.25 > > > S2710 7.71 8.04 7.86 7.56 > > > S2711 35.53 35.55 36.56 36.00 > > > S2712 32.94 33.17 34.24 33.47 > > > S281 10.79 11.09 12.46 12.02 > > > S1281 79.13 77.55 57.78 68.06 > > > S291 11.80 11.78 14.03 14.03 > > > S292 7.77 7.78 9.94 9.96 > > > S293 15.50 15.87 19.32 19.33 > > > S2101 2.56 2.58 2.59 2.60 > > > S2102 16.71 17.53 16.68 16.75 > > > S2111 5.60 5.60 5.85 5.85 > > > S311 72.03 72.03 72.23 72.03 > > > S31111 7.49 6.00 6.00 6.00 > > > S312 96.04 96.04 96.05 96.03 > > > S313 36.02 36.13 36.03 36.02 > > > S314 36.01 36.07 74.67 72.42 > > > S315 8.96 8.99 9.35 9.30 > > > S316 36.02 36.06 72.08 74.87 > > > S317 444.93 444.94 451.82 451.78 > > > S318 9.05 9.07 7.30 7.30 > > > S319 34.54 36.53 34.42 34.19 > > > S3110 8.51 8.57 4.11 4.11 > > > S13110 5.75 5.77 12.12 12.12 > > > S3111 3.60 3.62 3.60 3.60 > > > S3112 7.19 7.30 7.21 7.20 > > > S3113 35.13 35.47 60.21 60.20 > > > S321 16.79 16.81 16.80 16.80 > > > S322 12.42 12.60 12.60 12.60 > > > S323 10.86 11.02 8.48 8.51 > > > S331 4.23 4.23 7.20 7.20 > > > S332 7.20 7.21 5.21 5.31 > > > S341 4.79 4.85 7.23 7.20 > > > S342 6.01 6.09 7.25 7.20 > > > S343 2.04 2.06 2.16 2.01 > > > S351 46.61 47.34 21.82 46.46 > > > S1351 49.28 50.35 33.68 49.06 > > > S352 57.65 58.04 57.68 57.64 > > > S353 8.21 8.38 8.34 8.19 > > > S421 42.94 43.34 20.62 22.46 > > > S1421 25.15 25.81 15.85 24.76 > > > S422 87.39 87.53 79.22 78.99 > > > S423 155.01 155.29 154.56 154.38 > > > S424 36.51 37.51 11.42 22.36 > > > S431 57.10 60.66 27.59 57.16 > > > S441 14.04 13.29 12.88 12.81 > > > S442 6.00 6.00 6.96 6.90 > > > S443 17.28 17.77 17.15 16.95 > > > S451 48.92 49.08 49.03 49.14 > > > S452 42.98 39.32 14.64 96.03 > > > S453 28.05 28.06 14.60 14.40 > > > S471 8.24 8.65 8.39 8.43 > > > S481 10.88 11.15 12.04 12.00 > > > S482 9.21 9.31 9.19 9.17 > > > S491 11.26 11.38 11.37 11.28 > > > S4112 8.21 8.36 9.13 8.94 > > > S4113 8.65 8.81 8.86 8.85 > > > S4114 11.82 12.15 12.18 11.77 > > > S4115 8.28 8.46 8.95 8.59 > > > S4116 3.22 3.23 6.02 5.94 > > > S4117 13.95 9.61 10.16 9.98 > > > S4121 8.21 8.26 4.04 8.17 > > > va 28.46 28.58 23.58 48.46 > > > vag 12.35 12.36 13.58 13.20 > > > vas 13.45 13.49 13.03 12.47 > > > vif 4.55 4.57 5.06 4.92 > > > vpv 57.08 57.22 28.28 57.24 > > > vtv 57.81 57.83 28.40 57.63 > > > vpvtv 32.82 32.84 16.35 32.73 > > > vpvts 5.82 5.83 2.99 6.38 > > > vpvpv 32.87 32.89 16.54 32.85 > > > vtvtv 32.82 32.80 16.84 35.97 > > > vsumr 72.04 72.03 72.20 72.04 > > > vdotr 72.06 72.05 72.42 72.04 > > > vbor 205.24 380.81 99.80 372.05 > > > > > > -Hal > > > > > > > > > > > > > Loop llvm-v llvm gcc-v gcc > > > > > ------------------------------------------- > > > > > S000 9.59 9.49 4.55 10.04 > > > > > S111 7.67 7.37 7.68 7.83 > > > > > S1111 13.98 14.48 16.14 16.30 > > > > > S112 17.43 17.41 16.54 17.52 > > > > > S1112 13.87 14.21 14.83 14.84 > > > > > S113 22.97 22.88 22.05 22.05 > > > > > S1113 11.46 11.42 11.03 11.01 > > > > > S114 13.47 13.75 13.53 13.48 > > > > > S115 33.06 33.24 49.98 49.99 > > > > > S1115 13.91 14.18 13.65 13.66 > > > > > S116 48.74 49.40 49.54 48.11 > > > > > S118 11.04 11.26 10.79 10.50 > > > > > S119 8.97 9.07 11.83 11.82 > > > > > S1119 9.04 9.14 4.31 11.87 > > > > > S121 18.06 18.78 14.84 17.31 > > > > > S122 7.58 7.54 6.11 6.11 > > > > > S123 7.02 7.38 7.42 7.41 > > > > > S124 9.62 9.77 9.42 9.33 > > > > > S125 7.14 7.22 4.67 7.81 > > > > > S126 2.32 2.53 2.57 2.37 > > > > > S127 12.87 12.97 7.06 14.50 > > > > > S128 12.58 12.43 12.42 11.52 > > > > > S131 29.91 29.91 25.17 28.94 > > > > > S132 17.04 17.04 15.53 21.03 > > > > > S141 12.59 12.26 12.38 12.05 > > > > > S151 28.92 29.43 24.89 28.95 > > > > > S152 15.68 16.03 11.19 15.63 > > > > > S161 6.06 6.06 5.52 5.46 > > > > > S1161 14.46 14.40 8.80 8.79 > > > > > S162 8.31 9.05 5.36 8.18 > > > > > S171 15.47 7.94 2.81 5.70 > > > > > S172 5.92 5.89 2.75 5.70 > > > > > S173 31.59 30.92 18.15 30.13 > > > > > S174 31.16 31.66 18.51 30.16 > > > > > S175 5.80 6.18 4.94 5.77 > > > > > S176 5.69 5.83 4.41 7.65 > > > > > S211 16.56 17.14 16.82 16.38 > > > > > S212 13.46 14.28 13.34 13.18 > > > > > S1213 13.12 13.46 12.80 12.43 > > > > > S221 10.88 11.09 8.65 8.63 > > > > > S1221 5.80 6.04 5.40 6.05 > > > > > S222 6.01 6.26 5.70 5.72 > > > > > S231 23.78 22.94 22.36 22.11 > > > > > S232 6.88 6.88 6.89 6.89 > > > > > S1232 16.00 15.34 15.05 15.10 > > > > > S233 57.48 58.55 54.21 49.56 > > > > > S2233 27.65 29.77 29.68 28.40 > > > > > S235 46.40 44.92 46.94 43.93 > > > > > S241 31.62 31.35 32.53 31.01 > > > > > S242 7.20 7.20 7.20 7.20 > > > > > S243 16.78 17.09 17.69 16.84 > > > > > S244 14.64 14.83 16.91 16.82 > > > > > S1244 14.98 14.83 14.77 14.40 > > > > > S2244 10.47 10.62 10.40 10.06 > > > > > S251 35.10 35.75 19.70 34.38 > > > > > S1251 56.65 57.84 41.77 56.11 > > > > > S2251 15.96 15.87 17.02 15.70 > > > > > S3251 16.41 16.21 19.60 15.34 > > > > > S252 7.24 6.32 7.72 7.26 > > > > > S253 12.55 11.38 14.40 14.40 > > > > > S254 19.08 18.70 28.23 28.06 > > > > > S255 5.94 6.09 9.96 9.95 > > > > > S256 3.14 3.42 3.10 3.09 > > > > > S257 2.18 2.25 2.21 2.20 > > > > > S258 1.80 1.82 1.84 1.84 > > > > > S261 12.00 12.08 10.98 10.95 > > > > > S271 32.93 33.04 33.25 33.01 > > > > > S272 15.48 15.82 15.39 15.26 > > > > > S273 13.99 14.04 16.86 16.80 > > > > > S274 18.38 18.31 18.15 17.89 > > > > > S275 3.02 3.02 3.36 2.98 > > > > > S2275 33.71 33.50 8.97 33.60 > > > > > S276 39.52 39.44 40.80 40.55 > > > > > S277 4.81 4.80 4.81 4.80 > > > > > S278 14.43 14.42 14.70 14.66 > > > > > S279 8.10 8.29 7.25 7.27 > > > > > S1279 9.77 10.06 9.34 9.25 > > > > > S2710 7.85 8.04 7.86 7.56 > > > > > S2711 35.54 35.55 36.56 36.00 > > > > > S2712 33.16 33.17 34.24 33.47 > > > > > S281 10.97 11.09 12.46 12.02 > > > > > S1281 79.37 77.55 57.78 68.06 > > > > > S291 11.94 11.78 14.03 14.03 > > > > > S292 7.88 7.78 9.94 9.96 > > > > > S293 15.90 15.87 19.32 19.33 > > > > > S2101 2.59 2.58 2.59 2.60 > > > > > S2102 17.63 17.53 16.68 16.75 > > > > > S2111 5.63 5.60 5.85 5.85 > > > > > S311 72.07 72.03 72.23 72.03 > > > > > S31111 7.49 6.00 6.00 6.00 > > > > > S312 96.06 96.04 96.05 96.03 > > > > > S313 36.50 36.13 36.03 36.02 > > > > > S314 36.10 36.07 74.67 72.42 > > > > > S315 9.00 8.99 9.35 9.30 > > > > > S316 36.11 36.06 72.08 74.87 > > > > > S317 444.92 444.94 451.82 451.78 > > > > > S318 9.04 9.07 7.30 7.30 > > > > > S319 34.76 36.53 34.42 34.19 > > > > > S3110 8.53 8.57 4.11 4.11 > > > > > S13110 5.76 5.77 12.12 12.12 > > > > > S3111 3.60 3.62 3.60 3.60 > > > > > S3112 7.20 7.30 7.21 7.20 > > > > > S3113 35.12 35.47 60.21 60.20 > > > > > S321 16.81 16.81 16.80 16.80 > > > > > S322 12.42 12.60 12.60 12.60 > > > > > S323 10.93 11.02 8.48 8.51 > > > > > S331 4.23 4.23 7.20 7.20 > > > > > S332 7.21 7.21 5.21 5.31 > > > > > S341 4.74 4.85 7.23 7.20 > > > > > S342 6.02 6.09 7.25 7.20 > > > > > S343 2.14 2.06 2.16 2.01 > > > > > S351 49.26 47.34 21.82 46.46 > > > > > S1351 50.85 50.35 33.68 49.06 > > > > > S352 58.14 58.04 57.68 57.64 > > > > > S353 8.35 8.38 8.34 8.19 > > > > > S421 43.13 43.34 20.62 22.46 > > > > > S1421 25.25 25.81 15.85 24.76 > > > > > S422 88.36 87.53 79.22 78.99 > > > > > S423 155.13 155.29 154.56 154.38 > > > > > S424 37.11 37.51 11.42 22.36 > > > > > S431 58.22 60.66 27.59 57.16 > > > > > S441 14.05 13.29 12.88 12.81 > > > > > S442 6.08 6.00 6.96 6.90 > > > > > S443 17.60 17.77 17.15 16.95 > > > > > S451 48.95 49.08 49.03 49.14 > > > > > S452 42.98 39.32 14.64 96.03 > > > > > S453 28.06 28.06 14.60 14.40 > > > > > S471 8.53 8.65 8.39 8.43 > > > > > S481 10.98 11.15 12.04 12.00 > > > > > S482 9.31 9.31 9.19 9.17 > > > > > S491 11.54 11.38 11.37 11.28 > > > > > S4112 8.21 8.36 9.13 8.94 > > > > > S4113 8.77 8.81 8.86 8.85 > > > > > S4114 12.32 12.15 12.18 11.77 > > > > > S4115 8.48 8.46 8.95 8.59 > > > > > S4116 3.21 3.23 6.02 5.94 > > > > > S4117 14.08 9.61 10.16 9.98 > > > > > S4121 8.53 8.26 4.04 8.17 > > > > > va 30.09 28.58 23.58 48.46 > > > > > vag 12.35 12.36 13.58 13.20 > > > > > vas 13.74 13.49 13.03 12.47 > > > > > vif 4.49 4.57 5.06 4.92 > > > > > vpv 58.59 57.22 28.28 57.24 > > > > > vtv 59.15 57.83 28.40 57.63 > > > > > vpvtv 33.18 32.84 16.35 32.73 > > > > > vpvts 5.99 5.83 2.99 6.38 > > > > > vpvpv 33.25 32.89 16.54 32.85 > > > > > vtvtv 32.83 32.80 16.84 35.97 > > > > > vsumr 72.03 72.03 72.20 72.04 > > > > > vdotr 72.05 72.05 72.42 72.04 > > > > > vbor 205.22 380.81 99.80 372.05 > > > > > > > > > > I've yet to go through these in detail (they just finished running 5 > > > > > minutes ago). But for the curious (and I've had several requests for > > > > > benchmarks), here you go. There is obviously more work to do. > > > > > > > > > > -Hal > > > > > > > > > > On Fri, 2011-10-28 at 14:30 +0200, Ralf Karrenberg wrote: > > > > > > Hi Hal, > > > > > > > > > > > > those numbers look very promising, great work! :) > > > > > > > > > > > > Best, > > > > > > Ralf > > > > > > > > > > > > ----- Original Message ----- > > > > > > > From: "Hal Finkel" > > > > > > > To: "Bruno Cardoso Lopes" > > > > > > > Cc: llvm-commits at cs.uiuc.edu > > > > > > > Sent: Freitag, 28. Oktober 2011 13:50:00 > > > > > > > Subject: Re: [llvm-commits] [PATCH] BasicBlock Autovectorization Pass > > > > > > > > > > > > > > Bruno, et al., > > > > > > > > > > > > > > I've attached a new version of the patch that contains improvements > > > > > > > (and > > > > > > > a critical bug fix [the code output is not more right, but the pass > > > > > > > in > > > > > > > the older patch would crash in certain cases and now does not]) > > > > > > > compared > > > > > > > to previous versions that I've posted. > > > > > > > > > > > > > > First, these are preliminary results because I did not do the things > > > > > > > necessary to make them real (explicitly quiet the machine, bind the > > > > > > > processes to one cpu, etc.). But they should be good enough for > > > > > > > discussion. > > > > > > > > > > > > > > I'm using LLVM head r143101, with the attached patch applied, and > > > > > > > clang > > > > > > > head r143100 on an x86_64 machine (some kind of Intel Xeon). For the > > > > > > > gcc > > > > > > > comparison, I'm using build Ubuntu 4.4.3-4ubuntu5. gcc was run -O3 > > > > > > > without any other optimization flags. opt was run -vectorize > > > > > > > -unroll-allow-partial -O3 with no other optimization flags (the patch > > > > > > > adds the -vectorize option). llc was just given -O3. > > > > > > > > > > > > > > It is not difficult to construct an example in which vectorization > > > > > > > would > > > > > > > be useful: take a loop that does more computation than load/stores, > > > > > > > and > > > > > > > (partially) unroll it. Here is a simple case: > > > > > > > > > > > > > > #define ITER 5000 > > > > > > > #define NUM 200 > > > > > > > double a[NUM][NUM]; > > > > > > > double b[NUM][NUM]; > > > > > > > > > > > > > > ... > > > > > > > > > > > > > > int main() > > > > > > > { > > > > > > > ... > > > > > > > > > > > > > > for (int i = 0; i < ITER; ++i) { > > > > > > > for (int x = 0; x < NUM; ++x) > > > > > > > for (int y = 0; y < NUM; ++y) { > > > > > > > double v = a[x][y], w = b[x][y]; > > > > > > > double z1 = v*w; > > > > > > > double z2 = v+w; > > > > > > > double z3 = z1*z2; > > > > > > > double z4 = z3+v; > > > > > > > double z5 = z2+w; > > > > > > > double z6 = z4*z5; > > > > > > > double z7 = z4+z5; > > > > > > > a[x][y] = v*v-z6; > > > > > > > b[x][y] = w-z7; > > > > > > > } > > > > > > > } > > > > > > > > > > > > > > ... > > > > > > > > > > > > > > return 0; > > > > > > > } > > > > > > > > > > > > > > Results: > > > > > > > gcc -03: 0m1.790s > > > > > > > llvm -vectorize: 0m2.360s > > > > > > > llvm: 0m2.780s > > > > > > > gcc -fno-tree-vectorize: 0m2.810s > > > > > > > (these are the user times after I've run enough for the times to > > > > > > > settle > > > > > > > to three decimal places) > > > > > > > > > > > > > > So the vectorization gives a ~15% improvement in the running time. > > > > > > > gcc's > > > > > > > vectorization still does a much better job, however (yielding an ~36% > > > > > > > improvement). So there is still work to do ;) > > > > > > > > > > > > > > Additionally, I've checked the autovectorization on some classic > > > > > > > numerical benchmarks from netlib. On these benchmarks, clang/llvm > > > > > > > already do a good job compared to gcc (gcc is only about 10% better, > > > > > > > and > > > > > > > this is true regardless of whether gcc's vectorization is on or off). > > > > > > > For these cases, autovectorization provides an insignificant speedup > > > > > > > in > > > > > > > most cases (but does not tend to make things worse, just not really > > > > > > > any > > > > > > > better either). Because gcc's vectorization also did not really help > > > > > > > gcc > > > > > > > in these cases, I'm not surprised. A good collection of these is > > > > > > > available here: > > > > > > > http://www.roylongbottom.org.uk/classic_benchmarks.tar.gz > > > > > > > > > > > > > > I've yet to run the test suite using the pass to validate it. That is > > > > > > > something that I plan to do. Actually, the "Livermore Loops" test in > > > > > > > the > > > > > > > aforementioned archive contains checksums to validate the results, > > > > > > > and > > > > > > > it looks like 1 or 2 of the loop results are wrong with vectorization > > > > > > > turned on, so I'll have to investigate that. > > > > > > > > > > > > > > -Hal > > > > > > > > > > > > > > On Wed, 2011-10-26 at 18:49 -0200, Bruno Cardoso Lopes wrote: > > > > > > > > Hi Hal, > > > > > > > > > > > > > > > > On Fri, Oct 21, 2011 at 7:04 PM, Hal Finkel > > > > > > > > wrote: > > > > > > > > > I've attached an initial version of a basic-block > > > > > > > > > autovectorization > > > > > > > > > pass. It works by searching a basic block for pairable > > > > > > > > > (independent) > > > > > > > > > instructions, and, using a chain-seeking heuristic, selects > > > > > > > > > pairings > > > > > > > > > likely to provide an overall speedup (if such pairings can be > > > > > > > > > found). > > > > > > > > > The selected pairs are then fused and, if necessary, other > > > > > > > > > instructions > > > > > > > > > are moved in order to maintain data-flow consistency. This works > > > > > > > > > only > > > > > > > > > within one basic block, but can do loop vectorization in > > > > > > > > > combination > > > > > > > > > with (partial) unrolling. The basic idea was inspired by the > > > > > > > > > Vienna MAP > > > > > > > > > Vectorizor, which has been used to vectorize FFT kernels, but the > > > > > > > > > algorithm used here is different. > > > > > > > > > > > > > > > > > > To try it, use -bb-vectorize with opt. There are a few options: > > > > > > > > > -bb-vectorize-req-chain-depth: default: 3 -- The depth of the > > > > > > > > > chain of > > > > > > > > > instruction pairs necessary in order to consider the pairs that > > > > > > > > > compose > > > > > > > > > the chain worthy of vectorization. > > > > > > > > > -bb-vectorize-vector-bits: default: 128 -- The size of the target > > > > > > > > > vector > > > > > > > > > registers > > > > > > > > > -bb-vectorize-no-ints -- Don't consider integer instructions > > > > > > > > > -bb-vectorize-no-floats -- Don't consider floating-point > > > > > > > > > instructions > > > > > > > > > > > > > > > > > > The vectorizor generates a lot of insert_element/extract_element > > > > > > > > > pairs; > > > > > > > > > The assumption is that other passes will turn these into shuffles > > > > > > > > > when > > > > > > > > > possible (it looks like some work is necessary here). It will > > > > > > > > > also > > > > > > > > > vectorize vector instructions, and generates shuffles in this > > > > > > > > > case > > > > > > > > > (again, other passes should combine these as appropriate). > > > > > > > > > > > > > > > > > > Currently, it does not fuse load or store instructions, but that > > > > > > > > > is a > > > > > > > > > feature that I'd like to add. Of course, alignment information is > > > > > > > > > an > > > > > > > > > issue for load/store vectorization (or maybe I should just fuse > > > > > > > > > them > > > > > > > > > anyway and let isel deal with unaligned cases?). > > > > > > > > > > > > > > > > > > Also, support needs to be added for fusing known intrinsics (fma, > > > > > > > > > etc.), > > > > > > > > > and, as has been discussed on llvmdev, we should add some > > > > > > > > > intrinsics to > > > > > > > > > allow the generation of addsub-type instructions. > > > > > > > > > > > > > > > > > > I've included a few tests, but it needs more. Please review (I'll > > > > > > > > > commit > > > > > > > > > if and when everyone is happy). > > > > > > > > > > > > > > > > > > Thanks in advance, > > > > > > > > > Hal > > > > > > > > > > > > > > > > > > P.S. There is another option (not so useful right now, but could > > > > > > > > > be): > > > > > > > > > -bb-vectorize-fast-dep -- Don't do a full inter-instruction > > > > > > > > > dependency > > > > > > > > > analysis; instead stop looking for instruction pairs after the > > > > > > > > > first use > > > > > > > > > of an instruction's value. [This makes the pass faster, but would > > > > > > > > > require a data-dependence-based reordering pass in order to be > > > > > > > > > effective]. > > > > > > > > > > > > > > > > Cool! :) > > > > > > > > Have you run this pass with any benchmark or the llvm testsuite? > > > > > > > > Does > > > > > > > > it presents any regression? > > > > > > > > Do you have any performance results? > > > > > > > > Cheers, > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > Hal Finkel > > > > > > > Postdoctoral Appointee > > > > > > > Leadership Computing Facility > > > > > > > Argonne National Laboratory > > > > > > > > > > > > > > _______________________________________________ > > > > > > > llvm-commits mailing list > > > > > > > llvm-commits at cs.uiuc.edu > > > > > > > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > llvm-commits mailing list > > > > > llvm-commits at cs.uiuc.edu > > > > > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > > > > > > > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits -- Hal Finkel Postdoctoral Appointee Leadership Computing Facility Argonne National Laboratory From gkistanova at gmail.com Tue Nov 1 13:41:13 2011 From: gkistanova at gmail.com (Galina Kistanova) Date: Tue, 01 Nov 2011 18:41:13 -0000 Subject: [llvm-commits] [zorg] r143473 - in /zorg/trunk: buildbot/osuosl/master/templates/ buildbot/osuosl/master/templates/root.html zorg/buildbot/changes/ zorg/buildbot/changes/__init__.py zorg/buildbot/changes/llvmpoller.py Message-ID: <20111101184113.B5DAA2A6C12C@llvm.org> Author: gkistanova Date: Tue Nov 1 13:41:13 2011 New Revision: 143473 URL: http://llvm.org/viewvc/llvm-project?rev=143473&view=rev Log: Added template for buildmaster home page and llvmpoller.py Added: zorg/trunk/buildbot/osuosl/master/templates/ zorg/trunk/buildbot/osuosl/master/templates/root.html zorg/trunk/zorg/buildbot/changes/ zorg/trunk/zorg/buildbot/changes/__init__.py zorg/trunk/zorg/buildbot/changes/llvmpoller.py Added: zorg/trunk/buildbot/osuosl/master/templates/root.html URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/osuosl/master/templates/root.html?rev=143473&view=auto ============================================================================== --- zorg/trunk/buildbot/osuosl/master/templates/root.html (added) +++ zorg/trunk/buildbot/osuosl/master/templates/root.html Tue Nov 1 13:41:13 2011 @@ -0,0 +1,63 @@ +{% extends 'layout.html' %} +{% import 'forms.html' as forms %} + +{% block content %} + +

    Welcome to the Buildbot +{%- if title -%} +  for the  + {%- if title_url -%} + {{ title }} + {%- else -%} + {{ title }} + {%- endif -%} + project +{%- endif -%} +! +

    + +
    + + + +{%- if authz.advertiseAction('cleanShutdown') -%} +{%- if shutting_down -%} +Master is shutting down
    +{{ forms.cancel_clean_shutdown(cancel_shutdown_url, authz) }} +{%- else -%} +{{ forms.clean_shutdown(shutdown_url, authz) }} +{%- endif -%} +{%- endif -%} + +

    Admin: Galina Kistanova gkistanova at gmail.com

    + +
    + +{% endblock %} Added: zorg/trunk/zorg/buildbot/changes/__init__.py URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/changes/__init__.py?rev=143473&view=auto ============================================================================== (empty) Added: zorg/trunk/zorg/buildbot/changes/llvmpoller.py URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/changes/llvmpoller.py?rev=143473&view=auto ============================================================================== --- zorg/trunk/zorg/buildbot/changes/llvmpoller.py (added) +++ zorg/trunk/zorg/buildbot/changes/llvmpoller.py Tue Nov 1 13:41:13 2011 @@ -0,0 +1,296 @@ +# LLVM buildbot needs to watch multiple projects within a single repository. + +# Based on the buildbot.changes.svnpoller.SVNPoller source code. + +from twisted.python import log +from twisted.internet import defer, utils + +from buildbot import util +from buildbot.changes import base + +import xml.dom.minidom +import os, urllib, collections + +class LLVMPoller(base.PollingChangeSource, util.ComparableMixin): + """ + Poll LLVM repository for changes and submit them to the change master. + Following Multiple Projects. + """ + + _svnurl="http://llvm.org/svn/llvm-project" + _revlinktmpl="http://llvm.org/viewvc/llvm-project/?view=rev&revision=%s" + + compare_attrs = ["svnurl", "split_svn_path", + "svnuser", "svnpasswd", + "pollInterval", "histmax", + "svnbin", "category", "cachepath", + "projects"] + + parent = None # filled in when we're added + last_change = None + loop = None + + def __init__(self, svnurl=_svnurl, svnuser=None, svnpasswd=None, + pollInterval=2*60, histmax=10, + svnbin='svn', revlinktmpl=_revlinktmpl, category=None, + projects=None, cachepath=None): + + # projects is a list of projects to watch or None to watch all. + if projects: + if isinstance(projects, str): + projects = [projects] + assert isinstance(projects, list) + assert len(projects) > 0 + self.projects = projects + + if svnurl.endswith("/"): + svnurl = svnurl[:-1] # strip the trailing slash. + self.svnurl = svnurl + self._prefix = svnurl # svnurl is the LLVM repository root. + + self.svnuser = svnuser + self.svnpasswd = svnpasswd + + self.revlinktmpl = revlinktmpl + + self.environ = os.environ.copy() # include environment variables + # required for ssh-agent auth. + + self.svnbin = svnbin + self.pollInterval = pollInterval + self.histmax = histmax + self.category = category + + self.cachepath = cachepath + if self.cachepath and os.path.exists(self.cachepath): + try: + f = open(self.cachepath, "r") + self.last_change = int(f.read().strip()) + log.msg("LLVMPoller(%s): Setting last_change to %s" % (self.svnurl, self.last_change)) + f.close() + # try writing it, too + f = open(self.cachepath, "w") + f.write(str(self.last_change)) + f.close() + except: + self.cachepath = None + log.msg(("LLVMPoller(%s): Cache file corrupt or unwriteable; " + + "skipping and not using") % self.svnurl) + log.err() + + def describe(self): + return "LLVMPoller: watching %s" % self.svnurl + + def poll(self): + # Return value is only used for unit testing. + if self.projects: + log.msg("LLVMPoller(%s): Polling %s projects" % (self.svnurl, self.projects)) + else: + log.msg("LLVMPoller(%s): Polling all projects" % self.svnurl) + + d = defer.succeed(None) + + d.addCallback(self.get_logs) + d.addCallback(self.parse_logs) + d.addCallback(self.get_new_logentries) + d.addCallback(self.create_changes) + d.addCallback(self.submit_changes) + d.addCallback(self.finished_ok) + d.addErrback(log.err, 'LLVMPoller: Error in while polling') # eat errors + + return d + + def getProcessOutput(self, args): + # This exists so we can override it during the unit tests. + d = utils.getProcessOutput(self.svnbin, args, self.environ) + return d + + def get_logs(self, _): + args = [] + args.extend(["log", "--xml", "--verbose", "--non-interactive"]) + if self.svnuser: + args.extend(["--username=%s" % self.svnuser]) + if self.svnpasswd: + args.extend(["--password=%s" % self.svnpasswd]) + args.extend(["--limit=%d" % (self.histmax), self.svnurl]) + d = self.getProcessOutput(args) + return d + + def parse_logs(self, output): + # Parse the XML output, return a list of nodes. + try: + doc = xml.dom.minidom.parseString(output) + except xml.parsers.expat.ExpatError: + log.msg("LLVMPoller(%s): LLVMPoller.parse_logs: ExpatError in '%s'" % (self.svnurl, output)) + raise + logentries = doc.getElementsByTagName("logentry") + return logentries + + def get_new_logentries(self, logentries): + last_change = old_last_change = self.last_change + + # Given a list of logentries, calculate new_last_change, and + # new_logentries, where new_logentries contains only the ones after + # last_change. + + new_last_change = None + new_logentries = [] + if logentries: + new_last_change = int(logentries[0].getAttribute("revision")) + + if last_change is None: + # If this is the first time we've been run, ignore any changes + # that occurred before now. This prevents a build at every + # startup. + log.msg('LLVMPoller(%s): Starting at change %s' % (self.svnurl, new_last_change)) + elif last_change == new_last_change: + # An unmodified repository will hit this case. + log.msg('LLVMPoller(%s): No changes' % self.svnurl) + assert len(new_logentries) == 0 + return [] # No new logentries. + else: + for el in logentries: + if last_change == int(el.getAttribute("revision")): + break + new_logentries.append(el) + new_logentries.reverse() # Return the oldest first. + + self.last_change = new_last_change + log.msg('LLVMPoller(%s): Last change set from %s to %s' % + (self.svnurl, old_last_change, new_last_change)) + return new_logentries + + def _get_text(self, element, tag_name): + try: + child_nodes = element.getElementsByTagName(tag_name)[0].childNodes + text = "".join([t.data for t in child_nodes]) + except: + text = "" + return text + + def _transform_path(self, path): + """ + Parses the given path, and returns a three-entry tuple + (PROJECT, BRANCH, FILEPATH) if PROJECT is watched one, + or None otherwise. + """ + + relative_path = path + if relative_path.startswith(self._prefix): + relative_path = path[len(self._prefix):] + if relative_path.startswith("/"): + relative_path = relative_path[1:] + + # turn llvm/trunk/lib/CodeGen/Analysis.cpp into + # ("llvm", "trunk", "lib/CodeGen/Analysis.cpp") + # llvm/branches/release_30/lib/CodeGen/Analysis.cpp into + # ("llvm", "branches/release_30", "lib/CodeGen/Analysis.cpp") + # and llvm/tags/RELEASE_30/rc1/lib/CodeGen/Analysis.cpp into + # ("llvm", "tags/RELEASE_30/rc1", "lib/CodeGen/Analysis.cpp") + + pieces = relative_path.split('/') + project = pieces.pop(0) + + if self.projects: + if project not in self.projects: + # Handle only projects we are watching. + return None + + if pieces[0] == "trunk": + return (project, pieces[0], '/'.join(pieces[1:])) + elif pieces[0] == "branches": + return (project, '/'.join(pieces[0:2]), '/'.join(pieces[2:])) + elif pieces[0] == "tags": + return (project, '/'.join(pieces[0:3]), '/'.join(pieces[3:])) + else: + # Something we do not expect. + log.msg("LLVMPoller(%s) cannot parse the path (%s). Ignored." % (self.svnuurl, path)) + return None + + def create_changes(self, new_logentries): + changes = [] + + for el in new_logentries: + revision = str(el.getAttribute("revision")) + + revlink = '' + + if self.revlinktmpl: + if revision: + revlink = self.revlinktmpl % urllib.quote_plus(revision) + + log.msg("LLVMPoller(%s): Adding change revision %s" % (self.svnurl, revision)) + author = self._get_text(el, "author") + comments = self._get_text(el, "msg") + # there is a "date" field, but it provides localtime in the + # repository's timezone, whereas we care about buildmaster's + # localtime (since this will get used to position the boxes on + # the Waterfall display, etc). So ignore the date field, and + # addChange will fill in with the current time + branches = {} + try: + pathlist = el.getElementsByTagName("paths")[0] + except IndexError: # weird, we got an empty revision + log.msg("LLVMPoller(%s): Ignoring commit with no paths." % self.svnurl) + continue + + for p in pathlist.getElementsByTagName("path"): + action = p.getAttribute("action") + path = "".join([t.data for t in p.childNodes]) + # the rest of buildbot is certaily not yet ready to handle + # unicode filenames, because they get put in RemoteCommands + # which get sent via PB to the buildslave, and PB doesn't + # handle unicode. + path = path.encode("ascii") + if path.startswith("/"): + path = path[1:] + where = self._transform_path(path) + + # if 'where' is None, the file was outside any project that + # we care about and we should ignore it. + if where: + assert len(where) == 3 + project, branch, filename = where + if not branch in branches: + branches[branch] = {'files': []} + branches[branch]['files'].append(filename) + + if not branches[branch].has_key('action'): + branches[branch]['action'] = action + + for branch in branches.keys(): + action = branches[branch]['action'] + files = branches[branch]['files'] + number_of_files_changed = len(files) + + if action == u'D' and number_of_files_changed == 1 and files[0] == '': + log.msg("LLVMPoller(%s): Ignoring deletion of branch '%s'" % (self.svnurl, branch)) + else: + chdict = dict(author=author, + files=files, + comments=comments, + revision=revision, + branch=branch, + revlink=revlink, + category=self.category, + repository=self.svnurl, + project=project) + changes.append(chdict) + + return changes + + @defer.deferredGenerator + def submit_changes(self, changes): + for chdict in changes: + wfd = defer.waitForDeferred(self.master.addChange(**chdict)) + yield wfd + wfd.getResult() + + def finished_ok(self, res): + if self.cachepath: + f = open(self.cachepath, "w") + f.write(str(self.last_change)) + f.close() + + log.msg("LLVMPoller: Finished polling with res %s" % res) + return res From spop at codeaurora.org Tue Nov 1 13:55:09 2011 From: spop at codeaurora.org (Sebastian Pop) Date: Tue, 1 Nov 2011 13:55:09 -0500 Subject: [llvm-commits] [cfe-commits] Ping^2: Fix for bug 11060: configure --target does not work In-Reply-To: <2339F73F-64A1-4A5E-8987-F896661193BD@apple.com> References: <64775AFC-9ADD-4C75-86EE-9688036285EB@apple.com> <20111026165442.GD19773@britannica.bec.de> <20111027022913.GA21866@britannica.bec.de> <20111028030122.GA2196@britannica.bec.de> <891D7D3C-5983-4EA1-A34F-423A18F5CD49@apple.com> <2339F73F-64A1-4A5E-8987-F896661193BD@apple.com> Message-ID: On Tue, Nov 1, 2011 at 1:25 PM, Chris Lattner wrote: > Yep, please do. ?Just read through llvm/docs/DeveloperPolicy.html and send > me the requested info (offline) I just sent this info. Eric, I will apply my patches after I get the account. Thanks, Sebastian -- Qualcomm Innovation Center, Inc is a member of Code Aurora Forum From echristo at apple.com Tue Nov 1 14:03:37 2011 From: echristo at apple.com (Eric Christopher) Date: Tue, 01 Nov 2011 12:03:37 -0700 Subject: [llvm-commits] [cfe-commits] Ping^2: Fix for bug 11060: configure --target does not work In-Reply-To: References: <64775AFC-9ADD-4C75-86EE-9688036285EB@apple.com> <20111026165442.GD19773@britannica.bec.de> <20111027022913.GA21866@britannica.bec.de> <20111028030122.GA2196@britannica.bec.de> <891D7D3C-5983-4EA1-A34F-423A18F5CD49@apple.com> <2339F73F-64A1-4A5E-8987-F896661193BD@apple.com> Message-ID: On Nov 1, 2011, at 11:55 AM, Sebastian Pop wrote: > On Tue, Nov 1, 2011 at 1:25 PM, Chris Lattner wrote: >> Yep, please do. Just read through llvm/docs/DeveloperPolicy.html and send >> me the requested info (offline) > > I just sent this info. > Eric, I will apply my patches after I get the account. Cool deal. Thanks! -eric From joerg at britannica.bec.de Tue Nov 1 14:15:03 2011 From: joerg at britannica.bec.de (Joerg Sonnenberger) Date: Tue, 1 Nov 2011 20:15:03 +0100 Subject: [llvm-commits] [cfe-commits] Ping^2: Fix for bug 11060: configure --target does not work In-Reply-To: References: <64775AFC-9ADD-4C75-86EE-9688036285EB@apple.com> <20111026165442.GD19773@britannica.bec.de> <20111027022913.GA21866@britannica.bec.de> <20111028030122.GA2196@britannica.bec.de> Message-ID: <20111101191503.GA10307@britannica.bec.de> On Tue, Nov 01, 2011 at 11:44:33AM -0500, Sebastian Pop wrote: > Ok with these changes? Looks good. Chris -- can we also add -target $TRIPLE for clang and issue a warning (+ mapping to -target) for -ccc-host-triple? Joerg From tobias at grosser.es Tue Nov 1 14:19:08 2011 From: tobias at grosser.es (Tobias Grosser) Date: Tue, 01 Nov 2011 19:19:08 +0000 Subject: [llvm-commits] [PATCH] BasicBlock Autovectorization Pass In-Reply-To: <1320172356.23036.1298.camel@sapling> References: <1319909412.23036.851.camel@sapling> <1319914924.23036.852.camel@sapling> <1319919418.23036.881.camel@sapling> <1319928991.23036.957.camel@sapling> <1320108633.23036.1266.camel@sapling> <1320172356.23036.1298.camel@sapling> Message-ID: <4EB0462C.5010209@grosser.es> On 11/01/2011 06:32 PM, Hal Finkel wrote: > Any objections to me committing this? [And some relevant docs changes] I > think that it is ready at this point. First of all. I think it is great to see work starting on an autovectorizer for LLVM. Unfortunately I did not have time to test your vectorizer pass intensively, but here my first comments: 1. This patch breaks the --enable-shared/BUILD_SHARED_LIBS build. The following patch fixes this for cmake: 0001-Add-vectorizer-to-libraries-used-by-Transforms-IPO.patch Can you check the autoconf build with --enable-shared? 2. Did you run this pass on the llvm test-suite? Does your vectorizer introduce any correctness regressions? What are the top 10 compile time increases/decreases. How about run time? 3. I did not really test this intensively, but I had the feeling the compile time increase for large basic blocks is quite a lot. I still need to extract a test case. Any comments on the complexity of your vectorizer? I plan to look into your vectorizer during the next couple of days/weeks, but will most probably not have the time to do this tonight. Sorry. :-( Cheers Tobi -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Add-vectorizer-to-libraries-used-by-Transforms-IPO.patch Type: text/x-diff Size: 1316 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111101/63b8a858/attachment.bin From echristo at apple.com Tue Nov 1 14:20:51 2011 From: echristo at apple.com (Eric Christopher) Date: Tue, 01 Nov 2011 12:20:51 -0700 Subject: [llvm-commits] [cfe-commits] Ping^2: Fix for bug 11060: configure --target does not work In-Reply-To: <20111101191503.GA10307@britannica.bec.de> References: <64775AFC-9ADD-4C75-86EE-9688036285EB@apple.com> <20111026165442.GD19773@britannica.bec.de> <20111027022913.GA21866@britannica.bec.de> <20111028030122.GA2196@britannica.bec.de> <20111101191503.GA10307@britannica.bec.de> Message-ID: On Nov 1, 2011, at 12:15 PM, Joerg Sonnenberger wrote: > On Tue, Nov 01, 2011 at 11:44:33AM -0500, Sebastian Pop wrote: >> Ok with these changes? > > Looks good. > > Chris -- can we also add -target $TRIPLE for clang and issue a warning > (+ mapping to -target) for -ccc-host-triple? We can do that, James has some ideas along that route that he and I have been chatting about so I'd prefer the solution we're going for there rather than the quick hack of -target. -eric From sabre at nondot.org Tue Nov 1 15:05:47 2011 From: sabre at nondot.org (Chris Lattner) Date: Tue, 01 Nov 2011 20:05:47 -0000 Subject: [llvm-commits] [www] r143478 - /www/trunk/Users.html Message-ID: <20111101200547.2DCA42A6C12C@llvm.org> Author: lattner Date: Tue Nov 1 15:05:46 2011 New Revision: 143478 URL: http://llvm.org/viewvc/llvm-project?rev=143478&view=rev Log: various apple updates. Modified: www/trunk/Users.html Modified: www/trunk/Users.html URL: http://llvm.org/viewvc/llvm-project/www/trunk/Users.html?rev=143478&r1=143477&r2=143478&view=diff ============================================================================== --- www/trunk/Users.html (original) +++ www/trunk/Users.html Tue Nov 1 15:05:46 2011 @@ -106,6 +106,27 @@ Static Analyzer is built on the Clang static analyzer, and allows Xcode users easy access to the Clang Static Analyzer as well as a first class user interface to dig through and visualize results.

    + + Xcode 4.0 (and later): The Clang + parser for C, C++, and Objective-C are now deeply integrated into the Xcode + IDE for code completion, syntax highlighting, indexing, "Edit All In + Scope", and other source code sensitive features. The Clang command line + compiler (known as "LLVM Compiler" in Xcode) also now fully supports C++. + This release is the first Apple release of the LLDB Debugger.

    + + Xcode 4.1 (and later): LLDB supports debugging iOS devices.

    + + Mac OS X 10.7 Lion and iOS5: Virtually all of the code in these + operating systems were built with Clang and llvm-gcc.

    + + Xcode 4.2 (and later): "LLVM Compiler 3.0" (aka Clang) now supports many + C++'11 features and libc++ is + supported as a modern C++ runtime library. ARC + is a major new Objective-C feature introduced in this release, + introducing automated memory management to iOS programming. Xcode 4.2 + no longer includes GCC 4.2, only the LLVM backend is supported.

    From sabre at nondot.org Tue Nov 1 15:09:20 2011 From: sabre at nondot.org (Chris Lattner) Date: Tue, 01 Nov 2011 20:09:20 -0000 Subject: [llvm-commits] [www] r143488 - /www/trunk/Users.html Message-ID: <20111101200920.0ADE32A6C12C@llvm.org> Author: lattner Date: Tue Nov 1 15:09:19 2011 New Revision: 143488 URL: http://llvm.org/viewvc/llvm-project?rev=143488&view=rev Log: minor tweaks. Modified: www/trunk/Users.html Modified: www/trunk/Users.html URL: http://llvm.org/viewvc/llvm-project/www/trunk/Users.html?rev=143488&r1=143487&r2=143488&view=diff ============================================================================== --- www/trunk/Users.html (original) +++ www/trunk/Users.html Tue Nov 1 15:09:19 2011 @@ -112,7 +112,7 @@ IDE for code completion, syntax highlighting, indexing, "Edit All In Scope", and other source code sensitive features. The Clang command line compiler (known as "LLVM Compiler" in Xcode) also now fully supports C++. - This release is the first Apple release of the LLDB Debugger.

    Xcode 4.1 (and later): LLDB supports debugging iOS devices.

    @@ -126,7 +126,8 @@ href="http://clang.llvm.org/docs/AutomaticReferenceCounting.html">ARC is a major new Objective-C feature introduced in this release, introducing automated memory management to iOS programming. Xcode 4.2 - no longer includes GCC 4.2, only the LLVM backend is supported.

    + no longer includes GCC 4.2, only the LLVM backend is supported (in the + Clang and llvm-gcc compilers).

    From sabre at nondot.org Tue Nov 1 15:13:05 2011 From: sabre at nondot.org (Chris Lattner) Date: Tue, 01 Nov 2011 20:13:05 -0000 Subject: [llvm-commits] [www] r143489 - /www/trunk/Users.html Message-ID: <20111101201305.69CC22A6C12C@llvm.org> Author: lattner Date: Tue Nov 1 15:13:05 2011 New Revision: 143489 URL: http://llvm.org/viewvc/llvm-project?rev=143489&view=rev Log: reverse the bullet order in the apple section to be newest to oldest, remove the (and later)'s. Modified: www/trunk/Users.html Modified: www/trunk/Users.html URL: http://llvm.org/viewvc/llvm-project/www/trunk/Users.html?rev=143489&r1=143488&r2=143489&view=diff ============================================================================== --- www/trunk/Users.html (original) +++ www/trunk/Users.html Tue Nov 1 15:13:05 2011 @@ -72,63 +72,63 @@ Apple Inc. - Mac OS X 10.4 (and later): Uses the LLVM JIT for optimizing - many parts of the OpenGL pipeline, including emulating vertex/pixel shaders - when hardware support is missing, performing texture format - conversion before uploading to the GPU, efficiently packing GPU buffers - for vertex submission, and many others.

    + + Xcode 4.2: "LLVM Compiler 3.0" (aka Clang) now supports many + C++'11 features and libc++ is + supported as a modern C++ runtime library. ARC + is a major new Objective-C feature introduced in this release, + introducing automated memory management to iOS programming. Xcode 4.2 + no longer includes GCC 4.2, only the LLVM backend is supported (in the + Clang and llvm-gcc compilers).

    - Xcode 3.1 (and later): llvm-gcc 4.2 - compiler is now available for use in Xcode or from the command line. It - supports PPC32/X86-32/X86-64 and includes transparent LTO integration.

    + Mac OS X 10.7 Lion and iOS5: Virtually all of the code in these + operating systems were built with Clang and llvm-gcc.

    + + Xcode 4.1: LLDB supports debugging iOS devices.

    + + Xcode 4.0: The Clang + parser for C, C++, and Objective-C are now deeply integrated into the Xcode + IDE for code completion, syntax highlighting, indexing, "Edit All In + Scope", and other source code sensitive features. The Clang command line + compiler (known as "LLVM Compiler" in Xcode) also now fully supports C++. + This was the first Apple release of the LLDB Debugger.

    + + Xcode 3.2: Clang is + now included as a production quality C and Objective-C compiler that is + available for use in Xcode or from the command line. It supports X86-32/X86-64 + and builds code 2-3x faster than GCC in "-O0 -g" mode. Many "developer tools" + GUI apps were shipped built with Clang, including Xcode, Interface Builder, + Automator, and several others.

    - Mac OS X 10.6 (and later): The Xcode + Static Analyzer is built on the Clang static + analyzer, and allows Xcode users easy access to the Clang Static Analyzer as + well as a first class user interface to dig through and visualize results.

    + + Mac OS X 10.6: The OpenCL GPGPU implementation is built on Clang and LLVM compiler technology. This + href="http://developer.apple.com/mac/library/documentation/Performance/Conceptual/OpenCL_MacProgGuide/OpenCLontheMacPlatform/OpenCLontheMacPlatform.html">built on Clang and LLVM compiler technology. This requires parsing an extended dialect of C at runtime and JIT compiling it to run on the CPU, GPU, or both at the same time. In addition, several performance sensitive pieces of Mac OS X 10.6 were built with llvm-gcc such as OpenSSL and Hotspot. Finally, the compiler_rt library has replaced libgcc and is now a part of libsystem.dylib.

    + + Xcode 3.1: llvm-gcc 4.2 + compiler is now available for use in Xcode or from the command line. It + supports PPC32/X86-32/X86-64 and includes transparent LTO integration.

    - Xcode 3.2 (and later): Clang is - now included as a production quality C and Objective-C compiler that is - available for use in Xcode or from the command line. It supports X86-32/X86-64 - and builds code 2-3x faster than GCC in "-O0 -g" mode. Many "developer tools" - GUI apps were shipped built with Clang, including Xcode, Interface Builder, - Automator, and several others.

    - - Xcode 3.2 (and later): The Xcode - Static Analyzer is built on the Clang static - analyzer, and allows Xcode users easy access to the Clang Static Analyzer as - well as a first class user interface to dig through and visualize results.

    - - Xcode 4.0 (and later): The Clang - parser for C, C++, and Objective-C are now deeply integrated into the Xcode - IDE for code completion, syntax highlighting, indexing, "Edit All In - Scope", and other source code sensitive features. The Clang command line - compiler (known as "LLVM Compiler" in Xcode) also now fully supports C++. - This was the first Apple release of the LLDB Debugger.

    - - Xcode 4.1 (and later): LLDB supports debugging iOS devices.

    - - Mac OS X 10.7 Lion and iOS5: Virtually all of the code in these - operating systems were built with Clang and llvm-gcc.

    - - Xcode 4.2 (and later): "LLVM Compiler 3.0" (aka Clang) now supports many - C++'11 features and libc++ is - supported as a modern C++ runtime library. ARC - is a major new Objective-C feature introduced in this release, - introducing automated memory management to iOS programming. Xcode 4.2 - no longer includes GCC 4.2, only the LLVM backend is supported (in the - Clang and llvm-gcc compilers).

    - + Mac OS X 10.4: Uses the LLVM JIT for optimizing + many parts of the OpenGL pipeline, including emulating vertex/pixel shaders + when hardware support is missing, performing texture format + conversion before uploading to the GPU, efficiently packing GPU buffers + for vertex submission, and many others.

    + From peter_cooper at apple.com Tue Nov 1 15:37:40 2011 From: peter_cooper at apple.com (Peter Cooper) Date: Tue, 01 Nov 2011 13:37:40 -0700 Subject: [llvm-commits] patch: partial DSE In-Reply-To: References: <94CCF474-AEAB-42EE-8667-47D93735B2F0@apple.com> Message-ID: <201E08F1-048F-4149-AB42-A066AB021D16@apple.com> You're right! Why did i write that? :) Otherwise do you think its ok? Thanks, Pete On Nov 1, 2011, at 11:14 AM, Devang Patel wrote: > > On Oct 31, 2011, at 5:38 PM, Peter Cooper wrote: > >> Hi >> >> Please review this patch to allow DSE to trim stores as opposed to deleting them. >> >> The logic here is that if the end of the earlier store is dead because of a later store then the length of the earlier store will be trimmed in size to avoid writing dead memory. The only time i won't do this is if the original store was likely to use vector writes which if shortened would end up as multiple scalar writes and so is less efficient. > > + if (OR == OverwriteComplete) { > + DEBUG(dbgs() << "DSE: Remove Dead Store:\n DEAD: " > + << *DepWrite << "\n KILLER: " << *Inst << '\n'); > + > + if (OR == OverwriteComplete) { > > You're checking the same thing twice here. > - > Devang From sabre at nondot.org Tue Nov 1 15:59:03 2011 From: sabre at nondot.org (Chris Lattner) Date: Tue, 01 Nov 2011 20:59:03 -0000 Subject: [llvm-commits] [www] r143494 - /www/trunk/devmtg/index.html Message-ID: <20111101205903.9B2B92A6C12D@llvm.org> Author: lattner Date: Tue Nov 1 15:59:03 2011 New Revision: 143494 URL: http://llvm.org/viewvc/llvm-project?rev=143494&view=rev Log: test commit Modified: www/trunk/devmtg/index.html Modified: www/trunk/devmtg/index.html URL: http://llvm.org/viewvc/llvm-project/www/trunk/devmtg/index.html?rev=143494&r1=143493&r2=143494&view=diff ============================================================================== --- www/trunk/devmtg/index.html (original) +++ www/trunk/devmtg/index.html Tue Nov 1 15:59:03 2011 @@ -3,7 +3,7 @@

    LLVM Developers' Meeting
    -

    The upcoming developer's meeting is on November 18, 2011.

    +

    The upcoming developer's meeting is on November 18, 2011.

    We have had these meetings so far:

    From tonic at nondot.org Tue Nov 1 16:01:22 2011 From: tonic at nondot.org (Tanya Lattner) Date: Tue, 01 Nov 2011 21:01:22 -0000 Subject: [llvm-commits] [www] r143495 - /www/trunk/index.html Message-ID: <20111101210122.B8DFF2A6C12C@llvm.org> Author: tbrethou Date: Tue Nov 1 16:01:22 2011 New Revision: 143495 URL: http://llvm.org/viewvc/llvm-project?rev=143495&view=rev Log: Testing auto-update. Modified: www/trunk/index.html Modified: www/trunk/index.html URL: http://llvm.org/viewvc/llvm-project/www/trunk/index.html?rev=143495&r1=143494&r2=143495&view=diff ============================================================================== --- www/trunk/index.html (original) +++ www/trunk/index.html Tue Nov 1 16:01:22 2011 @@ -1,6 +1,5 @@ - From eli.friedman at gmail.com Tue Nov 1 16:18:40 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Tue, 01 Nov 2011 21:18:40 -0000 Subject: [llvm-commits] [llvm] r143498 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/x86-shifts.ll Message-ID: <20111101211840.23C322A6C12C@llvm.org> Author: efriedma Date: Tue Nov 1 16:18:39 2011 New Revision: 143498 URL: http://llvm.org/viewvc/llvm-project?rev=143498&view=rev Log: Teach the x86 backend a couple tricks for dealing with v16i8 sra by a constant splat value. Fixes PR11289. Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp llvm/trunk/test/CodeGen/X86/x86-shifts.ll Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=143498&r1=143497&r2=143498&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Nov 1 16:18:39 2011 @@ -966,6 +966,7 @@ setOperationAction(ISD::SRA, MVT::v4i32, Custom); setOperationAction(ISD::SRA, MVT::v8i16, Custom); + setOperationAction(ISD::SRA, MVT::v16i8, Custom); } if (Subtarget->hasSSE42() || Subtarget->hasAVX()) @@ -9994,6 +9995,23 @@ return DAG.getNode(ISD::INTRINSIC_WO_CHAIN, dl, VT, DAG.getConstant(Intrinsic::x86_sse2_psrai_w, MVT::i32), R, DAG.getConstant(ShiftAmt, MVT::i32)); + + if (VT == MVT::v16i8 && Op.getOpcode() == ISD::SRA) { + if (ShiftAmt == 7) { + // R s>> 7 === R s< 0 + SDValue Zeros = getZeroVector(VT, true /* HasXMMInt */, DAG, dl); + return DAG.getNode(X86ISD::PCMPGTB, dl, VT, Zeros, R); + } + + // R s>> a === ((R u>> a) ^ m) - m + SDValue Res = DAG.getNode(ISD::SRL, dl, VT, R, Amt); + SmallVector V(16, DAG.getConstant(128 >> ShiftAmt, + MVT::i8)); + SDValue Mask = DAG.getNode(ISD::BUILD_VECTOR, dl, VT, &V[0], 16); + Res = DAG.getNode(ISD::XOR, dl, VT, Res, Mask); + Res = DAG.getNode(ISD::SUB, dl, VT, Res, Mask); + return Res; + } } } Modified: llvm/trunk/test/CodeGen/X86/x86-shifts.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/x86-shifts.ll?rev=143498&r1=143497&r2=143498&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/x86-shifts.ll (original) +++ llvm/trunk/test/CodeGen/X86/x86-shifts.ll Tue Nov 1 16:18:39 2011 @@ -170,3 +170,23 @@ ; CHECK: pand ; CHECK: ret } + +define <16 x i8> @sra_v16i8_7(<16 x i8> %A) nounwind { + %B = ashr <16 x i8> %A, + ret <16 x i8> %B +; CHECK: sra_v16i8_7: +; CHECK: pxor +; CHECK: pcmpgtb +; CHECK: ret +} + +define <16 x i8> @sra_v16i8(<16 x i8> %A) nounwind { + %B = ashr <16 x i8> %A, + ret <16 x i8> %B +; CHECK: sra_v16i8: +; CHECK: psrlw $3 +; CHECK: pand +; CHECK: pxor +; CHECK: psubb +; CHECK: ret +} From daniel at zuster.org Tue Nov 1 16:22:16 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 1 Nov 2011 14:22:16 -0700 Subject: [llvm-commits] [llvm] r141977 - /llvm/trunk/utils/llvmbuild In-Reply-To: <20111014191237.51440312800A@llvm.org> References: <20111014191237.51440312800A@llvm.org> Message-ID: Hi David, This script appears to be pretty specific to your workflow. While it looks cool, I'm not really sure it belongs where it is. I also want to take the llvm-build name, and I don't want people to be confused by two similarly but completely unrelated things. Do you really feel like this script is something that belongs in the tree? Does anyone else use it? Are you ok moving it aside and to a name that is more specific to what it does, instead of a the very generic llvmbuild name? - Daniel On Fri, Oct 14, 2011 at 12:12 PM, David Greene wrote: > Author: greened > Date: Fri Oct 14 14:12:37 2011 > New Revision: 141977 > > URL: http://llvm.org/viewvc/llvm-project?rev=141977&view=rev > Log: > Fix threads/jobs Calculation > > Pass the correct jobs and threads information to the builder. > We were underutilizing the number of jobs and threads specified > by the user. > > Modified: > ? ?llvm/trunk/utils/llvmbuild > > Modified: llvm/trunk/utils/llvmbuild > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvmbuild?rev=141977&r1=141976&r2=141977&view=diff > ============================================================================== > --- llvm/trunk/utils/llvmbuild (original) > +++ llvm/trunk/utils/llvmbuild Fri Oct 14 14:12:37 2011 > @@ -755,9 +755,10 @@ > ? ? jobs = 1 > > ?numthreads = options.threads > -if jobs < numthreads: > - ? ?numthreads = jobs > - ? ?jobs = 1 > + > +logging.getLogger().info("Building with " + str(options.jobs) + " jobs and " > + ? ? ? ? ? ? ? ? ? ? ? ? + str(numthreads) + " threads using " + str(jobs) > + ? ? ? ? ? ? ? ? ? ? ? ? + " make jobs") > > ?for t in range(numthreads): > ? ? builder = Builder(work_queue, jobs, > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > From spop at codeaurora.org Tue Nov 1 16:30:04 2011 From: spop at codeaurora.org (Sebastian Pop) Date: Tue, 01 Nov 2011 21:30:04 -0000 Subject: [llvm-commits] [llvm] r143500 - in /llvm/trunk: autoconf/configure.ac configure projects/sample/autoconf/configure.ac projects/sample/configure Message-ID: <20111101213004.73FE22A6C12C@llvm.org> Author: spop Date: Tue Nov 1 16:30:04 2011 New Revision: 143500 URL: http://llvm.org/viewvc/llvm-project?rev=143500&view=rev Log: derive LLVM_HOSTTRIPLE from target Modified: llvm/trunk/autoconf/configure.ac llvm/trunk/configure llvm/trunk/projects/sample/autoconf/configure.ac llvm/trunk/projects/sample/configure Modified: llvm/trunk/autoconf/configure.ac URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=143500&r1=143499&r2=143500&view=diff ============================================================================== --- llvm/trunk/autoconf/configure.ac (original) +++ llvm/trunk/autoconf/configure.ac Tue Nov 1 16:30:04 2011 @@ -1453,7 +1453,7 @@ [Installation directory for man pages]) AC_DEFINE_UNQUOTED(LLVM_CONFIGTIME, "$LLVM_CONFIGTIME", [Time at which LLVM was configured]) -AC_DEFINE_UNQUOTED(LLVM_HOSTTRIPLE, "$host", +AC_DEFINE_UNQUOTED(LLVM_HOSTTRIPLE, "$target", [Host triple we were built on]) # Determine which bindings to build. Modified: llvm/trunk/configure URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=143500&r1=143499&r2=143500&view=diff ============================================================================== --- llvm/trunk/configure (original) +++ llvm/trunk/configure Tue Nov 1 16:30:04 2011 @@ -20865,7 +20865,7 @@ cat >>confdefs.h <<_ACEOF -#define LLVM_HOSTTRIPLE "$host" +#define LLVM_HOSTTRIPLE "$target" _ACEOF Modified: llvm/trunk/projects/sample/autoconf/configure.ac URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/projects/sample/autoconf/configure.ac?rev=143500&r1=143499&r2=143500&view=diff ============================================================================== --- llvm/trunk/projects/sample/autoconf/configure.ac (original) +++ llvm/trunk/projects/sample/autoconf/configure.ac Tue Nov 1 16:30:04 2011 @@ -1386,7 +1386,7 @@ [Installation directory for man pages]) AC_DEFINE_UNQUOTED(LLVM_CONFIGTIME, "$LLVM_CONFIGTIME", [Time at which LLVM was configured]) -AC_DEFINE_UNQUOTED(LLVM_HOSTTRIPLE, "$host", +AC_DEFINE_UNQUOTED(LLVM_HOSTTRIPLE, "$target", [Host triple we were built on]) # Determine which bindings to build. Modified: llvm/trunk/projects/sample/configure URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/projects/sample/configure?rev=143500&r1=143499&r2=143500&view=diff ============================================================================== --- llvm/trunk/projects/sample/configure (original) +++ llvm/trunk/projects/sample/configure Tue Nov 1 16:30:04 2011 @@ -20815,7 +20815,7 @@ cat >>confdefs.h <<_ACEOF -#define LLVM_HOSTTRIPLE "$host" +#define LLVM_HOSTTRIPLE "$target" _ACEOF From spop at codeaurora.org Tue Nov 1 16:31:45 2011 From: spop at codeaurora.org (Sebastian Pop) Date: Tue, 01 Nov 2011 21:31:45 -0000 Subject: [llvm-commits] [llvm] r143501 - in /llvm/trunk: autoconf/configure.ac cmake/config-ix.cmake configure include/llvm/Config/config.h.cmake include/llvm/Config/config.h.in include/llvm/Config/llvm-config.h.cmake include/llvm/Config/llvm-config.h.in lib/Support/Unix/Host.inc lib/Support/Windows/Host.inc projects/sample/autoconf/configure.ac projects/sample/configure Message-ID: <20111101213145.48D9D2A6C12C@llvm.org> Author: spop Date: Tue Nov 1 16:31:44 2011 New Revision: 143501 URL: http://llvm.org/viewvc/llvm-project?rev=143501&view=rev Log: rename LLVM_HOSTTRIPLE into LLVM_DEFAULT_TARGET_TRIPLE Modified: llvm/trunk/autoconf/configure.ac llvm/trunk/cmake/config-ix.cmake llvm/trunk/configure llvm/trunk/include/llvm/Config/config.h.cmake llvm/trunk/include/llvm/Config/config.h.in llvm/trunk/include/llvm/Config/llvm-config.h.cmake llvm/trunk/include/llvm/Config/llvm-config.h.in llvm/trunk/lib/Support/Unix/Host.inc llvm/trunk/lib/Support/Windows/Host.inc llvm/trunk/projects/sample/autoconf/configure.ac llvm/trunk/projects/sample/configure Modified: llvm/trunk/autoconf/configure.ac URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=143501&r1=143500&r2=143501&view=diff ============================================================================== --- llvm/trunk/autoconf/configure.ac (original) +++ llvm/trunk/autoconf/configure.ac Tue Nov 1 16:31:44 2011 @@ -1453,8 +1453,8 @@ [Installation directory for man pages]) AC_DEFINE_UNQUOTED(LLVM_CONFIGTIME, "$LLVM_CONFIGTIME", [Time at which LLVM was configured]) -AC_DEFINE_UNQUOTED(LLVM_HOSTTRIPLE, "$target", - [Host triple we were built on]) +AC_DEFINE_UNQUOTED(LLVM_DEFAULT_TARGET_TRIPLE, "$target", + [Target triple LLVM will generate code for by default]) # Determine which bindings to build. if test "$BINDINGS_TO_BUILD" = auto ; then Modified: llvm/trunk/cmake/config-ix.cmake URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/config-ix.cmake?rev=143501&r1=143500&r2=143501&view=diff ============================================================================== --- llvm/trunk/cmake/config-ix.cmake (original) +++ llvm/trunk/cmake/config-ix.cmake Tue Nov 1 16:31:44 2011 @@ -286,15 +286,14 @@ check_cxx_compiler_flag("-Wno-variadic-macros" SUPPORTS_NO_VARIADIC_MACROS_FLAG) include(GetTargetTriple) -get_target_triple(LLVM_HOSTTRIPLE) +get_target_triple(LLVM_DEFAULT_TARGET_TRIPLE) -# FIXME: We don't distinguish the target and the host. :( -set(TARGET_TRIPLE "${LLVM_HOSTTRIPLE}") +set(TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}") # Determine the native architecture. string(TOLOWER "${LLVM_TARGET_ARCH}" LLVM_NATIVE_ARCH) if( LLVM_NATIVE_ARCH STREQUAL "host" ) - string(REGEX MATCH "^[^-]*" LLVM_NATIVE_ARCH ${LLVM_HOSTTRIPLE}) + string(REGEX MATCH "^[^-]*" LLVM_NATIVE_ARCH ${LLVM_DEFAULT_TARGET_TRIPLE}) endif () if (LLVM_NATIVE_ARCH MATCHES "i[2-6]86") Modified: llvm/trunk/configure URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=143501&r1=143500&r2=143501&view=diff ============================================================================== --- llvm/trunk/configure (original) +++ llvm/trunk/configure Tue Nov 1 16:31:44 2011 @@ -20865,7 +20865,7 @@ cat >>confdefs.h <<_ACEOF -#define LLVM_HOSTTRIPLE "$target" +#define LLVM_DEFAULT_TARGET_TRIPLE "$target" _ACEOF Modified: llvm/trunk/include/llvm/Config/config.h.cmake URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/config.h.cmake?rev=143501&r1=143500&r2=143501&view=diff ============================================================================== --- llvm/trunk/include/llvm/Config/config.h.cmake (original) +++ llvm/trunk/include/llvm/Config/config.h.cmake Tue Nov 1 16:31:44 2011 @@ -555,7 +555,7 @@ #cmakedefine01 LLVM_HAS_ATOMICS /* Host triple we were built on */ -#cmakedefine LLVM_HOSTTRIPLE "${LLVM_HOSTTRIPLE}" +#cmakedefine LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}" /* Installation directory for include files */ #cmakedefine LLVM_INCLUDEDIR "${LLVM_INCLUDEDIR}" Modified: llvm/trunk/include/llvm/Config/config.h.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/config.h.in?rev=143501&r1=143500&r2=143501&view=diff ============================================================================== --- llvm/trunk/include/llvm/Config/config.h.in (original) +++ llvm/trunk/include/llvm/Config/config.h.in Tue Nov 1 16:31:44 2011 @@ -543,6 +543,9 @@ /* Installation directory for data files */ #undef LLVM_DATADIR +/* Target triple LLVM will generate code for by default */ +#undef LLVM_DEFAULT_TARGET_TRIPLE + /* Installation directory for documentation */ #undef LLVM_DOCSDIR @@ -552,9 +555,6 @@ /* Has gcc/MSVC atomic intrinsics */ #undef LLVM_HAS_ATOMICS -/* Host triple we were built on */ -#undef LLVM_HOSTTRIPLE - /* Installation directory for include files */ #undef LLVM_INCLUDEDIR Modified: llvm/trunk/include/llvm/Config/llvm-config.h.cmake URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/llvm-config.h.cmake?rev=143501&r1=143500&r2=143501&view=diff ============================================================================== --- llvm/trunk/include/llvm/Config/llvm-config.h.cmake (original) +++ llvm/trunk/include/llvm/Config/llvm-config.h.cmake Tue Nov 1 16:31:44 2011 @@ -35,7 +35,7 @@ #cmakedefine01 LLVM_HAS_ATOMICS /* Host triple we were built on */ -#cmakedefine LLVM_HOSTTRIPLE "${LLVM_HOSTTRIPLE}" +#cmakedefine LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}" /* Installation directory for include files */ #cmakedefine LLVM_INCLUDEDIR "${LLVM_INCLUDEDIR}" Modified: llvm/trunk/include/llvm/Config/llvm-config.h.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/llvm-config.h.in?rev=143501&r1=143500&r2=143501&view=diff ============================================================================== --- llvm/trunk/include/llvm/Config/llvm-config.h.in (original) +++ llvm/trunk/include/llvm/Config/llvm-config.h.in Tue Nov 1 16:31:44 2011 @@ -35,7 +35,7 @@ #undef LLVM_HAS_ATOMICS /* Host triple we were built on */ -#undef LLVM_HOSTTRIPLE +#undef LLVM_DEFAULT_TARGET_TRIPLE /* Installation directory for include files */ #undef LLVM_INCLUDEDIR Modified: llvm/trunk/lib/Support/Unix/Host.inc URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Host.inc?rev=143501&r1=143500&r2=143501&view=diff ============================================================================== --- llvm/trunk/lib/Support/Unix/Host.inc (original) +++ llvm/trunk/lib/Support/Unix/Host.inc Tue Nov 1 16:31:44 2011 @@ -36,10 +36,7 @@ } std::string sys::getHostTriple() { - // FIXME: Derive directly instead of relying on the autoconf generated - // variable. - - StringRef HostTripleString(LLVM_HOSTTRIPLE); + StringRef HostTripleString(LLVM_DEFAULT_TARGET_TRIPLE); std::pair ArchSplit = HostTripleString.split('-'); // Normalize the arch, since the host triple may not actually match the host. Modified: llvm/trunk/lib/Support/Windows/Host.inc URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Host.inc?rev=143501&r1=143500&r2=143501&view=diff ============================================================================== --- llvm/trunk/lib/Support/Windows/Host.inc (original) +++ llvm/trunk/lib/Support/Windows/Host.inc Tue Nov 1 16:31:44 2011 @@ -18,6 +18,5 @@ using namespace llvm; std::string sys::getHostTriple() { - // FIXME: Adapt to running version. - return LLVM_HOSTTRIPLE; + return LLVM_DEFAULT_TARGET_TRIPLE; } Modified: llvm/trunk/projects/sample/autoconf/configure.ac URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/projects/sample/autoconf/configure.ac?rev=143501&r1=143500&r2=143501&view=diff ============================================================================== --- llvm/trunk/projects/sample/autoconf/configure.ac (original) +++ llvm/trunk/projects/sample/autoconf/configure.ac Tue Nov 1 16:31:44 2011 @@ -1386,8 +1386,8 @@ [Installation directory for man pages]) AC_DEFINE_UNQUOTED(LLVM_CONFIGTIME, "$LLVM_CONFIGTIME", [Time at which LLVM was configured]) -AC_DEFINE_UNQUOTED(LLVM_HOSTTRIPLE, "$target", - [Host triple we were built on]) +AC_DEFINE_UNQUOTED(LLVM_DEFAULT_TARGET_TRIPLE, "$target", + [Target triple LLVM will generate code for by default]) # Determine which bindings to build. if test "$BINDINGS_TO_BUILD" = auto ; then Modified: llvm/trunk/projects/sample/configure URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/projects/sample/configure?rev=143501&r1=143500&r2=143501&view=diff ============================================================================== --- llvm/trunk/projects/sample/configure (original) +++ llvm/trunk/projects/sample/configure Tue Nov 1 16:31:44 2011 @@ -20815,7 +20815,7 @@ cat >>confdefs.h <<_ACEOF -#define LLVM_HOSTTRIPLE "$target" +#define LLVM_DEFAULT_TARGET_TRIPLE "$target" _ACEOF From spop at codeaurora.org Tue Nov 1 16:32:20 2011 From: spop at codeaurora.org (Sebastian Pop) Date: Tue, 01 Nov 2011 21:32:20 -0000 Subject: [llvm-commits] [llvm] r143502 - in /llvm/trunk: include/llvm/Support/Host.h lib/ExecutionEngine/TargetSelect.cpp lib/Support/CommandLine.cpp lib/Support/TargetRegistry.cpp lib/Support/Unix/Host.inc lib/Support/Windows/Host.inc lib/Target/CBackend/CBackend.cpp tools/bugpoint/BugDriver.cpp tools/llc/llc.cpp tools/llvm-mc/llvm-mc.cpp tools/lto/LTOCodeGenerator.cpp tools/lto/LTOModule.cpp Message-ID: <20111101213221.1D4952A6C12C@llvm.org> Author: spop Date: Tue Nov 1 16:32:20 2011 New Revision: 143502 URL: http://llvm.org/viewvc/llvm-project?rev=143502&view=rev Log: rename getHostTriple into getDefaultTargetTriple Modified: llvm/trunk/include/llvm/Support/Host.h llvm/trunk/lib/ExecutionEngine/TargetSelect.cpp llvm/trunk/lib/Support/CommandLine.cpp llvm/trunk/lib/Support/TargetRegistry.cpp llvm/trunk/lib/Support/Unix/Host.inc llvm/trunk/lib/Support/Windows/Host.inc llvm/trunk/lib/Target/CBackend/CBackend.cpp llvm/trunk/tools/bugpoint/BugDriver.cpp llvm/trunk/tools/llc/llc.cpp llvm/trunk/tools/llvm-mc/llvm-mc.cpp llvm/trunk/tools/lto/LTOCodeGenerator.cpp llvm/trunk/tools/lto/LTOModule.cpp Modified: llvm/trunk/include/llvm/Support/Host.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Host.h?rev=143502&r1=143501&r2=143502&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/Host.h (original) +++ llvm/trunk/include/llvm/Support/Host.h Tue Nov 1 16:32:20 2011 @@ -33,14 +33,14 @@ return !isLittleEndianHost(); } - /// getHostTriple() - Return the target triple of the running + /// getDefaultTargetTriple() - Return the target triple of the running /// system. /// /// The target triple is a string in the format of: /// CPU_TYPE-VENDOR-OPERATING_SYSTEM /// or /// CPU_TYPE-VENDOR-KERNEL-OPERATING_SYSTEM - std::string getHostTriple(); + std::string getDefaultTargetTriple(); /// getHostCPUName - Get the LLVM name for the host CPU. The particular format /// of the name is target dependent, and suitable for passing as -mcpu to the Modified: llvm/trunk/lib/ExecutionEngine/TargetSelect.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/TargetSelect.cpp?rev=143502&r1=143501&r2=143502&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/TargetSelect.cpp (original) +++ llvm/trunk/lib/ExecutionEngine/TargetSelect.cpp Tue Nov 1 16:32:20 2011 @@ -35,7 +35,7 @@ std::string *ErrorStr) { Triple TheTriple(Mod->getTargetTriple()); if (TheTriple.getTriple().empty()) - TheTriple.setTriple(sys::getHostTriple()); + TheTriple.setTriple(sys::getDefaultTargetTriple()); // Adjust the triple to match what the user requested. const Target *TheTarget = 0; Modified: llvm/trunk/lib/Support/CommandLine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/CommandLine.cpp?rev=143502&r1=143501&r2=143502&view=diff ============================================================================== --- llvm/trunk/lib/Support/CommandLine.cpp (original) +++ llvm/trunk/lib/Support/CommandLine.cpp Tue Nov 1 16:32:20 2011 @@ -1369,7 +1369,7 @@ #if (ENABLE_TIMESTAMPS == 1) << " Built " << __DATE__ << " (" << __TIME__ << ").\n" #endif - << " Host: " << sys::getHostTriple() << '\n' + << " Default target: " << sys::getDefaultTargetTriple() << '\n' << " Host CPU: " << CPU << '\n'; } void operator=(bool OptionWasSpecified) { Modified: llvm/trunk/lib/Support/TargetRegistry.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/TargetRegistry.cpp?rev=143502&r1=143501&r2=143502&view=diff ============================================================================== --- llvm/trunk/lib/Support/TargetRegistry.cpp (original) +++ llvm/trunk/lib/Support/TargetRegistry.cpp Tue Nov 1 16:32:20 2011 @@ -84,7 +84,7 @@ } const Target *TargetRegistry::getClosestTargetForJIT(std::string &Error) { - const Target *TheTarget = lookupTarget(sys::getHostTriple(), Error); + const Target *TheTarget = lookupTarget(sys::getDefaultTargetTriple(), Error); if (TheTarget && !TheTarget->hasJIT()) { Error = "No JIT compatible target available for this host"; Modified: llvm/trunk/lib/Support/Unix/Host.inc URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Host.inc?rev=143502&r1=143501&r2=143502&view=diff ============================================================================== --- llvm/trunk/lib/Support/Unix/Host.inc (original) +++ llvm/trunk/lib/Support/Unix/Host.inc Tue Nov 1 16:32:20 2011 @@ -35,11 +35,11 @@ return info.release; } -std::string sys::getHostTriple() { - StringRef HostTripleString(LLVM_DEFAULT_TARGET_TRIPLE); - std::pair ArchSplit = HostTripleString.split('-'); +std::string sys::getDefaultTargetTriple() { + StringRef TargetTripleString(LLVM_DEFAULT_TARGET_TRIPLE); + std::pair ArchSplit = TargetTripleString.split('-'); - // Normalize the arch, since the host triple may not actually match the host. + // Normalize the arch, since the target triple may not actually match the target. std::string Arch = ArchSplit.first; std::string Triple(Arch); @@ -52,7 +52,7 @@ Triple[1] = '3'; // On darwin, we want to update the version to match that of the - // host. + // target. std::string::size_type DarwinDashIdx = Triple.find("-darwin"); if (DarwinDashIdx != std::string::npos) { Triple.resize(DarwinDashIdx + strlen("-darwin")); Modified: llvm/trunk/lib/Support/Windows/Host.inc URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Host.inc?rev=143502&r1=143501&r2=143502&view=diff ============================================================================== --- llvm/trunk/lib/Support/Windows/Host.inc (original) +++ llvm/trunk/lib/Support/Windows/Host.inc Tue Nov 1 16:32:20 2011 @@ -17,6 +17,6 @@ using namespace llvm; -std::string sys::getHostTriple() { +std::string sys::getDefaultTargetTriple() { return LLVM_DEFAULT_TARGET_TRIPLE; } Modified: llvm/trunk/lib/Target/CBackend/CBackend.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CBackend/CBackend.cpp?rev=143502&r1=143501&r2=143502&view=diff ============================================================================== --- llvm/trunk/lib/Target/CBackend/CBackend.cpp (original) +++ llvm/trunk/lib/Target/CBackend/CBackend.cpp Tue Nov 1 16:32:20 2011 @@ -1660,7 +1660,7 @@ #if 0 std::string Triple = TheModule->getTargetTriple(); if (Triple.empty()) - Triple = llvm::sys::getHostTriple(); + Triple = llvm::sys::getDefaultTargetTriple(); std::string E; if (const Target *Match = TargetRegistry::lookupTarget(Triple, E)) @@ -3167,7 +3167,7 @@ const MCAsmInfo *TargetAsm; std::string Triple = TheModule->getTargetTriple(); if (Triple.empty()) - Triple = llvm::sys::getHostTriple(); + Triple = llvm::sys::getDefaultTargetTriple(); std::string E; if (const Target *Match = TargetRegistry::lookupTarget(Triple, E)) Modified: llvm/trunk/tools/bugpoint/BugDriver.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/BugDriver.cpp?rev=143502&r1=143501&r2=143502&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/BugDriver.cpp (original) +++ llvm/trunk/tools/bugpoint/BugDriver.cpp Tue Nov 1 16:32:20 2011 @@ -96,7 +96,7 @@ Triple TheTriple(Result->getTargetTriple()); if (TheTriple.getTriple().empty()) - TheTriple.setTriple(sys::getHostTriple()); + TheTriple.setTriple(sys::getDefaultTargetTriple()); TargetTriple.setTriple(TheTriple.getTriple()); } Modified: llvm/trunk/tools/llc/llc.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llc/llc.cpp?rev=143502&r1=143501&r2=143502&view=diff ============================================================================== --- llvm/trunk/tools/llc/llc.cpp (original) +++ llvm/trunk/tools/llc/llc.cpp Tue Nov 1 16:32:20 2011 @@ -261,7 +261,7 @@ Triple TheTriple(mod.getTargetTriple()); if (TheTriple.getTriple().empty()) - TheTriple.setTriple(sys::getHostTriple()); + TheTriple.setTriple(sys::getDefaultTargetTriple()); // Allocate target machine. First, check whether the user has explicitly // specified an architecture to compile for. If so we have to look it up by Modified: llvm/trunk/tools/llvm-mc/llvm-mc.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/llvm-mc.cpp?rev=143502&r1=143501&r2=143502&view=diff ============================================================================== --- llvm/trunk/tools/llvm-mc/llvm-mc.cpp (original) +++ llvm/trunk/tools/llvm-mc/llvm-mc.cpp Tue Nov 1 16:32:20 2011 @@ -175,7 +175,7 @@ static const Target *GetTarget(const char *ProgName) { // Figure out the target triple. if (TripleName.empty()) - TripleName = sys::getHostTriple(); + TripleName = sys::getDefaultTargetTriple(); Triple TheTriple(Triple::normalize(TripleName)); const Target *TheTarget = 0; Modified: llvm/trunk/tools/lto/LTOCodeGenerator.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/LTOCodeGenerator.cpp?rev=143502&r1=143501&r2=143502&view=diff ============================================================================== --- llvm/trunk/tools/lto/LTOCodeGenerator.cpp (original) +++ llvm/trunk/tools/lto/LTOCodeGenerator.cpp Tue Nov 1 16:32:20 2011 @@ -243,7 +243,7 @@ if ( _target == NULL ) { std::string Triple = _linker.getModule()->getTargetTriple(); if (Triple.empty()) - Triple = sys::getHostTriple(); + Triple = sys::getDefaultTargetTriple(); // create target machine from info for merged modules const Target *march = TargetRegistry::lookupTarget(Triple, errMsg); Modified: llvm/trunk/tools/lto/LTOModule.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/LTOModule.cpp?rev=143502&r1=143501&r2=143502&view=diff ============================================================================== --- llvm/trunk/tools/lto/LTOModule.cpp (original) +++ llvm/trunk/tools/lto/LTOModule.cpp Tue Nov 1 16:32:20 2011 @@ -151,7 +151,7 @@ std::string Triple = m->getTargetTriple(); if (Triple.empty()) - Triple = sys::getHostTriple(); + Triple = sys::getDefaultTargetTriple(); // find machine architecture for this module const Target *march = TargetRegistry::lookupTarget(Triple, errMsg); From echristo at apple.com Tue Nov 1 16:47:36 2011 From: echristo at apple.com (Eric Christopher) Date: Tue, 01 Nov 2011 14:47:36 -0700 Subject: [llvm-commits] patch: partial DSE In-Reply-To: <94CCF474-AEAB-42EE-8667-47D93735B2F0@apple.com> References: <94CCF474-AEAB-42EE-8667-47D93735B2F0@apple.com> Message-ID: On Oct 31, 2011, at 5:38 PM, Peter Cooper wrote: > Hi > > Please review this patch to allow DSE to trim stores as opposed to deleting them. > > The logic here is that if the end of the earlier store is dead because of a later store then the length of the earlier store will be trimmed in size to avoid writing dead memory. The only time i won't do this is if the original store was likely to use vector writes which if shortened would end up as multiple scalar writes and so is less efficient. > Not a huge fan of this style: + (OR = isOverwrite(Loc, DepLoc, *AA, + DepWriteOffset, + InstWriteOffset)) != OverwriteUnknown && in large conditionals. Things that return booleans, or set something for a block, e.g.: if (ConstantInt *CI = dyn_cast(Inst)) { } > Any help removing the magic vector size (16) constant would be good too :) Something like this maybe? bool isLegalVector = false; if (VectorType *VecTy = dyn_cast(Store->getType()) { EVT VT = TLI.getValueType(VecTy); isLegalVector = TLI.isTypeLegal(VT); } does require target info though and I'm not sure how kosher that is in AA. -eric From hfinkel at anl.gov Tue Nov 1 16:58:59 2011 From: hfinkel at anl.gov (Hal Finkel) Date: Tue, 01 Nov 2011 16:58:59 -0500 Subject: [llvm-commits] [PATCH] BasicBlock Autovectorization Pass In-Reply-To: <4EB0462C.5010209@grosser.es> References: <1319909412.23036.851.camel@sapling> <1319914924.23036.852.camel@sapling> <1319919418.23036.881.camel@sapling> <1319928991.23036.957.camel@sapling> <1320108633.23036.1266.camel@sapling> <1320172356.23036.1298.camel@sapling> <4EB0462C.5010209@grosser.es> Message-ID: <1320184739.23036.1334.camel@sapling> On Tue, 2011-11-01 at 19:19 +0000, Tobias Grosser wrote: > On 11/01/2011 06:32 PM, Hal Finkel wrote: > > Any objections to me committing this? [And some relevant docs changes] I > > think that it is ready at this point. > > First of all. I think it is great to see work starting on an > autovectorizer for LLVM. Unfortunately I did not have time to test your > vectorizer pass intensively, but here my first comments: > > 1. This patch breaks the --enable-shared/BUILD_SHARED_LIBS build. The > following patch fixes this for cmake: > 0001-Add-vectorizer-to-libraries-used-by-Transforms-IPO.patch > Thanks! > Can you check the autoconf build with --enable-shared? I will check. > > 2. Did you run this pass on the llvm test-suite? Does your vectorizer > introduce any correctness regressions? What are the top 10 compile > time increases/decreases. How about run time? > I'll try to get this setup and post the results. > 3. I did not really test this intensively, but I had the feeling the > compile time increase for large basic blocks is quite a lot. > I still need to extract a test case. Any comments on the complexity > of your vectorizer? This may very will be true. As is, I would not recommend activating this pass by default (at -O3) because it is fairly slow and the resulting performance increase, while significant in many cases, is not large enough to, IMHO, justify the extra base compile-time increase. Ideally, this kind of vectorization should be the "vectorizer of last resort" -- the pass that tries really hard to squeeze the last little bit of vectorization possible out of the code. At the moment, it is all that we have, but I hope that will change. I've not yet done any real profiling, so I'll hold off on commenting about future performance improvements. Base complexity is a bit difficult, there are certainly a few stages, including that initial one, that are O(n^2), where n is the number of instructions in the block. The "connection-finding" stage should also be O(n^2) in practice, but is really iterating over instruction-user pairs and so could be worse in pathological cases. Note, however, that in the latter stages, that n^2 is not the number of instructions in the block, but rather the number of (unordered) candidate instruction pairs (which is going to be must less than the n^2 from just the number of instructions in the block). It should be possible to generate a compile-time scaling plot by taking a loop and compiling it with partial unrolling, looking at how the compile time changes with the unrolling limit; I'll try and so that. I'm writing a paper on the vectorizer, so within a few weeks there will be a very good description (complete with diagrams) :) > > I plan to look into your vectorizer during the next couple of > days/weeks, but will most probably not have the time to do this tonight. > Sorry. :-( Not a problem; it seems that I have some homework to do first ;) Thanks, Hal > > Cheers > Tobi -- Hal Finkel Postdoctoral Appointee Leadership Computing Facility Argonne National Laboratory From eli.friedman at gmail.com Tue Nov 1 17:12:19 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Tue, 1 Nov 2011 15:12:19 -0700 Subject: [llvm-commits] patch: partial DSE In-Reply-To: References: <94CCF474-AEAB-42EE-8667-47D93735B2F0@apple.com> Message-ID: On Tue, Nov 1, 2011 at 2:47 PM, Eric Christopher wrote: > > On Oct 31, 2011, at 5:38 PM, Peter Cooper wrote: > >> Hi >> >> Please review this patch to allow DSE to trim stores as opposed to deleting them. >> >> The logic here is that if the end of the earlier store is dead because of a later store then the length of the earlier store will be trimmed in size to avoid writing dead memory. ?The only time i won't do this is if the original store was likely to use vector writes which if shortened would end up as multiple scalar writes and so is less efficient. >> > > Not a huge fan of this style: > > + ? ? ? ? ?(OR = isOverwrite(Loc, DepLoc, *AA, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ?DepWriteOffset, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ?InstWriteOffset)) != OverwriteUnknown && > > in large conditionals. Things that return booleans, or set something for a block, e.g.: > > if (ConstantInt *CI = dyn_cast(Inst)) { > } > >> Any help removing the magic vector size (16) constant would be good too :) > > Something like this maybe? > > bool isLegalVector = false; > if (VectorType *VecTy = dyn_cast(Store->getType()) { > ?EVT VT = TLI.getValueType(VecTy); > ?isLegalVector = TLI.isTypeLegal(VT); > } > > does require target info though and I'm not sure how kosher that is in AA. There aren't actually any vector types involved here; the issue is that, for example, a 32 byte memset is cheaper than a 31-byte memset under the default settings on x86-64. I'm not sure what the right approach is here. -Eli From gohman at apple.com Tue Nov 1 17:12:46 2011 From: gohman at apple.com (Dan Gohman) Date: Tue, 01 Nov 2011 15:12:46 -0700 Subject: [llvm-commits] patch: partial DSE In-Reply-To: <94CCF474-AEAB-42EE-8667-47D93735B2F0@apple.com> References: <94CCF474-AEAB-42EE-8667-47D93735B2F0@apple.com> Message-ID: <51EE1C4A-7054-41DA-BB07-B792C5CAEFA4@apple.com> On Oct 31, 2011, at 5:38 PM, Peter Cooper wrote: > Hi > > Please review this patch to allow DSE to trim stores as opposed to deleting them. Looks ok to me. Be careful with the word "partial" here, because that word has a specific meaning in the context of DSE. One misc comment; please put this enum in an anonymous namespace, to avoid namespace polution: > +enum OverwriteResult > +{ > + OverwriteComplete, > + OverwriteEnd, > + OverwriteUnknown > +}; Dan From echristo at apple.com Tue Nov 1 17:15:17 2011 From: echristo at apple.com (Eric Christopher) Date: Tue, 01 Nov 2011 15:15:17 -0700 Subject: [llvm-commits] patch: partial DSE In-Reply-To: References: <94CCF474-AEAB-42EE-8667-47D93735B2F0@apple.com> Message-ID: >> > > There aren't actually any vector types involved here; the issue is > that, for example, a 32 byte memset is cheaper than a 31-byte memset > under the default settings on x86-64. I'm not sure what the right > approach is here. Good point, I'd taken the 16 as a 16-byte vector issue and not the sizes. This is probably related to the patches that Lang did recently trying to figure out what the best number of "loads" is for a memset/memcpy as well. Maybe a TLI.shouldCallMemcpy(Ty) type of call? Not sure. -eric From peter_cooper at apple.com Tue Nov 1 17:17:04 2011 From: peter_cooper at apple.com (Peter Cooper) Date: Tue, 01 Nov 2011 15:17:04 -0700 Subject: [llvm-commits] patch: partial DSE In-Reply-To: References: <94CCF474-AEAB-42EE-8667-47D93735B2F0@apple.com> Message-ID: <4EB2F57D-3354-45ED-A6AA-9DE602266BB9@apple.com> Yeah, i had been considering calling Lang's function to get the list of instructions the memset would decompose into then use that to work out whether trimming the size of some of them would be ok, but thats done in the backend so it would be very nasty to call it from DSE. On Nov 1, 2011, at 3:15 PM, Eric Christopher wrote: >>> >> >> There aren't actually any vector types involved here; the issue is >> that, for example, a 32 byte memset is cheaper than a 31-byte memset >> under the default settings on x86-64. I'm not sure what the right >> approach is here. > > Good point, I'd taken the 16 as a 16-byte vector issue and not the sizes. > This is probably related to the patches that Lang did recently trying to figure > out what the best number of "loads" is for a memset/memcpy as well. > > Maybe a TLI.shouldCallMemcpy(Ty) type of call? > > Not sure. > > -eric From greened at obbligato.org Tue Nov 1 17:17:11 2011 From: greened at obbligato.org (David A. Greene) Date: Tue, 01 Nov 2011 17:17:11 -0500 Subject: [llvm-commits] [llvm] r141977 - /llvm/trunk/utils/llvmbuild In-Reply-To: (Daniel Dunbar's message of "Tue, 1 Nov 2011 14:22:16 -0700") References: <20111014191237.51440312800A@llvm.org> Message-ID: Daniel Dunbar writes: > This script appears to be pretty specific to your workflow. While it > looks cool, I'm not really sure it belongs where it is. I don't think it's specific to any particular workflow. Of course I use it because I developed it but I think it will be useful to anyone. > I also want to take the llvm-build name, and I don't want people to be > confused by two similarly but completely unrelated things. I don't mind if you rename things. > Do you really feel like this script is something that belongs in the > tree? Does anyone else use it? I don't know if anyone else uses it, but others could benefit from it. The main reason I put it there was to create a standard way to build the entire LLVM ecosystem (llvm, clang, dragonegg and dragonegg-enabled gcc) in several different flavors (debug, release, etc.). This is primarily for verifying the build and regression tests before checking something in. I don't think there's any other tool in the repository that does this. I find it very convenient to have a one-stop shop to verify everything. So it's really more than "llvmbuild." It's more like "build and test llvm lots of ways before committing changes." Unfortunately, I'm not clever enough to come up with a simple name that conveys that. :) > Are you ok moving it aside and to a name that is more specific to what > it does, instead of a the very generic llvmbuild name? Yeah, I have no problem with that. I would like to keep it in the repository for the reasons stated above. Thanks for asking. -Dave From echristo at apple.com Tue Nov 1 17:17:39 2011 From: echristo at apple.com (Eric Christopher) Date: Tue, 01 Nov 2011 15:17:39 -0700 Subject: [llvm-commits] patch: partial DSE In-Reply-To: <4EB2F57D-3354-45ED-A6AA-9DE602266BB9@apple.com> References: <94CCF474-AEAB-42EE-8667-47D93735B2F0@apple.com> <4EB2F57D-3354-45ED-A6AA-9DE602266BB9@apple.com> Message-ID: On Nov 1, 2011, at 3:17 PM, Peter Cooper wrote: > Yeah, i had been considering calling Lang's function to get the list of instructions the memset would decompose into then use that to work out whether trimming the size of some of them would be ok, but thats done in the backend so it would be very nasty to call it from DSE. Agreed. I don't have any better ideas :) -eric From resistor at mac.com Tue Nov 1 17:18:13 2011 From: resistor at mac.com (Owen Anderson) Date: Tue, 01 Nov 2011 22:18:13 -0000 Subject: [llvm-commits] [llvm] r143507 - in /llvm/trunk: lib/Target/ARM/Disassembler/ARMDisassembler.cpp test/MC/Disassembler/ARM/neon.txt Message-ID: <20111101221813.EE8032A6C12C@llvm.org> Author: resistor Date: Tue Nov 1 17:18:13 2011 New Revision: 143507 URL: http://llvm.org/viewvc/llvm-project?rev=143507&view=rev Log: Fix disassembly of some VST1 instructions. Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp llvm/trunk/test/MC/Disassembler/ARM/neon.txt Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp?rev=143507&r1=143506&r2=143507&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp (original) +++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp Tue Nov 1 17:18:13 2011 @@ -2240,13 +2240,27 @@ return MCDisassembler::Fail; // AddrMode6 Offset (register) - if (Rm == 0xD) - Inst.addOperand(MCOperand::CreateReg(0)); - else if (Rm != 0xF) { - if (!Check(S, DecodeGPRRegisterClass(Inst, Rm, Address, Decoder))) - return MCDisassembler::Fail; + switch (Inst.getOpcode()) { + default: + if (Rm == 0xD) + Inst.addOperand(MCOperand::CreateReg(0)); + else if (Rm != 0xF) { + if (!Check(S, DecodeGPRRegisterClass(Inst, Rm, Address, Decoder))) + return MCDisassembler::Fail; + } + break; + case ARM::VST1d8wb_fixed: + case ARM::VST1d16wb_fixed: + case ARM::VST1d32wb_fixed: + case ARM::VST1d64wb_fixed: + case ARM::VST1q8wb_fixed: + case ARM::VST1q16wb_fixed: + case ARM::VST1q32wb_fixed: + case ARM::VST1q64wb_fixed: + break; } + // First input register if (!Check(S, DecodeDPRRegisterClass(Inst, Rd, Address, Decoder))) return MCDisassembler::Fail; Modified: llvm/trunk/test/MC/Disassembler/ARM/neon.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/neon.txt?rev=143507&r1=143506&r2=143507&view=diff ============================================================================== --- llvm/trunk/test/MC/Disassembler/ARM/neon.txt (original) +++ llvm/trunk/test/MC/Disassembler/ARM/neon.txt Tue Nov 1 17:18:13 2011 @@ -1861,4 +1861,5 @@ # CHECK: vld1.8 {d23, d24, d25}, [r6, :64]! 0x9d 0x62 0x6f 0xf4 # CHECK: vld1.32 {d22, d23, d24, d25}, [pc, :64]! - +0x9d 0xaa 0x41 0xf4 +# CHECK: vst1.32 {d26, d27}, [r1, :64]! From enderby at apple.com Tue Nov 1 17:27:23 2011 From: enderby at apple.com (Kevin Enderby) Date: Tue, 01 Nov 2011 22:27:23 -0000 Subject: [llvm-commits] [llvm] r143509 - in /llvm/trunk: include/llvm/MC/MCContext.h lib/MC/MCContext.cpp lib/MC/MCParser/AsmParser.cpp tools/llvm-mc/llvm-mc.cpp Message-ID: <20111101222723.423232A6C12C@llvm.org> Author: enderby Date: Tue Nov 1 17:27:22 2011 New Revision: 143509 URL: http://llvm.org/viewvc/llvm-project?rev=143509&view=rev Log: First part of support for generating dwarf for assembly source files with the -g flag. In this part we generate the .file for the source being assembled and the .loc's for the assembled instructions. The next part will be to generate the dwarf Compile Unit DIE and a dwarf subprogram DIE for each non-temporary label. Once the next part is done test cases will be added. rdar://9275556 Modified: llvm/trunk/include/llvm/MC/MCContext.h llvm/trunk/lib/MC/MCContext.cpp llvm/trunk/lib/MC/MCParser/AsmParser.cpp llvm/trunk/tools/llvm-mc/llvm-mc.cpp Modified: llvm/trunk/include/llvm/MC/MCContext.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCContext.h?rev=143509&r1=143508&r2=143509&view=diff ============================================================================== --- llvm/trunk/include/llvm/MC/MCContext.h (original) +++ llvm/trunk/include/llvm/MC/MCContext.h Tue Nov 1 17:27:22 2011 @@ -98,6 +98,17 @@ MCDwarfLoc CurrentDwarfLoc; bool DwarfLocSeen; + /// Generate dwarf debugging info for assembly source files. + bool GenDwarfForAssembly; + + /// The current dwarf file number when generate dwarf debugging info for + /// assembly source files. + unsigned GenDwarfFileNumber; + + /// The default initial text section that we generate dwarf debugging line + /// info for when generating dwarf assembly source files. + const MCSection *GenDwarfSection; + /// Honor temporary labels, this is useful for debugging semantic /// differences between temporary and non-temporary labels (primarily on /// Darwin). @@ -252,6 +263,13 @@ bool getDwarfLocSeen() { return DwarfLocSeen; } const MCDwarfLoc &getCurrentDwarfLoc() { return CurrentDwarfLoc; } + bool getGenDwarfForAssembly() { return GenDwarfForAssembly; } + void setGenDwarfForAssembly(bool Value) { GenDwarfForAssembly = Value; } + unsigned getGenDwarfFileNumber() { return GenDwarfFileNumber; } + unsigned nextGenDwarfFileNumber() { return ++GenDwarfFileNumber; } + const MCSection *getGenDwarfSection() { return GenDwarfSection; } + void setGenDwarfSection(const MCSection *Sec) { GenDwarfSection = Sec; } + /// @} char *getSecureLogFile() { return SecureLogFile; } Modified: llvm/trunk/lib/MC/MCContext.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCContext.cpp?rev=143509&r1=143508&r2=143509&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCContext.cpp (original) +++ llvm/trunk/lib/MC/MCContext.cpp Tue Nov 1 17:27:22 2011 @@ -43,6 +43,8 @@ SecureLogUsed = false; DwarfLocSeen = false; + GenDwarfForAssembly = false; + GenDwarfFileNumber = 0; } MCContext::~MCContext() { Modified: llvm/trunk/lib/MC/MCParser/AsmParser.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/AsmParser.cpp?rev=143509&r1=143508&r2=143509&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCParser/AsmParser.cpp (original) +++ llvm/trunk/lib/MC/MCParser/AsmParser.cpp Tue Nov 1 17:27:22 2011 @@ -464,6 +464,14 @@ HadError = false; AsmCond StartingCondState = TheCondState; + // If we are generating dwarf for assembly source files save the initial text + // section and generate a .file directive. + if (getContext().getGenDwarfForAssembly()) { + getContext().setGenDwarfSection(getStreamer().getCurrentSection()); + getStreamer().EmitDwarfFileDirective(getContext().nextGenDwarfFileNumber(), + StringRef(), SrcMgr.getMemoryBuffer(CurBuffer)->getBufferIdentifier()); + } + // While we have input, parse each statement. while (Lexer.isNot(AsmToken::Eof)) { if (!ParseStatement()) continue; @@ -1211,6 +1219,18 @@ PrintMessage(IDLoc, SourceMgr::DK_Note, OS.str()); } + // If we are generating dwarf for assembly source files and the current + // section is the initial text section then generate a .loc directive for + // the instruction. + if (!HadError && getContext().getGenDwarfForAssembly() && + getContext().getGenDwarfSection() == getStreamer().getCurrentSection() ) { + getStreamer().EmitDwarfLocDirective(getContext().getGenDwarfFileNumber(), + SrcMgr.FindLineNumber(IDLoc, CurBuffer), + 0, DWARF2_LINE_DEFAULT_IS_STMT ? + DWARF2_FLAG_IS_STMT : 0, 0, 0, + StringRef()); + } + // If parsing succeeded, match the instruction. if (!HadError) HadError = getTargetParser().MatchAndEmitInstruction(IDLoc, ParsedOperands, @@ -2342,6 +2362,10 @@ if (getLexer().isNot(AsmToken::EndOfStatement)) return TokError("unexpected token in '.file' directive"); + if (getContext().getGenDwarfForAssembly() == true) + Error(DirectiveLoc, "input can't have .file dwarf directives when -g is " + "used to generate dwarf debug info for assembly code"); + if (FileNumber == -1) getStreamer().EmitFileDirective(Filename); else { Modified: llvm/trunk/tools/llvm-mc/llvm-mc.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/llvm-mc.cpp?rev=143509&r1=143508&r2=143509&view=diff ============================================================================== --- llvm/trunk/tools/llvm-mc/llvm-mc.cpp (original) +++ llvm/trunk/tools/llvm-mc/llvm-mc.cpp Tue Nov 1 17:27:22 2011 @@ -152,6 +152,10 @@ static cl::opt SaveTempLabels("L", cl::desc("Don't discard temporary labels")); +static cl::opt +GenDwarfForAssembly("g", cl::desc("Generate dwarf debugging info for assembly " + "source files")); + enum ActionType { AC_AsLex, AC_Assemble, @@ -377,6 +381,8 @@ if (SaveTempLabels) Ctx.setAllowTemporaryLabels(false); + Ctx.setGenDwarfForAssembly(GenDwarfForAssembly); + // Package up features to be passed to target/subtarget std::string FeaturesStr; if (MAttrs.size()) { From grosbach at apple.com Tue Nov 1 17:37:37 2011 From: grosbach at apple.com (Jim Grosbach) Date: Tue, 01 Nov 2011 22:37:37 -0000 Subject: [llvm-commits] [llvm] r143510 - /llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Message-ID: <20111101223737.F3C0D2A6C12C@llvm.org> Author: grosbach Date: Tue Nov 1 17:37:37 2011 New Revision: 143510 URL: http://llvm.org/viewvc/llvm-project?rev=143510&view=rev Log: ARM label operands can have an optional '#' before them. Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp?rev=143510&r1=143509&r2=143510&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original) +++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Tue Nov 1 17:37:37 2011 @@ -3835,13 +3835,11 @@ if (getParser().ParseExpression(ImmVal)) return true; const MCConstantExpr *CE = dyn_cast(ImmVal); - if (!CE) { - Error(S, "constant expression expected"); - return MatchOperand_ParseFail; - } - int32_t Val = CE->getValue(); - if (isNegative && Val == 0) - ImmVal = MCConstantExpr::Create(INT32_MIN, getContext()); + if (CE) { + int32_t Val = CE->getValue(); + if (isNegative && Val == 0) + ImmVal = MCConstantExpr::Create(INT32_MIN, getContext()); + } E = SMLoc::getFromPointer(Parser.getTok().getLoc().getPointer() - 1); Operands.push_back(ARMOperand::CreateImm(ImmVal, S, E)); return false; From grosbach at apple.com Tue Nov 1 17:38:31 2011 From: grosbach at apple.com (Jim Grosbach) Date: Tue, 01 Nov 2011 22:38:31 -0000 Subject: [llvm-commits] [llvm] r143511 - /llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Message-ID: <20111101223831.609062A6C12C@llvm.org> Author: grosbach Date: Tue Nov 1 17:38:31 2011 New Revision: 143511 URL: http://llvm.org/viewvc/llvm-project?rev=143511&view=rev Log: ARM label operands can be quoted. For example, labels from Objective-C sources. Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp?rev=143511&r1=143510&r2=143511&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original) +++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Tue Nov 1 17:38:31 2011 @@ -3810,6 +3810,7 @@ } case AsmToken::LParen: // parenthesized expressions like (_strcmp-4) case AsmToken::Integer: // things like 1f and 2b as a branch targets + case AsmToken::String: // quoted label names. case AsmToken::Dot: { // . as a branch target // This was not a register so parse other operands that start with an // identifier (like labels) as expressions and create them as immediates. From evan.cheng at apple.com Tue Nov 1 18:22:03 2011 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 01 Nov 2011 16:22:03 -0700 Subject: [llvm-commits] patch: partial DSE In-Reply-To: References: <94CCF474-AEAB-42EE-8667-47D93735B2F0@apple.com> Message-ID: This might be something we have to defer until we add "what's native types" to TargetData. I'm worried when / if this does something bad, the performance impact can be very significant. Evan On Nov 1, 2011, at 3:12 PM, Eli Friedman wrote: > On Tue, Nov 1, 2011 at 2:47 PM, Eric Christopher wrote: >> >> On Oct 31, 2011, at 5:38 PM, Peter Cooper wrote: >> >>> Hi >>> >>> Please review this patch to allow DSE to trim stores as opposed to deleting them. >>> >>> The logic here is that if the end of the earlier store is dead because of a later store then the length of the earlier store will be trimmed in size to avoid writing dead memory. The only time i won't do this is if the original store was likely to use vector writes which if shortened would end up as multiple scalar writes and so is less efficient. >>> >> >> Not a huge fan of this style: >> >> + (OR = isOverwrite(Loc, DepLoc, *AA, >> + DepWriteOffset, >> + InstWriteOffset)) != OverwriteUnknown && >> >> in large conditionals. Things that return booleans, or set something for a block, e.g.: >> >> if (ConstantInt *CI = dyn_cast(Inst)) { >> } >> >>> Any help removing the magic vector size (16) constant would be good too :) >> >> Something like this maybe? >> >> bool isLegalVector = false; >> if (VectorType *VecTy = dyn_cast(Store->getType()) { >> EVT VT = TLI.getValueType(VecTy); >> isLegalVector = TLI.isTypeLegal(VT); >> } >> >> does require target info though and I'm not sure how kosher that is in AA. > > There aren't actually any vector types involved here; the issue is > that, for example, a 32 byte memset is cheaper than a 31-byte memset > under the default settings on x86-64. I'm not sure what the right > approach is here. > > -Eli > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From peter_cooper at apple.com Tue Nov 1 18:39:55 2011 From: peter_cooper at apple.com (Peter Cooper) Date: Tue, 01 Nov 2011 16:39:55 -0700 Subject: [llvm-commits] patch: partial DSE In-Reply-To: References: <94CCF474-AEAB-42EE-8667-47D93735B2F0@apple.com> Message-ID: <307A3A95-AD5F-4726-9EF8-BEF0D1F95508@apple.com> I agree with you Evan if you consider the magic 16 constant which really does need TargetData, but i could remove that for now. The result would be the following 2 conditions allowing the optimization to take place: llvm::isPowerOf2_64(InstWriteOffset) which means that the earlier store is going to be trimmed to a power of 2 in which case any instructions over the power of 2 boundary were likely not vector instructions anyway, or if they were then we're replacing all those vector instructions with probably more vector instructions which is good, and ((DepWriteAlign != 0) && InstWriteOffset % DepWriteAlign == 0) which says that the later store is at an offset at the same alignment as the earlier store. If the alignment was < 16 in this case then we'd probably not generate vector instructions for the earlier stores anyway so trimming the earlier store should be ok. Pete On Nov 1, 2011, at 4:22 PM, Evan Cheng wrote: > This might be something we have to defer until we add "what's native types" to TargetData. I'm worried when / if this does something bad, the performance impact can be very significant. > > Evan > > On Nov 1, 2011, at 3:12 PM, Eli Friedman wrote: > >> On Tue, Nov 1, 2011 at 2:47 PM, Eric Christopher wrote: >>> >>> On Oct 31, 2011, at 5:38 PM, Peter Cooper wrote: >>> >>>> Hi >>>> >>>> Please review this patch to allow DSE to trim stores as opposed to deleting them. >>>> >>>> The logic here is that if the end of the earlier store is dead because of a later store then the length of the earlier store will be trimmed in size to avoid writing dead memory. The only time i won't do this is if the original store was likely to use vector writes which if shortened would end up as multiple scalar writes and so is less efficient. >>>> >>> >>> Not a huge fan of this style: >>> >>> + (OR = isOverwrite(Loc, DepLoc, *AA, >>> + DepWriteOffset, >>> + InstWriteOffset)) != OverwriteUnknown && >>> >>> in large conditionals. Things that return booleans, or set something for a block, e.g.: >>> >>> if (ConstantInt *CI = dyn_cast(Inst)) { >>> } >>> >>>> Any help removing the magic vector size (16) constant would be good too :) >>> >>> Something like this maybe? >>> >>> bool isLegalVector = false; >>> if (VectorType *VecTy = dyn_cast(Store->getType()) { >>> EVT VT = TLI.getValueType(VecTy); >>> isLegalVector = TLI.isTypeLegal(VT); >>> } >>> >>> does require target info though and I'm not sure how kosher that is in AA. >> >> There aren't actually any vector types involved here; the issue is >> that, for example, a 32 byte memset is cheaper than a 31-byte memset >> under the default settings on x86-64. I'm not sure what the right >> approach is here. >> >> -Eli >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111101/c0983861/attachment.html From enderby at apple.com Tue Nov 1 18:39:05 2011 From: enderby at apple.com (Kevin Enderby) Date: Tue, 01 Nov 2011 23:39:05 -0000 Subject: [llvm-commits] [llvm] r143521 - in /llvm/trunk: lib/MC/MCContext.cpp test/MC/MachO/file.s Message-ID: <20111101233905.7B4002A6C12C@llvm.org> Author: enderby Date: Tue Nov 1 18:39:05 2011 New Revision: 143521 URL: http://llvm.org/viewvc/llvm-project?rev=143521&view=rev Log: Fixed a bug in the code to create a dwarf file and directory table entires when it is separating the directory part from the basename of the FileName. Noticed that this: .file 1 "dir/foo" when assembled got the two parts switched. Using the Mac OS X dwarfdump tool it can be seen easily: % dwarfdump -a a.out include_directories[ 1] = 'foo' Dir Mod Time File Len File Name ---- ---------- ---------- --------------------------- file_names[ 1] 1 0x00000000 0x00000000 dir ... Which should be: ... include_directories[ 1] = 'dir' Dir Mod Time File Len File Name ---- ---------- ---------- --------------------------- file_names[ 1] 1 0x00000000 0x00000000 foo Added: llvm/trunk/test/MC/MachO/file.s Modified: llvm/trunk/lib/MC/MCContext.cpp Modified: llvm/trunk/lib/MC/MCContext.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCContext.cpp?rev=143521&r1=143520&r2=143521&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCContext.cpp (original) +++ llvm/trunk/lib/MC/MCContext.cpp Tue Nov 1 18:39:05 2011 @@ -273,8 +273,10 @@ // Separate the directory part from the basename of the FileName. std::pair Slash = FileName.rsplit('/'); Directory = Slash.second; - if (!Directory.empty()) - FileName = Slash.first; + if (!Directory.empty()) { + Directory = Slash.first; + FileName = Slash.second; + } } // Find or make a entry in the MCDwarfDirs vector for this Directory. Added: llvm/trunk/test/MC/MachO/file.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/file.s?rev=143521&view=auto ============================================================================== --- llvm/trunk/test/MC/MachO/file.s (added) +++ llvm/trunk/test/MC/MachO/file.s Tue Nov 1 18:39:05 2011 @@ -0,0 +1,22 @@ +// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s + + .file 1 "dir/foo" + nop + +// CHECK: ('_section_data', '90') +// CHECK-NEXT: # Section 1 +// CHECK-NEXT: (('section_name', '__debug_line\x00\x00\x00\x00') +// CHECK-NEXT: ('segment_name', '__DWARF\x00\x00\x00\x00\x00\x00\x00\x00\x00') +// CHECK-NEXT: ('address', 1) +// CHECK-NEXT: ('size', 45) +// CHECK-NEXT: ('offset', 221) +// CHECK-NEXT: ('alignment', 0) +// CHECK-NEXT: ('reloc_offset', 0) +// CHECK-NEXT: ('num_reloc', 0) +// CHECK-NEXT: ('flags', 0x2000000) +// CHECK-NEXT: ('reserved1', 0) +// CHECK-NEXT: ('reserved2', 0) +// CHECK-NEXT: ), +// CHECK-NEXT: ('_relocations', [ +// CHECK-NEXT: ]) +// CHECK-NEXT: ('_section_data', '29000000 02001e00 00000101 fb0e0d00 01010101 00000001 00000164 69720000 666f6f00 01000000 02000001 01') From hfinkel at anl.gov Tue Nov 1 18:54:54 2011 From: hfinkel at anl.gov (Hal Finkel) Date: Tue, 01 Nov 2011 18:54:54 -0500 Subject: [llvm-commits] [PATCH] BasicBlock Autovectorization Pass In-Reply-To: <1320184739.23036.1334.camel@sapling> References: <1319909412.23036.851.camel@sapling> <1319914924.23036.852.camel@sapling> <1319919418.23036.881.camel@sapling> <1319928991.23036.957.camel@sapling> <1320108633.23036.1266.camel@sapling> <1320172356.23036.1298.camel@sapling> <4EB0462C.5010209@grosser.es> <1320184739.23036.1334.camel@sapling> Message-ID: <1320191694.23036.1497.camel@sapling> On Tue, 2011-11-01 at 16:59 -0500, Hal Finkel wrote: > On Tue, 2011-11-01 at 19:19 +0000, Tobias Grosser wrote: > > On 11/01/2011 06:32 PM, Hal Finkel wrote: > > > Any objections to me committing this? [And some relevant docs changes] I > > > think that it is ready at this point. > > > > First of all. I think it is great to see work starting on an > > autovectorizer for LLVM. Unfortunately I did not have time to test your > > vectorizer pass intensively, but here my first comments: > > > > 1. This patch breaks the --enable-shared/BUILD_SHARED_LIBS build. The > > following patch fixes this for cmake: > > 0001-Add-vectorizer-to-libraries-used-by-Transforms-IPO.patch > > > > Thanks! > > > Can you check the autoconf build with --enable-shared? > > I will check. This appears to work as it should. > > > > > 2. Did you run this pass on the llvm test-suite? Does your vectorizer > > introduce any correctness regressions? What are the top 10 compile > > time increases/decreases. How about run time? > > > > I'll try to get this setup and post the results. > > > 3. I did not really test this intensively, but I had the feeling the > > compile time increase for large basic blocks is quite a lot. > > I still need to extract a test case. Any comments on the complexity > > of your vectorizer? > > This may very will be true. As is, I would not recommend activating this > pass by default (at -O3) because it is fairly slow and the resulting > performance increase, while significant in many cases, is not large > enough to, IMHO, justify the extra base compile-time increase. Ideally, > this kind of vectorization should be the "vectorizer of last resort" -- > the pass that tries really hard to squeeze the last little bit of > vectorization possible out of the code. At the moment, it is all that we > have, but I hope that will change. I've not yet done any real profiling, > so I'll hold off on commenting about future performance improvements. > > Base complexity is a bit difficult, there are certainly a few stages, > including that initial one, that are O(n^2), where n is the number of > instructions in the block. The "connection-finding" stage should also be > O(n^2) in practice, but is really iterating over instruction-user pairs > and so could be worse in pathological cases. Note, however, that in the > latter stages, that n^2 is not the number of instructions in the block, > but rather the number of (unordered) candidate instruction pairs (which > is going to be must less than the n^2 from just the number of > instructions in the block). It should be possible to generate a > compile-time scaling plot by taking a loop and compiling it with partial > unrolling, looking at how the compile time changes with the unrolling > limit; I'll try and so that. So for this test, I ran: time opt -S -O3 -unroll-allow-partial -vectorize -o /dev/null q.ll where q.ll contains the output from clang -O3 of the vbor function from the benchmarks I've been posting recently. The first column is the value of -unroll-threshold, the second column is the time with vectorization, and the third column is the time without vectorization (time in seconds for a release build). 100 0.030 0.000 200 0.130 0.030 300 0.770 0.030 400 1.240 0.040 500 1.280 0.050 600 9.450 0.060 700 29.300 0.060 I am not sure why the 400 and 500 times are so close. Obviously, it is not linear ;) I am not sure that enumerating the possible pairings can be done in a sub-quadratic way, but I will do some profiling and see if I can make things better. To be fair, this test creates a kind of a worse-case scenario: an increasingly large block of instructions, almost all of which are potentially fusable. It may also be possible to design additional heuristics to help the situation. For example, we might introduce a target chain length such that if the vectorizer finds a chain of a given length, it selects it, foregoing the remainder of the search for the selected starting instruction. This kind of thing will require further research and testing. -Hal > > I'm writing a paper on the vectorizer, so within a few weeks there will > be a very good description (complete with diagrams) :) > > > > > I plan to look into your vectorizer during the next couple of > > days/weeks, but will most probably not have the time to do this tonight. > > Sorry. :-( > > Not a problem; it seems that I have some homework to do first ;) > > Thanks, > Hal > > > > > Cheers > > Tobi > -- Hal Finkel Postdoctoral Appointee Leadership Computing Facility Argonne National Laboratory From atrick at apple.com Tue Nov 1 19:02:45 2011 From: atrick at apple.com (Andrew Trick) Date: Wed, 02 Nov 2011 00:02:45 -0000 Subject: [llvm-commits] [llvm] r143522 - in /llvm/trunk: lib/Transforms/Scalar/IndVarSimplify.cpp test/Transforms/IndVarSimplify/2011-11-01-lftrptr.ll Message-ID: <20111102000245.E85B62A6C12C@llvm.org> Author: atrick Date: Tue Nov 1 19:02:45 2011 New Revision: 143522 URL: http://llvm.org/viewvc/llvm-project?rev=143522&view=rev Log: Broaden an assert to handle enable-iv-rewrite=true following r143183. Narrowest possible fix for PR11279. Added: llvm/trunk/test/Transforms/IndVarSimplify/2011-11-01-lftrptr.ll Modified: llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp Modified: llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp?rev=143522&r1=143521&r2=143522&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp Tue Nov 1 19:02:45 2011 @@ -1588,7 +1588,7 @@ assert(SE->isLoopInvariant(IVLimit, L) && "Computed iteration count is not loop invariant!"); - assert( !IVLimit->getType()->isPointerTy() && + assert( EnableIVRewrite || !IVLimit->getType()->isPointerTy() && "Should not expand pointer types" ); Value *ExitCnt = Rewriter.expandCodeFor(IVLimit, CmpTy, BI); Added: llvm/trunk/test/Transforms/IndVarSimplify/2011-11-01-lftrptr.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/IndVarSimplify/2011-11-01-lftrptr.ll?rev=143522&view=auto ============================================================================== --- llvm/trunk/test/Transforms/IndVarSimplify/2011-11-01-lftrptr.ll (added) +++ llvm/trunk/test/Transforms/IndVarSimplify/2011-11-01-lftrptr.ll Tue Nov 1 19:02:45 2011 @@ -0,0 +1,38 @@ +; RUN: opt < %s -indvars -S -enable-iv-rewrite=true | FileCheck %s +; +; PR11279: Assertion !IVLimit->getType()->isPointerTy() +; +; Test a non-integer BECount. It doesn't make sense, but that's what +; falls out of SCEV. Since it's an i8*, we never adjust in a way that +; would convert it to an integer type. +; +; enable-iv-rewrite=false does not currently perform LFTR when the the +; taken count is a pointer expression, but that will change son. + +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-darwin" + +; CHECK: @test8 +; CHECK: loop: +; CHECK: icmp ne +define i8 @test8(i8* %buf, i8* %end) nounwind { + br label %loopguard + +loopguard: + %guard = icmp ult i8* %buf, %end + br i1 %guard, label %preheader, label %exit + +preheader: + br label %loop + +loop: + %p.01.us.us = phi i8* [ %buf, %preheader ], [ %gep, %loop ] + %s = phi i8 [0, %preheader], [%snext, %loop] + %gep = getelementptr inbounds i8* %p.01.us.us, i64 1 + %snext = load i8* %gep + %cmp = icmp ult i8* %gep, %end + br i1 %cmp, label %loop, label %exit + +exit: + ret i8 %snext +} From peter_cooper at apple.com Tue Nov 1 19:14:04 2011 From: peter_cooper at apple.com (Peter Cooper) Date: Tue, 01 Nov 2011 17:14:04 -0700 Subject: [llvm-commits] patch: partial DSE In-Reply-To: <307A3A95-AD5F-4726-9EF8-BEF0D1F95508@apple.com> References: <94CCF474-AEAB-42EE-8667-47D93735B2F0@apple.com> <307A3A95-AD5F-4726-9EF8-BEF0D1F95508@apple.com> Message-ID: <96FCCA6E-E359-4CA9-B655-5B5854852D2D@apple.com> Please take a look at the following patch. I've left in the magic 16 for now, but i'd like to make sure the rest is ok. Thanks, Pete On Nov 1, 2011, at 4:39 PM, Peter Cooper wrote: > I agree with you Evan if you consider the magic 16 constant which really does need TargetData, but i could remove that for now. The result would be the following 2 conditions allowing the optimization to take place: > > llvm::isPowerOf2_64(InstWriteOffset) > > which means that the earlier store is going to be trimmed to a power of 2 in which case any instructions over the power of 2 boundary were likely not vector instructions anyway, or if they were then we're replacing all those vector instructions with probably more vector instructions which is good, and > > ((DepWriteAlign != 0) && InstWriteOffset % DepWriteAlign == 0) > > which says that the later store is at an offset at the same alignment as the earlier store. If the alignment was < 16 in this case then we'd probably not generate vector instructions for the earlier stores anyway so trimming the earlier store should be ok. > > Pete > > > On Nov 1, 2011, at 4:22 PM, Evan Cheng wrote: > >> This might be something we have to defer until we add "what's native types" to TargetData. I'm worried when / if this does something bad, the performance impact can be very significant. >> >> Evan >> >> On Nov 1, 2011, at 3:12 PM, Eli Friedman wrote: >> >>> On Tue, Nov 1, 2011 at 2:47 PM, Eric Christopher wrote: >>>> >>>> On Oct 31, 2011, at 5:38 PM, Peter Cooper wrote: >>>> >>>>> Hi >>>>> >>>>> Please review this patch to allow DSE to trim stores as opposed to deleting them. >>>>> >>>>> The logic here is that if the end of the earlier store is dead because of a later store then the length of the earlier store will be trimmed in size to avoid writing dead memory. The only time i won't do this is if the original store was likely to use vector writes which if shortened would end up as multiple scalar writes and so is less efficient. >>>>> >>>> >>>> Not a huge fan of this style: >>>> >>>> + (OR = isOverwrite(Loc, DepLoc, *AA, >>>> + DepWriteOffset, >>>> + InstWriteOffset)) != OverwriteUnknown && >>>> >>>> in large conditionals. Things that return booleans, or set something for a block, e.g.: >>>> >>>> if (ConstantInt *CI = dyn_cast(Inst)) { >>>> } >>>> >>>>> Any help removing the magic vector size (16) constant would be good too :) >>>> >>>> Something like this maybe? >>>> >>>> bool isLegalVector = false; >>>> if (VectorType *VecTy = dyn_cast(Store->getType()) { >>>> EVT VT = TLI.getValueType(VecTy); >>>> isLegalVector = TLI.isTypeLegal(VT); >>>> } >>>> >>>> does require target info though and I'm not sure how kosher that is in AA. >>> >>> There aren't actually any vector types involved here; the issue is >>> that, for example, a 32 byte memset is cheaper than a 31-byte memset >>> under the default settings on x86-64. I'm not sure what the right >>> approach is here. >>> >>> -Eli >>> >>> _______________________________________________ >>> llvm-commits mailing list >>> llvm-commits at cs.uiuc.edu >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111101/bbb5957c/attachment-0002.html -------------- next part -------------- A non-text attachment was scrubbed... Name: dse.patch Type: application/octet-stream Size: 12440 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111101/bbb5957c/attachment-0001.obj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111101/bbb5957c/attachment-0003.html From mcrosier at apple.com Tue Nov 1 19:18:48 2011 From: mcrosier at apple.com (Chad Rosier) Date: Wed, 02 Nov 2011 00:18:48 -0000 Subject: [llvm-commits] [llvm] r143523 - /llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Message-ID: <20111102001848.7E86C2A6C12C@llvm.org> Author: mcrosier Date: Tue Nov 1 19:18:48 2011 New Revision: 143523 URL: http://llvm.org/viewvc/llvm-project?rev=143523&view=rev Log: Factor out a SelectTrunc function. No functionality change intended. Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMFastISel.cpp?rev=143523&r1=143522&r2=143523&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMFastISel.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Tue Nov 1 19:18:48 2011 @@ -167,7 +167,8 @@ bool SelectCall(const Instruction *I); bool SelectSelect(const Instruction *I); bool SelectRet(const Instruction *I); - bool SelectIntCast(const Instruction *I); + bool SelectTrunc(const Instruction *I); + bool SelectIntExt(const Instruction *I); // Utility routines. private: @@ -1963,7 +1964,30 @@ } -bool ARMFastISel::SelectIntCast(const Instruction *I) { +bool ARMFastISel::SelectTrunc(const Instruction *I) { + // The high bits for a type smaller than the register size are assumed to be + // undefined. + Value *Op = I->getOperand(0); + + EVT SrcVT, DestVT; + SrcVT = TLI.getValueType(Op->getType(), true); + DestVT = TLI.getValueType(I->getType(), true); + + if (SrcVT != MVT::i32 && SrcVT != MVT::i16 && SrcVT != MVT::i8) + return false; + if (DestVT != MVT::i16 && DestVT != MVT::i8 && DestVT != MVT::i1) + return false; + + unsigned SrcReg = getRegForValue(Op); + if (!SrcReg) return false; + + // Because the high bits are undefined, a truncate doesn't generate + // any code. + UpdateValueMap(I, SrcReg); + return true; +} + +bool ARMFastISel::SelectIntExt(const Instruction *I) { // On ARM, in general, integer casts don't involve legal types; this code // handles promotable integers. The high bits for a type smaller than // the register size are assumed to be undefined. @@ -1975,20 +1999,6 @@ SrcVT = TLI.getValueType(SrcTy, true); DestVT = TLI.getValueType(DestTy, true); - if (isa(I)) { - if (SrcVT != MVT::i32 && SrcVT != MVT::i16 && SrcVT != MVT::i8) - return false; - if (DestVT != MVT::i16 && DestVT != MVT::i8 && DestVT != MVT::i1) - return false; - - unsigned SrcReg = getRegForValue(Op); - if (!SrcReg) return false; - - // Because the high bits are undefined, a truncate doesn't generate - // any code. - UpdateValueMap(I, SrcReg); - return true; - } if (DestVT != MVT::i32 && DestVT != MVT::i16 && DestVT != MVT::i8) return false; @@ -2078,9 +2088,10 @@ case Instruction::Ret: return SelectRet(I); case Instruction::Trunc: + return SelectTrunc(I); case Instruction::ZExt: case Instruction::SExt: - return SelectIntCast(I); + return SelectIntExt(I); default: break; } return false; From tonic at nondot.org Tue Nov 1 19:24:57 2011 From: tonic at nondot.org (Tanya Lattner) Date: Wed, 02 Nov 2011 00:24:57 -0000 Subject: [llvm-commits] [llvm] r143524 - /llvm/trunk/lib/Linker/LinkModules.cpp Message-ID: <20111102002457.0E32F2A6C12C@llvm.org> Author: tbrethou Date: Tue Nov 1 19:24:56 2011 New Revision: 143524 URL: http://llvm.org/viewvc/llvm-project?rev=143524&view=rev Log: Add support to the linker to lazily link in functions. This change only links functions marked with specific linkage (internal, private, linker_private, linker_private_weak, linker_private_weak_def_auto, linkonce, linkonce_odr, and available_externally) if they have uses in the destination module. Instead of automatically linking, these functions are placed onto a worklist to be processed in the final stage of linking. We iterate over the list and if any functions on the list have uses in the destination module, we link them in and repeat the process until no changes in the state (uses) has changed. This means that any functions in the LazilyLink worklist that have a use in the destination module will be linked in and none that don't. Modified: llvm/trunk/lib/Linker/LinkModules.cpp Modified: llvm/trunk/lib/Linker/LinkModules.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LinkModules.cpp?rev=143524&r1=143523&r2=143524&view=diff ============================================================================== --- llvm/trunk/lib/Linker/LinkModules.cpp (original) +++ llvm/trunk/lib/Linker/LinkModules.cpp Tue Nov 1 19:24:56 2011 @@ -341,6 +341,9 @@ // Set of items not to link in from source. SmallPtrSet DoNotLinkFromSource; + // Vector of functions to lazily link in. + std::vector LazilyLinkFunctions; + public: std::string ErrorMsg; @@ -708,6 +711,13 @@ // Any uses of DF need to change to NewDF, with cast. DGV->replaceAllUsesWith(ConstantExpr::getBitCast(NewDF, DGV->getType())); DGV->eraseFromParent(); + } else { + // Internal, LO_ODR, or LO linkage - stick in set to ignore and lazily link. + if (SF->hasLocalLinkage() || SF->hasLinkOnceLinkage() || + SF->hasAvailableExternallyLinkage()) { + DoNotLinkFromSource.insert(SF); + LazilyLinkFunctions.push_back(SF); + } } ValueMap[SF] = NewDF; @@ -974,6 +984,54 @@ // are properly remapped. linkNamedMDNodes(); + // Process vector of lazily linked in functions. + bool LinkedInAnyFunctions; + do { + LinkedInAnyFunctions = false; + + for(std::vector::iterator I = LazilyLinkFunctions.begin(), + E = LazilyLinkFunctions.end(); I != E; ++I) { + if (!*I) + continue; + + Function *SF = *I; + Function *DF = cast(ValueMap[SF]); + + if (!DF->use_empty()) { + + // Materialize if necessary. + if (SF->isDeclaration()) { + if (!SF->isMaterializable()) + continue; + if (SF->Materialize(&ErrorMsg)) + return true; + } + + // Link in function body. + linkFunctionBody(DF, SF); + + // "Remove" from vector by setting the element to 0. + *I = 0; + + // Set flag to indicate we may have more functions to lazily link in + // since we linked in a function. + LinkedInAnyFunctions = true; + } + } + } while (LinkedInAnyFunctions); + + // Remove any prototypes of functions that were not actually linked in. + for(std::vector::iterator I = LazilyLinkFunctions.begin(), + E = LazilyLinkFunctions.end(); I != E; ++I) { + if (!*I) + continue; + + Function *SF = *I; + Function *DF = cast(ValueMap[SF]); + if (DF->use_empty()) + DF->eraseFromParent(); + } + // Now that all of the types from the source are used, resolve any structs // copied over to the dest that didn't exist there. TypeMap.linkDefinedTypeBodies(); From peter_cooper at apple.com Tue Nov 1 19:40:01 2011 From: peter_cooper at apple.com (Peter Cooper) Date: Tue, 01 Nov 2011 17:40:01 -0700 Subject: [llvm-commits] patch: x86 vector udiv Message-ID: Hi Please review this patch for pr8429 to turn vector udiv into vector shrl instructions when dividing by powers of 2. This was already done on scalars but not on vectors. I also found that vector shifts were always scalarised on x86 even with SSE on so i turned these into the equivalent intrinsics. Thanks, Pete -------------- next part -------------- A non-text attachment was scrubbed... Name: 8429.patch Type: application/octet-stream Size: 3112 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111101/b52c1482/attachment.obj From nlewycky at google.com Tue Nov 1 19:59:55 2011 From: nlewycky at google.com (Nick Lewycky) Date: Tue, 1 Nov 2011 17:59:55 -0700 Subject: [llvm-commits] patch: don't emit a directory entry for DW_at_comp_dir In-Reply-To: References: Message-ID: On 21 October 2011 14:11, Nick Lewycky wrote: > On 18 October 2011 15:53, Nick Lewycky wrote: > >> In DWARF, the file table contains indices back into the directory table. >> As an optimization, directory entry zero is assumed to refer to the value >> in DW_at_comp_dir. Don't emit two copies of that string! >> >> Please review! >> > > Ping! > http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20111017/130273.html > > I know Eric started looking at this and was hoping it's be possible to do > in a different, cleaner way. I'd be happy to change how it works if anyone > has a proposal. As it stands right now, we assume that a blank directory > entry means "use directory entry zero" which is what GNU as and llvm-mc > have always done. This patch causes us to emit ".file index filename" with > no directory part when the directory is equal to the comp_dir. > Updated patch. Renamed "DirIndexZero" to "CompilationDir" and added another test. Please review! Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111101/280ad477/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: dwarf-dir-table.patch Type: text/x-patch Size: 3550 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111101/280ad477/attachment.bin From eli.friedman at gmail.com Tue Nov 1 20:04:40 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Tue, 1 Nov 2011 18:04:40 -0700 Subject: [llvm-commits] patch: x86 vector udiv In-Reply-To: References: Message-ID: On Tue, Nov 1, 2011 at 5:40 PM, Peter Cooper wrote: > Hi > > Please review this patch for pr8429 to turn vector udiv into vector shrl instructions when dividing by powers of 2. ?This was already done on scalars but not on vectors. > > I also found that vector shifts were always scalarised on x86 even with SSE on so i turned these into the equivalent intrinsics. The change to X86ISelLowering.cpp is wrong; the psrld instruction is not equivalent to ISD::SRL in the general case. For the rest of the changes, it would be better to handle this transformation in instcombine. -Eli From peter_cooper at apple.com Tue Nov 1 20:53:57 2011 From: peter_cooper at apple.com (Peter Cooper) Date: Tue, 01 Nov 2011 18:53:57 -0700 Subject: [llvm-commits] patch: x86 vector udiv In-Reply-To: References: Message-ID: <231A30C4-BB7B-4CBE-9AAF-B34DFF405728@apple.com> Ah yes thanks, i see where in InstCombine i should have put the udiv->shl change. For the vector shift case. I'm not sure why a vector shift is different in behavior to multiple scalar shifts. The only thing I can see in the ISA is that scalar shifts set the CF flag but otherwise i think they are equivalent. Can you please give more explanation on this? Pete On Nov 1, 2011, at 6:04 PM, Eli Friedman wrote: > On Tue, Nov 1, 2011 at 5:40 PM, Peter Cooper wrote: >> Hi >> >> Please review this patch for pr8429 to turn vector udiv into vector shrl instructions when dividing by powers of 2. This was already done on scalars but not on vectors. >> >> I also found that vector shifts were always scalarised on x86 even with SSE on so i turned these into the equivalent intrinsics. > > The change to X86ISelLowering.cpp is wrong; the psrld instruction is > not equivalent to ISD::SRL in the general case. > > For the rest of the changes, it would be better to handle this > transformation in instcombine. > > -Eli From eli.friedman at gmail.com Tue Nov 1 21:24:53 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Tue, 1 Nov 2011 19:24:53 -0700 Subject: [llvm-commits] patch: x86 vector udiv In-Reply-To: <231A30C4-BB7B-4CBE-9AAF-B34DFF405728@apple.com> References: <231A30C4-BB7B-4CBE-9AAF-B34DFF405728@apple.com> Message-ID: On Tue, Nov 1, 2011 at 6:53 PM, Peter Cooper wrote: > Ah yes thanks, i see where in InstCombine i should have put the udiv->shl change. > > For the vector shift case. ?I'm not sure why a vector shift is different in behavior to multiple scalar shifts. ?The only thing I can see in the ISA is that scalar shifts set the CF flag but otherwise i think they are equivalent. ?Can you please give more explanation on this? In the reg-reg form of psrld, the shift amount is a single 64-bit integer which is used to shift every element. ISD::SHL shifts each element independently. -Eli From nicholas at mxc.ca Tue Nov 1 22:56:05 2011 From: nicholas at mxc.ca (Nick Lewycky) Date: Tue, 01 Nov 2011 20:56:05 -0700 Subject: [llvm-commits] [llvm] r143509 - in /llvm/trunk: include/llvm/MC/MCContext.h lib/MC/MCContext.cpp lib/MC/MCParser/AsmParser.cpp tools/llvm-mc/llvm-mc.cpp In-Reply-To: <20111101222723.423232A6C12C@llvm.org> References: <20111101222723.423232A6C12C@llvm.org> Message-ID: <4EB0BF55.4060404@mxc.ca> Kevin Enderby wrote: > Author: enderby > Date: Tue Nov 1 17:27:22 2011 > New Revision: 143509 > > URL: http://llvm.org/viewvc/llvm-project?rev=143509&view=rev > Log: > First part of support for generating dwarf for assembly source files with the > -g flag. In this part we generate the .file for the source being assembled and > the .loc's for the assembled instructions. > > The next part will be to generate the dwarf Compile Unit DIE and a dwarf > subprogram DIE for each non-temporary label. Cool! > Modified: llvm/trunk/lib/MC/MCParser/AsmParser.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/AsmParser.cpp?rev=143509&r1=143508&r2=143509&view=diff > ============================================================================== > --- llvm/trunk/lib/MC/MCParser/AsmParser.cpp (original) > +++ llvm/trunk/lib/MC/MCParser/AsmParser.cpp Tue Nov 1 17:27:22 2011 > @@ -464,6 +464,14 @@ > HadError = false; > AsmCond StartingCondState = TheCondState; > > + // If we are generating dwarf for assembly source files save the initial text > + // section and generate a .file directive. > + if (getContext().getGenDwarfForAssembly()) { > + getContext().setGenDwarfSection(getStreamer().getCurrentSection()); > + getStreamer().EmitDwarfFileDirective(getContext().nextGenDwarfFileNumber(), > + StringRef(), SrcMgr.getMemoryBuffer(CurBuffer)->getBufferIdentifier()); > + } > + > // While we have input, parse each statement. > while (Lexer.isNot(AsmToken::Eof)) { > if (!ParseStatement()) continue; > @@ -1211,6 +1219,18 @@ > PrintMessage(IDLoc, SourceMgr::DK_Note, OS.str()); > } > > + // If we are generating dwarf for assembly source files and the current > + // section is the initial text section then generate a .loc directive for > + // the instruction. > + if (!HadError&& getContext().getGenDwarfForAssembly()&& > + getContext().getGenDwarfSection() == getStreamer().getCurrentSection() ) { > + getStreamer().EmitDwarfLocDirective(getContext().getGenDwarfFileNumber(), > + SrcMgr.FindLineNumber(IDLoc, CurBuffer), > + 0, DWARF2_LINE_DEFAULT_IS_STMT ? > + DWARF2_FLAG_IS_STMT : 0, 0, 0, Tabs. Nick From echristo at apple.com Tue Nov 1 23:23:27 2011 From: echristo at apple.com (Eric Christopher) Date: Tue, 01 Nov 2011 21:23:27 -0700 Subject: [llvm-commits] patch: don't emit a directory entry for DW_at_comp_dir In-Reply-To: References: Message-ID: On Nov 1, 2011, at 5:59 PM, Nick Lewycky wrote: > On 21 October 2011 14:11, Nick Lewycky wrote: > On 18 October 2011 15:53, Nick Lewycky wrote: > In DWARF, the file table contains indices back into the directory table. As an optimization, directory entry zero is assumed to refer to the value in DW_at_comp_dir. Don't emit two copies of that string! > > Please review! > > Ping! http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20111017/130273.html > > I know Eric started looking at this and was hoping it's be possible to do in a different, cleaner way. I'd be happy to change how it works if anyone has a proposal. As it stands right now, we assume that a blank directory entry means "use directory entry zero" which is what GNU as and llvm-mc have always done. This patch causes us to emit ".file index filename" with no directory part when the directory is equal to the comp_dir. > > Updated patch. Renamed "DirIndexZero" to "CompilationDir" and added another test. Please review! I'm still not wild about the cleaner way, but I don't have a proposal either. Can you put a comment that we should probably find a different way to do this? Thanks! -eric -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111101/27e0729f/attachment.html From craig.topper at gmail.com Tue Nov 1 23:42:13 2011 From: craig.topper at gmail.com (Craig Topper) Date: Wed, 02 Nov 2011 04:42:13 -0000 Subject: [llvm-commits] [llvm] r143529 - in /llvm/trunk: include/llvm/IntrinsicsX86.td lib/Target/X86/X86InstrFragmentsSIMD.td lib/Target/X86/X86InstrSSE.td test/CodeGen/X86/avx2-intrinsics-x86.ll Message-ID: <20111102044213.600D52A6C12C@llvm.org> Author: ctopper Date: Tue Nov 1 23:42:13 2011 New Revision: 143529 URL: http://llvm.org/viewvc/llvm-project?rev=143529&view=rev Log: Add a bunch more X86 AVX2 instructions and their corresponding intrinsics. Modified: llvm/trunk/include/llvm/IntrinsicsX86.td llvm/trunk/lib/Target/X86/X86InstrFragmentsSIMD.td llvm/trunk/lib/Target/X86/X86InstrSSE.td llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll Modified: llvm/trunk/include/llvm/IntrinsicsX86.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IntrinsicsX86.td?rev=143529&r1=143528&r2=143529&view=diff ============================================================================== --- llvm/trunk/include/llvm/IntrinsicsX86.td (original) +++ llvm/trunk/include/llvm/IntrinsicsX86.td Tue Nov 1 23:42:13 2011 @@ -1525,6 +1525,110 @@ llvm_v16i16_ty], [IntrNoMem]>; } +// Absolute value ops +let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". + def int_x86_avx2_pabs_b : GCCBuiltin<"__builtin_ia32_pabsb256">, + Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty], [IntrNoMem]>; + def int_x86_avx2_pabs_w : GCCBuiltin<"__builtin_ia32_pabsw256">, + Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty], [IntrNoMem]>; + def int_x86_avx2_pabs_d : GCCBuiltin<"__builtin_ia32_pabsd256">, + Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty], [IntrNoMem]>; +} + +// Horizontal arithmetic ops +let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". + def int_x86_avx2_phadd_w : GCCBuiltin<"__builtin_ia32_phaddw256">, + Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, + llvm_v16i16_ty], [IntrNoMem]>; + def int_x86_avx2_phadd_d : GCCBuiltin<"__builtin_ia32_phaddd256">, + Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, + llvm_v8i32_ty], [IntrNoMem]>; + def int_x86_avx2_phadd_sw : GCCBuiltin<"__builtin_ia32_phaddsw256">, + Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, + llvm_v16i16_ty], [IntrNoMem]>; + def int_x86_avx2_phsub_w : GCCBuiltin<"__builtin_ia32_phsubw256">, + Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, + llvm_v16i16_ty], [IntrNoMem]>; + def int_x86_avx2_phsub_d : GCCBuiltin<"__builtin_ia32_phsubd256">, + Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, + llvm_v8i32_ty], [IntrNoMem]>; + def int_x86_avx2_phsub_sw : GCCBuiltin<"__builtin_ia32_phsubsw256">, + Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, + llvm_v16i16_ty], [IntrNoMem]>; + def int_x86_avx2_pmadd_ub_sw : GCCBuiltin<"__builtin_ia32_pmaddubsw256">, + Intrinsic<[llvm_v16i16_ty], [llvm_v32i8_ty, + llvm_v32i8_ty], [IntrNoMem]>; +} + +// Sign ops +let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". + def int_x86_avx2_psign_b : GCCBuiltin<"__builtin_ia32_psignb256">, + Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, + llvm_v32i8_ty], [IntrNoMem]>; + def int_x86_avx2_psign_w : GCCBuiltin<"__builtin_ia32_psignw256">, + Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, + llvm_v16i16_ty], [IntrNoMem]>; + def int_x86_avx2_psign_d : GCCBuiltin<"__builtin_ia32_psignd256">, + Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, + llvm_v8i32_ty], [IntrNoMem]>; +} + +// Packed multiply high with round and scale +let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". + def int_x86_avx2_pmul_hr_sw : GCCBuiltin<"__builtin_ia32_pmulhrsw256">, + Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, + llvm_v16i16_ty], [IntrNoMem, Commutative]>; +} + +// Vector sign and zero extend +let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". + def int_x86_avx2_pmovsxbd : GCCBuiltin<"__builtin_ia32_pmovsxbd256">, + Intrinsic<[llvm_v8i32_ty], [llvm_v16i8_ty], + [IntrNoMem]>; + def int_x86_avx2_pmovsxbq : GCCBuiltin<"__builtin_ia32_pmovsxbq256">, + Intrinsic<[llvm_v4i64_ty], [llvm_v16i8_ty], + [IntrNoMem]>; + def int_x86_avx2_pmovsxbw : GCCBuiltin<"__builtin_ia32_pmovsxbw256">, + Intrinsic<[llvm_v16i16_ty], [llvm_v16i8_ty], + [IntrNoMem]>; + def int_x86_avx2_pmovsxdq : GCCBuiltin<"__builtin_ia32_pmovsxdq256">, + Intrinsic<[llvm_v4i64_ty], [llvm_v4i32_ty], + [IntrNoMem]>; + def int_x86_avx2_pmovsxwd : GCCBuiltin<"__builtin_ia32_pmovsxwd256">, + Intrinsic<[llvm_v8i32_ty], [llvm_v8i16_ty], + [IntrNoMem]>; + def int_x86_avx2_pmovsxwq : GCCBuiltin<"__builtin_ia32_pmovsxwq256">, + Intrinsic<[llvm_v4i64_ty], [llvm_v8i16_ty], + [IntrNoMem]>; + def int_x86_avx2_pmovzxbd : GCCBuiltin<"__builtin_ia32_pmovzxbd256">, + Intrinsic<[llvm_v8i32_ty], [llvm_v16i8_ty], + [IntrNoMem]>; + def int_x86_avx2_pmovzxbq : GCCBuiltin<"__builtin_ia32_pmovzxbq256">, + Intrinsic<[llvm_v4i64_ty], [llvm_v16i8_ty], + [IntrNoMem]>; + def int_x86_avx2_pmovzxbw : GCCBuiltin<"__builtin_ia32_pmovzxbw256">, + Intrinsic<[llvm_v16i16_ty], [llvm_v16i8_ty], + [IntrNoMem]>; + def int_x86_avx2_pmovzxdq : GCCBuiltin<"__builtin_ia32_pmovzxdq256">, + Intrinsic<[llvm_v4i64_ty], [llvm_v4i32_ty], + [IntrNoMem]>; + def int_x86_avx2_pmovzxwd : GCCBuiltin<"__builtin_ia32_pmovzxwd256">, + Intrinsic<[llvm_v8i32_ty], [llvm_v8i16_ty], + [IntrNoMem]>; + def int_x86_avx2_pmovzxwq : GCCBuiltin<"__builtin_ia32_pmovzxwq256">, + Intrinsic<[llvm_v4i64_ty], [llvm_v8i16_ty], + [IntrNoMem]>; +} + +// Misc. +let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". + def int_x86_avx2_pmovmskb : GCCBuiltin<"__builtin_ia32_pmovmskb256">, + Intrinsic<[llvm_i32_ty], [llvm_v32i8_ty], [IntrNoMem]>; + def int_x86_avx2_pshuf_b : GCCBuiltin<"__builtin_ia32_pshufb256">, + Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, + llvm_v32i8_ty], [IntrNoMem]>; +} + //===----------------------------------------------------------------------===// // MMX Modified: llvm/trunk/lib/Target/X86/X86InstrFragmentsSIMD.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrFragmentsSIMD.td?rev=143529&r1=143528&r2=143529&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrFragmentsSIMD.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrFragmentsSIMD.td Tue Nov 1 23:42:13 2011 @@ -276,11 +276,12 @@ def memopv16i8 : PatFrag<(ops node:$ptr), (v16i8 (memop node:$ptr))>; // 256-bit memop pattern fragments -def memopv32i8 : PatFrag<(ops node:$ptr), (v32i8 (memop node:$ptr))>; def memopv8f32 : PatFrag<(ops node:$ptr), (v8f32 (memop node:$ptr))>; def memopv4f64 : PatFrag<(ops node:$ptr), (v4f64 (memop node:$ptr))>; def memopv4i64 : PatFrag<(ops node:$ptr), (v4i64 (memop node:$ptr))>; def memopv8i32 : PatFrag<(ops node:$ptr), (v8i32 (memop node:$ptr))>; +def memopv16i16 : PatFrag<(ops node:$ptr), (v16i16 (memop node:$ptr))>; +def memopv32i8 : PatFrag<(ops node:$ptr), (v32i8 (memop node:$ptr))>; // SSSE3 uses MMX registers for some instructions. They aren't aligned on a // 16-byte boundary. @@ -326,6 +327,8 @@ def bc_v2i64 : PatFrag<(ops node:$in), (v2i64 (bitconvert node:$in))>; // 256-bit bitconvert pattern fragments +def bc_v32i8 : PatFrag<(ops node:$in), (v32i8 (bitconvert node:$in))>; +def bc_v16i16 : PatFrag<(ops node:$in), (v16i16 (bitconvert node:$in))>; def bc_v8i32 : PatFrag<(ops node:$in), (v8i32 (bitconvert node:$in))>; def bc_v4i64 : PatFrag<(ops node:$in), (v4i64 (bitconvert node:$in))>; Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=143529&r1=143528&r2=143529&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Tue Nov 1 23:42:13 2011 @@ -4008,6 +4008,23 @@ (bc_frag (memopv2i64 addr:$src1)), (undef))))]>; } + +multiclass sse2_pshuffle_y { +def Yri : Ii8<0x70, MRMSrcReg, + (outs VR256:$dst), (ins VR256:$src1, i8imm:$src2), + !strconcat(OpcodeStr, + "\t{$src2, $src1, $dst|$dst, $src1, $src2}"), + [(set VR256:$dst, (vt (pshuf_frag:$src2 VR256:$src1, + (undef))))]>; +def Ymi : Ii8<0x70, MRMSrcMem, + (outs VR256:$dst), (ins i256mem:$src1, i8imm:$src2), + !strconcat(OpcodeStr, + "\t{$src2, $src1, $dst|$dst, $src1, $src2}"), + [(set VR256:$dst, (vt (pshuf_frag:$src2 + (bc_frag (memopv4i64 addr:$src1)), + (undef))))]>; +} } // ExeDomain = SSEPackedInt let Predicates = [HasAVX] in { @@ -4052,6 +4069,20 @@ (VPSHUFLWmi addr:$src, imm:$imm)>; } +let Predicates = [HasAVX2] in { + let AddedComplexity = 5 in + defm VPSHUFD : sse2_pshuffle_y<"vpshufd", v8i32, pshufd, bc_v8i32>, TB, + OpSize, VEX; + + // SSE2 with ImmT == Imm8 and XS prefix. + defm VPSHUFHW : sse2_pshuffle_y<"vpshufhw", v16i16, pshufhw, bc_v16i16>, XS, + VEX; + + // SSE2 with ImmT == Imm8 and XD prefix. + defm VPSHUFLW : sse2_pshuffle_y<"vpshuflw", v16i16, pshuflw, bc_v16i16>, XD, + VEX; +} + let Predicates = [HasSSE2] in { let AddedComplexity = 5 in defm PSHUFD : sse2_pshuffle<"pshufd", v4i32, pshufd, bc_v4i32>, TB, OpSize; @@ -4114,6 +4145,19 @@ addr:$src2))))]>; } +multiclass sse2_unpack_y opc, string OpcodeStr, ValueType vt, + SDNode OpNode, PatFrag bc_frag> { + def Yrr : PDI; + def Yrm : PDI; +} + let Predicates = [HasAVX] in { defm VPUNPCKLBW : sse2_unpack<0x60, "vpunpcklbw", v16i8, X86Punpcklbw, bc_v16i8, 0>, VEX_4V; @@ -4156,6 +4200,48 @@ (memopv2i64 addr:$src2))))]>, VEX_4V; } +let Predicates = [HasAVX2] in { + defm VPUNPCKLBW : sse2_unpack_y<0x60, "vpunpcklbw", v32i8, X86Punpcklbw, + bc_v32i8>, VEX_4V; + defm VPUNPCKLWD : sse2_unpack_y<0x61, "vpunpcklwd", v16i16, X86Punpcklwd, + bc_v16i16>, VEX_4V; + defm VPUNPCKLDQ : sse2_unpack_y<0x62, "vpunpckldq", v8i32, X86Punpckldq, + bc_v8i32>, VEX_4V; + + /// FIXME: we could eliminate this and use sse2_unpack_y instead if tblgen + /// knew to collapse (bitconvert VT to VT) into its operand. + def VPUNPCKLQDQYrr : PDI<0x6C, MRMSrcReg, + (outs VR256:$dst), (ins VR256:$src1, VR256:$src2), + "vpunpcklqdq\t{$src2, $src1, $dst|$dst, $src1, $src2}", + [(set VR256:$dst, (v4i64 (X86Punpcklqdq VR256:$src1, + VR256:$src2)))]>, VEX_4V; + def VPUNPCKLQDQYrm : PDI<0x6C, MRMSrcMem, + (outs VR256:$dst), (ins VR256:$src1, i256mem:$src2), + "vpunpcklqdq\t{$src2, $src1, $dst|$dst, $src1, $src2}", + [(set VR256:$dst, (v4i64 (X86Punpcklqdq VR256:$src1, + (memopv4i64 addr:$src2))))]>, VEX_4V; + + defm VPUNPCKHBW : sse2_unpack_y<0x68, "vpunpckhbw", v32i8, X86Punpckhbw, + bc_v32i8>, VEX_4V; + defm VPUNPCKHWD : sse2_unpack_y<0x69, "vpunpckhwd", v16i16, X86Punpckhwd, + bc_v16i16>, VEX_4V; + defm VPUNPCKHDQ : sse2_unpack_y<0x6A, "vpunpckhdq", v8i32, X86Punpckhdq, + bc_v8i32>, VEX_4V; + + /// FIXME: we could eliminate this and use sse2_unpack_y instead if tblgen + /// knew to collapse (bitconvert VT to VT) into its operand. + def VPUNPCKHQDQYrr : PDI<0x6D, MRMSrcReg, + (outs VR256:$dst), (ins VR256:$src1, VR256:$src2), + "vpunpckhqdq\t{$src2, $src1, $dst|$dst, $src1, $src2}", + [(set VR256:$dst, (v4i64 (X86Punpckhqdq VR256:$src1, + VR256:$src2)))]>, VEX_4V; + def VPUNPCKHQDQYrm : PDI<0x6D, MRMSrcMem, + (outs VR256:$dst), (ins VR256:$src1, i256mem:$src2), + "vpunpckhqdq\t{$src2, $src1, $dst|$dst, $src1, $src2}", + [(set VR256:$dst, (v4i64 (X86Punpckhqdq VR256:$src1, + (memopv4i64 addr:$src2))))]>, VEX_4V; +} + let Constraints = "$src1 = $dst" in { defm PUNPCKLBW : sse2_unpack<0x60, "punpcklbw", v16i8, X86Punpcklbw, bc_v16i8>; defm PUNPCKLWD : sse2_unpack<0x61, "punpcklwd", v8i16, X86Punpcklwd, bc_v8i16>; @@ -4266,6 +4352,15 @@ [(set GR32:$dst, (int_x86_sse2_pmovmskb_128 VR128:$src))]>, VEX; def VPMOVMSKBr64r : VPDI<0xD7, MRMSrcReg, (outs GR64:$dst), (ins VR128:$src), "pmovmskb\t{$src, $dst|$dst, $src}", []>, VEX; + +let Predicates = [HasAVX2] in { +def VPMOVMSKBYrr : VPDI<0xD7, MRMSrcReg, (outs GR32:$dst), (ins VR256:$src), + "pmovmskb\t{$src, $dst|$dst, $src}", + [(set GR32:$dst, (int_x86_avx2_pmovmskb VR256:$src))]>, VEX; +def VPMOVMSKBYr64r : VPDI<0xD7, MRMSrcReg, (outs GR64:$dst), (ins VR256:$src), + "pmovmskb\t{$src, $dst|$dst, $src}", []>, VEX; +} + def PMOVMSKBrr : PDI<0xD7, MRMSrcReg, (outs GR32:$dst), (ins VR128:$src), "pmovmskb\t{$src, $dst|$dst, $src}", [(set GR32:$dst, (int_x86_sse2_pmovmskb_128 VR128:$src))]>; @@ -5016,6 +5111,23 @@ (bitconvert (mem_frag128 addr:$src))))]>, OpSize; } +/// SS3I_unop_rm_int_y - Simple SSSE3 unary op whose type can be v*{i8,i16,i32}. +multiclass SS3I_unop_rm_int_y opc, string OpcodeStr, + PatFrag mem_frag256, Intrinsic IntId256> { + def rr256 : SS38I, + OpSize; + + def rm256 : SS38I, OpSize; +} + let Predicates = [HasAVX] in { defm VPABSB : SS3I_unop_rm_int<0x1C, "vpabsb", memopv16i8, int_x86_ssse3_pabs_b_128>, VEX; @@ -5025,6 +5137,15 @@ int_x86_ssse3_pabs_d_128>, VEX; } +let Predicates = [HasAVX2] in { + defm VPABSB : SS3I_unop_rm_int_y<0x1C, "vpabsb", memopv32i8, + int_x86_avx2_pabs_b>, VEX; + defm VPABSW : SS3I_unop_rm_int_y<0x1D, "vpabsw", memopv16i16, + int_x86_avx2_pabs_w>, VEX; + defm VPABSD : SS3I_unop_rm_int_y<0x1E, "vpabsd", memopv8i32, + int_x86_avx2_pabs_d>, VEX; +} + defm PABSB : SS3I_unop_rm_int<0x1C, "pabsb", memopv16i8, int_x86_ssse3_pabs_b_128>; defm PABSW : SS3I_unop_rm_int<0x1D, "pabsw", memopv8i16, @@ -5055,7 +5176,23 @@ !strconcat(OpcodeStr, "\t{$src2, $src1, $dst|$dst, $src1, $src2}")), [(set VR128:$dst, (IntId128 VR128:$src1, - (bitconvert (memopv16i8 addr:$src2))))]>, OpSize; + (bitconvert (mem_frag128 addr:$src2))))]>, OpSize; +} + +multiclass SS3I_binop_rm_int_y opc, string OpcodeStr, + PatFrag mem_frag256, Intrinsic IntId256> { + let isCommutable = 1 in + def rr256 : SS38I, + OpSize; + def rm256 : SS38I, OpSize; } let ImmT = NoImm, Predicates = [HasAVX] in { @@ -5087,6 +5224,35 @@ int_x86_ssse3_pmul_hr_sw_128, 0>, VEX_4V; } +let ImmT = NoImm, Predicates = [HasAVX2] in { +let isCommutable = 0 in { + defm VPHADDW : SS3I_binop_rm_int_y<0x01, "vphaddw", memopv16i16, + int_x86_avx2_phadd_w>, VEX_4V; + defm VPHADDD : SS3I_binop_rm_int_y<0x02, "vphaddd", memopv8i32, + int_x86_avx2_phadd_d>, VEX_4V; + defm VPHADDSW : SS3I_binop_rm_int_y<0x03, "vphaddsw", memopv16i16, + int_x86_avx2_phadd_sw>, VEX_4V; + defm VPHSUBW : SS3I_binop_rm_int_y<0x05, "vphsubw", memopv16i16, + int_x86_avx2_phsub_w>, VEX_4V; + defm VPHSUBD : SS3I_binop_rm_int_y<0x06, "vphsubd", memopv8i32, + int_x86_avx2_phsub_d>, VEX_4V; + defm VPHSUBSW : SS3I_binop_rm_int_y<0x07, "vphsubsw", memopv16i16, + int_x86_avx2_phsub_sw>, VEX_4V; + defm VPMADDUBSW : SS3I_binop_rm_int_y<0x04, "vpmaddubsw", memopv32i8, + int_x86_avx2_pmadd_ub_sw>, VEX_4V; + defm VPSHUFB : SS3I_binop_rm_int_y<0x00, "vpshufb", memopv32i8, + int_x86_avx2_pshuf_b>, VEX_4V; + defm VPSIGNB : SS3I_binop_rm_int_y<0x08, "vpsignb", memopv16i8, + int_x86_avx2_psign_b>, VEX_4V; + defm VPSIGNW : SS3I_binop_rm_int_y<0x09, "vpsignw", memopv8i16, + int_x86_avx2_psign_w>, VEX_4V; + defm VPSIGND : SS3I_binop_rm_int_y<0x0A, "vpsignd", memopv4i32, + int_x86_avx2_psign_d>, VEX_4V; +} +defm VPMULHRSW : SS3I_binop_rm_int_y<0x0B, "vpmulhrsw", memopv16i16, + int_x86_avx2_pmul_hr_sw>, VEX_4V; +} + // None of these have i8 immediate fields. let ImmT = NoImm, Constraints = "$src1 = $dst" in { let isCommutable = 0 in { @@ -5166,8 +5332,23 @@ []>, OpSize; } +multiclass ssse3_palign_y { + def R256rr : SS3AI<0x0F, MRMSrcReg, (outs VR256:$dst), + (ins VR256:$src1, VR256:$src2, i8imm:$src3), + !strconcat(asm, + "\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}"), + []>, OpSize; + def R256rm : SS3AI<0x0F, MRMSrcMem, (outs VR256:$dst), + (ins VR256:$src1, i256mem:$src2, i8imm:$src3), + !strconcat(asm, + "\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}"), + []>, OpSize; +} + let Predicates = [HasAVX] in defm VPALIGN : ssse3_palign<"vpalignr", 0>, VEX_4V; +let Predicates = [HasAVX2] in + defm VPALIGN : ssse3_palign_y<"vpalignr", 0>, VEX_4V; let Constraints = "$src1 = $dst", Predicates = [HasSSSE3] in defm PALIGN : ssse3_palign<"palignr">; @@ -5235,6 +5416,17 @@ OpSize; } +multiclass SS41I_binop_rm_int16_y opc, string OpcodeStr, + Intrinsic IntId> { + def Yrr : SS48I, OpSize; + + def Yrm : SS48I, OpSize; +} + let Predicates = [HasAVX] in { defm VPMOVSXBW : SS41I_binop_rm_int8<0x20, "vpmovsxbw", int_x86_sse41_pmovsxbw>, VEX; @@ -5250,6 +5442,21 @@ VEX; } +let Predicates = [HasAVX2] in { +defm VPMOVSXBW : SS41I_binop_rm_int16_y<0x20, "vpmovsxbw", + int_x86_avx2_pmovsxbw>, VEX; +defm VPMOVSXWD : SS41I_binop_rm_int16_y<0x23, "vpmovsxwd", + int_x86_avx2_pmovsxwd>, VEX; +defm VPMOVSXDQ : SS41I_binop_rm_int16_y<0x25, "vpmovsxdq", + int_x86_avx2_pmovsxdq>, VEX; +defm VPMOVZXBW : SS41I_binop_rm_int16_y<0x30, "vpmovzxbw", + int_x86_avx2_pmovzxbw>, VEX; +defm VPMOVZXWD : SS41I_binop_rm_int16_y<0x33, "vpmovzxwd", + int_x86_avx2_pmovzxwd>, VEX; +defm VPMOVZXDQ : SS41I_binop_rm_int16_y<0x35, "vpmovzxdq", + int_x86_avx2_pmovzxdq>, VEX; +} + defm PMOVSXBW : SS41I_binop_rm_int8<0x20, "pmovsxbw", int_x86_sse41_pmovsxbw>; defm PMOVSXWD : SS41I_binop_rm_int8<0x23, "pmovsxwd", int_x86_sse41_pmovsxwd>; defm PMOVSXDQ : SS41I_binop_rm_int8<0x25, "pmovsxdq", int_x86_sse41_pmovsxdq>; @@ -5336,6 +5543,19 @@ OpSize; } +multiclass SS41I_binop_rm_int8_y opc, string OpcodeStr, + Intrinsic IntId> { + def Yrr : SS48I, OpSize; + + def Yrm : SS48I, + OpSize; +} + let Predicates = [HasAVX] in { defm VPMOVSXBD : SS41I_binop_rm_int4<0x21, "vpmovsxbd", int_x86_sse41_pmovsxbd>, VEX; @@ -5347,6 +5567,17 @@ VEX; } +let Predicates = [HasAVX2] in { +defm VPMOVSXBD : SS41I_binop_rm_int8_y<0x21, "vpmovsxbd", + int_x86_avx2_pmovsxbd>, VEX; +defm VPMOVSXWQ : SS41I_binop_rm_int8_y<0x24, "vpmovsxwq", + int_x86_avx2_pmovsxwq>, VEX; +defm VPMOVZXBD : SS41I_binop_rm_int8_y<0x31, "vpmovzxbd", + int_x86_avx2_pmovzxbd>, VEX; +defm VPMOVZXWQ : SS41I_binop_rm_int8_y<0x34, "vpmovzxwq", + int_x86_avx2_pmovzxwq>, VEX; +} + defm PMOVSXBD : SS41I_binop_rm_int4<0x21, "pmovsxbd", int_x86_sse41_pmovsxbd>; defm PMOVSXWQ : SS41I_binop_rm_int4<0x24, "pmovsxwq", int_x86_sse41_pmovsxwq>; defm PMOVZXBD : SS41I_binop_rm_int4<0x31, "pmovzxbd", int_x86_sse41_pmovzxbd>; @@ -5391,12 +5622,32 @@ OpSize; } +multiclass SS41I_binop_rm_int4_y opc, string OpcodeStr, + Intrinsic IntId> { + def Yrr : SS48I, OpSize; + + // Expecting a i16 load any extended to i32 value. + def Yrm : SS48I, + OpSize; +} + let Predicates = [HasAVX] in { defm VPMOVSXBQ : SS41I_binop_rm_int2<0x22, "vpmovsxbq", int_x86_sse41_pmovsxbq>, VEX; defm VPMOVZXBQ : SS41I_binop_rm_int2<0x32, "vpmovzxbq", int_x86_sse41_pmovzxbq>, VEX; } +let Predicates = [HasAVX2] in { +defm VPMOVSXBQ : SS41I_binop_rm_int4_y<0x22, "vpmovsxbq", + int_x86_avx2_pmovsxbq>, VEX; +defm VPMOVZXBQ : SS41I_binop_rm_int4_y<0x32, "vpmovzxbq", + int_x86_avx2_pmovzxbq>, VEX; +} defm PMOVSXBQ : SS41I_binop_rm_int2<0x22, "pmovsxbq", int_x86_sse41_pmovsxbq>; defm PMOVZXBQ : SS41I_binop_rm_int2<0x32, "pmovzxbq", int_x86_sse41_pmovzxbq>; Modified: llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll?rev=143529&r1=143528&r2=143529&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll (original) +++ llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll Tue Nov 1 23:42:13 2011 @@ -160,6 +160,14 @@ declare <32 x i8> @llvm.x86.avx2.pminu.b(<32 x i8>, <32 x i8>) nounwind readnone +define i32 @test_x86_avx2_pmovmskb(<32 x i8> %a0) { + ; CHECK: vpmovmskb + %res = call i32 @llvm.x86.avx2.pmovmskb(<32 x i8> %a0) ; [#uses=1] + ret i32 %res +} +declare i32 @llvm.x86.avx2.pmovmskb(<32 x i8>) nounwind readnone + + define <16 x i16> @test_x86_avx2_pmulh_w(<16 x i16> %a0, <16 x i16> %a1) { ; CHECK: vpmulhw %res = call <16 x i16> @llvm.x86.avx2.pmulh.w(<16 x i16> %a0, <16 x i16> %a1) ; <<16 x i16>> [#uses=1] @@ -382,3 +390,219 @@ ret <16 x i16> %res } declare <16 x i16> @llvm.x86.avx2.psubus.w(<16 x i16>, <16 x i16>) nounwind readnone + + +define <32 x i8> @test_x86_avx2_pabs_b(<32 x i8> %a0) { + ; CHECK: vpabsb + %res = call <32 x i8> @llvm.x86.avx2.pabs.b(<32 x i8> %a0) ; <<32 x i8>> [#uses=1] + ret <32 x i8> %res +} +declare <32 x i8> @llvm.x86.avx2.pabs.b(<32 x i8>) nounwind readnone + + +define <8 x i32> @test_x86_avx2_pabs_d(<8 x i32> %a0) { + ; CHECK: vpabsd + %res = call <8 x i32> @llvm.x86.avx2.pabs.d(<8 x i32> %a0) ; <<8 x i32>> [#uses=1] + ret <8 x i32> %res +} +declare <8 x i32> @llvm.x86.avx2.pabs.d(<8 x i32>) nounwind readnone + + +define <16 x i16> @test_x86_avx2_pabs_w(<16 x i16> %a0) { + ; CHECK: vpabsw + %res = call <16 x i16> @llvm.x86.avx2.pabs.w(<16 x i16> %a0) ; <<16 x i16>> [#uses=1] + ret <16 x i16> %res +} +declare <16 x i16> @llvm.x86.avx2.pabs.w(<16 x i16>) nounwind readnone + + +define <8 x i32> @test_x86_avx2_phadd_d(<8 x i32> %a0, <8 x i32> %a1) { + ; CHECK: vphaddd + %res = call <8 x i32> @llvm.x86.avx2.phadd.d(<8 x i32> %a0, <8 x i32> %a1) ; <<8 x i32>> [#uses=1] + ret <8 x i32> %res +} +declare <8 x i32> @llvm.x86.avx2.phadd.d(<8 x i32>, <8 x i32>) nounwind readnone + + +define <16 x i16> @test_x86_avx2_phadd_sw(<16 x i16> %a0, <16 x i16> %a1) { + ; CHECK: vphaddsw + %res = call <16 x i16> @llvm.x86.avx2.phadd.sw(<16 x i16> %a0, <16 x i16> %a1) ; <<16 x i16>> [#uses=1] + ret <16 x i16> %res +} +declare <16 x i16> @llvm.x86.avx2.phadd.sw(<16 x i16>, <16 x i16>) nounwind readnone + + +define <16 x i16> @test_x86_avx2_phadd_w(<16 x i16> %a0, <16 x i16> %a1) { + ; CHECK: vphaddw + %res = call <16 x i16> @llvm.x86.avx2.phadd.w(<16 x i16> %a0, <16 x i16> %a1) ; <<16 x i16>> [#uses=1] + ret <16 x i16> %res +} +declare <16 x i16> @llvm.x86.avx2.phadd.w(<16 x i16>, <16 x i16>) nounwind readnone + + +define <8 x i32> @test_x86_avx2_phsub_d(<8 x i32> %a0, <8 x i32> %a1) { + ; CHECK: vphsubd + %res = call <8 x i32> @llvm.x86.avx2.phsub.d(<8 x i32> %a0, <8 x i32> %a1) ; <<8 x i32>> [#uses=1] + ret <8 x i32> %res +} +declare <8 x i32> @llvm.x86.avx2.phsub.d(<8 x i32>, <8 x i32>) nounwind readnone + + +define <16 x i16> @test_x86_avx2_phsub_sw(<16 x i16> %a0, <16 x i16> %a1) { + ; CHECK: vphsubsw + %res = call <16 x i16> @llvm.x86.avx2.phsub.sw(<16 x i16> %a0, <16 x i16> %a1) ; <<16 x i16>> [#uses=1] + ret <16 x i16> %res +} +declare <16 x i16> @llvm.x86.avx2.phsub.sw(<16 x i16>, <16 x i16>) nounwind readnone + + +define <16 x i16> @test_x86_avx2_phsub_w(<16 x i16> %a0, <16 x i16> %a1) { + ; CHECK: vphsubw + %res = call <16 x i16> @llvm.x86.avx2.phsub.w(<16 x i16> %a0, <16 x i16> %a1) ; <<16 x i16>> [#uses=1] + ret <16 x i16> %res +} +declare <16 x i16> @llvm.x86.avx2.phsub.w(<16 x i16>, <16 x i16>) nounwind readnone + + +define <16 x i16> @test_x86_avx2_pmadd_ub_sw(<32 x i8> %a0, <32 x i8> %a1) { + ; CHECK: vpmaddubsw + %res = call <16 x i16> @llvm.x86.avx2.pmadd.ub.sw(<32 x i8> %a0, <32 x i8> %a1) ; <<16 x i16>> [#uses=1] + ret <16 x i16> %res +} +declare <16 x i16> @llvm.x86.avx2.pmadd.ub.sw(<32 x i8>, <32 x i8>) nounwind readnone + + +define <16 x i16> @test_x86_avx2_pmul_hr_sw(<16 x i16> %a0, <16 x i16> %a1) { + ; CHECK: vpmulhrsw + %res = call <16 x i16> @llvm.x86.avx2.pmul.hr.sw(<16 x i16> %a0, <16 x i16> %a1) ; <<16 x i16>> [#uses=1] + ret <16 x i16> %res +} +declare <16 x i16> @llvm.x86.avx2.pmul.hr.sw(<16 x i16>, <16 x i16>) nounwind readnone + + +define <32 x i8> @test_x86_avx2_pshuf_b(<32 x i8> %a0, <32 x i8> %a1) { + ; CHECK: vpshufb + %res = call <32 x i8> @llvm.x86.avx2.pshuf.b(<32 x i8> %a0, <32 x i8> %a1) ; <<16 x i8>> [#uses=1] + ret <32 x i8> %res +} +declare <32 x i8> @llvm.x86.avx2.pshuf.b(<32 x i8>, <32 x i8>) nounwind readnone + + +define <32 x i8> @test_x86_avx2_psign_b(<32 x i8> %a0, <32 x i8> %a1) { + ; CHECK: vpsignb + %res = call <32 x i8> @llvm.x86.avx2.psign.b(<32 x i8> %a0, <32 x i8> %a1) ; <<32 x i8>> [#uses=1] + ret <32 x i8> %res +} +declare <32 x i8> @llvm.x86.avx2.psign.b(<32 x i8>, <32 x i8>) nounwind readnone + + +define <8 x i32> @test_x86_avx2_psign_d(<8 x i32> %a0, <8 x i32> %a1) { + ; CHECK: vpsignd + %res = call <8 x i32> @llvm.x86.avx2.psign.d(<8 x i32> %a0, <8 x i32> %a1) ; <<4 x i32>> [#uses=1] + ret <8 x i32> %res +} +declare <8 x i32> @llvm.x86.avx2.psign.d(<8 x i32>, <8 x i32>) nounwind readnone + + +define <16 x i16> @test_x86_avx2_psign_w(<16 x i16> %a0, <16 x i16> %a1) { + ; CHECK: vpsignw + %res = call <16 x i16> @llvm.x86.avx2.psign.w(<16 x i16> %a0, <16 x i16> %a1) ; <<16 x i16>> [#uses=1] + ret <16 x i16> %res +} +declare <16 x i16> @llvm.x86.avx2.psign.w(<16 x i16>, <16 x i16>) nounwind readnone + + +define <8 x i32> @test_x86_avx2_pmovsxbd(<16 x i8> %a0) { + ; CHECK: vpmovsxbd + %res = call <8 x i32> @llvm.x86.avx2.pmovsxbd(<16 x i8> %a0) ; <<8 x i32>> [#uses=1] + ret <8 x i32> %res +} +declare <8 x i32> @llvm.x86.avx2.pmovsxbd(<16 x i8>) nounwind readnone + + +define <4 x i64> @test_x86_avx2_pmovsxbq(<16 x i8> %a0) { + ; CHECK: vpmovsxbq + %res = call <4 x i64> @llvm.x86.avx2.pmovsxbq(<16 x i8> %a0) ; <<4 x i64>> [#uses=1] + ret <4 x i64> %res +} +declare <4 x i64> @llvm.x86.avx2.pmovsxbq(<16 x i8>) nounwind readnone + + +define <16 x i16> @test_x86_avx2_pmovsxbw(<16 x i8> %a0) { + ; CHECK: vpmovsxbw + %res = call <16 x i16> @llvm.x86.avx2.pmovsxbw(<16 x i8> %a0) ; <<8 x i16>> [#uses=1] + ret <16 x i16> %res +} +declare <16 x i16> @llvm.x86.avx2.pmovsxbw(<16 x i8>) nounwind readnone + + +define <4 x i64> @test_x86_avx2_pmovsxdq(<4 x i32> %a0) { + ; CHECK: vpmovsxdq + %res = call <4 x i64> @llvm.x86.avx2.pmovsxdq(<4 x i32> %a0) ; <<4 x i64>> [#uses=1] + ret <4 x i64> %res +} +declare <4 x i64> @llvm.x86.avx2.pmovsxdq(<4 x i32>) nounwind readnone + + +define <8 x i32> @test_x86_avx2_pmovsxwd(<8 x i16> %a0) { + ; CHECK: vpmovsxwd + %res = call <8 x i32> @llvm.x86.avx2.pmovsxwd(<8 x i16> %a0) ; <<8 x i32>> [#uses=1] + ret <8 x i32> %res +} +declare <8 x i32> @llvm.x86.avx2.pmovsxwd(<8 x i16>) nounwind readnone + + +define <4 x i64> @test_x86_avx2_pmovsxwq(<8 x i16> %a0) { + ; CHECK: vpmovsxwq + %res = call <4 x i64> @llvm.x86.avx2.pmovsxwq(<8 x i16> %a0) ; <<4 x i64>> [#uses=1] + ret <4 x i64> %res +} +declare <4 x i64> @llvm.x86.avx2.pmovsxwq(<8 x i16>) nounwind readnone + + +define <8 x i32> @test_x86_avx2_pmovzxbd(<16 x i8> %a0) { + ; CHECK: vpmovzxbd + %res = call <8 x i32> @llvm.x86.avx2.pmovzxbd(<16 x i8> %a0) ; <<8 x i32>> [#uses=1] + ret <8 x i32> %res +} +declare <8 x i32> @llvm.x86.avx2.pmovzxbd(<16 x i8>) nounwind readnone + + +define <4 x i64> @test_x86_avx2_pmovzxbq(<16 x i8> %a0) { + ; CHECK: vpmovzxbq + %res = call <4 x i64> @llvm.x86.avx2.pmovzxbq(<16 x i8> %a0) ; <<4 x i64>> [#uses=1] + ret <4 x i64> %res +} +declare <4 x i64> @llvm.x86.avx2.pmovzxbq(<16 x i8>) nounwind readnone + + +define <16 x i16> @test_x86_avx2_pmovzxbw(<16 x i8> %a0) { + ; CHECK: vpmovzxbw + %res = call <16 x i16> @llvm.x86.avx2.pmovzxbw(<16 x i8> %a0) ; <<16 x i16>> [#uses=1] + ret <16 x i16> %res +} +declare <16 x i16> @llvm.x86.avx2.pmovzxbw(<16 x i8>) nounwind readnone + + +define <4 x i64> @test_x86_avx2_pmovzxdq(<4 x i32> %a0) { + ; CHECK: vpmovzxdq + %res = call <4 x i64> @llvm.x86.avx2.pmovzxdq(<4 x i32> %a0) ; <<4 x i64>> [#uses=1] + ret <4 x i64> %res +} +declare <4 x i64> @llvm.x86.avx2.pmovzxdq(<4 x i32>) nounwind readnone + + +define <8 x i32> @test_x86_avx2_pmovzxwd(<8 x i16> %a0) { + ; CHECK: vpmovzxwd + %res = call <8 x i32> @llvm.x86.avx2.pmovzxwd(<8 x i16> %a0) ; <<8 x i32>> [#uses=1] + ret <8 x i32> %res +} +declare <8 x i32> @llvm.x86.avx2.pmovzxwd(<8 x i16>) nounwind readnone + + +define <4 x i64> @test_x86_avx2_pmovzxwq(<8 x i16> %a0) { + ; CHECK: vpmovzxwq + %res = call <4 x i64> @llvm.x86.avx2.pmovzxwq(<8 x i16> %a0) ; <<4 x i64>> [#uses=1] + ret <4 x i64> %res +} +declare <4 x i64> @llvm.x86.avx2.pmovzxwq(<8 x i16>) nounwind readnone From chandlerc at gmail.com Wed Nov 2 00:03:06 2011 From: chandlerc at gmail.com (Chandler Carruth) Date: Wed, 02 Nov 2011 05:03:06 -0000 Subject: [llvm-commits] [llvm] r143531 - in /llvm/trunk: cmake/modules/TableGen.cmake utils/TableGen/CMakeLists.txt Message-ID: <20111102050306.6B5322A6C12C@llvm.org> Author: chandlerc Date: Wed Nov 2 00:03:06 2011 New Revision: 143531 URL: http://llvm.org/viewvc/llvm-project?rev=143531&view=rev Log: The TableGen parts of the CMake build are seriously broken. This fixes one aspect of them by having them use the (annoying, if not broken) proper library dependency model for adding the LLVMTableGen library as a dependency. This could manifest as a link order issue in the presence of separate LLVM / Clang source builds with CMake and a linker that really cares about such things. Also, add the Support dependency to llvm-tblgen itself so that it doesn't rely on TableGen's transitive Support dependency. A parallel change for clang-tblgen will be forthcoming. Modified: llvm/trunk/cmake/modules/TableGen.cmake llvm/trunk/utils/TableGen/CMakeLists.txt Modified: llvm/trunk/cmake/modules/TableGen.cmake URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/TableGen.cmake?rev=143531&r1=143530&r2=143531&view=diff ============================================================================== --- llvm/trunk/cmake/modules/TableGen.cmake (original) +++ llvm/trunk/cmake/modules/TableGen.cmake Wed Nov 2 00:03:06 2011 @@ -76,7 +76,10 @@ macro(add_tablegen target project) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_TOOLS_BINARY_DIR}) + set(${target}_OLD_LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS}) + set(LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS} TableGen) add_llvm_utility(${target} ${ARGN}) + set(LLVM_LINK_COMPONENTS ${target}_OLD_LLVM_LINK_COMPONENTS) set(${project}_TABLEGEN "${target}" CACHE STRING "Native TableGen executable. Saves building one when cross-compiling.") @@ -110,7 +113,6 @@ endif() endif() - target_link_libraries(${target} LLVMSupport LLVMTableGen) if( MINGW ) target_link_libraries(${target} imagehlp psapi) if(CMAKE_SIZEOF_VOID_P MATCHES "8") Modified: llvm/trunk/utils/TableGen/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CMakeLists.txt?rev=143531&r1=143530&r2=143531&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/CMakeLists.txt (original) +++ llvm/trunk/utils/TableGen/CMakeLists.txt Wed Nov 2 00:03:06 2011 @@ -1,5 +1,6 @@ set(LLVM_REQUIRES_EH 1) set(LLVM_REQUIRES_RTTI 1) +set(LLVM_LINK_COMPONENTS Support) add_tablegen(llvm-tblgen LLVM ARMDecoderEmitter.cpp From chandlerc at gmail.com Wed Nov 2 00:27:41 2011 From: chandlerc at gmail.com (Chandler Carruth) Date: Tue, 1 Nov 2011 22:27:41 -0700 Subject: [llvm-commits] [llvm] r143531 - in /llvm/trunk: cmake/modules/TableGen.cmake utils/TableGen/CMakeLists.txt In-Reply-To: <20111102050306.6B5322A6C12C@llvm.org> References: <20111102050306.6B5322A6C12C@llvm.org> Message-ID: Bill, Daniel; This patch (and its sibling r143532) *might* be interesting for 3.0. This is from a report on IRC of the 3.0 release candidate failing to link clang-tblgen correctly when LLVM was installed as a separate library. Daniel and I found the problem via inspection and I don't personally have a reproduction so I don't have a great idea of how likely (or unlikely) others hitting this problem will be. I'll update the thread if the person who reported it is able to reproduce and confirm that this fixes the issue. On Tue, Nov 1, 2011 at 10:03 PM, Chandler Carruth wrote: > Author: chandlerc > Date: Wed Nov 2 00:03:06 2011 > New Revision: 143531 > > URL: http://llvm.org/viewvc/llvm-project?rev=143531&view=rev > Log: > The TableGen parts of the CMake build are seriously broken. This fixes > one aspect of them by having them use the (annoying, if not broken) > proper library dependency model for adding the LLVMTableGen library as > a dependency. This could manifest as a link order issue in the presence > of separate LLVM / Clang source builds with CMake and a linker that > really cares about such things. > > Also, add the Support dependency to llvm-tblgen itself so that it > doesn't rely on TableGen's transitive Support dependency. A parallel > change for clang-tblgen will be forthcoming. > > Modified: > llvm/trunk/cmake/modules/TableGen.cmake > llvm/trunk/utils/TableGen/CMakeLists.txt > > Modified: llvm/trunk/cmake/modules/TableGen.cmake > URL: > http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/TableGen.cmake?rev=143531&r1=143530&r2=143531&view=diff > > ============================================================================== > --- llvm/trunk/cmake/modules/TableGen.cmake (original) > +++ llvm/trunk/cmake/modules/TableGen.cmake Wed Nov 2 00:03:06 2011 > @@ -76,7 +76,10 @@ > macro(add_tablegen target project) > set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_TOOLS_BINARY_DIR}) > > + set(${target}_OLD_LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS}) > + set(LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS} TableGen) > add_llvm_utility(${target} ${ARGN}) > + set(LLVM_LINK_COMPONENTS ${target}_OLD_LLVM_LINK_COMPONENTS) > > set(${project}_TABLEGEN "${target}" CACHE > STRING "Native TableGen executable. Saves building one when > cross-compiling.") > @@ -110,7 +113,6 @@ > endif() > endif() > > - target_link_libraries(${target} LLVMSupport LLVMTableGen) > if( MINGW ) > target_link_libraries(${target} imagehlp psapi) > if(CMAKE_SIZEOF_VOID_P MATCHES "8") > > Modified: llvm/trunk/utils/TableGen/CMakeLists.txt > URL: > http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CMakeLists.txt?rev=143531&r1=143530&r2=143531&view=diff > > ============================================================================== > --- llvm/trunk/utils/TableGen/CMakeLists.txt (original) > +++ llvm/trunk/utils/TableGen/CMakeLists.txt Wed Nov 2 00:03:06 2011 > @@ -1,5 +1,6 @@ > set(LLVM_REQUIRES_EH 1) > set(LLVM_REQUIRES_RTTI 1) > +set(LLVM_LINK_COMPONENTS Support) > > add_tablegen(llvm-tblgen LLVM > ARMDecoderEmitter.cpp > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111101/8f71e69e/attachment-0001.html From chandlerc at gmail.com Wed Nov 2 00:43:44 2011 From: chandlerc at gmail.com (Chandler Carruth) Date: Wed, 02 Nov 2011 05:43:44 -0000 Subject: [llvm-commits] [llvm] r143534 - /llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp Message-ID: <20111102054345.094422A6C12C@llvm.org> Author: chandlerc Date: Wed Nov 2 00:43:44 2011 New Revision: 143534 URL: http://llvm.org/viewvc/llvm-project?rev=143534&view=rev Log: Add parentheses to disambiguate the precedence of these operations and silence -Wparentheses. Modified: llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp Modified: llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp?rev=143534&r1=143533&r2=143534&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp Wed Nov 2 00:43:44 2011 @@ -1588,8 +1588,8 @@ assert(SE->isLoopInvariant(IVLimit, L) && "Computed iteration count is not loop invariant!"); - assert( EnableIVRewrite || !IVLimit->getType()->isPointerTy() && - "Should not expand pointer types" ); + assert((EnableIVRewrite || !IVLimit->getType()->isPointerTy()) && + "Should not expand pointer types" ); Value *ExitCnt = Rewriter.expandCodeFor(IVLimit, CmpTy, BI); // Create a gep for IVInit + IVLimit from on an existing pointer base. From chandlerc at gmail.com Wed Nov 2 01:06:05 2011 From: chandlerc at gmail.com (Chandler Carruth) Date: Tue, 1 Nov 2011 23:06:05 -0700 Subject: [llvm-commits] [llvm] r143531 - in /llvm/trunk: cmake/modules/TableGen.cmake utils/TableGen/CMakeLists.txt In-Reply-To: References: <20111102050306.6B5322A6C12C@llvm.org> Message-ID: On Tue, Nov 1, 2011 at 10:27 PM, Chandler Carruth wrote: > Bill, Daniel; > > This patch (and its sibling r143532) *might* be interesting for 3.0. This > is from a report on IRC of the 3.0 release candidate failing to link > clang-tblgen correctly when LLVM was installed as a separate library. > Daniel and I found the problem via inspection and I don't personally have a > reproduction so I don't have a great idea of how likely (or unlikely) > others hitting this problem will be. > > I'll update the thread if the person who reported it is able to reproduce > and confirm that this fixes the issue. > Ok, this does fix an issue. The issue occurs when building static libraries where you build LLVM without building Clang, and then build Clang from a separate directory. In that case, with some linkers (including the one on Haiku, but I suspect others as well) the link of clang-tblgen fails without this patch. I'll leave it to you and others (is there a code owner for the CMake build? Maybe Eric?) to decide if this should be pulled into the 3.0 release at this (rather late) stage. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111101/0222244f/attachment.html From craig.topper at gmail.com Wed Nov 2 01:54:17 2011 From: craig.topper at gmail.com (Craig Topper) Date: Wed, 02 Nov 2011 06:54:17 -0000 Subject: [llvm-commits] [llvm] r143536 - in /llvm/trunk: include/llvm/IntrinsicsX86.td lib/Target/X86/X86InstrSSE.td test/CodeGen/X86/avx2-intrinsics-x86.ll Message-ID: <20111102065417.C29ED2A6C12C@llvm.org> Author: ctopper Date: Wed Nov 2 01:54:17 2011 New Revision: 143536 URL: http://llvm.org/viewvc/llvm-project?rev=143536&view=rev Log: More AVX2 instructions and intrinsics. Modified: llvm/trunk/include/llvm/IntrinsicsX86.td llvm/trunk/lib/Target/X86/X86InstrSSE.td llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll Modified: llvm/trunk/include/llvm/IntrinsicsX86.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IntrinsicsX86.td?rev=143536&r1=143535&r2=143536&view=diff ============================================================================== --- llvm/trunk/include/llvm/IntrinsicsX86.td (original) +++ llvm/trunk/include/llvm/IntrinsicsX86.td Wed Nov 2 01:54:17 2011 @@ -1398,6 +1398,9 @@ def int_x86_avx2_pmulu_dq : GCCBuiltin<"__builtin_ia32_pmuludq256">, Intrinsic<[llvm_v4i64_ty], [llvm_v8i32_ty, llvm_v8i32_ty], [IntrNoMem, Commutative]>; + def int_x86_avx2_pmul_dq : GCCBuiltin<"__builtin_ia32_pmuldq256">, + Intrinsic<[llvm_v4i64_ty], [llvm_v8i32_ty, + llvm_v8i32_ty], [IntrNoMem, Commutative]>; def int_x86_avx2_pmadd_wd : GCCBuiltin<"__builtin_ia32_pmaddwd256">, Intrinsic<[llvm_v8i32_ty], [llvm_v16i16_ty, llvm_v16i16_ty], [IntrNoMem, Commutative]>; @@ -1407,21 +1410,49 @@ def int_x86_avx2_pavg_w : GCCBuiltin<"__builtin_ia32_pavgw256">, Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, llvm_v16i16_ty], [IntrNoMem, Commutative]>; + def int_x86_avx2_psad_bw : GCCBuiltin<"__builtin_ia32_psadbw256">, + Intrinsic<[llvm_v4i64_ty], [llvm_v32i8_ty, + llvm_v32i8_ty], [IntrNoMem, Commutative]>; +} + +// Vector min, max +let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". def int_x86_avx2_pmaxu_b : GCCBuiltin<"__builtin_ia32_pmaxub256">, Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, llvm_v32i8_ty], [IntrNoMem, Commutative]>; + def int_x86_avx2_pmaxu_w : GCCBuiltin<"__builtin_ia32_pmaxuw256">, + Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, + llvm_v16i16_ty], [IntrNoMem, Commutative]>; + def int_x86_avx2_pmaxu_d : GCCBuiltin<"__builtin_ia32_pmaxud256">, + Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, + llvm_v8i32_ty], [IntrNoMem, Commutative]>; + def int_x86_avx2_pmaxs_b : GCCBuiltin<"__builtin_ia32_pmaxsb256">, + Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, + llvm_v32i8_ty], [IntrNoMem, Commutative]>; def int_x86_avx2_pmaxs_w : GCCBuiltin<"__builtin_ia32_pmaxsw256">, Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, llvm_v16i16_ty], [IntrNoMem, Commutative]>; + def int_x86_avx2_pmaxs_d : GCCBuiltin<"__builtin_ia32_pmaxsd256">, + Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, + llvm_v8i32_ty], [IntrNoMem, Commutative]>; def int_x86_avx2_pminu_b : GCCBuiltin<"__builtin_ia32_pminub256">, Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, llvm_v32i8_ty], [IntrNoMem, Commutative]>; - def int_x86_avx2_pmins_w : GCCBuiltin<"__builtin_ia32_pminsw256">, + def int_x86_avx2_pminu_w : GCCBuiltin<"__builtin_ia32_pminuw256">, Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, llvm_v16i16_ty], [IntrNoMem, Commutative]>; - def int_x86_avx2_psad_bw : GCCBuiltin<"__builtin_ia32_psadbw256">, - Intrinsic<[llvm_v4i64_ty], [llvm_v32i8_ty, + def int_x86_avx2_pminu_d : GCCBuiltin<"__builtin_ia32_pminud256">, + Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, + llvm_v8i32_ty], [IntrNoMem, Commutative]>; + def int_x86_avx2_pmins_b : GCCBuiltin<"__builtin_ia32_pminsb256">, + Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, llvm_v32i8_ty], [IntrNoMem, Commutative]>; + def int_x86_avx2_pmins_w : GCCBuiltin<"__builtin_ia32_pminsw256">, + Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, + llvm_v16i16_ty], [IntrNoMem, Commutative]>; + def int_x86_avx2_pmins_d : GCCBuiltin<"__builtin_ia32_pminsd256">, + Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, + llvm_v8i32_ty], [IntrNoMem, Commutative]>; } // Integer shift ops. @@ -1501,15 +1532,21 @@ def int_x86_avx2_pcmpeq_d : GCCBuiltin<"__builtin_ia32_pcmpeqd256">, Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, llvm_v8i32_ty], [IntrNoMem, Commutative]>; + def int_x86_avx2_pcmpeq_q : GCCBuiltin<"__builtin_ia32_pcmpeqq256">, + Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, llvm_v4i64_ty], + [IntrNoMem, Commutative]>; def int_x86_avx2_pcmpgt_b : GCCBuiltin<"__builtin_ia32_pcmpgtb256">, - Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, - llvm_v32i8_ty], [IntrNoMem]>; + Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, llvm_v32i8_ty], + [IntrNoMem]>; def int_x86_avx2_pcmpgt_w : GCCBuiltin<"__builtin_ia32_pcmpgtw256">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, - llvm_v16i16_ty], [IntrNoMem]>; + Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, llvm_v16i16_ty], + [IntrNoMem]>; def int_x86_avx2_pcmpgt_d : GCCBuiltin<"__builtin_ia32_pcmpgtd256">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, - llvm_v8i32_ty], [IntrNoMem]>; + Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, llvm_v8i32_ty], + [IntrNoMem]>; + def int_x86_avx2_pcmpgt_q : GCCBuiltin<"__builtin_ia32_pcmpgtq256">, + Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, llvm_v4i64_ty], + [IntrNoMem]>; } // Pack ops. @@ -1523,6 +1560,9 @@ def int_x86_avx2_packuswb : GCCBuiltin<"__builtin_ia32_packuswb256">, Intrinsic<[llvm_v32i8_ty], [llvm_v16i16_ty, llvm_v16i16_ty], [IntrNoMem]>; + def int_x86_avx2_packusdw : GCCBuiltin<"__builtin_ia32_packusdw256">, + Intrinsic<[llvm_v16i16_ty], [llvm_v8i32_ty, + llvm_v8i32_ty], [IntrNoMem]>; } // Absolute value ops @@ -1620,6 +1660,23 @@ [IntrNoMem]>; } +// Vector blend +let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". + def int_x86_avx2_pblendvb : GCCBuiltin<"__builtin_ia32_pblendvb256">, + Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, llvm_v32i8_ty, + llvm_v32i8_ty], [IntrNoMem]>; + def int_x86_avx2_pblendw : GCCBuiltin<"__builtin_ia32_pblendw256">, + Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, llvm_v16i16_ty, + llvm_i32_ty], [IntrNoMem]>; +} + +// Vector load with broadcast +let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". + def int_x86_avx2_vbroadcasti128 : + GCCBuiltin<"__builtin_ia32_vbroadcastsi256">, + Intrinsic<[llvm_v4i64_ty], [llvm_ptr_ty], [IntrReadMem]>; +} + // Misc. let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". def int_x86_avx2_pmovmskb : GCCBuiltin<"__builtin_ia32_pmovmskb256">, @@ -1627,6 +1684,11 @@ def int_x86_avx2_pshuf_b : GCCBuiltin<"__builtin_ia32_pshufb256">, Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, llvm_v32i8_ty], [IntrNoMem]>; + def int_x86_avx2_mpsadbw : GCCBuiltin<"__builtin_ia32_mpsadbw256">, + Intrinsic<[llvm_v16i16_ty], [llvm_v32i8_ty, llvm_v32i8_ty, + llvm_i32_ty], [IntrNoMem, Commutative]>; + def int_x86_avx2_movntdqa : GCCBuiltin<"__builtin_ia32_movntdqa256">, + Intrinsic<[llvm_v4i64_ty], [llvm_ptr_ty], [IntrReadMem]>; } //===----------------------------------------------------------------------===// Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=143536&r1=143535&r2=143536&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Wed Nov 2 01:54:17 2011 @@ -6248,6 +6248,22 @@ (bitconvert (memopv16i8 addr:$src2))))]>, OpSize; } +/// SS41I_binop_rm_int - Simple SSE 4.1 binary operator +multiclass SS41I_binop_rm_int_y opc, string OpcodeStr, + Intrinsic IntId256> { + let isCommutable = 1 in + def Yrr : SS48I, OpSize; + def Yrm : SS48I, OpSize; +} + let Predicates = [HasAVX] in { let isCommutable = 0 in defm VPACKUSDW : SS41I_binop_rm_int<0x2B, "vpackusdw", int_x86_sse41_packusdw, @@ -6279,6 +6295,32 @@ (VPCMPEQQrm VR128:$src1, addr:$src2)>; } +let Predicates = [HasAVX2] in { + let isCommutable = 0 in + defm VPACKUSDW : SS41I_binop_rm_int_y<0x2B, "vpackusdw", + int_x86_avx2_packusdw>, VEX_4V; + defm VPCMPEQQ : SS41I_binop_rm_int_y<0x29, "vpcmpeqq", + int_x86_avx2_pcmpeq_q>, VEX_4V; + defm VPMINSB : SS41I_binop_rm_int_y<0x38, "vpminsb", + int_x86_avx2_pmins_b>, VEX_4V; + defm VPMINSD : SS41I_binop_rm_int_y<0x39, "vpminsd", + int_x86_avx2_pmins_d>, VEX_4V; + defm VPMINUD : SS41I_binop_rm_int_y<0x3B, "vpminud", + int_x86_avx2_pminu_d>, VEX_4V; + defm VPMINUW : SS41I_binop_rm_int_y<0x3A, "vpminuw", + int_x86_avx2_pminu_w>, VEX_4V; + defm VPMAXSB : SS41I_binop_rm_int_y<0x3C, "vpmaxsb", + int_x86_avx2_pmaxs_b>, VEX_4V; + defm VPMAXSD : SS41I_binop_rm_int_y<0x3D, "vpmaxsd", + int_x86_avx2_pmaxs_d>, VEX_4V; + defm VPMAXUD : SS41I_binop_rm_int_y<0x3F, "vpmaxud", + int_x86_avx2_pmaxu_d>, VEX_4V; + defm VPMAXUW : SS41I_binop_rm_int_y<0x3E, "vpmaxuw", + int_x86_avx2_pmaxu_w>, VEX_4V; + defm VPMULDQ : SS41I_binop_rm_int_y<0x28, "vpmuldq", + int_x86_avx2_pmul_dq>, VEX_4V; +} + let Constraints = "$src1 = $dst" in { let isCommutable = 0 in defm PACKUSDW : SS41I_binop_rm_int<0x2B, "packusdw", int_x86_sse41_packusdw>; @@ -6301,7 +6343,7 @@ /// SS48I_binop_rm - Simple SSE41 binary operator. multiclass SS48I_binop_rm opc, string OpcodeStr, SDNode OpNode, - ValueType OpVT, bit Is2Addr = 1> { + ValueType OpVT, bit Is2Addr = 1> { let isCommutable = 1 in def rr : SS48I opc, string OpcodeStr, SDNode OpNode, + ValueType OpVT> { + let isCommutable = 1 in + def Yrr : SS48I, + OpSize; + def Yrm : SS48I, + OpSize; +} + let Predicates = [HasAVX] in defm VPMULLD : SS48I_binop_rm<0x40, "vpmulld", mul, v4i32, 0>, VEX_4V; +let Predicates = [HasAVX2] in + defm VPMULLD : SS48I_binop_rm_y<0x40, "vpmulld", mul, v8i32>, VEX_4V; let Constraints = "$src1 = $dst" in defm PMULLD : SS48I_binop_rm<0x40, "pmulld", mul, v4i32>; @@ -6375,6 +6436,15 @@ VR256, memopv32i8, i256mem, 0>, VEX_4V; } +let Predicates = [HasAVX2] in { + let isCommutable = 0 in { + defm VPBLENDWY : SS41I_binop_rmi_int<0x0E, "vpblendw", int_x86_avx2_pblendw, + VR256, memopv32i8, i256mem, 0>, VEX_4V; + defm VMPSADBWY : SS41I_binop_rmi_int<0x42, "vmpsadbw", int_x86_avx2_mpsadbw, + VR256, memopv32i8, i256mem, 0>, VEX_4V; + } +} + let Constraints = "$src1 = $dst" in { let isCommutable = 0 in { defm BLENDPS : SS41I_binop_rmi_int<0x0C, "blendps", int_x86_sse41_blendps, @@ -6393,7 +6463,6 @@ } /// SS41I_quaternary_int_avx - AVX SSE 4.1 with 4 operators -let Predicates = [HasAVX] in { multiclass SS41I_quaternary_int_avx opc, string OpcodeStr, RegisterClass RC, X86MemOperand x86memop, PatFrag mem_frag, Intrinsic IntId> { @@ -6413,8 +6482,8 @@ RC:$src3))], SSEPackedInt>, OpSize, TA, VEX_4V, VEX_I8IMM; } -} +let Predicates = [HasAVX] in { defm VBLENDVPD : SS41I_quaternary_int_avx<0x4B, "vblendvpd", VR128, i128mem, memopv16i8, int_x86_sse41_blendvpd>; defm VBLENDVPS : SS41I_quaternary_int_avx<0x4A, "vblendvps", VR128, i128mem, @@ -6425,6 +6494,12 @@ memopv32i8, int_x86_avx_blendv_pd_256>; defm VBLENDVPSY : SS41I_quaternary_int_avx<0x4A, "vblendvps", VR256, i256mem, memopv32i8, int_x86_avx_blendv_ps_256>; +} + +let Predicates = [HasAVX2] in { +defm VPBLENDVBY : SS41I_quaternary_int_avx<0x4C, "vpblendvb", VR256, i256mem, + memopv32i8, int_x86_avx2_pblendvb>; +} let Predicates = [HasAVX] in { def : Pat<(v16i8 (vselect (v16i8 VR128:$mask), (v16i8 VR128:$src1), @@ -6503,6 +6578,11 @@ "vmovntdqa\t{$src, $dst|$dst, $src}", [(set VR128:$dst, (int_x86_sse41_movntdqa addr:$src))]>, OpSize, VEX; +let Predicates = [HasAVX2] in +def VMOVNTDQAYrm : SS48I<0x2A, MRMSrcMem, (outs VR256:$dst), (ins i256mem:$src), + "vmovntdqa\t{$src, $dst|$dst, $src}", + [(set VR256:$dst, (int_x86_avx2_movntdqa addr:$src))]>, + OpSize, VEX; def MOVNTDQArm : SS48I<0x2A, MRMSrcMem, (outs VR128:$dst), (ins i128mem:$src), "movntdqa\t{$src, $dst|$dst, $src}", [(set VR128:$dst, (int_x86_sse41_movntdqa addr:$src))]>, @@ -6532,6 +6612,22 @@ (bitconvert (memopv16i8 addr:$src2))))]>, OpSize; } +/// SS42I_binop_rm_int - Simple SSE 4.2 binary operator +multiclass SS42I_binop_rm_int_y opc, string OpcodeStr, + Intrinsic IntId256> { + def Yrr : SS428I, + OpSize; + def Yrm : SS428I, OpSize; +} + let Predicates = [HasAVX] in { defm VPCMPGTQ : SS42I_binop_rm_int<0x37, "vpcmpgtq", int_x86_sse42_pcmpgtq, 0>, VEX_4V; @@ -6542,6 +6638,11 @@ (VPCMPGTQrm VR128:$src1, addr:$src2)>; } +let Predicates = [HasAVX2] in { + defm VPCMPGTQ : SS42I_binop_rm_int_y<0x37, "vpcmpgtq", int_x86_avx2_pcmpgt_q>, + VEX_4V; +} + let Constraints = "$src1 = $dst" in defm PCMPGTQ : SS42I_binop_rm_int<0x37, "pcmpgtq", int_x86_sse42_pcmpgtq>; @@ -6991,6 +7092,10 @@ def VBROADCASTF128 : avx_broadcast<0x1A, "vbroadcastf128", VR256, f128mem, int_x86_avx_vbroadcastf128_pd_256>; +let Predicates = [HasAVX2] in +def VBROADCASTI128 : avx_broadcast<0x5A, "vbroadcasti128", VR256, i128mem, + int_x86_avx2_vbroadcasti128>; + def : Pat<(int_x86_avx_vbroadcastf128_ps_256 addr:$src), (VBROADCASTF128 addr:$src)>; Modified: llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll?rev=143536&r1=143535&r2=143536&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll (original) +++ llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll Wed Nov 2 01:54:17 2011 @@ -512,6 +512,119 @@ declare <16 x i16> @llvm.x86.avx2.psign.w(<16 x i16>, <16 x i16>) nounwind readnone +define <4 x i64> @test_x86_avx2_movntdqa(i8* %a0) { + ; CHECK: movl + ; CHECK: vmovntdqa + %res = call <4 x i64> @llvm.x86.avx2.movntdqa(i8* %a0) ; <<4 x i64>> [#uses=1] + ret <4 x i64> %res +} +declare <4 x i64> @llvm.x86.avx2.movntdqa(i8*) nounwind readonly + + +define <16 x i16> @test_x86_avx2_mpsadbw(<32 x i8> %a0, <32 x i8> %a1) { + ; CHECK: vmpsadbw + %res = call <16 x i16> @llvm.x86.avx2.mpsadbw(<32 x i8> %a0, <32 x i8> %a1, i32 7) ; <<16 x i16>> [#uses=1] + ret <16 x i16> %res +} +declare <16 x i16> @llvm.x86.avx2.mpsadbw(<32 x i8>, <32 x i8>, i32) nounwind readnone + + +define <16 x i16> @test_x86_avx2_packusdw(<8 x i32> %a0, <8 x i32> %a1) { + ; CHECK: vpackusdw + %res = call <16 x i16> @llvm.x86.avx2.packusdw(<8 x i32> %a0, <8 x i32> %a1) ; <<16 x i16>> [#uses=1] + ret <16 x i16> %res +} +declare <16 x i16> @llvm.x86.avx2.packusdw(<8 x i32>, <8 x i32>) nounwind readnone + + +define <32 x i8> @test_x86_avx2_pblendvb(<32 x i8> %a0, <32 x i8> %a1, <32 x i8> %a2) { + ; CHECK: vpblendvb + %res = call <32 x i8> @llvm.x86.avx2.pblendvb(<32 x i8> %a0, <32 x i8> %a1, <32 x i8> %a2) ; <<32 x i8>> [#uses=1] + ret <32 x i8> %res +} +declare <32 x i8> @llvm.x86.avx2.pblendvb(<32 x i8>, <32 x i8>, <32 x i8>) nounwind readnone + + +define <16 x i16> @test_x86_avx2_pblendw(<16 x i16> %a0, <16 x i16> %a1) { + ; CHECK: vpblendw + %res = call <16 x i16> @llvm.x86.avx2.pblendw(<16 x i16> %a0, <16 x i16> %a1, i32 7) ; <<16 x i16>> [#uses=1] + ret <16 x i16> %res +} +declare <16 x i16> @llvm.x86.avx2.pblendw(<16 x i16>, <16 x i16>, i32) nounwind readnone + + +define <4 x i64> @test_x86_avx2_pcmpeqq(<4 x i64> %a0, <4 x i64> %a1) { + ; CHECK: vpcmpeqq + %res = call <4 x i64> @llvm.x86.avx2.pcmpeq.q(<4 x i64> %a0, <4 x i64> %a1) ; <<4 x i64>> [#uses=1] + ret <4 x i64> %res +} +declare <4 x i64> @llvm.x86.avx2.pcmpeq.q(<4 x i64>, <4 x i64>) nounwind readnone + + +define <32 x i8> @test_x86_avx2_pmaxsb(<32 x i8> %a0, <32 x i8> %a1) { + ; CHECK: vpmaxsb + %res = call <32 x i8> @llvm.x86.avx2.pmaxs.b(<32 x i8> %a0, <32 x i8> %a1) ; <<32 x i8>> [#uses=1] + ret <32 x i8> %res +} +declare <32 x i8> @llvm.x86.avx2.pmaxs.b(<32 x i8>, <32 x i8>) nounwind readnone + + +define <8 x i32> @test_x86_avx2_pmaxsd(<8 x i32> %a0, <8 x i32> %a1) { + ; CHECK: vpmaxsd + %res = call <8 x i32> @llvm.x86.avx2.pmaxs.d(<8 x i32> %a0, <8 x i32> %a1) ; <<8 x i32>> [#uses=1] + ret <8 x i32> %res +} +declare <8 x i32> @llvm.x86.avx2.pmaxs.d(<8 x i32>, <8 x i32>) nounwind readnone + + +define <8 x i32> @test_x86_avx2_pmaxud(<8 x i32> %a0, <8 x i32> %a1) { + ; CHECK: vpmaxud + %res = call <8 x i32> @llvm.x86.avx2.pmaxu.d(<8 x i32> %a0, <8 x i32> %a1) ; <<8 x i32>> [#uses=1] + ret <8 x i32> %res +} +declare <8 x i32> @llvm.x86.avx2.pmaxu.d(<8 x i32>, <8 x i32>) nounwind readnone + + +define <16 x i16> @test_x86_avx2_pmaxuw(<16 x i16> %a0, <16 x i16> %a1) { + ; CHECK: vpmaxuw + %res = call <16 x i16> @llvm.x86.avx2.pmaxu.w(<16 x i16> %a0, <16 x i16> %a1) ; <<16 x i16>> [#uses=1] + ret <16 x i16> %res +} +declare <16 x i16> @llvm.x86.avx2.pmaxu.w(<16 x i16>, <16 x i16>) nounwind readnone + + +define <32 x i8> @test_x86_avx2_pminsb(<32 x i8> %a0, <32 x i8> %a1) { + ; CHECK: vpminsb + %res = call <32 x i8> @llvm.x86.avx2.pmins.b(<32 x i8> %a0, <32 x i8> %a1) ; <<32 x i8>> [#uses=1] + ret <32 x i8> %res +} +declare <32 x i8> @llvm.x86.avx2.pmins.b(<32 x i8>, <32 x i8>) nounwind readnone + + +define <8 x i32> @test_x86_avx2_pminsd(<8 x i32> %a0, <8 x i32> %a1) { + ; CHECK: vpminsd + %res = call <8 x i32> @llvm.x86.avx2.pmins.d(<8 x i32> %a0, <8 x i32> %a1) ; <<8 x i32>> [#uses=1] + ret <8 x i32> %res +} +declare <8 x i32> @llvm.x86.avx2.pmins.d(<8 x i32>, <8 x i32>) nounwind readnone + + +define <8 x i32> @test_x86_avx2_pminud(<8 x i32> %a0, <8 x i32> %a1) { + ; CHECK: vpminud + %res = call <8 x i32> @llvm.x86.avx2.pminu.d(<8 x i32> %a0, <8 x i32> %a1) ; <<8 x i32>> [#uses=1] + ret <8 x i32> %res +} +declare <8 x i32> @llvm.x86.avx2.pminu.d(<8 x i32>, <8 x i32>) nounwind readnone + + +define <16 x i16> @test_x86_avx2_pminuw(<16 x i16> %a0, <16 x i16> %a1) { + ; CHECK: vpminuw + %res = call <16 x i16> @llvm.x86.avx2.pminu.w(<16 x i16> %a0, <16 x i16> %a1) ; <<16 x i16>> [#uses=1] + ret <16 x i16> %res +} +declare <16 x i16> @llvm.x86.avx2.pminu.w(<16 x i16>, <16 x i16>) nounwind readnone + + define <8 x i32> @test_x86_avx2_pmovsxbd(<16 x i8> %a0) { ; CHECK: vpmovsxbd %res = call <8 x i32> @llvm.x86.avx2.pmovsxbd(<16 x i8> %a0) ; <<8 x i32>> [#uses=1] @@ -606,3 +719,27 @@ ret <4 x i64> %res } declare <4 x i64> @llvm.x86.avx2.pmovzxwq(<8 x i16>) nounwind readnone + + +define <4 x i64> @test_x86_avx2_pmul.dq(<8 x i32> %a0, <8 x i32> %a1) { + ; CHECK: vpmuldq + %res = call <4 x i64> @llvm.x86.avx2.pmul.dq(<8 x i32> %a0, <8 x i32> %a1) ; <<2 x i64>> [#uses=1] + ret <4 x i64> %res +} +declare <4 x i64> @llvm.x86.avx2.pmul.dq(<8 x i32>, <8 x i32>) nounwind readnone + + +define <4 x i64> @test_x86_avx2_pcmpgtq(<4 x i64> %a0, <4 x i64> %a1) { + ; CHECK: vpcmpgtq + %res = call <4 x i64> @llvm.x86.avx2.pcmpgt.q(<4 x i64> %a0, <4 x i64> %a1) ; <<4 x i64>> [#uses=1] + ret <4 x i64> %res +} +declare <4 x i64> @llvm.x86.avx2.pcmpgt.q(<4 x i64>, <4 x i64>) nounwind readnone + + +define <4 x i64> @test_x86_avx2_vbroadcasti128(i8* %a0) { + ; CHECK: vbroadcasti128 + %res = call <4 x i64> @llvm.x86.avx2.vbroadcasti128(i8* %a0) ; <<4 x i64>> [#uses=1] + ret <4 x i64> %res +} +declare <4 x i64> @llvm.x86.avx2.vbroadcasti128(i8*) nounwind readonly From chandlerc at gmail.com Wed Nov 2 02:17:12 2011 From: chandlerc at gmail.com (Chandler Carruth) Date: Wed, 02 Nov 2011 07:17:12 -0000 Subject: [llvm-commits] [llvm] r143537 - in /llvm/trunk: include/llvm/CodeGen/Passes.h include/llvm/InitializePasses.h lib/CodeGen/CodeGen.cpp lib/CodeGen/LLVMTargetMachine.cpp lib/CodeGen/MachineBlockPlacement.cpp Message-ID: <20111102071712.5EA032A6C12C@llvm.org> Author: chandlerc Date: Wed Nov 2 02:17:12 2011 New Revision: 143537 URL: http://llvm.org/viewvc/llvm-project?rev=143537&view=rev Log: Begin collecting some of the statistics for block placement discussed on the mailing list. Suggestions for other statistics to collect would be awesome. =] Currently these are implemented as a separate pass guarded by a separate flag. I'm not thrilled by that, but I wanted to be able to collect the statistics for the old code placement as well as the new in order to have a point of comparison. I'm planning on folding them into the single pass if / when there is only one pass of interest. Modified: llvm/trunk/include/llvm/CodeGen/Passes.h llvm/trunk/include/llvm/InitializePasses.h llvm/trunk/lib/CodeGen/CodeGen.cpp llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp llvm/trunk/lib/CodeGen/MachineBlockPlacement.cpp Modified: llvm/trunk/include/llvm/CodeGen/Passes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/Passes.h?rev=143537&r1=143536&r2=143537&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/Passes.h (original) +++ llvm/trunk/include/llvm/CodeGen/Passes.h Wed Nov 2 02:17:12 2011 @@ -159,6 +159,11 @@ /// probabilities. FunctionPass *createMachineBlockPlacementPass(); + /// MachineBlockPlacementStats Pass - This pass collects statistics about the + /// basic block placement using branch probabilities and block frequency + /// information. + FunctionPass *createMachineBlockPlacementStatsPass(); + /// Code Placement Pass - This pass optimize code placement and aligns loop /// headers to target specific alignment boundary. FunctionPass *createCodePlacementOptPass(); Modified: llvm/trunk/include/llvm/InitializePasses.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/InitializePasses.h?rev=143537&r1=143536&r2=143537&view=diff ============================================================================== --- llvm/trunk/include/llvm/InitializePasses.h (original) +++ llvm/trunk/include/llvm/InitializePasses.h Wed Nov 2 02:17:12 2011 @@ -147,6 +147,7 @@ void initializeLowerSwitchPass(PassRegistry&); void initializeMachineBlockFrequencyInfoPass(PassRegistry&); void initializeMachineBlockPlacementPass(PassRegistry&); +void initializeMachineBlockPlacementStatsPass(PassRegistry&); void initializeMachineBranchProbabilityInfoPass(PassRegistry&); void initializeMachineCSEPass(PassRegistry&); void initializeMachineDominatorTreePass(PassRegistry&); Modified: llvm/trunk/lib/CodeGen/CodeGen.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CodeGen.cpp?rev=143537&r1=143536&r2=143537&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/CodeGen.cpp (original) +++ llvm/trunk/lib/CodeGen/CodeGen.cpp Wed Nov 2 02:17:12 2011 @@ -29,6 +29,7 @@ initializeLiveVariablesPass(Registry); initializeMachineBlockFrequencyInfoPass(Registry); initializeMachineBlockPlacementPass(Registry); + initializeMachineBlockPlacementStatsPass(Registry); initializeMachineCSEPass(Registry); initializeMachineDominatorTreePass(Registry); initializeMachineLICMPass(Registry); Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=143537&r1=143536&r2=143537&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original) +++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Wed Nov 2 02:17:12 2011 @@ -55,6 +55,8 @@ cl::desc("Disable pre-register allocation tail duplication")); static cl::opt EnableBlockPlacement("enable-block-placement", cl::Hidden, cl::desc("Enable probability-driven block placement")); +static cl::opt EnableBlockPlacementStats("enable-block-placement-stats", + cl::Hidden, cl::desc("Collect probability-driven block placement stats")); static cl::opt DisableCodePlace("disable-code-place", cl::Hidden, cl::desc("Disable code placement")); static cl::opt DisableSSC("disable-ssc", cl::Hidden, @@ -499,6 +501,12 @@ PM.add(createCodePlacementOptPass()); printNoVerify(PM, "After CodePlacementOpt"); } + + // Run a separate pass to collect block placement statistics. + if (EnableBlockPlacementStats) { + PM.add(createMachineBlockPlacementStatsPass()); + printNoVerify(PM, "After MachineBlockPlacementStats"); + } } if (addPreEmitPass(PM, OptLevel)) Modified: llvm/trunk/lib/CodeGen/MachineBlockPlacement.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineBlockPlacement.cpp?rev=143537&r1=143536&r2=143537&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineBlockPlacement.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineBlockPlacement.cpp Wed Nov 2 02:17:12 2011 @@ -48,6 +48,13 @@ #include using namespace llvm; +STATISTIC(NumCondBranches, "Number of conditional branches"); +STATISTIC(NumUncondBranches, "Number of uncondittional branches"); +STATISTIC(CondBranchTakenFreq, + "Potential frequency of taking conditional branches"); +STATISTIC(UncondBranchTakenFreq, + "Potential frequency of taking unconditional branches"); + namespace { /// \brief A structure for storing a weighted edge. /// @@ -481,3 +488,79 @@ // differs from the original order. return true; } + +namespace { +/// \brief A pass to compute block placement statistics. +/// +/// A separate pass to compute interesting statistics for evaluating block +/// placement. This is separate from the actual placement pass so that they can +/// be computed in the absense of any placement transformations or when using +/// alternative placement strategies. +class MachineBlockPlacementStats : public MachineFunctionPass { + /// \brief A handle to the branch probability pass. + const MachineBranchProbabilityInfo *MBPI; + + /// \brief A handle to the function-wide block frequency pass. + const MachineBlockFrequencyInfo *MBFI; + +public: + static char ID; // Pass identification, replacement for typeid + MachineBlockPlacementStats() : MachineFunctionPass(ID) { + initializeMachineBlockPlacementStatsPass(*PassRegistry::getPassRegistry()); + } + + bool runOnMachineFunction(MachineFunction &F); + + void getAnalysisUsage(AnalysisUsage &AU) const { + AU.addRequired(); + AU.addRequired(); + AU.setPreservesAll(); + MachineFunctionPass::getAnalysisUsage(AU); + } + + const char *getPassName() const { return "Block Placement Stats"; } +}; +} + +char MachineBlockPlacementStats::ID = 0; +INITIALIZE_PASS_BEGIN(MachineBlockPlacementStats, "block-placement-stats", + "Basic Block Placement Stats", false, false) +INITIALIZE_PASS_DEPENDENCY(MachineBranchProbabilityInfo) +INITIALIZE_PASS_DEPENDENCY(MachineBlockFrequencyInfo) +INITIALIZE_PASS_END(MachineBlockPlacementStats, "block-placement-stats", + "Basic Block Placement Stats", false, false) + +FunctionPass *llvm::createMachineBlockPlacementStatsPass() { + return new MachineBlockPlacementStats(); +} + +bool MachineBlockPlacementStats::runOnMachineFunction(MachineFunction &F) { + // Check for single-block functions and skip them. + if (llvm::next(F.begin()) == F.end()) + return false; + + MBPI = &getAnalysis(); + MBFI = &getAnalysis(); + + for (MachineFunction::iterator I = F.begin(), E = F.end(); I != E; ++I) { + BlockFrequency BlockFreq = MBFI->getBlockFreq(I); + Statistic &NumBranches = (I->succ_size() > 1) ? NumCondBranches + : NumUncondBranches; + Statistic &BranchTakenFreq = (I->succ_size() > 1) ? CondBranchTakenFreq + : UncondBranchTakenFreq; + for (MachineBasicBlock::succ_iterator SI = I->succ_begin(), + SE = I->succ_end(); + SI != SE; ++SI) { + // Skip if this successor is a fallthrough. + if (I->isLayoutSuccessor(*SI)) + continue; + + BlockFrequency EdgeFreq = BlockFreq * MBPI->getEdgeProbability(I, *SI); + ++NumBranches; + BranchTakenFreq += EdgeFreq.getFrequency(); + } + } + + return false; +} + From baldrick at free.fr Wed Nov 2 02:57:37 2011 From: baldrick at free.fr (Duncan Sands) Date: Wed, 02 Nov 2011 08:57:37 +0100 Subject: [llvm-commits] [llvm] r143502 - in /llvm/trunk: include/llvm/Support/Host.h lib/ExecutionEngine/TargetSelect.cpp lib/Support/CommandLine.cpp lib/Support/TargetRegistry.cpp lib/Support/Unix/Host.inc lib/Support/Windows/Host.inc lib/Target/CBackend/CBackend.cpp tools/bugpoint/BugDriver.cpp tools/llc/llc.cpp tools/llvm-mc/llvm-mc.cpp tools/lto/LTOCodeGenerator.cpp tools/lto/LTOModule.cpp In-Reply-To: <20111101213221.1D4952A6C12C@llvm.org> References: <20111101213221.1D4952A6C12C@llvm.org> Message-ID: <4EB0F7F1.7090401@free.fr> Hi Sebastian, > --- llvm/trunk/include/llvm/Support/Host.h (original) > +++ llvm/trunk/include/llvm/Support/Host.h Tue Nov 1 16:32:20 2011 > @@ -33,14 +33,14 @@ > return !isLittleEndianHost(); > } > > - /// getHostTriple() - Return the target triple of the running > + /// getDefaultTargetTriple() - Return the target triple of the running > /// system. maybe this comment should be updated: "the running system" sounds a lot like "the host". Ciao, Duncan. From baldrick at free.fr Wed Nov 2 02:59:40 2011 From: baldrick at free.fr (Duncan Sands) Date: Wed, 02 Nov 2011 08:59:40 +0100 Subject: [llvm-commits] [llvm] r141977 - /llvm/trunk/utils/llvmbuild In-Reply-To: References: <20111014191237.51440312800A@llvm.org> Message-ID: <4EB0F86C.5060609@free.fr> Hi David, > The main reason I put it there was to create a standard way to build the > entire LLVM ecosystem (llvm, clang, dragonegg and dragonegg-enabled gcc) since the development version of dragonegg doesn't require patching gcc any more, you can just use your system gcc (assuming it is gcc-4.5 or 4.6) and not bother building your own gcc. Ciao, Duncan. From baldrick at free.fr Wed Nov 2 03:48:33 2011 From: baldrick at free.fr (Duncan Sands) Date: Wed, 02 Nov 2011 09:48:33 +0100 Subject: [llvm-commits] patch: x86 vector udiv In-Reply-To: References: Message-ID: <4EB103E1.9010305@free.fr> Hi Peter, > Please review this patch for pr8429 to turn vector udiv into vector shrl instructions when dividing by powers of 2. This was already done on scalars but not on vectors. shouldn't the IR level optimizers be doing this? Ciao, Duncan. > > I also found that vector shifts were always scalarised on x86 even with SSE on so i turned these into the equivalent intrinsics. > > Thanks, > Pete > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From kristof.beyls at arm.com Wed Nov 2 06:29:46 2011 From: kristof.beyls at arm.com (Kristof Beyls) Date: Wed, 2 Nov 2011 11:29:46 -0000 Subject: [llvm-commits] [patch][pr11029] fix for internal crash due to ExpandUnalignedLoad/Store not handling indexed loads correctly In-Reply-To: <000001cc93f5$98ab1040$ca0130c0$@beyls@arm.com> References: <000001cc93f5$98ab1040$ca0130c0$@beyls@arm.com> Message-ID: <000001cc9952$cc5fa510$651eef30$@beyls@arm.com> ping > -----Original Message----- > From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits- > bounces at cs.uiuc.edu] On Behalf Of Kristof Beyls > Sent: 26 October 2011 16:40 > To: llvm-commits at cs.uiuc.edu > Subject: [llvm-commits] [patch][pr11029] fix for internal crash due to > ExpandUnalignedLoad/Store not handling indexed loads correctly > > The attached patch fixes PR11029 ( > http://llvm.org/bugs/show_bug.cgi?id=11029 ). > > The root cause of the problem seems to be that ExpandUnalignedLoad and > ExpandUnalignedStore doesn't handle indexed loads or stores correctly. > > There seem to be 2 possible ways to fix this: > 1. Implement support for indexed loads/stores in the above functions. > 2. Don't generate indexed load/stores in cases where these will need to > be > expanded. > > The attached patch implements the second approach. The reasons for > going > with the second approach are: > * The generation of indexed loads/stores seems to be an optimization. > The > second approach chooses not to do the optimization when it's not > supported. > * There will not be a regression in code generation, since in the cases > that > the patch prohibits optimization, the compiler would crash or generate > incorrect code with a high probability. > * It's unclear whether generating indexed loads/stores for unaligned > loads/stores that need expanding would actually result in better > quality of > the generated code. > > Could someone review the patch and commit it if fine? > > Thanks, > > Kristof From peter at pcc.me.uk Wed Nov 2 07:57:26 2011 From: peter at pcc.me.uk (Peter Collingbourne) Date: Wed, 2 Nov 2011 12:57:26 +0000 Subject: [llvm-commits] [llvm] r143531 - in /llvm/trunk: cmake/modules/TableGen.cmake utils/TableGen/CMakeLists.txt In-Reply-To: <20111102050306.6B5322A6C12C@llvm.org> References: <20111102050306.6B5322A6C12C@llvm.org> Message-ID: <20111102125726.GA28946@pcc.me.uk> On Wed, Nov 02, 2011 at 05:03:06AM -0000, Chandler Carruth wrote: > + set(LLVM_LINK_COMPONENTS ${target}_OLD_LLVM_LINK_COMPONENTS) Shouldn't this be: set(LLVM_LINK_COMPONENTS ${${target}_OLD_LLVM_LINK_COMPONENTS}) ? Thanks, -- Peter From vanboxem.ruben at gmail.com Wed Nov 2 09:22:44 2011 From: vanboxem.ruben at gmail.com (Ruben Van Boxem) Date: Wed, 2 Nov 2011 15:22:44 +0100 Subject: [llvm-commits] [PATCH] LLVM 3.0 broken in lib/Support/Windows/DynamicLibrary.inc Message-ID: I don't know since when, but this file has been changed to remove all the trickery (aka defines) needed for MinGW-w64 (and probably everything else that as forgotten) to succesfully compile it. Attached is a patch that reintroduces the compiler checking. I would like to see this in LLVM 3.0, otherwise (by the looks of the reintroduced code) anything newer than _MSC_VER_1500 will be broken. Thanks! Ruben PS: any replies please "reply-to-all", only subscribed to cfe-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111102/5e2fe363/attachment.html -------------- next part -------------- diff --git a/lib/Support/Windows/DynamicLibrary.inc b/lib/Support/Windows/DynamicLibrary.inc index 83da82a..dba81b4 100644 --- a/lib/Support/Windows/DynamicLibrary.inc +++ b/lib/Support/Windows/DynamicLibrary.inc @@ -43,10 +43,34 @@ static DenseSet *OpenedHandles; extern "C" { - static BOOL CALLBACK ELM_Callback(WIN32_ELMCB_PCSTR ModuleName, - ULONG_PTR ModuleBase, +// Use old callback if: +// - Not using Visual Studio +// - Visual Studio 2005 or earlier but only if we are not using the Windows SDK +// or Windows SDK version is older than 6.0 +// Use new callback if: +// - Newer Visual Studio (comes with newer SDK). +// - Visual Studio 2005 with Windows SDK 6.0+ +#if defined(_MSC_VER) + #if _MSC_VER < 1500 && (!defined(VER_PRODUCTBUILD) || VER_PRODUCTBUILD < 6000) + #define OLD_ELM_CALLBACK_DECL 1 + #endif +#elif defined(__MINGW64__) + // Use new callback. +#elif defined(__MINGW32__) + #define OLD_ELM_CALLBACK_DECL 1 +#endif + +#ifdef OLD_ELM_CALLBACK_DECL + static BOOL CALLBACK ELM_Callback(PSTR ModuleName, + DWORD_PTR ModuleBase, + ULONG ModuleSize, + PVOID UserContext) +#else + static BOOL CALLBACK ELM_Callback(PCSTR ModuleName, + DWORD_PTR ModuleBase, ULONG ModuleSize, PVOID UserContext) +#endif { // Ignore VC++ runtimes prior to 7.1. Somehow some of them get loaded // into the process. From anton at korobeynikov.info Wed Nov 2 09:41:55 2011 From: anton at korobeynikov.info (Anton Korobeynikov) Date: Wed, 2 Nov 2011 17:41:55 +0300 Subject: [llvm-commits] [PATCH] LLVM 3.0 broken in lib/Support/Windows/DynamicLibrary.inc In-Reply-To: References: Message-ID: Hi Ruben, > I don't know since when, but this file has been changed to remove all the > trickery (aka defines) needed for MinGW-w64 (and probably everything else > that as forgotten) to succesfully compile it. Will you please check which commit introduces the breakage? Thanks! -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University From greened at obbligato.org Wed Nov 2 09:43:38 2011 From: greened at obbligato.org (David A. Greene) Date: Wed, 02 Nov 2011 09:43:38 -0500 Subject: [llvm-commits] [llvm] r141977 - /llvm/trunk/utils/llvmbuild In-Reply-To: <4EB0F86C.5060609@free.fr> (Duncan Sands's message of "Wed, 02 Nov 2011 08:59:40 +0100") References: <20111014191237.51440312800A@llvm.org> <4EB0F86C.5060609@free.fr> Message-ID: Duncan Sands writes: > Hi David, > >> The main reason I put it there was to create a standard way to build the >> entire LLVM ecosystem (llvm, clang, dragonegg and dragonegg-enabled gcc) > > since the development version of dragonegg doesn't require patching gcc > any more, you can just use your system gcc (assuming it is gcc-4.5 or 4.6) > and not bother building your own gcc. Ah, cool. Thanks! -Dave From vanboxem.ruben at gmail.com Wed Nov 2 10:07:36 2011 From: vanboxem.ruben at gmail.com (Ruben Van Boxem) Date: Wed, 2 Nov 2011 16:07:36 +0100 Subject: [llvm-commits] [PATCH] LLVM 3.0 broken in lib/Support/Windows/DynamicLibrary.inc In-Reply-To: References: Message-ID: 2011/11/2 Anton Korobeynikov > Hi Ruben, > > > I don't know since when, but this file has been changed to remove all the > > trickery (aka defines) needed for MinGW-w64 (and probably everything else > > that as forgotten) to succesfully compile it. > Will you please check which commit introduces the breakage? > My git clone of LLVM shows git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk at 13065791177308-0d34-0410-b5e6-96231b3b80d8 as the "offender". It seems this code was replaced by a configure-time check. That check apparently misses out when configuring on msys like this: $ /m/Development/Source/LLVM/configure --host=x86_64-w64-mingw32 --enable-optimized --disable-assertions --disable-pthreads CC=clang CXX=clang++ For some reason unknown to me. I was wondering why the CMake build was fine... Ruben -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111102/f00f302a/attachment.html From daniel at zuster.org Wed Nov 2 10:56:38 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Wed, 02 Nov 2011 15:56:38 -0000 Subject: [llvm-commits] [llvm] r143540 - /llvm/trunk/tools/llvm-config/CMakeLists.txt Message-ID: <20111102155638.CF3102A6C12C@llvm.org> Author: ddunbar Date: Wed Nov 2 10:56:38 2011 New Revision: 143540 URL: http://llvm.org/viewvc/llvm-project?rev=143540&view=rev Log: build/CMake: Remove llvm-config.target used to serialize tool builds on llvm-config build, there is no longer a point to this after Chandler's work. Modified: llvm/trunk/tools/llvm-config/CMakeLists.txt Modified: llvm/trunk/tools/llvm-config/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-config/CMakeLists.txt?rev=143540&r1=143539&r2=143540&view=diff ============================================================================== --- llvm/trunk/tools/llvm-config/CMakeLists.txt (original) +++ llvm/trunk/tools/llvm-config/CMakeLists.txt Wed Nov 2 10:56:38 2011 @@ -125,17 +125,6 @@ COMMENT "Building llvm-config script." ) -add_custom_target(llvm-config.target ALL - DEPENDS ${LLVM_CONFIG}) - -add_dependencies( llvm-config.target ${llvm_libs} ) - -# Make sure that llvm-config builds before the llvm tools, so we have -# LibDeps.txt and can use it for updating the hard-coded library -# dependencies on cmake/modules/LLVMLibDeps.cmake when the tools' -# build fail due to outdated dependencies: -set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} llvm-config.target) - install(FILES ${LLVM_CONFIG} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE From daniel at zuster.org Wed Nov 2 10:56:52 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Wed, 02 Nov 2011 15:56:52 -0000 Subject: [llvm-commits] [llvm] r143541 - /llvm/trunk/tools/llvm-config/Makefile Message-ID: <20111102155653.085352A6C12C@llvm.org> Author: ddunbar Date: Wed Nov 2 10:56:52 2011 New Revision: 143541 URL: http://llvm.org/viewvc/llvm-project?rev=143541&view=rev Log: build/Make: Get rid of llvm-config-perobj, which isn't used anymore. Modified: llvm/trunk/tools/llvm-config/Makefile Modified: llvm/trunk/tools/llvm-config/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-config/Makefile?rev=143541&r1=143540&r2=143541&view=diff ============================================================================== --- llvm/trunk/tools/llvm-config/Makefile (original) +++ llvm/trunk/tools/llvm-config/Makefile Wed Nov 2 10:56:52 2011 @@ -53,50 +53,6 @@ $(Verb) cd $(PROJ_OBJ_ROOT) ; \ $(ConfigStatusScript) tools/llvm-config/llvm-config.in -llvm-config-perobj: llvm-config.in $(GenLibDeps) $(LibDir) $(wildcard $(LibDir)/*.a) - $(Echo) "Generating llvm-config-perobj" - $(Verb) $(PERL) $(GenLibDeps) -perobj -flat $(LibDir) "$(NM_PATH)" >PerobjDeps.txt - $(Echo) "Checking for cyclic dependencies between LLVM objects." - $(Verb) $(PERL) $(PROJ_SRC_DIR)/find-cycles.pl < PerobjDepsIncl.txt > PerobjDepsInclFinal.txt || rm -f $@ - $(Verb) $(ECHO) 's/@LLVM_CPPFLAGS@/$(subst /,\/,$(SUB_CPPFLAGS))/' \ - > temp.sed - $(Verb) $(ECHO) 's/@LLVM_CFLAGS@/$(subst /,\/,$(SUB_CFLAGS))/' \ - >> temp.sed - $(Verb) $(ECHO) 's/@LLVM_CXXFLAGS@/$(subst /,\/,$(SUB_CXXFLAGS))/' \ - >> temp.sed - $(Verb) $(ECHO) 's/@LLVM_LDFLAGS@/$(subst /,\/,$(SUB_LDFLAGS))/' \ - >> temp.sed - $(Verb) $(ECHO) 's/@LLVM_BUILDMODE@/$(subst /,\/,$(BuildMode))/' \ - >> temp.sed - $(Verb) $(ECHO) 's/@LLVM_OBJ_SUFFIX@/$(subst /,\/,/$(BuildMode))/' \ - >> temp.sed - $(Verb) $(SED) -f temp.sed < $< > $@ - $(Verb) $(RM) temp.sed - $(Verb) cat PerobjDepsFinal.txt >> $@ - $(Verb) chmod +x $@ - -llvm-config-perobjincl: llvm-config.in $(GenLibDeps) $(LibDir) $(wildcard $(LibDir)/*.a) - $(Echo) "Generating llvm-config-perobjincl" - $(Verb) $(PERL) $(GenLibDeps) -perobj -perobjincl -flat $(LibDir) "$(NM_PATH)" >PerobjDepsIncl.txt - $(Echo) "Checking for cyclic dependencies between LLVM objects." - $(Verb) $(PERL) $(PROJ_SRC_DIR)/find-cycles.pl < PerobjDepsIncl.txt > PerobjDepsInclFinal.txt - $(Verb) $(ECHO) 's/@LLVM_CPPFLAGS@/$(subst /,\/,$(SUB_CPPFLAGS))/' \ - > temp.sed - $(Verb) $(ECHO) 's/@LLVM_CFLAGS@/$(subst /,\/,$(SUB_CFLAGS))/' \ - >> temp.sed - $(Verb) $(ECHO) 's/@LLVM_CXXFLAGS@/$(subst /,\/,$(SUB_CXXFLAGS))/' \ - >> temp.sed - $(Verb) $(ECHO) 's/@LLVM_LDFLAGS@/$(subst /,\/,$(SUB_LDFLAGS))/' \ - >> temp.sed - $(Verb) $(ECHO) 's/@LLVM_BUILDMODE@/$(subst /,\/,$(BuildMode))/' \ - >> temp.sed - $(Verb) $(ECHO) 's/@LLVM_OBJ_SUFFIX@/$(subst /,\/,/$(BuildMode))/' \ - >> temp.sed - $(Verb) $(SED) -f temp.sed < $< > $@ - $(Verb) $(RM) temp.sed - $(Verb) cat PerobjDepsInclFinal.txt >> $@ - $(Verb) chmod +x $@ - # Build our final script. $(ToolDir)/llvm-config: llvm-config.in $(FinalLibDeps) $(Echo) "Building llvm-config script." From daniel at zuster.org Wed Nov 2 10:56:55 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Wed, 02 Nov 2011 15:56:55 -0000 Subject: [llvm-commits] [llvm] r143542 - in /llvm/trunk/docs: UsingLibraries.html index.html Message-ID: <20111102155655.AF30F2A6C12C@llvm.org> Author: ddunbar Date: Wed Nov 2 10:56:55 2011 New Revision: 143542 URL: http://llvm.org/viewvc/llvm-project?rev=143542&view=rev Log: docs: Remove UsingLibraries page, which was inaccurate / out-of-date and not particularly useful. Removed: llvm/trunk/docs/UsingLibraries.html Modified: llvm/trunk/docs/index.html Removed: llvm/trunk/docs/UsingLibraries.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/UsingLibraries.html?rev=143541&view=auto ============================================================================== --- llvm/trunk/docs/UsingLibraries.html (original) +++ llvm/trunk/docs/UsingLibraries.html (removed) @@ -1,438 +0,0 @@ - - - - - Using The LLVM Libraries - - - -

    Using The LLVM Libraries

    -
      -
    1. Abstract
    2. -
    3. Introduction
    4. -
    5. Library Descriptions
    6. -
    7. Library Dependencies
    8. -
    9. Linkage Rules Of Thumb -
        -
      1. Always link LLVMCore, LLVMSupport, LLVMSystem -
      2. Never link both archive and re-linked -
      -
    10. -
    - -
    -

    Written by Reid Spencer

    -
    - -

    Warning: This document is out of date, for more - information please - see llvm-config or, - if you use CMake, the CMake LLVM - guide.

    - - -

    Abstract

    -
    -

    Amongst other things, LLVM is a toolkit for building compilers, linkers, - runtime executives, virtual machines, and other program execution related - tools. In addition to the LLVM tool set, the functionality of LLVM is - available through a set of libraries. To use LLVM as a toolkit for - constructing tools, a developer needs to understand what is contained in the - various libraries, what they depend on, and how to use them. Fortunately, - there is a tool, llvm-config to aid with this. This document - describes the contents of the libraries and how to use llvm-config - to generate command line options. -

    -
    - - -

    Introduction

    -
    -

    If you're writing a compiler, virtual machine, or any other utility based - on LLVM, you'll need to figure out which of the many libraries files you will - need to link with to be successful. An understanding of the contents of these - libraries will be useful in coming up with an optimal specification for the - libraries to link with. The purpose of this document is to reduce some of - the trial and error that the author experienced in using LLVM.

    -

    LLVM produces two types of libraries: archives (ending in .a) and - objects (ending in .o). However, both are libraries. Libraries ending - in .o are known as re-linked libraries because they contain all the - compilation units of the library linked together as a single .o file. - Furthermore, several of the libraries have both forms of library. The - re-linked libraries are used whenever you want to include all symbols from the - library. The archive libraries are used whenever you want to only resolve - outstanding symbols at that point in the link without including everything in - the library.

    -

    If you're using the LLVM Makefile system to link your tools,you will use - the LLVMLIBS make variable. - (see the Makefile Guide for - details). This variable specifies which LLVM libraries to link into your tool - and the order in which they will be linked. You specify re-linked libraries by - naming the library without a suffix. You specify archive libraries by naming - the library with a .a suffix but without the lib prefix. The - order in which the libraries appear in the LLVMLIBS variable - definition is the order in which they will be linked. Getting this order - correct for your tool can sometimes be challenging. -

    - -

    Library Descriptions

    -
    -

    The table below categorizes each library -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    LibraryFormsDescription
    Core Libraries
    LLVMArchive.aLLVM archive reading and writing
    LLVMAsmParser.aLLVM assembly parsing
    LLVMBCReader.aLLVM bitcode reading
    LLVMBCWriter.aLLVM bitcode writing
    LLVMCore.aLLVM core intermediate representation
    LLVMDebugger.aSource level debugging support
    LLVMLinker.aBitcode and archive linking interface
    LLVMSupport.aGeneral support utilities
    LLVMSystem.aOperating system abstraction layer
    LLVMbzip2.aBZip2 compression library
    Analysis Libraries
    LLVMAnalysis.aVarious analysis passes.
    LLVMDataStructure.oData structure analysis passes.
    LLVMipa.aInter-procedural analysis passes.
    Transformation Libraries
    LLVMInstrumentation.aInstrumentation passes.
    LLVMipo.aAll inter-procedural optimization passes.
    LLVMScalarOpts.aAll scalar optimization passes.
    LLVMTransformUtils.aTransformation utilities used by many passes.
    Code Generation Libraries
    LLVMCodeGen.oNative code generation infrastructure
    LLVMSelectionDAG.oAggressive instruction selector for directed acyclic graphs
    Target Libraries
    LLVMARM.oCode generation for ARM architecture
    LLVMCBackend.o'C' language code generator.
    LLVMPowerPC.oCode generation for PowerPC architecture
    LLVMSparc.oCode generation for Sparc architecture
    LLVMTarget.aGeneric code generation utilities.
    LLVMX86.oCode generation for Intel x86 architecture
    Runtime Libraries
    LLVMInterpreter.oBitcode Interpreter
    LLVMJIT.oBitcode JIT Compiler
    LLVMExecutionEngine.oVirtual machine engine
    -
    - - -

    Using llvm-config

    -
    -

    The llvm-config tool is a perl script that produces on its output - various kinds of information. For example, the source or object directories - used to build LLVM can be accessed by passing options to llvm-config. - For complete details on this tool, please see the - manual page.

    -

    To understand the relationships between libraries, the llvm-config - can be very useful. If all you know is that you want certain libraries to - be available, you can generate the complete set of libraries to link with - using one of four options, as below:

    -
      -
    1. --ldflags. This generates the command line options necessary to - be passed to the ld tool in order to link with LLVM. Most notably, - the -L option is provided to specify a library search directory - that contains the LLVM libraries.
    2. -
    3. --libs. This generates command line options suitable for - use with a gcc-style linker. That is, libraries are given with a -l option - and object files are given with a full path.
    4. -
    5. --libnames. This generates a list of just the library file - names. If you know the directory in which these files reside (see --ldflags) - then you can find the libraries there.
    6. -
    7. --libfiles. This generates the full path names of the - LLVM library files.
    8. -
    -

    If you wish to delve further into how llvm-config generates the - correct order (based on library dependencies), please see the tool named - GenLibDeps.pl in the utils source directory of LLVM.

    - - - - - - - -

    Dependency Relationships Of Libraries

    -

    This graph shows the dependency of archive libraries on other archive - libraries or objects. Where a library has both archive and object forms, only - the archive form is shown.

    - Library Dependencies -

    Dependency Relationships Of Object Files

    -

    This graph shows the dependency of object files on archive libraries or - other objects. Where a library has both object and archive forms, only the - dependency to the archive form is shown.

    - Object File Dependencies -

    The following list shows the dependency relationships between libraries in - textual form. The information is the same as shown on the graphs but arranged - alphabetically.

    -
    -
    libLLVMAnalysis.a
      -
    • libLLVMCore.a
    • -
    • libLLVMSupport.a
    • -
    • libLLVMSystem.a
    • -
    • libLLVMTarget.a
    • -
    -
    libLLVMArchive.a
      -
    • libLLVMBCReader.a
    • -
    • libLLVMCore.a
    • -
    • libLLVMSupport.a
    • -
    • libLLVMSystem.a
    • -
    -
    libLLVMAsmParser.a
      -
    • libLLVMCore.a
    • -
    • libLLVMSystem.a
    • -
    -
    libLLVMBCReader.a
      -
    • libLLVMCore.a
    • -
    • libLLVMSupport.a
    • -
    • libLLVMSystem.a
    • -
    -
    libLLVMBCWriter.a
      -
    • libLLVMCore.a
    • -
    • libLLVMSupport.a
    • -
    • libLLVMSystem.a
    • -
    -
    libLLVMCodeGen.a
      -
    • libLLVMAnalysis.a
    • -
    • libLLVMCore.a
    • -
    • libLLVMScalarOpts.a
    • -
    • libLLVMSupport.a
    • -
    • libLLVMSystem.a
    • -
    • libLLVMTarget.a
    • -
    • libLLVMTransformUtils.a
    • -
    -
    libLLVMCore.a
      -
    • libLLVMSupport.a
    • -
    • libLLVMSystem.a
    • -
    -
    libLLVMDebugger.a
      -
    • libLLVMBCReader.a
    • -
    • libLLVMCore.a
    • -
    • libLLVMSupport.a
    • -
    • libLLVMSystem.a
    • -
    -
    libLLVMInstrumentation.a
      -
    • libLLVMCore.a
    • -
    • libLLVMScalarOpts.a
    • -
    • libLLVMSupport.a
    • -
    • libLLVMTransformUtils.a
    • -
    -
    libLLVMLinker.a
      -
    • libLLVMArchive.a
    • -
    • libLLVMBCReader.a
    • -
    • libLLVMCore.a
    • -
    • libLLVMSupport.a
    • -
    • libLLVMSystem.a
    • -
    -
    libLLVMScalarOpts.a
      -
    • libLLVMAnalysis.a
    • -
    • libLLVMCore.a
    • -
    • libLLVMSupport.a
    • -
    • libLLVMSystem.a
    • -
    • libLLVMTarget.a
    • -
    • libLLVMTransformUtils.a
    • -
    -
    libLLVMSelectionDAG.a
      -
    • libLLVMAnalysis.a
    • -
    • libLLVMCodeGen.a
    • -
    • libLLVMCore.a
    • -
    • libLLVMSupport.a
    • -
    • libLLVMSystem.a
    • -
    • libLLVMTarget.a
    • -
    • libLLVMTransformUtils.a
    • -
    -
    libLLVMSupport.a
      -
    • libLLVMSystem.a
    • -
    • libLLVMbzip2.a
    • -
    -
    libLLVMSystem.a
    -
    -
    libLLVMTarget.a
      -
    • libLLVMCore.a
    • -
    • libLLVMSupport.a
    • -
    • libLLVMSystem.a
    • -
    -
    libLLVMTransformUtils.a
      -
    • libLLVMAnalysis.a
    • -
    • libLLVMCore.a
    • -
    • libLLVMSupport.a
    • -
    • libLLVMSystem.a
    • -
    • libLLVMTarget.a
    • -
    • libLLVMipa.a
    • -
    -
    libLLVMbzip2.a
    -
    -
    libLLVMipa.a
      -
    • libLLVMAnalysis.a
    • -
    • libLLVMCore.a
    • -
    • libLLVMSupport.a
    • -
    • libLLVMSystem.a
    • -
    -
    libLLVMipo.a
      -
    • libLLVMAnalysis.a
    • -
    • libLLVMCore.a
    • -
    • libLLVMSupport.a
    • -
    • libLLVMSystem.a
    • -
    • libLLVMTarget.a
    • -
    • libLLVMTransformUtils.a
    • -
    • libLLVMipa.a
    • -
    -
    libLLVMlto.a
      -
    • libLLVMAnalysis.a
    • -
    • libLLVMBCReader.a
    • -
    • libLLVMBCWriter.a
    • -
    • libLLVMCore.a
    • -
    • libLLVMLinker.a
    • -
    • libLLVMScalarOpts.a
    • -
    • libLLVMSupport.a
    • -
    • libLLVMSystem.a
    • -
    • libLLVMTarget.a
    • -
    • libLLVMipa.a
    • -
    • libLLVMipo.a
    • -
    -
    LLVMARM.o
      -
    • libLLVMCodeGen.a
    • -
    • libLLVMCore.a
    • -
    • libLLVMSelectionDAG.a
    • -
    • libLLVMSupport.a
    • -
    • libLLVMSystem.a
    • -
    • libLLVMTarget.a
    • -
    -
    LLVMCBackend.o
      -
    • libLLVMAnalysis.a
    • -
    • libLLVMCodeGen.a
    • -
    • libLLVMCore.a
    • -
    • libLLVMScalarOpts.a
    • -
    • libLLVMSupport.a
    • -
    • libLLVMSystem.a
    • -
    • libLLVMTarget.a
    • -
    • libLLVMTransformUtils.a
    • -
    • libLLVMipa.a
    • -
    -
    LLVMExecutionEngine.o
      -
    • libLLVMCore.a
    • -
    • libLLVMSupport.a
    • -
    • libLLVMSystem.a
    • -
    • libLLVMTarget.a
    • -
    -
    LLVMInterpreter.o
      -
    • LLVMExecutionEngine.o
    • -
    • libLLVMCodeGen.a
    • -
    • libLLVMCore.a
    • -
    • libLLVMSupport.a
    • -
    • libLLVMSystem.a
    • -
    • libLLVMTarget.a
    • -
    -
    LLVMJIT.o
      -
    • LLVMExecutionEngine.o
    • -
    • libLLVMCore.a
    • -
    • libLLVMSupport.a
    • -
    • libLLVMSystem.a
    • -
    • libLLVMTarget.a
    • -
    -
    LLVMPowerPC.o
      -
    • libLLVMCodeGen.a
    • -
    • libLLVMCore.a
    • -
    • libLLVMSelectionDAG.a
    • -
    • libLLVMSupport.a
    • -
    • libLLVMSystem.a
    • -
    • libLLVMTarget.a
    • -
    -
    LLVMSparc.o
      -
    • libLLVMCodeGen.a
    • -
    • libLLVMCore.a
    • -
    • libLLVMSelectionDAG.a
    • -
    • libLLVMSupport.a
    • -
    • libLLVMSystem.a
    • -
    • libLLVMTarget.a
    • -
    -
    LLVMX86.o
      -
    • libLLVMCodeGen.a
    • -
    • libLLVMCore.a
    • -
    • libLLVMSelectionDAG.a
    • -
    • libLLVMSupport.a
    • -
    • libLLVMSystem.a
    • -
    • libLLVMTarget.a
    • -
    -
    -
    - - -

    Linkage Rules Of Thumb

    -
    -

    This section contains various "rules of thumb" about what files you - should link into your programs.

    - -

    - Always Link LLVMCore, LLVMSupport, and LLVMSystem -

    -
    -

    No matter what you do with LLVM, the last three entries in the value of - your LLVMLIBS make variable should always be: - LLVMCore LLVMSupport.a LLVMSystem.a. There are no LLVM - programs that don't depend on these three.

    -
    - -

    - Never link both archive and re-linked library -

    -
    -

    There is never any point to linking both the re-linked (.o) and - the archive (.a) versions of a library. Since the re-linked version - includes the entire library, the archive version will not resolve any symbols. - You could even end up with link error if you place the archive version before - the re-linked version on the linker's command line.

    -
    - -
    - - -
    - - - - Modified: llvm/trunk/docs/index.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/index.html?rev=143542&r1=143541&r2=143542&view=diff ============================================================================== --- llvm/trunk/docs/index.html (original) +++ llvm/trunk/docs/index.html Wed Nov 2 10:56:55 2011 @@ -167,9 +167,6 @@
  • Extending LLVM - Look here to see how to add instructions and intrinsics to LLVM.
  • -
  • Using LLVM Libraries - Look here to -understand how to use the libraries produced when LLVM is compiled.
  • -
  • How To Release LLVM To The Public - This is a guide to preparing LLVM releases. Most developers can ignore it.
  • From daniel at zuster.org Wed Nov 2 10:56:58 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Wed, 02 Nov 2011 15:56:58 -0000 Subject: [llvm-commits] [llvm] r143543 - /llvm/trunk/docs/index.html Message-ID: <20111102155658.E5AE22A6C12C@llvm.org> Author: ddunbar Date: Wed Nov 2 10:56:58 2011 New Revision: 143543 URL: http://llvm.org/viewvc/llvm-project?rev=143543&view=rev Log: docs: Separate development process type of documentation from programming documentation. 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=143543&r1=143542&r2=143543&view=diff ============================================================================== --- llvm/trunk/docs/index.html (original) +++ llvm/trunk/docs/index.html Wed Nov 2 10:56:58 2011 @@ -19,8 +19,9 @@
  • LLVM Design
  • LLVM Publications
  • LLVM User Guides
  • -
  • General LLVM Programming Documentation
  • +
  • LLVM Programming Documentation
  • LLVM Subsystem Documentation
  • +
  • LLVM Programming Documentation
  • LLVM Mailing Lists
  • @@ -137,7 +138,7 @@ -

    General LLVM Programming Documentation

    +

    LLVM Programming Documentation

      @@ -148,15 +149,6 @@ Introduction to the general layout of the LLVM sourcebase, important classes and APIs, and some tips & tricks. -
    • LLVM Project Guide - How-to guide and -templates for new projects that use the LLVM infrastructure. The -templates (directory organization, Makefiles, and test tree) allow the project -code to be located outside (or inside) the llvm/ tree, while using LLVM -header files and libraries.
    • - -
    • LLVM Makefile Guide - Describes how the -LLVM makefiles work and how to use them.
    • -
    • CommandLine library Reference Manual - Provides information on using the command line parsing library.
    • @@ -167,10 +159,6 @@
    • Extending LLVM - Look here to see how to add instructions and intrinsics to LLVM.
    • -
    • How To Release LLVM To The Public - This -is a guide to preparing LLVM releases. Most developers can ignore it.
    • - -
    • Doxygen generated documentation (classes) @@ -244,6 +232,25 @@
    + +

    LLVM Development Process Documentation

    + + +
      + +
    • LLVM Project Guide - How-to guide and +templates for new projects that use the LLVM infrastructure. The +templates (directory organization, Makefiles, and test tree) allow the project +code to be located outside (or inside) the llvm/ tree, while using LLVM +header files and libraries.
    • + +
    • LLVM Makefile Guide - Describes how the +LLVM makefiles work and how to use them.
    • + +
    • How To Release LLVM To The Public - This +is a guide to preparing LLVM releases. Most developers can ignore it.
    • + +

    LLVM Mailing Lists

    @@ -290,4 +297,3 @@ Last modified: $Date$ - From daniel at zuster.org Wed Nov 2 10:57:05 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Wed, 02 Nov 2011 15:57:05 -0000 Subject: [llvm-commits] [llvm] r143544 - /llvm/trunk/docs/index.html Message-ID: <20111102155705.DF07A2A6C12C@llvm.org> Author: ddunbar Date: Wed Nov 2 10:57:05 2011 New Revision: 143544 URL: http://llvm.org/viewvc/llvm-project?rev=143544&view=rev Log: docs: Remove an out-of-date and unnecessary tool list. 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=143544&r1=143543&r2=143544&view=diff ============================================================================== --- llvm/trunk/docs/index.html (original) +++ llvm/trunk/docs/index.html Wed Nov 2 10:57:05 2011 @@ -80,25 +80,7 @@ policy towards developers and their contributions.
  • LLVM Command Guide - A reference -manual for the LLVM command line utilities ("man" pages for LLVM tools).
    -Current tools: - llvm-ar, - llvm-as, - llvm-dis, - llvm-extract, - llvm-ld, - llvm-link, - llvm-nm, - llvm-prof, - llvm-ranlib, - opt, - llc, - lli, - llvm-gcc, - llvm-g++, - bugpoint, - llvm-bcanalyzer, -
  • +manual for the LLVM command line utilities ("man" pages for LLVM tools).
  • LLVM's Analysis and Transform Passes - A list of optimizations and analyses implemented in LLVM.
  • From rcsaba at gmail.com Wed Nov 2 10:18:38 2011 From: rcsaba at gmail.com (Csaba Raduly) Date: Wed, 2 Nov 2011 16:18:38 +0100 Subject: [llvm-commits] [LLVMdev] [PATCH] LLVM 3.0 broken in lib/Support/Windows/DynamicLibrary.inc In-Reply-To: References: Message-ID: Hi, On Wed, Nov 2, 2011 at 3:22 PM, Ruben Van Boxem wrote: > I don't know since when, but this file has been changed to remove all the > trickery (aka defines) needed for MinGW-w64 (and probably everything else > that as forgotten) to succesfully compile it. That line was changed in r130657: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/DynamicLibrary.inc?view=diff&r1=130656&r2=130657 > > Attached is a patch that reintroduces the compiler checking. I would like to > see this in LLVM 3.0, otherwise (by the looks of the reintroduced code) > anything newer than _MSC_VER_1500 will be broken. I believe this is not the right way to fix it. "Trickery" is in place elsewhere: $ grep WIN32_ELMCB_PCSTR -rn ../llvm/ | grep -v -- -base ../llvm/configure:19278:#define WIN32_ELMCB_PCSTR $llvm_cv_win32_elmcb_pcstr ../llvm/cmake/config-ix.cmake:370: set(WIN32_ELMCB_PCSTR "PCSTR") ../llvm/cmake/config-ix.cmake:372: set(WIN32_ELMCB_PCSTR "PSTR") ../llvm/lib/Support/Windows/DynamicLibrary.inc:46: static BOOL CALLBACK ELM_Callback(WIN32_ELMCB_PCSTR ModuleName, ../llvm/include/llvm/Config/config.h.cmake:684:#cmakedefine WIN32_ELMCB_PCSTR ${WIN32_ELMCB_PCSTR} ../llvm/include/llvm/Config/config.h.in:685:#undef WIN32_ELMCB_PCSTR ../llvm/autoconf/configure.ac:1331: AC_DEFINE_UNQUOTED([WIN32_ELMCB_PCSTR],$llvm_cv_win32_elmcb_pcstr,[Type of 1st arg on ELM Callback]) ../llvm/projects/sample/configure:19228:#define WIN32_ELMCB_PCSTR $llvm_cv_win32_elmcb_pcstr ../llvm/projects/sample/autoconf/configure.ac:1264: AC_DEFINE_UNQUOTED([WIN32_ELMCB_PCSTR],$llvm_cv_win32_elmcb_pcstr,[Type of 1st arg on ELM Callback]) I have to say that since the only difference appears to be the type of the first parameter, it is much cleaner to define a macro for it, rather than a split declaration of the entire function definition. Csaba -- GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++ The Tao of math: The numbers you can count are not the real numbers. Life is complex, with real and imaginary parts. "Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds "People disagree with me. I just ignore them." -- Linus Torvalds From daniel at zuster.org Wed Nov 2 11:23:52 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Wed, 2 Nov 2011 09:23:52 -0700 Subject: [llvm-commits] [llvm] r141977 - /llvm/trunk/utils/llvmbuild In-Reply-To: References: <20111014191237.51440312800A@llvm.org> Message-ID: Ok, keeping it in the tree is fine with me if generally useful. It seems like the main focus is to build all the LLVM compilers, what about llvm-build-all-compilers or something? Doesn't cover the test side, but gets closer. Or maybe llvm-deep-check-compilers ? - Daniel On Tue, Nov 1, 2011 at 3:17 PM, David A. Greene wrote: > Daniel Dunbar writes: > >> This script appears to be pretty specific to your workflow. While it >> looks cool, I'm not really sure it belongs where it is. > > I don't think it's specific to any particular workflow. ?Of course I > use it because I developed it but I think it will be useful to anyone. > >> I also want to take the llvm-build name, and I don't want people to be >> confused by two similarly but completely unrelated things. > > I don't mind if you rename things. > >> Do you really feel like this script is something that belongs in the >> tree? Does anyone else use it? > > I don't know if anyone else uses it, but others could benefit from it. > > The main reason I put it there was to create a standard way to build the > entire LLVM ecosystem (llvm, clang, dragonegg and dragonegg-enabled gcc) > in several different flavors (debug, release, etc.). ?This is primarily > for verifying the build and regression tests before checking something > in. ?I don't think there's any other tool in the repository that does > this. ?I find it very convenient to have a one-stop shop to verify > everything. > > So it's really more than "llvmbuild." ?It's more like "build and test > llvm lots of ways before committing changes." ?Unfortunately, I'm not > clever enough to come up with a simple name that conveys that. ?:) > >> Are you ok moving it aside and to a name that is more specific to what >> it does, instead of a the very generic llvmbuild name? > > Yeah, I have no problem with that. ?I would like to keep it in the > repository for the reasons stated above. ?Thanks for asking. > > ? ? ? ? ? ? ? ? ? ? ? ? ? -Dave > From peter_cooper at apple.com Wed Nov 2 11:26:42 2011 From: peter_cooper at apple.com (Peter Cooper) Date: Wed, 02 Nov 2011 09:26:42 -0700 Subject: [llvm-commits] patch: x86 vector udiv In-Reply-To: References: <231A30C4-BB7B-4CBE-9AAF-B34DFF405728@apple.com> Message-ID: D'oh! You're totally right. I assumed that as there's a xmm >> xmm variant of the instruction that it would shift by differing amounts for each vector field. Thanks, Pete On Nov 1, 2011, at 7:24 PM, Eli Friedman wrote: > On Tue, Nov 1, 2011 at 6:53 PM, Peter Cooper wrote: >> Ah yes thanks, i see where in InstCombine i should have put the udiv->shl change. >> >> For the vector shift case. I'm not sure why a vector shift is different in behavior to multiple scalar shifts. The only thing I can see in the ISA is that scalar shifts set the CF flag but otherwise i think they are equivalent. Can you please give more explanation on this? > > In the reg-reg form of psrld, the shift amount is a single 64-bit > integer which is used to shift every element. ISD::SHL shifts each > element independently. > > -Eli From peter_cooper at apple.com Wed Nov 2 11:27:55 2011 From: peter_cooper at apple.com (Peter Cooper) Date: Wed, 02 Nov 2011 09:27:55 -0700 Subject: [llvm-commits] patch: x86 vector udiv In-Reply-To: <4EB103E1.9010305@free.fr> References: <4EB103E1.9010305@free.fr> Message-ID: Hi Duncan Yeah, Eli suggested instcombine which having looked at it makes much more sense. I'll reimplement it there and send round another patch. Thanks, Pete On Nov 2, 2011, at 1:48 AM, Duncan Sands wrote: > Hi Peter, > >> Please review this patch for pr8429 to turn vector udiv into vector shrl instructions when dividing by powers of 2. This was already done on scalars but not on vectors. > > shouldn't the IR level optimizers be doing this? > > Ciao, Duncan. > >> >> I also found that vector shifts were always scalarised on x86 even with SSE on so i turned these into the equivalent intrinsics. >> >> Thanks, >> Pete >> >> >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From chandlerc at gmail.com Wed Nov 2 11:55:58 2011 From: chandlerc at gmail.com (Chandler Carruth) Date: Wed, 02 Nov 2011 16:55:58 -0000 Subject: [llvm-commits] [llvm] r143545 - /llvm/trunk/cmake/modules/TableGen.cmake Message-ID: <20111102165558.308CA2A6C12C@llvm.org> Author: chandlerc Date: Wed Nov 2 11:55:57 2011 New Revision: 143545 URL: http://llvm.org/viewvc/llvm-project?rev=143545&view=rev Log: Fix a typo noticed by Peter Collingbourne. No one depends on this working today, but it shouldn't corrupt state for some poor soul to debug later. Modified: llvm/trunk/cmake/modules/TableGen.cmake Modified: llvm/trunk/cmake/modules/TableGen.cmake URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/TableGen.cmake?rev=143545&r1=143544&r2=143545&view=diff ============================================================================== --- llvm/trunk/cmake/modules/TableGen.cmake (original) +++ llvm/trunk/cmake/modules/TableGen.cmake Wed Nov 2 11:55:57 2011 @@ -79,7 +79,7 @@ set(${target}_OLD_LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS}) set(LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS} TableGen) add_llvm_utility(${target} ${ARGN}) - set(LLVM_LINK_COMPONENTS ${target}_OLD_LLVM_LINK_COMPONENTS) + set(LLVM_LINK_COMPONENTS ${${target}_OLD_LLVM_LINK_COMPONENTS}) set(${project}_TABLEGEN "${target}" CACHE STRING "Native TableGen executable. Saves building one when cross-compiling.") From chandlerc at gmail.com Wed Nov 2 11:58:27 2011 From: chandlerc at gmail.com (Chandler Carruth) Date: Wed, 2 Nov 2011 09:58:27 -0700 Subject: [llvm-commits] [llvm] r143531 - in /llvm/trunk: cmake/modules/TableGen.cmake utils/TableGen/CMakeLists.txt In-Reply-To: <20111102125726.GA28946@pcc.me.uk> References: <20111102050306.6B5322A6C12C@llvm.org> <20111102125726.GA28946@pcc.me.uk> Message-ID: On Wed, Nov 2, 2011 at 5:57 AM, Peter Collingbourne wrote: > On Wed, Nov 02, 2011 at 05:03:06AM -0000, Chandler Carruth wrote: > > + set(LLVM_LINK_COMPONENTS ${target}_OLD_LLVM_LINK_COMPONENTS) > > Shouldn't this be: > set(LLVM_LINK_COMPONENTS ${${target}_OLD_LLVM_LINK_COMPONENTS}) > ? > Doh, good catch. Thanks! Not surprisingly, nothing *currently* depends on this, but it should Just Work if they ever do. Fixed in r143545. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111102/531033f4/attachment.html From howarth at bromo.med.uc.edu Wed Nov 2 11:51:29 2011 From: howarth at bromo.med.uc.edu (Jack Howarth) Date: Wed, 2 Nov 2011 12:51:29 -0400 Subject: [llvm-commits] cmakbuild failures on installing llvm-config Message-ID: <20111102165129.GA12838@bromo.med.uc.edu> On x86_64-apple-darwin11, I am seeing a build failure using cmake at... -- Installing: /sw/src/fink.build/root-llvm31-3.1-0/sw/opt/llvm-3.1/lib/libLLVMX86Info.a -- Installing: /sw/src/fink.build/root-llvm31-3.1-0/sw/opt/llvm-3.1/lib/libLLVMX86Utils.a -- Installing: /sw/src/fink.build/root-llvm31-3.1-0/sw/opt/llvm-3.1/lib/libLLVMAsmParser.a -- Installing: /sw/src/fink.build/root-llvm31-3.1-0/sw/opt/llvm-3.1/lib/libLLVMArchive.a -- Installing: /sw/src/fink.build/root-llvm31-3.1-0/sw/opt/llvm-3.1/bin/llvm-lit CMake Error at tools/llvm-config/cmake_install.cmake:31 (FILE): file INSTALL cannot find "/sw/src/fink.build/llvm31-3.1-0/llvm-3.1/build/bin/llvm-config". Call Stack (most recent call first): tools/cmake_install.cmake:32 (INCLUDE) cmake_install.cmake:51 (INCLUDE) make: *** [install/fast] Error 1 when using... cmake DLLVM_BUILD_32_BITS:BOOL=OFF -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_INSTALL_PREFIX=/sw/opt/llvm-3.1 -DLLVM_ENABLE_ASSERTIONS=OFF -DCMAKE_BUILD_TYPE=Release .. Is anyone else seeing this breakage? Seems related to the recent commits... r143541 | ddunbar | 2011-11-02 11:56:52 -0400 (Wed, 02 Nov 2011) | 1 line build/Make: Get rid of llvm-config-perobj, which isn't used anymore. ------------------------------------------------------------------------ r143540 | ddunbar | 2011-11-02 11:56:38 -0400 (Wed, 02 Nov 2011) | 2 lines build/CMake: Remove llvm-config.target used to serialize tool builds on llvm-config build, there is no longer a point to this after Chandler's work. From chandlerc at google.com Wed Nov 2 12:18:59 2011 From: chandlerc at google.com (Chandler Carruth) Date: Wed, 2 Nov 2011 10:18:59 -0700 Subject: [llvm-commits] [llvm] r143540 - /llvm/trunk/tools/llvm-config/CMakeLists.txt In-Reply-To: <20111102155638.CF3102A6C12C@llvm.org> References: <20111102155638.CF3102A6C12C@llvm.org> Message-ID: I think this line is still necessary to cause llvm-config to be built at all; otherwise nothing depends on it. I'm going to add it back to address problems reported with CMake install. On Wed, Nov 2, 2011 at 8:56 AM, Daniel Dunbar wrote: > -add_custom_target(llvm-config.target ALL > - DEPENDS ${LLVM_CONFIG}) > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111102/cae42555/attachment.html From chandlerc at google.com Wed Nov 2 12:19:32 2011 From: chandlerc at google.com (Chandler Carruth) Date: Wed, 2 Nov 2011 10:19:32 -0700 Subject: [llvm-commits] cmakbuild failures on installing llvm-config In-Reply-To: <20111102165129.GA12838@bromo.med.uc.edu> References: <20111102165129.GA12838@bromo.med.uc.edu> Message-ID: On Wed, Nov 2, 2011 at 9:51 AM, Jack Howarth wrote: > On x86_64-apple-darwin11, I am seeing a build failure using cmake at... > > -- Installing: > /sw/src/fink.build/root-llvm31-3.1-0/sw/opt/llvm-3.1/lib/libLLVMX86Info.a > -- Installing: > /sw/src/fink.build/root-llvm31-3.1-0/sw/opt/llvm-3.1/lib/libLLVMX86Utils.a > -- Installing: > /sw/src/fink.build/root-llvm31-3.1-0/sw/opt/llvm-3.1/lib/libLLVMAsmParser.a > -- Installing: > /sw/src/fink.build/root-llvm31-3.1-0/sw/opt/llvm-3.1/lib/libLLVMArchive.a > -- Installing: > /sw/src/fink.build/root-llvm31-3.1-0/sw/opt/llvm-3.1/bin/llvm-lit > CMake Error at tools/llvm-config/cmake_install.cmake:31 (FILE): > file INSTALL cannot find > "/sw/src/fink.build/llvm31-3.1-0/llvm-3.1/build/bin/llvm-config". > Call Stack (most recent call first): > tools/cmake_install.cmake:32 (INCLUDE) > cmake_install.cmake:51 (INCLUDE) > > > make: *** [install/fast] Error 1 > > when using... > > cmake DLLVM_BUILD_32_BITS:BOOL=OFF -DLLVM_TARGETS_TO_BUILD=X86 > -DCMAKE_INSTALL_PREFIX=/sw/opt/llvm-3.1 -DLLVM_ENABLE_ASSERTIONS=OFF > -DCMAKE_BUILD_TYPE=Release .. > > Is anyone else seeing this breakage? Seems related to the recent commits... > > r143541 | ddunbar | 2011-11-02 11:56:52 -0400 (Wed, 02 Nov 2011) | 1 line > > build/Make: Get rid of llvm-config-perobj, which isn't used anymore. > ------------------------------------------------------------------------ > r143540 | ddunbar | 2011-11-02 11:56:38 -0400 (Wed, 02 Nov 2011) | 2 lines > > build/CMake: Remove llvm-config.target used to serialize tool builds on > llvm-config build, there is no longer a point to this after Chandler's > work. > I think it is this last one. I've replied to the commit and am testing out a fix (a partial revert, i think one too many things got nuked). -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111102/02367c76/attachment.html From atrick at apple.com Wed Nov 2 12:19:58 2011 From: atrick at apple.com (Andrew Trick) Date: Wed, 02 Nov 2011 17:19:58 -0000 Subject: [llvm-commits] [llvm] r143546 - in /llvm/trunk: lib/Transforms/Scalar/IndVarSimplify.cpp test/Transforms/IndVarSimplify/2011-11-01-lftrptr.ll Message-ID: <20111102171958.307DB2A6C12C@llvm.org> Author: atrick Date: Wed Nov 2 12:19:57 2011 New Revision: 143546 URL: http://llvm.org/viewvc/llvm-project?rev=143546&view=rev Log: Rewrite LinearFunctionTestReplace to handle pointer-type IVs. We've been hitting asserts in this code due to the many supported combintions of modes (iv-rewrite/no-iv-rewrite) and IV types. This second rewrite of the code attempts to deal with these cases systematically. Modified: llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp llvm/trunk/test/Transforms/IndVarSimplify/2011-11-01-lftrptr.ll Modified: llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp?rev=143546&r1=143545&r2=143546&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp Wed Nov 2 12:19:57 2011 @@ -1278,6 +1278,16 @@ /// canExpandBackedgeTakenCount - Return true if this loop's backedge taken /// count expression can be safely and cheaply expanded into an instruction /// sequence that can be used by LinearFunctionTestReplace. +/// +/// TODO: This fails for pointer-type loop counters with greater than one byte +/// strides, consequently preventing LFTR from running. For the purpose of LFTR +/// we could skip this check in the case that the LFTR loop counter (chosen by +/// FindLoopCounter) is also pointer type. Instead, we could directly convert +/// the loop test to an inequality test by checking the target data's alignment +/// of element types (given that the initial pointer value originates from or is +/// used by ABI constrained operation, as opposed to inttoptr/ptrtoint). +/// However, we don't yet have a strong motivation for converting loop tests +/// into inequality tests. static bool canExpandBackedgeTakenCount(Loop *L, ScalarEvolution *SE) { const SCEV *BackedgeTakenCount = SE->getBackedgeTakenCount(L); if (isa(BackedgeTakenCount) || @@ -1429,6 +1439,10 @@ /// FindLoopCounter - Find an affine IV in canonical form. /// +/// BECount may be an i8* pointer type. The pointer difference is already +/// valid count without scaling the address stride, so it remains a pointer +/// expression as far as SCEV is concerned. +/// /// FIXME: Accept -1 stride and set IVLimit = IVInit - BECount /// /// FIXME: Accept non-unit stride as long as SCEV can reduce BECount * Stride. @@ -1437,11 +1451,6 @@ static PHINode * FindLoopCounter(Loop *L, const SCEV *BECount, ScalarEvolution *SE, DominatorTree *DT, const TargetData *TD) { - // I'm not sure how BECount could be a pointer type, but we definitely don't - // want to LFTR that. - if (BECount->getType()->isPointerTy()) - return 0; - uint64_t BCWidth = SE->getTypeSizeInBits(BECount->getType()); Value *Cond = @@ -1458,6 +1467,10 @@ if (!SE->isSCEVable(Phi->getType())) continue; + // Avoid comparing an integer IV against a pointer Limit. + if (BECount->getType()->isPointerTy() && !Phi->getType()->isPointerTy()) + continue; + const SCEVAddRecExpr *AR = dyn_cast(SE->getSCEV(Phi)); if (!AR || AR->getLoop() != L || !AR->isAffine()) continue; @@ -1503,6 +1516,82 @@ return BestPhi; } +/// genLoopLimit - Help LinearFunctionTestReplace by generating a value that +/// holds the RHS of the new loop test. +static Value *genLoopLimit(PHINode *IndVar, const SCEV *IVCount, Loop *L, + SCEVExpander &Rewriter, ScalarEvolution *SE) { + const SCEVAddRecExpr *AR = dyn_cast(SE->getSCEV(IndVar)); + assert(AR && AR->getLoop() == L && AR->isAffine() && "bad loop counter"); + const SCEV *IVInit = AR->getStart(); + + // IVInit may be a pointer while IVCount is an integer when FindLoopCounter + // finds a valid pointer IV. Sign extend BECount in order to materialize a + // GEP. Avoid running SCEVExpander on a new pointer value, instead reusing + // the existing GEPs whenever possible. + if (IndVar->getType()->isPointerTy() + && !IVCount->getType()->isPointerTy()) { + + Type *OfsTy = SE->getEffectiveSCEVType(IVInit->getType()); + const SCEV *IVOffset = SE->getTruncateOrSignExtend(IVCount, OfsTy); + + // Expand the code for the iteration count. + assert(SE->isLoopInvariant(IVOffset, L) && + "Computed iteration count is not loop invariant!"); + BranchInst *BI = cast(L->getExitingBlock()->getTerminator()); + Value *GEPOffset = Rewriter.expandCodeFor(IVOffset, OfsTy, BI); + + Value *GEPBase = IndVar->getIncomingValueForBlock(L->getLoopPreheader()); + assert(AR->getStart() == SE->getSCEV(GEPBase) && "bad loop counter"); + // We could handle pointer IVs other than i8*, but we need to compensate for + // gep index scaling. See canExpandBackedgeTakenCount comments. + assert(SE->getSizeOfExpr( + cast(GEPBase->getType())->getElementType())->isOne() + && "unit stride pointer IV must be i8*"); + + IRBuilder<> Builder(L->getLoopPreheader()->getTerminator()); + return Builder.CreateGEP(GEPBase, GEPOffset, "lftr.limit"); + } + else { + // In any other case, convert both IVInit and IVCount to integers before + // comparing. This may result in SCEV expension of pointers, but in practice + // SCEV will fold the pointer arithmetic away as such: + // BECount = (IVEnd - IVInit - 1) => IVLimit = IVInit (postinc). + // + // Valid Cases: (1) both integers is most common; (2) both may be pointers + // for simple memset-style loops; (3) IVInit is an integer and IVCount is a + // pointer may occur when enable-iv-rewrite generates a canonical IV on top + // of case #2. + + const SCEV *IVLimit = 0; + // For unit stride, IVCount = Start + BECount with 2's complement overflow. + // For non-zero Start, compute IVCount here. + if (AR->getStart()->isZero()) + IVLimit = IVCount; + else { + assert(AR->getStepRecurrence(*SE)->isOne() && "only handles unit stride"); + const SCEV *IVInit = AR->getStart(); + + // For integer IVs, truncate the IV before computing IVInit + BECount. + if (SE->getTypeSizeInBits(IVInit->getType()) + > SE->getTypeSizeInBits(IVCount->getType())) + IVInit = SE->getTruncateExpr(IVInit, IVCount->getType()); + + IVLimit = SE->getAddExpr(IVInit, IVCount); + } + // Expand the code for the iteration count. + BranchInst *BI = cast(L->getExitingBlock()->getTerminator()); + IRBuilder<> Builder(BI); + assert(SE->isLoopInvariant(IVLimit, L) && + "Computed iteration count is not loop invariant!"); + // Ensure that we generate the same type as IndVar, or a smaller integer + // type. In the presence of null pointer values, we have an integer type + // SCEV expression (IVInit) for a pointer type IV value (IndVar). + Type *LimitTy = IVCount->getType()->isPointerTy() ? + IndVar->getType() : IVCount->getType(); + return Rewriter.expandCodeFor(IVLimit, LimitTy, BI); + } +} + /// LinearFunctionTestReplace - This method rewrites the exit condition of the /// loop to be a canonical != comparison against the incremented loop induction /// variable. This pass is able to rewrite the exit tests of any loop where the @@ -1514,37 +1603,36 @@ PHINode *IndVar, SCEVExpander &Rewriter) { assert(canExpandBackedgeTakenCount(L, SE) && "precondition"); - BranchInst *BI = cast(L->getExitingBlock()->getTerminator()); // LFTR can ignore IV overflow and truncate to the width of // BECount. This avoids materializing the add(zext(add)) expression. Type *CntTy = !EnableIVRewrite ? BackedgeTakenCount->getType() : IndVar->getType(); - const SCEV *IVLimit = BackedgeTakenCount; + const SCEV *IVCount = BackedgeTakenCount; - // If the exiting block is not the same as the backedge block, we must compare - // against the preincremented value, otherwise we prefer to compare against - // the post-incremented value. + // If the exiting block is the same as the backedge block, we prefer to + // compare against the post-incremented value, otherwise we must compare + // against the preincremented value. Value *CmpIndVar; if (L->getExitingBlock() == L->getLoopLatch()) { // Add one to the "backedge-taken" count to get the trip count. // If this addition may overflow, we have to be more pessimistic and // cast the induction variable before doing the add. const SCEV *N = - SE->getAddExpr(IVLimit, SE->getConstant(IVLimit->getType(), 1)); - if (CntTy == IVLimit->getType()) - IVLimit = N; + SE->getAddExpr(IVCount, SE->getConstant(IVCount->getType(), 1)); + if (CntTy == IVCount->getType()) + IVCount = N; else { - const SCEV *Zero = SE->getConstant(IVLimit->getType(), 0); + const SCEV *Zero = SE->getConstant(IVCount->getType(), 0); if ((isa(N) && !N->isZero()) || SE->isLoopEntryGuardedByCond(L, ICmpInst::ICMP_NE, N, Zero)) { // No overflow. Cast the sum. - IVLimit = SE->getTruncateOrZeroExtend(N, CntTy); + IVCount = SE->getTruncateOrZeroExtend(N, CntTy); } else { // Potential overflow. Cast before doing the add. - IVLimit = SE->getTruncateOrZeroExtend(IVLimit, CntTy); - IVLimit = SE->getAddExpr(IVLimit, SE->getConstant(CntTy, 1)); + IVCount = SE->getTruncateOrZeroExtend(IVCount, CntTy); + IVCount = SE->getAddExpr(IVCount, SE->getConstant(CntTy, 1)); } } // The BackedgeTaken expression contains the number of times that the @@ -1552,64 +1640,17 @@ // number of times the loop executes, so use the incremented indvar. CmpIndVar = IndVar->getIncomingValueForBlock(L->getExitingBlock()); } else { - // We have to use the preincremented value... - IVLimit = SE->getTruncateOrZeroExtend(IVLimit, CntTy); + // We must use the preincremented value... + IVCount = SE->getTruncateOrZeroExtend(IVCount, CntTy); CmpIndVar = IndVar; } - // For unit stride, IVLimit = Start + BECount with 2's complement overflow. - // So for non-zero start compute the IVLimit here. - Type *CmpTy = CntTy; - const SCEVAddRecExpr *AR = dyn_cast(SE->getSCEV(IndVar)); - assert(AR && AR->getLoop() == L && AR->isAffine() && "bad loop counter"); - if (!AR->getStart()->isZero()) { - assert(AR->getStepRecurrence(*SE)->isOne() && "only handles unit stride"); - const SCEV *IVInit = AR->getStart(); - - // For pointer types, sign extend BECount in order to materialize a GEP. - // Note that for without EnableIVRewrite, we never run SCEVExpander on a - // pointer type, because we must preserve the existing GEPs. Instead we - // directly generate a GEP later. - if (CmpIndVar->getType()->isPointerTy()) { - CmpTy = SE->getEffectiveSCEVType(IVInit->getType()); - IVLimit = SE->getTruncateOrSignExtend(IVLimit, CmpTy); - } - // For integer types, truncate the IV before computing IVInit + BECount. - else { - if (SE->getTypeSizeInBits(IVInit->getType()) - > SE->getTypeSizeInBits(CmpTy)) - IVInit = SE->getTruncateExpr(IVInit, CmpTy); - - IVLimit = SE->getAddExpr(IVInit, IVLimit); - } - } - // Expand the code for the iteration count. - IRBuilder<> Builder(BI); - - assert(SE->isLoopInvariant(IVLimit, L) && - "Computed iteration count is not loop invariant!"); - assert((EnableIVRewrite || !IVLimit->getType()->isPointerTy()) && - "Should not expand pointer types" ); - Value *ExitCnt = Rewriter.expandCodeFor(IVLimit, CmpTy, BI); - - // Create a gep for IVInit + IVLimit from on an existing pointer base. - // - // In the presence of null pointer values, the SCEV expression may be an - // integer type while the IV is a pointer type. Ensure that the compare - // operands are always the same type by checking the IV type here. - if (CmpIndVar->getType()->isPointerTy()) { - Value *IVStart = IndVar->getIncomingValueForBlock(L->getLoopPreheader()); - assert(AR->getStart() == SE->getSCEV(IVStart) && "bad loop counter"); - assert(SE->getSizeOfExpr( - cast(IVStart->getType())->getElementType())->isOne() - && "unit stride pointer IV must be i8*"); - - Builder.SetInsertPoint(L->getLoopPreheader()->getTerminator()); - ExitCnt = Builder.CreateGEP(IVStart, ExitCnt, "lftr.limit"); - Builder.SetInsertPoint(BI); - } + Value *ExitCnt = genLoopLimit(IndVar, IVCount, L, Rewriter, SE); + assert(ExitCnt->getType()->isPointerTy() == IndVar->getType()->isPointerTy() + && "genLoopLimit missed a cast"); // Insert a new icmp_ne or icmp_eq instruction before the branch. + BranchInst *BI = cast(L->getExitingBlock()->getTerminator()); ICmpInst::Predicate P; if (L->contains(BI->getSuccessor(0))) P = ICmpInst::ICMP_NE; @@ -1621,11 +1662,13 @@ << " op:\t" << (P == ICmpInst::ICMP_NE ? "!=" : "==") << "\n" << " RHS:\t" << *ExitCnt << "\n" - << " Expr:\t" << *IVLimit << "\n"); + << " IVCount:\t" << *IVCount << "\n"); + IRBuilder<> Builder(BI); if (SE->getTypeSizeInBits(CmpIndVar->getType()) - > SE->getTypeSizeInBits(CmpTy)) { - CmpIndVar = Builder.CreateTrunc(CmpIndVar, CmpTy, "lftr.wideiv"); + > SE->getTypeSizeInBits(ExitCnt->getType())) { + CmpIndVar = Builder.CreateTrunc(CmpIndVar, ExitCnt->getType(), + "lftr.wideiv"); } Value *Cond = Builder.CreateICmp(P, CmpIndVar, ExitCnt, "exitcond"); Modified: llvm/trunk/test/Transforms/IndVarSimplify/2011-11-01-lftrptr.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/IndVarSimplify/2011-11-01-lftrptr.ll?rev=143546&r1=143545&r2=143546&view=diff ============================================================================== --- llvm/trunk/test/Transforms/IndVarSimplify/2011-11-01-lftrptr.ll (original) +++ llvm/trunk/test/Transforms/IndVarSimplify/2011-11-01-lftrptr.ll Wed Nov 2 12:19:57 2011 @@ -1,21 +1,45 @@ -; RUN: opt < %s -indvars -S -enable-iv-rewrite=true | FileCheck %s +; RUN: opt < %s -indvars -S -enable-iv-rewrite=false "-default-data-layout=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" | FileCheck %s +; RUN: opt < %s -indvars -S -enable-iv-rewrite=true "-default-data-layout=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" | FileCheck %s +; RUN: opt < %s -indvars -S -enable-iv-rewrite=false "-default-data-layout=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-n8:16:32" | FileCheck %s +; RUN: opt < %s -indvars -S -enable-iv-rewrite=true "-default-data-layout=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-n8:16:32" | FileCheck %s ; ; PR11279: Assertion !IVLimit->getType()->isPointerTy() ; -; Test a non-integer BECount. It doesn't make sense, but that's what -; falls out of SCEV. Since it's an i8*, we never adjust in a way that -; would convert it to an integer type. -; -; enable-iv-rewrite=false does not currently perform LFTR when the the -; taken count is a pointer expression, but that will change son. +; Test LinearFunctionTestReplace of a pointer-type loop counter. Note +; that BECount may or may not be a pointer type. A pointer type +; BECount doesn't really make sense, but that's what falls out of +; SCEV. Since it's an i8*, it has unit stride so we never adjust the +; SCEV expression in a way that would convert it to an integer type. + +; CHECK: @testnullptrptr +; CHECK: loop: +; CHECK: icmp ne +define i8 @testnullptrptr(i8* %buf, i8* %end) nounwind { + br label %loopguard + +loopguard: + %guard = icmp ult i8* null, %end + br i1 %guard, label %preheader, label %exit + +preheader: + br label %loop + +loop: + %p.01.us.us = phi i8* [ null, %preheader ], [ %gep, %loop ] + %s = phi i8 [0, %preheader], [%snext, %loop] + %gep = getelementptr inbounds i8* %p.01.us.us, i64 1 + %snext = load i8* %gep + %cmp = icmp ult i8* %gep, %end + br i1 %cmp, label %loop, label %exit -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-darwin" +exit: + ret i8 %snext +} -; CHECK: @test8 +; CHECK: @testptrptr ; CHECK: loop: ; CHECK: icmp ne -define i8 @test8(i8* %buf, i8* %end) nounwind { +define i8 @testptrptr(i8* %buf, i8* %end) nounwind { br label %loopguard loopguard: @@ -36,3 +60,83 @@ exit: ret i8 %snext } + +; CHECK: @testnullptrint +; CHECK: loop: +; CHECK: icmp ne +define i8 @testnullptrint(i8* %buf, i8* %end) nounwind { + br label %loopguard + +loopguard: + %bi = ptrtoint i8* %buf to i32 + %ei = ptrtoint i8* %end to i32 + %cnt = sub i32 %ei, %bi + %guard = icmp ult i32 0, %cnt + br i1 %guard, label %preheader, label %exit + +preheader: + br label %loop + +loop: + %p.01.us.us = phi i8* [ null, %preheader ], [ %gep, %loop ] + %iv = phi i32 [ 0, %preheader ], [ %ivnext, %loop ] + %s = phi i8 [0, %preheader], [%snext, %loop] + %gep = getelementptr inbounds i8* %p.01.us.us, i64 1 + %snext = load i8* %gep + %ivnext = add i32 %iv, 1 + %cmp = icmp ult i32 %ivnext, %cnt + br i1 %cmp, label %loop, label %exit + +exit: + ret i8 %snext +} + +; CHECK: @testptrint +; CHECK: loop: +; CHECK: icmp ne +define i8 @testptrint(i8* %buf, i8* %end) nounwind { + br label %loopguard + +loopguard: + %bi = ptrtoint i8* %buf to i32 + %ei = ptrtoint i8* %end to i32 + %cnt = sub i32 %ei, %bi + %guard = icmp ult i32 %bi, %cnt + br i1 %guard, label %preheader, label %exit + +preheader: + br label %loop + +loop: + %p.01.us.us = phi i8* [ %buf, %preheader ], [ %gep, %loop ] + %iv = phi i32 [ %bi, %preheader ], [ %ivnext, %loop ] + %s = phi i8 [0, %preheader], [%snext, %loop] + %gep = getelementptr inbounds i8* %p.01.us.us, i64 1 + %snext = load i8* %gep + %ivnext = add i32 %iv, 1 + %cmp = icmp ult i32 %ivnext, %cnt + br i1 %cmp, label %loop, label %exit + +exit: + ret i8 %snext +} + +; IV and BECount have two different pointer types here. +define void @testnullptr([512 x i8]* %base) nounwind { +entry: + %add.ptr1603 = getelementptr [512 x i8]* %base, i64 0, i64 512 + br label %preheader + +preheader: + %cmp1604192 = icmp ult i8* undef, %add.ptr1603 + br i1 %cmp1604192, label %for.body, label %for.end1609 + +for.body: + %r.17193 = phi i8* [ %incdec.ptr1608, %for.body ], [ null, %preheader ] + %incdec.ptr1608 = getelementptr i8* %r.17193, i64 1 + %cmp1604 = icmp ult i8* %incdec.ptr1608, %add.ptr1603 + br i1 %cmp1604, label %for.body, label %for.end1609 + +for.end1609: + unreachable +} From mcrosier at apple.com Wed Nov 2 12:20:24 2011 From: mcrosier at apple.com (Chad Rosier) Date: Wed, 02 Nov 2011 17:20:24 -0000 Subject: [llvm-commits] [llvm] r143547 - /llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Message-ID: <20111102172024.6C67D2A6C12C@llvm.org> Author: mcrosier Date: Wed Nov 2 12:20:24 2011 New Revision: 143547 URL: http://llvm.org/viewvc/llvm-project?rev=143547&view=rev Log: Factor out an EmitIntExt function. No functionality change intended. Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMFastISel.cpp?rev=143547&r1=143546&r2=143547&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMFastISel.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Wed Nov 2 12:20:24 2011 @@ -179,6 +179,7 @@ bool ARMEmitStore(EVT VT, unsigned SrcReg, Address &Addr); bool ARMComputeAddress(const Value *Obj, Address &Addr); void ARMSimplifyAddress(Address &Addr, EVT VT); + unsigned ARMEmitIntExt(EVT SrcVT, unsigned SrcReg, EVT DestVT, bool isZExt); unsigned ARMMaterializeFP(const ConstantFP *CFP, EVT VT); unsigned ARMMaterializeInt(const Constant *C, EVT VT); unsigned ARMMaterializeGV(const GlobalValue *GV, EVT VT); @@ -1987,66 +1988,71 @@ return true; } -bool ARMFastISel::SelectIntExt(const Instruction *I) { - // On ARM, in general, integer casts don't involve legal types; this code - // handles promotable integers. The high bits for a type smaller than - // the register size are assumed to be undefined. - Type *DestTy = I->getType(); - Value *Op = I->getOperand(0); - Type *SrcTy = Op->getType(); - - EVT SrcVT, DestVT; - SrcVT = TLI.getValueType(SrcTy, true); - DestVT = TLI.getValueType(DestTy, true); - +unsigned ARMFastISel::ARMEmitIntExt(EVT SrcVT, unsigned SrcReg, EVT DestVT, + bool isZExt) { if (DestVT != MVT::i32 && DestVT != MVT::i16 && DestVT != MVT::i8) - return false; + return 0; unsigned Opc; - bool isZext = isa(I); bool isBoolZext = false; - if (!SrcVT.isSimple()) - return false; + if (!SrcVT.isSimple()) return 0; switch (SrcVT.getSimpleVT().SimpleTy) { - default: return false; + default: return 0; case MVT::i16: - if (!Subtarget->hasV6Ops()) return false; - if (isZext) + if (!Subtarget->hasV6Ops()) return 0; + if (isZExt) Opc = isThumb ? ARM::t2UXTH : ARM::UXTH; else Opc = isThumb ? ARM::t2SXTH : ARM::SXTH; break; case MVT::i8: - if (!Subtarget->hasV6Ops()) return false; - if (isZext) + if (!Subtarget->hasV6Ops()) return 0; + if (isZExt) Opc = isThumb ? ARM::t2UXTB : ARM::UXTB; else Opc = isThumb ? ARM::t2SXTB : ARM::SXTB; break; case MVT::i1: - if (isZext) { + if (isZExt) { Opc = isThumb ? ARM::t2ANDri : ARM::ANDri; isBoolZext = true; break; } - return false; + return 0; } - // FIXME: We could save an instruction in many cases by special-casing - // load instructions. - unsigned SrcReg = getRegForValue(Op); - if (!SrcReg) return false; - - unsigned DestReg = createResultReg(TLI.getRegClassFor(MVT::i32)); + unsigned ResultReg = createResultReg(TLI.getRegClassFor(MVT::i32)); MachineInstrBuilder MIB; - MIB = BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, TII.get(Opc), DestReg) + MIB = BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, TII.get(Opc), ResultReg) .addReg(SrcReg); if (isBoolZext) MIB.addImm(1); else MIB.addImm(0); AddOptionalDefs(MIB); - UpdateValueMap(I, DestReg); + return ResultReg; +} + +bool ARMFastISel::SelectIntExt(const Instruction *I) { + // On ARM, in general, integer casts don't involve legal types; this code + // handles promotable integers. + // FIXME: We could save an instruction in many cases by special-casing + // load instructions. + Type *DestTy = I->getType(); + Value *Src = I->getOperand(0); + Type *SrcTy = Src->getType(); + + EVT SrcVT, DestVT; + SrcVT = TLI.getValueType(SrcTy, true); + DestVT = TLI.getValueType(DestTy, true); + + bool isZExt = isa(I); + unsigned SrcReg = getRegForValue(Src); + if (!SrcReg) return false; + + unsigned ResultReg = ARMEmitIntExt(SrcVT, SrcReg, DestVT, isZExt); + if (ResultReg == 0) return false; + UpdateValueMap(I, ResultReg); return true; } From chandlerc at gmail.com Wed Nov 2 12:22:57 2011 From: chandlerc at gmail.com (Chandler Carruth) Date: Wed, 02 Nov 2011 17:22:57 -0000 Subject: [llvm-commits] [llvm] r143548 - /llvm/trunk/tools/llvm-config/CMakeLists.txt Message-ID: <20111102172257.8764D2A6C12C@llvm.org> Author: chandlerc Date: Wed Nov 2 12:22:57 2011 New Revision: 143548 URL: http://llvm.org/viewvc/llvm-project?rev=143548&view=rev Log: Add back the top-level target for 'llvm-config' and the dependency edge to force it to build after all library targets so it has complete dependency information. This should fix broken 'make install' with CMake. This is a partial revert of r143540, but it doesn't revert the most important part of that change: removing the dependency edge from LLVM tools to the llvm-config script. Modified: llvm/trunk/tools/llvm-config/CMakeLists.txt Modified: llvm/trunk/tools/llvm-config/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-config/CMakeLists.txt?rev=143548&r1=143547&r2=143548&view=diff ============================================================================== --- llvm/trunk/tools/llvm-config/CMakeLists.txt (original) +++ llvm/trunk/tools/llvm-config/CMakeLists.txt Wed Nov 2 12:22:57 2011 @@ -125,6 +125,13 @@ COMMENT "Building llvm-config script." ) +add_custom_target(llvm-config.target ALL + DEPENDS ${LLVM_CONFIG}) + +# Ensure we build llvm-config after we build all of the libraries so that we +# have their full dependencies. +add_dependencies(llvm-config.target ${llvm_libs}) + install(FILES ${LLVM_CONFIG} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE From chandlerc at google.com Wed Nov 2 12:26:13 2011 From: chandlerc at google.com (Chandler Carruth) Date: Wed, 2 Nov 2011 10:26:13 -0700 Subject: [llvm-commits] [llvm] r143540 - /llvm/trunk/tools/llvm-config/CMakeLists.txt In-Reply-To: References: <20111102155638.CF3102A6C12C@llvm.org> Message-ID: On Wed, Nov 2, 2011 at 10:18 AM, Chandler Carruth wrote: > I think this line is still necessary to cause llvm-config to be built at > all; otherwise nothing depends on it. I'm going to add it back to address > problems reported with CMake install. Yea, testing showed that we still need the target, and also still need the libs -> target dependency edge to ensure proper ordering. Removing the modification of COMMON_DEPENDS is all good though. See r143548 for the changes I made. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111102/5b8e5de6/attachment.html From chandlerc at google.com Wed Nov 2 12:26:32 2011 From: chandlerc at google.com (Chandler Carruth) Date: Wed, 2 Nov 2011 10:26:32 -0700 Subject: [llvm-commits] cmakbuild failures on installing llvm-config In-Reply-To: References: <20111102165129.GA12838@bromo.med.uc.edu> Message-ID: On Wed, Nov 2, 2011 at 10:19 AM, Chandler Carruth wrote: > > On Wed, Nov 2, 2011 at 9:51 AM, Jack Howarth wrote: > >> On x86_64-apple-darwin11, I am seeing a build failure using cmake at... >> >> -- Installing: >> /sw/src/fink.build/root-llvm31-3.1-0/sw/opt/llvm-3.1/lib/libLLVMX86Info.a >> -- Installing: >> /sw/src/fink.build/root-llvm31-3.1-0/sw/opt/llvm-3.1/lib/libLLVMX86Utils.a >> -- Installing: >> /sw/src/fink.build/root-llvm31-3.1-0/sw/opt/llvm-3.1/lib/libLLVMAsmParser.a >> -- Installing: >> /sw/src/fink.build/root-llvm31-3.1-0/sw/opt/llvm-3.1/lib/libLLVMArchive.a >> -- Installing: >> /sw/src/fink.build/root-llvm31-3.1-0/sw/opt/llvm-3.1/bin/llvm-lit >> CMake Error at tools/llvm-config/cmake_install.cmake:31 (FILE): >> file INSTALL cannot find >> "/sw/src/fink.build/llvm31-3.1-0/llvm-3.1/build/bin/llvm-config". >> Call Stack (most recent call first): >> tools/cmake_install.cmake:32 (INCLUDE) >> cmake_install.cmake:51 (INCLUDE) >> >> >> make: *** [install/fast] Error 1 >> >> when using... >> >> cmake DLLVM_BUILD_32_BITS:BOOL=OFF -DLLVM_TARGETS_TO_BUILD=X86 >> -DCMAKE_INSTALL_PREFIX=/sw/opt/llvm-3.1 -DLLVM_ENABLE_ASSERTIONS=OFF >> -DCMAKE_BUILD_TYPE=Release .. >> >> Is anyone else seeing this breakage? Seems related to the recent >> commits... >> >> r143541 | ddunbar | 2011-11-02 11:56:52 -0400 (Wed, 02 Nov 2011) | 1 line >> >> build/Make: Get rid of llvm-config-perobj, which isn't used anymore. >> ------------------------------------------------------------------------ >> r143540 | ddunbar | 2011-11-02 11:56:38 -0400 (Wed, 02 Nov 2011) | 2 lines >> >> build/CMake: Remove llvm-config.target used to serialize tool builds on >> llvm-config build, there is no longer a point to this after Chandler's >> work. >> > > I think it is this last one. I've replied to the commit and am testing out > a fix (a partial revert, i think one too many things got nuked). > Should be fixed in r143548, thanks for the report. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111102/a98fcfcf/attachment.html From benny.kra at googlemail.com Wed Nov 2 12:24:36 2011 From: benny.kra at googlemail.com (Benjamin Kramer) Date: Wed, 02 Nov 2011 17:24:36 -0000 Subject: [llvm-commits] [llvm] r143549 - /llvm/trunk/lib/VMCore/AsmWriter.cpp Message-ID: <20111102172436.C4BA82A6C12C@llvm.org> Author: d0k Date: Wed Nov 2 12:24:36 2011 New Revision: 143549 URL: http://llvm.org/viewvc/llvm-project?rev=143549&view=rev Log: Don't print two 0x prefixes when printing an address. 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=143549&r1=143548&r2=143549&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/AsmWriter.cpp (original) +++ llvm/trunk/lib/VMCore/AsmWriter.cpp Wed Nov 2 12:24:36 2011 @@ -231,7 +231,7 @@ if (I != NumberedTypes.end()) OS << '%' << I->second; else // Not enumerated, print the hex address. - OS << "%\"type 0x" << STy << '\"'; + OS << "%\"type " << STy << '\"'; return; } case Type::PointerTyID: { From resistor at mac.com Wed Nov 2 12:41:23 2011 From: resistor at mac.com (Owen Anderson) Date: Wed, 02 Nov 2011 17:41:23 -0000 Subject: [llvm-commits] [llvm] r143552 - /llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp Message-ID: <20111102174123.BAE312A6C12C@llvm.org> Author: resistor Date: Wed Nov 2 12:41:23 2011 New Revision: 143552 URL: http://llvm.org/viewvc/llvm-project?rev=143552&view=rev Log: Register list operands are not allowed to contain only a single register. Alternate encodings are used in that case. Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp?rev=143552&r1=143551&r2=143552&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp (original) +++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp Wed Nov 2 12:41:23 2011 @@ -1111,7 +1111,11 @@ } // Empty register lists are not allowed. - if (CountPopulation_32(Val) == 0) return MCDisassembler::Fail; + uint32_t popcnt = CountPopulation_32(Val); + if (popcnt == 0) return MCDisassembler::Fail; + // and one-register lists are unpredictable. + else if (popcnt == 1) Check(S, MCDisassembler::SoftFail); + for (unsigned i = 0; i < 16; ++i) { if (Val & (1 << i)) { if (!Check(S, DecodeGPRRegisterClass(Inst, i, Address, Decoder))) From resistor at mac.com Wed Nov 2 12:46:19 2011 From: resistor at mac.com (Owen Anderson) Date: Wed, 02 Nov 2011 17:46:19 -0000 Subject: [llvm-commits] [llvm] r143553 - /llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp Message-ID: <20111102174619.1B6952A6C12C@llvm.org> Author: resistor Date: Wed Nov 2 12:46:18 2011 New Revision: 143553 URL: http://llvm.org/viewvc/llvm-project?rev=143553&view=rev Log: The rules disallowing single-register reglist operands only apply to the POP alias, not to LDM/STM instructions. Revert r143552. Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp?rev=143553&r1=143552&r2=143553&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp (original) +++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp Wed Nov 2 12:46:18 2011 @@ -1111,11 +1111,7 @@ } // Empty register lists are not allowed. - uint32_t popcnt = CountPopulation_32(Val); - if (popcnt == 0) return MCDisassembler::Fail; - // and one-register lists are unpredictable. - else if (popcnt == 1) Check(S, MCDisassembler::SoftFail); - + if (CountPopulation_32(Val) == 0) return MCDisassembler::Fail; for (unsigned i = 0; i < 16; ++i) { if (Val & (1 << i)) { if (!Check(S, DecodeGPRRegisterClass(Inst, i, Address, Decoder))) From daniel at zuster.org Wed Nov 2 12:54:51 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Wed, 02 Nov 2011 17:54:51 -0000 Subject: [llvm-commits] [llvm] r143555 - /llvm/trunk/test/CMakeLists.txt Message-ID: <20111102175451.851D82A6C12C@llvm.org> Author: ddunbar Date: Wed Nov 2 12:54:51 2011 New Revision: 143555 URL: http://llvm.org/viewvc/llvm-project?rev=143555&view=rev Log: tests: Clean up tests/CMakeLists.txt to drop some variable configuration we no longer need substitutions for. Modified: llvm/trunk/test/CMakeLists.txt Modified: llvm/trunk/test/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CMakeLists.txt?rev=143555&r1=143554&r2=143555&view=diff ============================================================================== --- llvm/trunk/test/CMakeLists.txt (original) +++ llvm/trunk/test/CMakeLists.txt Wed Nov 2 12:54:51 2011 @@ -29,41 +29,6 @@ set(LIT_ARGS "${LLVM_LIT_ARGS}") separate_arguments(LIT_ARGS) - get_directory_property(DEFINITIONS COMPILE_DEFINITIONS) - foreach(DEF ${DEFINITIONS}) - set(DEFS "${DEFS} -D${DEF}") - endforeach() - get_directory_property(INC_DIRS INCLUDE_DIRECTORIES) - foreach(INC_DIR ${INC_DIRS}) - set(IDIRS "${IDIRS} -I${INC_DIR}") - endforeach() - - if( MSVC ) - # The compiler's path may contain white space. Wrap it: - string(REPLACE "" "\\\"${CMAKE_CXX_COMPILER}\\\"" TEST_COMPILE_CXX_CMD ${CMAKE_CXX_COMPILE_OBJECT}) - # Eliminate continuation lines from NMake flow. PR9680 - string(REPLACE "@<<\n" " " TEST_COMPILE_CXX_CMD ${TEST_COMPILE_CXX_CMD}) - string(REPLACE "\n<<" " " TEST_COMPILE_CXX_CMD ${TEST_COMPILE_CXX_CMD}) - else() - string(REPLACE "" "${CMAKE_CXX_COMPILER}" TEST_COMPILE_CXX_CMD ${CMAKE_CXX_COMPILE_OBJECT}) - endif() - - string(REPLACE "" "${DEFS}" TEST_COMPILE_CXX_CMD ${TEST_COMPILE_CXX_CMD}) - string(REPLACE "" "${CMAKE_CXX_FLAGS}" TEST_COMPILE_CXX_CMD ${TEST_COMPILE_CXX_CMD}) - if (MSVC) # PR9680 - # Eliminate MSVC equivalent of -o - string(REPLACE "/Fo" "" TEST_COMPILE_CXX_CMD ${TEST_COMPILE_CXX_CMD}) - # Eliminate "how to rename program database" argument - string(REPLACE "/Fd" "" TEST_COMPILE_CXX_CMD ${TEST_COMPILE_CXX_CMD}) - else() - string(REPLACE "-o" "" TEST_COMPILE_CXX_CMD ${TEST_COMPILE_CXX_CMD}) - endif(MSVC) - string(REGEX REPLACE "<[^>]+>" "" TEST_COMPILE_CXX_CMD ${TEST_COMPILE_CXX_CMD}) - set(TEST_COMPILE_CXX_CMD "${TEST_COMPILE_CXX_CMD} ${IDIRS}") - if(NOT MSVC) - set(TEST_COMPILE_CXX_CMD "${TEST_COMPILE_CXX_CMD} -x c++") - # MSVC already has /TP to indicate a C++ source file - endif() configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/site.exp.in ${CMAKE_CURRENT_BINARY_DIR}/site.exp) @@ -76,7 +41,6 @@ set(LLVM_SOURCE_DIR ${LLVM_MAIN_SRC_DIR}) set(LLVM_BINARY_DIR ${LLVM_BINARY_DIR}) set(LLVM_TOOLS_DIR "${LLVM_TOOLS_BINARY_DIR}/%(build_config)s") - set(LLVMGCCDIR "") set(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE}) set(ENABLE_SHARED ${LLVM_SHARED_LIBS_ENABLED}) set(SHLIBPATH_VAR ${SHLIBPATH_VAR}) From enderby at apple.com Wed Nov 2 12:56:38 2011 From: enderby at apple.com (Kevin Enderby) Date: Wed, 02 Nov 2011 17:56:38 -0000 Subject: [llvm-commits] [llvm] r143556 - /llvm/trunk/lib/MC/MCParser/AsmParser.cpp Message-ID: <20111102175638.E8CBA2A6C12C@llvm.org> Author: enderby Date: Wed Nov 2 12:56:38 2011 New Revision: 143556 URL: http://llvm.org/viewvc/llvm-project?rev=143556&view=rev Log: Replace tabs I added in this new line of code with spaces. Thanks to Nick for spotting this! 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=143556&r1=143555&r2=143556&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCParser/AsmParser.cpp (original) +++ llvm/trunk/lib/MC/MCParser/AsmParser.cpp Wed Nov 2 12:56:38 2011 @@ -1227,7 +1227,7 @@ getStreamer().EmitDwarfLocDirective(getContext().getGenDwarfFileNumber(), SrcMgr.FindLineNumber(IDLoc, CurBuffer), 0, DWARF2_LINE_DEFAULT_IS_STMT ? - DWARF2_FLAG_IS_STMT : 0, 0, 0, + DWARF2_FLAG_IS_STMT : 0, 0, 0, StringRef()); } From resistor at mac.com Wed Nov 2 13:03:15 2011 From: resistor at mac.com (Owen Anderson) Date: Wed, 02 Nov 2011 18:03:15 -0000 Subject: [llvm-commits] [llvm] r143557 - in /llvm/trunk: lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp test/MC/Disassembler/ARM/arm-tests.txt Message-ID: <20111102180315.50D782A6C12C@llvm.org> Author: resistor Date: Wed Nov 2 13:03:14 2011 New Revision: 143557 URL: http://llvm.org/viewvc/llvm-project?rev=143557&view=rev Log: Fix the issue that r143552 was trying to address the _right_ way. One-register lists are legal on LDM/STM instructions, but we should not print the PUSH/POP aliases when they appear. This fixes round tripping on this instruction. Modified: llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt Modified: llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp?rev=143557&r1=143556&r2=143557&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp (original) +++ llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp Wed Nov 2 13:03:14 2011 @@ -101,7 +101,9 @@ // A8.6.123 PUSH if ((Opcode == ARM::STMDB_UPD || Opcode == ARM::t2STMDB_UPD) && - MI->getOperand(0).getReg() == ARM::SP) { + MI->getOperand(0).getReg() == ARM::SP && + MI->getNumOperands() > 5) { + // Should only print PUSH if there are at least two registers in the list. O << '\t' << "push"; printPredicateOperand(MI, 2, O); if (Opcode == ARM::t2STMDB_UPD) @@ -122,7 +124,9 @@ // A8.6.122 POP if ((Opcode == ARM::LDMIA_UPD || Opcode == ARM::t2LDMIA_UPD) && - MI->getOperand(0).getReg() == ARM::SP) { + MI->getOperand(0).getReg() == ARM::SP && + MI->getNumOperands() > 5) { + // Should only print POP if there are at least two registers in the list. O << '\t' << "pop"; printPredicateOperand(MI, 2, O); if (Opcode == ARM::t2LDMIA_UPD) Modified: llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt?rev=143557&r1=143556&r2=143557&view=diff ============================================================================== --- llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt (original) +++ llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt Wed Nov 2 13:03:14 2011 @@ -317,3 +317,7 @@ # CHECK: stc2l p0, c0, [r2], #-96 0x18 0x0 0x62 0xfc + +# CHECK: ldmgt sp!, {r9} +0x00 0x02 0xbd 0xc8 + From gkistanova at gmail.com Wed Nov 2 13:05:46 2011 From: gkistanova at gmail.com (Galina Kistanova) Date: Wed, 02 Nov 2011 18:05:46 -0000 Subject: [llvm-commits] [zorg] r143558 - in /zorg/trunk: buildbot/osuosl/master/templates/root.html zorg/buildbot/__init__.py Message-ID: <20111102180546.644EE2A6C12C@llvm.org> Author: gkistanova Date: Wed Nov 2 13:05:46 2011 New Revision: 143558 URL: http://llvm.org/viewvc/llvm-project?rev=143558&view=rev Log: Small change buildbot home page; added required import. Modified: zorg/trunk/buildbot/osuosl/master/templates/root.html zorg/trunk/zorg/buildbot/__init__.py Modified: zorg/trunk/buildbot/osuosl/master/templates/root.html URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/osuosl/master/templates/root.html?rev=143558&r1=143557&r2=143558&view=diff ============================================================================== --- zorg/trunk/buildbot/osuosl/master/templates/root.html (original) +++ zorg/trunk/buildbot/osuosl/master/templates/root.html Wed Nov 2 13:05:46 2011 @@ -16,8 +16,18 @@ ! -
    +

    Our goal is to provide a good build and test overage for all supported platforms.

    +

    + If you are willing to donate some CPU circles and some room on a hard drive, you are welcome. + The instructions of how to add a build slave to the LLVM Buildbot infrastructure can be found + in the + + How to Add Your Build Configuration to the LLVM Buildbot Infrastructure + document. +

    +
    +

    Navigate:

    Modified: zorg/trunk/zorg/buildbot/__init__.py URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/__init__.py?rev=143558&r1=143557&r2=143558&view=diff ============================================================================== --- zorg/trunk/zorg/buildbot/__init__.py (original) +++ zorg/trunk/zorg/buildbot/__init__.py Wed Nov 2 13:05:46 2011 @@ -1,4 +1,5 @@ import builders import commands +import changes __all__ = [] From weimingz at codeaurora.org Wed Nov 2 13:07:13 2011 From: weimingz at codeaurora.org (Weiming Zhao) Date: Wed, 2 Nov 2011 11:07:13 -0700 Subject: [llvm-commits] Patch: Math Lib call optimization Message-ID: <000001cc998a$3f9863f0$bec92bd0$@org> Hello, I worked on an LLVM patch to optimize mathematical library calls and would like to submit it to your review. A. Background: In C89, most of the mathematical accept only the type "double" for the floating-point arguments. Later on, in C99, this limitation was fixed by introducing new sets of functions with "f" suffixes that accept "float" arguments. Our experiments show that, on ARM platform, the "float" type versions are significantly faster than their double precision counterparts. For example, "float sinf(float)" is 1.87 times faster than "double sin(double)". However, this new set of functions are not always exploited by programmers. For example, a programmer may write: void foo(float y) float x = sin(y); ... } instead of writing: void foo(float y) float x = sinf(y); ... } B. This optimization: This optimization looks for missed opportunities, in which a lighter weighted function could be used without losing precision. For legitimation, the conversion is performed only if: 1) the arguments of the call are all defined by FP extension instructions. For example, in the first function, for "sin(y)", "y" is implicitly extended from "float" to "double" 2) the return value of the call is only used by a FP truncation instruction. For example, in the first function, the return value of "sin(y)" is only used by a truncation from "double" to "float" and then assigned to variable "x". Hence, this transformation will not result in precision loss. C. Patch details (libcall_fp_version_opt.diff): 1) lib/Transforms/Scalar/SimplifyLibCalls.cpp: we added a new pass, called "ReplaceLibCallVersions", for this optimization. This pass inherits from the existing SimplifyLibCalls pass and the concrete optimizing class also inherits from the existing LibCallOptimization class. The reason we do not merge our codes into the existing SimpliyLibCalls pass is that both pass will optimize for some common lib calls (e.g. pow()). 2) lib/Target/ARM/ARMTargetMachine.cpp: so far, we only tested and verified this pass on ARM, so we only invoke it for ARM, which is the same way as Global-Merge pass does. Please feel free to let us know if you want to make it available for all architectures. 3) test/CodeGen/ARM/libcallconv.ll: test cases for this optimization D. Failure report Failure report from running llvm/test and projects/test-suite on ARM. I noted failures running llvm/test (svn rev 143352) and projects/test-suite (svn rev 142659) . Thank you, Weiming Zhao -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111102/fac08354/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: libcall_fp_version_opt.diff Type: application/octet-stream Size: 9623 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111102/fac08354/attachment-0002.obj -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: failures.txt Url: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111102/fac08354/attachment-0001.txt -------------- next part -------------- A non-text attachment was scrubbed... Name: libcallconv.ll Type: application/octet-stream Size: 946 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111102/fac08354/attachment-0003.obj From mcrosier at apple.com Wed Nov 2 13:08:25 2011 From: mcrosier at apple.com (Chad Rosier) Date: Wed, 02 Nov 2011 18:08:25 -0000 Subject: [llvm-commits] [llvm] r143559 - in /llvm/trunk: lib/Target/ARM/ARMFastISel.cpp test/CodeGen/ARM/fast-isel-icmp.ll Message-ID: <20111102180825.9DE252A6C12C@llvm.org> Author: mcrosier Date: Wed Nov 2 13:08:25 2011 New Revision: 143559 URL: http://llvm.org/viewvc/llvm-project?rev=143559&view=rev Log: Add support for comparing integer non-legal types. Added: llvm/trunk/test/CodeGen/ARM/fast-isel-icmp.ll Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMFastISel.cpp?rev=143559&r1=143558&r2=143559&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMFastISel.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Wed Nov 2 13:08:25 2011 @@ -174,7 +174,8 @@ private: bool isTypeLegal(Type *Ty, MVT &VT); bool isLoadTypeLegal(Type *Ty, MVT &VT); - bool ARMEmitCmp(const Value *Src1Value, const Value *Src2Value); + bool ARMEmitCmp(const Value *Src1Value, const Value *Src2Value, + bool isZExt); bool ARMEmitLoad(EVT VT, unsigned &ResultReg, Address &Addr); bool ARMEmitStore(EVT VT, unsigned SrcReg, Address &Addr); bool ARMComputeAddress(const Value *Obj, Address &Addr); @@ -1119,7 +1120,7 @@ if (ARMPred == ARMCC::AL) return false; // Emit the compare. - if (!ARMEmitCmp(CI->getOperand(0), CI->getOperand(1))) + if (!ARMEmitCmp(CI->getOperand(0), CI->getOperand(1), CI->isUnsigned())) return false; unsigned BrOpc = isThumb ? ARM::t2Bcc : ARM::Bcc; @@ -1189,19 +1190,19 @@ return true; } -bool ARMFastISel::ARMEmitCmp(const Value *Src1Value, const Value *Src2Value) { - MVT VT; +bool ARMFastISel::ARMEmitCmp(const Value *Src1Value, const Value *Src2Value, + bool isZExt) { Type *Ty = Src1Value->getType(); - if (!isTypeLegal(Ty, VT)) - return false; + EVT SrcVT = TLI.getValueType(Ty, true); + if (!SrcVT.isSimple()) return false; bool isFloat = (Ty->isFloatTy() || Ty->isDoubleTy()); if (isFloat && !Subtarget->hasVFP2()) return false; unsigned CmpOpc; - switch (VT.SimpleTy) { - // TODO: Add support for non-legal types (i.e., i1, i8, i16). + bool needsExt = false; + switch (SrcVT.getSimpleVT().SimpleTy) { default: return false; // TODO: Verify compares. case MVT::f32: @@ -1210,19 +1211,36 @@ case MVT::f64: CmpOpc = ARM::VCMPED; break; + case MVT::i1: + case MVT::i8: + case MVT::i16: + needsExt = true; + // Intentional fall-through. case MVT::i32: CmpOpc = isThumb ? ARM::t2CMPrr : ARM::CMPrr; break; } - unsigned Src1 = getRegForValue(Src1Value); - if (Src1 == 0) return false; + unsigned SrcReg1 = getRegForValue(Src1Value); + if (SrcReg1 == 0) return false; - unsigned Src2 = getRegForValue(Src2Value); - if (Src2 == 0) return false; + unsigned SrcReg2 = getRegForValue(Src2Value); + if (SrcReg2 == 0) return false; + + // We have i1, i8, or i16, we need to either zero extend or sign extend. + if (needsExt) { + unsigned ResultReg; + EVT DestVT = MVT::i32; + ResultReg = ARMEmitIntExt(SrcVT, SrcReg1, DestVT, isZExt); + if (ResultReg == 0) return false; + SrcReg1 = ResultReg; + ResultReg = ARMEmitIntExt(SrcVT, SrcReg2, DestVT, isZExt); + if (ResultReg == 0) return false; + SrcReg2 = ResultReg; + } AddOptionalDefs(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, TII.get(CmpOpc)) - .addReg(Src1).addReg(Src2)); + .addReg(SrcReg1).addReg(SrcReg2)); // For floating point we need to move the result to a comparison register // that we can then use for branches. @@ -1243,7 +1261,7 @@ if (ARMPred == ARMCC::AL) return false; // Emit the compare. - if (!ARMEmitCmp(CI->getOperand(0), CI->getOperand(1))) + if (!ARMEmitCmp(CI->getOperand(0), CI->getOperand(1), CI->isUnsigned())) return false; // Now set a register based on the comparison. Explicitly set the predicates @@ -1962,7 +1980,6 @@ static_cast(MIB)->setPhysRegsDeadExcept(UsedRegs, TRI); return true; - } bool ARMFastISel::SelectTrunc(const Instruction *I) { Added: llvm/trunk/test/CodeGen/ARM/fast-isel-icmp.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-icmp.ll?rev=143559&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/ARM/fast-isel-icmp.ll (added) +++ llvm/trunk/test/CodeGen/ARM/fast-isel-icmp.ll Wed Nov 2 13:08:25 2011 @@ -0,0 +1,47 @@ +; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-darwin | FileCheck %s --check-prefix=ARM +; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-darwin | FileCheck %s --check-prefix=THUMB + +define i32 @icmp_i16_unsigned(i16 %a, i16 %b) nounwind { +entry: +; ARM: icmp_i16_unsigned +; ARM: uxth r0, r0 +; ARM: uxth r1, r1 +; ARM: cmp r0, r1 +; THUMB: icmp_i16_unsigned +; THUMB: uxth r0, r0 +; THUMB: uxth r1, r1 +; THUMB: cmp r0, r1 + %cmp = icmp ult i16 %a, %b + %conv2 = zext i1 %cmp to i32 + ret i32 %conv2 +} + +define i32 @icmp_i8_signed(i8 %a, i8 %b) nounwind { +entry: +; ARM: icmp_i8_signed +; ARM: sxtb r0, r0 +; ARM: sxtb r1, r1 +; ARM: cmp r0, r1 +; THUMB: icmp_i8_signed +; THUMB: sxtb r0, r0 +; THUMB: sxtb r1, r1 +; THUMB: cmp r0, r1 + %cmp = icmp sgt i8 %a, %b + %conv2 = zext i1 %cmp to i32 + ret i32 %conv2 +} + +define i32 @icmp_i1_unsigned(i1 %a, i1 %b) nounwind { +entry: +; ARM: icmp_i1_unsigned +; ARM: and r0, r0, #1 +; ARM: and r1, r1, #1 +; ARM: cmp r0, r1 +; THUMB: icmp_i1_unsigned +; THUMB: and r0, r0, #1 +; THUMB: and r1, r1, #1 +; THUMB: cmp r0, r1 + %cmp = icmp ult i1 %a, %b + %conv2 = zext i1 %cmp to i32 + ret i32 %conv2 +} From greened at obbligato.org Wed Nov 2 13:19:07 2011 From: greened at obbligato.org (David A. Greene) Date: Wed, 02 Nov 2011 13:19:07 -0500 Subject: [llvm-commits] [llvm] r141977 - /llvm/trunk/utils/llvmbuild In-Reply-To: (Daniel Dunbar's message of "Wed, 2 Nov 2011 09:23:52 -0700") References: <20111014191237.51440312800A@llvm.org> Message-ID: Daniel Dunbar writes: > Ok, keeping it in the tree is fine with me if generally useful. > > It seems like the main focus is to build all the LLVM compilers, what > about llvm-build-all-compilers or something? Doesn't cover the test > side, but gets closer. Or maybe llvm-deep-check-compilers ? Both feel a bit wordy to me. Maybe llvm-commit-check, llvm-check or llvm-verify? None of these is really good, however. :-/ -Dave From echristo at apple.com Wed Nov 2 13:21:40 2011 From: echristo at apple.com (Eric Christopher) Date: Wed, 02 Nov 2011 11:21:40 -0700 Subject: [llvm-commits] Patch: Math Lib call optimization In-Reply-To: <000001cc998a$3f9863f0$bec92bd0$@org> References: <000001cc998a$3f9863f0$bec92bd0$@org> Message-ID: On Nov 2, 2011, at 11:07 AM, Weiming Zhao wrote: > I noted failures running llvm/test (svn rev 143352) and projects/test-suite (svn rev 142659) . Could you be a bit more descriptive here? -eric -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111102/48f5e12b/attachment.html From baldrick at free.fr Wed Nov 2 13:24:35 2011 From: baldrick at free.fr (Duncan Sands) Date: Wed, 02 Nov 2011 19:24:35 +0100 Subject: [llvm-commits] Patch: Math Lib call optimization In-Reply-To: <000001cc998a$3f9863f0$bec92bd0$@org> References: <000001cc998a$3f9863f0$bec92bd0$@org> Message-ID: <4EB18AE3.5060306@free.fr> Dear Weiming Zhao, > Hence, this transformation will not result in precision loss. is this a correct statement? For example, if sin returns a result which is correct to within two double precision ulps, and sinf to within two single precision ulps, then float->double->sin->float will probably be correct to one single precision ulp, so converting to use sinf loses precision. Ciao, Duncan. From stpworld at narod.ru Wed Nov 2 13:42:26 2011 From: stpworld at narod.ru (Stepan Dyatkovskiy) Date: Wed, 02 Nov 2011 22:42:26 +0400 Subject: [llvm-commits] [LLVM, SwitchInst, case ranges] Auxiliary patch #1 In-Reply-To: References: <4EAA9B5D.802@narod.ru> <4EAA9DE8.80000@free.fr> <485181319805488@web67.yandex.ru> <4EAB079D.6000606@free.fr> Message-ID: <4EB18F12.6060409@narod.ru> Hello, Duncan. Duncan Sands wrote: > I guess Anton can comment on codegen, but the fact that it doesn't make > codegen > harder has nothing to do with increasing the complexity of the > optimizers, since > they work at the IR level. It may be that case ranges allow the > optimizers to > do a better job. It may be that they simplify the optimizers. But it > also may > be the opposite: they might make switches harder to work with and reason > about > for no advantage. Which is it? Do you have an example where case ranges > would > result in better code, or make it easier to produce better code? I made impact analysis for new case ranges feature. 24 out of more than 100 optimizations are affected. 20 of 24 just require an integration of a new "case-range" type, i.e. small change of code without. The remaining 4 requires some bigger changes. All affected optimizers are listed in attached spreadsheet. Patches that are submitted in this branch are just functionality extension for current classes. These patches doesn't brake any of existing optimizations and keeps its speed without changes. Well. Let's enumerate 4 optimizations that should be reworked. 1. LowerSwitch::Clusterify This method groups neighbouring cases (by value) that goes to the same destination. For example: switch i32 %cond, label %default [ i32 1, label %successorA i32 2, label %successorA i32 5, label %successorB i32 3, label %successorA i32 6, label %successorB ] will be grouped to the two clusters: [[i32 1] .. [i32 3]], label %successorA [[i32 5] .. [i32 6]], label %successorB This method will work faster if clusters will presented explicitly using new case ranges feature. 2. SimplifyCFG.cpp, TurnSwitchRangeIntoICmp (static function) "Turns a switch that contains only an integer range comparison into a sub, an icmp and a branch." (written in method comments). Algorithm that determines "solid" case range should be changed. Now compare two switches (don't look at syntax of second switch, it is still a subject of another discussion): switch i32 %cond, label %default [ i32 1, label %successorA i32 2, label %successorA i32 3, label %successorA ] and hypothetical switch: switch i32 %cond, label %default [ [[i32 1],[i32 3]], label %successorA ; case range [1..3] ] or even this one: switch i32 %cond, label %default [ [[i32 1],[i32 2]], label %successorA ; case range [1..2] i32 3, label %successorA ; single case value "3" ] Its obvious that last two switches will be processed faster than the first one. We doesn't need to perform analysis for each separated case value. We already know - that it is a range. 3. SimplifyCFG.cpp, EliminateDeadSwitchCases (static function). Here switch condition is analysed. We try to determine "1" and "0" bits that MUST be in condition value. If we found them, then we look at case values; if these bits are absent in case value we remove it since it will be never equal to condition. I need to think more about the ways of case ranges processing here. At least we can represent case range as separated values set and apply current algorithm to it. It slow down the processing a little bit, but the complexity itself will be not increased. I'm sure that there are also exists algorithms that allows to eliminate whole case ranges: e.g. we can apply current algorithm to high bits that are constant in case range. 4. lib/Transforms/Scalar/LoopUnswitch.cpp (the set of methods). Just a quote from LoopUnswitch.cpp header [quote] This pass transforms loops that contain branches on loop-invariant conditions to have multiple loops. For example, it turns the left into the right code. for (...) if (lic) A for (...) if (lic) A; B; C B else C for (...) A; C [/quote] I also must think more about case ranges unswithing here. By now loops with switch instruction are unswitched value-by-value. There is no any case-values clustering before unswitching. For example for case range [0..9] we need to run unswitch process 10 times! Theoretically, explicitly given case ranges and properly implemented unswitching should make this optimization better. So, as you can see complexity will not changed and even some of optimizations will work faster. Regards, Stepan. -------------- next part -------------- A non-text attachment was scrubbed... Name: CaseRanges - Passes Affected.xls Type: application/vnd.ms-excel Size: 11776 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111102/a785acd2/attachment.xls From evan.cheng at apple.com Wed Nov 2 13:47:42 2011 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 02 Nov 2011 11:47:42 -0700 Subject: [llvm-commits] patch: partial DSE In-Reply-To: <96FCCA6E-E359-4CA9-B655-5B5854852D2D@apple.com> References: <94CCF474-AEAB-42EE-8667-47D93735B2F0@apple.com> <307A3A95-AD5F-4726-9EF8-BEF0D1F95508@apple.com> <96FCCA6E-E359-4CA9-B655-5B5854852D2D@apple.com> Message-ID: <42C93554-C485-4AE6-8943-CC834FEE62B3@apple.com> Looks fine to me. One stylistic nitpick: } else if (OR == ...)) { should be } else if (OR == ...)) { Evan On Nov 1, 2011, at 5:14 PM, Peter Cooper wrote: > Please take a look at the following patch. I've left in the magic 16 for now, but i'd like to make sure the rest is ok. > > Thanks, > Pete > > > On Nov 1, 2011, at 4:39 PM, Peter Cooper wrote: > >> I agree with you Evan if you consider the magic 16 constant which really does need TargetData, but i could remove that for now. The result would be the following 2 conditions allowing the optimization to take place: >> >> llvm::isPowerOf2_64(InstWriteOffset) >> >> which means that the earlier store is going to be trimmed to a power of 2 in which case any instructions over the power of 2 boundary were likely not vector instructions anyway, or if they were then we're replacing all those vector instructions with probably more vector instructions which is good, and >> >> ((DepWriteAlign != 0) && InstWriteOffset % DepWriteAlign == 0) >> >> which says that the later store is at an offset at the same alignment as the earlier store. If the alignment was < 16 in this case then we'd probably not generate vector instructions for the earlier stores anyway so trimming the earlier store should be ok. >> >> Pete >> >> >> On Nov 1, 2011, at 4:22 PM, Evan Cheng wrote: >> >>> This might be something we have to defer until we add "what's native types" to TargetData. I'm worried when / if this does something bad, the performance impact can be very significant. >>> >>> Evan >>> >>> On Nov 1, 2011, at 3:12 PM, Eli Friedman wrote: >>> >>>> On Tue, Nov 1, 2011 at 2:47 PM, Eric Christopher wrote: >>>>> >>>>> On Oct 31, 2011, at 5:38 PM, Peter Cooper wrote: >>>>> >>>>>> Hi >>>>>> >>>>>> Please review this patch to allow DSE to trim stores as opposed to deleting them. >>>>>> >>>>>> The logic here is that if the end of the earlier store is dead because of a later store then the length of the earlier store will be trimmed in size to avoid writing dead memory. The only time i won't do this is if the original store was likely to use vector writes which if shortened would end up as multiple scalar writes and so is less efficient. >>>>>> >>>>> >>>>> Not a huge fan of this style: >>>>> >>>>> + (OR = isOverwrite(Loc, DepLoc, *AA, >>>>> + DepWriteOffset, >>>>> + InstWriteOffset)) != OverwriteUnknown && >>>>> >>>>> in large conditionals. Things that return booleans, or set something for a block, e.g.: >>>>> >>>>> if (ConstantInt *CI = dyn_cast(Inst)) { >>>>> } >>>>> >>>>>> Any help removing the magic vector size (16) constant would be good too :) >>>>> >>>>> Something like this maybe? >>>>> >>>>> bool isLegalVector = false; >>>>> if (VectorType *VecTy = dyn_cast(Store->getType()) { >>>>> EVT VT = TLI.getValueType(VecTy); >>>>> isLegalVector = TLI.isTypeLegal(VT); >>>>> } >>>>> >>>>> does require target info though and I'm not sure how kosher that is in AA. >>>> >>>> There aren't actually any vector types involved here; the issue is >>>> that, for example, a 32 byte memset is cheaper than a 31-byte memset >>>> under the default settings on x86-64. I'm not sure what the right >>>> approach is here. >>>> >>>> -Eli >>>> >>>> _______________________________________________ >>>> llvm-commits mailing list >>>> llvm-commits at cs.uiuc.edu >>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits >>> >>> _______________________________________________ >>> llvm-commits mailing list >>> llvm-commits at cs.uiuc.edu >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111102/08cbf268/attachment.html From peter_cooper at apple.com Wed Nov 2 13:54:59 2011 From: peter_cooper at apple.com (Peter Cooper) Date: Wed, 02 Nov 2011 11:54:59 -0700 Subject: [llvm-commits] patch: partial DSE In-Reply-To: <42C93554-C485-4AE6-8943-CC834FEE62B3@apple.com> References: <94CCF474-AEAB-42EE-8667-47D93735B2F0@apple.com> <307A3A95-AD5F-4726-9EF8-BEF0D1F95508@apple.com> <96FCCA6E-E359-4CA9-B655-5B5854852D2D@apple.com> <42C93554-C485-4AE6-8943-CC834FEE62B3@apple.com> Message-ID: Oh yeah, thanks. Forgot about that one. I'll commit it now. Thanks, Pete On Nov 2, 2011, at 11:47 AM, Evan Cheng wrote: > Looks fine to me. One stylistic nitpick: > > } > else if (OR == ...)) > { > > should be > } else if (OR == ...)) { > > Evan > > On Nov 1, 2011, at 5:14 PM, Peter Cooper wrote: > >> Please take a look at the following patch. I've left in the magic 16 for now, but i'd like to make sure the rest is ok. >> >> Thanks, >> Pete >> >> >> On Nov 1, 2011, at 4:39 PM, Peter Cooper wrote: >> >>> I agree with you Evan if you consider the magic 16 constant which really does need TargetData, but i could remove that for now. The result would be the following 2 conditions allowing the optimization to take place: >>> >>> llvm::isPowerOf2_64(InstWriteOffset) >>> >>> which means that the earlier store is going to be trimmed to a power of 2 in which case any instructions over the power of 2 boundary were likely not vector instructions anyway, or if they were then we're replacing all those vector instructions with probably more vector instructions which is good, and >>> >>> ((DepWriteAlign != 0) && InstWriteOffset % DepWriteAlign == 0) >>> >>> which says that the later store is at an offset at the same alignment as the earlier store. If the alignment was < 16 in this case then we'd probably not generate vector instructions for the earlier stores anyway so trimming the earlier store should be ok. >>> >>> Pete >>> >>> >>> On Nov 1, 2011, at 4:22 PM, Evan Cheng wrote: >>> >>>> This might be something we have to defer until we add "what's native types" to TargetData. I'm worried when / if this does something bad, the performance impact can be very significant. >>>> >>>> Evan >>>> >>>> On Nov 1, 2011, at 3:12 PM, Eli Friedman wrote: >>>> >>>>> On Tue, Nov 1, 2011 at 2:47 PM, Eric Christopher wrote: >>>>>> >>>>>> On Oct 31, 2011, at 5:38 PM, Peter Cooper wrote: >>>>>> >>>>>>> Hi >>>>>>> >>>>>>> Please review this patch to allow DSE to trim stores as opposed to deleting them. >>>>>>> >>>>>>> The logic here is that if the end of the earlier store is dead because of a later store then the length of the earlier store will be trimmed in size to avoid writing dead memory. The only time i won't do this is if the original store was likely to use vector writes which if shortened would end up as multiple scalar writes and so is less efficient. >>>>>>> >>>>>> >>>>>> Not a huge fan of this style: >>>>>> >>>>>> + (OR = isOverwrite(Loc, DepLoc, *AA, >>>>>> + DepWriteOffset, >>>>>> + InstWriteOffset)) != OverwriteUnknown && >>>>>> >>>>>> in large conditionals. Things that return booleans, or set something for a block, e.g.: >>>>>> >>>>>> if (ConstantInt *CI = dyn_cast(Inst)) { >>>>>> } >>>>>> >>>>>>> Any help removing the magic vector size (16) constant would be good too :) >>>>>> >>>>>> Something like this maybe? >>>>>> >>>>>> bool isLegalVector = false; >>>>>> if (VectorType *VecTy = dyn_cast(Store->getType()) { >>>>>> EVT VT = TLI.getValueType(VecTy); >>>>>> isLegalVector = TLI.isTypeLegal(VT); >>>>>> } >>>>>> >>>>>> does require target info though and I'm not sure how kosher that is in AA. >>>>> >>>>> There aren't actually any vector types involved here; the issue is >>>>> that, for example, a 32 byte memset is cheaper than a 31-byte memset >>>>> under the default settings on x86-64. I'm not sure what the right >>>>> approach is here. >>>>> >>>>> -Eli >>>>> >>>>> _______________________________________________ >>>>> llvm-commits mailing list >>>>> llvm-commits at cs.uiuc.edu >>>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits >>>> >>>> _______________________________________________ >>>> llvm-commits mailing list >>>> llvm-commits at cs.uiuc.edu >>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits >>> >>> _______________________________________________ >>> llvm-commits mailing list >>> llvm-commits at cs.uiuc.edu >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111102/08c01da6/attachment.html From edwintorok at gmail.com Wed Nov 2 14:24:53 2011 From: edwintorok at gmail.com (=?ISO-8859-1?Q?T=F6r=F6k_Edwin?=) Date: Wed, 02 Nov 2011 21:24:53 +0200 Subject: [llvm-commits] [llvm] r141977 - /llvm/trunk/utils/llvmbuild In-Reply-To: References: <20111014191237.51440312800A@llvm.org> Message-ID: <4EB19905.1020109@gmail.com> On 11/02/2011 08:19 PM, David A. Greene wrote: > Daniel Dunbar writes: > >> Ok, keeping it in the tree is fine with me if generally useful. >> >> It seems like the main focus is to build all the LLVM compilers, what >> about llvm-build-all-compilers or something? Doesn't cover the test >> side, but gets closer. Or maybe llvm-deep-check-compilers ? > > Both feel a bit wordy to me. Maybe llvm-commit-check, llvm-check or > llvm-verify? None of these is really good, however. :-/ llvm-compilers-check or llvm-frontend-check? (the latter would imply to check other frontends than C, which wouldn't hurt but probably takes too much time) --Edwin From bigcheesegs at gmail.com Wed Nov 2 14:33:12 2011 From: bigcheesegs at gmail.com (Michael J. Spencer) Date: Wed, 02 Nov 2011 19:33:12 -0000 Subject: [llvm-commits] [llvm] r143561 - in /llvm/trunk: include/llvm/Object/Archive.h lib/Object/Archive.cpp Message-ID: <20111102193313.09F162A6C12C@llvm.org> Author: mspencer Date: Wed Nov 2 14:33:12 2011 New Revision: 143561 URL: http://llvm.org/viewvc/llvm-project?rev=143561&view=rev Log: Object/Archive: Add symbol table iteration. Modified: llvm/trunk/include/llvm/Object/Archive.h llvm/trunk/lib/Object/Archive.cpp Modified: llvm/trunk/include/llvm/Object/Archive.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/Archive.h?rev=143561&r1=143560&r2=143561&view=diff ============================================================================== --- llvm/trunk/include/llvm/Object/Archive.h (original) +++ llvm/trunk/include/llvm/Object/Archive.h Wed Nov 2 14:33:12 2011 @@ -50,6 +50,7 @@ class child_iterator { Child child; public: + child_iterator() : child(Child(0, StringRef())) {} child_iterator(const Child &c) : child(c) {} const Child* operator->() const { return &child; @@ -69,11 +70,55 @@ } }; + class Symbol { + const Archive *Parent; + uint32_t SymbolIndex; + uint32_t StringIndex; // Extra index to the string. + + public: + bool operator ==(const Symbol &other) const { + return (Parent == other.Parent) && (SymbolIndex == other.SymbolIndex); + } + + Symbol(const Archive *p, uint32_t symi, uint32_t stri) + : Parent(p) + , SymbolIndex(symi) + , StringIndex(stri) {} + error_code getName(StringRef &Result) const; + error_code getMember(child_iterator &Result) const; + Symbol getNext() const; + }; + + class symbol_iterator { + Symbol symbol; + public: + symbol_iterator(const Symbol &s) : symbol(s) {} + const Symbol *operator->() const { + return &symbol; + } + + bool operator==(const symbol_iterator &other) const { + return symbol == other.symbol; + } + + bool operator!=(const symbol_iterator &other) const { + return !(*this == other); + } + + symbol_iterator& operator++() { // Preincrement + symbol = symbol.getNext(); + return *this; + } + }; + Archive(MemoryBuffer *source, error_code &ec); child_iterator begin_children(bool skip_internal = true) const; child_iterator end_children() const; + symbol_iterator begin_symbols() const; + symbol_iterator end_symbols() const; + // Cast methods. static inline bool classof(Archive const *v) { return true; } static inline bool classof(Binary const *v) { @@ -81,6 +126,7 @@ } private: + child_iterator SymbolTable; child_iterator StringTable; }; Modified: llvm/trunk/lib/Object/Archive.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/Archive.cpp?rev=143561&r1=143560&r2=143561&view=diff ============================================================================== --- llvm/trunk/lib/Object/Archive.cpp (original) +++ llvm/trunk/lib/Object/Archive.cpp Wed Nov 2 14:33:12 2011 @@ -13,6 +13,7 @@ #include "llvm/Object/Archive.h" #include "llvm/ADT/APInt.h" +#include "llvm/Support/Endian.h" #include "llvm/Support/MemoryBuffer.h" using namespace llvm; @@ -171,8 +172,7 @@ } Archive::Archive(MemoryBuffer *source, error_code &ec) - : Binary(Binary::isArchive, source) - , StringTable(Child(this, StringRef(0, 0))) { + : Binary(Binary::isArchive, source) { // Check for sufficient magic. if (!source || source->getBufferSize() < (8 + sizeof(ArchiveMemberHeader) + 2) // Smallest archive. @@ -181,15 +181,18 @@ return; } - // Get the string table. It's the 3rd member. - child_iterator StrTable = begin_children(false); + // Get the special members. + child_iterator i = begin_children(false); child_iterator e = end_children(); - for (int i = 0; StrTable != e && i < 2; ++StrTable, ++i) {} - // Check to see if there were 3 members, or the 3rd member wasn't named "//". - StringRef name; - if (StrTable != e && !StrTable->getName(name) && name == "//") - StringTable = StrTable; + if (i != e) ++i; // Nobody cares about the first member. + if (i != e) { + SymbolTable = i; + ++i; + } + if (i != e) { + StringTable = i; + } ec = object_error::success; } @@ -208,3 +211,62 @@ Archive::child_iterator Archive::end_children() const { return Child(this, StringRef(0, 0)); } + +error_code Archive::Symbol::getName(StringRef &Result) const { + Result = + StringRef(Parent->SymbolTable->getBuffer()->getBufferStart() + StringIndex); + return object_error::success; +} + +error_code Archive::Symbol::getMember(child_iterator &Result) const { + const char *buf = Parent->SymbolTable->getBuffer()->getBufferStart(); + uint32_t member_count = *reinterpret_cast(buf); + const char *offsets = buf + 4; + buf += 4 + (member_count * 4); // Skip offsets. + uint32_t symbol_count = *reinterpret_cast(buf); + const char *indicies = buf + 4; + + uint16_t offsetindex = + *(reinterpret_cast(indicies) + + SymbolIndex); + + uint32_t offset = *(reinterpret_cast(offsets) + + (offsetindex - 1)); + + const char *Loc = Parent->getData().begin() + offset; + size_t Size = sizeof(ArchiveMemberHeader) + + ToHeader(Loc)->getSize(); + Result = Child(Parent, StringRef(Loc, Size)); + + return object_error::success; +} + +Archive::Symbol Archive::Symbol::getNext() const { + Symbol t(*this); + const char *buf = Parent->SymbolTable->getBuffer()->getBufferStart(); + buf += t.StringIndex; + while (*buf++); // Go to one past next null. + t.StringIndex = buf - Parent->SymbolTable->getBuffer()->getBufferStart(); + ++t.SymbolIndex; + return t; +} + +Archive::symbol_iterator Archive::begin_symbols() const { + const char *buf = SymbolTable->getBuffer()->getBufferStart(); + uint32_t member_count = *reinterpret_cast(buf); + buf += 4 + (member_count * 4); // Skip offsets. + uint32_t symbol_count = *reinterpret_cast(buf); + buf += 4 + (symbol_count * 2); // Skip indices. + uint32_t string_start_offset = + buf - SymbolTable->getBuffer()->getBufferStart(); + return symbol_iterator(Symbol(this, 0, string_start_offset)); +} + +Archive::symbol_iterator Archive::end_symbols() const { + const char *buf = SymbolTable->getBuffer()->getBufferStart(); + uint32_t member_count = *reinterpret_cast(buf); + buf += 4 + (member_count * 4); // Skip offsets. + uint32_t symbol_count = *reinterpret_cast(buf); + return symbol_iterator( + Symbol(this, symbol_count, 0)); +} From bigcheesegs at gmail.com Wed Nov 2 14:33:27 2011 From: bigcheesegs at gmail.com (Michael J. Spencer) Date: Wed, 02 Nov 2011 19:33:27 -0000 Subject: [llvm-commits] [llvm] r143562 - /llvm/trunk/lib/Object/COFFObjectFile.cpp Message-ID: <20111102193327.2818B2A6C12C@llvm.org> Author: mspencer Date: Wed Nov 2 14:33:26 2011 New Revision: 143562 URL: http://llvm.org/viewvc/llvm-project?rev=143562&view=rev Log: object/COFF: Properly initalize uses of DataRefImpl. Modified: llvm/trunk/lib/Object/COFFObjectFile.cpp Modified: llvm/trunk/lib/Object/COFFObjectFile.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/COFFObjectFile.cpp?rev=143562&r1=143561&r2=143562&view=diff ============================================================================== --- llvm/trunk/lib/Object/COFFObjectFile.cpp (original) +++ llvm/trunk/lib/Object/COFFObjectFile.cpp Wed Nov 2 14:33:26 2011 @@ -284,6 +284,7 @@ const coff_section *sec; if (error_code ec = getSection(symb->SectionNumber, sec)) return ec; DataRefImpl Sec; + std::memset(&Sec, 0, sizeof(Sec)); Sec.p = reinterpret_cast(sec); Result = section_iterator(SectionRef(Sec, this)); } @@ -618,6 +619,7 @@ SymbolRef &Res) const { const coff_relocation* R = toRel(Rel); DataRefImpl Symb; + std::memset(&Symb, 0, sizeof(Symb)); Symb.p = reinterpret_cast(SymbolTable + R->SymbolTableIndex); Res = SymbolRef(Symb, this); return object_error::success; From bigcheesegs at gmail.com Wed Nov 2 14:33:42 2011 From: bigcheesegs at gmail.com (Michael J. Spencer) Date: Wed, 02 Nov 2011 19:33:42 -0000 Subject: [llvm-commits] [llvm] r143563 - /llvm/trunk/include/llvm/Object/ObjectFile.h Message-ID: <20111102193342.2E6F62A6C12C@llvm.org> Author: mspencer Date: Wed Nov 2 14:33:41 2011 New Revision: 143563 URL: http://llvm.org/viewvc/llvm-project?rev=143563&view=rev Log: object: Add operator < for SymbolRef and SectionRef. Modified: llvm/trunk/include/llvm/Object/ObjectFile.h Modified: llvm/trunk/include/llvm/Object/ObjectFile.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/ObjectFile.h?rev=143563&r1=143562&r2=143563&view=diff ============================================================================== --- llvm/trunk/include/llvm/Object/ObjectFile.h (original) +++ llvm/trunk/include/llvm/Object/ObjectFile.h Wed Nov 2 14:33:41 2011 @@ -78,6 +78,12 @@ return std::memcmp(&a, &b, sizeof(DataRefImpl)) == 0; } +static bool operator <(const DataRefImpl &a, const DataRefImpl &b) { + // Check bitwise identical. This is the only legal way to compare a union w/o + // knowing which member is in use. + return std::memcmp(&a, &b, sizeof(DataRefImpl)) < 0; +} + class SymbolRef; /// RelocationRef - This is a value type class that represents a single @@ -135,6 +141,7 @@ SectionRef(DataRefImpl SectionP, const ObjectFile *Owner); bool operator==(const SectionRef &Other) const; + bool operator <(const SectionRef &Other) const; error_code getNext(SectionRef &Result) const; @@ -182,6 +189,7 @@ SymbolRef(DataRefImpl SymbolP, const ObjectFile *Owner); bool operator==(const SymbolRef &Other) const; + bool operator <(const SymbolRef &Other) const; error_code getNext(SymbolRef &Result) const; @@ -339,6 +347,10 @@ return SymbolPimpl == Other.SymbolPimpl; } +inline bool SymbolRef::operator <(const SymbolRef &Other) const { + return SymbolPimpl < Other.SymbolPimpl; +} + inline error_code SymbolRef::getNext(SymbolRef &Result) const { return OwningObject->getSymbolNext(SymbolPimpl, Result); } @@ -402,6 +414,10 @@ return SectionPimpl == Other.SectionPimpl; } +inline bool SectionRef::operator <(const SectionRef &Other) const { + return SectionPimpl < Other.SectionPimpl; +} + inline error_code SectionRef::getNext(SectionRef &Result) const { return OwningObject->getSectionNext(SectionPimpl, Result); } From daniel at zuster.org Wed Nov 2 14:48:19 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Wed, 02 Nov 2011 19:48:19 -0000 Subject: [llvm-commits] [llvm] r143564 - /llvm/trunk/Makefile Message-ID: <20111102194820.0759E2A6C12C@llvm.org> Author: ddunbar Date: Wed Nov 2 14:48:19 2011 New Revision: 143564 URL: http://llvm.org/viewvc/llvm-project?rev=143564&view=rev Log: build/Make: Update for rename of show-diagnostics. Modified: llvm/trunk/Makefile Modified: llvm/trunk/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile?rev=143564&r1=143563&r2=143564&view=diff ============================================================================== --- llvm/trunk/Makefile (original) +++ llvm/trunk/Makefile Wed Nov 2 14:48:19 2011 @@ -209,7 +209,7 @@ $(Echo) '*****' configure with --enable-optimized. ifeq ($(SHOW_DIAGNOSTICS),1) $(Verb) if test -s $(LLVM_OBJ_ROOT)/$(BuildMode)/diags; then \ - $(LLVM_SRC_ROOT)/utils/show-diagnostics \ + $(LLVM_SRC_ROOT)/utils/clang-parse-diagnostics-file -a \ $(LLVM_OBJ_ROOT)/$(BuildMode)/diags; \ fi endif From grosser at fim.uni-passau.de Wed Nov 2 14:51:04 2011 From: grosser at fim.uni-passau.de (Tobias Grosser) Date: Wed, 02 Nov 2011 19:51:04 -0000 Subject: [llvm-commits] [llvm] r143565 - /llvm/trunk/docs/HowToAddABuilder.html Message-ID: <20111102195104.CC42C2A6C12C@llvm.org> Author: grosser Date: Wed Nov 2 14:51:04 2011 New Revision: 143565 URL: http://llvm.org/viewvc/llvm-project?rev=143565&view=rev Log: docs: Fix two typos Modified: llvm/trunk/docs/HowToAddABuilder.html Modified: llvm/trunk/docs/HowToAddABuilder.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/HowToAddABuilder.html?rev=143565&r1=143564&r2=143565&view=diff ============================================================================== --- llvm/trunk/docs/HowToAddABuilder.html (original) +++ llvm/trunk/docs/HowToAddABuilder.html Wed Nov 2 14:51:04 2011 @@ -33,8 +33,8 @@
    -

    Volunters can provade there build machines to work as slave builders to - public LLVM Buildbot. Below desrcibed recommended steps to implement this +

    Volunters can provide there build machines to work as slave builders to + public LLVM Buildbot. Below described recommended steps to implement this task.

    The steps are roughly as follows:

    From tobias at grosser.es Wed Nov 2 14:53:07 2011 From: tobias at grosser.es (Tobias Grosser) Date: Wed, 02 Nov 2011 19:53:07 +0000 Subject: [llvm-commits] [llvm] r141286 - in /llvm/trunk: bindings/ocaml/llvm/llvm.ml bindings/ocaml/llvm/llvm.mli bindings/ocaml/llvm/llvm_ocaml.c include/llvm-c/Core.h lib/VMCore/Core.cpp In-Reply-To: <20111006121312.0C2B02A6C12C@llvm.org> References: <20111006121312.0C2B02A6C12C@llvm.org> Message-ID: <4EB19FA3.1020006@grosser.es> On 10/06/2011 01:13 PM, Torok Edwin wrote: > Author: edwin > Date: Thu Oct 6 07:13:11 2011 > New Revision: 141286 > > URL: http://llvm.org/viewvc/llvm-project?rev=141286&view=rev > Log: > ocaml/C bindings: getmdstring, add num_op, get_op should work on metadata too > > ============================================================================== > --- llvm/trunk/include/llvm-c/Core.h (original) > +++ llvm/trunk/include/llvm-c/Core.h Thu Oct 6 07:13:11 2011 > @@ -550,6 +550,11 @@ > LLVMValueRef LLVMMDNodeInContext(LLVMContextRef C, LLVMValueRef *Vals, > unsigned Count); > LLVMValueRef LLVMMDNode(LLVMValueRef *Vals, unsigned Count); > +const char *LLVMGetMDString(LLVMValueRef V, unsigned* Len); > +int LLVMGetMDNodeNumOperands(LLVMValueRef V); > +LLVMValueRef *LLVMGetMDNodeOperand(LLVMValueRef V, unsigned i); Hi, I just realized that you never introduced an implementation for the last two function declarations. Did you forget about them or are you planning to use them soon. In case you do not, what about removing them from the header file? Tobi From mcrosier at apple.com Wed Nov 2 14:55:14 2011 From: mcrosier at apple.com (Chad Rosier) Date: Wed, 02 Nov 2011 12:55:14 -0700 Subject: [llvm-commits] [llvm] r143564 - /llvm/trunk/Makefile In-Reply-To: <20111102194820.0759E2A6C12C@llvm.org> References: <20111102194820.0759E2A6C12C@llvm.org> Message-ID: <9B7DE59D-2369-41F6-BB5D-774E967FBF8B@apple.com> Thanks, Daniel. On Nov 2, 2011, at 12:48 PM, Daniel Dunbar wrote: > Author: ddunbar > Date: Wed Nov 2 14:48:19 2011 > New Revision: 143564 > > URL: http://llvm.org/viewvc/llvm-project?rev=143564&view=rev > Log: > build/Make: Update for rename of show-diagnostics. > > Modified: > llvm/trunk/Makefile > > Modified: llvm/trunk/Makefile > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile?rev=143564&r1=143563&r2=143564&view=diff > ============================================================================== > --- llvm/trunk/Makefile (original) > +++ llvm/trunk/Makefile Wed Nov 2 14:48:19 2011 > @@ -209,7 +209,7 @@ > $(Echo) '*****' configure with --enable-optimized. > ifeq ($(SHOW_DIAGNOSTICS),1) > $(Verb) if test -s $(LLVM_OBJ_ROOT)/$(BuildMode)/diags; then \ > - $(LLVM_SRC_ROOT)/utils/show-diagnostics \ > + $(LLVM_SRC_ROOT)/utils/clang-parse-diagnostics-file -a \ > $(LLVM_OBJ_ROOT)/$(BuildMode)/diags; \ > fi > endif > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From echristo at apple.com Wed Nov 2 15:10:47 2011 From: echristo at apple.com (Eric Christopher) Date: Wed, 02 Nov 2011 13:10:47 -0700 Subject: [llvm-commits] Patch: Math Lib call optimization In-Reply-To: <000e01cc9999$5dfe61a0$19fb24e0$@org> References: <000001cc998a$3f9863f0$bec92bd0$@org> <000e01cc9999$5dfe61a0$19fb24e0$@org> Message-ID: On Nov 2, 2011, at 12:55 PM, Weiming Zhao wrote: > Hi Eric, > > We took LLVM r143352, Clang r142951 and run against the tests on ARM Scorpion devices. The test-suite reported 61 fails and the test reported 1 Unexpected Passes and 40 Unexpected Failures. > > The test-suites were compiled with options: ?O3, SMALL_PROBLEM_SIZE=1, USE_REFERENCE_OUTPUT=1, TEST=SIMPLE > Among the 61 test-suites, 1 is compiling failure (MultiSource/Application/ClamAV) and the rests are running failures. Is this with or without your patch? Were there regressions? Have you checked performance? Were there regressions? -eric -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111102/90242a68/attachment.html From gohman at apple.com Wed Nov 2 15:15:45 2011 From: gohman at apple.com (Dan Gohman) Date: Wed, 02 Nov 2011 13:15:45 -0700 Subject: [llvm-commits] Patch: Math Lib call optimization In-Reply-To: <000001cc998a$3f9863f0$bec92bd0$@org> References: <000001cc998a$3f9863f0$bec92bd0$@org> Message-ID: <6CC1C132-0E7E-4B54-85DB-67AC738F6F04@apple.com> On Nov 2, 2011, at 11:07 AM, Weiming Zhao wrote: > Hello, > > I worked on an LLVM patch to optimize mathematical library calls and would like to submit it to your review. > > A. Background: > In C89, most of the mathematical accept only the type "double" for the floating-point arguments. > Later on, in C99, this limitation was fixed by introducing new sets of functions with "f" suffixes that accept "float" arguments. Our experiments show that, on ARM platform, the "float" type versions are significantly faster than their double precision counterparts. For example, "float sinf(float)" is 1.87 times faster than "double sin(double)". > > However, this new set of functions are not always exploited by programmers. For example, a programmer may write: > void foo(float y) > float x = sin(y); > ... > } > instead of writing: > void foo(float y) > float x = sinf(y); > ... > } > > B. This optimization: > This optimization looks for missed opportunities, in which a lighter weighted function could be used without losing precision. There is precision loss in some cases, even with sin. This seems top me like a good example of an optimization that should be done in the source code, rather than the compiler. C front-ends could easily detect such opportunities, and could suggest the use of or the use of the appropriate "f" function as a fixit. This would make it easy for people to update their code to realize the speedups, while making their own determinations on when and where single-precision library calls are acceptable. Dan From weimingz at codeaurora.org Wed Nov 2 14:42:26 2011 From: weimingz at codeaurora.org (Weiming Zhao) Date: Wed, 2 Nov 2011 12:42:26 -0700 Subject: [llvm-commits] Patch: Math Lib call optimization In-Reply-To: <4EB18AE3.5060306@free.fr> References: <000001cc998a$3f9863f0$bec92bd0$@org> <4EB18AE3.5060306@free.fr> Message-ID: <000d01cc9997$8c708ec0$a551ac40$@org> Hi Duncan, Thanks for your comments. The precision loss will happen when the results of sin((double)x) and sinf(x) differ within a single precision ulps. It might happen only in very rare cases. So, theoretically, you're right. :D But in practice, I did experiments by comparing the results of (float)sin(x) and sinf(x) for random inputs. The results are the same. And for users who are really concern about precision, they can disable this pass. Weiming Zhao -----Original Message----- From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Duncan Sands Sent: Wednesday, November 02, 2011 11:25 AM To: llvm-commits at cs.uiuc.edu Subject: Re: [llvm-commits] Patch: Math Lib call optimization Dear Weiming Zhao, > Hence, this transformation will not result in precision loss. is this a correct statement? For example, if sin returns a result which is correct to within two double precision ulps, and sinf to within two single precision ulps, then float->double->sin->float will probably be correct to one single precision ulp, so converting to use sinf loses precision. Ciao, Duncan. _______________________________________________ llvm-commits mailing list llvm-commits at cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From weimingz at codeaurora.org Wed Nov 2 14:55:27 2011 From: weimingz at codeaurora.org (Weiming Zhao) Date: Wed, 2 Nov 2011 12:55:27 -0700 Subject: [llvm-commits] Patch: Math Lib call optimization In-Reply-To: References: <000001cc998a$3f9863f0$bec92bd0$@org> Message-ID: <000e01cc9999$5dfe61a0$19fb24e0$@org> Hi Eric, We took LLVM r143352, Clang r142951 and run against the tests on ARM Scorpion devices. The test-suite reported 61 fails and the test reported 1 Unexpected Passes and 40 Unexpected Failures. The test-suites were compiled with options: -O3, SMALL_PROBLEM_SIZE=1, USE_REFERENCE_OUTPUT=1, TEST=SIMPLE Among the 61 test-suites, 1 is compiling failure (MultiSource/Application/ClamAV) and the rests are running failures. For the ClamAV, the error is "zlib.h" not found in libclamav_cvd.c:34. I haven't check the runtime errors yet. Thanks, Weiming Zhao From: Eric Christopher [mailto:echristo at apple.com] Sent: Wednesday, November 02, 2011 11:22 AM To: Weiming Zhao Cc: llvm-commits at cs.uiuc.edu; rajav at codeaurora.org Subject: Re: [llvm-commits] Patch: Math Lib call optimization On Nov 2, 2011, at 11:07 AM, Weiming Zhao wrote: I noted failures running llvm/test (svn rev 143352) and projects/test-suite (svn rev 142659) . Could you be a bit more descriptive here? -eric -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111102/f821b60a/attachment.html From weimingz at codeaurora.org Wed Nov 2 15:30:07 2011 From: weimingz at codeaurora.org (Weiming Zhao) Date: Wed, 2 Nov 2011 13:30:07 -0700 Subject: [llvm-commits] Patch: Math Lib call optimization In-Reply-To: References: <000001cc998a$3f9863f0$bec92bd0$@org> <000e01cc9999$5dfe61a0$19fb24e0$@org> Message-ID: <001601cc999e$36309da0$a291d8e0$@org> Hi Eric, This is before the patch. After the patch, the failure number is the same, no new failures. The regression tests results (before our patch) were included in the fail list. After the patch, there is no changes on failure numbers. (Expected pass number is increased by one because we added a unit test file) Regressin test results: (before patch): Expected Passes : 5422 Expected Failures : 61 Unsupported Tests : 13 Unexpected Passes : 1 Unexpected Failures: 40 Weiming Zhao From: Eric Christopher [mailto:echristo at apple.com] Sent: Wednesday, November 02, 2011 1:11 PM To: Weiming Zhao Cc: llvm-commits at cs.uiuc.edu; rajav at codeaurora.org Subject: Re: [llvm-commits] Patch: Math Lib call optimization On Nov 2, 2011, at 12:55 PM, Weiming Zhao wrote: Hi Eric, We took LLVM r143352, Clang r142951 and run against the tests on ARM Scorpion devices. The test-suite reported 61 fails and the test reported 1 Unexpected Passes and 40 Unexpected Failures. The test-suites were compiled with options: -O3, SMALL_PROBLEM_SIZE=1, USE_REFERENCE_OUTPUT=1, TEST=SIMPLE Among the 61 test-suites, 1 is compiling failure (MultiSource/Application/ClamAV) and the rests are running failures. Is this with or without your patch? Were there regressions? Have you checked performance? Were there regressions? -eric -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111102/caed70df/attachment.html From weimingz at qualcomm.com Wed Nov 2 15:46:08 2011 From: weimingz at qualcomm.com (Zhao, Weiming) Date: Wed, 2 Nov 2011 20:46:08 +0000 Subject: [llvm-commits] Patch: Math Lib call optimization In-Reply-To: <6CC1C132-0E7E-4B54-85DB-67AC738F6F04@apple.com> References: <000001cc998a$3f9863f0$bec92bd0$@org> <6CC1C132-0E7E-4B54-85DB-67AC738F6F04@apple.com> Message-ID: <6903B1BCE9458047B3030A7E2D389E470EBAA595@nasanexd02c.na.qualcomm.com> Yes, it would be a very nice feature if C front-end could support this. But for existing .bc codes, such a pass still provides an opportunity to optimize the performance. -----Original Message----- From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Dan Gohman Sent: Wednesday, November 02, 2011 1:16 PM To: Weiming Zhao Cc: rajav at codeaurora.org; llvm-commits at cs.uiuc.edu Subject: Re: [llvm-commits] Patch: Math Lib call optimization On Nov 2, 2011, at 11:07 AM, Weiming Zhao wrote: > Hello, > > I worked on an LLVM patch to optimize mathematical library calls and would like to submit it to your review. > > A. Background: > In C89, most of the mathematical accept only the type "double" for the floating-point arguments. > Later on, in C99, this limitation was fixed by introducing new sets of functions with "f" suffixes that accept "float" arguments. Our experiments show that, on ARM platform, the "float" type versions are significantly faster than their double precision counterparts. For example, "float sinf(float)" is 1.87 times faster than "double sin(double)". > > However, this new set of functions are not always exploited by programmers. For example, a programmer may write: > void foo(float y) > float x = sin(y); > ... > } > instead of writing: > void foo(float y) > float x = sinf(y); > ... > } > > B. This optimization: > This optimization looks for missed opportunities, in which a lighter weighted function could be used without losing precision. There is precision loss in some cases, even with sin. This seems top me like a good example of an optimization that should be done in the source code, rather than the compiler. C front-ends could easily detect such opportunities, and could suggest the use of or the use of the appropriate "f" function as a fixit. This would make it easy for people to update their code to realize the speedups, while making their own determinations on when and where single-precision library calls are acceptable. Dan _______________________________________________ llvm-commits mailing list llvm-commits at cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From nicholas at mxc.ca Wed Nov 2 15:55:33 2011 From: nicholas at mxc.ca (Nick Lewycky) Date: Wed, 02 Nov 2011 20:55:33 -0000 Subject: [llvm-commits] [llvm] r143570 - in /llvm/trunk: lib/CodeGen/AsmPrinter/DwarfDebug.cpp lib/CodeGen/AsmPrinter/DwarfDebug.h test/CodeGen/X86/dbg-file-name.ll test/CodeGen/X86/dwarf-comp-dir.ll Message-ID: <20111102205533.D8EBA2A6C12C@llvm.org> Author: nicholas Date: Wed Nov 2 15:55:33 2011 New Revision: 143570 URL: http://llvm.org/viewvc/llvm-project?rev=143570&view=rev Log: Don't emit a directory entry for the value in DW_AT_comp_dir, that is always implied by directory index zero. Added: llvm/trunk/test/CodeGen/X86/dwarf-comp-dir.ll Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h llvm/trunk/test/CodeGen/X86/dbg-file-name.ll Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=143570&r1=143569&r2=143570&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Wed Nov 2 15:55:33 2011 @@ -442,6 +442,10 @@ if (FileName.empty()) return GetOrCreateSourceID("", StringRef()); + // TODO: this might not belong here. See if we can factor this better. + if (DirName == CompilationDir) + DirName = ""; + unsigned SrcId = SourceIdMap.size()+1; std::pair SourceName = std::make_pair(FileName, DirName); @@ -466,8 +470,8 @@ CompileUnit *DwarfDebug::constructCompileUnit(const MDNode *N) { DICompileUnit DIUnit(N); StringRef FN = DIUnit.getFilename(); - StringRef Dir = DIUnit.getDirectory(); - unsigned ID = GetOrCreateSourceID(FN, Dir); + CompilationDir = DIUnit.getDirectory(); + unsigned ID = GetOrCreateSourceID(FN, CompilationDir); DIE *Die = new DIE(dwarf::DW_TAG_compile_unit); CompileUnit *NewCU = new CompileUnit(ID, Die, Asm, this); @@ -486,8 +490,8 @@ else NewCU->addUInt(Die, dwarf::DW_AT_stmt_list, dwarf::DW_FORM_data4, 0); - if (!Dir.empty()) - NewCU->addString(Die, dwarf::DW_AT_comp_dir, Dir); + if (!CompilationDir.empty()) + NewCU->addString(Die, dwarf::DW_AT_comp_dir, CompilationDir); if (DIUnit.isOptimized()) NewCU->addUInt(Die, dwarf::DW_AT_APPLE_optimized, dwarf::DW_FORM_flag, 1); Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h?rev=143570&r1=143569&r2=143570&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h Wed Nov 2 15:55:33 2011 @@ -302,6 +302,10 @@ MCSymbol *DwarfDebugLocSectionSym; MCSymbol *FunctionBeginSym, *FunctionEndSym; + // As an optimization, there is no need to emit an entry in the directory + // table for the same directory as DW_at_comp_dir. + StringRef CompilationDir; + private: /// assignAbbrevNumber - Define a unique number for the abbreviation. Modified: llvm/trunk/test/CodeGen/X86/dbg-file-name.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/dbg-file-name.ll?rev=143570&r1=143569&r2=143570&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/dbg-file-name.ll (original) +++ llvm/trunk/test/CodeGen/X86/dbg-file-name.ll Wed Nov 2 15:55:33 2011 @@ -1,7 +1,7 @@ ; RUN: llc -enable-dwarf-directory -mtriple x86_64-apple-darwin10.0.0 < %s | FileCheck %s ; Radar 8884898 -; CHECK: file 1 "/Users/manav/one/two" "simple.c" +; CHECK: file 1 "simple.c" declare i32 @printf(i8*, ...) nounwind Added: llvm/trunk/test/CodeGen/X86/dwarf-comp-dir.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/dwarf-comp-dir.ll?rev=143570&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/dwarf-comp-dir.ll (added) +++ llvm/trunk/test/CodeGen/X86/dwarf-comp-dir.ll Wed Nov 2 15:55:33 2011 @@ -0,0 +1,16 @@ +; RUN: llc %s -o %t -filetype=obj +; RUN: llvm-dwarfdump %t | FileCheck %s + +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-S128" +target triple = "x86_64-unknown-linux-gnu" + +!llvm.dbg.cu = !{!0} + +!0 = metadata !{i32 720913, i32 0, i32 12, metadata !"empty.c", metadata !"/home/nlewycky", metadata !"clang version 3.1 (trunk 143523)", i1 true, i1 true, metadata !"", i32 0, metadata !1, metadata !1, metadata !1, metadata !1} ; [ DW_TAG_compile_unit ] +!1 = metadata !{metadata !2} +!2 = metadata !{i32 0} + +; The important part of the following check is that dir = #0. +; Dir Mod Time File Len File Name +; ---- ---------- ---------- --------------------------- +; CHECK: file_names[ 1] 0 0x00000000 0x00000000 empty.c From nicholas at mxc.ca Wed Nov 2 16:02:28 2011 From: nicholas at mxc.ca (Nick Lewycky) Date: Wed, 02 Nov 2011 21:02:28 -0000 Subject: [llvm-commits] [llvm] r143571 - /llvm/trunk/test/CMakeLists.txt Message-ID: <20111102210228.39FD22A6C12C@llvm.org> Author: nicholas Date: Wed Nov 2 16:02:27 2011 New Revision: 143571 URL: http://llvm.org/viewvc/llvm-project?rev=143571&view=rev Log: I added the first test to run llvm-dwarfdump. Modified: llvm/trunk/test/CMakeLists.txt Modified: llvm/trunk/test/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CMakeLists.txt?rev=143571&r1=143570&r2=143571&view=diff ============================================================================== --- llvm/trunk/test/CMakeLists.txt (original) +++ llvm/trunk/test/CMakeLists.txt Wed Nov 2 16:02:27 2011 @@ -77,7 +77,7 @@ add_dependencies(check.deps UnitTests BugpointPasses LLVMHello - llc lli llvm-ar llvm-as llvm-dis llvm-extract + llc lli llvm-ar llvm-as llvm-dis llvm-extract llvm-dwarfdump llvm-ld llvm-link llvm-mc llvm-nm llvm-objdump macho-dump opt FileCheck count not) set_target_properties(check.deps PROPERTIES FOLDER "Tests") From deeppatel1987 at gmail.com Wed Nov 2 16:14:45 2011 From: deeppatel1987 at gmail.com (Sandeep Patel) Date: Wed, 2 Nov 2011 21:14:45 +0000 Subject: [llvm-commits] Patch: Math Lib call optimization In-Reply-To: <000d01cc9997$8c708ec0$a551ac40$@org> References: <000001cc998a$3f9863f0$bec92bd0$@org> <4EB18AE3.5060306@free.fr> <000d01cc9997$8c708ec0$a551ac40$@org> Message-ID: This seems like a -ffast-math optimization in this case. deep On Wed, Nov 2, 2011 at 7:42 PM, Weiming Zhao wrote: > Hi Duncan, > > Thanks for your comments. > > The precision loss will happen when the results of sin((double)x) and > sinf(x) differ within a single precision ulps. It might happen only in very > rare cases. So, theoretically, you're right. :D > But in practice, I did experiments by comparing the results of (float)sin(x) > and sinf(x) for random inputs. The results are the same. And for users who > are really concern about precision, they can disable this pass. > > Weiming Zhao > > > -----Original Message----- > From: llvm-commits-bounces at cs.uiuc.edu > [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Duncan Sands > Sent: Wednesday, November 02, 2011 11:25 AM > To: llvm-commits at cs.uiuc.edu > Subject: Re: [llvm-commits] Patch: Math Lib call optimization > > Dear Weiming Zhao, > >> Hence, this transformation will not result in precision loss. > > is this a correct statement? ?For example, if sin returns a result which is > correct to within two double precision ulps, and sinf to within two single > precision ulps, then float->double->sin->float will probably be correct to > one single precision ulp, so converting to use sinf loses precision. > > Ciao, Duncan. > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > From scanon at apple.com Wed Nov 2 16:19:33 2011 From: scanon at apple.com (Stephen Canon) Date: Wed, 02 Nov 2011 17:19:33 -0400 Subject: [llvm-commits] Patch: Math Lib call optimization In-Reply-To: <000d01cc9997$8c708ec0$a551ac40$@org> References: <000001cc998a$3f9863f0$bec92bd0$@org> <4EB18AE3.5060306@free.fr> <000d01cc9997$8c708ec0$a551ac40$@org> Message-ID: <6DB7267A-A20D-46BC-87AF-54711D66B86C@apple.com> On Nov 2, 2011, at 3:42 PM, Weiming Zhao wrote: > The precision loss will happen when the results of sin((double)x) and > sinf(x) differ within a single precision ulps. It might happen only in very > rare cases. So, theoretically, you're right. :D > But in practice, I did experiments by comparing the results of (float)sin(x) > and sinf(x) for random inputs. The results are the same. And for users who > are really concern about precision, they can disable this pass. This is entirely dependent on the target platform's libm, and very much not true in general. This is not a safe optimization to perform unless it is explicitly licensed by the user. There exist platforms on which even basic single-precision functions like powf( ) have many ulps of error, and calling the double-precision function instead is a standard way for users to guard against this. (Note that a pow( ) implementation with thousands of ulps of error still gives a sub-ulp accurate powf( )). Certainly flag it in the front end. Suggest to the user that they should enable this optimization. But this should not be enabled by default. I question your methodology of comparing the results for random inputs. There are only 4 billion single-precision numbers, it is easy enough to compare all of them. However, I will save you the time: on most platforms with decent math libraries, there exist inputs for which sinf(x) != sin(x). In order to make a good accuracy/performance tradeoff, most good math libraries aim for ~.5x ulps of error (where x is some digit, depending on the library). As there exist single-precision values for which the mathematically-precise sinf(x) is within .01 ulps of an exact halfway point for rounding, there will almost certainly be cases for which sin(x) != sinf(x). In fact, nearly the only way to avoid this is to simply implement sinf(x) as (float)sin(x), in which case no performance is gained. Note that there are many libm functions for which this is a viable optimization: all of the rounding functions (assuming the result is subsequently converted back to single), fmod and remainder (because they are always exact), sqrt (because only 2p+2 bits are required to round square root correctly, and double has more than twice the bits of float plus two). As far as I know, some of these are already implemented in llvm (sqrt, at the very least). Cheers, - Steve From grosser at fim.uni-passau.de Wed Nov 2 16:37:06 2011 From: grosser at fim.uni-passau.de (Tobias Grosser) Date: Wed, 02 Nov 2011 21:37:06 -0000 Subject: [llvm-commits] [polly] r143574 - in /polly/trunk: lib/Analysis/TempScopInfo.cpp test/ScopInfo/sum.ll Message-ID: <20111102213706.AAAD62A6C12C@llvm.org> Author: grosser Date: Wed Nov 2 16:37:06 2011 New Revision: 143574 URL: http://llvm.org/viewvc/llvm-project?rev=143574&view=rev Log: TempScopInfo: Print the original SCEV instead of using SCEVAffFunc This is reducing the impact of SCEVAffFunc Modified: polly/trunk/lib/Analysis/TempScopInfo.cpp polly/trunk/test/ScopInfo/sum.ll Modified: polly/trunk/lib/Analysis/TempScopInfo.cpp URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/TempScopInfo.cpp?rev=143574&r1=143573&r2=143574&view=diff ============================================================================== --- polly/trunk/lib/Analysis/TempScopInfo.cpp (original) +++ polly/trunk/lib/Analysis/TempScopInfo.cpp Wed Nov 2 16:37:06 2011 @@ -156,7 +156,7 @@ if (at != LoopBounds.end()) { OS.indent(ind) << "Bounds of Loop: " << at->first->getHeader()->getName() << ":\t{ "; - at->second.print(OS, false); + OS << *(at->second.OriginalSCEV); OS << " }\n"; ind += 2; } Modified: polly/trunk/test/ScopInfo/sum.ll URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/ScopInfo/sum.ll?rev=143574&r1=143573&r2=143574&view=diff ============================================================================== --- polly/trunk/test/ScopInfo/sum.ll (original) +++ polly/trunk/test/ScopInfo/sum.ll Wed Nov 2 16:37:06 2011 @@ -11,11 +11,6 @@ ; } ; return k; ;} - - -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-linux-gnu" - define i64 @f(i64* nocapture %a, i64 %n) nounwind readonly { entry: %0 = icmp sgt i64 %n, 1 ; [#uses=1] @@ -40,7 +35,7 @@ ret i64 %k.0.lcssa } -; CHECK: Bounds of Loop: bb: { 1 * %n + -2 } +; CHECK: Bounds of Loop: bb: { (-2 + %n) } ; CHECK: BB: bb{ ; CHECK: Reads %k.05.reg2mem[0] Refs: Must alias {%k.05.reg2mem, } May alias {}, ; CHECK: Reads %a[8 * {0,+,1}<%bb> + 8] Refs: Must alias {%a, } May alias {}, From grosser at fim.uni-passau.de Wed Nov 2 16:37:51 2011 From: grosser at fim.uni-passau.de (Tobias Grosser) Date: Wed, 02 Nov 2011 21:37:51 -0000 Subject: [llvm-commits] [polly] r143575 - in /polly/trunk: include/polly/TempScopInfo.h lib/Analysis/ScopInfo.cpp lib/Analysis/TempScopInfo.cpp Message-ID: <20111102213751.BE6942A6C12C@llvm.org> Author: grosser Date: Wed Nov 2 16:37:51 2011 New Revision: 143575 URL: http://llvm.org/viewvc/llvm-project?rev=143575&view=rev Log: TempScop: Remove SCEVAffFunc from LoopBoundInfo This is not needed anymore -> Reduce impact of SCEVAffFunc. Modified: polly/trunk/include/polly/TempScopInfo.h polly/trunk/lib/Analysis/ScopInfo.cpp polly/trunk/lib/Analysis/TempScopInfo.cpp Modified: polly/trunk/include/polly/TempScopInfo.h URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/TempScopInfo.h?rev=143575&r1=143574&r2=143575&view=diff ============================================================================== --- polly/trunk/include/polly/TempScopInfo.h (original) +++ polly/trunk/include/polly/TempScopInfo.h Wed Nov 2 16:37:51 2011 @@ -167,7 +167,7 @@ /// A canonical induction variable is: /// an integer recurrence that starts at 0 and increments by one each time /// through the loop. -typedef std::map LoopBoundMapType; +typedef std::map LoopBoundMapType; /// Mapping BBs to its condition constrains typedef std::map BBCondMapType; @@ -234,7 +234,7 @@ /// /// @return The bounds of the loop L in { Lower bound, Upper bound } form. /// - const SCEVAffFunc &getLoopBound(const Loop *L) const { + const SCEV *getLoopBound(const Loop *L) const { LoopBoundMapType::const_iterator at = LoopBounds.find(L); assert(at != LoopBounds.end() && "Only valid loop is allow!"); return at->second; Modified: polly/trunk/lib/Analysis/ScopInfo.cpp URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=143575&r1=143574&r2=143575&view=diff ============================================================================== --- polly/trunk/lib/Analysis/ScopInfo.cpp (original) +++ polly/trunk/lib/Analysis/ScopInfo.cpp Wed Nov 2 16:37:51 2011 @@ -639,7 +639,7 @@ // IV <= LatchExecutions. const Loop *L = getLoopForDimension(i); - const SCEV *LatchExecutions = tempScop.getLoopBound(L).OriginalSCEV; + const SCEV *LatchExecutions = tempScop.getLoopBound(L); isl_pw_aff *UpperBound = SCEVAffinator::getPwAff(this, LatchExecutions); isl_set *UpperBoundSet = isl_pw_aff_le_set(IV, UpperBound); Domain = isl_set_intersect(Domain, UpperBoundSet); Modified: polly/trunk/lib/Analysis/TempScopInfo.cpp URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/TempScopInfo.cpp?rev=143575&r1=143574&r2=143575&view=diff ============================================================================== --- polly/trunk/lib/Analysis/TempScopInfo.cpp (original) +++ polly/trunk/lib/Analysis/TempScopInfo.cpp Wed Nov 2 16:37:51 2011 @@ -156,7 +156,7 @@ if (at != LoopBounds.end()) { OS.indent(ind) << "Bounds of Loop: " << at->first->getHeader()->getName() << ":\t{ "; - OS << *(at->second.OriginalSCEV); + OS << *(at->second); OS << " }\n"; ind += 2; } @@ -279,9 +279,14 @@ if (LoopBounds.find(L) != LoopBounds.end()) continue; - const SCEV *LoopCount = SE->getBackedgeTakenCount(L); - LoopBounds[L] = SCEVAffFunc(SCEVAffFunc::Eq, LoopCount); - buildAffineFunction(LoopCount, LoopBounds[L], Scop.getMaxRegion(), + const SCEV *BackedgeTakenCount = SE->getBackedgeTakenCount(L); + LoopBounds[L] = BackedgeTakenCount; + + // FIXME: Do not build TempSCEVAffFunc. It is not needed anywhere else + // and only build to register the parameters in this SCoP. We should + // move this functionality to the ScopDetection. + SCEVAffFunc Temp(SCEVAffFunc::Eq, BackedgeTakenCount); + buildAffineFunction(BackedgeTakenCount, Temp, Scop.getMaxRegion(), Scop.getParamSet()); Loop *OL = R.outermostLoopInRegion(L); From grosser at fim.uni-passau.de Wed Nov 2 16:40:08 2011 From: grosser at fim.uni-passau.de (Tobias Grosser) Date: Wed, 02 Nov 2011 21:40:08 -0000 Subject: [llvm-commits] [polly] r143576 - /polly/trunk/lib/Analysis/ScopDetection.cpp Message-ID: <20111102214008.8D8D72A6C12C@llvm.org> Author: grosser Date: Wed Nov 2 16:40:08 2011 New Revision: 143576 URL: http://llvm.org/viewvc/llvm-project?rev=143576&view=rev Log: ScopDetection: Add new SCEV Validator The SCEV Validator is used to check if the bound of a loop can be translated into a polyhedral constraint. The new validator is more general as the check used previously and e.g. allows bounds like 'smax 1, %a'. At the moment, we only allow signed comparisons. Also, the new validator is only used to verify loop bounds. Memory accesses are still handled by the old validator. Modified: polly/trunk/lib/Analysis/ScopDetection.cpp Modified: polly/trunk/lib/Analysis/ScopDetection.cpp URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopDetection.cpp?rev=143576&r1=143575&r2=143576&view=diff ============================================================================== --- polly/trunk/lib/Analysis/ScopDetection.cpp (original) +++ polly/trunk/lib/Analysis/ScopDetection.cpp Wed Nov 2 16:40:08 2011 @@ -109,6 +109,162 @@ //===----------------------------------------------------------------------===// // ScopDetection. +namespace SCEVType { + enum TYPE {INT, PARAM, IV, INVALID}; +} + +/// Check if a SCEV is valid in a SCoP. +struct SCEVValidator : public SCEVVisitor { +private: + const Region *R; + ScalarEvolution &SE; + const Value **BaseAddress; + +public: + static bool isValid(const Region *R, const SCEV *Scev, + ScalarEvolution &SE, + const Value **BaseAddress = NULL) { + if (isa(Scev)) + return false; + + SCEVValidator Validator(R, SE, BaseAddress); + return Validator.visit(Scev) != SCEVType::INVALID; + } + + SCEVValidator(const Region *R, ScalarEvolution &SE, + const Value **BaseAddress) : R(R), SE(SE), + BaseAddress(BaseAddress) {}; + + SCEVType::TYPE visitConstant(const SCEVConstant *Constant) { + return SCEVType::INT; + } + + SCEVType::TYPE visitTruncateExpr(const SCEVTruncateExpr* Expr) { + SCEVType::TYPE Op = visit(Expr->getOperand()); + + // We cannot represent this as a affine expression yet. If it is constant + // during Scop execution treat this as a parameter, otherwise bail out. + if (Op == SCEVType::INT || Op == SCEVType::PARAM) + return SCEVType::PARAM; + + return SCEVType::INVALID; + } + + SCEVType::TYPE visitZeroExtendExpr(const SCEVZeroExtendExpr * Expr) { + SCEVType::TYPE Op = visit(Expr->getOperand()); + + // We cannot represent this as a affine expression yet. If it is constant + // during Scop execution treat this as a parameter, otherwise bail out. + if (Op == SCEVType::INT || Op == SCEVType::PARAM) + return SCEVType::PARAM; + + return SCEVType::INVALID; + } + + SCEVType::TYPE visitSignExtendExpr(const SCEVSignExtendExpr* Expr) { + // Assuming the value is signed, a sign extension is basically a noop. + // TODO: Reconsider this as soon as we support unsigned values. + return visit(Expr->getOperand()); + } + + SCEVType::TYPE visitAddExpr(const SCEVAddExpr* Expr) { + SCEVType::TYPE Return = SCEVType::INT; + + for (int i = 0, e = Expr->getNumOperands(); i < e; ++i) { + SCEVType::TYPE OpType = visit(Expr->getOperand(i)); + Return = std::max(Return, OpType); + } + + // TODO: Check for NSW and NUW. + return Return; + } + + SCEVType::TYPE visitMulExpr(const SCEVMulExpr* Expr) { + SCEVType::TYPE Return = SCEVType::INT; + + for (int i = 0, e = Expr->getNumOperands(); i < e; ++i) { + SCEVType::TYPE OpType = visit(Expr->getOperand(i)); + + if (OpType == SCEVType::INVALID) + return SCEVType::INVALID; + + if (OpType == SCEVType::IV) { + if (Return == SCEVType::PARAM || Return == SCEVType::IV) + return SCEVType::INVALID; + + Return = OpType; + continue; + } + + if (OpType == SCEVType::PARAM) { + if (Return == SCEVType::PARAM) + return SCEVType::INVALID; + + Return = SCEVType::PARAM; + continue; + } + + // OpType == SCEVType::INT, no need to change anything. + } + + // TODO: Check for NSW and NUW. + return Return; + } + + SCEVType::TYPE visitUDivExpr(const SCEVUDivExpr* Expr) { + // We do not yet support unsigned operations. + return SCEVType::INVALID; + } + + SCEVType::TYPE visitAddRecExpr(const SCEVAddRecExpr* Expr) { + if (!Expr->isAffine()) + return SCEVType::INVALID; + + SCEVType::TYPE Start = visit(Expr->getStart()); + + if (Start == SCEVType::INVALID) + return Start; + + SCEVType::TYPE Recurrence = visit(Expr->getStepRecurrence(SE)); + if (Recurrence != SCEVType::INT) + return SCEVType::INVALID; + + return SCEVType::PARAM; + } + + SCEVType::TYPE visitSMaxExpr(const SCEVSMaxExpr* Expr) { + SCEVType::TYPE Return = SCEVType::INT; + + for (int i = 0, e = Expr->getNumOperands(); i < e; ++i) { + SCEVType::TYPE OpType = visit(Expr->getOperand(i)); + + if (OpType == SCEVType::INVALID) + return SCEVType::INVALID; + if (OpType == SCEVType::PARAM) + Return = SCEVType::PARAM; + } + + return Return; + } + + SCEVType::TYPE visitUMaxExpr(const SCEVUMaxExpr* Expr) { + // We do not yet support unsigned operations. If 'Expr' is constant + // during Scop execution treat this as a parameter, otherwise bail out. + for (int i = 0, e = Expr->getNumOperands(); i < e; ++i) { + SCEVType::TYPE OpType = visit(Expr->getOperand(i)); + + if (OpType != SCEVType::INT && OpType != SCEVType::PARAM) + return SCEVType::PARAM; + } + + return SCEVType::PARAM; + } + + SCEVType::TYPE visitUnknown(const SCEVUnknown* Expr) { + return SCEVType::PARAM; + } +}; + bool ScopDetection::isMaxRegionInScop(const Region &R) const { // The Region is valid only if it could be found in the set. return ValidRegions.count(&R); @@ -401,7 +557,7 @@ // Is the loop count affine? const SCEV *LoopCount = SE->getBackedgeTakenCount(L); - if (!isValidAffineFunction(LoopCount, Context.CurRegion)) + if (!SCEVValidator::isValid(&Context.CurRegion, LoopCount, *SE)) INVALID(LoopBound, "Non affine loop bound '" << *LoopCount << "' in loop: " << L->getHeader()->getNameStr()); From gkistanova at gmail.com Wed Nov 2 17:05:18 2011 From: gkistanova at gmail.com (Galina Kistanova) Date: Wed, 02 Nov 2011 22:05:18 -0000 Subject: [llvm-commits] [llvm] r143578 - /llvm/trunk/docs/HowToAddABuilder.html Message-ID: <20111102220518.DF43E2A6C12C@llvm.org> Author: gkistanova Date: Wed Nov 2 17:05:18 2011 New Revision: 143578 URL: http://llvm.org/viewvc/llvm-project?rev=143578&view=rev Log: Few corrections on the document page. Modified: llvm/trunk/docs/HowToAddABuilder.html Modified: llvm/trunk/docs/HowToAddABuilder.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/HowToAddABuilder.html?rev=143578&r1=143577&r2=143578&view=diff ============================================================================== --- llvm/trunk/docs/HowToAddABuilder.html (original) +++ llvm/trunk/docs/HowToAddABuilder.html Wed Nov 2 17:05:18 2011 @@ -8,10 +8,10 @@ -

    How To Release LLVM To The Public

    +

    How To Add Your Build Configuration To LLVM Buildbot Infrastructure

    1. Introduction
    2. -
    3. Steps To Add Builder To LLVM Buildbot
    4. +
    5. Steps To Add Builder To LLVM Buildbot

    Written by Galina Kistanova @@ -24,8 +24,9 @@

    -

    This document contains information about adding private slave builder to - LLVM Buildbot Infrastructure: http://lab.llvm.org:8011 +

    This document contains information about adding a build configuration and + buildslave to private slave builder to LLVM Buildbot Infrastructure + http://lab.llvm.org:8011

    @@ -33,7 +34,7 @@
    -

    Volunters can provide there build machines to work as slave builders to +

    Volunteers can provide their build machines to work as build slaves to public LLVM Buildbot. Below described recommended steps to implement this task.

    @@ -42,8 +43,8 @@
    1. Check the existing build configurations to make sure the one you are interested in is not covered yet or gets built on your computer much - faster than existing one. We prefer faster builds so developers will get - feedback sooner after changes get committed.

    2. + faster than on the existing one. We prefer faster builds so developers + will get feedback sooner after changes get committed.

    3. The computer you will be registering with the LLVM buildbot infrastructure should have all dependencies installed and you can @@ -53,7 +54,8 @@

    4. Install buildslave (currently we are using buildbot version 0.8.5). Depending on the platform, buildslave could be available to download and install with your packet manager, or you can download it directly from - http://trac.buildbot.net/ and install it manually.

    5. + http://trac.buildbot.net and + install it manually.

    6. Create a designated user account your buildslave will be running under.

    7. @@ -63,7 +65,7 @@ to authenticate your build slave.

    8. Then create a build slave in context of that buildslave account. - Point it to the lab.llvm.org port 9990
      + Point it to the lab.llvm.org port 9990
      (see http://buildbot.net/buildbot/docs/current/full.html#creating-a-slave for more details) by running the following command:

      @@ -78,7 +80,7 @@
                  Windows 7 x64
                  Core i7 (2.66GHz), 16GB of RAM
      -           
      +
                  g++.exe (TDM-1 mingw32) 4.4.0
                  GNU Binutils 2.19.1
                  cmake version 2.8.4
      @@ -87,7 +89,7 @@
       
         
    9. Make sure you can actually start the buildslave successfully. Then set up your build slave to start automatically at the start up time. - See buildbot manual for help.

    10. + See buildbot manual for help. You may want to restart your computer to see if it works.

    11. Send a patch which adds your build slave and builder to zorg.
      * slaves are added to
      @@ -98,7 +100,13 @@

    12. Then send the buildslave access name and password directly to Galina Kistanova -

    13. Finally, the end!

    14. +
    15. Check the status of your buildslave on + http://lab.llvm.org:8011/waterfall to make sure it is connected, and + http://lab.llvm.org:8011/buildslaves/<your buildslave name> to see + if the information is correct.

    16. + +
    17. Wait for the first build to succeed and see if it could go faster with + higher degree of parallelism (-j param).

    From lhames at gmail.com Wed Nov 2 17:52:45 2011 From: lhames at gmail.com (Lang Hames) Date: Wed, 02 Nov 2011 22:52:45 -0000 Subject: [llvm-commits] [llvm] r143582 - in /llvm/trunk: lib/Target/ARM/ARMISelLowering.cpp lib/Target/ARM/ARMISelLowering.h test/CodeGen/ARM/2011-10-26-memset-with-neon.ll Message-ID: <20111102225245.D9CB92A6C12C@llvm.org> Author: lhames Date: Wed Nov 2 17:52:45 2011 New Revision: 143582 URL: http://llvm.org/viewvc/llvm-project?rev=143582&view=rev Log: Try to lower memset/memcpy/memmove to vector instructions on ARM where the alignment permits. Added: llvm/trunk/test/CodeGen/ARM/2011-10-26-memset-with-neon.ll Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp llvm/trunk/lib/Target/ARM/ARMISelLowering.h Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=143582&r1=143581&r2=143582&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Wed Nov 2 17:52:45 2011 @@ -8127,6 +8127,34 @@ } } +static bool memOpAlign(unsigned DstAlign, unsigned SrcAlign, + unsigned AlignCheck) { + return ((SrcAlign == 0 || SrcAlign % AlignCheck == 0) && + (DstAlign == 0 || DstAlign % AlignCheck == 0)); +} + +EVT ARMTargetLowering::getOptimalMemOpType(uint64_t Size, + unsigned DstAlign, unsigned SrcAlign, + bool NonScalarIntSafe, + bool MemcpyStrSrc, + MachineFunction &MF) const { + const Function *F = MF.getFunction(); + + // See if we can use NEON instructions for this... + if (NonScalarIntSafe && + !F->hasFnAttr(Attribute::NoImplicitFloat) && + Subtarget->hasNEON()) { + if (memOpAlign(SrcAlign, DstAlign, 16) && Size >= 16) { + return MVT::v4i32; + } else if (memOpAlign(SrcAlign, DstAlign, 8) && Size >= 8) { + return MVT::v2i32; + } + } + + // Let the target-independent logic figure it out. + return MVT::Other; +} + static bool isLegalT1AddressImmediate(int64_t V, EVT VT) { if (V < 0) return false; Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.h?rev=143582&r1=143581&r2=143582&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.h (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.h Wed Nov 2 17:52:45 2011 @@ -266,9 +266,14 @@ /// allowsUnalignedMemoryAccesses - Returns true if the target allows /// unaligned memory accesses. of the specified type. - /// FIXME: Add getOptimalMemOpType to implement memcpy with NEON? virtual bool allowsUnalignedMemoryAccesses(EVT VT) const; + virtual EVT getOptimalMemOpType(uint64_t Size, + unsigned DstAlign, unsigned SrcAlign, + bool NonScalarIntSafe, + bool MemcpyStrSrc, + MachineFunction &MF) const; + /// isLegalAddressingMode - Return true if the addressing mode represented /// by AM is legal for this target, for a load/store of the specified type. virtual bool isLegalAddressingMode(const AddrMode &AM, Type *Ty)const; Added: llvm/trunk/test/CodeGen/ARM/2011-10-26-memset-with-neon.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/2011-10-26-memset-with-neon.ll?rev=143582&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/ARM/2011-10-26-memset-with-neon.ll (added) +++ llvm/trunk/test/CodeGen/ARM/2011-10-26-memset-with-neon.ll Wed Nov 2 17:52:45 2011 @@ -0,0 +1,20 @@ +; RUN: llc -march=arm -mcpu=cortex-a8 < %s | FileCheck %s + +; Should trigger a NEON store. +; CHECK: vstr.64 +define void @f_0_12(i8* nocapture %c) nounwind optsize { +entry: + call void @llvm.memset.p0i8.i64(i8* %c, i8 0, i64 12, i32 8, i1 false) + ret void +} + +; Trigger multiple NEON stores. +; CHECK: vstmia +; CHECK-NEXT: vstmia +define void @f_0_40(i8* nocapture %c) nounwind optsize { +entry: + call void @llvm.memset.p0i8.i64(i8* %c, i8 0, i64 40, i32 16, i1 false) + ret void +} + +declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind From isanbard at gmail.com Wed Nov 2 18:20:59 2011 From: isanbard at gmail.com (Bill Wendling) Date: Wed, 02 Nov 2011 23:20:59 -0000 Subject: [llvm-commits] [llvm] r143590 - /llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp Message-ID: <20111102232059.177C92A6C12C@llvm.org> Author: void Date: Wed Nov 2 18:20:58 2011 New Revision: 143590 URL: http://llvm.org/viewvc/llvm-project?rev=143590&view=rev Log: An array of chars of length 8 will also cause the stack protector to be inserted into the function. Reflect that here so that the array will be placed next to the SP. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp?rev=143590&r1=143589&r2=143590&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp Wed Nov 2 18:20:58 2011 @@ -92,7 +92,7 @@ // candidate. I.e., it would trigger the creation of a stack protector. bool MayNeedSP = (AI->isArrayAllocation() || - (TySize > 8 && isa(Ty) && + (TySize >= 8 && isa(Ty) && cast(Ty)->getElementType()->isIntegerTy(8))); StaticAllocaMap[AI] = MF->getFrameInfo()->CreateStackObject(TySize, Align, false, MayNeedSP); From mcrosier at apple.com Wed Nov 2 18:21:55 2011 From: mcrosier at apple.com (Chad Rosier) Date: Wed, 02 Nov 2011 23:21:55 -0000 Subject: [llvm-commits] [llvm] r143591 - /llvm/trunk/lib/Object/Archive.cpp Message-ID: <20111102232155.6CD092A6C12C@llvm.org> Author: mcrosier Date: Wed Nov 2 18:21:55 2011 New Revision: 143591 URL: http://llvm.org/viewvc/llvm-project?rev=143591&view=rev Log: Removed unused variable. Modified: llvm/trunk/lib/Object/Archive.cpp Modified: llvm/trunk/lib/Object/Archive.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/Archive.cpp?rev=143591&r1=143590&r2=143591&view=diff ============================================================================== --- llvm/trunk/lib/Object/Archive.cpp (original) +++ llvm/trunk/lib/Object/Archive.cpp Wed Nov 2 18:21:55 2011 @@ -223,7 +223,6 @@ uint32_t member_count = *reinterpret_cast(buf); const char *offsets = buf + 4; buf += 4 + (member_count * 4); // Skip offsets. - uint32_t symbol_count = *reinterpret_cast(buf); const char *indicies = buf + 4; uint16_t offsetindex = From lhames at gmail.com Wed Nov 2 18:37:04 2011 From: lhames at gmail.com (Lang Hames) Date: Wed, 02 Nov 2011 23:37:04 -0000 Subject: [llvm-commits] [llvm] r143594 - in /llvm/trunk/lib/Target/ARM: ARMISelLowering.cpp ARMISelLowering.h Message-ID: <20111102233704.757222A6C12C@llvm.org> Author: lhames Date: Wed Nov 2 18:37:04 2011 New Revision: 143594 URL: http://llvm.org/viewvc/llvm-project?rev=143594&view=rev Log: Fixed parameter name. Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp llvm/trunk/lib/Target/ARM/ARMISelLowering.h Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=143594&r1=143593&r2=143594&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Wed Nov 2 18:37:04 2011 @@ -8135,13 +8135,13 @@ EVT ARMTargetLowering::getOptimalMemOpType(uint64_t Size, unsigned DstAlign, unsigned SrcAlign, - bool NonScalarIntSafe, + bool IsZeroVal, bool MemcpyStrSrc, MachineFunction &MF) const { const Function *F = MF.getFunction(); // See if we can use NEON instructions for this... - if (NonScalarIntSafe && + if (IsZeroVal && !F->hasFnAttr(Attribute::NoImplicitFloat) && Subtarget->hasNEON()) { if (memOpAlign(SrcAlign, DstAlign, 16) && Size >= 16) { Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.h?rev=143594&r1=143593&r2=143594&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.h (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.h Wed Nov 2 18:37:04 2011 @@ -270,7 +270,7 @@ virtual EVT getOptimalMemOpType(uint64_t Size, unsigned DstAlign, unsigned SrcAlign, - bool NonScalarIntSafe, + bool IsZeroVal, bool MemcpyStrSrc, MachineFunction &MF) const; From peter_cooper at apple.com Wed Nov 2 19:11:38 2011 From: peter_cooper at apple.com (Peter Cooper) Date: Wed, 02 Nov 2011 17:11:38 -0700 Subject: [llvm-commits] patch: treat selector ref globals as constant in MachineLICM Message-ID: <789843C7-5EF1-47F4-83A7-FC16D47AA90E@apple.com> Hi Please review this patch to allow the compiler to treat objc selector reference globals as constant when optimizing. These globals aren't actually constant at compile time in that the value they point at may be changed by the linker or runtime, but the value they have is the same for all loads from that address once the program has started. Ideally this code shouldn't be checking for the name of the global, but the correct change likely involves adding a new linkage type which is much more significant and overkill while there's only one type of variable this applies to. Thanks, Pete -------------- next part -------------- A non-text attachment was scrubbed... Name: selref.patch Type: application/octet-stream Size: 3408 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111102/49f5c6f3/attachment.obj From mcrosier at apple.com Wed Nov 2 19:14:01 2011 From: mcrosier at apple.com (Chad Rosier) Date: Thu, 03 Nov 2011 00:14:01 -0000 Subject: [llvm-commits] [llvm] r143598 - in /llvm/trunk: include/llvm/Bitcode/LLVMBitCodes.h lib/Bitcode/Reader/BitcodeReader.cpp lib/Bitcode/Writer/BitcodeWriter.cpp tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp Message-ID: <20111103001401.A28112A6C12C@llvm.org> Author: mcrosier Date: Wed Nov 2 19:14:01 2011 New Revision: 143598 URL: http://llvm.org/viewvc/llvm-project?rev=143598&view=rev Log: Remove some cruft from the BitcodeWriter, while still maintaining backward compatibility in the BitcodeReader. Modified: llvm/trunk/include/llvm/Bitcode/LLVMBitCodes.h llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp llvm/trunk/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp Modified: llvm/trunk/include/llvm/Bitcode/LLVMBitCodes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Bitcode/LLVMBitCodes.h?rev=143598&r1=143597&r2=143598&view=diff ============================================================================== --- llvm/trunk/include/llvm/Bitcode/LLVMBitCodes.h (original) +++ llvm/trunk/include/llvm/Bitcode/LLVMBitCodes.h Wed Nov 2 19:14:01 2011 @@ -92,7 +92,7 @@ TYPE_CODE_OPAQUE = 6, // OPAQUE TYPE_CODE_INTEGER = 7, // INTEGER: [width] TYPE_CODE_POINTER = 8, // POINTER: [pointee type] - TYPE_CODE_FUNCTION = 9, // FUNCTION: [vararg, retty, paramty x N] + TYPE_CODE_FUNCTION_OLD = 9, // FUNCTION: [vararg, attrid, retty, paramty x N] // FIXME: This is the encoding used for structs in LLVM 2.9 and earlier. // REMOVE this in LLVM 3.1 @@ -113,7 +113,9 @@ TYPE_CODE_STRUCT_ANON = 18, // STRUCT_ANON: [ispacked, eltty x N] TYPE_CODE_STRUCT_NAME = 19, // STRUCT_NAME: [strchr x N] - TYPE_CODE_STRUCT_NAMED = 20 // STRUCT_NAMED: [ispacked, eltty x N] + TYPE_CODE_STRUCT_NAMED = 20,// STRUCT_NAMED: [ispacked, eltty x N] + + TYPE_CODE_FUNCTION = 21 // FUNCTION: [vararg, retty, paramty x N] }; // The type symbol table only has one code (TST_ENTRY_CODE). Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp?rev=143598&r1=143597&r2=143598&view=diff ============================================================================== --- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp (original) +++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp Wed Nov 2 19:14:01 2011 @@ -615,7 +615,7 @@ ResultTy = PointerType::get(ResultTy, AddressSpace); break; } - case bitc::TYPE_CODE_FUNCTION: { + case bitc::TYPE_CODE_FUNCTION_OLD: { // FIXME: attrid is dead, remove it in LLVM 3.0 // FUNCTION: [vararg, attrid, retty, paramty x N] if (Record.size() < 3) @@ -635,6 +635,25 @@ ResultTy = FunctionType::get(ResultTy, ArgTys, Record[0]); break; } + case bitc::TYPE_CODE_FUNCTION: { + // FUNCTION: [vararg, retty, paramty x N] + if (Record.size() < 2) + return Error("Invalid FUNCTION type record"); + std::vector ArgTys; + for (unsigned i = 2, e = Record.size(); i != e; ++i) { + if (Type *T = getTypeByID(Record[i])) + ArgTys.push_back(T); + else + break; + } + + ResultTy = getTypeByID(Record[1]); + if (ResultTy == 0 || ArgTys.size() < Record.size()-2) + return Error("invalid type in function type"); + + ResultTy = FunctionType::get(ResultTy, ArgTys, Record[0]); + break; + } case bitc::TYPE_CODE_STRUCT_ANON: { // STRUCT: [ispacked, eltty x N] if (Record.size() < 1) return Error("Invalid STRUCT type record"); @@ -871,7 +890,7 @@ ResultTy = PointerType::get(ResultTy, AddressSpace); break; } - case bitc::TYPE_CODE_FUNCTION: { + case bitc::TYPE_CODE_FUNCTION_OLD: { // FIXME: attrid is dead, remove it in LLVM 3.0 // FUNCTION: [vararg, attrid, retty, paramty x N] if (Record.size() < 3) @@ -889,6 +908,23 @@ ResultTy = FunctionType::get(ResultTy, ArgTys, Record[0]); break; } + case bitc::TYPE_CODE_FUNCTION: { + // FUNCTION: [vararg, retty, paramty x N] + if (Record.size() < 2) + return Error("Invalid FUNCTION type record"); + std::vector ArgTys; + for (unsigned i = 2, e = Record.size(); i != e; ++i) { + if (Type *Elt = getTypeByIDOrNull(Record[i])) + ArgTys.push_back(Elt); + else + break; + } + if (ArgTys.size()+2 != Record.size()) + break; // Something was null. + if ((ResultTy = getTypeByIDOrNull(Record[1]))) + ResultTy = FunctionType::get(ResultTy, ArgTys, Record[0]); + break; + } case bitc::TYPE_CODE_ARRAY: // ARRAY: [numelts, eltty] if (Record.size() < 2) return Error("Invalid ARRAY type record"); Modified: llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp?rev=143598&r1=143597&r2=143598&view=diff ============================================================================== --- llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp (original) +++ llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp Wed Nov 2 19:14:01 2011 @@ -206,7 +206,6 @@ Abbv = new BitCodeAbbrev(); Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_FUNCTION)); Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isvararg - Abbv->Add(BitCodeAbbrevOp(0)); // FIXME: DEAD value, remove in LLVM 3.0 Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, Log2_32_Ceil(VE.getTypes().size()+1))); @@ -284,10 +283,9 @@ } case Type::FunctionTyID: { FunctionType *FT = cast(T); - // FUNCTION: [isvararg, attrid, retty, paramty x N] + // FUNCTION: [isvararg, retty, paramty x N] Code = bitc::TYPE_CODE_FUNCTION; TypeVals.push_back(FT->isVarArg()); - TypeVals.push_back(0); // FIXME: DEAD: remove in llvm 3.0 TypeVals.push_back(VE.getTypeID(FT->getReturnType())); for (unsigned i = 0, e = FT->getNumParams(); i != e; ++i) TypeVals.push_back(VE.getTypeID(FT->getParamType(i))); Modified: llvm/trunk/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp?rev=143598&r1=143597&r2=143598&view=diff ============================================================================== --- llvm/trunk/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp (original) +++ llvm/trunk/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp Wed Nov 2 19:14:01 2011 @@ -175,7 +175,7 @@ case bitc::TYPE_CODE_OPAQUE: return "OPAQUE"; case bitc::TYPE_CODE_INTEGER: return "INTEGER"; case bitc::TYPE_CODE_POINTER: return "POINTER"; - case bitc::TYPE_CODE_FUNCTION: return "FUNCTION"; + case bitc::TYPE_CODE_FUNCTION_OLD: return "FUNCTION_OLD"; case bitc::TYPE_CODE_STRUCT_OLD: return "STRUCT_OLD"; case bitc::TYPE_CODE_ARRAY: return "ARRAY"; case bitc::TYPE_CODE_VECTOR: return "VECTOR"; @@ -186,6 +186,7 @@ case bitc::TYPE_CODE_STRUCT_ANON: return "STRUCT_ANON"; case bitc::TYPE_CODE_STRUCT_NAME: return "STRUCT_NAME"; case bitc::TYPE_CODE_STRUCT_NAMED: return "STRUCT_NAMED"; + case bitc::TYPE_CODE_FUNCTION: return "FUNCTION"; } case bitc::CONSTANTS_BLOCK_ID: From clattner at apple.com Wed Nov 2 19:23:02 2011 From: clattner at apple.com (Chris Lattner) Date: Wed, 02 Nov 2011 17:23:02 -0700 Subject: [llvm-commits] patch: x86 vector udiv In-Reply-To: References: Message-ID: On Nov 1, 2011, at 6:04 PM, Eli Friedman wrote: > On Tue, Nov 1, 2011 at 5:40 PM, Peter Cooper wrote: >> Hi >> >> Please review this patch for pr8429 to turn vector udiv into vector shrl instructions when dividing by powers of 2. This was already done on scalars but not on vectors. >> >> I also found that vector shifts were always scalarised on x86 even with SSE on so i turned these into the equivalent intrinsics. > > The change to X86ISelLowering.cpp is wrong; the psrld instruction is > not equivalent to ISD::SRL in the general case. > > For the rest of the changes, it would be better to handle this > transformation in instcombine. I agree - this is a generally useful canonicalization that should be done early. -Chris From evan.cheng at apple.com Wed Nov 2 19:51:52 2011 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 02 Nov 2011 17:51:52 -0700 Subject: [llvm-commits] patch: treat selector ref globals as constant in MachineLICM In-Reply-To: <789843C7-5EF1-47F4-83A7-FC16D47AA90E@apple.com> References: <789843C7-5EF1-47F4-83A7-FC16D47AA90E@apple.com> Message-ID: LGTM Evan On Nov 2, 2011, at 5:11 PM, Peter Cooper wrote: > Hi > > Please review this patch to allow the compiler to treat objc selector reference globals as constant when optimizing. These globals aren't actually constant at compile time in that the value they point at may be changed by the linker or runtime, but the value they have is the same for all loads from that address once the program has started. > > Ideally this code shouldn't be checking for the name of the global, but the correct change likely involves adding a new linkage type which is much more significant and overkill while there's only one type of variable this applies to. > > Thanks, > Pete > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From peter_cooper at apple.com Wed Nov 2 19:57:04 2011 From: peter_cooper at apple.com (Peter Cooper) Date: Wed, 02 Nov 2011 17:57:04 -0700 Subject: [llvm-commits] patch: x86 vector udiv In-Reply-To: References: Message-ID: <483B7184-5127-43E1-B725-671F91F31C2B@apple.com> I've written a version in InstCombine which is now working. Please have a look and see if its at the right stage of compilation. Cheers, Pete -------------- next part -------------- A non-text attachment was scrubbed... Name: 8429.patch Type: application/octet-stream Size: 2153 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111102/85d5b1a8/attachment.obj -------------- next part -------------- On Nov 2, 2011, at 5:23 PM, Chris Lattner wrote: > > On Nov 1, 2011, at 6:04 PM, Eli Friedman wrote: > >> On Tue, Nov 1, 2011 at 5:40 PM, Peter Cooper wrote: >>> Hi >>> >>> Please review this patch for pr8429 to turn vector udiv into vector shrl instructions when dividing by powers of 2. This was already done on scalars but not on vectors. >>> >>> I also found that vector shifts were always scalarised on x86 even with SSE on so i turned these into the equivalent intrinsics. >> >> The change to X86ISelLowering.cpp is wrong; the psrld instruction is >> not equivalent to ISD::SRL in the general case. >> >> For the rest of the changes, it would be better to handle this >> transformation in instcombine. > > I agree - this is a generally useful canonicalization that should be done early. > > -Chris From peter_cooper at apple.com Wed Nov 2 19:56:37 2011 From: peter_cooper at apple.com (Pete Cooper) Date: Thu, 03 Nov 2011 00:56:37 -0000 Subject: [llvm-commits] [llvm] r143600 - in /llvm/trunk: lib/CodeGen/MachineInstr.cpp test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll Message-ID: <20111103005637.1BC062A6C12C@llvm.org> Author: pete Date: Wed Nov 2 19:56:36 2011 New Revision: 143600 URL: http://llvm.org/viewvc/llvm-project?rev=143600&view=rev Log: Treat objc selector reference globals as invariant so that MachineLICM can hoist them out of loops. Fixes Added: llvm/trunk/test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=143600&r1=143599&r2=143600&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Wed Nov 2 19:56:36 2011 @@ -1232,6 +1232,19 @@ return false; } +/// pointsToRuntimeConstantMemory - Return true if this value points to data +/// which does never changes once the program starts running +static bool pointsToRuntimeConstantMemory(const Value *V) { + if (const GlobalVariable *GV = dyn_cast(V)) { + StringRef Name = GV->getName(); + // These special values are known to be constant at runtime + // TODO: a new linkage type for these would be far better than this check + if (Name.startswith("\01L_OBJC_SELECTOR_REFERENCES_")) + return true; + } + return false; +} + /// isInvariantLoad - Return true if this instruction is loading from a /// location whose value is invariant across the function. For example, /// loading a value from the constant pool or from the argument area @@ -1259,6 +1272,8 @@ if (const PseudoSourceValue *PSV = dyn_cast(V)) if (PSV->isConstant(MFI)) continue; + if (pointsToRuntimeConstantMemory(V)) + continue; // If we have an AliasAnalysis, ask it whether the memory is constant. if (AA && AA->pointsToConstantMemory( AliasAnalysis::Location(V, (*I)->getSize(), Added: llvm/trunk/test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll?rev=143600&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll (added) +++ llvm/trunk/test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll Wed Nov 2 19:56:36 2011 @@ -0,0 +1,30 @@ +; RUN: llc < %s -march=x86-64 -mattr=+sse3,+sse41 -stats |& grep {1 machine-licm} +; rdar://6027699 + +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-S128" +target triple = "x86_64-apple-macosx10.7.2" + +; STATS: 1 machine-licm + +@"\01L_OBJC_METH_VAR_NAME_" = internal global [4 x i8] c"foo\00", section "__TEXT,__objc_methname,cstring_literals", align 1 +@"\01L_OBJC_SELECTOR_REFERENCES_" = internal global i8* getelementptr inbounds ([4 x i8]* @"\01L_OBJC_METH_VAR_NAME_", i64 0, i64 0), section "__DATA, __objc_selrefs, literal_pointers, no_dead_strip" +@"\01L_OBJC_IMAGE_INFO" = internal constant [2 x i32] [i32 0, i32 16], section "__DATA, __objc_imageinfo, regular, no_dead_strip" + at llvm.used = appending global [3 x i8*] [i8* getelementptr inbounds ([4 x i8]* @"\01L_OBJC_METH_VAR_NAME_", i32 0, i32 0), i8* bitcast (i8** @"\01L_OBJC_SELECTOR_REFERENCES_" to i8*), i8* bitcast ([2 x i32]* @"\01L_OBJC_IMAGE_INFO" to i8*)], section "llvm.metadata" + +define void @test(i8* %x) uwtable ssp { +entry: + br label %for.body + +for.body: ; preds = %for.body, %entry + %i.01 = phi i32 [ 0, %entry ], [ %inc, %for.body ] + %0 = load i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8 + %call = tail call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* %x, i8* %0) + %inc = add i32 %i.01, 1 + %exitcond = icmp eq i32 %inc, 10000 + br i1 %exitcond, label %for.end, label %for.body + +for.end: ; preds = %for.body + ret void +} + +declare i8* @objc_msgSend(i8*, i8*, ...) nonlazybind From mcrosier at apple.com Wed Nov 2 21:04:59 2011 From: mcrosier at apple.com (Chad Rosier) Date: Thu, 03 Nov 2011 02:04:59 -0000 Subject: [llvm-commits] [llvm] r143603 - in /llvm/trunk: lib/Target/ARM/ARMFastISel.cpp test/CodeGen/ARM/fast-isel-conversion.ll Message-ID: <20111103020500.07B712A6C12C@llvm.org> Author: mcrosier Date: Wed Nov 2 21:04:59 2011 New Revision: 143603 URL: http://llvm.org/viewvc/llvm-project?rev=143603&view=rev Log: Add support for sign-extending non-legal types in SelectSIToFP(). Added: llvm/trunk/test/CodeGen/ARM/fast-isel-conversion.ll Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMFastISel.cpp?rev=143603&r1=143602&r2=143603&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMFastISel.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Wed Nov 2 21:04:59 2011 @@ -1329,16 +1329,25 @@ if (!isTypeLegal(Ty, DstVT)) return false; - // FIXME: Handle sign-extension where necessary. - if (!I->getOperand(0)->getType()->isIntegerTy(32)) + Value *Src = I->getOperand(0); + EVT SrcVT = TLI.getValueType(Src->getType(), true); + if (SrcVT != MVT::i32 && SrcVT != MVT::i16 && SrcVT != MVT::i8) return false; - unsigned Op = getRegForValue(I->getOperand(0)); - if (Op == 0) return false; + unsigned SrcReg = getRegForValue(Src); + if (SrcReg == 0) return false; + + // Handle sign-extension. + if (SrcVT == MVT::i16 || SrcVT == MVT::i8) { + EVT DestVT = MVT::i32; + unsigned ResultReg = ARMEmitIntExt(SrcVT, SrcReg, DestVT, /*isZExt*/ false); + if (ResultReg == 0) return false; + SrcReg = ResultReg; + } // The conversion routine works on fp-reg to fp-reg and the operand above // was an integer, move it to the fp registers if possible. - unsigned FP = ARMMoveToFPReg(MVT::f32, Op); + unsigned FP = ARMMoveToFPReg(MVT::f32, SrcReg); if (FP == 0) return false; unsigned Opc; Added: llvm/trunk/test/CodeGen/ARM/fast-isel-conversion.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-conversion.ll?rev=143603&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/ARM/fast-isel-conversion.ll (added) +++ llvm/trunk/test/CodeGen/ARM/fast-isel-conversion.ll Wed Nov 2 21:04:59 2011 @@ -0,0 +1,96 @@ +; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-darwin | FileCheck %s --check-prefix=ARM +; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-darwin | FileCheck %s --check-prefix=THUMB + +; Test sitofp + +define void @sitofp_single_i32(i32 %a, float %b) nounwind ssp { +entry: +; ARM: sitofp_single_i32 +; ARM: vmov s0, r0 +; ARM: vcvt.f32.s32 s0, s0 +; THUMB: sitofp_single_i32 +; THUMB: vmov s0, r0 +; THUMB: vcvt.f32.s32 s0, s0 + %b.addr = alloca float, align 4 + %conv = sitofp i32 %a to float + store float %conv, float* %b.addr, align 4 + ret void +} + +define void @sitofp_single_i16(i16 %a, float %b) nounwind ssp { +entry: +; ARM: sitofp_single_i16 +; ARM: sxth r0, r0 +; ARM: vmov s0, r0 +; ARM: vcvt.f32.s32 s0, s0 +; THUMB: sitofp_single_i16 +; THUMB: sxth r0, r0 +; THUMB: vmov s0, r0 +; THUMB: vcvt.f32.s32 s0, s0 + %b.addr = alloca float, align 4 + %conv = sitofp i16 %a to float + store float %conv, float* %b.addr, align 4 + ret void +} + +define void @sitofp_single_i8(i8 %a) nounwind ssp { +entry: +; ARM: sitofp_single_i8 +; ARM: sxtb r0, r0 +; ARM: vmov s0, r0 +; ARM: vcvt.f32.s32 s0, s0 +; THUMB: sitofp_single_i8 +; THUMB: sxtb r0, r0 +; THUMB: vmov s0, r0 +; THUMB: vcvt.f32.s32 s0, s0 + %b.addr = alloca float, align 4 + %conv = sitofp i8 %a to float + store float %conv, float* %b.addr, align 4 + ret void +} + +define void @sitofp_double_i32(i32 %a, double %b) nounwind ssp { +entry: +; ARM: sitofp_double_i32 +; ARM: vmov s0, r0 +; ARM: vcvt.f64.s32 d16, s0 +; THUMB: sitofp_double_i32 +; THUMB: vmov s0, r0 +; THUMB: vcvt.f64.s32 d16, s0 + %b.addr = alloca double, align 8 + %conv = sitofp i32 %a to double + store double %conv, double* %b.addr, align 8 + ret void +} + +define void @sitofp_double_i16(i16 %a, double %b) nounwind ssp { +entry: +; ARM: sitofp_double_i16 +; ARM: sxth r0, r0 +; ARM: vmov s0, r0 +; ARM: vcvt.f64.s32 d16, s0 +; THUMB: sitofp_double_i16 +; THUMB: sxth r0, r0 +; THUMB: vmov s0, r0 +; THUMB: vcvt.f64.s32 d16, s0 + %b.addr = alloca double, align 8 + %conv = sitofp i16 %a to double + store double %conv, double* %b.addr, align 8 + ret void +} + +define void @sitofp_double_i8(i8 %a, double %b) nounwind ssp { +entry: +; ARM: sitofp_double_i8 +; ARM: sxtb r0, r0 +; ARM: vmov s0, r0 +; ARM: vcvt.f64.s32 d16, s0 +; THUMB: sitofp_double_i8 +; THUMB: sxtb r0, r0 +; THUMB: vmov s0, r0 +; THUMB: vcvt.f64.s32 d16, s0 + %b.addr = alloca double, align 8 + %conv = sitofp i8 %a to double + store double %conv, double* %b.addr, align 8 + ret void +} From geek4civic at gmail.com Wed Nov 2 22:35:53 2011 From: geek4civic at gmail.com (NAKAMURA Takumi) Date: Thu, 3 Nov 2011 12:35:53 +0900 Subject: [llvm-commits] [llvm] r143570 - in /llvm/trunk: lib/CodeGen/AsmPrinter/DwarfDebug.cpp lib/CodeGen/AsmPrinter/DwarfDebug.h test/CodeGen/X86/dbg-file-name.ll test/CodeGen/X86/dwarf-comp-dir.ll In-Reply-To: <20111102205533.D8EBA2A6C12C@llvm.org> References: <20111102205533.D8EBA2A6C12C@llvm.org> Message-ID: Nick, it fails on ppc host. I will investigate later too (not sure). FYI, llc-output obj and llvm-dwarfdump-output attached. ...Takumi 2011/11/3 Nick Lewycky : > Author: nicholas > Date: Wed Nov ?2 15:55:33 2011 > New Revision: 143570 > > URL: http://llvm.org/viewvc/llvm-project?rev=143570&view=rev > Log: > Don't emit a directory entry for the value in DW_AT_comp_dir, that is always > implied by directory index zero. > > Added: > ? ?llvm/trunk/test/CodeGen/X86/dwarf-comp-dir.ll > Modified: > ? ?llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp > ? ?llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h > ? ?llvm/trunk/test/CodeGen/X86/dbg-file-name.ll -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: dump.txt Url: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111103/44a38014/attachment.txt -------------- next part -------------- A non-text attachment was scrubbed... Name: dwarf-comp-dir.ll.tmp.gz Type: application/x-gzip Size: 653 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111103/44a38014/attachment.gz From geek4civic at gmail.com Wed Nov 2 22:42:52 2011 From: geek4civic at gmail.com (NAKAMURA Takumi) Date: Thu, 3 Nov 2011 12:42:52 +0900 Subject: [llvm-commits] [llvm] r143578 - /llvm/trunk/docs/HowToAddABuilder.html In-Reply-To: <20111102220518.DF43E2A6C12C@llvm.org> References: <20111102220518.DF43E2A6C12C@llvm.org> Message-ID: Galina, > Modified: > ? ?llvm/trunk/docs/HowToAddABuilder.html Have you pressed "W3C Checker" in bottom of the page? Some URLs have no anchors. Are they intended? ...Takumi From anton at korobeynikov.info Thu Nov 3 00:08:25 2011 From: anton at korobeynikov.info (Anton Korobeynikov) Date: Thu, 3 Nov 2011 09:08:25 +0400 Subject: [llvm-commits] [llvm] r143600 - in /llvm/trunk: lib/CodeGen/MachineInstr.cpp test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll In-Reply-To: <20111103005637.1BC062A6C12C@llvm.org> References: <20111103005637.1BC062A6C12C@llvm.org> Message-ID: > + ? ?// These special values are known to be constant at runtime > + ? ?// TODO: a new linkage type for these would be far better than this check Please, no new linkage type - we have a decent amount of them with vague / non-clear meaning :) -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University From gkistanova at gmail.com Thu Nov 3 00:57:26 2011 From: gkistanova at gmail.com (Galina Kistanova) Date: Thu, 03 Nov 2011 05:57:26 -0000 Subject: [llvm-commits] [llvm] r143607 - /llvm/trunk/docs/HowToAddABuilder.html Message-ID: <20111103055726.6C0942A6C12C@llvm.org> Author: gkistanova Date: Thu Nov 3 00:57:26 2011 New Revision: 143607 URL: http://llvm.org/viewvc/llvm-project?rev=143607&view=rev Log: Cleaned text, fixed HTML. Modified: llvm/trunk/docs/HowToAddABuilder.html Modified: llvm/trunk/docs/HowToAddABuilder.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/HowToAddABuilder.html?rev=143607&r1=143606&r2=143607&view=diff ============================================================================== --- llvm/trunk/docs/HowToAddABuilder.html (original) +++ llvm/trunk/docs/HowToAddABuilder.html Thu Nov 3 00:57:26 2011 @@ -3,7 +3,9 @@ - How To Add Your Build Configuration To LLVM Buildbot Infrastructure + + How To Add Your Build Configuration To LLVM Buildbot Infrastructure + @@ -11,11 +13,10 @@

    How To Add Your Build Configuration To LLVM Buildbot Infrastructure

    1. Introduction
    2. -
    3. Steps To Add Builder To LLVM Buildbot
    4. +
    5. Steps To Add Builder To LLVM Buildbot
    -

    Written by Galina Kistanova -

    +

    Written by Galina Kistanova

    @@ -24,89 +25,104 @@
    -

    This document contains information about adding a build configuration and - buildslave to private slave builder to LLVM Buildbot Infrastructure - http://lab.llvm.org:8011 +

    This document contains information about adding a build configuration and + buildslave to private slave builder to LLVM Buildbot Infrastructure + http://lab.llvm.org:8011

    +
    -

    Steps To Add Builder To LLVM Buildbot

    +

    Steps To Add Builder To LLVM Buildbot

    +

    Volunteers can provide their build machines to work as build slaves to - public LLVM Buildbot. Below described recommended steps to implement this - task.

    + public LLVM Buildbot.

    -

    The steps are roughly as follows:

    +

    Here are the steps you can follow to do so:

      -
    1. Check the existing build configurations to make sure the one you are - interested in is not covered yet or gets built on your computer much - faster than on the existing one. We prefer faster builds so developers +

    2. Check the existing build configurations to make sure the one you are + interested in is not covered yet or gets built on your computer much + faster than on the existing one. We prefer faster builds so developers will get feedback sooner after changes get committed.

    3. -
    4. The computer you will be registering with the LLVM buildbot - infrastructure should have all dependencies installed and you can - actually build your configuration successfully. You can build multiple - configurations on one computer.

    5. - -
    6. Install buildslave (currently we are using buildbot version 0.8.5). - Depending on the platform, buildslave could be available to download and - install with your packet manager, or you can download it directly from - http://trac.buildbot.net and +

    7. The computer you will be registering with the LLVM buildbot + infrastructure should have all dependencies installed and you can + actually build your configuration successfully. Please check what degree + of parallelism (-j param) would give the fastest build. + You can build multiple configurations on one computer.

    8. + +
    9. Install buildslave (currently we are using buildbot version 0.8.5). + Depending on the platform, buildslave could be available to download and + install with your packet manager, or you can download it directly from + http://trac.buildbot.net and install it manually.

    10. -
    11. Create a designated user account your buildslave will be running - under.

    12. +
    13. Create a designated user account, your buildslave will be running + under, and set appropriate permissions.

    14. -
    15. Choose the buildslave root directory (all builds will be placed under - it), buildslave access name and password the build master will be using - to authenticate your build slave.

    16. - -
    17. Then create a build slave in context of that buildslave account. - Point it to the lab.llvm.org port 9990
      - (see http://buildbot.net/buildbot/docs/current/full.html#creating-a-slave - for more details) by running the following command: -

      -
      -      $ buildslave create-slave buildslave-root-directory lab.llvm.org: 9990 \
      -      buildslave-access-name buildslave-access-password
      -      

    18. - -
    19. Fill the build slave description and admin name/e-mail. - Here is an example of the build slave description: -

      -
      -           Windows 7 x64
      -           Core i7 (2.66GHz), 16GB of RAM
      -
      -           g++.exe (TDM-1 mingw32) 4.4.0
      -           GNU Binutils 2.19.1
      -           cmake version 2.8.4
      -           Microsoft(R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
      -      

    20. - -
    21. Make sure you can actually start the buildslave successfully. Then set - up your build slave to start automatically at the start up time. - See buildbot manual for help. You may want to restart your computer to see if it works.

    22. - -
    23. Send a patch which adds your build slave and builder to zorg.
      - * slaves are added to
      -http://llvm.org/svn/llvm-project/zorg/trunk/buildbot/osuosl/master/config/slaves.py
      - * builders are added to
      -http://llvm.org/svn/llvm-project/zorg/trunk/buildbot/osuosl/master/config/builders.py

    24. - -
    25. Then send the buildslave access name and password directly to - Galina Kistanova - -

    26. Check the status of your buildslave on - http://lab.llvm.org:8011/waterfall to make sure it is connected, and - http://lab.llvm.org:8011/buildslaves/<your buildslave name> to see - if the information is correct.

    27. +
    28. Choose the buildslave root directory (all builds will be placed under + it), buildslave access name and password the build master will be using + to authenticate your buildslave.

    29. + +
    30. Create a buildslave in context of that buildslave account. + Point it to the lab.llvm.org port 9990 (see + + Buildbot documentation, Creating a slave + for more details) by running the following command:

      + +
      +
      +$ buildslave create-slave buildslave-root-directory \
      +             lab.llvm.org:9990 \
      +             buildslave-access-name buildslave-access-password
      +
      +
    31. + +
    32. Fill the buildslave description and admin name/e-mail. + Here is an example of the buildslave description:

      + +
      +
      +Windows 7 x64
      +Core i7 (2.66GHz), 16GB of RAM
      +
      +g++.exe (TDM-1 mingw32) 4.4.0
      +GNU Binutils 2.19.1
      +cmake version 2.8.4
      +Microsoft(R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
      +
      +
    33. + +
    34. Make sure you can actually start the buildslave successfully. Then set + up your buildslave to start automatically at the start up time. + See the buildbot documentation for help. + You may want to restart your computer to see if it works.

    35. + +
    36. Send a patch which adds your build slave and your builder to zorg.

      +
        +
      • slaves are added to + buildbot/osuosl/master/config/slaves.py
      • +
      • builders are added to + buildbot/osuosl/master/config/builders.py
      • +
    37. + +
    38. Send the buildslave access name and the access password directly + to Galina Kistanova, and wait + till she will let you know that your changes are applied and buildmaster + is reconfigured.

      + +
    39. Check the status of your buildslave on the + Waterfall Display + to make sure it is connected, and + + http://lab.llvm.org:8011/buildslaves/<your-buildslave-name> + to see if administrator contact and slave information are correct.

      +
    40. -
    41. Wait for the first build to succeed and see if it could go faster with - higher degree of parallelism (-j param).

    42. +
    43. Wait for the first build to succeed and enjoy.

    From gkistanova at gmail.com Thu Nov 3 01:05:43 2011 From: gkistanova at gmail.com (Galina Kistanova) Date: Wed, 2 Nov 2011 23:05:43 -0700 Subject: [llvm-commits] [llvm] r143578 - /llvm/trunk/docs/HowToAddABuilder.html In-Reply-To: References: <20111102220518.DF43E2A6C12C@llvm.org> Message-ID: Hi Takumi, No, I haven't. That was a work in progress. Thanks for catching this anyway. I have finished my changes (at least for now) and made sure it passes the "W3C Checker". Thanks, Galina On Wed, Nov 2, 2011 at 8:42 PM, NAKAMURA Takumi wrote: > Galina, > >> Modified: >> ? ?llvm/trunk/docs/HowToAddABuilder.html > > Have you pressed "W3C Checker" in bottom of the page? > > Some URLs have no anchors. Are they intended? > > ...Takumi > From geek4civic at gmail.com Thu Nov 3 01:18:33 2011 From: geek4civic at gmail.com (NAKAMURA Takumi) Date: Thu, 3 Nov 2011 15:18:33 +0900 Subject: [llvm-commits] [llvm] r143349 - in /llvm/trunk/docs: CodeGenerator.html GetElementPtr.html LangRef.html ProgrammersManual.html In-Reply-To: <20111031130426.5DE0D3524001@llvm.org> References: <20111031130426.5DE0D3524001@llvm.org> Message-ID: Bill, please pick up r143328, r143348 and r143349 into release_30. They can pass the W3C Checker. ;) ps. I have not touched ReleaseNotes.html yet. ...Takumi 2011/10/31 NAKAMURA Takumi : > Author: chapuni > Date: Mon Oct 31 08:04:26 2011 > New Revision: 143349 > > URL: http://llvm.org/viewvc/llvm-project?rev=143349&view=rev > Log: > docs/*.html: Fix markups. > > Modified: > ? ?llvm/trunk/docs/CodeGenerator.html > ? ?llvm/trunk/docs/GetElementPtr.html > ? ?llvm/trunk/docs/LangRef.html > ? ?llvm/trunk/docs/ProgrammersManual.html From isanbard at gmail.com Thu Nov 3 01:47:50 2011 From: isanbard at gmail.com (Bill Wendling) Date: Thu, 03 Nov 2011 06:47:50 -0000 Subject: [llvm-commits] [test-suite] r143611 - in /test-suite/branches/release_30: ./ Makefile.programs Message-ID: <20111103064750.19EEB2A6C12C@llvm.org> Author: void Date: Thu Nov 3 01:47:49 2011 New Revision: 143611 URL: http://llvm.org/viewvc/llvm-project?rev=143611&view=rev Log: Merging r143460: ------------------------------------------------------------------------ r143460 | baldrick | 2011-11-01 06:38:01 -0700 (Tue, 01 Nov 2011) | 20 lines On Debian testing and recent Ubuntu systems llvm-ld fails to find libc, causing every test in the nightly testsuite to fail. But llvm-ld is only using libc to work out which symbols to internalize, not for linking with it. How can libc effect which symbols are internalized? I can see two possibilities: either libc makes use of a function defined in the bitcode (which it clearly doesn't) or a weak function occurs both in the bitcode and in libc (in which case using the bitcode's copy should be OK). Thus there doesn't seem to any point in looking at libc and comparable system libraries (eg: libstdc++) when internalizing, and this is confirmed by my testing: not passing -lc or $(LIBS) when invoking llvm-ld doesn't cause any failures. So a simple fix for the Debian issue would be simply not to pass them to llvm-ld. But then the question arises: why use llvm-ld at all rather than "opt -std-link-opts"? This patch goes all the way and drops llvm-ld in favour of "opt -std-link-opts". It also removes some apparently pointless Makefile rules, which I suspect exist because llvm-ld produces two output files, X (a script) and X.bc (the bitcode). With this llvm-ld is not used by the nightly testsuite at all. It works for me, but since I don't know the nightly testsuite infrastructure well I may have broken something, so please review. ------------------------------------------------------------------------ Modified: test-suite/branches/release_30/ (props changed) test-suite/branches/release_30/Makefile.programs Propchange: test-suite/branches/release_30/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Nov 3 01:47:49 2011 @@ -1 +1 @@ -/test-suite/trunk:142659 +/test-suite/trunk:142659,143460 Modified: test-suite/branches/release_30/Makefile.programs URL: http://llvm.org/viewvc/llvm-project/test-suite/branches/release_30/Makefile.programs?rev=143611&r1=143610&r2=143611&view=diff ============================================================================== --- test-suite/branches/release_30/Makefile.programs (original) +++ test-suite/branches/release_30/Makefile.programs Thu Nov 3 01:47:49 2011 @@ -309,53 +309,28 @@ # optimization... $(PROGRAMS_TO_TEST:%=Output/%.llvm.bc): \ -Output/%.llvm.bc: Output/%.linked.bc $(LLVM_LDDPROG) - $(RUNTOOLSAFELY) $(LLVMLD) -info-output-file=$(CURDIR)/$@.info $(STATS) $< \ - $(EXTRA_LINKTIME_OPT_FLAGS) $(LLVMLD_FLAGS) -lc $(LIBS) -o Output/$*.llvm -ifneq ($(OPTPASSES),) - $(RUNTOOLSAFELY) $(LOPT) -q $(OPTPASSES) $@ -o $@.tmp - $(MV) -f $@.tmp $@ -endif - -$(PROGRAMS_TO_TEST:%=Output/%.llvm): \ -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),) - $(RUNTOOLSAFELY) $(LOPT) -q $(OPTPASSES) $@ -o $@.tmp - $(MV) -f $@.tmp $@ -endif +Output/%.llvm.bc: Output/%.linked.bc $(LOPT) + $(RUNTOOLSAFELY) $(LOPT) -std-link-opts $(OPTPASSES) \ + -info-output-file=$(CURDIR)/$@.info \ + $(STATS) $< $(EXTRA_LINKTIME_OPT_FLAGS) -o $@ $(PROGRAMS_TO_TEST:%=Output/%.llvm.optbeta.bc): \ -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 $(LLVMLD) - $(RUNTOOLSAFELY) $(LLVMLD) -info-output-file=$(CURDIR)/$@.info $(STATS) $< \ - $(EXTRA_LINKTIME_OPT_FLAGS) $(LLVMLD_FLAGS) -lc $(LIBS) -o Output/$*.llvm.optbeta +Output/%.llvm.optbeta.bc: Output/%.linked.optbeta.bc $(LOPT) + $(RUNTOOLSAFELY) $(LOPT) -std-link-opts \ + -info-output-file=$(CURDIR)/$@.info \ + $(STATS) $< $(EXTRA_LINKTIME_OPT_FLAGS) -o $@ $(PROGRAMS_TO_TEST:%=Output/%.noopt-llvm.bc): \ -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 $(LLVMLD) - $(RUNTOOLSAFELY) $(LLVMLD) -disable-opt -info-output-file=$(CURDIR)/$@.info $(STATS) $< \ - $(LLVMLD_FLAGS) -lc $(LIBS) -o Output/$*.noopt-llvm - +Output/%.noopt-llvm.bc: Output/%.linked.rbc $(LOPT) + $(RUNTOOLSAFELY) $(LOPT) \ + -info-output-file=$(CURDIR)/$@.info \ + $(STATS) $< -o $@ $(PROGRAMS_TO_TEST:%=Output/%.nollvm-ldopt-llvm.bc): \ -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 $(LLVMLD) - $(RUNTOOLSAFELY) $(LLVMLD) -disable-opt -info-output-file=$(CURDIR)/$@.info $(STATS) $< \ - $(LLVMLD_FLAGS) -lc $(LIBS) -o Output/$*.nollvm-ldopt-llvm +Output/%.nollvm-ldopt-llvm.bc: Output/%.linked.bc $(LOPT) + $(RUNTOOLSAFELY) $(LOPT) \ + -info-output-file=$(CURDIR)/$@.info \ + $(STATS) $< -o $@ endif # ifndef DISABLE_FOR_LLVM_PROGRAMS @@ -372,7 +347,7 @@ ifneq ($(ARCH),x86) ifneq ($(ARCH),x86_64) LLCFLAGS += -enable-correct-eh-support -LLVMLD_FLAGS += -disable-inlining +EXTRA_LINKTIME_OPT_FLAGS += -disable-inlining endif endif endif From isanbard at gmail.com Thu Nov 3 01:51:34 2011 From: isanbard at gmail.com (Bill Wendling) Date: Wed, 2 Nov 2011 23:51:34 -0700 Subject: [llvm-commits] [llvm] r143349 - in /llvm/trunk/docs: CodeGenerator.html GetElementPtr.html LangRef.html ProgrammersManual.html In-Reply-To: References: <20111031130426.5DE0D3524001@llvm.org> Message-ID: Done. Thanks! -bw On Nov 2, 2011, at 11:18 PM, NAKAMURA Takumi wrote: > Bill, please pick up r143328, r143348 and r143349 into release_30. > > They can pass the W3C Checker. ;) > > ps. I have not touched ReleaseNotes.html yet. > > ...Takumi > > 2011/10/31 NAKAMURA Takumi : >> Author: chapuni >> Date: Mon Oct 31 08:04:26 2011 >> New Revision: 143349 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=143349&view=rev >> Log: >> docs/*.html: Fix markups. >> >> Modified: >> llvm/trunk/docs/CodeGenerator.html >> llvm/trunk/docs/GetElementPtr.html >> llvm/trunk/docs/LangRef.html >> llvm/trunk/docs/ProgrammersManual.html From craig.topper at gmail.com Thu Nov 3 02:35:53 2011 From: craig.topper at gmail.com (Craig Topper) Date: Thu, 03 Nov 2011 07:35:53 -0000 Subject: [llvm-commits] [llvm] r143612 - in /llvm/trunk: include/llvm/IntrinsicsX86.td lib/Target/X86/X86InstrSSE.td test/CodeGen/X86/avx-intrinsics-x86.ll test/CodeGen/X86/avx2-intrinsics-x86.ll Message-ID: <20111103073553.696582A6C12D@llvm.org> Author: ctopper Date: Thu Nov 3 02:35:53 2011 New Revision: 143612 URL: http://llvm.org/viewvc/llvm-project?rev=143612&view=rev Log: Add new X86 AVX2 VBROADCAST instructions. Modified: llvm/trunk/include/llvm/IntrinsicsX86.td llvm/trunk/lib/Target/X86/X86InstrSSE.td llvm/trunk/test/CodeGen/X86/avx-intrinsics-x86.ll llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll Modified: llvm/trunk/include/llvm/IntrinsicsX86.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IntrinsicsX86.td?rev=143612&r1=143611&r2=143612&view=diff ============================================================================== --- llvm/trunk/include/llvm/IntrinsicsX86.td (original) +++ llvm/trunk/include/llvm/IntrinsicsX86.td Thu Nov 3 02:35:53 2011 @@ -1281,13 +1281,13 @@ // Vector load with broadcast let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx_vbroadcastss : + def int_x86_avx_vbroadcast_ss : GCCBuiltin<"__builtin_ia32_vbroadcastss">, Intrinsic<[llvm_v4f32_ty], [llvm_ptr_ty], [IntrReadMem]>; def int_x86_avx_vbroadcast_sd_256 : GCCBuiltin<"__builtin_ia32_vbroadcastsd256">, Intrinsic<[llvm_v4f64_ty], [llvm_ptr_ty], [IntrReadMem]>; - def int_x86_avx_vbroadcastss_256 : + def int_x86_avx_vbroadcast_ss_256 : GCCBuiltin<"__builtin_ia32_vbroadcastss256">, Intrinsic<[llvm_v8f32_ty], [llvm_ptr_ty], [IntrReadMem]>; def int_x86_avx_vbroadcastf128_pd_256 : @@ -1672,6 +1672,15 @@ // Vector load with broadcast let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". + def int_x86_avx2_vbroadcast_ss_ps : + GCCBuiltin<"__builtin_ia32_vbroadcastss_ps">, + Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrReadMem]>; + def int_x86_avx2_vbroadcast_sd_pd_256 : + GCCBuiltin<"__builtin_ia32_vbroadcastsd_pd256">, + Intrinsic<[llvm_v4f64_ty], [llvm_v2f64_ty], [IntrReadMem]>; + def int_x86_avx2_vbroadcast_ss_ps_256 : + GCCBuiltin<"__builtin_ia32_vbroadcastss_ps256">, + Intrinsic<[llvm_v8f32_ty], [llvm_v4f32_ty], [IntrReadMem]>; def int_x86_avx2_vbroadcasti128 : GCCBuiltin<"__builtin_ia32_vbroadcastsi256">, Intrinsic<[llvm_v4i64_ty], [llvm_ptr_ty], [IntrReadMem]>; Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=143612&r1=143611&r2=143612&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Thu Nov 3 02:35:53 2011 @@ -7083,35 +7083,48 @@ !strconcat(OpcodeStr, "\t{$src, $dst|$dst, $src}"), [(set RC:$dst, (Int addr:$src))]>, VEX; -def VBROADCASTSS : avx_broadcast<0x18, "vbroadcastss", VR128, f32mem, - int_x86_avx_vbroadcastss>; -def VBROADCASTSSY : avx_broadcast<0x18, "vbroadcastss", VR256, f32mem, - int_x86_avx_vbroadcastss_256>; -def VBROADCASTSD : avx_broadcast<0x19, "vbroadcastsd", VR256, f64mem, - int_x86_avx_vbroadcast_sd_256>; +class avx_broadcast_reg opc, string OpcodeStr, RegisterClass RC, + Intrinsic Int> : + AVX8I, VEX; + +def VBROADCASTSSrm : avx_broadcast<0x18, "vbroadcastss", VR128, f32mem, + int_x86_avx_vbroadcast_ss>; +def VBROADCASTSSYrm : avx_broadcast<0x18, "vbroadcastss", VR256, f32mem, + int_x86_avx_vbroadcast_ss_256>; +def VBROADCASTSDrm : avx_broadcast<0x19, "vbroadcastsd", VR256, f64mem, + int_x86_avx_vbroadcast_sd_256>; def VBROADCASTF128 : avx_broadcast<0x1A, "vbroadcastf128", VR256, f128mem, int_x86_avx_vbroadcastf128_pd_256>; -let Predicates = [HasAVX2] in +let Predicates = [HasAVX2] in { def VBROADCASTI128 : avx_broadcast<0x5A, "vbroadcasti128", VR256, i128mem, int_x86_avx2_vbroadcasti128>; +def VBROADCASTSSrr : avx_broadcast_reg<0x18, "vbroadcastss", VR128, + int_x86_avx2_vbroadcast_ss_ps>; +def VBROADCASTSSYrr : avx_broadcast_reg<0x18, "vbroadcastss", VR256, + int_x86_avx2_vbroadcast_ss_ps_256>; +def VBROADCASTSDrr : avx_broadcast_reg<0x19, "vbroadcastsd", VR256, + int_x86_avx2_vbroadcast_sd_pd_256>; +} def : Pat<(int_x86_avx_vbroadcastf128_ps_256 addr:$src), (VBROADCASTF128 addr:$src)>; def : Pat<(v8i32 (X86VBroadcast (loadi32 addr:$src))), - (VBROADCASTSSY addr:$src)>; + (VBROADCASTSSYrm addr:$src)>; def : Pat<(v4i64 (X86VBroadcast (loadi64 addr:$src))), - (VBROADCASTSD addr:$src)>; + (VBROADCASTSDrm addr:$src)>; def : Pat<(v8f32 (X86VBroadcast (loadf32 addr:$src))), - (VBROADCASTSSY addr:$src)>; + (VBROADCASTSSYrm addr:$src)>; def : Pat<(v4f64 (X86VBroadcast (loadf64 addr:$src))), - (VBROADCASTSD addr:$src)>; + (VBROADCASTSDrm addr:$src)>; def : Pat<(v4f32 (X86VBroadcast (loadf32 addr:$src))), - (VBROADCASTSS addr:$src)>; + (VBROADCASTSSrm addr:$src)>; def : Pat<(v4i32 (X86VBroadcast (loadi32 addr:$src))), - (VBROADCASTSS addr:$src)>; + (VBROADCASTSSrm addr:$src)>; //===----------------------------------------------------------------------===// // VINSERTF128 - Insert packed floating-point values Modified: llvm/trunk/test/CodeGen/X86/avx-intrinsics-x86.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx-intrinsics-x86.ll?rev=143612&r1=143611&r2=143612&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/avx-intrinsics-x86.ll (original) +++ llvm/trunk/test/CodeGen/X86/avx-intrinsics-x86.ll Thu Nov 3 02:35:53 2011 @@ -2292,20 +2292,20 @@ declare <8 x float> @llvm.x86.avx.vbroadcastf128.ps.256(i8*) nounwind readonly -define <4 x float> @test_x86_avx_vbroadcastss(i8* %a0) { +define <4 x float> @test_x86_avx_vbroadcast_ss(i8* %a0) { ; CHECK: vbroadcastss - %res = call <4 x float> @llvm.x86.avx.vbroadcastss(i8* %a0) ; <<4 x float>> [#uses=1] + %res = call <4 x float> @llvm.x86.avx.vbroadcast.ss(i8* %a0) ; <<4 x float>> [#uses=1] ret <4 x float> %res } -declare <4 x float> @llvm.x86.avx.vbroadcastss(i8*) nounwind readonly +declare <4 x float> @llvm.x86.avx.vbroadcast.ss(i8*) nounwind readonly -define <8 x float> @test_x86_avx_vbroadcastss_256(i8* %a0) { +define <8 x float> @test_x86_avx_vbroadcast_ss_256(i8* %a0) { ; CHECK: vbroadcastss - %res = call <8 x float> @llvm.x86.avx.vbroadcastss.256(i8* %a0) ; <<8 x float>> [#uses=1] + %res = call <8 x float> @llvm.x86.avx.vbroadcast.ss.256(i8* %a0) ; <<8 x float>> [#uses=1] ret <8 x float> %res } -declare <8 x float> @llvm.x86.avx.vbroadcastss.256(i8*) nounwind readonly +declare <8 x float> @llvm.x86.avx.vbroadcast.ss.256(i8*) nounwind readonly define <2 x double> @test_x86_avx_vextractf128_pd_256(<4 x double> %a0) { Modified: llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll?rev=143612&r1=143611&r2=143612&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll (original) +++ llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll Thu Nov 3 02:35:53 2011 @@ -743,3 +743,26 @@ ret <4 x i64> %res } declare <4 x i64> @llvm.x86.avx2.vbroadcasti128(i8*) nounwind readonly + +define <4 x double> @test_x86_avx2_vbroadcast_sd_pd_256(<2 x double> %a0) { + ; CHECK: vbroadcastsd + %res = call <4 x double> @llvm.x86.avx2.vbroadcast.sd.pd.256(<2 x double> %a0) ; <<4 x double>> [#uses=1] + ret <4 x double> %res +} +declare <4 x double> @llvm.x86.avx2.vbroadcast.sd.pd.256(<2 x double>) nounwind readonly + + +define <4 x float> @test_x86_avx2_vbroadcast_ss_ps(<4 x float> %a0) { + ; CHECK: vbroadcastss + %res = call <4 x float> @llvm.x86.avx2.vbroadcast.ss.ps(<4 x float> %a0) ; <<4 x float>> [#uses=1] + ret <4 x float> %res +} +declare <4 x float> @llvm.x86.avx2.vbroadcast.ss.ps(<4 x float>) nounwind readonly + + +define <8 x float> @test_x86_avx2_vbroadcast_ss_ps_256(<4 x float> %a0) { + ; CHECK: vbroadcastss + %res = call <8 x float> @llvm.x86.avx2.vbroadcast.ss.ps.256(<4 x float> %a0) ; <<8 x float>> [#uses=1] + ret <8 x float> %res +} +declare <8 x float> @llvm.x86.avx2.vbroadcast.ss.ps.256(<4 x float>) nounwind readonly From baldrick at free.fr Thu Nov 3 04:03:26 2011 From: baldrick at free.fr (Duncan Sands) Date: Thu, 03 Nov 2011 10:03:26 +0100 Subject: [llvm-commits] patch: treat selector ref globals as constant in MachineLICM In-Reply-To: <789843C7-5EF1-47F4-83A7-FC16D47AA90E@apple.com> References: <789843C7-5EF1-47F4-83A7-FC16D47AA90E@apple.com> Message-ID: <4EB258DE.7020403@free.fr> Hi Peter, > Please review this patch to allow the compiler to treat objc selector reference globals as constant when optimizing. These globals aren't actually constant at compile time in that the value they point at may be changed by the linker or runtime, but the value they have is the same for all loads from that address once the program has started. what if you declare the global to be a weak constant? I guess the problem is that you need internal linkage? Ciao, Duncan. > Ideally this code shouldn't be checking for the name of the global, but the correct change likely involves adding a new linkage type which is much more significant and overkill while there's only one type of variable this applies to. > > Thanks, > Pete > > > > _______________________________________________ > 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 Nov 3 04:16:51 2011 From: baldrick at free.fr (Duncan Sands) Date: Thu, 03 Nov 2011 10:16:51 +0100 Subject: [llvm-commits] patch: x86 vector udiv In-Reply-To: <483B7184-5127-43E1-B725-671F91F31C2B@apple.com> References: <483B7184-5127-43E1-B725-671F91F31C2B@apple.com> Message-ID: <4EB25C03.6070106@free.fr> Hi Peter, > I've written a version in InstCombine which is now working. I think it would be better if the same code worked for the scalar and vector cases. This means writing a bunch of utility functions but once that's done hopefully it becomes trivial to convert all kinds of scalar transforms to work also on vectors. Maybe a good first step is to introduce a helper class for representing either a ConstantInt or a vector of ConstantInt, analogous to the helper classes in Operator.h (eg: OverflowingBinaryOperator) or IntrinsicInst.h. Ciao, Duncan. > > Please have a look and see if its at the right stage of compilation. > > Cheers, > Pete > > > > > On Nov 2, 2011, at 5:23 PM, Chris Lattner wrote: > >> >> On Nov 1, 2011, at 6:04 PM, Eli Friedman wrote: >> >>> On Tue, Nov 1, 2011 at 5:40 PM, Peter Cooper wrote: >>>> Hi >>>> >>>> Please review this patch for pr8429 to turn vector udiv into vector shrl instructions when dividing by powers of 2. This was already done on scalars but not on vectors. >>>> >>>> I also found that vector shifts were always scalarised on x86 even with SSE on so i turned these into the equivalent intrinsics. >>> >>> The change to X86ISelLowering.cpp is wrong; the psrld instruction is >>> not equivalent to ISD::SRL in the general case. >>> >>> For the rest of the changes, it would be better to handle this >>> transformation in instcombine. >> >> I agree - this is a generally useful canonicalization that should be done early. >> >> -Chris > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From spop at codeaurora.org Thu Nov 3 10:21:04 2011 From: spop at codeaurora.org (Sebastian Pop) Date: Thu, 3 Nov 2011 10:21:04 -0500 Subject: [llvm-commits] [llvm] r143502 - in /llvm/trunk: include/llvm/Support/Host.h lib/ExecutionEngine/TargetSelect.cpp lib/Support/CommandLine.cpp lib/Support/TargetRegistry.cpp lib/Support/Unix/Host.inc lib/Support/Windows/Host.inc lib/Target/CBackend Message-ID: Hi Duncan, On Wed, Nov 2, 2011 at 2:57 AM, Duncan Sands wrote: >> - ?/// getHostTriple() - Return the target triple of the running >> + ?/// getDefaultTargetTriple() - Return the target triple of the running >> ? ? /// system. > > maybe this comment should be updated: "the running system" sounds > a lot like "the host". You are right, thanks for catching this one. Could you please change the comment to read: "Return the default target triple the compiler has been configured to produce code for." Thanks, Sebastian -- Qualcomm Innovation Center, Inc is a member of Code Aurora Forum From greened at obbligato.org Thu Nov 3 10:29:47 2011 From: greened at obbligato.org (David A. Greene) Date: Thu, 03 Nov 2011 10:29:47 -0500 Subject: [llvm-commits] [llvm] r141977 - /llvm/trunk/utils/llvmbuild In-Reply-To: <4EB19905.1020109@gmail.com> (=?utf-8?B?IlTDtnLDtms=?= Edwin"'s message of "Wed, 02 Nov 2011 21:24:53 +0200") References: <20111014191237.51440312800A@llvm.org> <4EB19905.1020109@gmail.com> Message-ID: T?r?k Edwin writes: > On 11/02/2011 08:19 PM, David A. Greene wrote: >> Daniel Dunbar writes: >> >>> Ok, keeping it in the tree is fine with me if generally useful. >>> >>> It seems like the main focus is to build all the LLVM compilers, what >>> about llvm-build-all-compilers or something? Doesn't cover the test >>> side, but gets closer. Or maybe llvm-deep-check-compilers ? >> >> Both feel a bit wordy to me. Maybe llvm-commit-check, llvm-check or >> llvm-verify? None of these is really good, however. :-/ > > llvm-compilers-check or llvm-frontend-check? It's not frontend-specific, so I don't think llvm-frontend-check is quite right. I think llvm-compilers-check is the best I've seen so far. -Dave From clattner at apple.com Thu Nov 3 11:38:46 2011 From: clattner at apple.com (Chris Lattner) Date: Thu, 03 Nov 2011 09:38:46 -0700 Subject: [llvm-commits] [llvm] r143600 - in /llvm/trunk: lib/CodeGen/MachineInstr.cpp test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll In-Reply-To: <20111103005637.1BC062A6C12C@llvm.org> References: <20111103005637.1BC062A6C12C@llvm.org> Message-ID: <021D99BD-132F-4B07-A87D-0CE68892311A@apple.com> On Nov 2, 2011, at 5:56 PM, Pete Cooper wrote: > Author: pete > Date: Wed Nov 2 19:56:36 2011 > New Revision: 143600 > > URL: http://llvm.org/viewvc/llvm-project?rev=143600&view=rev > Log: > Treat objc selector reference globals as invariant so that MachineLICM can hoist them out of loops. Fixes Hi Pete, Special casing this by-name seems really gross. Shouldn't this be handled by introducing a new linkage type, or some sort of metadata? Also, would it be possible to catch this in the early LICM pass? -Chris > llvm/trunk/test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll > Modified: > llvm/trunk/lib/CodeGen/MachineInstr.cpp > > Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=143600&r1=143599&r2=143600&view=diff > ============================================================================== > --- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original) > +++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Wed Nov 2 19:56:36 2011 > @@ -1232,6 +1232,19 @@ > return false; > } > > +/// pointsToRuntimeConstantMemory - Return true if this value points to data > +/// which does never changes once the program starts running > +static bool pointsToRuntimeConstantMemory(const Value *V) { > + if (const GlobalVariable *GV = dyn_cast(V)) { > + StringRef Name = GV->getName(); > + // These special values are known to be constant at runtime > + // TODO: a new linkage type for these would be far better than this check > + if (Name.startswith("\01L_OBJC_SELECTOR_REFERENCES_")) > + return true; > + } > + return false; > +} > + > /// isInvariantLoad - Return true if this instruction is loading from a > /// location whose value is invariant across the function. For example, > /// loading a value from the constant pool or from the argument area > @@ -1259,6 +1272,8 @@ > if (const PseudoSourceValue *PSV = dyn_cast(V)) > if (PSV->isConstant(MFI)) > continue; > + if (pointsToRuntimeConstantMemory(V)) > + continue; > // If we have an AliasAnalysis, ask it whether the memory is constant. > if (AA && AA->pointsToConstantMemory( > AliasAnalysis::Location(V, (*I)->getSize(), > > Added: llvm/trunk/test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll?rev=143600&view=auto > ============================================================================== > --- llvm/trunk/test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll (added) > +++ llvm/trunk/test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll Wed Nov 2 19:56:36 2011 > @@ -0,0 +1,30 @@ > +; RUN: llc < %s -march=x86-64 -mattr=+sse3,+sse41 -stats |& grep {1 machine-licm} > +; rdar://6027699 > + > +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-S128" > +target triple = "x86_64-apple-macosx10.7.2" > + > +; STATS: 1 machine-licm > + > +@"\01L_OBJC_METH_VAR_NAME_" = internal global [4 x i8] c"foo\00", section "__TEXT,__objc_methname,cstring_literals", align 1 > +@"\01L_OBJC_SELECTOR_REFERENCES_" = internal global i8* getelementptr inbounds ([4 x i8]* @"\01L_OBJC_METH_VAR_NAME_", i64 0, i64 0), section "__DATA, __objc_selrefs, literal_pointers, no_dead_strip" > +@"\01L_OBJC_IMAGE_INFO" = internal constant [2 x i32] [i32 0, i32 16], section "__DATA, __objc_imageinfo, regular, no_dead_strip" > + at llvm.used = appending global [3 x i8*] [i8* getelementptr inbounds ([4 x i8]* @"\01L_OBJC_METH_VAR_NAME_", i32 0, i32 0), i8* bitcast (i8** @"\01L_OBJC_SELECTOR_REFERENCES_" to i8*), i8* bitcast ([2 x i32]* @"\01L_OBJC_IMAGE_INFO" to i8*)], section "llvm.metadata" > + > +define void @test(i8* %x) uwtable ssp { > +entry: > + br label %for.body > + > +for.body: ; preds = %for.body, %entry > + %i.01 = phi i32 [ 0, %entry ], [ %inc, %for.body ] > + %0 = load i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8 > + %call = tail call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* %x, i8* %0) > + %inc = add i32 %i.01, 1 > + %exitcond = icmp eq i32 %inc, 10000 > + br i1 %exitcond, label %for.end, label %for.body > + > +for.end: ; preds = %for.body > + ret void > +} > + > +declare i8* @objc_msgSend(i8*, i8*, ...) nonlazybind > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From peter_cooper at apple.com Thu Nov 3 12:18:17 2011 From: peter_cooper at apple.com (Peter Cooper) Date: Thu, 03 Nov 2011 10:18:17 -0700 Subject: [llvm-commits] [llvm] r143600 - in /llvm/trunk: lib/CodeGen/MachineInstr.cpp test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll In-Reply-To: <021D99BD-132F-4B07-A87D-0CE68892311A@apple.com> References: <20111103005637.1BC062A6C12C@llvm.org> <021D99BD-132F-4B07-A87D-0CE68892311A@apple.com> Message-ID: <0D65E3B4-13AE-405D-8DA6-E7E946FCB8A7@apple.com> Hi Chris I agree that a new linkage type is better, but that seemed overkill when there's currently only one case where this occurs. But yes, special casing by name is particularly gross. I did have a solution working in the earlier LICM pass but it then struggles to do CSE on these loads. It also meant putting my special case code in 2 places which would have been even more gross. If i change it to a new linkage type then i'll make sure and have earlyCSE and LICM work on it too. Pete On Nov 3, 2011, at 9:38 AM, Chris Lattner wrote: > > On Nov 2, 2011, at 5:56 PM, Pete Cooper wrote: > >> Author: pete >> Date: Wed Nov 2 19:56:36 2011 >> New Revision: 143600 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=143600&view=rev >> Log: >> Treat objc selector reference globals as invariant so that MachineLICM can hoist them out of loops. Fixes > > Hi Pete, > > Special casing this by-name seems really gross. Shouldn't this be handled by introducing a new linkage type, or some sort of metadata? Also, would it be possible to catch this in the early LICM pass? > > -Chris > >> llvm/trunk/test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll >> Modified: >> llvm/trunk/lib/CodeGen/MachineInstr.cpp >> >> Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=143600&r1=143599&r2=143600&view=diff >> ============================================================================== >> --- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original) >> +++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Wed Nov 2 19:56:36 2011 >> @@ -1232,6 +1232,19 @@ >> return false; >> } >> >> +/// pointsToRuntimeConstantMemory - Return true if this value points to data >> +/// which does never changes once the program starts running >> +static bool pointsToRuntimeConstantMemory(const Value *V) { >> + if (const GlobalVariable *GV = dyn_cast(V)) { >> + StringRef Name = GV->getName(); >> + // These special values are known to be constant at runtime >> + // TODO: a new linkage type for these would be far better than this check >> + if (Name.startswith("\01L_OBJC_SELECTOR_REFERENCES_")) >> + return true; >> + } >> + return false; >> +} >> + >> /// isInvariantLoad - Return true if this instruction is loading from a >> /// location whose value is invariant across the function. For example, >> /// loading a value from the constant pool or from the argument area >> @@ -1259,6 +1272,8 @@ >> if (const PseudoSourceValue *PSV = dyn_cast(V)) >> if (PSV->isConstant(MFI)) >> continue; >> + if (pointsToRuntimeConstantMemory(V)) >> + continue; >> // If we have an AliasAnalysis, ask it whether the memory is constant. >> if (AA && AA->pointsToConstantMemory( >> AliasAnalysis::Location(V, (*I)->getSize(), >> >> Added: llvm/trunk/test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll?rev=143600&view=auto >> ============================================================================== >> --- llvm/trunk/test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll (added) >> +++ llvm/trunk/test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll Wed Nov 2 19:56:36 2011 >> @@ -0,0 +1,30 @@ >> +; RUN: llc < %s -march=x86-64 -mattr=+sse3,+sse41 -stats |& grep {1 machine-licm} >> +; rdar://6027699 >> + >> +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-S128" >> +target triple = "x86_64-apple-macosx10.7.2" >> + >> +; STATS: 1 machine-licm >> + >> +@"\01L_OBJC_METH_VAR_NAME_" = internal global [4 x i8] c"foo\00", section "__TEXT,__objc_methname,cstring_literals", align 1 >> +@"\01L_OBJC_SELECTOR_REFERENCES_" = internal global i8* getelementptr inbounds ([4 x i8]* @"\01L_OBJC_METH_VAR_NAME_", i64 0, i64 0), section "__DATA, __objc_selrefs, literal_pointers, no_dead_strip" >> +@"\01L_OBJC_IMAGE_INFO" = internal constant [2 x i32] [i32 0, i32 16], section "__DATA, __objc_imageinfo, regular, no_dead_strip" >> + at llvm.used = appending global [3 x i8*] [i8* getelementptr inbounds ([4 x i8]* @"\01L_OBJC_METH_VAR_NAME_", i32 0, i32 0), i8* bitcast (i8** @"\01L_OBJC_SELECTOR_REFERENCES_" to i8*), i8* bitcast ([2 x i32]* @"\01L_OBJC_IMAGE_INFO" to i8*)], section "llvm.metadata" >> + >> +define void @test(i8* %x) uwtable ssp { >> +entry: >> + br label %for.body >> + >> +for.body: ; preds = %for.body, %entry >> + %i.01 = phi i32 [ 0, %entry ], [ %inc, %for.body ] >> + %0 = load i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8 >> + %call = tail call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* %x, i8* %0) >> + %inc = add i32 %i.01, 1 >> + %exitcond = icmp eq i32 %inc, 10000 >> + br i1 %exitcond, label %for.end, label %for.body >> + >> +for.end: ; preds = %for.body >> + ret void >> +} >> + >> +declare i8* @objc_msgSend(i8*, i8*, ...) nonlazybind >> >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > From peter_cooper at apple.com Thu Nov 3 12:26:41 2011 From: peter_cooper at apple.com (Peter Cooper) Date: Thu, 03 Nov 2011 10:26:41 -0700 Subject: [llvm-commits] patch: treat selector ref globals as constant in MachineLICM In-Reply-To: <4EB258DE.7020403@free.fr> References: <789843C7-5EF1-47F4-83A7-FC16D47AA90E@apple.com> <4EB258DE.7020403@free.fr> Message-ID: Hi Duncan Yeah, i need the internal linkage. The problem with marking this global as constant is that it actually has a value at compile time, just that the compile time value may get changed by the linker/runtime. But if you make it constant then the optimizer substitutes the load from the global for the value the compiler sees it contains. So yeah, i need something like WeakInternalConstant Pete On Nov 3, 2011, at 2:03 AM, Duncan Sands wrote: > Hi Peter, > >> Please review this patch to allow the compiler to treat objc selector reference globals as constant when optimizing. These globals aren't actually constant at compile time in that the value they point at may be changed by the linker or runtime, but the value they have is the same for all loads from that address once the program has started. > > what if you declare the global to be a weak constant? I guess the problem is > that you need internal linkage? > > Ciao, Duncan. > >> Ideally this code shouldn't be checking for the name of the global, but the correct change likely involves adding a new linkage type which is much more significant and overkill while there's only one type of variable this applies to. >> >> Thanks, >> Pete >> >> >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From daniel at zuster.org Thu Nov 3 12:30:17 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Thu, 03 Nov 2011 17:30:17 -0000 Subject: [llvm-commits] [llvm] r143616 - in /llvm/trunk/tools: CMakeLists.txt Makefile llvm-config-2/ llvm-config-2/CMakeLists.txt llvm-config-2/Makefile llvm-config-2/llvm-config.cpp Message-ID: <20111103173017.2560D2A6C12C@llvm.org> Author: ddunbar Date: Thu Nov 3 12:30:16 2011 New Revision: 143616 URL: http://llvm.org/viewvc/llvm-project?rev=143616&view=rev Log: llvm-config: Start stubbing out a C++ version of llvm-config (as llvm-config-2, for now). - Mostly complete except for the data that needs to come from the build system or the dependencies. - Has some small improvements from current llvm-config: o Uses TargetRegistry directly to get some information. o Designed to work correctly when used from a CMake build tree (relatively untested currently) (although pcc fixed this recently for old llvm-config). Added: llvm/trunk/tools/llvm-config-2/ llvm/trunk/tools/llvm-config-2/CMakeLists.txt llvm/trunk/tools/llvm-config-2/Makefile llvm/trunk/tools/llvm-config-2/llvm-config.cpp Modified: llvm/trunk/tools/CMakeLists.txt llvm/trunk/tools/Makefile Modified: llvm/trunk/tools/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/CMakeLists.txt?rev=143616&r1=143615&r2=143616&view=diff ============================================================================== --- llvm/trunk/tools/CMakeLists.txt (original) +++ llvm/trunk/tools/CMakeLists.txt Thu Nov 3 12:30:16 2011 @@ -19,6 +19,7 @@ add_subdirectory(llvm-config) endif() +add_subdirectory(llvm-config-2) add_subdirectory(opt) add_subdirectory(llvm-as) add_subdirectory(llvm-dis) Modified: llvm/trunk/tools/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/Makefile?rev=143616&r1=143615&r2=143616&view=diff ============================================================================== --- llvm/trunk/tools/Makefile (original) +++ llvm/trunk/tools/Makefile Thu Nov 3 12:30:16 2011 @@ -34,7 +34,7 @@ bugpoint llvm-bcanalyzer llvm-stub \ llvm-diff macho-dump llvm-objdump \ llvm-rtdyld llvm-dwarfdump llvm-cov \ - llvm-size + llvm-size llvm-config-2 # Let users override the set of tools to build from the command line. ifdef ONLY_TOOLS Added: llvm/trunk/tools/llvm-config-2/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-config-2/CMakeLists.txt?rev=143616&view=auto ============================================================================== --- llvm/trunk/tools/llvm-config-2/CMakeLists.txt (added) +++ llvm/trunk/tools/llvm-config-2/CMakeLists.txt Thu Nov 3 12:30:16 2011 @@ -0,0 +1,5 @@ +set(LLVM_LINK_COMPONENTS support) + +add_llvm_tool(llvm-config-2 + llvm-config.cpp + ) Added: llvm/trunk/tools/llvm-config-2/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-config-2/Makefile?rev=143616&view=auto ============================================================================== --- llvm/trunk/tools/llvm-config-2/Makefile (added) +++ llvm/trunk/tools/llvm-config-2/Makefile Thu Nov 3 12:30:16 2011 @@ -0,0 +1,17 @@ +##===- tools/llvm-config/Makefile---------------------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## + +LEVEL := ../.. +TOOLNAME := llvm-config-2 +LINK_COMPONENTS := support + +# This tool has no plugins, optimize startup time. +TOOL_NO_EXPORTS := 1 + +include $(LEVEL)/Makefile.common Added: llvm/trunk/tools/llvm-config-2/llvm-config.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-config-2/llvm-config.cpp?rev=143616&view=auto ============================================================================== --- llvm/trunk/tools/llvm-config-2/llvm-config.cpp (added) +++ llvm/trunk/tools/llvm-config-2/llvm-config.cpp Thu Nov 3 12:30:16 2011 @@ -0,0 +1,259 @@ +//===-- llvm-config.cpp - LLVM project configuration utility --------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This tool encapsulates information about an LLVM project configuration for +// use by other project's build environments (to determine installed path, +// available features, required libraries, etc.). +// +// Note that although this tool *may* be used by some parts of LLVM's build +// itself (i.e., the Makefiles use it to compute required libraries when linking +// tools), this tool is primarily designed to support external projects. +// +//===----------------------------------------------------------------------===// + +#include "llvm/ADT/StringRef.h" +#include "llvm/ADT/Twine.h" +#include "llvm/Config/config.h" +#include "llvm/Config/llvm-config.h" +#include "llvm/Support/FileSystem.h" +#include "llvm/Support/Path.h" +#include "llvm/Support/TargetRegistry.h" +#include "llvm/Support/raw_ostream.h" +#include +#include + +using namespace llvm; + +// FIXME: Need to get various bits of build time information. +const char LLVM_SRC_ROOT[] = "FIXME"; +const char LLVM_OBJ_ROOT[] = "FIXME"; +const char LLVM_CPPFLAGS[] = "FIXME"; +const char LLVM_CFLAGS[] = "FIXME"; +const char LLVM_LDFLAGS[] = "FIXME"; +const char LLVM_CXXFLAGS[] = "FIXME"; +const char LLVM_BUILDMODE[] = "FIXME"; +const char LLVM_SYSTEM_LIBS[] = "FIXME"; + +// FIXME: Include component table. +struct AvailableComponent { + const char *Name; +} AvailableComponents[1] = {}; +unsigned NumAvailableComponents = 0; + +void ComputeLibsForComponents(const std::vector &Components, + std::vector &RequiredLibs) { + // FIXME: Implement. + RequiredLibs = Components; +} + +/* *** */ + +void usage() { + errs() << "\ +usage: llvm-config
    From daniel at zuster.org Thu Nov 3 12:56:28 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Thu, 03 Nov 2011 17:56:28 -0000 Subject: [llvm-commits] [llvm] r143628 - in /llvm/trunk: docs/CommandGuide/llvm-build.pod utils/llvm-build/llvmbuild/componentinfo.py utils/llvm-build/llvmbuild/main.py Message-ID: <20111103175628.E87632A6C12C@llvm.org> Author: ddunbar Date: Thu Nov 3 12:56:28 2011 New Revision: 143628 URL: http://llvm.org/viewvc/llvm-project?rev=143628&view=rev Log: llvm-build: Add "--write-library-table" option for generating the C++ library dependency table used by llvm-config. Modified: llvm/trunk/docs/CommandGuide/llvm-build.pod llvm/trunk/utils/llvm-build/llvmbuild/componentinfo.py llvm/trunk/utils/llvm-build/llvmbuild/main.py Modified: llvm/trunk/docs/CommandGuide/llvm-build.pod URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CommandGuide/llvm-build.pod?rev=143628&r1=143627&r2=143628&view=diff ============================================================================== --- llvm/trunk/docs/CommandGuide/llvm-build.pod (original) +++ llvm/trunk/docs/CommandGuide/llvm-build.pod Thu Nov 3 12:56:28 2011 @@ -36,6 +36,13 @@ Print the component tree for the project. +=item B<--write-library-table> + +Write out the C++ fragment which defines the components, library names, and +required libraries. This C++ fragment is built into L +in order to provide clients with the list of required libraries for arbitrary +component combinations. + =item B<--write-llvmbuild> Write out new I files based on the loaded components. This is Modified: llvm/trunk/utils/llvm-build/llvmbuild/componentinfo.py URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvm-build/llvmbuild/componentinfo.py?rev=143628&r1=143627&r2=143628&view=diff ============================================================================== --- llvm/trunk/utils/llvm-build/llvmbuild/componentinfo.py (original) +++ llvm/trunk/utils/llvm-build/llvmbuild/componentinfo.py Thu Nov 3 12:56:28 2011 @@ -135,6 +135,12 @@ self.add_to_library_groups) return result.getvalue() + def get_library_name(self): + return self.library_name or self.name + + def get_llvmconfig_component_name(self): + return self.get_library_name().lower() + class LibraryGroupComponentInfo(ComponentInfo): type_name = 'LibraryGroup' @@ -179,6 +185,9 @@ self.add_to_library_groups) return result.getvalue() + def get_llvmconfig_component_name(self): + return self.name.lower() + class ToolComponentInfo(ComponentInfo): type_name = 'Tool' Modified: llvm/trunk/utils/llvm-build/llvmbuild/main.py URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvm-build/llvmbuild/main.py?rev=143628&r1=143627&r2=143628&view=diff ============================================================================== --- llvm/trunk/utils/llvm-build/llvmbuild/main.py (original) +++ llvm/trunk/utils/llvm-build/llvmbuild/main.py Thu Nov 3 12:56:28 2011 @@ -54,6 +54,10 @@ ci.name, ci.subpath, existing.subpath)) self.component_info_map[ci.name] = ci + # Disallow 'all' as a component name, which is a special case. + if 'all' in self.component_info_map: + fatal("project is not allowed to define 'all' component") + # Add the root component. if '$ROOT' in self.component_info_map: fatal("project is not allowed to define $ROOT component") @@ -164,6 +168,94 @@ print >>f f.close() + def write_library_table(self, output_path): + # Write out the mapping from component names to required libraries. + # + # We do this in topological order so that we know we can append the + # dependencies for added library groups. + entries = {} + for c in self.ordered_component_infos: + # Only Library and LibraryGroup components are in the table. + if c.type_name not in ('Library', 'LibraryGroup'): + continue + + # Compute the llvm-config "component name". For historical reasons, + # this is lowercased based on the library name. + llvmconfig_component_name = c.get_llvmconfig_component_name() + + # Get the library name, or None for LibraryGroups. + if c.type_name == 'LibraryGroup': + library_name = None + else: + library_name = c.get_library_name() + + # Get the component names of all the required libraries. + required_llvmconfig_component_names = [ + self.component_info_map[dep].get_llvmconfig_component_name() + for dep in c.required_libraries] + + # Insert the entries for library groups we should add to. + for dep in c.add_to_library_groups: + entries[dep][2].append(llvmconfig_component_name) + + # Add the entry. + entries[c.name] = (llvmconfig_component_name, library_name, + required_llvmconfig_component_names) + + # Convert to a list of entries and sort by name. + entries = entries.values() + + # Create an 'all' pseudo component. We keep the dependency list small by + # only listing entries that have no other dependents. + root_entries = set(e[0] for e in entries) + for _,_,deps in entries: + root_entries -= set(deps) + entries.append(('all', None, root_entries)) + + entries.sort() + + # Compute the maximum number of required libraries, plus one so there is + # always a sentinel. + max_required_libraries = max(len(deps) + for _,_,deps in entries) + 1 + + # Write out the library table. + f = open(output_path, 'w') + print >>f, """\ +//===- llvm-build generated file --------------------------------*- C++ -*-===// +// +// Component Library Depenedency Table +// +// Automatically generated file, do not edit! +// +//===----------------------------------------------------------------------===// +""" + print >>f, 'struct AvailableComponent {' + print >>f, ' /// The name of the component.' + print >>f, ' const char *Name;' + print >>f, '' + print >>f, ' /// The name of the library for this component (or NULL).' + print >>f, ' const char *Library;' + print >>f, '' + print >>f, '\ + /// The list of libraries required when linking this component.' + print >>f, ' const char *RequiredLibraries[%d];' % ( + max_required_libraries) + print >>f, '} AvailableComponents[%d] = {' % len(entries) + for name,library_name,required_names in entries: + if library_name is None: + library_name_as_cstr = '0' + else: + # If we had a project level component, we could derive the + # library prefix. + library_name_as_cstr = '"libLLVM%s.a"' % library_name + print >>f, ' { "%s", %s, { %s } },' % ( + name, library_name_as_cstr, + ', '.join('"%s"' % dep + for dep in required_names)) + print >>f, '};' + f.close() + def main(): from optparse import OptionParser, OptionGroup parser = OptionParser("usage: %prog [options]") @@ -176,10 +268,15 @@ parser.add_option("", "--write-llvmbuild", dest="write_llvmbuild", help="Write out the LLVMBuild.txt files to PATH", action="store", default=None, metavar="PATH") - parser.add_option( - "", "--llvmbuild-source-root", dest="llvmbuild_source_root", - help="If given, an alternate path to search for LLVMBuild.txt files", - action="store", default=None, metavar="PATH") + parser.add_option("", "--write-library-table", + dest="write_library_table", metavar="PATH", + help="Write the C++ library dependency table to PATH", + action="store", default=None) + parser.add_option("", "--llvmbuild-source-root", + dest="llvmbuild_source_root", + help=( + "If given, an alternate path to search for LLVMBuild.txt files"), + action="store", default=None, metavar="PATH") (opts, args) = parser.parse_args() # Determine the LLVM source path, if not given. @@ -211,5 +308,9 @@ if opts.write_llvmbuild: project_info.write_components(opts.write_llvmbuild) + # Write out the required librariy, if requested. + if opts.write_library_table: + project_info.write_library_table(opts.write_library_table) + if __name__=='__main__': main() From daniel at zuster.org Thu Nov 3 12:56:31 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Thu, 03 Nov 2011 17:56:31 -0000 Subject: [llvm-commits] [llvm] r143629 - /llvm/trunk/utils/llvm-build/llvmbuild/main.py Message-ID: <20111103175631.E1B902A6C12C@llvm.org> Author: ddunbar Date: Thu Nov 3 12:56:31 2011 New Revision: 143629 URL: http://llvm.org/viewvc/llvm-project?rev=143629&view=rev Log: llvm-build: Update --write-llvmbuild to write out a standard LLVM style file header. Modified: llvm/trunk/utils/llvm-build/llvmbuild/main.py Modified: llvm/trunk/utils/llvm-build/llvmbuild/main.py URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvm-build/llvmbuild/main.py?rev=143629&r1=143628&r2=143629&view=diff ============================================================================== --- llvm/trunk/utils/llvm-build/llvmbuild/main.py (original) +++ llvm/trunk/utils/llvm-build/llvmbuild/main.py Thu Nov 3 12:56:31 2011 @@ -162,6 +162,31 @@ # Create the LLVMBuild file. file_path = os.path.join(directory_path, 'LLVMBuild.txt') f = open(file_path, "w") + + # Write the header. + header_fmt = ';===- %s %s-*- Conf -*--===;' + header_name = '.' + os.path.join(subpath, 'LLVMBuild.txt') + header_pad = '-' * (80 - len(header_fmt % (header_name, ''))) + header_string = header_fmt % (header_name, header_pad) + print >>f, """\ +%s +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; +""" % header_string + for i,fragment in enumerate(fragments): print >>f, '[component_%d]' % i f.write(fragment) From rafael.espindola at gmail.com Thu Nov 3 12:58:54 2011 From: rafael.espindola at gmail.com (=?UTF-8?Q?Rafael_Esp=C3=ADndola?=) Date: Thu, 3 Nov 2011 13:58:54 -0400 Subject: [llvm-commits] [patch][pr11300] Emit declarations before definitions Message-ID: The attached patch changes llvm to emit declarations before definitions if they are available. This causes DW_AT_specification to point back in the file, fixing PR11300. Is it OK? Cheers, Rafael -------------- next part -------------- A non-text attachment was scrubbed... Name: t.patch Type: application/octet-stream Size: 6123 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111103/ec023f8a/attachment.obj From peter_cooper at apple.com Thu Nov 3 13:01:56 2011 From: peter_cooper at apple.com (Pete Cooper) Date: Thu, 03 Nov 2011 18:01:56 -0000 Subject: [llvm-commits] [llvm] r143630 - in /llvm/trunk: lib/Transforms/Scalar/DeadStoreElimination.cpp test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll Message-ID: <20111103180156.8DCC52A6C12C@llvm.org> Author: pete Date: Thu Nov 3 13:01:56 2011 New Revision: 143630 URL: http://llvm.org/viewvc/llvm-project?rev=143630&view=rev Log: DeadStoreElimination can now trim the size of a store if the end of it is dead. Only currently done if the later store is writing to a power of 2 address or has the same alignment as the earlier store as then its likely to not break up large stores into smaller ones Fixes Added: llvm/trunk/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll Modified: llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp Modified: llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp?rev=143630&r1=143629&r2=143630&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp Thu Nov 3 13:01:56 2011 @@ -239,6 +239,24 @@ } } + +/// isShortenable - Returns true if this instruction can be safely shortened in +/// length. +static bool isShortenable(Instruction *I) { + // Don't shorten stores for now + if (isa(I)) + return false; + + IntrinsicInst *II = cast(I); + switch (II->getIntrinsicID()) { + default: return false; + case Intrinsic::memset: + case Intrinsic::memcpy: + // Do shorten memory intrinsics. + return true; + } +} + /// getStoredPointerOperand - Return the pointer that is being written to. static Value *getStoredPointerOperand(Instruction *I) { if (StoreInst *SI = dyn_cast(I)) @@ -293,11 +311,24 @@ return false; } -/// isCompleteOverwrite - Return true if a store to the 'Later' location +namespace { + enum OverwriteResult + { + OverwriteComplete, + OverwriteEnd, + OverwriteUnknown + }; +} + +/// isOverwrite - Return 'OverwriteComplete' if a store to the 'Later' location /// completely overwrites a store to the 'Earlier' location. -static bool isCompleteOverwrite(const AliasAnalysis::Location &Later, - const AliasAnalysis::Location &Earlier, - AliasAnalysis &AA) { +/// 'OverwriteEnd' if the end of the 'Earlier' location is completely +/// overwritten by 'Later', or 'OverwriteUnknown' if nothing can be determined +static OverwriteResult isOverwrite(const AliasAnalysis::Location &Later, + const AliasAnalysis::Location &Earlier, + AliasAnalysis &AA, + int64_t& EarlierOff, + int64_t& LaterOff) { const Value *P1 = Earlier.Ptr->stripPointerCasts(); const Value *P2 = Later.Ptr->stripPointerCasts(); @@ -311,23 +342,24 @@ // If we have no TargetData information around, then the size of the store // is inferrable from the pointee type. If they are the same type, then // we know that the store is safe. - if (AA.getTargetData() == 0) - return Later.Ptr->getType() == Earlier.Ptr->getType(); - return false; + if (AA.getTargetData() == 0 && + Later.Ptr->getType() == Earlier.Ptr->getType()) + return OverwriteComplete; + + return OverwriteUnknown; } // Make sure that the Later size is >= the Earlier size. - if (Later.Size < Earlier.Size) - return false; - return true; + if (Later.Size >= Earlier.Size) + return OverwriteComplete; } // Otherwise, we have to have size information, and the later store has to be // larger than the earlier one. if (Later.Size == AliasAnalysis::UnknownSize || Earlier.Size == AliasAnalysis::UnknownSize || - Later.Size <= Earlier.Size || AA.getTargetData() == 0) - return false; + AA.getTargetData() == 0) + return OverwriteUnknown; // Check to see if the later store is to the entire object (either a global, // an alloca, or a byval argument). If so, then it clearly overwrites any @@ -340,26 +372,27 @@ // If we can't resolve the same pointers to the same object, then we can't // analyze them at all. if (UO1 != UO2) - return false; + return OverwriteUnknown; // If the "Later" store is to a recognizable object, get its size. if (isObjectPointerWithTrustworthySize(UO2)) { uint64_t ObjectSize = TD.getTypeAllocSize(cast(UO2->getType())->getElementType()); if (ObjectSize == Later.Size) - return true; + return OverwriteComplete; } // Okay, we have stores to two completely different pointers. Try to // decompose the pointer into a "base + constant_offset" form. If the base // pointers are equal, then we can reason about the two stores. - int64_t EarlierOff = 0, LaterOff = 0; + EarlierOff = 0; + LaterOff = 0; const Value *BP1 = GetPointerBaseWithConstantOffset(P1, EarlierOff, TD); const Value *BP2 = GetPointerBaseWithConstantOffset(P2, LaterOff, TD); // If the base pointers still differ, we have two completely different stores. if (BP1 != BP2) - return false; + return OverwriteUnknown; // The later store completely overlaps the earlier store if: // @@ -377,11 +410,24 @@ // // We have to be careful here as *Off is signed while *.Size is unsigned. if (EarlierOff >= LaterOff && + Later.Size > Earlier.Size && uint64_t(EarlierOff - LaterOff) + Earlier.Size <= Later.Size) - return true; + return OverwriteComplete; + + // The other interesting case is if the later store overwrites the end of + // the earlier store + // + // |--earlier--| + // |-- later --| + // + // In this case we may want to trim the size of earlier to avoid generating + // writes to addresses which will definitely be overwritten later + if (LaterOff > EarlierOff && + LaterOff + Later.Size >= EarlierOff + Earlier.Size) + return OverwriteEnd; // Otherwise, they don't completely overlap. - return false; + return OverwriteUnknown; } /// isPossibleSelfRead - If 'Inst' might be a self read (i.e. a noop copy of a @@ -505,22 +551,52 @@ // If we find a write that is a) removable (i.e., non-volatile), b) is // completely obliterated by the store to 'Loc', and c) which we know that // 'Inst' doesn't load from, then we can remove it. - if (isRemovable(DepWrite) && isCompleteOverwrite(Loc, DepLoc, *AA) && + if (isRemovable(DepWrite) && !isPossibleSelfRead(Inst, Loc, DepWrite, *AA)) { - DEBUG(dbgs() << "DSE: Remove Dead Store:\n DEAD: " - << *DepWrite << "\n KILLER: " << *Inst << '\n'); - - // Delete the store and now-dead instructions that feed it. - DeleteDeadInstruction(DepWrite, *MD); - ++NumFastStores; - MadeChange = true; + int64_t InstWriteOffset, DepWriteOffset; + OverwriteResult OR = isOverwrite(Loc, DepLoc, *AA, + DepWriteOffset, InstWriteOffset); + if (OR == OverwriteComplete) { + DEBUG(dbgs() << "DSE: Remove Dead Store:\n DEAD: " + << *DepWrite << "\n KILLER: " << *Inst << '\n'); - // DeleteDeadInstruction can delete the current instruction in loop - // cases, reset BBI. - BBI = Inst; - if (BBI != BB.begin()) - --BBI; - break; + // Delete the store and now-dead instructions that feed it. + DeleteDeadInstruction(DepWrite, *MD); + ++NumFastStores; + MadeChange = true; + + // DeleteDeadInstruction can delete the current instruction in loop + // cases, reset BBI. + BBI = Inst; + if (BBI != BB.begin()) + --BBI; + break; + } else if (OR == OverwriteEnd && isShortenable(DepWrite)) { + // TODO: base this on the target vector size so that if the earlier + // store was too small to get vector writes anyway then its likely + // a good idea to shorten it + // Power of 2 vector writes are probably always a bad idea to optimize + // as any store/memset/memcpy is likely using vector instructions so + // shortening it to not vector size is likely to be slower + MemIntrinsic* DepIntrinsic = cast(DepWrite); + unsigned DepWriteAlign = DepIntrinsic->getAlignment(); + if (llvm::isPowerOf2_64(InstWriteOffset) || + ((DepWriteAlign != 0) && InstWriteOffset % DepWriteAlign == 0)) { + + DEBUG(dbgs() << "DSE: Remove Dead Store:\n OW END: " + << *DepWrite << "\n KILLER (offset " + << InstWriteOffset << ", " + << DepLoc.Size << ")" + << *Inst << '\n'); + + Value* DepWriteLength = DepIntrinsic->getLength(); + Value* TrimmedLength = ConstantInt::get(DepWriteLength->getType(), + InstWriteOffset - + DepWriteOffset); + DepIntrinsic->setLength(TrimmedLength); + MadeChange = true; + } + } } // If this is a may-aliased store that is clobbering the store value, we Added: llvm/trunk/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll?rev=143630&view=auto ============================================================================== --- llvm/trunk/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll (added) +++ llvm/trunk/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll Thu Nov 3 13:01:56 2011 @@ -0,0 +1,78 @@ +; RUN: opt < %s -basicaa -dse -S | FileCheck %s +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-S128" + +%struct.vec2 = type { <4 x i32>, <4 x i32> } +%struct.vec2plusi = type { <4 x i32>, <4 x i32>, i32 } + + at glob1 = global %struct.vec2 zeroinitializer, align 16 + at glob2 = global %struct.vec2plusi zeroinitializer, align 16 + +define void @write24to28(i32* nocapture %p) nounwind uwtable ssp { +; CHECK: @write24to28 +entry: + %arrayidx0 = getelementptr inbounds i32* %p, i64 1 + %p3 = bitcast i32* %arrayidx0 to i8* +; CHECK: call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 24, i32 4, i1 false) + call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 28, i32 4, i1 false) + %arrayidx1 = getelementptr inbounds i32* %p, i64 7 + store i32 1, i32* %arrayidx1, align 4 + ret void +} + +define void @write28to32(i32* nocapture %p) nounwind uwtable ssp { +; CHECK: @write28to32 +entry: + %p3 = bitcast i32* %p to i8* +; CHECK: call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 28, i32 4, i1 false) + call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 32, i32 4, i1 false) + %arrayidx1 = getelementptr inbounds i32* %p, i64 7 + store i32 1, i32* %arrayidx1, align 4 + ret void +} + +define void @dontwrite28to32memset(i32* nocapture %p) nounwind uwtable ssp { +; CHECK: @dontwrite28to32memset +entry: + %p3 = bitcast i32* %p to i8* +; CHECK: call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 32, i32 16, i1 false) + call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 32, i32 16, i1 false) + %arrayidx1 = getelementptr inbounds i32* %p, i64 7 + store i32 1, i32* %arrayidx1, align 4 + ret void +} + +define void @write32to36(%struct.vec2plusi* nocapture %p) nounwind uwtable ssp { +; CHECK: @write32to36 +entry: + %0 = bitcast %struct.vec2plusi* %p to i8* +; CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2plusi* @glob2 to i8*), i64 32, i32 16, i1 false) + tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2plusi* @glob2 to i8*), i64 36, i32 16, i1 false) + %c = getelementptr inbounds %struct.vec2plusi* %p, i64 0, i32 2 + store i32 1, i32* %c, align 4 + ret void +} + +define void @write16to32(%struct.vec2* nocapture %p) nounwind uwtable ssp { +; CHECK: @write16to32 +entry: + %0 = bitcast %struct.vec2* %p to i8* +; CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2* @glob1 to i8*), i64 16, i32 16, i1 false) + tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2* @glob1 to i8*), i64 32, i32 16, i1 false) + %c = getelementptr inbounds %struct.vec2* %p, i64 0, i32 1 + store <4 x i32> , <4 x i32>* %c, align 4 + ret void +} + +define void @dontwrite28to32memcpy(%struct.vec2* nocapture %p) nounwind uwtable ssp { +; CHECK: @dontwrite28to32memcpy +entry: + %0 = bitcast %struct.vec2* %p to i8* +; CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2* @glob1 to i8*), i64 32, i32 16, i1 false) + tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2* @glob1 to i8*), i64 32, i32 16, i1 false) + %arrayidx1 = getelementptr inbounds %struct.vec2* %p, i64 0, i32 0, i64 7 + store i32 1, i32* %arrayidx1, align 4 + ret void +} + +declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind +declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind From resistor at mac.com Thu Nov 3 13:15:02 2011 From: resistor at mac.com (Owen Anderson) Date: Thu, 03 Nov 2011 11:15:02 -0700 Subject: [llvm-commits] patch: smarter DSE In-Reply-To: References: <4EAE625B.7050108@mxc.ca> Message-ID: On Oct 31, 2011, at 11:22 AM, Nick Lewycky wrote: > On 31 October 2011 10:23, Owen Anderson wrote: > Nick, > > Isn't what you're computing here an approximation of immediate post-dominance? If we really want to handle this properly, it seems like we should just use the actual post-dominance computation rather than approximating it. > > Heh, an earlier version of my patch actually called that function FindPostIdoms. > > No, simply looking at postdoms would actually do the wrong thing. Consider a CFG "A -> {B, C}, B -> D, C -> D": the matching postdom tree is "D -> {A, B, C}". Given a free in block D we would look for and delete stores in A. Trouble is, those aren't necessarily dead as there may be uses in B and C. That's why I explicitly check through the preds. OK, I see your point there. I guess this is another case where we want to have reverse MemDep. I'm fine with this going in, but please check for compile-time regressions first. Inter-block DSE has been a source of regressions in the past. --Owen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111103/217584b4/attachment.html From clattner at apple.com Thu Nov 3 13:26:09 2011 From: clattner at apple.com (Chris Lattner) Date: Thu, 03 Nov 2011 11:26:09 -0700 Subject: [llvm-commits] [llvm] r143600 - in /llvm/trunk: lib/CodeGen/MachineInstr.cpp test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll In-Reply-To: <0D65E3B4-13AE-405D-8DA6-E7E946FCB8A7@apple.com> References: <20111103005637.1BC062A6C12C@llvm.org> <021D99BD-132F-4B07-A87D-0CE68892311A@apple.com> <0D65E3B4-13AE-405D-8DA6-E7E946FCB8A7@apple.com> Message-ID: <37928F5D-8EEF-4254-AA9D-633F94E1265A@apple.com> On Nov 3, 2011, at 10:18 AM, Peter Cooper wrote: > Hi Chris > > I agree that a new linkage type is better, but that seemed overkill when there's currently only one case where this occurs. But yes, special casing by name is particularly gross. This sort of thing is an instance of a more general problem. I can imagine other front ends that want to unique strings for example, or do load-time optimizations that prevent something from being marked truly constant. Marking the load as "runtime constant load" through metadata seems a more general way to model this than by introducing a new linkage type on the global, but perhaps I'm missing something. > I did have a solution working in the earlier LICM pass but it then struggles to do CSE on these loads. It also meant putting my special case code in 2 places which would have been even more gross. If i change it to a new linkage type then i'll make sure and have earlyCSE and LICM work on it too. Can you elaborate on what the problem was? -Chris From peter_cooper at apple.com Thu Nov 3 13:46:40 2011 From: peter_cooper at apple.com (Peter Cooper) Date: Thu, 03 Nov 2011 11:46:40 -0700 Subject: [llvm-commits] [llvm] r143600 - in /llvm/trunk: lib/CodeGen/MachineInstr.cpp test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll In-Reply-To: <37928F5D-8EEF-4254-AA9D-633F94E1265A@apple.com> References: <20111103005637.1BC062A6C12C@llvm.org> <021D99BD-132F-4B07-A87D-0CE68892311A@apple.com> <0D65E3B4-13AE-405D-8DA6-E7E946FCB8A7@apple.com> <37928F5D-8EEF-4254-AA9D-633F94E1265A@apple.com> Message-ID: <3B3C293A-BC4F-4B7D-8126-F82307ED49F1@apple.com> On Nov 3, 2011, at 11:26 AM, Chris Lattner wrote: > On Nov 3, 2011, at 10:18 AM, Peter Cooper wrote: >> Hi Chris >> >> I agree that a new linkage type is better, but that seemed overkill when there's currently only one case where this occurs. But yes, special casing by name is particularly gross. > > This sort of thing is an instance of a more general problem. I can imagine other front ends that want to unique strings for example, or do load-time optimizations that prevent something from being marked truly constant. Marking the load as "runtime constant load" through metadata seems a more general way to model this than by introducing a new linkage type on the global, but perhaps I'm missing something. I did mention metadata to Evan but he'd said that might be too heavyweight a solution. But there also seems to be reasons against adding a whole new linkage type too, primarily that there's quite a lot of them for developers to deal with already. > >> I did have a solution working in the earlier LICM pass but it then struggles to do CSE on these loads. It also meant putting my special case code in 2 places which would have been even more gross. If i change it to a new linkage type then i'll make sure and have earlyCSE and LICM work on it too. > > Can you elaborate on what the problem was? Yeah, so i found that other constant loads are optimized into one load in GVN (not always earlyCSE, got that wrong here). So the problem was that GVN gets its information for the load from MemoryDependenceAnalysis which calls into AA. But if i change AA to say that this global is sort of constant then later optimizations substitute the load from the global for the value it contains which is incorrect. The test i had was this, and the problem was the call killing the first load and so stopping it from CSE with the second load. %2 = load i8** @"\01L_OBJC_SELECTOR_REFERENCES_" %call = call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* %1, i8* %2) %3 = load i8** @"\01L_OBJC_SELECTOR_REFERENCES_" Pete From peckw at wesleypeck.com Thu Nov 3 13:51:43 2011 From: peckw at wesleypeck.com (Wesley Peck) Date: Thu, 3 Nov 2011 13:51:43 -0500 Subject: [llvm-commits] [llvm] r143616 - in /llvm/trunk/tools: CMakeLists.txt Makefile llvm-config-2/ llvm-config-2/CMakeLists.txt llvm-config-2/Makefile llvm-config-2/llvm-config.cpp In-Reply-To: <20111103173017.2560D2A6C12C@llvm.org> References: <20111103173017.2560D2A6C12C@llvm.org> Message-ID: On Nov 3, 2011, at 12:30 PM, Daniel Dunbar wrote: > + for (int i = 1; i != argc; ++i) { > + StringRef Arg = argv[i]; > + > + if (Arg.startswith("-")) { > + HasAnyOption = true; > + if (Arg == "--version") { > + OS << PACKAGE_VERSION << '\n'; > + } else if (Arg == "--prefix") { > + OS << ActivePrefix << '\n'; > + } else if (Arg == "--bindir") { > + OS << ActiveBinDir << '\n'; > + } else if (Arg == "--includedir") { > + OS << ActiveIncludeDir << '\n'; > + } else if (Arg == "--libdir") { > + OS << ActiveLibDir << '\n'; > + } else if (Arg == "--cppflags") { > + OS << ActiveIncludeOption << ' ' << LLVM_CPPFLAGS << '\n'; > + } else if (Arg == "--cflags") { > + OS << ActiveIncludeOption << ' ' << LLVM_CFLAGS << '\n'; > + } else if (Arg == "--cxxflags") { > + OS << ActiveIncludeOption << ' ' << LLVM_CXXFLAGS << '\n'; > + } else if (Arg == "--ldflags") { > + OS << "-L" << ActiveLibDir << ' ' << LLVM_LDFLAGS > + << ' ' << LLVM_SYSTEM_LIBS << '\n'; > + } else if (Arg == "--libs") { > + PrintLibs = true; > + } else if (Arg == "--libnames") { > + PrintLibNames = true; > + } else if (Arg == "--libfiles") { > + PrintLibFiles = true; > + } else if (Arg == "--components") { > + for (unsigned j = 0; j != NumAvailableComponents; ++j) { > + if (j) > + OS << ' '; > + OS << AvailableComponents[j].Name; > + } > + OS << '\n'; > + } else if (Arg == "--targets-built") { > + bool First = true; > + for (TargetRegistry::iterator I = TargetRegistry::begin(), > + E = TargetRegistry::end(); I != E; First = false, ++I) { > + if (!First) > + OS << ' '; > + OS << I->getName(); > + } > + OS << '\n'; > + } else if (Arg == "--host-target") { > + OS << LLVM_DEFAULT_TARGET_TRIPLE << '\n'; > + } else if (Arg == "--build-mode") { > + OS << LLVM_BUILDMODE << '\n'; > + } else if (Arg == "--obj-root") { > + OS << LLVM_OBJ_ROOT << '\n'; > + } else if (Arg == "--src-root") { > + OS << LLVM_SRC_ROOT << '\n'; > + } else { > + usage(); > + } > + } else { > + Components.push_back(Arg); > + } > + } > + > + if (!HasAnyOption) > + usage(); Just out of curiosity, why not use LLVM's command line parsing library for this? Is is not capable of parsing the required syntax or are you trying to avoid some sort of dependency? It seems like it would be a lot cleaner and easier to maintain than this code. -- Wesley Peck University of Kansas SLDG Laboratory From evan.cheng at apple.com Thu Nov 3 13:51:49 2011 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 03 Nov 2011 11:51:49 -0700 Subject: [llvm-commits] [llvm] r143600 - in /llvm/trunk: lib/CodeGen/MachineInstr.cpp test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll In-Reply-To: <3B3C293A-BC4F-4B7D-8126-F82307ED49F1@apple.com> References: <20111103005637.1BC062A6C12C@llvm.org> <021D99BD-132F-4B07-A87D-0CE68892311A@apple.com> <0D65E3B4-13AE-405D-8DA6-E7E946FCB8A7@apple.com> <37928F5D-8EEF-4254-AA9D-633F94E1265A@apple.com> <3B3C293A-BC4F-4B7D-8126-F82307ED49F1@apple.com> Message-ID: <5A27BE4A-6D6D-437A-B98E-2CE114754DD0@apple.com> On Nov 3, 2011, at 11:46 AM, Peter Cooper wrote: > > On Nov 3, 2011, at 11:26 AM, Chris Lattner wrote: > >> On Nov 3, 2011, at 10:18 AM, Peter Cooper wrote: >>> Hi Chris >>> >>> I agree that a new linkage type is better, but that seemed overkill when there's currently only one case where this occurs. But yes, special casing by name is particularly gross. >> >> This sort of thing is an instance of a more general problem. I can imagine other front ends that want to unique strings for example, or do load-time optimizations that prevent something from being marked truly constant. Marking the load as "runtime constant load" through metadata seems a more general way to model this than by introducing a new linkage type on the global, but perhaps I'm missing something. > > I did mention metadata to Evan but he'd said that might be too heavyweight a solution. But there also seems to be reasons against adding a whole new linkage type too, primarily that there's quite a lot of them for developers to deal with already. My concern is there is no precedence for using metadata annotation for scalar optimizations. Evan >> >>> I did have a solution working in the earlier LICM pass but it then struggles to do CSE on these loads. It also meant putting my special case code in 2 places which would have been even more gross. If i change it to a new linkage type then i'll make sure and have earlyCSE and LICM work on it too. >> >> Can you elaborate on what the problem was? > > Yeah, so i found that other constant loads are optimized into one load in GVN (not always earlyCSE, got that wrong here). So the problem was that GVN gets its information for the load from MemoryDependenceAnalysis which calls into AA. But if i change AA to say that this global is sort of constant then later optimizations substitute the load from the global for the value it contains which is incorrect. > > The test i had was this, and the problem was the call killing the first load and so stopping it from CSE with the second load. > > %2 = load i8** @"\01L_OBJC_SELECTOR_REFERENCES_" > %call = call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* %1, i8* %2) > %3 = load i8** @"\01L_OBJC_SELECTOR_REFERENCES_" > > Pete From daniel at zuster.org Thu Nov 3 13:53:19 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Thu, 03 Nov 2011 18:53:19 -0000 Subject: [llvm-commits] [llvm] r143634 - in /llvm/trunk: ./ bindings/ docs/ examples/ lib/ lib/Analysis/ lib/Analysis/IPA/ lib/Archive/ lib/AsmParser/ lib/Bitcode/ lib/Bitcode/Reader/ lib/Bitcode/Writer/ lib/CodeGen/ lib/CodeGen/AsmPrinter/ lib/CodeGen/SelectionDAG/ lib/DebugInfo/ lib/ExecutionEngine/ lib/ExecutionEngine/Interpreter/ lib/ExecutionEngine/JIT/ lib/ExecutionEngine/MCJIT/ lib/ExecutionEngine/RuntimeDyld/ lib/Linker/ lib/MC/ lib/MC/MCDisassembler/ lib/MC/MCParser/ lib/Object/ lib/Support/ lib/TableGen/ lib/Target/ l... Message-ID: <20111103185320.2CE572A6C12C@llvm.org> Author: ddunbar Date: Thu Nov 3 13:53:17 2011 New Revision: 143634 URL: http://llvm.org/viewvc/llvm-project?rev=143634&view=rev Log: build: Add initial cut at LLVMBuild.txt files. Added: llvm/trunk/LLVMBuild.txt llvm/trunk/bindings/LLVMBuild.txt llvm/trunk/docs/LLVMBuild.txt llvm/trunk/examples/LLVMBuild.txt llvm/trunk/lib/Analysis/IPA/LLVMBuild.txt llvm/trunk/lib/Analysis/LLVMBuild.txt llvm/trunk/lib/Archive/LLVMBuild.txt llvm/trunk/lib/AsmParser/LLVMBuild.txt llvm/trunk/lib/Bitcode/LLVMBuild.txt llvm/trunk/lib/Bitcode/Reader/LLVMBuild.txt llvm/trunk/lib/Bitcode/Writer/LLVMBuild.txt llvm/trunk/lib/CodeGen/AsmPrinter/LLVMBuild.txt llvm/trunk/lib/CodeGen/LLVMBuild.txt llvm/trunk/lib/CodeGen/SelectionDAG/LLVMBuild.txt llvm/trunk/lib/DebugInfo/LLVMBuild.txt llvm/trunk/lib/ExecutionEngine/Interpreter/LLVMBuild.txt llvm/trunk/lib/ExecutionEngine/JIT/LLVMBuild.txt llvm/trunk/lib/ExecutionEngine/LLVMBuild.txt llvm/trunk/lib/ExecutionEngine/MCJIT/LLVMBuild.txt llvm/trunk/lib/ExecutionEngine/RuntimeDyld/LLVMBuild.txt llvm/trunk/lib/LLVMBuild.txt llvm/trunk/lib/Linker/LLVMBuild.txt llvm/trunk/lib/MC/LLVMBuild.txt llvm/trunk/lib/MC/MCDisassembler/LLVMBuild.txt llvm/trunk/lib/MC/MCParser/LLVMBuild.txt llvm/trunk/lib/Object/LLVMBuild.txt llvm/trunk/lib/Support/LLVMBuild.txt llvm/trunk/lib/TableGen/LLVMBuild.txt llvm/trunk/lib/Target/ARM/AsmParser/LLVMBuild.txt llvm/trunk/lib/Target/ARM/Disassembler/LLVMBuild.txt llvm/trunk/lib/Target/ARM/InstPrinter/LLVMBuild.txt llvm/trunk/lib/Target/ARM/LLVMBuild.txt llvm/trunk/lib/Target/ARM/MCTargetDesc/LLVMBuild.txt llvm/trunk/lib/Target/ARM/TargetInfo/LLVMBuild.txt llvm/trunk/lib/Target/CBackend/LLVMBuild.txt llvm/trunk/lib/Target/CBackend/TargetInfo/LLVMBuild.txt llvm/trunk/lib/Target/CellSPU/LLVMBuild.txt llvm/trunk/lib/Target/CellSPU/MCTargetDesc/LLVMBuild.txt llvm/trunk/lib/Target/CellSPU/TargetInfo/LLVMBuild.txt llvm/trunk/lib/Target/CppBackend/LLVMBuild.txt llvm/trunk/lib/Target/CppBackend/TargetInfo/LLVMBuild.txt llvm/trunk/lib/Target/LLVMBuild.txt llvm/trunk/lib/Target/MBlaze/AsmParser/LLVMBuild.txt llvm/trunk/lib/Target/MBlaze/Disassembler/LLVMBuild.txt llvm/trunk/lib/Target/MBlaze/InstPrinter/LLVMBuild.txt llvm/trunk/lib/Target/MBlaze/LLVMBuild.txt llvm/trunk/lib/Target/MBlaze/MCTargetDesc/LLVMBuild.txt llvm/trunk/lib/Target/MBlaze/TargetInfo/LLVMBuild.txt llvm/trunk/lib/Target/MSP430/InstPrinter/LLVMBuild.txt llvm/trunk/lib/Target/MSP430/LLVMBuild.txt llvm/trunk/lib/Target/MSP430/MCTargetDesc/LLVMBuild.txt llvm/trunk/lib/Target/MSP430/TargetInfo/LLVMBuild.txt llvm/trunk/lib/Target/Mips/InstPrinter/LLVMBuild.txt llvm/trunk/lib/Target/Mips/LLVMBuild.txt llvm/trunk/lib/Target/Mips/MCTargetDesc/LLVMBuild.txt llvm/trunk/lib/Target/Mips/TargetInfo/LLVMBuild.txt llvm/trunk/lib/Target/PTX/InstPrinter/LLVMBuild.txt llvm/trunk/lib/Target/PTX/LLVMBuild.txt llvm/trunk/lib/Target/PTX/MCTargetDesc/LLVMBuild.txt llvm/trunk/lib/Target/PTX/TargetInfo/LLVMBuild.txt llvm/trunk/lib/Target/PowerPC/InstPrinter/LLVMBuild.txt llvm/trunk/lib/Target/PowerPC/LLVMBuild.txt llvm/trunk/lib/Target/PowerPC/MCTargetDesc/LLVMBuild.txt llvm/trunk/lib/Target/PowerPC/TargetInfo/LLVMBuild.txt llvm/trunk/lib/Target/Sparc/LLVMBuild.txt llvm/trunk/lib/Target/Sparc/MCTargetDesc/LLVMBuild.txt llvm/trunk/lib/Target/Sparc/TargetInfo/LLVMBuild.txt llvm/trunk/lib/Target/X86/AsmParser/LLVMBuild.txt llvm/trunk/lib/Target/X86/Disassembler/LLVMBuild.txt llvm/trunk/lib/Target/X86/InstPrinter/LLVMBuild.txt llvm/trunk/lib/Target/X86/LLVMBuild.txt llvm/trunk/lib/Target/X86/MCTargetDesc/LLVMBuild.txt llvm/trunk/lib/Target/X86/TargetInfo/LLVMBuild.txt llvm/trunk/lib/Target/X86/Utils/LLVMBuild.txt llvm/trunk/lib/Target/XCore/LLVMBuild.txt llvm/trunk/lib/Target/XCore/MCTargetDesc/LLVMBuild.txt llvm/trunk/lib/Target/XCore/TargetInfo/LLVMBuild.txt llvm/trunk/lib/Transforms/IPO/LLVMBuild.txt llvm/trunk/lib/Transforms/InstCombine/LLVMBuild.txt llvm/trunk/lib/Transforms/Instrumentation/LLVMBuild.txt llvm/trunk/lib/Transforms/LLVMBuild.txt llvm/trunk/lib/Transforms/Scalar/LLVMBuild.txt llvm/trunk/lib/Transforms/Utils/LLVMBuild.txt llvm/trunk/lib/VMCore/LLVMBuild.txt llvm/trunk/projects/LLVMBuild.txt llvm/trunk/runtime/LLVMBuild.txt llvm/trunk/tools/LLVMBuild.txt llvm/trunk/utils/LLVMBuild.txt llvm/trunk/utils/TableGen/LLVMBuild.txt Added: llvm/trunk/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/LLVMBuild.txt (added) +++ llvm/trunk/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,22 @@ +;===- ./LLVMBuild.txt ------------------------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Group +name = Miscellaneous +parent = $ROOT + Added: llvm/trunk/bindings/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/bindings/LLVMBuild.txt (added) +++ llvm/trunk/bindings/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,22 @@ +;===- ./bindings/LLVMBuild.txt ---------------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Group +name = Bindings +parent = $ROOT + Added: llvm/trunk/docs/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/docs/LLVMBuild.txt (added) +++ llvm/trunk/docs/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,22 @@ +;===- ./docs/LLVMBuild.txt -------------------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Group +name = Docs +parent = $ROOT + Added: llvm/trunk/examples/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/examples/LLVMBuild.txt (added) +++ llvm/trunk/examples/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,22 @@ +;===- ./examples/LLVMBuild.txt ---------------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Group +name = Examples +parent = $ROOT + Added: llvm/trunk/lib/Analysis/IPA/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IPA/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Analysis/IPA/LLVMBuild.txt (added) +++ llvm/trunk/lib/Analysis/IPA/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Analysis/IPA/LLVMBuild.txt -------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = IPA +parent = Libraries +library_name = ipa +required_libraries = Analysis Core Support + Added: llvm/trunk/lib/Analysis/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Analysis/LLVMBuild.txt (added) +++ llvm/trunk/lib/Analysis/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,23 @@ +;===- ./lib/Analysis/LLVMBuild.txt -----------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = Analysis +parent = Libraries +required_libraries = Core Support Target + Added: llvm/trunk/lib/Archive/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Archive/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Archive/LLVMBuild.txt (added) +++ llvm/trunk/lib/Archive/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,23 @@ +;===- ./lib/Archive/LLVMBuild.txt ------------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = Archive +parent = Libraries +required_libraries = BitReader Core Support + Added: llvm/trunk/lib/AsmParser/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/AsmParser/LLVMBuild.txt (added) +++ llvm/trunk/lib/AsmParser/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,23 @@ +;===- ./lib/AsmParser/LLVMBuild.txt ----------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = AsmParser +parent = Libraries +required_libraries = Core Support + Added: llvm/trunk/lib/Bitcode/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Bitcode/LLVMBuild.txt (added) +++ llvm/trunk/lib/Bitcode/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,22 @@ +;===- ./lib/Bitcode/LLVMBuild.txt ------------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Group +name = Bitcode +parent = Libraries + Added: llvm/trunk/lib/Bitcode/Reader/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Bitcode/Reader/LLVMBuild.txt (added) +++ llvm/trunk/lib/Bitcode/Reader/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,23 @@ +;===- ./lib/Bitcode/Reader/LLVMBuild.txt -----------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = BitReader +parent = Bitcode +required_libraries = Core Support + Added: llvm/trunk/lib/Bitcode/Writer/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Bitcode/Writer/LLVMBuild.txt (added) +++ llvm/trunk/lib/Bitcode/Writer/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,23 @@ +;===- ./lib/Bitcode/Writer/LLVMBuild.txt -----------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = BitWriter +parent = Bitcode +required_libraries = Core Support + Added: llvm/trunk/lib/CodeGen/AsmPrinter/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/LLVMBuild.txt (added) +++ llvm/trunk/lib/CodeGen/AsmPrinter/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,23 @@ +;===- ./lib/CodeGen/AsmPrinter/LLVMBuild.txt -------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = AsmPrinter +parent = Libraries +required_libraries = Analysis CodeGen Core MC MCParser Support Target + Added: llvm/trunk/lib/CodeGen/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/CodeGen/LLVMBuild.txt (added) +++ llvm/trunk/lib/CodeGen/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,23 @@ +;===- ./lib/CodeGen/LLVMBuild.txt ------------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = CodeGen +parent = Libraries +required_libraries = Analysis Core MC Scalar Support Target TransformUtils + Added: llvm/trunk/lib/CodeGen/SelectionDAG/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/LLVMBuild.txt (added) +++ llvm/trunk/lib/CodeGen/SelectionDAG/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,23 @@ +;===- ./lib/CodeGen/SelectionDAG/LLVMBuild.txt -----------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = SelectionDAG +parent = CodeGen +required_libraries = Analysis CodeGen Core MC Support Target TransformUtils + Added: llvm/trunk/lib/DebugInfo/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/DebugInfo/LLVMBuild.txt (added) +++ llvm/trunk/lib/DebugInfo/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,23 @@ +;===- ./lib/DebugInfo/LLVMBuild.txt ----------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = DebugInfo +parent = Libraries +required_libraries = Support + Added: llvm/trunk/lib/ExecutionEngine/Interpreter/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Interpreter/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/ExecutionEngine/Interpreter/LLVMBuild.txt (added) +++ llvm/trunk/lib/ExecutionEngine/Interpreter/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,23 @@ +;===- ./lib/ExecutionEngine/Interpreter/LLVMBuild.txt ----------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = Interpreter +parent = ExecutionEngine +required_libraries = CodeGen Core ExecutionEngine Support Target + Added: llvm/trunk/lib/ExecutionEngine/JIT/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/ExecutionEngine/JIT/LLVMBuild.txt (added) +++ llvm/trunk/lib/ExecutionEngine/JIT/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,23 @@ +;===- ./lib/ExecutionEngine/JIT/LLVMBuild.txt ------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = JIT +parent = ExecutionEngine +required_libraries = CodeGen Core ExecutionEngine MC Support Target + Added: llvm/trunk/lib/ExecutionEngine/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/ExecutionEngine/LLVMBuild.txt (added) +++ llvm/trunk/lib/ExecutionEngine/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,23 @@ +;===- ./lib/ExecutionEngine/LLVMBuild.txt ----------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = ExecutionEngine +parent = Libraries +required_libraries = Core MC Support Target + Added: llvm/trunk/lib/ExecutionEngine/MCJIT/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/MCJIT/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/ExecutionEngine/MCJIT/LLVMBuild.txt (added) +++ llvm/trunk/lib/ExecutionEngine/MCJIT/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,23 @@ +;===- ./lib/ExecutionEngine/MCJIT/LLVMBuild.txt ----------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = MCJIT +parent = ExecutionEngine +required_libraries = Core ExecutionEngine RuntimeDyld Support Target + Added: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/LLVMBuild.txt (added) +++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,23 @@ +;===- ./lib/ExecutionEngine/RuntimeDyld/LLVMBuild.txt ----------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = RuntimeDyld +parent = ExecutionEngine +required_libraries = Object Support + Added: llvm/trunk/lib/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/LLVMBuild.txt (added) +++ llvm/trunk/lib/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,22 @@ +;===- ./lib/LLVMBuild.txt --------------------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Group +name = Libraries +parent = $ROOT + Added: llvm/trunk/lib/Linker/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Linker/LLVMBuild.txt (added) +++ llvm/trunk/lib/Linker/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,23 @@ +;===- ./lib/Linker/LLVMBuild.txt -------------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = Linker +parent = Libraries +required_libraries = Archive BitReader Core Support TransformUtils + Added: llvm/trunk/lib/MC/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/MC/LLVMBuild.txt (added) +++ llvm/trunk/lib/MC/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,23 @@ +;===- ./lib/MC/LLVMBuild.txt -----------------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = MC +parent = Libraries +required_libraries = Support + Added: llvm/trunk/lib/MC/MCDisassembler/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/MC/MCDisassembler/LLVMBuild.txt (added) +++ llvm/trunk/lib/MC/MCDisassembler/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,23 @@ +;===- ./lib/MC/MCDisassembler/LLVMBuild.txt --------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = MCDisassembler +parent = MC +required_libraries = ARMAsmParser ARMDesc ARMDisassembler ARMInfo CBackendInfo CellSPUDesc CellSPUInfo CppBackendInfo MBlazeAsmParser MBlazeDesc MBlazeDisassembler MBlazeInfo MC MCParser MSP430Desc MSP430Info MipsDesc MipsInfo PTXDesc PTXInfo PowerPCDesc PowerPCInfo SparcDesc SparcInfo Support X86AsmParser X86Desc X86Disassembler X86Info XCoreDesc XCoreInfo + Added: llvm/trunk/lib/MC/MCParser/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/MC/MCParser/LLVMBuild.txt (added) +++ llvm/trunk/lib/MC/MCParser/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,23 @@ +;===- ./lib/MC/MCParser/LLVMBuild.txt --------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = MCParser +parent = MC +required_libraries = MC Support + Added: llvm/trunk/lib/Object/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Object/LLVMBuild.txt (added) +++ llvm/trunk/lib/Object/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,23 @@ +;===- ./lib/Object/LLVMBuild.txt -------------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = Object +parent = Libraries +required_libraries = Support + Added: llvm/trunk/lib/Support/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Support/LLVMBuild.txt (added) +++ llvm/trunk/lib/Support/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,22 @@ +;===- ./lib/Support/LLVMBuild.txt ------------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = Support +parent = Libraries + Added: llvm/trunk/lib/TableGen/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/TableGen/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/TableGen/LLVMBuild.txt (added) +++ llvm/trunk/lib/TableGen/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,23 @@ +;===- ./lib/TableGen/LLVMBuild.txt -----------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = TableGen +parent = Libraries +required_libraries = Support + Added: llvm/trunk/lib/Target/ARM/AsmParser/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/ARM/AsmParser/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/ARM/AsmParser/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/ARM/AsmParser/LLVMBuild.txt -----------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = ARMAsmParser +parent = ARM +required_libraries = ARMDesc ARMInfo MC MCParser Support +add_to_library_groups = ARM + Added: llvm/trunk/lib/Target/ARM/Disassembler/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/ARM/Disassembler/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/ARM/Disassembler/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/ARM/Disassembler/LLVMBuild.txt --------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = ARMDisassembler +parent = ARM +required_libraries = ARMDesc ARMInfo MC Support +add_to_library_groups = ARM + Added: llvm/trunk/lib/Target/ARM/InstPrinter/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/InstPrinter/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/ARM/InstPrinter/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/ARM/InstPrinter/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/ARM/InstPrinter/LLVMBuild.txt ---------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = ARMAsmPrinter +parent = ARM +required_libraries = MC Support +add_to_library_groups = ARM + Added: llvm/trunk/lib/Target/ARM/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/ARM/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/ARM/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,30 @@ +;===- ./lib/Target/ARM/LLVMBuild.txt ---------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = LibraryGroup +name = ARM +parent = Target +add_to_library_groups = all-targets + +[component_1] +type = Library +name = ARMCodeGen +parent = ARM +required_libraries = ARMAsmPrinter ARMDesc ARMInfo Analysis AsmPrinter CodeGen Core MC SelectionDAG Support Target +add_to_library_groups = ARM + Added: llvm/trunk/lib/Target/ARM/MCTargetDesc/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/MCTargetDesc/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/ARM/MCTargetDesc/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/ARM/MCTargetDesc/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/ARM/MCTargetDesc/LLVMBuild.txt --------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = ARMDesc +parent = ARM +required_libraries = ARMAsmPrinter ARMInfo MC Support +add_to_library_groups = ARM + Added: llvm/trunk/lib/Target/ARM/TargetInfo/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/TargetInfo/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/ARM/TargetInfo/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/ARM/TargetInfo/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/ARM/TargetInfo/LLVMBuild.txt ----------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = ARMInfo +parent = ARM +required_libraries = MC Support +add_to_library_groups = ARM + Added: llvm/trunk/lib/Target/CBackend/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CBackend/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/CBackend/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/CBackend/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,31 @@ +;===- ./lib/Target/CBackend/LLVMBuild.txt ----------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = LibraryGroup +name = CBackend +parent = Target +add_to_library_groups = all-targets + +[component_1] +type = Library +name = CBackendCodeGen +parent = CBackend +library_name = CBackend +required_libraries = Analysis CBackendInfo CodeGen Core MC Scalar Support Target TransformUtils +add_to_library_groups = CBackend + Added: llvm/trunk/lib/Target/CBackend/TargetInfo/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CBackend/TargetInfo/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/CBackend/TargetInfo/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/CBackend/TargetInfo/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/CBackend/TargetInfo/LLVMBuild.txt -----------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = CBackendInfo +parent = CBackend +required_libraries = MC Support +add_to_library_groups = CBackend + Added: llvm/trunk/lib/Target/CellSPU/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/CellSPU/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/CellSPU/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,30 @@ +;===- ./lib/Target/CellSPU/LLVMBuild.txt -----------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = LibraryGroup +name = CellSPU +parent = Target +add_to_library_groups = all-targets + +[component_1] +type = Library +name = CellSPUCodeGen +parent = CellSPU +required_libraries = AsmPrinter CellSPUDesc CellSPUInfo CodeGen Core MC SelectionDAG Support Target +add_to_library_groups = CellSPU + Added: llvm/trunk/lib/Target/CellSPU/MCTargetDesc/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/MCTargetDesc/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/CellSPU/MCTargetDesc/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/CellSPU/MCTargetDesc/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/CellSPU/MCTargetDesc/LLVMBuild.txt ----------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = CellSPUDesc +parent = CellSPU +required_libraries = CellSPUInfo MC Support +add_to_library_groups = CellSPU + Added: llvm/trunk/lib/Target/CellSPU/TargetInfo/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/TargetInfo/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/CellSPU/TargetInfo/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/CellSPU/TargetInfo/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/CellSPU/TargetInfo/LLVMBuild.txt ------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = CellSPUInfo +parent = CellSPU +required_libraries = MC Support +add_to_library_groups = CellSPU + Added: llvm/trunk/lib/Target/CppBackend/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CppBackend/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/CppBackend/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/CppBackend/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,31 @@ +;===- ./lib/Target/CppBackend/LLVMBuild.txt --------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = LibraryGroup +name = CppBackend +parent = Target +add_to_library_groups = all-targets + +[component_1] +type = Library +name = CppBackendCodeGen +parent = CppBackend +library_name = CppBackend +required_libraries = Core CppBackendInfo Support Target +add_to_library_groups = CppBackend + Added: llvm/trunk/lib/Target/CppBackend/TargetInfo/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CppBackend/TargetInfo/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/CppBackend/TargetInfo/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/CppBackend/TargetInfo/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/CppBackend/TargetInfo/LLVMBuild.txt ---------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = CppBackendInfo +parent = CppBackend +required_libraries = MC Support +add_to_library_groups = CppBackend + Added: llvm/trunk/lib/Target/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,40 @@ +;===- ./lib/Target/LLVMBuild.txt -------------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = Target +parent = Libraries +required_libraries = Core MC Support + +[component_1] +type = LibraryGroup +name = all-targets +parent = Libraries + +[component_2] +type = LibraryGroup +name = native +parent = Libraries +required_libraries = X86 + +[component_3] +type = LibraryGroup +name = nativecodegen +parent = Libraries +required_libraries = X86CodeGen + Added: llvm/trunk/lib/Target/MBlaze/AsmParser/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/AsmParser/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/AsmParser/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/MBlaze/AsmParser/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/MBlaze/AsmParser/LLVMBuild.txt --------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = MBlazeAsmParser +parent = MBlaze +required_libraries = MBlazeInfo MC MCParser Support +add_to_library_groups = MBlaze + Added: llvm/trunk/lib/Target/MBlaze/Disassembler/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/Disassembler/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/Disassembler/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/MBlaze/Disassembler/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/MBlaze/Disassembler/LLVMBuild.txt -----------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = MBlazeDisassembler +parent = MBlaze +required_libraries = MBlazeDesc MBlazeInfo MC Support +add_to_library_groups = MBlaze + Added: llvm/trunk/lib/Target/MBlaze/InstPrinter/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/InstPrinter/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/InstPrinter/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/MBlaze/InstPrinter/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/MBlaze/InstPrinter/LLVMBuild.txt ------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = MBlazeAsmPrinter +parent = MBlaze +required_libraries = MC Support +add_to_library_groups = MBlaze + Added: llvm/trunk/lib/Target/MBlaze/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/MBlaze/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,30 @@ +;===- ./lib/Target/MBlaze/LLVMBuild.txt ------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = LibraryGroup +name = MBlaze +parent = Target +add_to_library_groups = all-targets + +[component_1] +type = Library +name = MBlazeCodeGen +parent = MBlaze +required_libraries = AsmPrinter CodeGen Core MBlazeAsmPrinter MBlazeDesc MBlazeInfo MC SelectionDAG Support Target +add_to_library_groups = MBlaze + Added: llvm/trunk/lib/Target/MBlaze/MCTargetDesc/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MCTargetDesc/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MCTargetDesc/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/MBlaze/MCTargetDesc/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/MBlaze/MCTargetDesc/LLVMBuild.txt -----------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = MBlazeDesc +parent = MBlaze +required_libraries = MBlazeAsmPrinter MBlazeInfo MC Support +add_to_library_groups = MBlaze + Added: llvm/trunk/lib/Target/MBlaze/TargetInfo/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/TargetInfo/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/MBlaze/TargetInfo/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/MBlaze/TargetInfo/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/MBlaze/TargetInfo/LLVMBuild.txt -------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = MBlazeInfo +parent = MBlaze +required_libraries = MC Support +add_to_library_groups = MBlaze + Added: llvm/trunk/lib/Target/MSP430/InstPrinter/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/InstPrinter/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/MSP430/InstPrinter/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/MSP430/InstPrinter/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/MSP430/InstPrinter/LLVMBuild.txt ------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = MSP430AsmPrinter +parent = MSP430 +required_libraries = MC Support +add_to_library_groups = MSP430 + Added: llvm/trunk/lib/Target/MSP430/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/MSP430/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/MSP430/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,30 @@ +;===- ./lib/Target/MSP430/LLVMBuild.txt ------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = LibraryGroup +name = MSP430 +parent = Target +add_to_library_groups = all-targets + +[component_1] +type = Library +name = MSP430CodeGen +parent = MSP430 +required_libraries = AsmPrinter CodeGen Core MC MSP430AsmPrinter MSP430Desc MSP430Info SelectionDAG Support Target +add_to_library_groups = MSP430 + Added: llvm/trunk/lib/Target/MSP430/MCTargetDesc/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MCTargetDesc/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/MSP430/MCTargetDesc/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/MSP430/MCTargetDesc/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/MSP430/MCTargetDesc/LLVMBuild.txt -----------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = MSP430Desc +parent = MSP430 +required_libraries = MC MSP430AsmPrinter MSP430Info Support +add_to_library_groups = MSP430 + Added: llvm/trunk/lib/Target/MSP430/TargetInfo/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/TargetInfo/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/MSP430/TargetInfo/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/MSP430/TargetInfo/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/MSP430/TargetInfo/LLVMBuild.txt -------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = MSP430Info +parent = MSP430 +required_libraries = MC Support +add_to_library_groups = MSP430 + Added: llvm/trunk/lib/Target/Mips/InstPrinter/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/InstPrinter/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/Mips/InstPrinter/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/Mips/InstPrinter/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/Mips/InstPrinter/LLVMBuild.txt --------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = MipsAsmPrinter +parent = Mips +required_libraries = MC Support +add_to_library_groups = Mips + Added: llvm/trunk/lib/Target/Mips/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/Mips/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/Mips/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,30 @@ +;===- ./lib/Target/Mips/LLVMBuild.txt --------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = LibraryGroup +name = Mips +parent = Target +add_to_library_groups = all-targets + +[component_1] +type = Library +name = MipsCodeGen +parent = Mips +required_libraries = AsmPrinter CodeGen Core MC MipsAsmPrinter MipsDesc MipsInfo SelectionDAG Support Target +add_to_library_groups = Mips + Added: llvm/trunk/lib/Target/Mips/MCTargetDesc/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MCTargetDesc/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/Mips/MCTargetDesc/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/Mips/MCTargetDesc/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/Mips/MCTargetDesc/LLVMBuild.txt -------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = MipsDesc +parent = Mips +required_libraries = MC MipsAsmPrinter MipsInfo Support +add_to_library_groups = Mips + Added: llvm/trunk/lib/Target/Mips/TargetInfo/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/TargetInfo/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/Mips/TargetInfo/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/Mips/TargetInfo/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/Mips/TargetInfo/LLVMBuild.txt ---------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = MipsInfo +parent = Mips +required_libraries = MC Support +add_to_library_groups = Mips + Added: llvm/trunk/lib/Target/PTX/InstPrinter/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/InstPrinter/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/PTX/InstPrinter/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/PTX/InstPrinter/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/PTX/InstPrinter/LLVMBuild.txt ---------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = PTXAsmPrinter +parent = PTX +required_libraries = MC Support +add_to_library_groups = PTX + Added: llvm/trunk/lib/Target/PTX/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/PTX/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/PTX/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,30 @@ +;===- ./lib/Target/PTX/LLVMBuild.txt ---------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = LibraryGroup +name = PTX +parent = Target +add_to_library_groups = all-targets + +[component_1] +type = Library +name = PTXCodeGen +parent = PTX +required_libraries = Analysis AsmPrinter CodeGen Core MC PTXDesc PTXInfo Scalar SelectionDAG Support Target TransformUtils +add_to_library_groups = PTX + Added: llvm/trunk/lib/Target/PTX/MCTargetDesc/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/MCTargetDesc/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/PTX/MCTargetDesc/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/PTX/MCTargetDesc/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/PTX/MCTargetDesc/LLVMBuild.txt --------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = PTXDesc +parent = PTX +required_libraries = MC PTXAsmPrinter PTXInfo Support +add_to_library_groups = PTX + Added: llvm/trunk/lib/Target/PTX/TargetInfo/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/TargetInfo/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/PTX/TargetInfo/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/PTX/TargetInfo/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/PTX/TargetInfo/LLVMBuild.txt ----------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = PTXInfo +parent = PTX +required_libraries = MC Support +add_to_library_groups = PTX + Added: llvm/trunk/lib/Target/PowerPC/InstPrinter/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/InstPrinter/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/PowerPC/InstPrinter/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/PowerPC/InstPrinter/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/PowerPC/InstPrinter/LLVMBuild.txt -----------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = PowerPCAsmPrinter +parent = PowerPC +required_libraries = MC Support +add_to_library_groups = PowerPC + Added: llvm/trunk/lib/Target/PowerPC/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/PowerPC/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/PowerPC/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,30 @@ +;===- ./lib/Target/PowerPC/LLVMBuild.txt -----------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = LibraryGroup +name = PowerPC +parent = Target +add_to_library_groups = all-targets + +[component_1] +type = Library +name = PowerPCCodeGen +parent = PowerPC +required_libraries = Analysis AsmPrinter CodeGen Core MC PowerPCAsmPrinter PowerPCDesc PowerPCInfo SelectionDAG Support Target +add_to_library_groups = PowerPC + Added: llvm/trunk/lib/Target/PowerPC/MCTargetDesc/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/MCTargetDesc/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/PowerPC/MCTargetDesc/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/PowerPC/MCTargetDesc/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/PowerPC/MCTargetDesc/LLVMBuild.txt ----------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = PowerPCDesc +parent = PowerPC +required_libraries = MC PowerPCAsmPrinter PowerPCInfo Support +add_to_library_groups = PowerPC + Added: llvm/trunk/lib/Target/PowerPC/TargetInfo/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/TargetInfo/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/PowerPC/TargetInfo/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/PowerPC/TargetInfo/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/PowerPC/TargetInfo/LLVMBuild.txt ------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = PowerPCInfo +parent = PowerPC +required_libraries = MC Support +add_to_library_groups = PowerPC + Added: llvm/trunk/lib/Target/Sparc/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/Sparc/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/Sparc/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,30 @@ +;===- ./lib/Target/Sparc/LLVMBuild.txt -------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = LibraryGroup +name = Sparc +parent = Target +add_to_library_groups = all-targets + +[component_1] +type = Library +name = SparcCodeGen +parent = Sparc +required_libraries = AsmPrinter CodeGen Core MC SelectionDAG SparcDesc SparcInfo Support Target +add_to_library_groups = Sparc + Added: llvm/trunk/lib/Target/Sparc/MCTargetDesc/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/MCTargetDesc/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/Sparc/MCTargetDesc/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/Sparc/MCTargetDesc/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/Sparc/MCTargetDesc/LLVMBuild.txt ------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = SparcDesc +parent = Sparc +required_libraries = MC SparcInfo Support +add_to_library_groups = Sparc + Added: llvm/trunk/lib/Target/Sparc/TargetInfo/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/TargetInfo/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/Sparc/TargetInfo/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/Sparc/TargetInfo/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/Sparc/TargetInfo/LLVMBuild.txt --------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = SparcInfo +parent = Sparc +required_libraries = MC Support +add_to_library_groups = Sparc + Added: llvm/trunk/lib/Target/X86/AsmParser/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/X86/AsmParser/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/X86/AsmParser/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/X86/AsmParser/LLVMBuild.txt -----------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = X86AsmParser +parent = X86 +required_libraries = MC MCParser Support X86Desc X86Info +add_to_library_groups = X86 + Added: llvm/trunk/lib/Target/X86/Disassembler/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/Disassembler/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/X86/Disassembler/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/X86/Disassembler/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/X86/Disassembler/LLVMBuild.txt --------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = X86Disassembler +parent = X86 +required_libraries = MC Support X86Info +add_to_library_groups = X86 + Added: llvm/trunk/lib/Target/X86/InstPrinter/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/InstPrinter/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/X86/InstPrinter/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/X86/InstPrinter/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/X86/InstPrinter/LLVMBuild.txt ---------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = X86AsmPrinter +parent = X86 +required_libraries = MC Support X86Utils +add_to_library_groups = X86 + Added: llvm/trunk/lib/Target/X86/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/X86/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/X86/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,30 @@ +;===- ./lib/Target/X86/LLVMBuild.txt ---------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = LibraryGroup +name = X86 +parent = Target +add_to_library_groups = all-targets + +[component_1] +type = Library +name = X86CodeGen +parent = X86 +required_libraries = Analysis AsmPrinter CodeGen Core MC SelectionDAG Support Target X86AsmPrinter X86Desc X86Info X86Utils +add_to_library_groups = X86 + Added: llvm/trunk/lib/Target/X86/MCTargetDesc/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/MCTargetDesc/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/X86/MCTargetDesc/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/X86/MCTargetDesc/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/X86/MCTargetDesc/LLVMBuild.txt --------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = X86Desc +parent = X86 +required_libraries = MC Support X86AsmPrinter X86Info +add_to_library_groups = X86 + Added: llvm/trunk/lib/Target/X86/TargetInfo/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/TargetInfo/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/X86/TargetInfo/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/X86/TargetInfo/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/X86/TargetInfo/LLVMBuild.txt ----------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = X86Info +parent = X86 +required_libraries = MC Support +add_to_library_groups = X86 + Added: llvm/trunk/lib/Target/X86/Utils/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/Utils/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/X86/Utils/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/X86/Utils/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/X86/Utils/LLVMBuild.txt ---------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = X86Utils +parent = X86 +required_libraries = Core Support +add_to_library_groups = X86 + Added: llvm/trunk/lib/Target/XCore/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/XCore/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/XCore/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,30 @@ +;===- ./lib/Target/XCore/LLVMBuild.txt -------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = LibraryGroup +name = XCore +parent = Target +add_to_library_groups = all-targets + +[component_1] +type = Library +name = XCoreCodeGen +parent = XCore +required_libraries = AsmPrinter CodeGen Core MC SelectionDAG Support Target XCoreDesc XCoreInfo +add_to_library_groups = XCore + Added: llvm/trunk/lib/Target/XCore/MCTargetDesc/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/MCTargetDesc/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/XCore/MCTargetDesc/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/XCore/MCTargetDesc/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/XCore/MCTargetDesc/LLVMBuild.txt ------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = XCoreDesc +parent = XCore +required_libraries = MC Support XCoreInfo +add_to_library_groups = XCore + Added: llvm/trunk/lib/Target/XCore/TargetInfo/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/TargetInfo/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Target/XCore/TargetInfo/LLVMBuild.txt (added) +++ llvm/trunk/lib/Target/XCore/TargetInfo/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Target/XCore/TargetInfo/LLVMBuild.txt --------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = XCoreInfo +parent = XCore +required_libraries = MC Support +add_to_library_groups = XCore + Added: llvm/trunk/lib/Transforms/IPO/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Transforms/IPO/LLVMBuild.txt (added) +++ llvm/trunk/lib/Transforms/IPO/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Transforms/IPO/LLVMBuild.txt -----------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = IPO +parent = Transforms +library_name = ipo +required_libraries = Analysis Core InstCombine Scalar Support Target TransformUtils IPA + Added: llvm/trunk/lib/Transforms/InstCombine/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Transforms/InstCombine/LLVMBuild.txt (added) +++ llvm/trunk/lib/Transforms/InstCombine/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,23 @@ +;===- ./lib/Transforms/InstCombine/LLVMBuild.txt ---------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = InstCombine +parent = Transforms +required_libraries = Analysis Core Support Target TransformUtils + Added: llvm/trunk/lib/Transforms/Instrumentation/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Transforms/Instrumentation/LLVMBuild.txt (added) +++ llvm/trunk/lib/Transforms/Instrumentation/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,23 @@ +;===- ./lib/Transforms/Instrumentation/LLVMBuild.txt -----------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = Instrumentation +parent = Transforms +required_libraries = Analysis Core Support TransformUtils + Added: llvm/trunk/lib/Transforms/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Transforms/LLVMBuild.txt (added) +++ llvm/trunk/lib/Transforms/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,22 @@ +;===- ./lib/Transforms/LLVMBuild.txt ---------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Group +name = Transforms +parent = Libraries + Added: llvm/trunk/lib/Transforms/Scalar/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/LLVMBuild.txt (added) +++ llvm/trunk/lib/Transforms/Scalar/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,24 @@ +;===- ./lib/Transforms/Scalar/LLVMBuild.txt --------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = Scalar +parent = Transforms +library_name = ScalarOpts +required_libraries = Analysis Core InstCombine Support Target TransformUtils + Added: llvm/trunk/lib/Transforms/Utils/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/Transforms/Utils/LLVMBuild.txt (added) +++ llvm/trunk/lib/Transforms/Utils/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,23 @@ +;===- ./lib/Transforms/Utils/LLVMBuild.txt ---------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = TransformUtils +parent = Transforms +required_libraries = Analysis Core Support Target IPA + Added: llvm/trunk/lib/VMCore/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/lib/VMCore/LLVMBuild.txt (added) +++ llvm/trunk/lib/VMCore/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,23 @@ +;===- ./lib/VMCore/LLVMBuild.txt -------------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = Core +parent = Libraries +required_libraries = Support + Added: llvm/trunk/projects/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/projects/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/projects/LLVMBuild.txt (added) +++ llvm/trunk/projects/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,22 @@ +;===- ./projects/LLVMBuild.txt ---------------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Group +name = Projects +parent = $ROOT + Added: llvm/trunk/runtime/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/runtime/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/runtime/LLVMBuild.txt (added) +++ llvm/trunk/runtime/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,22 @@ +;===- ./runtime/LLVMBuild.txt ----------------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Group +name = Runtime +parent = $ROOT + Added: llvm/trunk/tools/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/tools/LLVMBuild.txt (added) +++ llvm/trunk/tools/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,22 @@ +;===- ./tools/LLVMBuild.txt ------------------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Group +name = Tools +parent = $ROOT + Added: llvm/trunk/utils/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/utils/LLVMBuild.txt (added) +++ llvm/trunk/utils/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,27 @@ +;===- ./utils/LLVMBuild.txt ------------------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Group +name = BuildTools +parent = $ROOT + +[component_1] +type = Group +name = UtilityTools +parent = $ROOT + Added: llvm/trunk/utils/TableGen/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/LLVMBuild.txt?rev=143634&view=auto ============================================================================== --- llvm/trunk/utils/TableGen/LLVMBuild.txt (added) +++ llvm/trunk/utils/TableGen/LLVMBuild.txt Thu Nov 3 13:53:17 2011 @@ -0,0 +1,23 @@ +;===- ./utils/TableGen/LLVMBuild.txt ---------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = BuildTool +name = tblgen +parent = BuildTools +required_libraries = TableGen Support + From evan.cheng at apple.com Thu Nov 3 14:15:02 2011 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 03 Nov 2011 12:15:02 -0700 Subject: [llvm-commits] [llvm] r143600 - in /llvm/trunk: lib/CodeGen/MachineInstr.cpp test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll In-Reply-To: <5A27BE4A-6D6D-437A-B98E-2CE114754DD0@apple.com> References: <20111103005637.1BC062A6C12C@llvm.org> <021D99BD-132F-4B07-A87D-0CE68892311A@apple.com> <0D65E3B4-13AE-405D-8DA6-E7E946FCB8A7@apple.com> <37928F5D-8EEF-4254-AA9D-633F94E1265A@apple.com> <3B3C293A-BC4F-4B7D-8126-F82307ED49F1@apple.com> <5A27BE4A-6D6D-437A-B98E-2CE114754DD0@apple.com> Message-ID: <6946F418-2639-4143-A9D2-8BAED91C2FFF@apple.com> One more thing. Please make sure the register allocator knows these loads are safe to rematerialize. This is especially important if LICM is done at LLVM IR level which doesn't take register pressure into consideration. Evan On Nov 3, 2011, at 11:51 AM, Evan Cheng wrote: > > On Nov 3, 2011, at 11:46 AM, Peter Cooper wrote: > >> >> On Nov 3, 2011, at 11:26 AM, Chris Lattner wrote: >> >>> On Nov 3, 2011, at 10:18 AM, Peter Cooper wrote: >>>> Hi Chris >>>> >>>> I agree that a new linkage type is better, but that seemed overkill when there's currently only one case where this occurs. But yes, special casing by name is particularly gross. >>> >>> This sort of thing is an instance of a more general problem. I can imagine other front ends that want to unique strings for example, or do load-time optimizations that prevent something from being marked truly constant. Marking the load as "runtime constant load" through metadata seems a more general way to model this than by introducing a new linkage type on the global, but perhaps I'm missing something. >> >> I did mention metadata to Evan but he'd said that might be too heavyweight a solution. But there also seems to be reasons against adding a whole new linkage type too, primarily that there's quite a lot of them for developers to deal with already. > > My concern is there is no precedence for using metadata annotation for scalar optimizations. > > Evan > >>> >>>> I did have a solution working in the earlier LICM pass but it then struggles to do CSE on these loads. It also meant putting my special case code in 2 places which would have been even more gross. If i change it to a new linkage type then i'll make sure and have earlyCSE and LICM work on it too. >>> >>> Can you elaborate on what the problem was? >> >> Yeah, so i found that other constant loads are optimized into one load in GVN (not always earlyCSE, got that wrong here). So the problem was that GVN gets its information for the load from MemoryDependenceAnalysis which calls into AA. But if i change AA to say that this global is sort of constant then later optimizations substitute the load from the global for the value it contains which is incorrect. >> >> The test i had was this, and the problem was the call killing the first load and so stopping it from CSE with the second load. >> >> %2 = load i8** @"\01L_OBJC_SELECTOR_REFERENCES_" >> %call = call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* %1, i8* %2) >> %3 = load i8** @"\01L_OBJC_SELECTOR_REFERENCES_" >> >> Pete > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From dan at dneg.com Thu Nov 3 14:24:46 2011 From: dan at dneg.com (Dan Bailey) Date: Thu, 03 Nov 2011 19:24:46 -0000 Subject: [llvm-commits] [llvm] r143640 - in /llvm/trunk: lib/Target/PTX/PTXAsmPrinter.cpp test/CodeGen/PTX/ld.ll test/CodeGen/PTX/st.ll Message-ID: <20111103192447.09B242A6C12C@llvm.org> Author: drb Date: Thu Nov 3 14:24:46 2011 New Revision: 143640 URL: http://llvm.org/viewvc/llvm-project?rev=143640&view=rev Log: fixed global array handling for ptx to use the correct bit widths Modified: llvm/trunk/lib/Target/PTX/PTXAsmPrinter.cpp llvm/trunk/test/CodeGen/PTX/ld.ll llvm/trunk/test/CodeGen/PTX/st.ll Modified: llvm/trunk/lib/Target/PTX/PTXAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/PTXAsmPrinter.cpp?rev=143640&r1=143639&r2=143640&view=diff ============================================================================== --- llvm/trunk/lib/Target/PTX/PTXAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/PTX/PTXAsmPrinter.cpp Thu Nov 3 14:24:46 2011 @@ -318,11 +318,7 @@ if (PointerType::classof(gv->getType())) { PointerType* pointerTy = dyn_cast(gv->getType()); Type* elementTy = pointerTy->getElementType(); - - decl += ".b8 "; - decl += gvsym->getName(); - decl += "["; - + if (elementTy->isArrayTy()) { assert(elementTy->isArrayTy() && "Only pointers to arrays are supported"); @@ -343,15 +339,24 @@ // FIXME: isPrimitiveType() == false for i16? assert(elementTy->isSingleValueType() && "Non-primitive types are not handled"); + + // Find the size of the element in bits + unsigned elementSize = elementTy->getPrimitiveSizeInBits(); - // Compute the size of the array, in bytes. - uint64_t arraySize = (elementTy->getPrimitiveSizeInBits() >> 3) - * numElements; - - decl += utostr(arraySize); + decl += ".b"; + decl += utostr(elementSize); + decl += " "; + decl += gvsym->getName(); + decl += "["; + decl += utostr(numElements); + decl += "]"; + } + else + { + decl += ".b8 "; + decl += gvsym->getName(); + decl += "[]"; } - - decl += "]"; // handle string constants (assume ConstantArray means string) Modified: llvm/trunk/test/CodeGen/PTX/ld.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PTX/ld.ll?rev=143640&r1=143639&r2=143640&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/PTX/ld.ll (original) +++ llvm/trunk/test/CodeGen/PTX/ld.ll Thu Nov 3 14:24:46 2011 @@ -1,48 +1,48 @@ ; RUN: llc < %s -march=ptx32 | FileCheck %s -;CHECK: .extern .global .b8 array_i16[20]; +;CHECK: .extern .global .b16 array_i16[10]; @array_i16 = external global [10 x i16] -;CHECK: .extern .const .b8 array_constant_i16[20]; +;CHECK: .extern .const .b16 array_constant_i16[10]; @array_constant_i16 = external addrspace(1) constant [10 x i16] -;CHECK: .extern .shared .b8 array_shared_i16[20]; +;CHECK: .extern .shared .b16 array_shared_i16[10]; @array_shared_i16 = external addrspace(4) global [10 x i16] -;CHECK: .extern .global .b8 array_i32[40]; +;CHECK: .extern .global .b32 array_i32[10]; @array_i32 = external global [10 x i32] -;CHECK: .extern .const .b8 array_constant_i32[40]; +;CHECK: .extern .const .b32 array_constant_i32[10]; @array_constant_i32 = external addrspace(1) constant [10 x i32] -;CHECK: .extern .shared .b8 array_shared_i32[40]; +;CHECK: .extern .shared .b32 array_shared_i32[10]; @array_shared_i32 = external addrspace(4) global [10 x i32] -;CHECK: .extern .global .b8 array_i64[80]; +;CHECK: .extern .global .b64 array_i64[10]; @array_i64 = external global [10 x i64] -;CHECK: .extern .const .b8 array_constant_i64[80]; +;CHECK: .extern .const .b64 array_constant_i64[10]; @array_constant_i64 = external addrspace(1) constant [10 x i64] -;CHECK: .extern .shared .b8 array_shared_i64[80]; +;CHECK: .extern .shared .b64 array_shared_i64[10]; @array_shared_i64 = external addrspace(4) global [10 x i64] -;CHECK: .extern .global .b8 array_float[40]; +;CHECK: .extern .global .b32 array_float[10]; @array_float = external global [10 x float] -;CHECK: .extern .const .b8 array_constant_float[40]; +;CHECK: .extern .const .b32 array_constant_float[10]; @array_constant_float = external addrspace(1) constant [10 x float] -;CHECK: .extern .shared .b8 array_shared_float[40]; +;CHECK: .extern .shared .b32 array_shared_float[10]; @array_shared_float = external addrspace(4) global [10 x float] -;CHECK: .extern .global .b8 array_double[80]; +;CHECK: .extern .global .b64 array_double[10]; @array_double = external global [10 x double] -;CHECK: .extern .const .b8 array_constant_double[80]; +;CHECK: .extern .const .b64 array_constant_double[10]; @array_constant_double = external addrspace(1) constant [10 x double] -;CHECK: .extern .shared .b8 array_shared_double[80]; +;CHECK: .extern .shared .b64 array_shared_double[10]; @array_shared_double = external addrspace(4) global [10 x double] Modified: llvm/trunk/test/CodeGen/PTX/st.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PTX/st.ll?rev=143640&r1=143639&r2=143640&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/PTX/st.ll (original) +++ llvm/trunk/test/CodeGen/PTX/st.ll Thu Nov 3 14:24:46 2011 @@ -1,48 +1,48 @@ ; RUN: llc < %s -march=ptx32 | FileCheck %s -;CHECK: .extern .global .b8 array_i16[20]; +;CHECK: .extern .global .b16 array_i16[10]; @array_i16 = external global [10 x i16] -;CHECK: .extern .const .b8 array_constant_i16[20]; +;CHECK: .extern .const .b16 array_constant_i16[10]; @array_constant_i16 = external addrspace(1) constant [10 x i16] -;CHECK: .extern .shared .b8 array_shared_i16[20]; +;CHECK: .extern .shared .b16 array_shared_i16[10]; @array_shared_i16 = external addrspace(4) global [10 x i16] -;CHECK: .extern .global .b8 array_i32[40]; +;CHECK: .extern .global .b32 array_i32[10]; @array_i32 = external global [10 x i32] -;CHECK: .extern .const .b8 array_constant_i32[40]; +;CHECK: .extern .const .b32 array_constant_i32[10]; @array_constant_i32 = external addrspace(1) constant [10 x i32] -;CHECK: .extern .shared .b8 array_shared_i32[40]; +;CHECK: .extern .shared .b32 array_shared_i32[10]; @array_shared_i32 = external addrspace(4) global [10 x i32] -;CHECK: .extern .global .b8 array_i64[80]; +;CHECK: .extern .global .b64 array_i64[10]; @array_i64 = external global [10 x i64] -;CHECK: .extern .const .b8 array_constant_i64[80]; +;CHECK: .extern .const .b64 array_constant_i64[10]; @array_constant_i64 = external addrspace(1) constant [10 x i64] -;CHECK: .extern .shared .b8 array_shared_i64[80]; +;CHECK: .extern .shared .b64 array_shared_i64[10]; @array_shared_i64 = external addrspace(4) global [10 x i64] -;CHECK: .extern .global .b8 array_float[40]; +;CHECK: .extern .global .b32 array_float[10]; @array_float = external global [10 x float] -;CHECK: .extern .const .b8 array_constant_float[40]; +;CHECK: .extern .const .b32 array_constant_float[10]; @array_constant_float = external addrspace(1) constant [10 x float] -;CHECK: .extern .shared .b8 array_shared_float[40]; +;CHECK: .extern .shared .b32 array_shared_float[10]; @array_shared_float = external addrspace(4) global [10 x float] -;CHECK: .extern .global .b8 array_double[80]; +;CHECK: .extern .global .b64 array_double[10]; @array_double = external global [10 x double] -;CHECK: .extern .const .b8 array_constant_double[80]; +;CHECK: .extern .const .b64 array_constant_double[10]; @array_constant_double = external addrspace(1) constant [10 x double] -;CHECK: .extern .shared .b8 array_shared_double[80]; +;CHECK: .extern .shared .b64 array_shared_double[10]; @array_shared_double = external addrspace(4) global [10 x double] From dpatel at apple.com Thu Nov 3 14:43:34 2011 From: dpatel at apple.com (Devang Patel) Date: Thu, 03 Nov 2011 12:43:34 -0700 Subject: [llvm-commits] [patch][pr11300] Emit declarations before definitions In-Reply-To: References: Message-ID: On Nov 3, 2011, at 10:58 AM, Rafael Esp?ndola wrote: > The attached patch changes llvm to emit declarations before > definitions if they are available. This causes DW_AT_specification to > point back in the file, fixing PR11300. > > Is it OK? > > Cheers, > Rafael > With recent changes, it makes sense to do this in constructSubprogramDIE(). Your patch looks fine. Thanks! - Devang From daniel at zuster.org Thu Nov 3 14:45:52 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Thu, 03 Nov 2011 19:45:52 -0000 Subject: [llvm-commits] [llvm] r143641 - /llvm/trunk/utils/llvm-build/llvmbuild/main.py Message-ID: <20111103194552.5C1F42A6C12C@llvm.org> Author: ddunbar Date: Thu Nov 3 14:45:52 2011 New Revision: 143641 URL: http://llvm.org/viewvc/llvm-project?rev=143641&view=rev Log: llvm-build: Avoid followlinks keyword argument to os.walk. - llvm-build should now be Python2.4 compatible as best I know. Modified: llvm/trunk/utils/llvm-build/llvmbuild/main.py Modified: llvm/trunk/utils/llvm-build/llvmbuild/main.py URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvm-build/llvmbuild/main.py?rev=143641&r1=143640&r2=143641&view=diff ============================================================================== --- llvm/trunk/utils/llvm-build/llvmbuild/main.py (original) +++ llvm/trunk/utils/llvm-build/llvmbuild/main.py Thu Nov 3 14:45:52 2011 @@ -14,8 +14,13 @@ # directories we have already traversed. # First, discover all the LLVMBuild.txt files. - for dirpath,dirnames,filenames in os.walk(llvmbuild_source_root, - followlinks = True): + # + # FIXME: We would like to use followlinks=True here, but that isn't + # compatible with Python 2.4. Instead, we will either have to special + # case projects we would expect to possibly be linked to, or implement + # our own walk that can follow links. For now, it doesn't matter since + # we haven't picked up the LLVMBuild system in any other LLVM projects. + for dirpath,dirnames,filenames in os.walk(llvmbuild_source_root): # If there is no LLVMBuild.txt file in a directory, we don't recurse # past it. This is a simple way to prune our search, although it # makes it easy for users to add LLVMBuild.txt files in places they From chandlerc at google.com Thu Nov 3 14:43:43 2011 From: chandlerc at google.com (Chandler Carruth) Date: Thu, 3 Nov 2011 12:43:43 -0700 Subject: [llvm-commits] [llvm] r143616 - in /llvm/trunk/tools: CMakeLists.txt Makefile llvm-config-2/ llvm-config-2/CMakeLists.txt llvm-config-2/Makefile llvm-config-2/llvm-config.cpp In-Reply-To: References: <20111103173017.2560D2A6C12C@llvm.org> Message-ID: On Thu, Nov 3, 2011 at 11:51 AM, Wesley Peck wrote: > > On Nov 3, 2011, at 12:30 PM, Daniel Dunbar wrote: > > + for (int i = 1; i != argc; ++i) { > > + StringRef Arg = argv[i]; > > + > > + if (Arg.startswith("-")) { > > + HasAnyOption = true; > > + if (Arg == "--version") { > > + OS << PACKAGE_VERSION << '\n'; > > + } else if (Arg == "--prefix") { > > + OS << ActivePrefix << '\n'; > > + } else if (Arg == "--bindir") { > > + OS << ActiveBinDir << '\n'; > > + } else if (Arg == "--includedir") { > > + OS << ActiveIncludeDir << '\n'; > > + } else if (Arg == "--libdir") { > > + OS << ActiveLibDir << '\n'; > > + } else if (Arg == "--cppflags") { > > + OS << ActiveIncludeOption << ' ' << LLVM_CPPFLAGS << '\n'; > > + } else if (Arg == "--cflags") { > > + OS << ActiveIncludeOption << ' ' << LLVM_CFLAGS << '\n'; > > + } else if (Arg == "--cxxflags") { > > + OS << ActiveIncludeOption << ' ' << LLVM_CXXFLAGS << '\n'; > > + } else if (Arg == "--ldflags") { > > + OS << "-L" << ActiveLibDir << ' ' << LLVM_LDFLAGS > > + << ' ' << LLVM_SYSTEM_LIBS << '\n'; > > + } else if (Arg == "--libs") { > > + PrintLibs = true; > > + } else if (Arg == "--libnames") { > > + PrintLibNames = true; > > + } else if (Arg == "--libfiles") { > > + PrintLibFiles = true; > > + } else if (Arg == "--components") { > > + for (unsigned j = 0; j != NumAvailableComponents; ++j) { > > + if (j) > > + OS << ' '; > > + OS << AvailableComponents[j].Name; > > + } > > + OS << '\n'; > > + } else if (Arg == "--targets-built") { > > + bool First = true; > > + for (TargetRegistry::iterator I = TargetRegistry::begin(), > > + E = TargetRegistry::end(); I != E; First = false, ++I) { > > + if (!First) > > + OS << ' '; > > + OS << I->getName(); > > + } > > + OS << '\n'; > > + } else if (Arg == "--host-target") { > > + OS << LLVM_DEFAULT_TARGET_TRIPLE << '\n'; > > + } else if (Arg == "--build-mode") { > > + OS << LLVM_BUILDMODE << '\n'; > > + } else if (Arg == "--obj-root") { > > + OS << LLVM_OBJ_ROOT << '\n'; > > + } else if (Arg == "--src-root") { > > + OS << LLVM_SRC_ROOT << '\n'; > > + } else { > > + usage(); > > + } > > + } else { > > + Components.push_back(Arg); > > + } > > + } > > + > > + if (!HasAnyOption) > > + usage(); > > Just out of curiosity, why not use LLVM's command line parsing library for > this? Is is not capable of parsing the required syntax or are you trying to > avoid some sort of dependency? It seems like it would be a lot cleaner and > easier to maintain than this code. Agreed, this would be much cleaner using the commandline library. Also, there is a lot of string manipulation and path manipulation that I think would be cleaner using StringRef / Twine / raw_ostream-derivatives / PathV2... if those libraries don't quite fit or aren't so clean to use, we should improve them so that we can use them for exactly this type of ced. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111103/dcd6281a/attachment.html From clattner at apple.com Thu Nov 3 15:02:11 2011 From: clattner at apple.com (Chris Lattner) Date: Thu, 03 Nov 2011 13:02:11 -0700 Subject: [llvm-commits] [llvm] r143600 - in /llvm/trunk: lib/CodeGen/MachineInstr.cpp test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll In-Reply-To: <5A27BE4A-6D6D-437A-B98E-2CE114754DD0@apple.com> References: <20111103005637.1BC062A6C12C@llvm.org> <021D99BD-132F-4B07-A87D-0CE68892311A@apple.com> <0D65E3B4-13AE-405D-8DA6-E7E946FCB8A7@apple.com> <37928F5D-8EEF-4254-AA9D-633F94E1265A@apple.com> <3B3C293A-BC4F-4B7D-8126-F82307ED49F1@apple.com> <5A27BE4A-6D6D-437A-B98E-2CE114754DD0@apple.com> Message-ID: On Nov 3, 2011, at 11:51 AM, Evan Cheng wrote: >> I did mention metadata to Evan but he'd said that might be too heavyweight a solution. But there also seems to be reasons against adding a whole new linkage type too, primarily that there's quite a lot of them for developers to deal with already. > > My concern is there is no precedence for using metadata annotation for scalar optimizations. We use metadata for floating point precision and TBAA, both of which are related. -Chris From isanbard at gmail.com Thu Nov 3 15:10:02 2011 From: isanbard at gmail.com (Bill Wendling) Date: Thu, 03 Nov 2011 20:10:02 -0000 Subject: [llvm-commits] [llvm] r143643 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20111103201002.1B20C2A6C12C@llvm.org> Author: void Date: Thu Nov 3 15:10:01 2011 New Revision: 143643 URL: http://llvm.org/viewvc/llvm-project?rev=143643&view=rev Log: Keep the Crack language as an external project. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=143643&r1=143642&r2=143643&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Thu Nov 3 15:10:01 2011 @@ -337,17 +337,17 @@
    -

    Glasgow Haskell Compiler (GHC)

    From stoklund at 2pi.dk Thu Nov 3 15:42:36 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Thu, 03 Nov 2011 13:42:36 -0700 Subject: [llvm-commits] [llvm] r143600 - in /llvm/trunk: lib/CodeGen/MachineInstr.cpp test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll In-Reply-To: <6946F418-2639-4143-A9D2-8BAED91C2FFF@apple.com> References: <20111103005637.1BC062A6C12C@llvm.org> <021D99BD-132F-4B07-A87D-0CE68892311A@apple.com> <0D65E3B4-13AE-405D-8DA6-E7E946FCB8A7@apple.com> <37928F5D-8EEF-4254-AA9D-633F94E1265A@apple.com> <3B3C293A-BC4F-4B7D-8126-F82307ED49F1@apple.com> <5A27BE4A-6D6D-437A-B98E-2CE114754DD0@apple.com> <6946F418-2639-4143-A9D2-8BAED91C2FFF@apple.com> Message-ID: <4EEC31E3-77A3-4DDD-9B63-BBA5732560A2@2pi.dk> On Nov 3, 2011, at 12:15 PM, Evan Cheng wrote: > One more thing. Please make sure the register allocator knows these loads are safe to rematerialize. This is especially important if LICM is done at LLVM IR level which doesn't take register pressure into consideration. The register allocator depends on MachineInstr::isInvariantLoad(). /jakob From peter_cooper at apple.com Thu Nov 3 15:42:54 2011 From: peter_cooper at apple.com (Peter Cooper) Date: Thu, 03 Nov 2011 13:42:54 -0700 Subject: [llvm-commits] patch: x86 vector udiv In-Reply-To: <4EB25C03.6070106@free.fr> References: <483B7184-5127-43E1-B725-671F91F31C2B@apple.com> <4EB25C03.6070106@free.fr> Message-ID: <193044DE-318B-4FD9-82F6-7F73E050D136@apple.com> Hi Duncan I see what you mean. So it turns out that there's already some code to match powers of 2. The attached patch is an implementation with only one piece of code to cover both scalars and vectors. Thanks, Pete -------------- next part -------------- A non-text attachment was scrubbed... Name: 8429.patch Type: application/octet-stream Size: 2131 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111103/868d5c46/attachment.obj -------------- next part -------------- On Nov 3, 2011, at 2:16 AM, Duncan Sands wrote: > Hi Peter, > >> I've written a version in InstCombine which is now working. > > I think it would be better if the same code worked for the scalar and > vector cases. This means writing a bunch of utility functions but once > that's done hopefully it becomes trivial to convert all kinds of scalar > transforms to work also on vectors. Maybe a good first step is to introduce > a helper class for representing either a ConstantInt or a vector of > ConstantInt, analogous to the helper classes in Operator.h (eg: > OverflowingBinaryOperator) or IntrinsicInst.h. > > Ciao, Duncan. > >> >> Please have a look and see if its at the right stage of compilation. >> >> Cheers, >> Pete >> >> >> >> >> On Nov 2, 2011, at 5:23 PM, Chris Lattner wrote: >> >>> >>> On Nov 1, 2011, at 6:04 PM, Eli Friedman wrote: >>> >>>> On Tue, Nov 1, 2011 at 5:40 PM, Peter Cooper wrote: >>>>> Hi >>>>> >>>>> Please review this patch for pr8429 to turn vector udiv into vector shrl instructions when dividing by powers of 2. This was already done on scalars but not on vectors. >>>>> >>>>> I also found that vector shifts were always scalarised on x86 even with SSE on so i turned these into the equivalent intrinsics. >>>> >>>> The change to X86ISelLowering.cpp is wrong; the psrld instruction is >>>> not equivalent to ISD::SRL in the general case. >>>> >>>> For the rest of the changes, it would be better to handle this >>>> transformation in instcombine. >>> >>> I agree - this is a generally useful canonicalization that should be done early. >>> >>> -Chris >> >> >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From peter_cooper at apple.com Thu Nov 3 15:43:47 2011 From: peter_cooper at apple.com (Peter Cooper) Date: Thu, 03 Nov 2011 13:43:47 -0700 Subject: [llvm-commits] [llvm] r143600 - in /llvm/trunk: lib/CodeGen/MachineInstr.cpp test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll In-Reply-To: <4EEC31E3-77A3-4DDD-9B63-BBA5732560A2@2pi.dk> References: <20111103005637.1BC062A6C12C@llvm.org> <021D99BD-132F-4B07-A87D-0CE68892311A@apple.com> <0D65E3B4-13AE-405D-8DA6-E7E946FCB8A7@apple.com> <37928F5D-8EEF-4254-AA9D-633F94E1265A@apple.com> <3B3C293A-BC4F-4B7D-8126-F82307ED49F1@apple.com> <5A27BE4A-6D6D-437A-B98E-2CE114754DD0@apple.com> <6946F418-2639-4143-A9D2-8BAED91C2FFF@apple.com> <4EEC31E3-77A3-4DDD-9B63-BBA5732560A2@2pi.dk> Message-ID: <328E3C35-6B35-466A-89E3-5E36517DE3BE@apple.com> Excellent. Thats exactly the function i had changed and will make sure it understands the change when its done with metadata. Thanks, Pete On Nov 3, 2011, at 1:42 PM, Jakob Stoklund Olesen wrote: > > On Nov 3, 2011, at 12:15 PM, Evan Cheng wrote: > >> One more thing. Please make sure the register allocator knows these loads are safe to rematerialize. This is especially important if LICM is done at LLVM IR level which doesn't take register pressure into consideration. > > The register allocator depends on MachineInstr::isInvariantLoad(). > > /jakob > From peter_cooper at apple.com Thu Nov 3 15:47:50 2011 From: peter_cooper at apple.com (Pete Cooper) Date: Thu, 03 Nov 2011 20:47:50 -0000 Subject: [llvm-commits] [llvm] r143646 - in /llvm/trunk: lib/CodeGen/MachineInstr.cpp test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll Message-ID: <20111103204750.71C4E2A6C12C@llvm.org> Author: pete Date: Thu Nov 3 15:47:50 2011 New Revision: 143646 URL: http://llvm.org/viewvc/llvm-project?rev=143646&view=rev Log: Reverted r143600 - selector reference change Removed: llvm/trunk/test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=143646&r1=143645&r2=143646&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Thu Nov 3 15:47:50 2011 @@ -1232,19 +1232,6 @@ return false; } -/// pointsToRuntimeConstantMemory - Return true if this value points to data -/// which does never changes once the program starts running -static bool pointsToRuntimeConstantMemory(const Value *V) { - if (const GlobalVariable *GV = dyn_cast(V)) { - StringRef Name = GV->getName(); - // These special values are known to be constant at runtime - // TODO: a new linkage type for these would be far better than this check - if (Name.startswith("\01L_OBJC_SELECTOR_REFERENCES_")) - return true; - } - return false; -} - /// isInvariantLoad - Return true if this instruction is loading from a /// location whose value is invariant across the function. For example, /// loading a value from the constant pool or from the argument area @@ -1272,8 +1259,6 @@ if (const PseudoSourceValue *PSV = dyn_cast(V)) if (PSV->isConstant(MFI)) continue; - if (pointsToRuntimeConstantMemory(V)) - continue; // If we have an AliasAnalysis, ask it whether the memory is constant. if (AA && AA->pointsToConstantMemory( AliasAnalysis::Location(V, (*I)->getSize(), Removed: llvm/trunk/test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll?rev=143645&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll (original) +++ llvm/trunk/test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll (removed) @@ -1,30 +0,0 @@ -; RUN: llc < %s -march=x86-64 -mattr=+sse3,+sse41 -stats |& grep {1 machine-licm} -; rdar://6027699 - -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-S128" -target triple = "x86_64-apple-macosx10.7.2" - -; STATS: 1 machine-licm - -@"\01L_OBJC_METH_VAR_NAME_" = internal global [4 x i8] c"foo\00", section "__TEXT,__objc_methname,cstring_literals", align 1 -@"\01L_OBJC_SELECTOR_REFERENCES_" = internal global i8* getelementptr inbounds ([4 x i8]* @"\01L_OBJC_METH_VAR_NAME_", i64 0, i64 0), section "__DATA, __objc_selrefs, literal_pointers, no_dead_strip" -@"\01L_OBJC_IMAGE_INFO" = internal constant [2 x i32] [i32 0, i32 16], section "__DATA, __objc_imageinfo, regular, no_dead_strip" - at llvm.used = appending global [3 x i8*] [i8* getelementptr inbounds ([4 x i8]* @"\01L_OBJC_METH_VAR_NAME_", i32 0, i32 0), i8* bitcast (i8** @"\01L_OBJC_SELECTOR_REFERENCES_" to i8*), i8* bitcast ([2 x i32]* @"\01L_OBJC_IMAGE_INFO" to i8*)], section "llvm.metadata" - -define void @test(i8* %x) uwtable ssp { -entry: - br label %for.body - -for.body: ; preds = %for.body, %entry - %i.01 = phi i32 [ 0, %entry ], [ %inc, %for.body ] - %0 = load i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8 - %call = tail call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* %x, i8* %0) - %inc = add i32 %i.01, 1 - %exitcond = icmp eq i32 %inc, 10000 - br i1 %exitcond, label %for.end, label %for.body - -for.end: ; preds = %for.body - ret void -} - -declare i8* @objc_msgSend(i8*, i8*, ...) nonlazybind From daniel at zuster.org Thu Nov 3 16:01:36 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Thu, 03 Nov 2011 21:01:36 -0000 Subject: [llvm-commits] [llvm] r143649 - in /llvm/trunk/tools: CMakeLists.txt llvm-config-2/BuildVariables.inc.in llvm-config-2/CMakeLists.txt llvm-config-2/Makefile llvm-config-2/llvm-config.cpp Message-ID: <20111103210136.683802A6C12D@llvm.org> Author: ddunbar Date: Thu Nov 3 16:01:36 2011 New Revision: 143649 URL: http://llvm.org/viewvc/llvm-project?rev=143649&view=rev Log: llvm-config-2: Implement build system support for getting the variables we only know at build time. Added: llvm/trunk/tools/llvm-config-2/BuildVariables.inc.in Modified: llvm/trunk/tools/CMakeLists.txt llvm/trunk/tools/llvm-config-2/CMakeLists.txt llvm/trunk/tools/llvm-config-2/Makefile llvm/trunk/tools/llvm-config-2/llvm-config.cpp Modified: llvm/trunk/tools/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/CMakeLists.txt?rev=143649&r1=143648&r2=143649&view=diff ============================================================================== --- llvm/trunk/tools/CMakeLists.txt (original) +++ llvm/trunk/tools/CMakeLists.txt Thu Nov 3 16:01:36 2011 @@ -17,9 +17,12 @@ # must keep llvm-config as the first entry on the list of tools to # be built. add_subdirectory(llvm-config) + + # We currently require 'sed' to build llvm-config-2, so don't try to build it + # on pure Win32. + add_subdirectory(llvm-config-2) endif() -add_subdirectory(llvm-config-2) add_subdirectory(opt) add_subdirectory(llvm-as) add_subdirectory(llvm-dis) Added: llvm/trunk/tools/llvm-config-2/BuildVariables.inc.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-config-2/BuildVariables.inc.in?rev=143649&view=auto ============================================================================== --- llvm/trunk/tools/llvm-config-2/BuildVariables.inc.in (added) +++ llvm/trunk/tools/llvm-config-2/BuildVariables.inc.in Thu Nov 3 16:01:36 2011 @@ -0,0 +1,26 @@ +//===-- BuildVariables.inc.in - llvm-config build variables -*- C++ -*-----===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file is configured by the build system to define the variables +// llvm-config wants to report to the user, but which can only be determined at +// build time. +// +// The non .in variant of this file has been autogenerated by the LLVM build. Do +// not edit! +// +//===----------------------------------------------------------------------===// + +#define LLVM_SRC_ROOT "@LLVM_SRC_ROOT@" +#define LLVM_OBJ_ROOT "@LLVM_OBJ_ROOT@" +#define LLVM_CPPFLAGS "@LLVM_CPPFLAGS@" +#define LLVM_CFLAGS "@LLVM_CFLAGS@" +#define LLVM_LDFLAGS "@LLVM_LDFLAGS@" +#define LLVM_CXXFLAGS "@LLVM_CXXFLAGS@" +#define LLVM_BUILDMODE "@LLVM_BUILDMODE@" +#define LLVM_SYSTEM_LIBS "@LLVM_SYSTEM_LIBS@" Modified: llvm/trunk/tools/llvm-config-2/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-config-2/CMakeLists.txt?rev=143649&r1=143648&r2=143649&view=diff ============================================================================== --- llvm/trunk/tools/llvm-config-2/CMakeLists.txt (original) +++ llvm/trunk/tools/llvm-config-2/CMakeLists.txt Thu Nov 3 16:01:36 2011 @@ -1,5 +1,41 @@ set(LLVM_LINK_COMPONENTS support) +# We need to generate the BuildVariables.inc file containing values which are +# only defined when under certain build modes. Unfortunately, that precludes +# doing this inside CMake so we have to shell out to sed. For now, that means we +# can't expect to build llvm-config on Window.s +set(BUILDVARIABLES_SRCPATH ${CMAKE_CURRENT_SOURCE_DIR}/BuildVariables.inc.in) +set(BUILDVARIABLES_OBJPATH ${CMAKE_CURRENT_BINARY_DIR}/BuildVariables.inc) +set(SEDSCRIPT_OBJPATH ${CMAKE_CURRENT_BINARY_DIR}/BuildVariables.configure.sed) + +# Compute the substitution values for various items. +get_system_libs(LLVM_SYSTEM_LIBS_LIST) +foreach(l ${LLVM_SYSTEM_LIBS_LIST}) + set(SYSTEM_LIBS ${SYSTEM_LIBS} "-l${l}") +endforeach() +set(C_FLGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}") +set(CXX_FLGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}") +set(CPP_FLGS "${CMAKE_CPP_FLAGS} ${CMAKE_CPP_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}") + +add_custom_command(OUTPUT ${BUILDVARIABLES_OBJPATH} + COMMAND echo s!@LLVM_SRC_ROOT@!${LLVM_MAIN_SRC_DIR}! > ${SEDSCRIPT_OBJPATH} + COMMAND echo s!@LLVM_OBJ_ROOT@!${LLVM_BINARY_DIR}! >> ${SEDSCRIPT_OBJPATH} + COMMAND echo s!@LLVM_CPPFLAGS@!${CPP_FLGS}! >> ${SEDSCRIPT_OBJPATH} + COMMAND echo s!@LLVM_CFLAGS@!${C_FLGS}! >> ${SEDSCRIPT_OBJPATH} + COMMAND echo s!@LLVM_CXXFLAGS@!${CXX_FLGS}! >> ${SEDSCRIPT_OBJPATH} + # TODO: Use general flags for linking! not just for shared libs: + COMMAND echo s!@LLVM_LDFLAGS@!${CMAKE_SHARED_LINKER_FLAGS}! >> ${SEDSCRIPT_OBJPATH} + COMMAND echo s!@LLVM_BUILDMODE@!${CMAKE_BUILD_TYPE}! >> ${SEDSCRIPT_OBJPATH} + COMMAND echo s!@LLVM_SYSTEM_LIBS@!${SYSTEM_LIBS}! >> ${SEDSCRIPT_OBJPATH} + COMMAND sed -f ${SEDSCRIPT_OBJPATH} < ${BUILDVARIABLES_SRCPATH} > ${BUILDVARIABLES_OBJPATH} + VERBATIM + COMMENT "Building BuildVariables.inc include." + ) + +# Add the llvm-config tool. add_llvm_tool(llvm-config-2 llvm-config.cpp ) + +# Add the dependency on the generation step. +add_file_dependencies(${CMAKE_CURRENT_SOURCE_DIR}/llvm-config.cpp ${BUILDVARIABLES_OBJPATH}) Modified: llvm/trunk/tools/llvm-config-2/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-config-2/Makefile?rev=143649&r1=143648&r2=143649&view=diff ============================================================================== --- llvm/trunk/tools/llvm-config-2/Makefile (original) +++ llvm/trunk/tools/llvm-config-2/Makefile Thu Nov 3 16:01:36 2011 @@ -11,7 +11,47 @@ TOOLNAME := llvm-config-2 LINK_COMPONENTS := support +# We generate sources in the build directory, make sure it is in the include +# paths. +INCLUDE_BUILD_DIR := 1 + # This tool has no plugins, optimize startup time. TOOL_NO_EXPORTS := 1 +# Note that we have to use lazy expansion here. +BUILDVARIABLES_SRCPATH = $(PROJ_SRC_ROOT)/tools/$(TOOLNAME)/BuildVariables.inc.in +BUILDVARIABLES_OBJPATH = $(ObjDir)/BuildVariables.inc +BUILT_SOURCES = $(BUILDVARIABLES_OBJPATH) + include $(LEVEL)/Makefile.common + +# Combine preprocessor flags (except for -I) and CXX flags. +SUB_CPPFLAGS := ${CPP.BaseFlags} +SUB_CFLAGS := ${CPP.BaseFlags} ${C.Flags} +SUB_CXXFLAGS := ${CPP.BaseFlags} ${CXX.Flags} + +# This is blank for now. We need to be careful about adding stuff here: +# LDFLAGS tend not to be portable, and we don't currently require the +# user to use libtool when linking against LLVM. +SUB_LDFLAGS := + +$(ObjDir)/BuildVariables.inc: $(BUILDVARIABLES_SRCPATH) Makefile $(ObjDir)/.dir + $(Echo) "Building llvm-config BuildVariables.inc file." + $(Verb) $(ECHO) 's/@LLVM_SRC_ROOT@/$(subst /,\/,$(LLVM_SRC_ROOT))/' \ + > temp.sed + $(Verb) $(ECHO) 's/@LLVM_OBJ_ROOT@/$(subst /,\/,$(LLVM_OBJ_ROOT))/' \ + >> temp.sed + $(Verb) $(ECHO) 's/@LLVM_CPPFLAGS@/$(subst /,\/,$(SUB_CPPFLAGS))/' \ + >> temp.sed + $(Verb) $(ECHO) 's/@LLVM_CFLAGS@/$(subst /,\/,$(SUB_CFLAGS))/' \ + >> temp.sed + $(Verb) $(ECHO) 's/@LLVM_CXXFLAGS@/$(subst /,\/,$(SUB_CXXFLAGS))/' \ + >> temp.sed + $(Verb) $(ECHO) 's/@LLVM_LDFLAGS@/$(subst /,\/,$(SUB_LDFLAGS))/' \ + >> temp.sed + $(Verb) $(ECHO) 's/@LLVM_BUILDMODE@/$(subst /,\/,$(BuildMode))/' \ + >> temp.sed + $(Verb) $(ECHO) 's/@LLVM_SYSTEM_LIBS@/$(subst /,\/,$(LIBS))/' \ + >> temp.sed + $(Verb) $(SED) -f temp.sed < $< > $@ + $(Verb) $(RM) temp.sed Modified: llvm/trunk/tools/llvm-config-2/llvm-config.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-config-2/llvm-config.cpp?rev=143649&r1=143648&r2=143649&view=diff ============================================================================== --- llvm/trunk/tools/llvm-config-2/llvm-config.cpp (original) +++ llvm/trunk/tools/llvm-config-2/llvm-config.cpp Thu Nov 3 16:01:36 2011 @@ -33,15 +33,9 @@ using namespace llvm; -// FIXME: Need to get various bits of build time information. -const char LLVM_SRC_ROOT[] = "FIXME"; -const char LLVM_OBJ_ROOT[] = "FIXME"; -const char LLVM_CPPFLAGS[] = "FIXME"; -const char LLVM_CFLAGS[] = "FIXME"; -const char LLVM_LDFLAGS[] = "FIXME"; -const char LLVM_CXXFLAGS[] = "FIXME"; -const char LLVM_BUILDMODE[] = "FIXME"; -const char LLVM_SYSTEM_LIBS[] = "FIXME"; +// Include the build time variables we can report to the user. This is generated +// at build time from the BuildVariables.inc.in file by the build system. +#include "BuildVariables.inc" // Include the component table. This creates an array of struct // AvailableComponent entries, which record the component name, library name, From daniel at zuster.org Thu Nov 3 16:01:32 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Thu, 03 Nov 2011 21:01:32 -0000 Subject: [llvm-commits] [llvm] r143648 - /llvm/trunk/Makefile.rules Message-ID: <20111103210132.E282E2A6C12C@llvm.org> Author: ddunbar Date: Thu Nov 3 16:01:32 2011 New Revision: 143648 URL: http://llvm.org/viewvc/llvm-project?rev=143648&view=rev Log: build/Make: Add support for INCLUDE_BUILD_DIR make variable, to specify that component needs to include files from its ObjDir. Modified: llvm/trunk/Makefile.rules Modified: llvm/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=143648&r1=143647&r2=143648&view=diff ============================================================================== --- llvm/trunk/Makefile.rules (original) +++ llvm/trunk/Makefile.rules Thu Nov 3 16:01:32 2011 @@ -631,6 +631,10 @@ $(LLVM_OBJ_ROOT) $(LLVM_SRC_ROOT))) \ $(CPP.BaseFlags) +ifeq ($(INCLUDE_BUILD_DIR),1) + CPP.Flags += -I$(ObjDir) +endif + # SHOW_DIAGNOSTICS support. ifeq ($(SHOW_DIAGNOSTICS),1) Compile.Wrapper := env CC_LOG_DIAGNOSTICS=1 \ From grosser at fim.uni-passau.de Thu Nov 3 16:03:01 2011 From: grosser at fim.uni-passau.de (Tobias Grosser) Date: Thu, 03 Nov 2011 21:03:01 -0000 Subject: [llvm-commits] [polly] r143650 - /polly/trunk/lib/Analysis/ScopDetection.cpp Message-ID: <20111103210301.877BB2A6C12C@llvm.org> Author: grosser Date: Thu Nov 3 16:03:01 2011 New Revision: 143650 URL: http://llvm.org/viewvc/llvm-project?rev=143650&view=rev Log: ScopDetection: A parameter cannot appear inside a SCoP. Modified: polly/trunk/lib/Analysis/ScopDetection.cpp Modified: polly/trunk/lib/Analysis/ScopDetection.cpp URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopDetection.cpp?rev=143650&r1=143649&r2=143650&view=diff ============================================================================== --- polly/trunk/lib/Analysis/ScopDetection.cpp (original) +++ polly/trunk/lib/Analysis/ScopDetection.cpp Thu Nov 3 16:03:01 2011 @@ -261,6 +261,9 @@ } SCEVType::TYPE visitUnknown(const SCEVUnknown* Expr) { + if (Instruction *I = dyn_cast(Expr->getValue())) + if (R->contains(I)) + return SCEVType::INVALID; return SCEVType::PARAM; } }; From grosser at fim.uni-passau.de Thu Nov 3 16:03:06 2011 From: grosser at fim.uni-passau.de (Tobias Grosser) Date: Thu, 03 Nov 2011 21:03:06 -0000 Subject: [llvm-commits] [polly] r143651 - in /polly/trunk: include/polly/TempScopInfo.h lib/Analysis/TempScopInfo.cpp Message-ID: <20111103210306.9917A2A6C12C@llvm.org> Author: grosser Date: Thu Nov 3 16:03:06 2011 New Revision: 143651 URL: http://llvm.org/viewvc/llvm-project?rev=143651&view=rev Log: TempScop: Remove has_signed (was unused) Modified: polly/trunk/include/polly/TempScopInfo.h polly/trunk/lib/Analysis/TempScopInfo.cpp Modified: polly/trunk/include/polly/TempScopInfo.h URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/TempScopInfo.h?rev=143651&r1=143650&r2=143651&view=diff ============================================================================== --- polly/trunk/include/polly/TempScopInfo.h (original) +++ polly/trunk/include/polly/TempScopInfo.h Thu Nov 3 16:03:06 2011 @@ -71,19 +71,17 @@ Value *BaseAddr; unsigned ElemBytes : 28; SCEVAffFuncType FuncType : 3; - bool has_sign : 1; public: /// @brief Create a new SCEV affine function. - SCEVAffFunc() : TransComp(0), BaseAddr(0), ElemBytes(0), FuncType(None), - has_sign(true) {} + SCEVAffFunc() : TransComp(0), BaseAddr(0), ElemBytes(0), FuncType(None) {} /// @brief Create a new SCEV affine function with memory access type or /// condition type explicit SCEVAffFunc(SCEVAffFuncType Type, const SCEV *OriginalSCEV, unsigned elemBytes = 0) : TransComp(0), OriginalSCEV(OriginalSCEV), BaseAddr(0), - ElemBytes(elemBytes), FuncType(Type), has_sign(true) {} + ElemBytes(elemBytes), FuncType(Type) {} /// @brief Construct a new SCEVAffFunc from a SCEV /// @@ -97,8 +95,6 @@ SCEVAffFunc(const SCEV *S, SCEVAffFuncType Type, Region &R, ParamSetType &Param, LoopInfo *LI, ScalarEvolution *SE); - void setUnsigned() {has_sign = false;} - // getCoeff - Get the Coefficient of a given variable. const SCEV *getCoeff(const SCEV *Var) const { LnrTransSet::const_iterator At = LnrTrans.find(Var); @@ -109,8 +105,6 @@ return TransComp; } - bool isSigned() const { return has_sign; } - enum SCEVAffFuncType getType() const { return FuncType; } bool isDataRef() const { Modified: polly/trunk/lib/Analysis/TempScopInfo.cpp URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/TempScopInfo.cpp?rev=143651&r1=143650&r2=143651&view=diff ============================================================================== --- polly/trunk/lib/Analysis/TempScopInfo.cpp (original) +++ polly/trunk/lib/Analysis/TempScopInfo.cpp Thu Nov 3 16:03:06 2011 @@ -38,7 +38,7 @@ SCEVAffFunc::SCEVAffFunc(const SCEV *S, SCEVAffFuncType Type, Region &R, ParamSetType &Params, LoopInfo *LI, ScalarEvolution *SE) - : ElemBytes(0), FuncType(Type), has_sign(true) { + : ElemBytes(0), FuncType(Type) { assert(S && "S can not be null!"); assert(!isa(S) && "Non affine function in Scop"); From grosser at fim.uni-passau.de Thu Nov 3 16:03:10 2011 From: grosser at fim.uni-passau.de (Tobias Grosser) Date: Thu, 03 Nov 2011 21:03:10 -0000 Subject: [llvm-commits] [polly] r143652 - /polly/trunk/include/polly/TempScopInfo.h Message-ID: <20111103210311.03A872A6C12C@llvm.org> Author: grosser Date: Thu Nov 3 16:03:10 2011 New Revision: 143652 URL: http://llvm.org/viewvc/llvm-project?rev=143652&view=rev Log: TempScop: Remove unused SCEVAffFunc constructor Modified: polly/trunk/include/polly/TempScopInfo.h Modified: polly/trunk/include/polly/TempScopInfo.h URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/TempScopInfo.h?rev=143652&r1=143651&r2=143652&view=diff ============================================================================== --- polly/trunk/include/polly/TempScopInfo.h (original) +++ polly/trunk/include/polly/TempScopInfo.h Thu Nov 3 16:03:10 2011 @@ -73,9 +73,6 @@ SCEVAffFuncType FuncType : 3; public: - /// @brief Create a new SCEV affine function. - SCEVAffFunc() : TransComp(0), BaseAddr(0), ElemBytes(0), FuncType(None) {} - /// @brief Create a new SCEV affine function with memory access type or /// condition type explicit SCEVAffFunc(SCEVAffFuncType Type, const SCEV *OriginalSCEV, From grosser at fim.uni-passau.de Thu Nov 3 16:03:14 2011 From: grosser at fim.uni-passau.de (Tobias Grosser) Date: Thu, 03 Nov 2011 21:03:14 -0000 Subject: [llvm-commits] [polly] r143653 - /polly/trunk/lib/Analysis/ScopDetection.cpp Message-ID: <20111103210314.E49AC2A6C12C@llvm.org> Author: grosser Date: Thu Nov 3 16:03:14 2011 New Revision: 143653 URL: http://llvm.org/viewvc/llvm-project?rev=143653&view=rev Log: ScopDetection: Use SCEVValidator for conditions Modified: polly/trunk/lib/Analysis/ScopDetection.cpp Modified: polly/trunk/lib/Analysis/ScopDetection.cpp URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopDetection.cpp?rev=143653&r1=143652&r2=143653&view=diff ============================================================================== --- polly/trunk/lib/Analysis/ScopDetection.cpp (original) +++ polly/trunk/lib/Analysis/ScopDetection.cpp Thu Nov 3 16:03:14 2011 @@ -396,8 +396,8 @@ const SCEV *ScevLHS = SE->getSCEV(ICmp->getOperand(0)); const SCEV *ScevRHS = SE->getSCEV(ICmp->getOperand(1)); - bool affineLHS = isValidAffineFunction(ScevLHS, RefRegion); - bool affineRHS = isValidAffineFunction(ScevRHS, RefRegion); + bool affineLHS = SCEVValidator::isValid(&Context.CurRegion, ScevLHS, *SE); + bool affineRHS = SCEVValidator::isValid(&Context.CurRegion, ScevRHS, *SE); if (!affineLHS || !affineRHS) INVALID(AffFunc, "Non affine branch in BB: " + BB.getNameStr()); From grosser at fim.uni-passau.de Thu Nov 3 16:03:19 2011 From: grosser at fim.uni-passau.de (Tobias Grosser) Date: Thu, 03 Nov 2011 21:03:19 -0000 Subject: [llvm-commits] [polly] r143654 - /polly/trunk/lib/Analysis/ScopDetection.cpp Message-ID: <20111103210319.0AA8F2A6C12C@llvm.org> Author: grosser Date: Thu Nov 3 16:03:18 2011 New Revision: 143654 URL: http://llvm.org/viewvc/llvm-project?rev=143654&view=rev Log: ScopDetection: Use SCEVValidator for memory accesses. We currently run the old memory access checker in parallel, as we would otherwise fail in TempScop because of currently unsupported functions. We will remove the old memory access checker as soon as TempScop is fixed. Modified: polly/trunk/lib/Analysis/ScopDetection.cpp Modified: polly/trunk/lib/Analysis/ScopDetection.cpp URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopDetection.cpp?rev=143654&r1=143653&r2=143654&view=diff ============================================================================== --- polly/trunk/lib/Analysis/ScopDetection.cpp (original) +++ polly/trunk/lib/Analysis/ScopDetection.cpp Thu Nov 3 16:03:18 2011 @@ -118,21 +118,24 @@ private: const Region *R; ScalarEvolution &SE; - const Value **BaseAddress; + Value **BaseAddress; public: static bool isValid(const Region *R, const SCEV *Scev, ScalarEvolution &SE, - const Value **BaseAddress = NULL) { + Value **BaseAddress = NULL) { if (isa(Scev)) return false; + if (BaseAddress) + *BaseAddress = NULL; + SCEVValidator Validator(R, SE, BaseAddress); return Validator.visit(Scev) != SCEVType::INVALID; } SCEVValidator(const Region *R, ScalarEvolution &SE, - const Value **BaseAddress) : R(R), SE(SE), + Value **BaseAddress) : R(R), SE(SE), BaseAddress(BaseAddress) {}; SCEVType::TYPE visitConstant(const SCEVConstant *Constant) { @@ -261,6 +264,19 @@ } SCEVType::TYPE visitUnknown(const SCEVUnknown* Expr) { + + Value *V = Expr->getValue(); + + if (isa(V)) + return SCEVType::INVALID; + + if (BaseAddress) { + if (*BaseAddress) + return SCEVType::INVALID; + else + *BaseAddress = V; + } + if (Instruction *I = dyn_cast(Expr->getValue())) if (R->contains(I)) return SCEVType::INVALID; @@ -438,9 +454,16 @@ Value *Ptr = getPointerOperand(Inst), *BasePtr; const SCEV *AccessFunction = SE->getSCEV(Ptr); - if (!isValidAffineFunction(AccessFunction, Context.CurRegion, &BasePtr)) + if (!SCEVValidator::isValid(&Context.CurRegion, AccessFunction, *SE, + &BasePtr)) INVALID(AffFunc, "Bad memory address " << *AccessFunction); + // FIXME: Also check with isValidAffineFunction, as for the moment it is + // protecting us to fail because of not supported features in TempScop. + // As soon as TempScop is fixed, this needs to be removed. + if (!isValidAffineFunction(AccessFunction, Context.CurRegion, &BasePtr)) + INVALID(AffFunc, "Access not supported in TempScop" << *AccessFunction); + // FIXME: Alias Analysis thinks IntToPtrInst aliases with alloca instructions // created by IndependentBlocks Pass. if (isa(BasePtr)) From daniel at zuster.org Thu Nov 3 16:03:53 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Thu, 03 Nov 2011 21:03:53 -0000 Subject: [llvm-commits] [llvm] r143655 - in /llvm/trunk/utils: NLT.schema NightlyTest.gnuplot NightlyTestTemplate.html cgiplotNLT.pl importNLT.pl parseNLT.pl plotNLT.pl webNLT.pl Message-ID: <20111103210353.D74002A6C12C@llvm.org> Author: ddunbar Date: Thu Nov 3 16:03:53 2011 New Revision: 143655 URL: http://llvm.org/viewvc/llvm-project?rev=143655&view=rev Log: utils: Remove (way) old nightly test scripts, I don't think anyone uses them and LNT has way better tools than this. Removed: llvm/trunk/utils/NLT.schema llvm/trunk/utils/NightlyTest.gnuplot llvm/trunk/utils/NightlyTestTemplate.html llvm/trunk/utils/cgiplotNLT.pl llvm/trunk/utils/importNLT.pl llvm/trunk/utils/parseNLT.pl llvm/trunk/utils/plotNLT.pl llvm/trunk/utils/webNLT.pl Removed: llvm/trunk/utils/NLT.schema URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/NLT.schema?rev=143654&view=auto ============================================================================== --- llvm/trunk/utils/NLT.schema (original) +++ llvm/trunk/utils/NLT.schema (removed) @@ -1,8 +0,0 @@ -CREATE TABLE `Tests` ( - `NAME` varchar(255) NOT NULL default '', - `RUN` date NOT NULL default '0000-00-00', - `TEST` varchar(32) NOT NULL default '', - `VALUE` double NOT NULL default '0', - KEY `name_index` (`NAME`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - Removed: llvm/trunk/utils/NightlyTest.gnuplot URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/NightlyTest.gnuplot?rev=143654&view=auto ============================================================================== --- llvm/trunk/utils/NightlyTest.gnuplot (original) +++ llvm/trunk/utils/NightlyTest.gnuplot (removed) @@ -1,214 +0,0 @@ -set terminal png - -##------- Plot small Date vs LOC ---- -set output "running_loc.png" -set xlabel "Date" -set ylabel "Lines of Code" -set xdata time -set timefmt "%Y-%m-%d-%H:%M:%S:" -set format x "%b %d, %Y" - -set size .75,.75 -set xtics rotate -set xlabel 0,-1 -plot "running_loc.txt" using 1:2 title '' with lines, \ - "running_loc.txt" using 1:2 title "Date vs. Lines of Code" with lines - -##------- Plot large Date vs LOC ---- -set size 1.5,1.5 -set xtics norotate -set xlabel 0,0 -set output "running_loc_large.png" -plot "running_loc.txt" using 1:2 title '', \ - "running_loc.txt" using 1:2 title "Date vs. Lines of Code" with lines - - -# Delete all labels... -set nolabel - -##------- Olden CBE performance ---- - -set size .75,.75 -set xtics rotate -set xlabel 0,-1 -set output "running_Olden_cbe_time.png" -set ylabel "CBE compiled execution time (s)" -plot "running_Olden_cbe_time.txt" u 1:2 t '' with lines, \ - "running_Olden_cbe_time.txt" u 1:2 t "bh" with lines, \ - "running_Olden_cbe_time.txt" u 1:3 t "em3d" with lines, \ - "running_Olden_cbe_time.txt" u 1:4 t "mst" with lines, \ - "running_Olden_cbe_time.txt" u 1:5 t "power" with lines, \ - "running_Olden_cbe_time.txt" u 1:6 t "tsp" with lines, \ - "running_Olden_cbe_time.txt" u 1:7 t "bisort" with lines, \ - "running_Olden_cbe_time.txt" u 1:8 t "health" with lines, \ - "running_Olden_cbe_time.txt" u 1:9 t "perimeter" with lines, \ - "running_Olden_cbe_time.txt" u 1:10 t "treeadd" with lines, \ - "running_Olden_cbe_time.txt" u 1:11 t "voronoi" \ - with lines - -set size 1.5,1.5 -set xtics norotate -set xlabel 0,0 -set output "running_Olden_cbe_time_large.png" -plot "running_Olden_cbe_time.txt" u 1:2 t '' with lines, \ - "running_Olden_cbe_time.txt" u 1:2 t "bh" with lines, \ - "running_Olden_cbe_time.txt" u 1:3 t "em3d" with lines, \ - "running_Olden_cbe_time.txt" u 1:4 t "mst" with lines, \ - "running_Olden_cbe_time.txt" u 1:5 t "power" with lines, \ - "running_Olden_cbe_time.txt" u 1:6 t "tsp" with lines, \ - "running_Olden_cbe_time.txt" u 1:7 t "bisort" with lines, \ - "running_Olden_cbe_time.txt" u 1:8 t "health" with lines, \ - "running_Olden_cbe_time.txt" u 1:9 t "perimeter" with lines, \ - "running_Olden_cbe_time.txt" u 1:10 t "treeadd" with lines, \ - "running_Olden_cbe_time.txt" u 1:11 t "voronoi" \ - with lines - -##------- Olden JIT performance ---- - -set size .75,.75 -set xtics rotate -set xlabel 0,-1 -set output "running_Olden_jit_time.png" -set ylabel "JIT execution time (s)" -plot "running_Olden_jit_time.txt" u 1:2 t '' with lines, \ - "running_Olden_jit_time.txt" u 1:2 t "bh" with lines, \ - "running_Olden_jit_time.txt" u 1:3 t "em3d" with lines, \ - "running_Olden_jit_time.txt" u 1:4 t "mst" with lines, \ - "running_Olden_jit_time.txt" u 1:5 t "power" with lines, \ - "running_Olden_jit_time.txt" u 1:6 t "tsp" with lines, \ - "running_Olden_jit_time.txt" u 1:7 t "bisort" with lines, \ - "running_Olden_jit_time.txt" u 1:8 t "health" with lines, \ - "running_Olden_jit_time.txt" u 1:9 t "perimeter" with lines, \ - "running_Olden_jit_time.txt" u 1:10 t "treeadd" with lines, \ - "running_Olden_jit_time.txt" u 1:11 t "voronoi" \ - with lines - -set size 1.5,1.5 -set xtics norotate -set xlabel 0,0 -set output "running_Olden_jit_time_large.png" -plot "running_Olden_jit_time.txt" u 1:2 t '' with lines, \ - "running_Olden_jit_time.txt" u 1:2 t "bh" with lines, \ - "running_Olden_jit_time.txt" u 1:3 t "em3d" with lines, \ - "running_Olden_jit_time.txt" u 1:4 t "mst" with lines, \ - "running_Olden_jit_time.txt" u 1:5 t "power" with lines, \ - "running_Olden_jit_time.txt" u 1:6 t "tsp" with lines, \ - "running_Olden_jit_time.txt" u 1:7 t "bisort" with lines, \ - "running_Olden_jit_time.txt" u 1:8 t "health" with lines, \ - "running_Olden_jit_time.txt" u 1:9 t "perimeter" with lines, \ - "running_Olden_jit_time.txt" u 1:10 t "treeadd" with lines, \ - "running_Olden_jit_time.txt" u 1:11 t "voronoi" \ - with lines - -##------- Olden LLC performance ---- - -set size .75,.75 -set xtics rotate -set xlabel 0,-1 -set output "running_Olden_llc_time.png" -set ylabel "LLC compiled execution time (s)" -plot "running_Olden_llc_time.txt" u 1:2 t '' with lines, \ - "running_Olden_llc_time.txt" u 1:2 t "bh" with lines, \ - "running_Olden_llc_time.txt" u 1:3 t "em3d" with lines, \ - "running_Olden_llc_time.txt" u 1:4 t "mst" with lines, \ - "running_Olden_llc_time.txt" u 1:5 t "power" with lines, \ - "running_Olden_llc_time.txt" u 1:6 t "tsp" with lines, \ - "running_Olden_llc_time.txt" u 1:7 t "bisort" with lines, \ - "running_Olden_llc_time.txt" u 1:8 t "health" with lines, \ - "running_Olden_llc_time.txt" u 1:9 t "perimeter" with lines, \ - "running_Olden_llc_time.txt" u 1:10 t "treeadd" with lines, \ - "running_Olden_llc_time.txt" u 1:11 t "voronoi" \ - with lines - -set size 1.5,1.5 -set xtics norotate -set xlabel 0,0 -set output "running_Olden_llc_time_large.png" -plot "running_Olden_llc_time.txt" u 1:2 t '' with lines, \ - "running_Olden_llc_time.txt" u 1:2 t "bh" with lines, \ - "running_Olden_llc_time.txt" u 1:3 t "em3d" with lines, \ - "running_Olden_llc_time.txt" u 1:4 t "mst" with lines, \ - "running_Olden_llc_time.txt" u 1:5 t "power" with lines, \ - "running_Olden_llc_time.txt" u 1:6 t "tsp" with lines, \ - "running_Olden_llc_time.txt" u 1:7 t "bisort" with lines, \ - "running_Olden_llc_time.txt" u 1:8 t "health" with lines, \ - "running_Olden_llc_time.txt" u 1:9 t "perimeter" with lines, \ - "running_Olden_llc_time.txt" u 1:10 t "treeadd" with lines, \ - "running_Olden_llc_time.txt" u 1:11 t "voronoi" \ - with lines - - -##------- Olden optimizer time ---- - -set size .75,.75 -set xtics rotate -set xlabel 0,-1 -set output "running_Olden_opt_time.png" -set ylabel "Time to run the optimizer (s)" -plot "running_Olden_opt_time.txt" u 1:2 t '' with lines, \ - "running_Olden_opt_time.txt" u 1:2 t "bh" with lines, \ - "running_Olden_opt_time.txt" u 1:3 t "em3d" with lines, \ - "running_Olden_opt_time.txt" u 1:4 t "mst" with lines, \ - "running_Olden_opt_time.txt" u 1:5 t "power" with lines, \ - "running_Olden_opt_time.txt" u 1:6 t "tsp" with lines, \ - "running_Olden_opt_time.txt" u 1:7 t "bisort" with lines, \ - "running_Olden_opt_time.txt" u 1:8 t "health" with lines, \ - "running_Olden_opt_time.txt" u 1:9 t "perimeter" with lines, \ - "running_Olden_opt_time.txt" u 1:10 t "treeadd" with lines, \ - "running_Olden_opt_time.txt" u 1:11 t "voronoi" \ - with lines - -set size 1.5,1.5 -set xtics norotate -set xlabel 0,0 -set output "running_Olden_opt_time_large.png" -plot "running_Olden_opt_time.txt" u 1:2 t '' with lines, \ - "running_Olden_opt_time.txt" u 1:2 t "bh" with lines, \ - "running_Olden_opt_time.txt" u 1:3 t "em3d" with lines, \ - "running_Olden_opt_time.txt" u 1:4 t "mst" with lines, \ - "running_Olden_opt_time.txt" u 1:5 t "power" with lines, \ - "running_Olden_opt_time.txt" u 1:6 t "tsp" with lines, \ - "running_Olden_opt_time.txt" u 1:7 t "bisort" with lines, \ - "running_Olden_opt_time.txt" u 1:8 t "health" with lines, \ - "running_Olden_opt_time.txt" u 1:9 t "perimeter" with lines, \ - "running_Olden_opt_time.txt" u 1:10 t "treeadd" with lines, \ - "running_Olden_opt_time.txt" u 1:11 t "voronoi" \ - with lines - - -##------- Bytecode size ---- - -set size .75,.75 -set xtics rotate -set xlabel 0,-1 -set output "running_Olden_bytecode.png" -set ylabel "Program bytecode size (bytes)" -plot "running_Olden_bytecode.txt" u 1:2 t '' with lines, \ - "running_Olden_bytecode.txt" u 1:2 t "bh" with lines, \ - "running_Olden_bytecode.txt" u 1:3 t "em3d" with lines, \ - "running_Olden_bytecode.txt" u 1:4 t "mst" with lines, \ - "running_Olden_bytecode.txt" u 1:5 t "power" with lines, \ - "running_Olden_bytecode.txt" u 1:6 t "tsp" with lines, \ - "running_Olden_bytecode.txt" u 1:7 t "bisort" with lines, \ - "running_Olden_bytecode.txt" u 1:8 t "health" with lines, \ - "running_Olden_bytecode.txt" u 1:9 t "perimeter" with lines, \ - "running_Olden_bytecode.txt" u 1:10 t "treeadd" with lines, \ - "running_Olden_bytecode.txt" u 1:11 t "voronoi" \ - with lines - -set size 1.5,1.5 -set xtics norotate -set xlabel 0,0 -set output "running_Olden_bytecode_large.png" -plot "running_Olden_bytecode.txt" u 1:2 t '' with lines, \ - "running_Olden_bytecode.txt" u 1:2 t "bh" with lines, \ - "running_Olden_bytecode.txt" u 1:3 t "em3d" with lines, \ - "running_Olden_bytecode.txt" u 1:4 t "mst" with lines, \ - "running_Olden_bytecode.txt" u 1:5 t "power" with lines, \ - "running_Olden_bytecode.txt" u 1:6 t "tsp" with lines, \ - "running_Olden_bytecode.txt" u 1:7 t "bisort" with lines, \ - "running_Olden_bytecode.txt" u 1:8 t "health" with lines, \ - "running_Olden_bytecode.txt" u 1:9 t "perimeter" with lines, \ - "running_Olden_bytecode.txt" u 1:10 t "treeadd" with lines, \ - "running_Olden_bytecode.txt" u 1:11 t "voronoi" \ - with lines Removed: llvm/trunk/utils/NightlyTestTemplate.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/NightlyTestTemplate.html?rev=143654&view=auto ============================================================================== --- llvm/trunk/utils/NightlyTestTemplate.html (original) +++ llvm/trunk/utils/NightlyTestTemplate.html (removed) @@ -1,244 +0,0 @@ - -LLVM Test Results for $DateString - - -
    LLVM Test Results for $DateString
    -
    - - -
    - -
    -
    -Sections:
    -
    -Overview
    -Changes
    -Dejagnu Tests
    -Trends
    -Programs
    -
    - -

    -
    -
    Previous:
    -
    - $PrevDaysList -
    -

    - -Back to:
    -Test Results
    -LLVM Page

    - -

    - -
    -
    -
    Today's Test Results Overview -

    - - - - - -
    - -
    Lines Of Code over Time
    -Click for larger view -
    - -

    Nightly Test Overview:

    -
      -
    • Start: $TestStartTime
    • -
    • Finish: $TestFinishTime
    • -
    • Platform: $TestPlatform
    • -
    -

    CVS Tree Overview:

    -
      -
    • CVS Checkout Log -
        - $NumDirsInCVS dirs, $NumFilesInCVS files, $LOC - lines of code, checked out in $CVSCheckoutTime seconds
      -
    • Compilation Log - - - - - -
      ItemCPU TimeWall Clock
      Configure CVS Tree$ConfigTime$ConfigWallTime
      Build CVS Tree$BuildTime$BuildWallTime
      Run Dejagnu Tests$DejagnuTime$DejagnuWallTime
    • -
    • Number of object files compiled: $NumObjects
    • -
    • Number of libraries linked: $NumLibraries
    • -
    • Number of executables linked: $NumExecutables
    • -
    • Build Status: $BuildStatus
    • -
    - -

    Warnings during the build:

    -$WarningsList - -

    -
    -
    Changes from Yesterday -

    - -

    Changes to CVS:

    -
      -
    • Users who committed to CVS: $UserCommitList -
    • Users who updated from CVS: $UserUpdateList -
    • Added Files: $AddedFilesList -
    • Modified Files: $ModifiedFilesList -
    • Removed Files: $RemovedFilesList -

    - -

    Changes to Warnings:

    -

    Warnings Added:

    -$WarningsAdded -

    Warnings Removed:

    -$WarningsRemoved - -

    Changes in the test suite:

    -
      -
    • New Tests: $TestsAdded -
    • Removed Tests: $TestsRemoved -
    • Newly passing tests: $TestsFixed -
    • Newly failing tests: $TestsBroken -
    -
    - - -

    -
    -
    Dejagnu Test Results -
    -
    -$DejagnuTestResults -

    A complete log of testing Feature and Regression is available for further analysis.

    - -

    -
    -
    Changes Over Time -

    - - -Here are some charts showing how the LLVM optimizer and code generators are -changing over time. For now we use the Olden benchmark suite to measure this, -but eventually we will switch to using SPEC CPU2000. All programs are run with -"LARGE_PROBLEM_SIZE" enabled. Click on any of the charts to get a larger -version.

    - -

    Compilation Measurements:

    - - - - - -
    -
    -Size of LLVM bytecode files -
    -
    -Time to run the LLVM optimizer on each program -
    - -

    Program Execution Measurements:

    - - - - - - - - - -
    -
    -Execution time for CBE generated executable -
    -
    -Execution time for the LLC generated executable -
    -
    -Execution time for program in the JIT -
    - - - - -

    -
    -
    Program Tests -

    - -This section tests LLVM on a variety of programs in the test suite. This -includes benchmark suites like the Olden, McCat, Ptrdist, and SPEC benchmarks as -well as a few random programs with test inputs. This section is meant to track -how stable LLVM is as a whole. A failure in the execution of any test is marked -with an asterisk: `*'. The columns of the tables are:

    - -

      -
    1. Program - The name of the program for that row.
    2. -
    3. GCCAS - Time to run LLVM optimizers on the program.
    4. -
    5. Bytecode - The size of the bytecode for the - program
    6. -
    7. Instrs - The number of LLVM instructions in the - compiled bytecode
    8. -
    9. LLC compile - The time taken compile with - LLC (the static backend)
    10. -
    11. JIT codegen - The amount of time spent in the - JIT itself, instead of executing the program.
    12. -
    13. Machine code - The number of bytes of machine - code generated by the JIT.
    14. -
    15. GCC - The time taken to execute the program when compiled - with GCC -O2.
    16. -
    17. CBE - The time taken to execute the program after - compilation through the C backend, compiled with -O2.
    18. -
    19. LLC - How long does the program generated by the static - backend LLC take to execute
    20. -
    21. JIT - The amount of time spent running the - program with the JIT; this includes the code generation phase (listed above) - and actually running the program.
    22. -
    23. GCC/LLC - The speed-up of the LLC output vs the native - GCC output: greater than 1 is a speedup, less than 1 is a slowdown.
    24. -
    25. GCC/CBE - The speed-up of the CBE output vs the native - GCC output: greater than 1 is a speedup, less than 1 is a slowdown.
    26. -
    27. LLC-BETA - How long does the program generated by the static - backend LLC take to execute the program, when compiled with new experimental - features. This is temporary, for tuning.
    28. -

    - -A complete log of testing -SingleSource, -MultiSource, and -External programs are -available for further analysis. - -

    Programs/External

    - -
    -
    -$ExternalProgramsTable -
    - -

    Programs/MultiSource

    - -
    -
    -$MultiSourceProgramsTable -
    - -

    Programs/SingleSource

    - -
    -
    -$SingleSourceProgramsTable -
    - - - Removed: llvm/trunk/utils/cgiplotNLT.pl URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/cgiplotNLT.pl?rev=143654&view=auto ============================================================================== --- llvm/trunk/utils/cgiplotNLT.pl (original) +++ llvm/trunk/utils/cgiplotNLT.pl (removed) @@ -1,68 +0,0 @@ -#!/usr/bin/perl -#takes a test and a program from a dp and produces a gnuplot script -#use like perl plotNLT.pl password Programs/MultiSource/Benchmarks/ASCI_Purple/SMG2000/smg2000 llc - -use CGI; -use DBI; -my $q = new CGI; - -# database information -$db="llvmalpha"; -$host="localhost"; -$userid="llvmdbuser"; -$passwd=$q->param('pwd'); -$connectionInfo="dbi:mysql:$db;$host"; - -# make connection to database -$dbh = DBI->connect($connectionInfo,$userid,$passwd) or die DBI->errstr; - - -$count = 0; -while ($q->param('n' . $count)) - { - $count++; - } - -$| = 1; -print "Content-type: image/png", "\n\n"; - -open CMDSTREAM, "|gnuplot"; -#open CMDSTREAM, "|echo"; - -print CMDSTREAM "set terminal png\n"; -print CMDSTREAM "set output\n"; -print CMDSTREAM "set xdata time\n"; -print CMDSTREAM 'set timefmt "%Y-%m-%d"'; -print CMDSTREAM "\nplot"; -for ($iter = 0; $iter < $count; $iter++) { - if ($iter) - { print CMDSTREAM ","; } - print CMDSTREAM " '-' using 1:2 title \"" . $q->param('t' . $iter) . "," . $q->param('n' . $iter) . "\"with lines"; -} - -print CMDSTREAM "\n"; - -for ($iter = 0; $iter < $count; $iter++) { - - $prog = $q->param('n' . $iter); - $test = $q->param('t' . $iter); - - $query = "Select RUN, VALUE from Tests where TEST = '$test' AND NAME = '$prog' ORDER BY RUN"; - #print "\n$query\n"; - - my $sth = $dbh->prepare( $query) || die "Can't prepare statement: $DBI::errstr";; - - my $rc = $sth->execute or die DBI->errstr; - - while(($da,$v) = $sth->fetchrow_array) - { - print CMDSTREAM "$da $v\n"; - } - - print CMDSTREAM "e\n"; -} -print CMDSTREAM "exit\n"; -close CMDSTREAM; - -# disconnect from database -$dbh->disconnect; Removed: llvm/trunk/utils/importNLT.pl URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/importNLT.pl?rev=143654&view=auto ============================================================================== --- llvm/trunk/utils/importNLT.pl (original) +++ llvm/trunk/utils/importNLT.pl (removed) @@ -1,86 +0,0 @@ -#!/usr/bin/perl -#take the output of parseNLT.pl and load it into a database -# use like: cat file |perl parseNLT.pl |perl importNLT.pl password - -use DBI; - -# database information -$db="llvmalpha"; -$host="localhost"; -$userid="llvmdbuser"; -$passwd=shift @ARGV; -$connectionInfo="dbi:mysql:$db;$host"; - -# make connection to database -$dbh = DBI->connect($connectionInfo,$userid,$passwd) or die DBI->errstr; -my $sth = $dbh->prepare( q{ - INSERT INTO Tests (NAME, RUN, TEST, VALUE) VALUES (?, STR_TO_DATE(?, '\%d \%M \%Y'), ?, ?) - }) || die "Can't prepare statement: $DBI::errstr";; - -while($d = <>) -{ - chomp $d; - if (18 == scalar split " ", $d) - { - ($day, $mon, $year, $prog, $gccas, $bc, $llccompile, $llcbetacompile, $jitcompile, - $mc, $gcc, $cbe, $llc, $llcbeta, $jit, $foo1, $foo2, $foo3) = split " ", $d; - if ($gccas =~ /\d+/) - { - $dbh->do("INSERT INTO Tests (NAME, RUN, TEST, VALUE) VALUES - ('$prog', STR_TO_DATE('$day $mon $year', '\%d \%M \%Y'), 'gccas', $gccas)") || die DBI->errstr; - } - if ($bc =~ /\d/) - { - $dbh->do("INSERT INTO Tests (NAME, RUN, TEST, VALUE) VALUES - ('$prog', STR_TO_DATE('$day $mon $year', '\%d \%M \%Y'), 'bytecode', $bc)") || die DBI->errstr; - } - if ($llccompile =~ /\d/) - { - $dbh->do("INSERT INTO Tests (NAME, RUN, TEST, VALUE) VALUES - ('$prog', STR_TO_DATE('$day $mon $year', '\%d \%M \%Y'), 'llc-compile', $llccompile)") || die DBI->errstr; - } - if ($llcbetacompile =~ /\d/) - { - $dbh->do("INSERT INTO Tests (NAME, RUN, TEST, VALUE) VALUES - ('$prog', STR_TO_DATE('$day $mon $year', '\%d \%M \%Y'), 'llc-beta-compile', $llcbetacompile)") || die DBI->errstr; - } - if ($jitcompile =~ /\d/) - { - $dbh->do("INSERT INTO Tests (NAME, RUN, TEST, VALUE) VALUES - ('$prog', STR_TO_DATE('$day $mon $year', '\%d \%M \%Y'), 'jit-compile', $jitcompile)") || die DBI->errstr; - } - if ($mc =~ /\d/) - { - $dbh->do("INSERT INTO Tests (NAME, RUN, TEST, VALUE) VALUES - ('$prog', STR_TO_DATE('$day $mon $year', '\%d \%M \%Y'), 'machine-code', $mc)") || die DBI->errstr; - } - if ($gcc =~ /\d/) - { - $dbh->do("INSERT INTO Tests (NAME, RUN, TEST, VALUE) VALUES - ('$prog', STR_TO_DATE('$day $mon $year', '\%d \%M \%Y'), 'gcc', $gcc)") || die DBI->errstr; - } - if ($llc =~ /\d/) - { - $dbh->do("INSERT INTO Tests (NAME, RUN, TEST, VALUE) VALUES - ('$prog', STR_TO_DATE('$day $mon $year', '\%d \%M \%Y'), 'llc', $llc)") || die DBI->errstr; - } - if ($llcbeta =~ /\d/) - { - $dbh->do("INSERT INTO Tests (NAME, RUN, TEST, VALUE) VALUES - ('$prog', STR_TO_DATE('$day $mon $year', '\%d \%M \%Y'), 'llc-beta', $llcbeta)") || die DBI->errstr; - } - if ($jit =~ /\d/) - { - $dbh->do("INSERT INTO Tests (NAME, RUN, TEST, VALUE) VALUES - ('$prog', STR_TO_DATE('$day $mon $year', '\%d \%M \%Y'), 'jit', $jit)") || die DBI->errstr; - } - print "."; - } - else - { - print "\nNO: $d\n"; - } -} -print "\n"; -# disconnect from database -$dbh->disconnect; Removed: llvm/trunk/utils/parseNLT.pl URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/parseNLT.pl?rev=143654&view=auto ============================================================================== --- llvm/trunk/utils/parseNLT.pl (original) +++ llvm/trunk/utils/parseNLT.pl (removed) @@ -1,34 +0,0 @@ -#!/usr/bin/perl -# a first attempt to parse the nightly tester pages into something -# one can reason about, namely import into a database -# USE: perl parseNLT.pl <2005-03-31.html -# for example - -while(<>) - { - if (/LLVM Test Results for (\w+) (\d+), (\d+)([^<]+)<\/td>/) - { - if ($prefix) - { $output .= "$1 "; $count++; } - } - if (/ 3) - { print "\n$day $mon $year $prefix/$output"; } - $output = ""; - $count = 0; - } - if (/

    (Programs.+)<\/h2>/) - { - $prefix = $1; - } - } - -if ($output) - { print "\n$day $mon $year $prefix/$output"; $output = ""; } Removed: llvm/trunk/utils/plotNLT.pl URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/plotNLT.pl?rev=143654&view=auto ============================================================================== --- llvm/trunk/utils/plotNLT.pl (original) +++ llvm/trunk/utils/plotNLT.pl (removed) @@ -1,53 +0,0 @@ -#!/usr/bin/perl -#takes a test and a program from a dp and produces a gnuplot script -#use like perl plotNLT.pl password Programs/MultiSource/Benchmarks/ASCI_Purple/SMG2000/smg2000 llc - -use DBI; - -# database information -$db="llvmalpha"; -$host="localhost"; -$userid="llvmdbuser"; -$passwd=shift @ARGV; -$connectionInfo="dbi:mysql:$db;$host"; - -# make connection to database -$dbh = DBI->connect($connectionInfo,$userid,$passwd) or die DBI->errstr; - - -$count = @ARGV / 2; - -print "set xdata time\n"; -print 'set timefmt "%Y-%m-%d"'; -print "\nplot"; -for ($iter = 0; $iter < $count; $iter++) { - if ($iter) - { print ","; } - print " '-' using 1:2 with lines"; -} - -print "\n"; - -for ($iter = 0; $iter < $count; $iter++) { - - $prog = shift @ARGV; - $test = shift @ARGV; - - $query = "Select RUN, VALUE from Tests where TEST = '$test' AND NAME = '$prog' ORDER BY RUN"; - #print "\n$query\n"; - - my $sth = $dbh->prepare( $query) || die "Can't prepare statement: $DBI::errstr";; - - my $rc = $sth->execute or die DBI->errstr; - - while(($da,$v) = $sth->fetchrow_array) - { - print "$da $v\n"; - } - - print "e\n"; -} - - -# disconnect from database -$dbh->disconnect; Removed: llvm/trunk/utils/webNLT.pl URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/webNLT.pl?rev=143654&view=auto ============================================================================== --- llvm/trunk/utils/webNLT.pl (original) +++ llvm/trunk/utils/webNLT.pl (removed) @@ -1,83 +0,0 @@ -#!/usr/bin/perl - -use DBI; -use CGI; - -$q = new CGI; -print $q->header(); -print $q->start_html(-title=>"Nightly Tester DB"); - -unless($q->param('pwd')) - { - print $q->startform(); - print $q->password_field(-name=>"pwd", -size=>20, -maxlength=>20); - print $q->submit(); - print $q->endform(); - } -else - { - # database information - $db="llvmalpha"; - $host="localhost"; - $userid="llvmdbuser"; - $passwd=$q->param('pwd'); - $connectionInfo="dbi:mysql:$db;$host"; - - # make connection to database - $dbh = DBI->connect($connectionInfo,$userid,$passwd) or die DBI->errstr; - $query = "Select DISTINCT(NAME) from Tests"; - my $sth = $dbh->prepare($query) || die "Can't prepare statement: $DBI::errstr"; - my $rc = $sth->execute or die DBI->errstr; - while (($n) = $sth->fetchrow_array) - { - push @names, ($n); -# print "$n

    "; - } - $query = "Select DISTINCT(TEST) from Tests"; - my $sth = $dbh->prepare($query) || die "Can't prepare statement: $DBI::errstr"; - my $rc = $sth->execute or die DBI->errstr; - while (($n) = $sth->fetchrow_array) - { - push @tests, ($n); -# print "$n\n"; - } - -# print join "
    ", @names; - - print $q->startform(); - print $q->scrolling_list(-name=>"test", -values=>\@tests, -multiple=>'true'); - print "

    "; - print $q->scrolling_list(-name=>"name", -values=>\@names, -multiple=>'true'); - print "

    "; - print $q->submit(); - print $q->hidden("pwd", $q->param('pwd')); - print $q->endform(); - - # disconnect from database - $dbh->disconnect; - - #now generate the urls to the chart - if ($q->param('test') && $q->param('name')) - { - my @names = $q->param('name'); - my @tests = $q->param('test'); - print "

    "; - print join "
    ", @names; - print "

    "; - print join "
    ", @tests; - print "

    "; - $str = "pwd=" . $q->param('pwd'); - $count = 0; - foreach $n (@names) - { - foreach $t (@tests) - { - $str = "$str&t$count=$t&n$count=$n"; - $count++; - } - } - print ""; - } - } - -print $q->end_html(); From edwintorok at gmail.com Thu Nov 3 16:21:16 2011 From: edwintorok at gmail.com (=?ISO-8859-1?Q?T=F6r=F6k_Edwin?=) Date: Thu, 03 Nov 2011 23:21:16 +0200 Subject: [llvm-commits] [llvm] r141286 - in /llvm/trunk: bindings/ocaml/llvm/llvm.ml bindings/ocaml/llvm/llvm.mli bindings/ocaml/llvm/llvm_ocaml.c include/llvm-c/Core.h lib/VMCore/Core.cpp In-Reply-To: <4EB19FA3.1020006@grosser.es> References: <20111006121312.0C2B02A6C12C@llvm.org> <4EB19FA3.1020006@grosser.es> Message-ID: <4EB305CC.8030204@gmail.com> On 11/02/2011 09:53 PM, Tobias Grosser wrote: > On 10/06/2011 01:13 PM, Torok Edwin wrote: >> Author: edwin >> Date: Thu Oct 6 07:13:11 2011 >> New Revision: 141286 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=141286&view=rev >> Log: >> ocaml/C bindings: getmdstring, add num_op, get_op should work on metadata too >> >> ============================================================================== >> --- llvm/trunk/include/llvm-c/Core.h (original) >> +++ llvm/trunk/include/llvm-c/Core.h Thu Oct 6 07:13:11 2011 >> @@ -550,6 +550,11 @@ >> LLVMValueRef LLVMMDNodeInContext(LLVMContextRef C, LLVMValueRef *Vals, >> unsigned Count); >> LLVMValueRef LLVMMDNode(LLVMValueRef *Vals, unsigned Count); >> +const char *LLVMGetMDString(LLVMValueRef V, unsigned* Len); >> +int LLVMGetMDNodeNumOperands(LLVMValueRef V); >> +LLVMValueRef *LLVMGetMDNodeOperand(LLVMValueRef V, unsigned i); > > Hi, > > I just realized that you never introduced an implementation for the > last two function declarations. Did you forget about them or are you planning to use them soon. In case you do not, what about removing them > from the header file? It was part of the original patches that I sent to llvm-commits, but it seems they got lost somehow when I updated my patches to latest trunk before committing. Will have a look at what else might be missing and fix it. Thanks for spotting this! --Edwin From dmalyshev at accesssoftek.com Thu Nov 3 16:51:24 2011 From: dmalyshev at accesssoftek.com (Danil Malyshev) Date: Thu, 3 Nov 2011 14:51:24 -0700 Subject: [llvm-commits] ExecutionEngine move Intercept.cpp Message-ID: <6AE1604EE3EC5F4296C096518C6B77EE1805B07347@mail.accesssoftek.com> Hello everyone, Please find attached the patch for review. We have 2 similar implementations of getPointerToNamedFunction in MCJIT/Intercept.cpp and in JIT/Intercept.cpp. I have re-factored this to move it to the ExecutionEngine so both MCJIT and JIT could use a single implementation. Besides, ExecutionEngine looks like a right place for this method. Regards, Danil -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111103/c3861c0a/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: ExecutionEngine_move_Intercept-01.patch Type: application/octet-stream Size: 26225 bytes Desc: ExecutionEngine_move_Intercept-01.patch Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111103/c3861c0a/attachment.obj From gohman at apple.com Thu Nov 3 16:49:52 2011 From: gohman at apple.com (Dan Gohman) Date: Thu, 03 Nov 2011 21:49:52 -0000 Subject: [llvm-commits] [llvm] r143660 - in /llvm/trunk: lib/CodeGen/SelectionDAG/ lib/Target/ARM/ lib/Target/X86/ lib/Target/XCore/ test/CodeGen/CellSPU/ test/CodeGen/Mips/ test/CodeGen/Thumb/ test/CodeGen/X86/ Message-ID: <20111103214953.AD2F62A6C12C@llvm.org> Author: djg Date: Thu Nov 3 16:49:52 2011 New Revision: 143660 URL: http://llvm.org/viewvc/llvm-project?rev=143660&view=rev Log: Reapply r143206, with fixes. Disallow physical register lifetimes across calls, and only check for nested dependences on the special call-sequence-resource register. Added: llvm/trunk/test/CodeGen/X86/legalize-libcalls.ll - copied, changed from r143261, llvm/trunk/test/CodeGen/X86/legalize-libcalls.ll Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp llvm/trunk/lib/Target/X86/X86ISelLowering.cpp llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp llvm/trunk/test/CodeGen/CellSPU/and_ops.ll llvm/trunk/test/CodeGen/CellSPU/call_indirect.ll llvm/trunk/test/CodeGen/CellSPU/nand.ll llvm/trunk/test/CodeGen/CellSPU/or_ops.ll llvm/trunk/test/CodeGen/CellSPU/select_bits.ll llvm/trunk/test/CodeGen/CellSPU/struct_1.ll llvm/trunk/test/CodeGen/Mips/cprestore.ll llvm/trunk/test/CodeGen/Mips/largeimmprinting.ll llvm/trunk/test/CodeGen/Thumb/2011-05-11-DAGLegalizer.ll llvm/trunk/test/CodeGen/X86/sse3.ll Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=143660&r1=143659&r2=143660&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Thu Nov 3 16:49:52 2011 @@ -46,37 +46,18 @@ /// will attempt merge setcc and brc instructions into brcc's. /// namespace { -class SelectionDAGLegalize { +class SelectionDAGLegalize : public SelectionDAG::DAGUpdateListener { const TargetMachine &TM; const TargetLowering &TLI; SelectionDAG &DAG; - // Libcall insertion helpers. + /// LegalizePosition - The iterator for walking through the node list. + SelectionDAG::allnodes_iterator LegalizePosition; - /// LastCALLSEQ_END - This keeps track of the CALLSEQ_END node that has been - /// legalized. We use this to ensure that calls are properly serialized - /// against each other, including inserted libcalls. - SDValue LastCALLSEQ_END; - - /// IsLegalizingCall - This member is used *only* for purposes of providing - /// helpful assertions that a libcall isn't created while another call is - /// being legalized (which could lead to non-serialized call sequences). - bool IsLegalizingCall; - - /// LegalizedNodes - For nodes that are of legal width, and that have more - /// than one use, this map indicates what regularized operand to use. This - /// allows us to avoid legalizing the same thing more than once. - DenseMap LegalizedNodes; - - void AddLegalizedOperand(SDValue From, SDValue To) { - LegalizedNodes.insert(std::make_pair(From, To)); - // If someone requests legalization of the new node, return itself. - if (From != To) - LegalizedNodes.insert(std::make_pair(To, To)); + /// LegalizedNodes - The set of nodes which have already been legalized. + SmallPtrSet LegalizedNodes; - // Transfer SDDbgValues. - DAG.TransferDbgValues(From, To); - } + // Libcall insertion helpers. public: explicit SelectionDAGLegalize(SelectionDAG &DAG); @@ -84,9 +65,8 @@ void LegalizeDAG(); private: - /// LegalizeOp - Return a legal replacement for the given operation, with - /// all legal operands. - SDValue LegalizeOp(SDValue O); + /// LegalizeOp - Legalizes the given operation. + void LegalizeOp(SDNode *Node); SDValue OptimizeFloatStore(StoreSDNode *ST); @@ -107,9 +87,6 @@ SDValue N1, SDValue N2, SmallVectorImpl &Mask) const; - bool LegalizeAllNodesNotLeadingTo(SDNode *N, SDNode *Dest, - SmallPtrSet &NodesLeadingTo); - void LegalizeSetCCCondCode(EVT VT, SDValue &LHS, SDValue &RHS, SDValue &CC, DebugLoc dl); @@ -150,10 +127,21 @@ SDValue ExpandInsertToVectorThroughStack(SDValue Op); SDValue ExpandVectorBuildThroughStack(SDNode* Node); + SDValue ExpandConstantFP(ConstantFPSDNode *CFP, bool UseCP); + std::pair ExpandAtomic(SDNode *Node); - void ExpandNode(SDNode *Node, SmallVectorImpl &Results); - void PromoteNode(SDNode *Node, SmallVectorImpl &Results); + void ExpandNode(SDNode *Node); + void PromoteNode(SDNode *Node); + + // DAGUpdateListener implementation. + virtual void NodeDeleted(SDNode *N, SDNode *E) { + LegalizedNodes.erase(N); + if (LegalizePosition == SelectionDAG::allnodes_iterator(N)) + ++LegalizePosition; + } + + virtual void NodeUpdated(SDNode *N) {} }; } @@ -195,145 +183,37 @@ } void SelectionDAGLegalize::LegalizeDAG() { - LastCALLSEQ_END = DAG.getEntryNode(); - IsLegalizingCall = false; - - // The legalize process is inherently a bottom-up recursive process (users - // legalize their uses before themselves). Given infinite stack space, we - // could just start legalizing on the root and traverse the whole graph. In - // practice however, this causes us to run out of stack space on large basic - // blocks. To avoid this problem, compute an ordering of the nodes where each - // node is only legalized after all of its operands are legalized. DAG.AssignTopologicalOrder(); - for (SelectionDAG::allnodes_iterator I = DAG.allnodes_begin(), - E = prior(DAG.allnodes_end()); I != llvm::next(E); ++I) - LegalizeOp(SDValue(I, 0)); - - // Finally, it's possible the root changed. Get the new root. - SDValue OldRoot = DAG.getRoot(); - assert(LegalizedNodes.count(OldRoot) && "Root didn't get legalized?"); - DAG.setRoot(LegalizedNodes[OldRoot]); - - LegalizedNodes.clear(); - - // Remove dead nodes now. - DAG.RemoveDeadNodes(); -} - - -/// FindCallEndFromCallStart - Given a chained node that is part of a call -/// sequence, find the CALLSEQ_END node that terminates the call sequence. -static SDNode *FindCallEndFromCallStart(SDNode *Node, int depth = 0) { - // Nested CALLSEQ_START/END constructs aren't yet legal, - // but we can DTRT and handle them correctly here. - if (Node->getOpcode() == ISD::CALLSEQ_START) - depth++; - else if (Node->getOpcode() == ISD::CALLSEQ_END) { - depth--; - if (depth == 0) - return Node; - } - if (Node->use_empty()) - return 0; // No CallSeqEnd - - // The chain is usually at the end. - SDValue TheChain(Node, Node->getNumValues()-1); - if (TheChain.getValueType() != MVT::Other) { - // Sometimes it's at the beginning. - TheChain = SDValue(Node, 0); - if (TheChain.getValueType() != MVT::Other) { - // Otherwise, hunt for it. - for (unsigned i = 1, e = Node->getNumValues(); i != e; ++i) - if (Node->getValueType(i) == MVT::Other) { - TheChain = SDValue(Node, i); - break; - } - // Otherwise, we walked into a node without a chain. - if (TheChain.getValueType() != MVT::Other) - return 0; + // Visit all the nodes. We start in topological order, so that we see + // nodes with their original operands intact. Legalization can produce + // new nodes which may themselves need to be legalized. Iterate until all + // nodes have been legalized. + for (;;) { + bool AnyLegalized = false; + for (LegalizePosition = DAG.allnodes_end(); + LegalizePosition != DAG.allnodes_begin(); ) { + --LegalizePosition; + + SDNode *N = LegalizePosition; + if (LegalizedNodes.insert(N)) { + AnyLegalized = true; + LegalizeOp(N); + } } - } - - for (SDNode::use_iterator UI = Node->use_begin(), - E = Node->use_end(); UI != E; ++UI) { - - // Make sure to only follow users of our token chain. - SDNode *User = *UI; - for (unsigned i = 0, e = User->getNumOperands(); i != e; ++i) - if (User->getOperand(i) == TheChain) - if (SDNode *Result = FindCallEndFromCallStart(User, depth)) - return Result; - } - return 0; -} - -/// FindCallStartFromCallEnd - Given a chained node that is part of a call -/// sequence, find the CALLSEQ_START node that initiates the call sequence. -static SDNode *FindCallStartFromCallEnd(SDNode *Node) { - int nested = 0; - assert(Node && "Didn't find callseq_start for a call??"); - while (Node->getOpcode() != ISD::CALLSEQ_START || nested) { - Node = Node->getOperand(0).getNode(); - assert(Node->getOperand(0).getValueType() == MVT::Other && - "Node doesn't have a token chain argument!"); - switch (Node->getOpcode()) { - default: - break; - case ISD::CALLSEQ_START: - if (!nested) - return Node; - nested--; - break; - case ISD::CALLSEQ_END: - nested++; + if (!AnyLegalized) break; - } - } - return 0; -} -/// LegalizeAllNodesNotLeadingTo - Recursively walk the uses of N, looking to -/// see if any uses can reach Dest. If no dest operands can get to dest, -/// legalize them, legalize ourself, and return false, otherwise, return true. -/// -/// Keep track of the nodes we fine that actually do lead to Dest in -/// NodesLeadingTo. This avoids retraversing them exponential number of times. -/// -bool SelectionDAGLegalize::LegalizeAllNodesNotLeadingTo(SDNode *N, SDNode *Dest, - SmallPtrSet &NodesLeadingTo) { - if (N == Dest) return true; // N certainly leads to Dest :) - - // If we've already processed this node and it does lead to Dest, there is no - // need to reprocess it. - if (NodesLeadingTo.count(N)) return true; - - // If the first result of this node has been already legalized, then it cannot - // reach N. - if (LegalizedNodes.count(SDValue(N, 0))) return false; - - // Okay, this node has not already been legalized. Check and legalize all - // operands. If none lead to Dest, then we can legalize this node. - bool OperandsLeadToDest = false; - for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) - OperandsLeadToDest |= // If an operand leads to Dest, so do we. - LegalizeAllNodesNotLeadingTo(N->getOperand(i).getNode(), Dest, - NodesLeadingTo); - - if (OperandsLeadToDest) { - NodesLeadingTo.insert(N); - return true; } - // Okay, this node looks safe, legalize it and return false. - LegalizeOp(SDValue(N, 0)); - return false; + // Remove dead nodes now. + DAG.RemoveDeadNodes(); } /// ExpandConstantFP - Expands the ConstantFP node to an integer constant or /// a load from the constant pool. -static SDValue ExpandConstantFP(ConstantFPSDNode *CFP, bool UseCP, - SelectionDAG &DAG, const TargetLowering &TLI) { +SDValue +SelectionDAGLegalize::ExpandConstantFP(ConstantFPSDNode *CFP, bool UseCP) { bool Extend = false; DebugLoc dl = CFP->getDebugLoc(); @@ -369,20 +249,25 @@ SDValue CPIdx = DAG.getConstantPool(LLVMC, TLI.getPointerTy()); unsigned Alignment = cast(CPIdx)->getAlignment(); - if (Extend) - return DAG.getExtLoad(ISD::EXTLOAD, dl, OrigVT, - DAG.getEntryNode(), - CPIdx, MachinePointerInfo::getConstantPool(), - VT, false, false, Alignment); - return DAG.getLoad(OrigVT, dl, DAG.getEntryNode(), CPIdx, - MachinePointerInfo::getConstantPool(), false, false, - Alignment); + if (Extend) { + SDValue Result = + DAG.getExtLoad(ISD::EXTLOAD, dl, OrigVT, + DAG.getEntryNode(), + CPIdx, MachinePointerInfo::getConstantPool(), + VT, false, false, Alignment); + return Result; + } + SDValue Result = + DAG.getLoad(OrigVT, dl, DAG.getEntryNode(), CPIdx, + MachinePointerInfo::getConstantPool(), false, false, + Alignment); + return Result; } /// ExpandUnalignedStore - Expands an unaligned store to 2 half-size stores. -static -SDValue ExpandUnalignedStore(StoreSDNode *ST, SelectionDAG &DAG, - const TargetLowering &TLI) { +static void ExpandUnalignedStore(StoreSDNode *ST, SelectionDAG &DAG, + const TargetLowering &TLI, + SelectionDAG::DAGUpdateListener *DUL) { SDValue Chain = ST->getChain(); SDValue Ptr = ST->getBasePtr(); SDValue Val = ST->getValue(); @@ -397,8 +282,10 @@ // same size, then a (misaligned) int store. // FIXME: Does not handle truncating floating point stores! SDValue Result = DAG.getNode(ISD::BITCAST, dl, intVT, Val); - return DAG.getStore(Chain, dl, Result, Ptr, ST->getPointerInfo(), - ST->isVolatile(), ST->isNonTemporal(), Alignment); + Result = DAG.getStore(Chain, dl, Result, Ptr, ST->getPointerInfo(), + ST->isVolatile(), ST->isNonTemporal(), Alignment); + DAG.ReplaceAllUsesWith(SDValue(ST, 0), Result, DUL); + return; } // Do a (aligned) store to a stack slot, then copy from the stack slot // to the final destination using (unaligned) integer loads and stores. @@ -458,8 +345,11 @@ ST->isNonTemporal(), MinAlign(ST->getAlignment(), Offset))); // The order of the stores doesn't matter - say it with a TokenFactor. - return DAG.getNode(ISD::TokenFactor, dl, MVT::Other, &Stores[0], - Stores.size()); + SDValue Result = + DAG.getNode(ISD::TokenFactor, dl, MVT::Other, &Stores[0], + Stores.size()); + DAG.ReplaceAllUsesWith(SDValue(ST, 0), Result, DUL); + return; } assert(ST->getMemoryVT().isInteger() && !ST->getMemoryVT().isVector() && @@ -488,13 +378,16 @@ NewStoredVT, ST->isVolatile(), ST->isNonTemporal(), Alignment); - return DAG.getNode(ISD::TokenFactor, dl, MVT::Other, Store1, Store2); + SDValue Result = + DAG.getNode(ISD::TokenFactor, dl, MVT::Other, Store1, Store2); + DAG.ReplaceAllUsesWith(SDValue(ST, 0), Result, DUL); } /// ExpandUnalignedLoad - Expands an unaligned load to 2 half-size loads. -static -SDValue ExpandUnalignedLoad(LoadSDNode *LD, SelectionDAG &DAG, - const TargetLowering &TLI) { +static void +ExpandUnalignedLoad(LoadSDNode *LD, SelectionDAG &DAG, + const TargetLowering &TLI, + SDValue &ValResult, SDValue &ChainResult) { SDValue Chain = LD->getChain(); SDValue Ptr = LD->getBasePtr(); EVT VT = LD->getValueType(0); @@ -512,8 +405,9 @@ if (VT.isFloatingPoint() && LoadedVT != VT) Result = DAG.getNode(ISD::FP_EXTEND, dl, VT, Result); - SDValue Ops[] = { Result, Chain }; - return DAG.getMergeValues(Ops, 2, dl); + ValResult = Result; + ChainResult = Chain; + return; } // Copy the value to a (aligned) stack slot using (unaligned) integer @@ -572,8 +466,9 @@ MachinePointerInfo(), LoadedVT, false, false, 0); // Callers expect a MERGE_VALUES node. - SDValue Ops[] = { Load, TF }; - return DAG.getMergeValues(Ops, 2, dl); + ValResult = Load; + ChainResult = TF; + return; } assert(LoadedVT.isInteger() && !LoadedVT.isVector() && "Unaligned load of unsupported type."); @@ -626,8 +521,8 @@ SDValue TF = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, Lo.getValue(1), Hi.getValue(1)); - SDValue Ops[] = { Result, TF }; - return DAG.getMergeValues(Ops, 2, dl); + ValResult = Result; + ChainResult = TF; } /// PerformInsertVectorEltInMemory - Some target cannot handle a variable @@ -763,11 +658,10 @@ /// LegalizeOp - Return a legal replacement for the given operation, with /// all legal operands. -SDValue SelectionDAGLegalize::LegalizeOp(SDValue Op) { - if (Op.getOpcode() == ISD::TargetConstant) // Allow illegal target nodes. - return Op; +void SelectionDAGLegalize::LegalizeOp(SDNode *Node) { + if (Node->getOpcode() == ISD::TargetConstant) // Allow illegal target nodes. + return; - SDNode *Node = Op.getNode(); DebugLoc dl = Node->getDebugLoc(); for (unsigned i = 0, e = Node->getNumValues(); i != e; ++i) @@ -782,13 +676,7 @@ Node->getOperand(i).getOpcode() == ISD::TargetConstant) && "Unexpected illegal type!"); - // Note that LegalizeOp may be reentered even from single-use nodes, which - // means that we always must cache transformed nodes. - DenseMap::iterator I = LegalizedNodes.find(Op); - if (I != LegalizedNodes.end()) return I->second; - SDValue Tmp1, Tmp2, Tmp3, Tmp4; - SDValue Result = Op; bool isCustom = false; // Figure out the correct action; the way to query this varies by opcode @@ -882,17 +770,6 @@ if (Action == TargetLowering::Legal) Action = TargetLowering::Custom; break; - case ISD::BUILD_VECTOR: - // A weird case: legalization for BUILD_VECTOR never legalizes the - // operands! - // FIXME: This really sucks... changing it isn't semantically incorrect, - // but it massively pessimizes the code for floating-point BUILD_VECTORs - // because ConstantFP operands get legalized into constant pool loads - // before the BUILD_VECTOR code can see them. It doesn't usually bite, - // though, because BUILD_VECTORS usually get lowered into other nodes - // which get legalized properly. - SimpleFinishLegalizing = false; - break; default: if (Node->getOpcode() >= ISD::BUILTIN_OP_END) { Action = TargetLowering::Legal; @@ -903,22 +780,11 @@ } if (SimpleFinishLegalizing) { - SmallVector Ops, ResultVals; + SmallVector Ops; for (unsigned i = 0, e = Node->getNumOperands(); i != e; ++i) - Ops.push_back(LegalizeOp(Node->getOperand(i))); + Ops.push_back(Node->getOperand(i)); switch (Node->getOpcode()) { default: break; - case ISD::BR: - case ISD::BRIND: - case ISD::BR_JT: - case ISD::BR_CC: - case ISD::BRCOND: - // Branches tweak the chain to include LastCALLSEQ_END - Ops[0] = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, Ops[0], - LastCALLSEQ_END); - Ops[0] = LegalizeOp(Ops[0]); - LastCALLSEQ_END = DAG.getEntryNode(); - break; case ISD::SHL: case ISD::SRL: case ISD::SRA: @@ -926,57 +792,66 @@ case ISD::ROTR: // Legalizing shifts/rotates requires adjusting the shift amount // to the appropriate width. - if (!Ops[1].getValueType().isVector()) - Ops[1] = LegalizeOp(DAG.getShiftAmountOperand(Ops[0].getValueType(), - Ops[1])); + if (!Ops[1].getValueType().isVector()) { + SDValue SAO = DAG.getShiftAmountOperand(Ops[0].getValueType(), Ops[1]); + HandleSDNode Handle(SAO); + LegalizeOp(SAO.getNode()); + Ops[1] = Handle.getValue(); + } break; case ISD::SRL_PARTS: case ISD::SRA_PARTS: case ISD::SHL_PARTS: // Legalizing shifts/rotates requires adjusting the shift amount // to the appropriate width. - if (!Ops[2].getValueType().isVector()) - Ops[2] = LegalizeOp(DAG.getShiftAmountOperand(Ops[0].getValueType(), - Ops[2])); + if (!Ops[2].getValueType().isVector()) { + SDValue SAO = DAG.getShiftAmountOperand(Ops[0].getValueType(), Ops[2]); + HandleSDNode Handle(SAO); + LegalizeOp(SAO.getNode()); + Ops[2] = Handle.getValue(); + } break; } - Result = SDValue(DAG.UpdateNodeOperands(Result.getNode(), Ops.data(), - Ops.size()), 0); + SDNode *NewNode = DAG.UpdateNodeOperands(Node, Ops.data(), Ops.size()); + if (NewNode != Node) { + DAG.ReplaceAllUsesWith(Node, NewNode, this); + for (unsigned i = 0, e = Node->getNumValues(); i != e; ++i) + DAG.TransferDbgValues(SDValue(Node, i), SDValue(NewNode, i)); + DAG.RemoveDeadNode(Node, this); + Node = NewNode; + } switch (Action) { case TargetLowering::Legal: - for (unsigned i = 0, e = Node->getNumValues(); i != e; ++i) - ResultVals.push_back(Result.getValue(i)); - break; + return; case TargetLowering::Custom: // FIXME: The handling for custom lowering with multiple results is // a complete mess. - Tmp1 = TLI.LowerOperation(Result, DAG); + Tmp1 = TLI.LowerOperation(SDValue(Node, 0), DAG); if (Tmp1.getNode()) { + SmallVector ResultVals; for (unsigned i = 0, e = Node->getNumValues(); i != e; ++i) { if (e == 1) ResultVals.push_back(Tmp1); else ResultVals.push_back(Tmp1.getValue(i)); } - break; + if (Tmp1.getNode() != Node || Tmp1.getResNo() != 0) { + DAG.ReplaceAllUsesWith(Node, ResultVals.data(), this); + for (unsigned i = 0, e = Node->getNumValues(); i != e; ++i) + DAG.TransferDbgValues(SDValue(Node, i), ResultVals[i]); + DAG.RemoveDeadNode(Node, this); + } + return; } // FALL THROUGH case TargetLowering::Expand: - ExpandNode(Result.getNode(), ResultVals); - break; + ExpandNode(Node); + return; case TargetLowering::Promote: - PromoteNode(Result.getNode(), ResultVals); - break; - } - if (!ResultVals.empty()) { - for (unsigned i = 0, e = ResultVals.size(); i != e; ++i) { - if (ResultVals[i] != SDValue(Node, i)) - ResultVals[i] = LegalizeOp(ResultVals[i]); - AddLegalizedOperand(SDValue(Node, i), ResultVals[i]); - } - return ResultVals[Op.getResNo()]; + PromoteNode(Node); + return; } } @@ -989,155 +864,20 @@ #endif assert(0 && "Do not know how to legalize this operator!"); - case ISD::SRA: - case ISD::SRL: - case ISD::SHL: { - // Scalarize vector SRA/SRL/SHL. - EVT VT = Node->getValueType(0); - assert(VT.isVector() && "Unable to legalize non-vector shift"); - assert(TLI.isTypeLegal(VT.getScalarType())&& "Element type must be legal"); - unsigned NumElem = VT.getVectorNumElements(); - - SmallVector Scalars; - for (unsigned Idx = 0; Idx < NumElem; Idx++) { - SDValue Ex = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, dl, - VT.getScalarType(), - Node->getOperand(0), DAG.getIntPtrConstant(Idx)); - SDValue Sh = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, dl, - VT.getScalarType(), - Node->getOperand(1), DAG.getIntPtrConstant(Idx)); - Scalars.push_back(DAG.getNode(Node->getOpcode(), dl, - VT.getScalarType(), Ex, Sh)); - } - Result = DAG.getNode(ISD::BUILD_VECTOR, dl, Node->getValueType(0), - &Scalars[0], Scalars.size()); - break; - } - - case ISD::BUILD_VECTOR: - switch (TLI.getOperationAction(ISD::BUILD_VECTOR, Node->getValueType(0))) { - default: assert(0 && "This action is not supported yet!"); - case TargetLowering::Custom: - Tmp3 = TLI.LowerOperation(Result, DAG); - if (Tmp3.getNode()) { - Result = Tmp3; - break; - } - // FALLTHROUGH - case TargetLowering::Expand: - Result = ExpandBUILD_VECTOR(Result.getNode()); - break; - } - break; - case ISD::CALLSEQ_START: { - SDNode *CallEnd = FindCallEndFromCallStart(Node); - - // Recursively Legalize all of the inputs of the call end that do not lead - // to this call start. This ensures that any libcalls that need be inserted - // are inserted *before* the CALLSEQ_START. - {SmallPtrSet NodesLeadingTo; - for (unsigned i = 0, e = CallEnd->getNumOperands(); i != e; ++i) - LegalizeAllNodesNotLeadingTo(CallEnd->getOperand(i).getNode(), Node, - NodesLeadingTo); - } - - // Now that we have legalized all of the inputs (which may have inserted - // libcalls), create the new CALLSEQ_START node. - Tmp1 = LegalizeOp(Node->getOperand(0)); // Legalize the chain. - - // Merge in the last call to ensure that this call starts after the last - // call ended. - if (LastCALLSEQ_END.getOpcode() != ISD::EntryToken) { - Tmp1 = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, - Tmp1, LastCALLSEQ_END); - Tmp1 = LegalizeOp(Tmp1); - } - - // Do not try to legalize the target-specific arguments (#1+). - if (Tmp1 != Node->getOperand(0)) { - SmallVector Ops(Node->op_begin(), Node->op_end()); - Ops[0] = Tmp1; - Result = SDValue(DAG.UpdateNodeOperands(Result.getNode(), &Ops[0], - Ops.size()), Result.getResNo()); - } - - // Remember that the CALLSEQ_START is legalized. - AddLegalizedOperand(Op.getValue(0), Result); - if (Node->getNumValues() == 2) // If this has a flag result, remember it. - AddLegalizedOperand(Op.getValue(1), Result.getValue(1)); - - // Now that the callseq_start and all of the non-call nodes above this call - // sequence have been legalized, legalize the call itself. During this - // process, no libcalls can/will be inserted, guaranteeing that no calls - // can overlap. - assert(!IsLegalizingCall && "Inconsistent sequentialization of calls!"); - // Note that we are selecting this call! - LastCALLSEQ_END = SDValue(CallEnd, 0); - IsLegalizingCall = true; - - // Legalize the call, starting from the CALLSEQ_END. - LegalizeOp(LastCALLSEQ_END); - assert(!IsLegalizingCall && "CALLSEQ_END should have cleared this!"); - return Result; - } + case ISD::CALLSEQ_START: case ISD::CALLSEQ_END: - // If the CALLSEQ_START node hasn't been legalized first, legalize it. This - // will cause this node to be legalized as well as handling libcalls right. - if (LastCALLSEQ_END.getNode() != Node) { - LegalizeOp(SDValue(FindCallStartFromCallEnd(Node), 0)); - DenseMap::iterator I = LegalizedNodes.find(Op); - assert(I != LegalizedNodes.end() && - "Legalizing the call start should have legalized this node!"); - return I->second; - } - - // Otherwise, the call start has been legalized and everything is going - // according to plan. Just legalize ourselves normally here. - Tmp1 = LegalizeOp(Node->getOperand(0)); // Legalize the chain. - // Do not try to legalize the target-specific arguments (#1+), except for - // an optional flag input. - if (Node->getOperand(Node->getNumOperands()-1).getValueType() != MVT::Glue){ - if (Tmp1 != Node->getOperand(0)) { - SmallVector Ops(Node->op_begin(), Node->op_end()); - Ops[0] = Tmp1; - Result = SDValue(DAG.UpdateNodeOperands(Result.getNode(), - &Ops[0], Ops.size()), - Result.getResNo()); - } - } else { - Tmp2 = LegalizeOp(Node->getOperand(Node->getNumOperands()-1)); - if (Tmp1 != Node->getOperand(0) || - Tmp2 != Node->getOperand(Node->getNumOperands()-1)) { - SmallVector Ops(Node->op_begin(), Node->op_end()); - Ops[0] = Tmp1; - Ops.back() = Tmp2; - Result = SDValue(DAG.UpdateNodeOperands(Result.getNode(), - &Ops[0], Ops.size()), - Result.getResNo()); - } - } - assert(IsLegalizingCall && "Call sequence imbalance between start/end?"); - // This finishes up call legalization. - IsLegalizingCall = false; - - // If the CALLSEQ_END node has a flag, remember that we legalized it. - AddLegalizedOperand(SDValue(Node, 0), Result.getValue(0)); - if (Node->getNumValues() == 2) - AddLegalizedOperand(SDValue(Node, 1), Result.getValue(1)); - return Result.getValue(Op.getResNo()); + break; case ISD::LOAD: { LoadSDNode *LD = cast(Node); - Tmp1 = LegalizeOp(LD->getChain()); // Legalize the chain. - Tmp2 = LegalizeOp(LD->getBasePtr()); // Legalize the base pointer. + Tmp1 = LD->getChain(); // Legalize the chain. + Tmp2 = LD->getBasePtr(); // Legalize the base pointer. ISD::LoadExtType ExtType = LD->getExtensionType(); if (ExtType == ISD::NON_EXTLOAD) { EVT VT = Node->getValueType(0); - Result = SDValue(DAG.UpdateNodeOperands(Result.getNode(), - Tmp1, Tmp2, LD->getOffset()), - Result.getResNo()); - Tmp3 = Result.getValue(0); - Tmp4 = Result.getValue(1); + Node = DAG.UpdateNodeOperands(Node, Tmp1, Tmp2, LD->getOffset()); + Tmp3 = SDValue(Node, 0); + Tmp4 = SDValue(Node, 1); switch (TLI.getOperationAction(Node->getOpcode(), VT)) { default: assert(0 && "This action is not supported yet!"); @@ -1148,20 +888,16 @@ Type *Ty = LD->getMemoryVT().getTypeForEVT(*DAG.getContext()); unsigned ABIAlignment = TLI.getTargetData()->getABITypeAlignment(Ty); if (LD->getAlignment() < ABIAlignment){ - Result = ExpandUnalignedLoad(cast(Result.getNode()), - DAG, TLI); - Tmp3 = Result.getOperand(0); - Tmp4 = Result.getOperand(1); - Tmp3 = LegalizeOp(Tmp3); - Tmp4 = LegalizeOp(Tmp4); + ExpandUnalignedLoad(cast(Node), + DAG, TLI, Tmp3, Tmp4); } } break; case TargetLowering::Custom: Tmp1 = TLI.LowerOperation(Tmp3, DAG); if (Tmp1.getNode()) { - Tmp3 = LegalizeOp(Tmp1); - Tmp4 = LegalizeOp(Tmp1.getValue(1)); + Tmp3 = Tmp1; + Tmp4 = Tmp1.getValue(1); } break; case TargetLowering::Promote: { @@ -1173,16 +909,16 @@ Tmp1 = DAG.getLoad(NVT, dl, Tmp1, Tmp2, LD->getPointerInfo(), LD->isVolatile(), LD->isNonTemporal(), LD->getAlignment()); - Tmp3 = LegalizeOp(DAG.getNode(ISD::BITCAST, dl, VT, Tmp1)); - Tmp4 = LegalizeOp(Tmp1.getValue(1)); + Tmp3 = DAG.getNode(ISD::BITCAST, dl, VT, Tmp1); + Tmp4 = Tmp1.getValue(1); break; } } // Since loads produce two values, make sure to remember that we // legalized both of them. - AddLegalizedOperand(SDValue(Node, 0), Tmp3); - AddLegalizedOperand(SDValue(Node, 1), Tmp4); - return Op.getResNo() ? Tmp4 : Tmp3; + DAG.ReplaceAllUsesOfValueWith(SDValue(Node, 0), Tmp3); + DAG.ReplaceAllUsesOfValueWith(SDValue(Node, 1), Tmp4); + return; } EVT SrcVT = LD->getMemoryVT(); @@ -1213,9 +949,10 @@ ISD::LoadExtType NewExtType = ExtType == ISD::ZEXTLOAD ? ISD::ZEXTLOAD : ISD::EXTLOAD; - Result = DAG.getExtLoad(NewExtType, dl, Node->getValueType(0), - Tmp1, Tmp2, LD->getPointerInfo(), - NVT, isVolatile, isNonTemporal, Alignment); + SDValue Result = + DAG.getExtLoad(NewExtType, dl, Node->getValueType(0), + Tmp1, Tmp2, LD->getPointerInfo(), + NVT, isVolatile, isNonTemporal, Alignment); Ch = Result.getValue(1); // The chain. @@ -1230,8 +967,8 @@ Result.getValueType(), Result, DAG.getValueType(SrcVT)); - Tmp1 = LegalizeOp(Result); - Tmp2 = LegalizeOp(Ch); + Tmp1 = Result; + Tmp2 = Ch; } else if (SrcWidth & (SrcWidth - 1)) { // If not loading a power-of-2 number of bits, expand as two loads. assert(!SrcVT.isVector() && "Unsupported extload!"); @@ -1274,7 +1011,7 @@ TLI.getShiftAmountTy(Hi.getValueType()))); // Join the hi and lo parts. - Result = DAG.getNode(ISD::OR, dl, Node->getValueType(0), Lo, Hi); + Tmp1 = DAG.getNode(ISD::OR, dl, Node->getValueType(0), Lo, Hi); } else { // Big endian - avoid unaligned loads. // EXTLOAD:i24 -> (shl EXTLOAD:i16, 8) | ZEXTLOAD at +2:i8 @@ -1304,11 +1041,10 @@ TLI.getShiftAmountTy(Hi.getValueType()))); // Join the hi and lo parts. - Result = DAG.getNode(ISD::OR, dl, Node->getValueType(0), Lo, Hi); + Tmp1 = DAG.getNode(ISD::OR, dl, Node->getValueType(0), Lo, Hi); } - Tmp1 = LegalizeOp(Result); - Tmp2 = LegalizeOp(Ch); + Tmp2 = Ch; } else { switch (TLI.getLoadExtAction(ExtType, SrcVT)) { default: assert(0 && "This action is not supported yet!"); @@ -1316,17 +1052,16 @@ isCustom = true; // FALLTHROUGH case TargetLowering::Legal: - Result = SDValue(DAG.UpdateNodeOperands(Result.getNode(), - Tmp1, Tmp2, LD->getOffset()), - Result.getResNo()); - Tmp1 = Result.getValue(0); - Tmp2 = Result.getValue(1); + Node = DAG.UpdateNodeOperands(Node, + Tmp1, Tmp2, LD->getOffset()); + Tmp1 = SDValue(Node, 0); + Tmp2 = SDValue(Node, 1); if (isCustom) { - Tmp3 = TLI.LowerOperation(Result, DAG); + Tmp3 = TLI.LowerOperation(SDValue(Node, 0), DAG); if (Tmp3.getNode()) { - Tmp1 = LegalizeOp(Tmp3); - Tmp2 = LegalizeOp(Tmp3.getValue(1)); + Tmp1 = Tmp3; + Tmp2 = Tmp3.getValue(1); } } else { // If this is an unaligned load and the target doesn't support it, @@ -1337,12 +1072,8 @@ unsigned ABIAlignment = TLI.getTargetData()->getABITypeAlignment(Ty); if (LD->getAlignment() < ABIAlignment){ - Result = ExpandUnalignedLoad(cast(Result.getNode()), - DAG, TLI); - Tmp1 = Result.getOperand(0); - Tmp2 = Result.getOperand(1); - Tmp1 = LegalizeOp(Tmp1); - Tmp2 = LegalizeOp(Tmp2); + ExpandUnalignedLoad(cast(Node), + DAG, TLI, Tmp1, Tmp2); } } } @@ -1363,9 +1094,8 @@ case ISD::ZEXTLOAD: ExtendOp = ISD::ZERO_EXTEND; break; default: llvm_unreachable("Unexpected extend load type!"); } - Result = DAG.getNode(ExtendOp, dl, Node->getValueType(0), Load); - Tmp1 = LegalizeOp(Result); // Relegalize new nodes. - Tmp2 = LegalizeOp(Load.getValue(1)); + Tmp1 = DAG.getNode(ExtendOp, dl, Node->getValueType(0), Load); + Tmp2 = Load.getValue(1); break; } @@ -1380,10 +1110,10 @@ "EXTLOAD should always be supported!"); // Turn the unsupported load into an EXTLOAD followed by an explicit // zero/sign extend inreg. - Result = DAG.getExtLoad(ISD::EXTLOAD, dl, Node->getValueType(0), - Tmp1, Tmp2, LD->getPointerInfo(), SrcVT, - LD->isVolatile(), LD->isNonTemporal(), - LD->getAlignment()); + SDValue Result = DAG.getExtLoad(ISD::EXTLOAD, dl, Node->getValueType(0), + Tmp1, Tmp2, LD->getPointerInfo(), SrcVT, + LD->isVolatile(), LD->isNonTemporal(), + LD->getAlignment()); SDValue ValRes; if (ExtType == ISD::SEXTLOAD) ValRes = DAG.getNode(ISD::SIGN_EXTEND_INREG, dl, @@ -1391,38 +1121,37 @@ Result, DAG.getValueType(SrcVT)); else ValRes = DAG.getZeroExtendInReg(Result, dl, SrcVT.getScalarType()); - Tmp1 = LegalizeOp(ValRes); // Relegalize new nodes. - Tmp2 = LegalizeOp(Result.getValue(1)); // Relegalize new nodes. + Tmp1 = ValRes; + Tmp2 = Result.getValue(1); break; } } // Since loads produce two values, make sure to remember that we legalized // both of them. - AddLegalizedOperand(SDValue(Node, 0), Tmp1); - AddLegalizedOperand(SDValue(Node, 1), Tmp2); - return Op.getResNo() ? Tmp2 : Tmp1; + DAG.ReplaceAllUsesOfValueWith(SDValue(Node, 0), Tmp1); + DAG.ReplaceAllUsesOfValueWith(SDValue(Node, 1), Tmp2); + break; } case ISD::STORE: { StoreSDNode *ST = cast(Node); - Tmp1 = LegalizeOp(ST->getChain()); // Legalize the chain. - Tmp2 = LegalizeOp(ST->getBasePtr()); // Legalize the pointer. + Tmp1 = ST->getChain(); + Tmp2 = ST->getBasePtr(); unsigned Alignment = ST->getAlignment(); bool isVolatile = ST->isVolatile(); bool isNonTemporal = ST->isNonTemporal(); if (!ST->isTruncatingStore()) { if (SDNode *OptStore = OptimizeFloatStore(ST).getNode()) { - Result = SDValue(OptStore, 0); + DAG.ReplaceAllUsesWith(ST, OptStore, this); break; } { - Tmp3 = LegalizeOp(ST->getValue()); - Result = SDValue(DAG.UpdateNodeOperands(Result.getNode(), - Tmp1, Tmp3, Tmp2, - ST->getOffset()), - Result.getResNo()); + Tmp3 = ST->getValue(); + Node = DAG.UpdateNodeOperands(Node, + Tmp1, Tmp3, Tmp2, + ST->getOffset()); EVT VT = Tmp3.getValueType(); switch (TLI.getOperationAction(ISD::STORE, VT)) { @@ -1434,27 +1163,31 @@ Type *Ty = ST->getMemoryVT().getTypeForEVT(*DAG.getContext()); unsigned ABIAlignment= TLI.getTargetData()->getABITypeAlignment(Ty); if (ST->getAlignment() < ABIAlignment) - Result = ExpandUnalignedStore(cast(Result.getNode()), - DAG, TLI); + ExpandUnalignedStore(cast(Node), + DAG, TLI, this); } break; case TargetLowering::Custom: - Tmp1 = TLI.LowerOperation(Result, DAG); - if (Tmp1.getNode()) Result = Tmp1; + Tmp1 = TLI.LowerOperation(SDValue(Node, 0), DAG); + if (Tmp1.getNode()) + DAG.ReplaceAllUsesWith(SDValue(Node, 0), Tmp1, this); break; - case TargetLowering::Promote: + case TargetLowering::Promote: { assert(VT.isVector() && "Unknown legal promote case!"); Tmp3 = DAG.getNode(ISD::BITCAST, dl, TLI.getTypeToPromoteTo(ISD::STORE, VT), Tmp3); - Result = DAG.getStore(Tmp1, dl, Tmp3, Tmp2, - ST->getPointerInfo(), isVolatile, - isNonTemporal, Alignment); + SDValue Result = + DAG.getStore(Tmp1, dl, Tmp3, Tmp2, + ST->getPointerInfo(), isVolatile, + isNonTemporal, Alignment); + DAG.ReplaceAllUsesWith(SDValue(Node, 0), Result, this); break; } + } break; } } else { - Tmp3 = LegalizeOp(ST->getValue()); + Tmp3 = ST->getValue(); EVT StVT = ST->getMemoryVT(); unsigned StWidth = StVT.getSizeInBits(); @@ -1466,8 +1199,10 @@ EVT NVT = EVT::getIntegerVT(*DAG.getContext(), StVT.getStoreSizeInBits()); Tmp3 = DAG.getZeroExtendInReg(Tmp3, dl, StVT); - Result = DAG.getTruncStore(Tmp1, dl, Tmp3, Tmp2, ST->getPointerInfo(), - NVT, isVolatile, isNonTemporal, Alignment); + SDValue Result = + DAG.getTruncStore(Tmp1, dl, Tmp3, Tmp2, ST->getPointerInfo(), + NVT, isVolatile, isNonTemporal, Alignment); + DAG.ReplaceAllUsesWith(SDValue(Node, 0), Result, this); } else if (StWidth & (StWidth - 1)) { // If not storing a power-of-2 number of bits, expand as two stores. assert(!StVT.isVector() && "Unsupported truncstore!"); @@ -1521,14 +1256,13 @@ } // The order of the stores doesn't matter. - Result = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, Lo, Hi); + SDValue Result = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, Lo, Hi); + DAG.ReplaceAllUsesWith(SDValue(Node, 0), Result, this); } else { if (Tmp1 != ST->getChain() || Tmp3 != ST->getValue() || Tmp2 != ST->getBasePtr()) - Result = SDValue(DAG.UpdateNodeOperands(Result.getNode(), - Tmp1, Tmp3, Tmp2, - ST->getOffset()), - Result.getResNo()); + Node = DAG.UpdateNodeOperands(Node, Tmp1, Tmp3, Tmp2, + ST->getOffset()); switch (TLI.getTruncStoreAction(ST->getValue().getValueType(), StVT)) { default: assert(0 && "This action is not supported yet!"); @@ -1539,12 +1273,13 @@ Type *Ty = ST->getMemoryVT().getTypeForEVT(*DAG.getContext()); unsigned ABIAlignment= TLI.getTargetData()->getABITypeAlignment(Ty); if (ST->getAlignment() < ABIAlignment) - Result = ExpandUnalignedStore(cast(Result.getNode()), - DAG, TLI); + ExpandUnalignedStore(cast(Node), DAG, TLI, this); } break; case TargetLowering::Custom: - Result = TLI.LowerOperation(Result, DAG); + DAG.ReplaceAllUsesWith(SDValue(Node, 0), + TLI.LowerOperation(SDValue(Node, 0), DAG), + this); break; case TargetLowering::Expand: assert(!StVT.isVector() && @@ -1553,8 +1288,10 @@ // TRUNCSTORE:i16 i32 -> STORE i16 assert(TLI.isTypeLegal(StVT) && "Do not know how to expand this store!"); Tmp3 = DAG.getNode(ISD::TRUNCATE, dl, StVT, Tmp3); - Result = DAG.getStore(Tmp1, dl, Tmp3, Tmp2, ST->getPointerInfo(), - isVolatile, isNonTemporal, Alignment); + SDValue Result = + DAG.getStore(Tmp1, dl, Tmp3, Tmp2, ST->getPointerInfo(), + isVolatile, isNonTemporal, Alignment); + DAG.ReplaceAllUsesWith(SDValue(Node, 0), Result, this); break; } } @@ -1562,17 +1299,6 @@ break; } } - assert(Result.getValueType() == Op.getValueType() && - "Bad legalization!"); - - // Make sure that the generated code is itself legal. - if (Result != Op) - Result = LegalizeOp(Result); - - // Note that LegalizeOp may be reentered even from single-use nodes, which - // means that we always must cache transformed nodes. - AddLegalizedOperand(Op, Result); - return Result; } SDValue SelectionDAGLegalize::ExpandExtractFromVectorThroughStack(SDValue Op) { @@ -2011,7 +1737,6 @@ // and leave the Hi part unset. SDValue SelectionDAGLegalize::ExpandLibCall(RTLIB::Libcall LC, SDNode *Node, bool isSigned) { - assert(!IsLegalizingCall && "Cannot overlap legalization of calls!"); // The input chain to this libcall is the entry node of the function. // Legalizing the call will automatically add the previous call to the // dependence. @@ -2030,7 +1755,6 @@ SDValue Callee = DAG.getExternalSymbol(TLI.getLibcallName(LC), TLI.getPointerTy()); - // Splice the libcall in wherever FindInputOutputChains tells us to. Type *RetTy = Node->getValueType(0).getTypeForEVT(*DAG.getContext()); // isTailCall may be true since the callee does not reference caller stack @@ -2046,10 +1770,6 @@ // It's a tailcall, return the chain (which is the DAG root). return DAG.getRoot(); - // Legalize the call sequence, starting with the chain. This will advance - // the LastCALLSEQ_END to the legalized version of the CALLSEQ_END node that - // was added by LowerCallTo (guaranteeing proper serialization of calls). - LegalizeOp(CallInfo.second); return CallInfo.first; } @@ -2079,11 +1799,6 @@ /*isReturnValueUsed=*/true, Callee, Args, DAG, dl); - // Legalize the call sequence, starting with the chain. This will advance - // the LastCALLSEQ_END to the legalized version of the CALLSEQ_END node that - // was added by LowerCallTo (guaranteeing proper serialization of calls). - LegalizeOp(CallInfo.second); - return CallInfo.first; } @@ -2093,7 +1808,6 @@ SelectionDAGLegalize::ExpandChainLibCall(RTLIB::Libcall LC, SDNode *Node, bool isSigned) { - assert(!IsLegalizingCall && "Cannot overlap legalization of calls!"); SDValue InChain = Node->getOperand(0); TargetLowering::ArgListTy Args; @@ -2110,7 +1824,6 @@ SDValue Callee = DAG.getExternalSymbol(TLI.getLibcallName(LC), TLI.getPointerTy()); - // Splice the libcall in wherever FindInputOutputChains tells us to. Type *RetTy = Node->getValueType(0).getTypeForEVT(*DAG.getContext()); std::pair CallInfo = TLI.LowerCallTo(InChain, RetTy, isSigned, !isSigned, false, false, @@ -2118,10 +1831,6 @@ /*isReturnValueUsed=*/true, Callee, Args, DAG, Node->getDebugLoc()); - // Legalize the call sequence, starting with the chain. This will advance - // the LastCALLSEQ_END to the legalized version of the CALLSEQ_END node that - // was added by LowerCallTo (guaranteeing proper serialization of calls). - LegalizeOp(CallInfo.second); return CallInfo; } @@ -2247,20 +1956,14 @@ SDValue Callee = DAG.getExternalSymbol(TLI.getLibcallName(LC), TLI.getPointerTy()); - // Splice the libcall in wherever FindInputOutputChains tells us to. DebugLoc dl = Node->getDebugLoc(); std::pair CallInfo = TLI.LowerCallTo(InChain, RetTy, isSigned, !isSigned, false, false, 0, TLI.getLibcallCallingConv(LC), /*isTailCall=*/false, /*isReturnValueUsed=*/true, Callee, Args, DAG, dl); - // Legalize the call sequence, starting with the chain. This will advance - // the LastCALLSEQ to the legalized version of the CALLSEQ_END node that - // was added by LowerCallTo (guaranteeing proper serialization of calls). - LegalizeOp(CallInfo.second); - // Remainder is loaded back from the stack frame. - SDValue Rem = DAG.getLoad(RetVT, dl, LastCALLSEQ_END, FIPtr, + SDValue Rem = DAG.getLoad(RetVT, dl, CallInfo.second, FIPtr, MachinePointerInfo(), false, false, 0); Results.push_back(CallInfo.first); Results.push_back(Rem); @@ -2452,11 +2155,13 @@ MachinePointerInfo::getConstantPool(), false, false, Alignment); else { - FudgeInReg = - LegalizeOp(DAG.getExtLoad(ISD::EXTLOAD, dl, DestVT, - DAG.getEntryNode(), CPIdx, - MachinePointerInfo::getConstantPool(), - MVT::f32, false, false, Alignment)); + SDValue Load = DAG.getExtLoad(ISD::EXTLOAD, dl, DestVT, + DAG.getEntryNode(), CPIdx, + MachinePointerInfo::getConstantPool(), + MVT::f32, false, false, Alignment); + HandleSDNode Handle(Load); + LegalizeOp(Load.getNode()); + FudgeInReg = Handle.getValue(); } return DAG.getNode(ISD::FADD, dl, DestVT, Tmp1, FudgeInReg); @@ -2780,8 +2485,8 @@ return ExpandChainLibCall(LC, Node, false); } -void SelectionDAGLegalize::ExpandNode(SDNode *Node, - SmallVectorImpl &Results) { +void SelectionDAGLegalize::ExpandNode(SDNode *Node) { + SmallVector Results; DebugLoc dl = Node->getDebugLoc(); SDValue Tmp1, Tmp2, Tmp3, Tmp4; switch (Node->getOpcode()) { @@ -3229,10 +2934,8 @@ ConstantFPSDNode *CFP = cast(Node); // Check to see if this FP immediate is already legal. // If this is a legal constant, turn it into a TargetConstantFP node. - if (TLI.isFPImmLegal(CFP->getValueAPF(), Node->getValueType(0))) - Results.push_back(SDValue(Node, 0)); - else - Results.push_back(ExpandConstantFP(CFP, true, DAG, TLI)); + if (!TLI.isFPImmLegal(CFP->getValueAPF(), Node->getValueType(0))) + Results.push_back(ExpandConstantFP(CFP, true)); break; } case ISD::EHSELECTION: { @@ -3478,6 +3181,10 @@ DAG.getIntPtrConstant(0)); TopHalf = DAG.getNode(ISD::EXTRACT_ELEMENT, dl, VT, Ret, DAG.getIntPtrConstant(1)); + // Ret is a node with an illegal type. Because such things are not + // generally permitted during this phase of legalization, delete the + // node. The above EXTRACT_ELEMENT nodes should have been folded. + DAG.DeleteNode(Ret.getNode()); } if (isSigned) { @@ -3618,7 +3325,6 @@ LegalizeSetCCCondCode(TLI.getSetCCResultType(Tmp2.getValueType()), Tmp2, Tmp3, Tmp4, dl); - LastCALLSEQ_END = DAG.getEntryNode(); assert(!Tmp3.getNode() && "Can't legalize BR_CC with legal condition!"); Tmp3 = DAG.getConstant(0, Tmp2.getValueType()); @@ -3628,6 +3334,35 @@ Results.push_back(Tmp1); break; } + case ISD::BUILD_VECTOR: + Results.push_back(ExpandBUILD_VECTOR(Node)); + break; + case ISD::SRA: + case ISD::SRL: + case ISD::SHL: { + // Scalarize vector SRA/SRL/SHL. + EVT VT = Node->getValueType(0); + assert(VT.isVector() && "Unable to legalize non-vector shift"); + assert(TLI.isTypeLegal(VT.getScalarType())&& "Element type must be legal"); + unsigned NumElem = VT.getVectorNumElements(); + + SmallVector Scalars; + for (unsigned Idx = 0; Idx < NumElem; Idx++) { + SDValue Ex = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, dl, + VT.getScalarType(), + Node->getOperand(0), DAG.getIntPtrConstant(Idx)); + SDValue Sh = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, dl, + VT.getScalarType(), + Node->getOperand(1), DAG.getIntPtrConstant(Idx)); + Scalars.push_back(DAG.getNode(Node->getOpcode(), dl, + VT.getScalarType(), Ex, Sh)); + } + SDValue Result = + DAG.getNode(ISD::BUILD_VECTOR, dl, Node->getValueType(0), + &Scalars[0], Scalars.size()); + DAG.ReplaceAllUsesWith(SDValue(Node, 0), Result, this); + break; + } case ISD::GLOBAL_OFFSET_TABLE: case ISD::GlobalAddress: case ISD::GlobalTLSAddress: @@ -3638,13 +3373,16 @@ case ISD::INTRINSIC_WO_CHAIN: case ISD::INTRINSIC_VOID: // FIXME: Custom lowering for these operations shouldn't return null! - for (unsigned i = 0, e = Node->getNumValues(); i != e; ++i) - Results.push_back(SDValue(Node, i)); break; } + + // Replace the original node with the legalized result. + if (!Results.empty()) + DAG.ReplaceAllUsesWith(Node, Results.data(), this); } -void SelectionDAGLegalize::PromoteNode(SDNode *Node, - SmallVectorImpl &Results) { + +void SelectionDAGLegalize::PromoteNode(SDNode *Node) { + SmallVector Results; EVT OVT = Node->getValueType(0); if (Node->getOpcode() == ISD::UINT_TO_FP || Node->getOpcode() == ISD::SINT_TO_FP || @@ -3772,6 +3510,10 @@ break; } } + + // Replace the original node with the legalized result. + if (!Results.empty()) + DAG.ReplaceAllUsesWith(Node, Results.data(), this); } // SelectionDAG::Legalize - This is the entry point for the file. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp?rev=143660&r1=143659&r2=143660&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp Thu Nov 3 16:49:52 2011 @@ -1084,7 +1084,6 @@ SDValue Callee = DAG.getExternalSymbol(TLI.getLibcallName(LC), TLI.getPointerTy()); - // Splice the libcall in wherever FindInputOutputChains tells us to. Type *RetTy = Node->getValueType(0).getTypeForEVT(*DAG.getContext()); std::pair CallInfo = TLI.LowerCallTo(InChain, RetTy, isSigned, !isSigned, false, false, Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp?rev=143660&r1=143659&r2=143660&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Thu Nov 3 16:49:52 2011 @@ -315,8 +315,10 @@ IssueCount = 0; MinAvailableCycle = DisableSchedCycles ? 0 : UINT_MAX; NumLiveRegs = 0; - LiveRegDefs.resize(TRI->getNumRegs(), NULL); - LiveRegGens.resize(TRI->getNumRegs(), NULL); + // Allocate slots for each physical register, plus one for a special register + // to track the virtual resource of a calling sequence. + LiveRegDefs.resize(TRI->getNumRegs() + 1, NULL); + LiveRegGens.resize(TRI->getNumRegs() + 1, NULL); // Build the scheduling graph. BuildSchedGraph(NULL); @@ -386,6 +388,109 @@ } } +/// IsChainDependent - Test if Outer is reachable from Inner through +/// chain dependencies. +static bool IsChainDependent(SDNode *Outer, SDNode *Inner, + unsigned NestLevel, + const TargetInstrInfo *TII) { + SDNode *N = Outer; + for (;;) { + if (N == Inner) + return true; + // For a TokenFactor, examine each operand. There may be multiple ways + // to get to the CALLSEQ_BEGIN, but we need to find the path with the + // most nesting in order to ensure that we find the corresponding match. + if (N->getOpcode() == ISD::TokenFactor) { + for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) + if (IsChainDependent(N->getOperand(i).getNode(), Inner, NestLevel, TII)) + return true; + return false; + } + // Check for a lowered CALLSEQ_BEGIN or CALLSEQ_END. + if (N->isMachineOpcode()) { + if (N->getMachineOpcode() == + (unsigned)TII->getCallFrameDestroyOpcode()) { + ++NestLevel; + } else if (N->getMachineOpcode() == + (unsigned)TII->getCallFrameSetupOpcode()) { + if (NestLevel == 0) + return false; + --NestLevel; + } + } + // Otherwise, find the chain and continue climbing. + for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) + if (N->getOperand(i).getValueType() == MVT::Other) { + N = N->getOperand(i).getNode(); + goto found_chain_operand; + } + return false; + found_chain_operand:; + if (N->getOpcode() == ISD::EntryToken) + return false; + } +} + +/// FindCallSeqStart - Starting from the (lowered) CALLSEQ_END node, locate +/// the corresponding (lowered) CALLSEQ_BEGIN node. +/// +/// NestLevel and MaxNested are used in recursion to indcate the current level +/// of nesting of CALLSEQ_BEGIN and CALLSEQ_END pairs, as well as the maximum +/// level seen so far. +/// +/// TODO: It would be better to give CALLSEQ_END an explicit operand to point +/// to the corresponding CALLSEQ_BEGIN to avoid needing to search for it. +static SDNode * +FindCallSeqStart(SDNode *N, unsigned &NestLevel, unsigned &MaxNest, + const TargetInstrInfo *TII) { + for (;;) { + // For a TokenFactor, examine each operand. There may be multiple ways + // to get to the CALLSEQ_BEGIN, but we need to find the path with the + // most nesting in order to ensure that we find the corresponding match. + if (N->getOpcode() == ISD::TokenFactor) { + SDNode *Best = 0; + unsigned BestMaxNest = MaxNest; + for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) { + unsigned MyNestLevel = NestLevel; + unsigned MyMaxNest = MaxNest; + if (SDNode *New = FindCallSeqStart(N->getOperand(i).getNode(), + MyNestLevel, MyMaxNest, TII)) + if (!Best || (MyMaxNest > BestMaxNest)) { + Best = New; + BestMaxNest = MyMaxNest; + } + } + assert(Best); + MaxNest = BestMaxNest; + return Best; + } + // Check for a lowered CALLSEQ_BEGIN or CALLSEQ_END. + if (N->isMachineOpcode()) { + if (N->getMachineOpcode() == + (unsigned)TII->getCallFrameDestroyOpcode()) { + ++NestLevel; + MaxNest = std::max(MaxNest, NestLevel); + } else if (N->getMachineOpcode() == + (unsigned)TII->getCallFrameSetupOpcode()) { + assert(NestLevel != 0); + --NestLevel; + if (NestLevel == 0) + return N; + } + } + // Otherwise, find the chain and continue climbing. + for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) + if (N->getOperand(i).getValueType() == MVT::Other) { + N = N->getOperand(i).getNode(); + goto found_chain_operand; + } + return 0; + found_chain_operand:; + if (N->getOpcode() == ISD::EntryToken) + return 0; + } +} + /// Call ReleasePred for each predecessor, then update register live def/gen. /// Always update LiveRegDefs for a register dependence even if the current SU /// also defines the register. This effectively create one large live range @@ -423,6 +528,25 @@ } } } + + // If we're scheduling a lowered CALLSEQ_END, find the corresponding + // CALLSEQ_BEGIN. Inject an artificial physical register dependence between + // these nodes, to prevent other calls from being interscheduled with them. + unsigned CallResource = TRI->getNumRegs(); + if (!LiveRegDefs[CallResource]) + for (SDNode *Node = SU->getNode(); Node; Node = Node->getGluedNode()) + if (Node->isMachineOpcode() && + Node->getMachineOpcode() == (unsigned)TII->getCallFrameDestroyOpcode()) { + unsigned NestLevel = 0; + unsigned MaxNest = 0; + SDNode *N = FindCallSeqStart(Node, NestLevel, MaxNest, TII); + + SUnit *Def = &SUnits[N->getNodeId()]; + ++NumLiveRegs; + LiveRegDefs[CallResource] = Def; + LiveRegGens[CallResource] = SU; + break; + } } /// Check to see if any of the pending instructions are ready to issue. If @@ -605,6 +729,20 @@ LiveRegGens[I->getReg()] = NULL; } } + // Release the special call resource dependence, if this is the beginning + // of a call. + unsigned CallResource = TRI->getNumRegs(); + if (LiveRegDefs[CallResource] == SU) + for (const SDNode *SUNode = SU->getNode(); SUNode; + SUNode = SUNode->getGluedNode()) { + if (SUNode->isMachineOpcode() && + SUNode->getMachineOpcode() == (unsigned)TII->getCallFrameSetupOpcode()) { + assert(NumLiveRegs > 0 && "NumLiveRegs is already zero!"); + --NumLiveRegs; + LiveRegDefs[CallResource] = NULL; + LiveRegGens[CallResource] = NULL; + } + } resetVRegCycle(SU); @@ -661,6 +799,33 @@ } } + // Reclaim the special call resource dependence, if this is the beginning + // of a call. + unsigned CallResource = TRI->getNumRegs(); + for (const SDNode *SUNode = SU->getNode(); SUNode; + SUNode = SUNode->getGluedNode()) { + if (SUNode->isMachineOpcode() && + SUNode->getMachineOpcode() == (unsigned)TII->getCallFrameSetupOpcode()) { + ++NumLiveRegs; + LiveRegDefs[CallResource] = SU; + LiveRegGens[CallResource] = NULL; + } + } + + // Release the special call resource dependence, if this is the end + // of a call. + if (LiveRegGens[CallResource] == SU) + for (const SDNode *SUNode = SU->getNode(); SUNode; + SUNode = SUNode->getGluedNode()) { + if (SUNode->isMachineOpcode() && + SUNode->getMachineOpcode() == (unsigned)TII->getCallFrameDestroyOpcode()) { + assert(NumLiveRegs > 0 && "NumLiveRegs is already zero!"); + --NumLiveRegs; + LiveRegDefs[CallResource] = NULL; + LiveRegGens[CallResource] = NULL; + } + } + for (SUnit::succ_iterator I = SU->Succs.begin(), E = SU->Succs.end(); I != E; ++I) { if (I->isAssignedRegDep()) { @@ -1083,6 +1248,20 @@ if (!Node->isMachineOpcode()) continue; + // If we're in the middle of scheduling a call, don't begin scheduling + // another call. Also, don't allow any physical registers to be live across + // the call. + if (Node->getMachineOpcode() == (unsigned)TII->getCallFrameDestroyOpcode()) { + // Check the special calling-sequence resource. + unsigned CallResource = TRI->getNumRegs(); + if (LiveRegDefs[CallResource]) { + SDNode *Gen = LiveRegGens[CallResource]->getNode(); + while (SDNode *Glued = Gen->getGluedNode()) + Gen = Glued; + if (!IsChainDependent(Gen, Node, 0, TII) && RegAdded.insert(CallResource)) + LRegs.push_back(CallResource); + } + } const MCInstrDesc &MCID = TII->get(Node->getMachineOpcode()); if (!MCID.ImplicitDefs) continue; Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=143660&r1=143659&r2=143660&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Thu Nov 3 16:49:52 2011 @@ -5290,6 +5290,10 @@ // already exists there, recursively merge the results together. AddModifiedNodeToCSEMaps(User, &Listener); } + + // If we just RAUW'd the root, take note. + if (FromN == getRoot()) + setRoot(To); } /// ReplaceAllUsesWith - Modify anything using 'From' to use 'To' instead. @@ -5335,6 +5339,10 @@ // already exists there, recursively merge the results together. AddModifiedNodeToCSEMaps(User, &Listener); } + + // If we just RAUW'd the root, take note. + if (From == getRoot().getNode()) + setRoot(SDValue(To, getRoot().getResNo())); } /// ReplaceAllUsesWith - Modify anything using 'From' to use 'To' instead. @@ -5373,6 +5381,10 @@ // already exists there, recursively merge the results together. AddModifiedNodeToCSEMaps(User, &Listener); } + + // If we just RAUW'd the root, take note. + if (From == getRoot().getNode()) + setRoot(SDValue(To[getRoot().getResNo()])); } /// ReplaceAllUsesOfValueWith - Replace any uses of From with To, leaving @@ -5431,6 +5443,10 @@ // already exists there, recursively merge the results together. AddModifiedNodeToCSEMaps(User, &Listener); } + + // If we just RAUW'd the root, take note. + if (From == getRoot()) + setRoot(To); } namespace { Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=143660&r1=143659&r2=143660&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Thu Nov 3 16:49:52 2011 @@ -1353,12 +1353,10 @@ SDValue Src = DAG.getNode(ISD::ADD, dl, getPointerTy(), Arg, SrcOffset); SDValue SizeNode = DAG.getConstant(Flags.getByValSize() - 4*offset, MVT::i32); - // TODO: Disable AlwaysInline when it becomes possible - // to emit a nested call sequence. MemOpChains.push_back(DAG.getMemcpy(Chain, dl, Dst, Src, SizeNode, Flags.getByValAlign(), /*isVolatile=*/false, - /*AlwaysInline=*/true, + /*AlwaysInline=*/false, MachinePointerInfo(0), MachinePointerInfo(0))); @@ -4350,9 +4348,24 @@ // If this is undef splat, generate it via "just" vdup, if possible. if (Lane == -1) Lane = 0; + // Test if V1 is a SCALAR_TO_VECTOR. if (Lane == 0 && V1.getOpcode() == ISD::SCALAR_TO_VECTOR) { return DAG.getNode(ARMISD::VDUP, dl, VT, V1.getOperand(0)); } + // Test if V1 is a BUILD_VECTOR which is equivalent to a SCALAR_TO_VECTOR + // (and probably will turn into a SCALAR_TO_VECTOR once legalization + // reaches it). + if (Lane == 0 && V1.getOpcode() == ISD::BUILD_VECTOR && + !isa(V1.getOperand(0))) { + bool IsScalarToVector = true; + for (unsigned i = 1, e = V1.getNumOperands(); i != e; ++i) + if (V1.getOperand(i).getOpcode() != ISD::UNDEF) { + IsScalarToVector = false; + break; + } + if (IsScalarToVector) + return DAG.getNode(ARMISD::VDUP, dl, VT, V1.getOperand(0)); + } return DAG.getNode(ARMISD::VDUPLANE, dl, VT, V1, DAG.getConstant(Lane, MVT::i32)); } Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=143660&r1=143659&r2=143660&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Thu Nov 3 16:49:52 2011 @@ -2114,7 +2114,9 @@ HasNoSignedComparisonUses(Node)) // Look past the truncate if CMP is the only use of it. N0 = N0.getOperand(0); - if (N0.getNode()->getOpcode() == ISD::AND && N0.getNode()->hasOneUse() && + if ((N0.getNode()->getOpcode() == ISD::AND || + (N0.getResNo() == 0 && N0.getNode()->getOpcode() == X86ISD::AND)) && + N0.getNode()->hasOneUse() && N0.getValueType() != MVT::i8 && X86::isZeroNode(N1)) { ConstantSDNode *C = dyn_cast(N0.getNode()->getOperand(1)); Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=143660&r1=143659&r2=143660&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Thu Nov 3 16:49:52 2011 @@ -4221,6 +4221,29 @@ return true; } +// Test whether the given value is a vector value which will be legalized +// into a load. +static bool WillBeConstantPoolLoad(SDNode *N) { + if (N->getOpcode() != ISD::BUILD_VECTOR) + return false; + + // Check for any non-constant elements. + for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) + switch (N->getOperand(i).getNode()->getOpcode()) { + case ISD::UNDEF: + case ISD::ConstantFP: + case ISD::Constant: + break; + default: + return false; + } + + // Vectors of all-zeros and all-ones are materialized with special + // instructions rather than being loaded. + return !ISD::isBuildVectorAllZeros(N) && + !ISD::isBuildVectorAllOnes(N); +} + /// ShouldXformToMOVLP{S|D} - Return true if the node should be transformed to /// match movlp{s|d}. The lower half elements should come from lower half of /// V1 (and in order), and the upper half elements should come from the upper @@ -4236,7 +4259,7 @@ return false; // Is V2 is a vector load, don't do this transformation. We will try to use // load folding shufps op. - if (ISD::isNON_EXTLoad(V2)) + if (ISD::isNON_EXTLoad(V2) || WillBeConstantPoolLoad(V2)) return false; unsigned NumElems = VT.getVectorNumElements(); @@ -6352,6 +6375,8 @@ if (MayFoldVectorLoad(V1) && MayFoldIntoStore(Op)) CanFoldLoad = true; + ShuffleVectorSDNode *SVOp = cast(Op); + // Both of them can't be memory operations though. if (MayFoldVectorLoad(V1) && MayFoldVectorLoad(V2)) CanFoldLoad = false; @@ -6361,10 +6386,11 @@ return getTargetShuffleNode(X86ISD::MOVLPD, dl, VT, V1, V2, DAG); if (NumElems == 4) - return getTargetShuffleNode(X86ISD::MOVLPS, dl, VT, V1, V2, DAG); + // If we don't care about the second element, procede to use movss. + if (SVOp->getMaskElt(1) != -1) + return getTargetShuffleNode(X86ISD::MOVLPS, dl, VT, V1, V2, DAG); } - ShuffleVectorSDNode *SVOp = cast(Op); // movl and movlp will both match v2i64, but v2i64 is never matched by // movl earlier because we make it strict to avoid messing with the movlp load // folding logic (see the code above getMOVLP call). Match it here then, @@ -8682,8 +8708,9 @@ // If condition flag is set by a X86ISD::CMP, then use it as the condition // setting operand in place of the X86ISD::SETCC. - if (Cond.getOpcode() == X86ISD::SETCC || - Cond.getOpcode() == X86ISD::SETCC_CARRY) { + unsigned CondOpcode = Cond.getOpcode(); + if (CondOpcode == X86ISD::SETCC || + CondOpcode == X86ISD::SETCC_CARRY) { CC = Cond.getOperand(0); SDValue Cmp = Cond.getOperand(1); @@ -8700,6 +8727,39 @@ Cond = Cmp; addTest = false; } + } else if (CondOpcode == ISD::USUBO || CondOpcode == ISD::SSUBO || + CondOpcode == ISD::UADDO || CondOpcode == ISD::SADDO || + ((CondOpcode == ISD::UMULO || CondOpcode == ISD::SMULO) && + Cond.getOperand(0).getValueType() != MVT::i8)) { + SDValue LHS = Cond.getOperand(0); + SDValue RHS = Cond.getOperand(1); + unsigned X86Opcode; + unsigned X86Cond; + SDVTList VTs; + switch (CondOpcode) { + case ISD::UADDO: X86Opcode = X86ISD::ADD; X86Cond = X86::COND_B; break; + case ISD::SADDO: X86Opcode = X86ISD::ADD; X86Cond = X86::COND_O; break; + case ISD::USUBO: X86Opcode = X86ISD::SUB; X86Cond = X86::COND_B; break; + case ISD::SSUBO: X86Opcode = X86ISD::SUB; X86Cond = X86::COND_O; break; + case ISD::UMULO: X86Opcode = X86ISD::UMUL; X86Cond = X86::COND_O; break; + case ISD::SMULO: X86Opcode = X86ISD::SMUL; X86Cond = X86::COND_O; break; + default: llvm_unreachable("unexpected overflowing operator"); + } + if (CondOpcode == ISD::UMULO) + VTs = DAG.getVTList(LHS.getValueType(), LHS.getValueType(), + MVT::i32); + else + VTs = DAG.getVTList(LHS.getValueType(), MVT::i32); + + SDValue X86Op = DAG.getNode(X86Opcode, DL, VTs, LHS, RHS); + + if (CondOpcode == ISD::UMULO) + Cond = X86Op.getValue(2); + else + Cond = X86Op.getValue(1); + + CC = DAG.getConstant(X86Cond, MVT::i8); + addTest = false; } if (addTest) { @@ -8781,11 +8841,27 @@ SDValue Dest = Op.getOperand(2); DebugLoc dl = Op.getDebugLoc(); SDValue CC; + bool Inverted = false; if (Cond.getOpcode() == ISD::SETCC) { - SDValue NewCond = LowerSETCC(Cond, DAG); - if (NewCond.getNode()) - Cond = NewCond; + // Check for setcc([su]{add,sub,mul}o == 0). + if (cast(Cond.getOperand(2))->get() == ISD::SETEQ && + isa(Cond.getOperand(1)) && + cast(Cond.getOperand(1))->isNullValue() && + Cond.getOperand(0).getResNo() == 1 && + (Cond.getOperand(0).getOpcode() == ISD::SADDO || + Cond.getOperand(0).getOpcode() == ISD::UADDO || + Cond.getOperand(0).getOpcode() == ISD::SSUBO || + Cond.getOperand(0).getOpcode() == ISD::USUBO || + Cond.getOperand(0).getOpcode() == ISD::SMULO || + Cond.getOperand(0).getOpcode() == ISD::UMULO)) { + Inverted = true; + Cond = Cond.getOperand(0); + } else { + SDValue NewCond = LowerSETCC(Cond, DAG); + if (NewCond.getNode()) + Cond = NewCond; + } } #if 0 // FIXME: LowerXALUO doesn't handle these!! @@ -8806,8 +8882,9 @@ // If condition flag is set by a X86ISD::CMP, then use it as the condition // setting operand in place of the X86ISD::SETCC. - if (Cond.getOpcode() == X86ISD::SETCC || - Cond.getOpcode() == X86ISD::SETCC_CARRY) { + unsigned CondOpcode = Cond.getOpcode(); + if (CondOpcode == X86ISD::SETCC || + CondOpcode == X86ISD::SETCC_CARRY) { CC = Cond.getOperand(0); SDValue Cmp = Cond.getOperand(1); @@ -8828,6 +8905,43 @@ break; } } + } + CondOpcode = Cond.getOpcode(); + if (CondOpcode == ISD::UADDO || CondOpcode == ISD::SADDO || + CondOpcode == ISD::USUBO || CondOpcode == ISD::SSUBO || + ((CondOpcode == ISD::UMULO || CondOpcode == ISD::SMULO) && + Cond.getOperand(0).getValueType() != MVT::i8)) { + SDValue LHS = Cond.getOperand(0); + SDValue RHS = Cond.getOperand(1); + unsigned X86Opcode; + unsigned X86Cond; + SDVTList VTs; + switch (CondOpcode) { + case ISD::UADDO: X86Opcode = X86ISD::ADD; X86Cond = X86::COND_B; break; + case ISD::SADDO: X86Opcode = X86ISD::ADD; X86Cond = X86::COND_O; break; + case ISD::USUBO: X86Opcode = X86ISD::SUB; X86Cond = X86::COND_B; break; + case ISD::SSUBO: X86Opcode = X86ISD::SUB; X86Cond = X86::COND_O; break; + case ISD::UMULO: X86Opcode = X86ISD::UMUL; X86Cond = X86::COND_O; break; + case ISD::SMULO: X86Opcode = X86ISD::SMUL; X86Cond = X86::COND_O; break; + default: llvm_unreachable("unexpected overflowing operator"); + } + if (Inverted) + X86Cond = X86::GetOppositeBranchCondition((X86::CondCode)X86Cond); + if (CondOpcode == ISD::UMULO) + VTs = DAG.getVTList(LHS.getValueType(), LHS.getValueType(), + MVT::i32); + else + VTs = DAG.getVTList(LHS.getValueType(), MVT::i32); + + SDValue X86Op = DAG.getNode(X86Opcode, dl, VTs, LHS, RHS); + + if (CondOpcode == ISD::UMULO) + Cond = X86Op.getValue(2); + else + Cond = X86Op.getValue(1); + + CC = DAG.getConstant(X86Cond, MVT::i8); + addTest = false; } else { unsigned CondOpc; if (Cond.hasOneUse() && isAndOrOfSetCCs(Cond, CondOpc)) { @@ -8891,6 +9005,66 @@ CC = DAG.getConstant(CCode, MVT::i8); Cond = Cond.getOperand(0).getOperand(1); addTest = false; + } else if (Cond.getOpcode() == ISD::SETCC && + cast(Cond.getOperand(2))->get() == ISD::SETOEQ) { + // For FCMP_OEQ, we can emit + // two branches instead of an explicit AND instruction with a + // separate test. However, we only do this if this block doesn't + // have a fall-through edge, because this requires an explicit + // jmp when the condition is false. + if (Op.getNode()->hasOneUse()) { + SDNode *User = *Op.getNode()->use_begin(); + // Look for an unconditional branch following this conditional branch. + // We need this because we need to reverse the successors in order + // to implement FCMP_OEQ. + if (User->getOpcode() == ISD::BR) { + SDValue FalseBB = User->getOperand(1); + SDNode *NewBR = + DAG.UpdateNodeOperands(User, User->getOperand(0), Dest); + assert(NewBR == User); + (void)NewBR; + Dest = FalseBB; + + SDValue Cmp = DAG.getNode(X86ISD::CMP, dl, MVT::i32, + Cond.getOperand(0), Cond.getOperand(1)); + CC = DAG.getConstant(X86::COND_NE, MVT::i8); + Chain = DAG.getNode(X86ISD::BRCOND, dl, Op.getValueType(), + Chain, Dest, CC, Cmp); + CC = DAG.getConstant(X86::COND_P, MVT::i8); + Cond = Cmp; + addTest = false; + } + } + } else if (Cond.getOpcode() == ISD::SETCC && + cast(Cond.getOperand(2))->get() == ISD::SETUNE) { + // For FCMP_UNE, we can emit + // two branches instead of an explicit AND instruction with a + // separate test. However, we only do this if this block doesn't + // have a fall-through edge, because this requires an explicit + // jmp when the condition is false. + if (Op.getNode()->hasOneUse()) { + SDNode *User = *Op.getNode()->use_begin(); + // Look for an unconditional branch following this conditional branch. + // We need this because we need to reverse the successors in order + // to implement FCMP_UNE. + if (User->getOpcode() == ISD::BR) { + SDValue FalseBB = User->getOperand(1); + SDNode *NewBR = + DAG.UpdateNodeOperands(User, User->getOperand(0), Dest); + assert(NewBR == User); + (void)NewBR; + + SDValue Cmp = DAG.getNode(X86ISD::CMP, dl, MVT::i32, + Cond.getOperand(0), Cond.getOperand(1)); + CC = DAG.getConstant(X86::COND_NE, MVT::i8); + Chain = DAG.getNode(X86ISD::BRCOND, dl, Op.getValueType(), + Chain, Dest, CC, Cmp); + CC = DAG.getConstant(X86::COND_NP, MVT::i8); + Cond = Cmp; + addTest = false; + Dest = FalseBB; + } + } } } Modified: llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp?rev=143660&r1=143659&r2=143660&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp (original) +++ llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp Thu Nov 3 16:49:52 2011 @@ -386,6 +386,15 @@ Offset = off; return true; } + // Check for an aligned global variable. + if (GlobalAddressSDNode *GA = dyn_cast(*Root)) { + const GlobalValue *GV = GA->getGlobal(); + if (GA->getOffset() == 0 && GV->getAlignment() >= 4) { + AlignedBase = Base; + Offset = off; + return true; + } + } return false; } Modified: llvm/trunk/test/CodeGen/CellSPU/and_ops.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/CellSPU/and_ops.ll?rev=143660&r1=143659&r2=143660&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/CellSPU/and_ops.ll (original) +++ llvm/trunk/test/CodeGen/CellSPU/and_ops.ll Thu Nov 3 16:49:52 2011 @@ -5,6 +5,9 @@ ; RUN: grep andhi %t1.s | count 30 ; RUN: grep andbi %t1.s | count 4 +; CellSPU legalization is over-sensitive to Legalize's traversal order. +; XFAIL: * + target datalayout = "E-p:32:32:128-f64:64:128-f32:32:128-i64:32:128-i32:32:128-i16:16:128-i8:8:128-i1:8:128-a0:0:128-v128:128:128-s0:128:128" target triple = "spu" Modified: llvm/trunk/test/CodeGen/CellSPU/call_indirect.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/CellSPU/call_indirect.ll?rev=143660&r1=143659&r2=143660&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/CellSPU/call_indirect.ll (original) +++ llvm/trunk/test/CodeGen/CellSPU/call_indirect.ll Thu Nov 3 16:49:52 2011 @@ -15,6 +15,9 @@ ; RUN: grep ai %t2.s | count 9 ; RUN: grep dispatch_tab %t2.s | count 6 +; CellSPU legalization is over-sensitive to Legalize's traversal order. +; XFAIL: * + ; ModuleID = 'call_indirect.bc' target datalayout = "E-p:32:32:128-f64:64:128-f32:32:128-i64:32:128-i32:32:128-i16:16:128-i8:8:128-i1:8:128-a0:0:128-v128:128:128" target triple = "spu-unknown-elf" Modified: llvm/trunk/test/CodeGen/CellSPU/nand.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/CellSPU/nand.ll?rev=143660&r1=143659&r2=143660&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/CellSPU/nand.ll (original) +++ llvm/trunk/test/CodeGen/CellSPU/nand.ll Thu Nov 3 16:49:52 2011 @@ -3,6 +3,10 @@ ; RUN: grep and %t1.s | count 94 ; RUN: grep xsbh %t1.s | count 2 ; RUN: grep xshw %t1.s | count 4 + +; CellSPU legalization is over-sensitive to Legalize's traversal order. +; XFAIL: * + target datalayout = "E-p:32:32:128-f64:64:128-f32:32:128-i64:32:128-i32:32:128-i16:16:128-i8:8:128-i1:8:128-a0:0:128-v128:128:128-s0:128:128" target triple = "spu" Modified: llvm/trunk/test/CodeGen/CellSPU/or_ops.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/CellSPU/or_ops.ll?rev=143660&r1=143659&r2=143660&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/CellSPU/or_ops.ll (original) +++ llvm/trunk/test/CodeGen/CellSPU/or_ops.ll Thu Nov 3 16:49:52 2011 @@ -6,6 +6,9 @@ ; RUN: grep orbi %t1.s | count 15 ; RUN: FileCheck %s < %t1.s +; CellSPU legalization is over-sensitive to Legalize's traversal order. +; XFAIL: * + target datalayout = "E-p:32:32:128-f64:64:128-f32:32:128-i64:32:128-i32:32:128-i16:16:128-i8:8:128-i1:8:128-a0:0:128-v128:128:128-s0:128:128" target triple = "spu" Modified: llvm/trunk/test/CodeGen/CellSPU/select_bits.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/CellSPU/select_bits.ll?rev=143660&r1=143659&r2=143660&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/CellSPU/select_bits.ll (original) +++ llvm/trunk/test/CodeGen/CellSPU/select_bits.ll Thu Nov 3 16:49:52 2011 @@ -1,6 +1,9 @@ ; RUN: llc < %s -march=cellspu > %t1.s ; RUN: grep selb %t1.s | count 56 +; CellSPU legalization is over-sensitive to Legalize's traversal order. +; XFAIL: * + target datalayout = "E-p:32:32:128-f64:64:128-f32:32:128-i64:32:128-i32:32:128-i16:16:128-i8:8:128-i1:8:128-a0:0:128-v128:128:128-s0:128:128" target triple = "spu" Modified: llvm/trunk/test/CodeGen/CellSPU/struct_1.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/CellSPU/struct_1.ll?rev=143660&r1=143659&r2=143660&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/CellSPU/struct_1.ll (original) +++ llvm/trunk/test/CodeGen/CellSPU/struct_1.ll Thu Nov 3 16:49:52 2011 @@ -22,6 +22,9 @@ ; RUN: grep shufb %t2.s | count 7 ; RUN: grep stqd %t2.s | count 7 +; CellSPU legalization is over-sensitive to Legalize's traversal order. +; XFAIL: * + ; ModuleID = 'struct_1.bc' target datalayout = "E-p:32:32:128-f64:64:128-f32:32:128-i64:32:128-i32:32:128-i16:16:128-i8:8:128-i1:8:128-a0:0:128-v128:128:128-s0:128:128" target triple = "spu" Modified: llvm/trunk/test/CodeGen/Mips/cprestore.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/cprestore.ll?rev=143660&r1=143659&r2=143660&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/Mips/cprestore.ll (original) +++ llvm/trunk/test/CodeGen/Mips/cprestore.ll Thu Nov 3 16:49:52 2011 @@ -1,8 +1,4 @@ -; DISABLED: llc -march=mipsel < %s | FileCheck %s -; RUN: false - -; byval is currently unsupported. -; XFAIL: * +; RUN: llc -march=mipsel < %s | FileCheck %s ; CHECK: .set macro ; CHECK-NEXT: .cprestore Modified: llvm/trunk/test/CodeGen/Mips/largeimmprinting.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/largeimmprinting.ll?rev=143660&r1=143659&r2=143660&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/Mips/largeimmprinting.ll (original) +++ llvm/trunk/test/CodeGen/Mips/largeimmprinting.ll Thu Nov 3 16:49:52 2011 @@ -1,8 +1,4 @@ -; DISABLED: llc -march=mipsel -mcpu=4ke < %s | FileCheck %s -; RUN: false - -; byval is currently unsupported. -; XFAIL: * +; RUN: llc -march=mipsel -mcpu=4ke < %s | FileCheck %s %struct.S1 = type { [65536 x i8] } Modified: llvm/trunk/test/CodeGen/Thumb/2011-05-11-DAGLegalizer.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Thumb/2011-05-11-DAGLegalizer.ll?rev=143660&r1=143659&r2=143660&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/Thumb/2011-05-11-DAGLegalizer.ll (original) +++ llvm/trunk/test/CodeGen/Thumb/2011-05-11-DAGLegalizer.ll Thu Nov 3 16:49:52 2011 @@ -1,11 +1,7 @@ -; DISABLED: llc -mtriple=thumbv6-apple-darwin < %s -; RUN: false +; RUN: llc -mtriple=thumbv6-apple-darwin < %s ; rdar://problem/9416774 ; ModuleID = 'reduced.ll' -; byval is currently unsupported. -; XFAIL: * - 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:32:64-v128:32:128-a0:0:32-n32" target triple = "thumbv7-apple-ios" Copied: llvm/trunk/test/CodeGen/X86/legalize-libcalls.ll (from r143261, llvm/trunk/test/CodeGen/X86/legalize-libcalls.ll) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/legalize-libcalls.ll?p2=llvm/trunk/test/CodeGen/X86/legalize-libcalls.ll&p1=llvm/trunk/test/CodeGen/X86/legalize-libcalls.ll&r1=143261&r2=143660&rev=143660&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/legalize-libcalls.ll (original) +++ llvm/trunk/test/CodeGen/X86/legalize-libcalls.ll Thu Nov 3 16:49:52 2011 @@ -1,7 +1,7 @@ ; RUN: llc -march=x86 < %s +; RUN: llc -march=x86-64 < %s 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-n8:16:32-S128" -target triple = "i386-apple-macosx10.7.0" define float @MakeSphere(float %theta.079) nounwind { entry: @@ -15,5 +15,21 @@ ret float %add36 } +define hidden fastcc void @unroll_loop(i64 %storemerge32129) nounwind { +entry: + call fastcc void @copy_rtx() nounwind + call fastcc void @copy_rtx() nounwind + %tmp225 = alloca i8, i64 %storemerge32129, align 8 ; [#uses=0 type=i8*] + %cmp651201 = icmp slt i64 %storemerge32129, 0 ; [#uses=1 type=i1] + br i1 %cmp651201, label %for.body653.lr.ph, label %if.end638.for.end659_crit_edge + +for.body653.lr.ph: ; preds = %entry + unreachable + +if.end638.for.end659_crit_edge: ; preds = %entry + unreachable +} + declare float @cosf(float) nounwind readnone declare float @sinf(float) nounwind readnone +declare hidden fastcc void @copy_rtx() nounwind Modified: llvm/trunk/test/CodeGen/X86/sse3.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/sse3.ll?rev=143660&r1=143659&r2=143660&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/sse3.ll (original) +++ llvm/trunk/test/CodeGen/X86/sse3.ll Thu Nov 3 16:49:52 2011 @@ -16,10 +16,8 @@ ret void ; X64: t0: -; X64: movddup (%rsi), %xmm0 -; X64: pshuflw $0, %xmm0, %xmm0 -; X64: xorl %eax, %eax -; X64: pinsrw $0, %eax, %xmm0 +; X64: movdqa (%rsi), %xmm0 +; X64: pslldq $2, %xmm0 ; X64: movdqa %xmm0, (%rdi) ; X64: ret } @@ -31,9 +29,8 @@ ret <8 x i16> %tmp3 ; X64: t1: -; X64: movl (%rsi), %eax ; X64: movdqa (%rdi), %xmm0 -; X64: pinsrw $0, %eax, %xmm0 +; X64: pinsrw $0, (%rsi), %xmm0 ; X64: ret } @@ -168,7 +165,7 @@ ret void ; X64: t10: ; X64: pextrw $4, [[X0:%xmm[0-9]+]], %eax -; X64: unpcklpd [[X1:%xmm[0-9]+]] +; X64: movlhps [[X1:%xmm[0-9]+]] ; X64: pshuflw $8, [[X1]], [[X2:%xmm[0-9]+]] ; X64: pinsrw $2, %eax, [[X2]] ; X64: pextrw $6, [[X0]], %eax @@ -250,13 +247,12 @@ %tmp9 = shufflevector <16 x i8> %tmp8, <16 x i8> %T0, <16 x i32> < i32 0, i32 1, i32 2, i32 17, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef , i32 undef > ret <16 x i8> %tmp9 ; X64: t16: -; X64: pinsrw $0, %eax, [[X1:%xmm[0-9]+]] -; X64: pextrw $8, [[X0:%xmm[0-9]+]], %eax -; X64: pinsrw $1, %eax, [[X1]] -; X64: pextrw $1, [[X1]], %ecx -; X64: movd [[X1]], %edx -; X64: pinsrw $0, %edx, %xmm -; X64: pinsrw $1, %eax, %xmm +; X64: movdqa %xmm1, %xmm0 +; X64: pslldq $2, %xmm0 +; X64: pextrw $1, %xmm0, %eax +; X64: movd %xmm0, %ecx +; X64: pinsrw $0, %ecx, %xmm0 +; X64: pextrw $8, %xmm1, %ecx ; X64: ret } From dmalyshev at accesssoftek.com Thu Nov 3 16:54:04 2011 From: dmalyshev at accesssoftek.com (Danil Malyshev) Date: Thu, 3 Nov 2011 14:54:04 -0700 Subject: [llvm-commits] MachOObjectFile fix functions Message-ID: <6AE1604EE3EC5F4296C096518C6B77EE1805B07349@mail.accesssoftek.com> Hello everyone, Please find attached the patch for review. The patch changed several MachOObjectFile functions: - Fix getSymbolOffset(), getSymbolAddress() and getRelocationAddress(), now it's works same as in ELFObjectFile. - Add implementation getSymbolSize() Regards, Danil -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111103/1a198322/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: MachOObjectFile_fix_functions-01.patch Type: application/octet-stream Size: 4066 bytes Desc: MachOObjectFile_fix_functions-01.patch Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111103/1a198322/attachment.obj From eli.friedman at gmail.com Thu Nov 3 17:09:10 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Thu, 3 Nov 2011 15:09:10 -0700 Subject: [llvm-commits] [llvm] r143630 - in /llvm/trunk: lib/Transforms/Scalar/DeadStoreElimination.cpp test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll In-Reply-To: <20111103180156.8DCC52A6C12C@llvm.org> References: <20111103180156.8DCC52A6C12C@llvm.org> Message-ID: On Thu, Nov 3, 2011 at 11:01 AM, Pete Cooper wrote: > Author: pete > Date: Thu Nov ?3 13:01:56 2011 > New Revision: 143630 > > URL: http://llvm.org/viewvc/llvm-project?rev=143630&view=rev > Log: > DeadStoreElimination can now trim the size of a store if the end of it is dead. > > Only currently done if the later store is writing to a power of 2 address or > has the same alignment as the earlier store as then its likely to not break up > large stores into smaller ones > > Fixes This appears to be causing a bunch of failures on buildbots; please fix or revert. -Eli > Added: > ? ?llvm/trunk/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll > Modified: > ? ?llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp > > Modified: llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp?rev=143630&r1=143629&r2=143630&view=diff > ============================================================================== > --- llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp (original) > +++ llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp Thu Nov ?3 13:01:56 2011 > @@ -239,6 +239,24 @@ > ? } > ?} > > + > +/// isShortenable - Returns true if this instruction can be safely shortened in > +/// length. > +static bool isShortenable(Instruction *I) { > + ?// Don't shorten stores for now > + ?if (isa(I)) > + ? ?return false; > + > + ?IntrinsicInst *II = cast(I); > + ?switch (II->getIntrinsicID()) { > + ? ?default: return false; > + ? ?case Intrinsic::memset: > + ? ?case Intrinsic::memcpy: > + ? ? ?// Do shorten memory intrinsics. > + ? ? ?return true; > + ?} > +} > + > ?/// getStoredPointerOperand - Return the pointer that is being written to. > ?static Value *getStoredPointerOperand(Instruction *I) { > ? if (StoreInst *SI = dyn_cast(I)) > @@ -293,11 +311,24 @@ > ? return false; > ?} > > -/// isCompleteOverwrite - Return true if a store to the 'Later' location > +namespace { > + ?enum OverwriteResult > + ?{ > + ? ?OverwriteComplete, > + ? ?OverwriteEnd, > + ? ?OverwriteUnknown > + ?}; > +} > + > +/// isOverwrite - Return 'OverwriteComplete' if a store to the 'Later' location > ?/// completely overwrites a store to the 'Earlier' location. > -static bool isCompleteOverwrite(const AliasAnalysis::Location &Later, > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?const AliasAnalysis::Location &Earlier, > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?AliasAnalysis &AA) { > +/// 'OverwriteEnd' if the end of the 'Earlier' location is completely > +/// overwritten by 'Later', or 'OverwriteUnknown' if nothing can be determined > +static OverwriteResult isOverwrite(const AliasAnalysis::Location &Later, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? const AliasAnalysis::Location &Earlier, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? AliasAnalysis &AA, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? int64_t& EarlierOff, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? int64_t& LaterOff) { > ? const Value *P1 = Earlier.Ptr->stripPointerCasts(); > ? const Value *P2 = Later.Ptr->stripPointerCasts(); > > @@ -311,23 +342,24 @@ > ? ? ? // If we have no TargetData information around, then the size of the store > ? ? ? // is inferrable from the pointee type. ?If they are the same type, then > ? ? ? // we know that the store is safe. > - ? ? ?if (AA.getTargetData() == 0) > - ? ? ? ?return Later.Ptr->getType() == Earlier.Ptr->getType(); > - ? ? ?return false; > + ? ? ?if (AA.getTargetData() == 0 && > + ? ? ? ? ?Later.Ptr->getType() == Earlier.Ptr->getType()) > + ? ? ? ?return OverwriteComplete; > + > + ? ? ?return OverwriteUnknown; > ? ? } > > ? ? // Make sure that the Later size is >= the Earlier size. > - ? ?if (Later.Size < Earlier.Size) > - ? ? ?return false; > - ? ?return true; > + ? ?if (Later.Size >= Earlier.Size) > + ? ? ?return OverwriteComplete; > ? } > > ? // Otherwise, we have to have size information, and the later store has to be > ? // larger than the earlier one. > ? if (Later.Size == AliasAnalysis::UnknownSize || > ? ? ? Earlier.Size == AliasAnalysis::UnknownSize || > - ? ? ?Later.Size <= Earlier.Size || AA.getTargetData() == 0) > - ? ?return false; > + ? ? ?AA.getTargetData() == 0) > + ? ?return OverwriteUnknown; > > ? // Check to see if the later store is to the entire object (either a global, > ? // an alloca, or a byval argument). ?If so, then it clearly overwrites any > @@ -340,26 +372,27 @@ > ? // If we can't resolve the same pointers to the same object, then we can't > ? // analyze them at all. > ? if (UO1 != UO2) > - ? ?return false; > + ? ?return OverwriteUnknown; > > ? // If the "Later" store is to a recognizable object, get its size. > ? if (isObjectPointerWithTrustworthySize(UO2)) { > ? ? uint64_t ObjectSize = > ? ? ? TD.getTypeAllocSize(cast(UO2->getType())->getElementType()); > ? ? if (ObjectSize == Later.Size) > - ? ? ?return true; > + ? ? ?return OverwriteComplete; > ? } > > ? // Okay, we have stores to two completely different pointers. ?Try to > ? // decompose the pointer into a "base + constant_offset" form. ?If the base > ? // pointers are equal, then we can reason about the two stores. > - ?int64_t EarlierOff = 0, LaterOff = 0; > + ?EarlierOff = 0; > + ?LaterOff = 0; > ? const Value *BP1 = GetPointerBaseWithConstantOffset(P1, EarlierOff, TD); > ? const Value *BP2 = GetPointerBaseWithConstantOffset(P2, LaterOff, TD); > > ? // If the base pointers still differ, we have two completely different stores. > ? if (BP1 != BP2) > - ? ?return false; > + ? ?return OverwriteUnknown; > > ? // The later store completely overlaps the earlier store if: > ? // > @@ -377,11 +410,24 @@ > ? // > ? // We have to be careful here as *Off is signed while *.Size is unsigned. > ? if (EarlierOff >= LaterOff && > + ? ? ?Later.Size > Earlier.Size && > ? ? ? uint64_t(EarlierOff - LaterOff) + Earlier.Size <= Later.Size) > - ? ?return true; > + ? ?return OverwriteComplete; > + > + ?// The other interesting case is if the later store overwrites the end of > + ?// the earlier store > + ?// > + ?// ? ? ?|--earlier--| > + ?// ? ? ? ? ? ? ? ?|-- ? later ? --| > + ?// > + ?// In this case we may want to trim the size of earlier to avoid generating > + ?// writes to addresses which will definitely be overwritten later > + ?if (LaterOff > EarlierOff && > + ? ? ?LaterOff + Later.Size >= EarlierOff + Earlier.Size) > + ? ?return OverwriteEnd; > > ? // Otherwise, they don't completely overlap. > - ?return false; > + ?return OverwriteUnknown; > ?} > > ?/// isPossibleSelfRead - If 'Inst' might be a self read (i.e. a noop copy of a > @@ -505,22 +551,52 @@ > ? ? ? // If we find a write that is a) removable (i.e., non-volatile), b) is > ? ? ? // completely obliterated by the store to 'Loc', and c) which we know that > ? ? ? // 'Inst' doesn't load from, then we can remove it. > - ? ? ?if (isRemovable(DepWrite) && isCompleteOverwrite(Loc, DepLoc, *AA) && > + ? ? ?if (isRemovable(DepWrite) && > ? ? ? ? ? !isPossibleSelfRead(Inst, Loc, DepWrite, *AA)) { > - ? ? ? ?DEBUG(dbgs() << "DSE: Remove Dead Store:\n ?DEAD: " > - ? ? ? ? ? ? ?<< *DepWrite << "\n ?KILLER: " << *Inst << '\n'); > - > - ? ? ? ?// Delete the store and now-dead instructions that feed it. > - ? ? ? ?DeleteDeadInstruction(DepWrite, *MD); > - ? ? ? ?++NumFastStores; > - ? ? ? ?MadeChange = true; > + ? ? ? ?int64_t InstWriteOffset, DepWriteOffset; > + ? ? ? ?OverwriteResult OR = isOverwrite(Loc, DepLoc, *AA, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? DepWriteOffset, InstWriteOffset); > + ? ? ? ?if (OR == OverwriteComplete) { > + ? ? ? ? ?DEBUG(dbgs() << "DSE: Remove Dead Store:\n ?DEAD: " > + ? ? ? ? ? ? ? ?<< *DepWrite << "\n ?KILLER: " << *Inst << '\n'); > > - ? ? ? ?// DeleteDeadInstruction can delete the current instruction in loop > - ? ? ? ?// cases, reset BBI. > - ? ? ? ?BBI = Inst; > - ? ? ? ?if (BBI != BB.begin()) > - ? ? ? ? ?--BBI; > - ? ? ? ?break; > + ? ? ? ? ?// Delete the store and now-dead instructions that feed it. > + ? ? ? ? ?DeleteDeadInstruction(DepWrite, *MD); > + ? ? ? ? ?++NumFastStores; > + ? ? ? ? ?MadeChange = true; > + > + ? ? ? ? ?// DeleteDeadInstruction can delete the current instruction in loop > + ? ? ? ? ?// cases, reset BBI. > + ? ? ? ? ?BBI = Inst; > + ? ? ? ? ?if (BBI != BB.begin()) > + ? ? ? ? ? ?--BBI; > + ? ? ? ? ?break; > + ? ? ? ?} else if (OR == OverwriteEnd && isShortenable(DepWrite)) { > + ? ? ? ? ?// TODO: base this on the target vector size so that if the earlier > + ? ? ? ? ?// store was too small to get vector writes anyway then its likely > + ? ? ? ? ?// a good idea to shorten it > + ? ? ? ? ?// Power of 2 vector writes are probably always a bad idea to optimize > + ? ? ? ? ?// as any store/memset/memcpy is likely using vector instructions so > + ? ? ? ? ?// shortening it to not vector size is likely to be slower > + ? ? ? ? ?MemIntrinsic* DepIntrinsic = cast(DepWrite); > + ? ? ? ? ?unsigned DepWriteAlign = DepIntrinsic->getAlignment(); > + ? ? ? ? ?if (llvm::isPowerOf2_64(InstWriteOffset) || > + ? ? ? ? ? ? ?((DepWriteAlign != 0) && InstWriteOffset % DepWriteAlign == 0)) { > + > + ? ? ? ? ? ?DEBUG(dbgs() << "DSE: Remove Dead Store:\n ?OW END: " > + ? ? ? ? ? ? ? ? ?<< *DepWrite << "\n ?KILLER (offset " > + ? ? ? ? ? ? ? ? ?<< InstWriteOffset << ", " > + ? ? ? ? ? ? ? ? ?<< DepLoc.Size << ")" > + ? ? ? ? ? ? ? ? ?<< *Inst << '\n'); > + > + ? ? ? ? ? ?Value* DepWriteLength = DepIntrinsic->getLength(); > + ? ? ? ? ? ?Value* TrimmedLength = ConstantInt::get(DepWriteLength->getType(), > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?InstWriteOffset - > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?DepWriteOffset); > + ? ? ? ? ? ?DepIntrinsic->setLength(TrimmedLength); > + ? ? ? ? ? ?MadeChange = true; > + ? ? ? ? ?} > + ? ? ? ?} > ? ? ? } > > ? ? ? // If this is a may-aliased store that is clobbering the store value, we > > Added: llvm/trunk/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll?rev=143630&view=auto > ============================================================================== > --- llvm/trunk/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll (added) > +++ llvm/trunk/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll Thu Nov ?3 13:01:56 2011 > @@ -0,0 +1,78 @@ > +; RUN: opt < %s -basicaa -dse -S | FileCheck %s > +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-S128" > + > +%struct.vec2 = type { <4 x i32>, <4 x i32> } > +%struct.vec2plusi = type { <4 x i32>, <4 x i32>, i32 } > + > + at glob1 = global %struct.vec2 zeroinitializer, align 16 > + at glob2 = global %struct.vec2plusi zeroinitializer, align 16 > + > +define void @write24to28(i32* nocapture %p) nounwind uwtable ssp { > +; CHECK: @write24to28 > +entry: > + ?%arrayidx0 = getelementptr inbounds i32* %p, i64 1 > + ?%p3 = bitcast i32* %arrayidx0 to i8* > +; CHECK: call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 24, i32 4, i1 false) > + ?call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 28, i32 4, i1 false) > + ?%arrayidx1 = getelementptr inbounds i32* %p, i64 7 > + ?store i32 1, i32* %arrayidx1, align 4 > + ?ret void > +} > + > +define void @write28to32(i32* nocapture %p) nounwind uwtable ssp { > +; CHECK: @write28to32 > +entry: > + ?%p3 = bitcast i32* %p to i8* > +; CHECK: call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 28, i32 4, i1 false) > + ?call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 32, i32 4, i1 false) > + ?%arrayidx1 = getelementptr inbounds i32* %p, i64 7 > + ?store i32 1, i32* %arrayidx1, align 4 > + ?ret void > +} > + > +define void @dontwrite28to32memset(i32* nocapture %p) nounwind uwtable ssp { > +; CHECK: @dontwrite28to32memset > +entry: > + ?%p3 = bitcast i32* %p to i8* > +; CHECK: call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 32, i32 16, i1 false) > + ?call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 32, i32 16, i1 false) > + ?%arrayidx1 = getelementptr inbounds i32* %p, i64 7 > + ?store i32 1, i32* %arrayidx1, align 4 > + ?ret void > +} > + > +define void @write32to36(%struct.vec2plusi* nocapture %p) nounwind uwtable ssp { > +; CHECK: @write32to36 > +entry: > + ?%0 = bitcast %struct.vec2plusi* %p to i8* > +; CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2plusi* @glob2 to i8*), i64 32, i32 16, i1 false) > + ?tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2plusi* @glob2 to i8*), i64 36, i32 16, i1 false) > + ?%c = getelementptr inbounds %struct.vec2plusi* %p, i64 0, i32 2 > + ?store i32 1, i32* %c, align 4 > + ?ret void > +} > + > +define void @write16to32(%struct.vec2* nocapture %p) nounwind uwtable ssp { > +; CHECK: @write16to32 > +entry: > + ?%0 = bitcast %struct.vec2* %p to i8* > +; CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2* @glob1 to i8*), i64 16, i32 16, i1 false) > + ?tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2* @glob1 to i8*), i64 32, i32 16, i1 false) > + ?%c = getelementptr inbounds %struct.vec2* %p, i64 0, i32 1 > + ?store <4 x i32> , <4 x i32>* %c, align 4 > + ?ret void > +} > + > +define void @dontwrite28to32memcpy(%struct.vec2* nocapture %p) nounwind uwtable ssp { > +; CHECK: @dontwrite28to32memcpy > +entry: > + ?%0 = bitcast %struct.vec2* %p to i8* > +; CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2* @glob1 to i8*), i64 32, i32 16, i1 false) > + ?tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2* @glob1 to i8*), i64 32, i32 16, i1 false) > + ?%arrayidx1 = getelementptr inbounds %struct.vec2* %p, i64 0, i32 0, i64 7 > + ?store i32 1, i32* %arrayidx1, align 4 > + ?ret void > +} > + > +declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind > +declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > From daniel at zuster.org Thu Nov 3 17:46:19 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Thu, 03 Nov 2011 22:46:19 -0000 Subject: [llvm-commits] [llvm] r143661 - in /llvm/trunk: docs/CommandGuide/llvm-build.pod utils/llvm-build/llvmbuild/main.py Message-ID: <20111103224619.B45882A6C12C@llvm.org> Author: ddunbar Date: Thu Nov 3 17:46:19 2011 New Revision: 143661 URL: http://llvm.org/viewvc/llvm-project?rev=143661&view=rev Log: llvm-build: Add initial code for --write-make-fragment. Modified: llvm/trunk/docs/CommandGuide/llvm-build.pod llvm/trunk/utils/llvm-build/llvmbuild/main.py Modified: llvm/trunk/docs/CommandGuide/llvm-build.pod URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CommandGuide/llvm-build.pod?rev=143661&r1=143660&r2=143661&view=diff ============================================================================== --- llvm/trunk/docs/CommandGuide/llvm-build.pod (original) +++ llvm/trunk/docs/CommandGuide/llvm-build.pod Thu Nov 3 17:46:19 2011 @@ -48,6 +48,13 @@ Write out new I files based on the loaded components. This is useful for auto-upgrading the schema of the files. +=item B<--write-make-fragment> + +Write out the LLVMBuild in the form of a Makefile fragment, so it can easily be +consumed by a Make based build system. The exact contents and format of this +file are closely tied to how LLVMBuild is integrated with the Makefiles, see +LLVM's Makefile.rules. + =item B<--llvmbuild-source-root>=I If given, expect the I files for the project to be rooted at the Modified: llvm/trunk/utils/llvm-build/llvmbuild/main.py URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvm-build/llvmbuild/main.py?rev=143661&r1=143660&r2=143661&view=diff ============================================================================== --- llvm/trunk/utils/llvm-build/llvmbuild/main.py (original) +++ llvm/trunk/utils/llvm-build/llvmbuild/main.py Thu Nov 3 17:46:19 2011 @@ -286,6 +286,94 @@ print >>f, '};' f.close() + def write_make_fragment(self, output_path): + """ + write_make_fragment(output_path) -> None + + Generate a Makefile fragment which includes all of the collated + LLVMBuild information in a format that is easily digestible by a + Makefile. The exact contents of this are closely tied to how the LLVM + Makefiles integrate LLVMBuild, see Makefile.rules in the top-level. + """ + + # Construct a list of all the dependencies of the Makefile fragment + # itself. These include all the LLVMBuild files themselves, as well as + # all of our own sources. + dependencies = [] + for ci in self.component_infos: + dependencies.append(os.path.join(self.source_root, ci.subpath[1:])) + + # Gather the list of necessary sources by just finding all loaded + # modules that are inside the LLVM source tree. + for module in sys.modules.values(): + # Find the module path. + if not hasattr(module, '__file__'): + continue + path = getattr(module, '__file__') + if not path: + continue + + # Strip off any compiled suffix. + if os.path.splitext(path)[1] in ['.pyc', '.pyo', '.pyd']: + path = path[:-1] + + # If the path exists and is in the source tree, consider it a + # dependency. + if (path.startswith(self.source_root) and os.path.exists(path)): + dependencies.append(path) + + # Write out the Makefile fragment. + f = open(output_path, 'w') + + # Write the header. + header_fmt = '\ +#===-- %s - LLVMBuild Configuration for LLVM %s-*- Makefile -*--===#' + header_name = os.path.basename(output_path) + header_pad = '-' * (80 - len(header_fmt % (header_name, ''))) + header_string = header_fmt % (header_name, header_pad) + print >>f, """\ +%s +# +# 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 LLVMBuild project information in a format easily +# consumed by the Makefile based build system. +# +# This file is autogenerated by llvm-build, do not edit! +# +#===------------------------------------------------------------------------===# +""" % header_string + + # Write the dependencies for the fragment. + # + # FIXME: Technically, we need to properly quote for Make here. + print >>f, """\ +# Clients must explicitly enable LLVMBUILD_INCLUDE_DEPENDENCIES to get +# these dependencies. This is a compromise to help improve the +# performance of recursive Make systems.""" + print >>f, 'ifeq ($(LLVMBUILD_INCLUDE_DEPENDENCIES),1)' + print >>f, "# The dependencies for this Makefile fragment itself." + print >>f, "%s: \\" % (output_path,) + for dep in dependencies: + print >>f, "\t%s \\" % (dep,) + print >>f + + # Generate dummy rules for each of the dependencies, so that things + # continue to work correctly if any of those files are moved or removed. + print >>f, """\ +# The dummy targets to allow proper regeneration even when files are moved or +# removed.""" + for dep in dependencies: + print >>f, "%s:" % (dep,) + print >>f, 'endif' + + f.close() + def main(): from optparse import OptionParser, OptionGroup parser = OptionParser("usage: %prog [options]") @@ -302,6 +390,10 @@ dest="write_library_table", metavar="PATH", help="Write the C++ library dependency table to PATH", action="store", default=None) + parser.add_option("", "--write-make-fragment", + dest="write_make_fragment", metavar="PATH", + help="Write the Makefile project information to PATH", + action="store", default=None) parser.add_option("", "--llvmbuild-source-root", dest="llvmbuild_source_root", help=( @@ -342,5 +434,9 @@ if opts.write_library_table: project_info.write_library_table(opts.write_library_table) + # Write out the required librariy, if requested. + if opts.write_make_fragment: + project_info.write_make_fragment(opts.write_make_fragment) + if __name__=='__main__': main() From daniel at zuster.org Thu Nov 3 17:46:21 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Thu, 03 Nov 2011 22:46:21 -0000 Subject: [llvm-commits] [llvm] r143662 - /llvm/trunk/Makefile.rules Message-ID: <20111103224622.08E1A2A6C12C@llvm.org> Author: ddunbar Date: Thu Nov 3 17:46:21 2011 New Revision: 143662 URL: http://llvm.org/viewvc/llvm-project?rev=143662&view=rev Log: build/Make: Integrate llvm-build into Makefiles. - Basically, we coordinate with llvm-build to create a Makefile fragment we can easily use. For now, nothing is wired in except the support to automatically regenerate this file when necessary. Modified: llvm/trunk/Makefile.rules Modified: llvm/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=143662&r1=143661&r2=143662&view=diff ============================================================================== --- llvm/trunk/Makefile.rules (original) +++ llvm/trunk/Makefile.rules Thu Nov 3 17:46:21 2011 @@ -57,6 +57,54 @@ $(UserTargets):: +#------------------------------------------------------------------------ +# LLVMBuild Integration +#------------------------------------------------------------------------ +# +# We use llvm-build to generate all the data required by the Makefile based +# build system in one swoop: +# +# - We generate a file (a Makefile fragment) in the object root which contains +# all the definitions that are required by Makefiles across the entire +# project. +# +# - We generate the library table used by llvm-config. +# +# - We generate the dependencies for the Makefile fragment, so that we will +# automatically reconfigure outselves. + +# The path to the llvm-build tool itself. +LLVMBuildTool := $(PROJ_SRC_ROOT)/utils/llvm-build/llvm-build + +# The files we are going to generate using llvm-build. +LLVMBuildMakeFrag := $(PROJ_OBJ_ROOT)/Makefile.llvmbuild +LLVMConfigLibraryDependenciesInc := \ + $(PROJ_OBJ_ROOT)/tools/llvm-config/LibraryDependencies.inc + +# The rule to create the LLVMBuild Makefile fragment as well as the llvm-config +# library table. +# +# Note that this target gets its real dependencies generated for us by +# llvm-build. +$(LLVMBuildMakeFrag): + $(EchoCmd) Constructing LLVMBuild project information. ; \ + $(LLVMBuildTool) \ + --write-library-table $(LLVMConfigLibraryDependenciesInc) \ + --write-make-fragment $(LLVMBuildMakeFrag) + +# Include the generated Makefile fragment. +# +# We currently only include the dependencies for the fragment itself if we are +# at the top-level. Otherwise, recursive invocations would ends up doing +# substantially more redundant stat'ing. +# +# This means that we won't properly regenerate things for developers used to +# building from a subdirectory, but that is always somewhat unreliable. +ifeq ($(LEVEL),.) +LLVMBUILD_INCLUDE_DEPENDENCIES := 1 +endif +-include $(LLVMBuildMakeFrag) + ################################################################################ # PRECONDITIONS: that which must be built/checked first ################################################################################ From daniel at zuster.org Thu Nov 3 18:01:50 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Thu, 03 Nov 2011 23:01:50 -0000 Subject: [llvm-commits] [llvm] r143664 - /llvm/trunk/Makefile.rules Message-ID: <20111103230150.7016C2A6C12C@llvm.org> Author: ddunbar Date: Thu Nov 3 18:01:50 2011 New Revision: 143664 URL: http://llvm.org/viewvc/llvm-project?rev=143664&view=rev Log: build: Use right Echo variable and use Verb appropriately. Modified: llvm/trunk/Makefile.rules Modified: llvm/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=143664&r1=143663&r2=143664&view=diff ============================================================================== --- llvm/trunk/Makefile.rules (original) +++ llvm/trunk/Makefile.rules Thu Nov 3 18:01:50 2011 @@ -87,8 +87,8 @@ # Note that this target gets its real dependencies generated for us by # llvm-build. $(LLVMBuildMakeFrag): - $(EchoCmd) Constructing LLVMBuild project information. ; \ - $(LLVMBuildTool) \ + $(Echo) Constructing LLVMBuild project information. + $(Verb) $(LLVMBuildTool) \ --write-library-table $(LLVMConfigLibraryDependenciesInc) \ --write-make-fragment $(LLVMBuildMakeFrag) From daniel at zuster.org Thu Nov 3 19:48:26 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Fri, 04 Nov 2011 00:48:26 -0000 Subject: [llvm-commits] [llvm] r143668 - in /llvm/trunk: lib/Transforms/Scalar/DeadStoreElimination.cpp test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll Message-ID: <20111104004827.03E522A6C12C@llvm.org> Author: ddunbar Date: Thu Nov 3 19:48:26 2011 New Revision: 143668 URL: http://llvm.org/viewvc/llvm-project?rev=143668&view=rev Log: Speculatively revert "DeadStoreElimination can now trim the size of a store if the end of it is dead.", which appears to break bootstrapping LLVM. Removed: llvm/trunk/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll Modified: llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp Modified: llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp?rev=143668&r1=143667&r2=143668&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp Thu Nov 3 19:48:26 2011 @@ -239,24 +239,6 @@ } } - -/// isShortenable - Returns true if this instruction can be safely shortened in -/// length. -static bool isShortenable(Instruction *I) { - // Don't shorten stores for now - if (isa(I)) - return false; - - IntrinsicInst *II = cast(I); - switch (II->getIntrinsicID()) { - default: return false; - case Intrinsic::memset: - case Intrinsic::memcpy: - // Do shorten memory intrinsics. - return true; - } -} - /// getStoredPointerOperand - Return the pointer that is being written to. static Value *getStoredPointerOperand(Instruction *I) { if (StoreInst *SI = dyn_cast(I)) @@ -311,24 +293,11 @@ return false; } -namespace { - enum OverwriteResult - { - OverwriteComplete, - OverwriteEnd, - OverwriteUnknown - }; -} - -/// isOverwrite - Return 'OverwriteComplete' if a store to the 'Later' location +/// isCompleteOverwrite - Return true if a store to the 'Later' location /// completely overwrites a store to the 'Earlier' location. -/// 'OverwriteEnd' if the end of the 'Earlier' location is completely -/// overwritten by 'Later', or 'OverwriteUnknown' if nothing can be determined -static OverwriteResult isOverwrite(const AliasAnalysis::Location &Later, - const AliasAnalysis::Location &Earlier, - AliasAnalysis &AA, - int64_t& EarlierOff, - int64_t& LaterOff) { +static bool isCompleteOverwrite(const AliasAnalysis::Location &Later, + const AliasAnalysis::Location &Earlier, + AliasAnalysis &AA) { const Value *P1 = Earlier.Ptr->stripPointerCasts(); const Value *P2 = Later.Ptr->stripPointerCasts(); @@ -342,24 +311,23 @@ // If we have no TargetData information around, then the size of the store // is inferrable from the pointee type. If they are the same type, then // we know that the store is safe. - if (AA.getTargetData() == 0 && - Later.Ptr->getType() == Earlier.Ptr->getType()) - return OverwriteComplete; - - return OverwriteUnknown; + if (AA.getTargetData() == 0) + return Later.Ptr->getType() == Earlier.Ptr->getType(); + return false; } // Make sure that the Later size is >= the Earlier size. - if (Later.Size >= Earlier.Size) - return OverwriteComplete; + if (Later.Size < Earlier.Size) + return false; + return true; } // Otherwise, we have to have size information, and the later store has to be // larger than the earlier one. if (Later.Size == AliasAnalysis::UnknownSize || Earlier.Size == AliasAnalysis::UnknownSize || - AA.getTargetData() == 0) - return OverwriteUnknown; + Later.Size <= Earlier.Size || AA.getTargetData() == 0) + return false; // Check to see if the later store is to the entire object (either a global, // an alloca, or a byval argument). If so, then it clearly overwrites any @@ -372,27 +340,26 @@ // If we can't resolve the same pointers to the same object, then we can't // analyze them at all. if (UO1 != UO2) - return OverwriteUnknown; + return false; // If the "Later" store is to a recognizable object, get its size. if (isObjectPointerWithTrustworthySize(UO2)) { uint64_t ObjectSize = TD.getTypeAllocSize(cast(UO2->getType())->getElementType()); if (ObjectSize == Later.Size) - return OverwriteComplete; + return true; } // Okay, we have stores to two completely different pointers. Try to // decompose the pointer into a "base + constant_offset" form. If the base // pointers are equal, then we can reason about the two stores. - EarlierOff = 0; - LaterOff = 0; + int64_t EarlierOff = 0, LaterOff = 0; const Value *BP1 = GetPointerBaseWithConstantOffset(P1, EarlierOff, TD); const Value *BP2 = GetPointerBaseWithConstantOffset(P2, LaterOff, TD); // If the base pointers still differ, we have two completely different stores. if (BP1 != BP2) - return OverwriteUnknown; + return false; // The later store completely overlaps the earlier store if: // @@ -410,24 +377,11 @@ // // We have to be careful here as *Off is signed while *.Size is unsigned. if (EarlierOff >= LaterOff && - Later.Size > Earlier.Size && uint64_t(EarlierOff - LaterOff) + Earlier.Size <= Later.Size) - return OverwriteComplete; - - // The other interesting case is if the later store overwrites the end of - // the earlier store - // - // |--earlier--| - // |-- later --| - // - // In this case we may want to trim the size of earlier to avoid generating - // writes to addresses which will definitely be overwritten later - if (LaterOff > EarlierOff && - LaterOff + Later.Size >= EarlierOff + Earlier.Size) - return OverwriteEnd; + return true; // Otherwise, they don't completely overlap. - return OverwriteUnknown; + return false; } /// isPossibleSelfRead - If 'Inst' might be a self read (i.e. a noop copy of a @@ -551,52 +505,22 @@ // If we find a write that is a) removable (i.e., non-volatile), b) is // completely obliterated by the store to 'Loc', and c) which we know that // 'Inst' doesn't load from, then we can remove it. - if (isRemovable(DepWrite) && + if (isRemovable(DepWrite) && isCompleteOverwrite(Loc, DepLoc, *AA) && !isPossibleSelfRead(Inst, Loc, DepWrite, *AA)) { - int64_t InstWriteOffset, DepWriteOffset; - OverwriteResult OR = isOverwrite(Loc, DepLoc, *AA, - DepWriteOffset, InstWriteOffset); - if (OR == OverwriteComplete) { - DEBUG(dbgs() << "DSE: Remove Dead Store:\n DEAD: " - << *DepWrite << "\n KILLER: " << *Inst << '\n'); + DEBUG(dbgs() << "DSE: Remove Dead Store:\n DEAD: " + << *DepWrite << "\n KILLER: " << *Inst << '\n'); - // Delete the store and now-dead instructions that feed it. - DeleteDeadInstruction(DepWrite, *MD); - ++NumFastStores; - MadeChange = true; - - // DeleteDeadInstruction can delete the current instruction in loop - // cases, reset BBI. - BBI = Inst; - if (BBI != BB.begin()) - --BBI; - break; - } else if (OR == OverwriteEnd && isShortenable(DepWrite)) { - // TODO: base this on the target vector size so that if the earlier - // store was too small to get vector writes anyway then its likely - // a good idea to shorten it - // Power of 2 vector writes are probably always a bad idea to optimize - // as any store/memset/memcpy is likely using vector instructions so - // shortening it to not vector size is likely to be slower - MemIntrinsic* DepIntrinsic = cast(DepWrite); - unsigned DepWriteAlign = DepIntrinsic->getAlignment(); - if (llvm::isPowerOf2_64(InstWriteOffset) || - ((DepWriteAlign != 0) && InstWriteOffset % DepWriteAlign == 0)) { - - DEBUG(dbgs() << "DSE: Remove Dead Store:\n OW END: " - << *DepWrite << "\n KILLER (offset " - << InstWriteOffset << ", " - << DepLoc.Size << ")" - << *Inst << '\n'); - - Value* DepWriteLength = DepIntrinsic->getLength(); - Value* TrimmedLength = ConstantInt::get(DepWriteLength->getType(), - InstWriteOffset - - DepWriteOffset); - DepIntrinsic->setLength(TrimmedLength); - MadeChange = true; - } - } + // Delete the store and now-dead instructions that feed it. + DeleteDeadInstruction(DepWrite, *MD); + ++NumFastStores; + MadeChange = true; + + // DeleteDeadInstruction can delete the current instruction in loop + // cases, reset BBI. + BBI = Inst; + if (BBI != BB.begin()) + --BBI; + break; } // If this is a may-aliased store that is clobbering the store value, we Removed: llvm/trunk/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll?rev=143667&view=auto ============================================================================== --- llvm/trunk/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll (original) +++ llvm/trunk/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll (removed) @@ -1,78 +0,0 @@ -; RUN: opt < %s -basicaa -dse -S | FileCheck %s -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-S128" - -%struct.vec2 = type { <4 x i32>, <4 x i32> } -%struct.vec2plusi = type { <4 x i32>, <4 x i32>, i32 } - - at glob1 = global %struct.vec2 zeroinitializer, align 16 - at glob2 = global %struct.vec2plusi zeroinitializer, align 16 - -define void @write24to28(i32* nocapture %p) nounwind uwtable ssp { -; CHECK: @write24to28 -entry: - %arrayidx0 = getelementptr inbounds i32* %p, i64 1 - %p3 = bitcast i32* %arrayidx0 to i8* -; CHECK: call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 24, i32 4, i1 false) - call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 28, i32 4, i1 false) - %arrayidx1 = getelementptr inbounds i32* %p, i64 7 - store i32 1, i32* %arrayidx1, align 4 - ret void -} - -define void @write28to32(i32* nocapture %p) nounwind uwtable ssp { -; CHECK: @write28to32 -entry: - %p3 = bitcast i32* %p to i8* -; CHECK: call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 28, i32 4, i1 false) - call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 32, i32 4, i1 false) - %arrayidx1 = getelementptr inbounds i32* %p, i64 7 - store i32 1, i32* %arrayidx1, align 4 - ret void -} - -define void @dontwrite28to32memset(i32* nocapture %p) nounwind uwtable ssp { -; CHECK: @dontwrite28to32memset -entry: - %p3 = bitcast i32* %p to i8* -; CHECK: call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 32, i32 16, i1 false) - call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 32, i32 16, i1 false) - %arrayidx1 = getelementptr inbounds i32* %p, i64 7 - store i32 1, i32* %arrayidx1, align 4 - ret void -} - -define void @write32to36(%struct.vec2plusi* nocapture %p) nounwind uwtable ssp { -; CHECK: @write32to36 -entry: - %0 = bitcast %struct.vec2plusi* %p to i8* -; CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2plusi* @glob2 to i8*), i64 32, i32 16, i1 false) - tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2plusi* @glob2 to i8*), i64 36, i32 16, i1 false) - %c = getelementptr inbounds %struct.vec2plusi* %p, i64 0, i32 2 - store i32 1, i32* %c, align 4 - ret void -} - -define void @write16to32(%struct.vec2* nocapture %p) nounwind uwtable ssp { -; CHECK: @write16to32 -entry: - %0 = bitcast %struct.vec2* %p to i8* -; CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2* @glob1 to i8*), i64 16, i32 16, i1 false) - tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2* @glob1 to i8*), i64 32, i32 16, i1 false) - %c = getelementptr inbounds %struct.vec2* %p, i64 0, i32 1 - store <4 x i32> , <4 x i32>* %c, align 4 - ret void -} - -define void @dontwrite28to32memcpy(%struct.vec2* nocapture %p) nounwind uwtable ssp { -; CHECK: @dontwrite28to32memcpy -entry: - %0 = bitcast %struct.vec2* %p to i8* -; CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2* @glob1 to i8*), i64 32, i32 16, i1 false) - tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2* @glob1 to i8*), i64 32, i32 16, i1 false) - %arrayidx1 = getelementptr inbounds %struct.vec2* %p, i64 0, i32 0, i64 7 - store i32 1, i32* %arrayidx1, align 4 - ret void -} - -declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind -declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind From mcrosier at apple.com Thu Nov 3 19:50:21 2011 From: mcrosier at apple.com (Chad Rosier) Date: Fri, 04 Nov 2011 00:50:21 -0000 Subject: [llvm-commits] [llvm] r143669 - in /llvm/trunk: lib/Target/ARM/ARMFastISel.cpp test/CodeGen/ARM/fast-isel-ret.ll Message-ID: <20111104005021.91D212A6C12C@llvm.org> Author: mcrosier Date: Thu Nov 3 19:50:21 2011 New Revision: 143669 URL: http://llvm.org/viewvc/llvm-project?rev=143669&view=rev Log: Add fast-isel support for returning i1, i8, and i16. Added: llvm/trunk/test/CodeGen/ARM/fast-isel-ret.ll Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMFastISel.cpp?rev=143669&r1=143668&r2=143669&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMFastISel.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Thu Nov 3 19:50:21 2011 @@ -1751,19 +1751,32 @@ CCValAssign &VA = ValLocs[0]; // Don't bother handling odd stuff for now. - // FIXME: Should be able to handle i1, i8, and/or i16 return types. if (VA.getLocInfo() != CCValAssign::Full) return false; // Only handle register returns for now. if (!VA.isRegLoc()) return false; - // TODO: For now, don't try to handle cases where getLocInfo() - // says Full but the types don't match. - if (TLI.getValueType(RV->getType()) != VA.getValVT()) - return false; - // Make the copy. unsigned SrcReg = Reg + VA.getValNo(); + EVT RVVT = TLI.getValueType(RV->getType()); + EVT DestVT = VA.getValVT(); + // Special handling for extended integers. + if (RVVT != DestVT) { + if (RVVT != MVT::i1 && RVVT != MVT::i8 && RVVT != MVT::i16) + return false; + + if (!Outs[0].Flags.isZExt() && !Outs[0].Flags.isSExt()) + return false; + + assert(DestVT == MVT::i32 && "ARM should always ext to i32"); + + bool isZExt = Outs[0].Flags.isZExt(); + unsigned ResultReg = ARMEmitIntExt(RVVT, SrcReg, DestVT, isZExt); + if (ResultReg == 0) return false; + SrcReg = ResultReg; + } + + // Make the copy. unsigned DstReg = VA.getLocReg(); const TargetRegisterClass* SrcRC = MRI.getRegClass(SrcReg); // Avoid a cross-class copy. This is very unlikely. Added: llvm/trunk/test/CodeGen/ARM/fast-isel-ret.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-ret.ll?rev=143669&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/ARM/fast-isel-ret.ll (added) +++ llvm/trunk/test/CodeGen/ARM/fast-isel-ret.ll Thu Nov 3 19:50:21 2011 @@ -0,0 +1,48 @@ +; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-darwin | FileCheck %s +; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-darwin | FileCheck %s + +; Sign-extend of i1 currently not supported by fast-isel +;define signext i1 @ret0(i1 signext %a) nounwind uwtable ssp { +;entry: +; ret i1 %a +;} + +define zeroext i1 @ret1(i1 signext %a) nounwind uwtable ssp { +entry: +; CHECK: ret1 +; CHECK: and r0, r0, #1 +; CHECK: bx lr + ret i1 %a +} + +define signext i8 @ret2(i8 signext %a) nounwind uwtable ssp { +entry: +; CHECK: ret2 +; CHECK: sxtb r0, r0 +; CHECK: bx lr + ret i8 %a +} + +define zeroext i8 @ret3(i8 signext %a) nounwind uwtable ssp { +entry: +; CHECK: ret3 +; CHECK: uxtb r0, r0 +; CHECK: bx lr + ret i8 %a +} + +define signext i16 @ret4(i16 signext %a) nounwind uwtable ssp { +entry: +; CHECK: ret4 +; CHECK: sxth r0, r0 +; CHECK: bx lr + ret i16 %a +} + +define zeroext i16 @ret5(i16 signext %a) nounwind uwtable ssp { +entry: +; CHECK: ret5 +; CHECK: uxth r0, r0 +; CHECK: bx lr + ret i16 %a +} From eli.friedman at gmail.com Thu Nov 3 19:58:04 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Thu, 3 Nov 2011 17:58:04 -0700 Subject: [llvm-commits] [PATCH] Don't introduce custom nodes when building divide by constant after legalization In-Reply-To: <4EAFEF29.7080004@xmos.com> References: <4EAFEF29.7080004@xmos.com> Message-ID: On Tue, Nov 1, 2011 at 6:07 AM, Richard Osborne wrote: > This patch changes TargetLowering::BuildSDIV() and > TargetLowering::BuildUDIV() so they avoid introducing nodes that require > custom handling after legalization has taken place. This fixes PR11283. Looks fine; please commit. -Eli From mcrosier at apple.com Thu Nov 3 19:58:10 2011 From: mcrosier at apple.com (Chad Rosier) Date: Fri, 04 Nov 2011 00:58:10 -0000 Subject: [llvm-commits] [llvm] r143670 - /llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Message-ID: <20111104005810.688A02A6C12C@llvm.org> Author: mcrosier Date: Thu Nov 3 19:58:10 2011 New Revision: 143670 URL: http://llvm.org/viewvc/llvm-project?rev=143670&view=rev Log: Indentation. Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMFastISel.cpp?rev=143670&r1=143669&r2=143670&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMFastISel.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Thu Nov 3 19:58:10 2011 @@ -1947,7 +1947,7 @@ if (CS.paramHasAttr(AttrInd, Attribute::ZExt)) Flags.setZExt(); - // FIXME: Only handle *easy* calls for now. + // FIXME: Only handle *easy* calls for now. if (CS.paramHasAttr(AttrInd, Attribute::InReg) || CS.paramHasAttr(AttrInd, Attribute::StructRet) || CS.paramHasAttr(AttrInd, Attribute::Nest) || From daniel at zuster.org Thu Nov 3 20:05:26 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Thu, 3 Nov 2011 18:05:26 -0700 Subject: [llvm-commits] [llvm] r143616 - in /llvm/trunk/tools: CMakeLists.txt Makefile llvm-config-2/ llvm-config-2/CMakeLists.txt llvm-config-2/Makefile llvm-config-2/llvm-config.cpp In-Reply-To: References: <20111103173017.2560D2A6C12C@llvm.org> Message-ID: It was more or less a straightforward transliteration of the perl version, it should be straightforward to clean it up to be more LLVM like over time. - Daniel On Thu, Nov 3, 2011 at 12:43 PM, Chandler Carruth wrote: > On Thu, Nov 3, 2011 at 11:51 AM, Wesley Peck wrote: >> >> On Nov 3, 2011, at 12:30 PM, Daniel Dunbar wrote: >> > + ?for (int i = 1; i != argc; ++i) { >> > + ? ?StringRef Arg = argv[i]; >> > + >> > + ? ?if (Arg.startswith("-")) { >> > + ? ? ?HasAnyOption = true; >> > + ? ? ?if (Arg == "--version") { >> > + ? ? ? ?OS << PACKAGE_VERSION << '\n'; >> > + ? ? ?} else if (Arg == "--prefix") { >> > + ? ? ? ?OS << ActivePrefix << '\n'; >> > + ? ? ?} else if (Arg == "--bindir") { >> > + ? ? ? ?OS << ActiveBinDir << '\n'; >> > + ? ? ?} else if (Arg == "--includedir") { >> > + ? ? ? ?OS << ActiveIncludeDir << '\n'; >> > + ? ? ?} else if (Arg == "--libdir") { >> > + ? ? ? ?OS << ActiveLibDir << '\n'; >> > + ? ? ?} else if (Arg == "--cppflags") { >> > + ? ? ? ?OS << ActiveIncludeOption << ' ' << LLVM_CPPFLAGS << '\n'; >> > + ? ? ?} else if (Arg == "--cflags") { >> > + ? ? ? ?OS << ActiveIncludeOption << ' ' << LLVM_CFLAGS << '\n'; >> > + ? ? ?} else if (Arg == "--cxxflags") { >> > + ? ? ? ?OS << ActiveIncludeOption << ' ' << LLVM_CXXFLAGS << '\n'; >> > + ? ? ?} else if (Arg == "--ldflags") { >> > + ? ? ? ?OS << "-L" << ActiveLibDir << ' ' << LLVM_LDFLAGS >> > + ? ? ? ? ? << ' ' << LLVM_SYSTEM_LIBS << '\n'; >> > + ? ? ?} else if (Arg == "--libs") { >> > + ? ? ? ?PrintLibs = true; >> > + ? ? ?} else if (Arg == "--libnames") { >> > + ? ? ? ?PrintLibNames = true; >> > + ? ? ?} else if (Arg == "--libfiles") { >> > + ? ? ? ?PrintLibFiles = true; >> > + ? ? ?} else if (Arg == "--components") { >> > + ? ? ? ?for (unsigned j = 0; j != NumAvailableComponents; ++j) { >> > + ? ? ? ? ?if (j) >> > + ? ? ? ? ? ?OS << ' '; >> > + ? ? ? ? ?OS << AvailableComponents[j].Name; >> > + ? ? ? ?} >> > + ? ? ? ?OS << '\n'; >> > + ? ? ?} else if (Arg == "--targets-built") { >> > + ? ? ? ?bool First = true; >> > + ? ? ? ?for (TargetRegistry::iterator I = TargetRegistry::begin(), >> > + ? ? ? ? ? ? ? E = TargetRegistry::end(); I != E; First = false, ++I) { >> > + ? ? ? ? ?if (!First) >> > + ? ? ? ? ? ?OS << ' '; >> > + ? ? ? ? ?OS << I->getName(); >> > + ? ? ? ?} >> > + ? ? ? ?OS << '\n'; >> > + ? ? ?} else if (Arg == "--host-target") { >> > + ? ? ? ?OS << LLVM_DEFAULT_TARGET_TRIPLE << '\n'; >> > + ? ? ?} else if (Arg == "--build-mode") { >> > + ? ? ? ?OS << LLVM_BUILDMODE << '\n'; >> > + ? ? ?} else if (Arg == "--obj-root") { >> > + ? ? ? ?OS << LLVM_OBJ_ROOT << '\n'; >> > + ? ? ?} else if (Arg == "--src-root") { >> > + ? ? ? ?OS << LLVM_SRC_ROOT << '\n'; >> > + ? ? ?} else { >> > + ? ? ? ?usage(); >> > + ? ? ?} >> > + ? ?} else { >> > + ? ? ?Components.push_back(Arg); >> > + ? ?} >> > + ?} >> > + >> > + ?if (!HasAnyOption) >> > + ? ?usage(); >> >> Just out of curiosity, why not use LLVM's command line parsing library for >> this? Is is not capable of parsing the required syntax or are you trying to >> avoid some sort of dependency? It seems like it would be a lot cleaner and >> easier to maintain than this code. > > Agreed, this would be much cleaner using the commandline library. > Also, there is a lot of string manipulation and path manipulation that I > think would be cleaner using StringRef / Twine / raw_ostream-derivatives / > PathV2... if those libraries don't quite fit or aren't so clean to use, we > should improve them so that we can use them for exactly this type of ced. From daniel at zuster.org Thu Nov 3 20:09:03 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Fri, 04 Nov 2011 01:09:03 -0000 Subject: [llvm-commits] [llvm] r143673 - in /llvm/trunk/utils: llvm-compilers-check llvmbuild Message-ID: <20111104010903.13F0A2A6C12C@llvm.org> Author: ddunbar Date: Thu Nov 3 20:09:02 2011 New Revision: 143673 URL: http://llvm.org/viewvc/llvm-project?rev=143673&view=rev Log: utils: Rename the "llvmbuild" script to llvm-compilers-check. Added: llvm/trunk/utils/llvm-compilers-check - copied, changed from r143668, llvm/trunk/utils/llvmbuild Removed: llvm/trunk/utils/llvmbuild Copied: llvm/trunk/utils/llvm-compilers-check (from r143668, llvm/trunk/utils/llvmbuild) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvm-compilers-check?p2=llvm/trunk/utils/llvm-compilers-check&p1=llvm/trunk/utils/llvmbuild&r1=143668&r2=143673&rev=143673&view=diff ============================================================================== (empty) Removed: llvm/trunk/utils/llvmbuild URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvmbuild?rev=143672&view=auto ============================================================================== --- llvm/trunk/utils/llvmbuild (original) +++ llvm/trunk/utils/llvmbuild (removed) @@ -1,778 +0,0 @@ -#!/usr/bin/python3 -##===- utils/llvmbuild - Build the LLVM project ----------------*-python-*-===## -# -# The LLVM Compiler Infrastructure -# -# This file is distributed under the University of Illinois Open Source -# License. See LICENSE.TXT for details. -# -##===----------------------------------------------------------------------===## -# -# This script builds many different flavors of the LLVM ecosystem. It -# will build LLVM, Clang, llvm-gcc, and dragonegg as well as run tests -# on them. This script is convenient to use to check builds and tests -# before committing changes to the upstream repository -# -# A typical source setup uses three trees and looks like this: -# -# official -# dragonegg -# trunk -# gcc -# trunk -# llvm -# trunk -# tools -# clang -# tags -# RELEASE_28 -# tools -# clang -# llvm-gcc -# trunk -# tags -# RELEASE_28 -# staging -# dragonegg -# trunk -# gcc -# trunk -# llvm -# trunk -# tools -# clang -# tags -# RELEASE_28 -# tools -# clang -# llvm-gcc -# trunk -# tags -# RELEASE_28 -# commit -# dragonegg -# trunk -# gcc -# trunk -# llvm -# trunk -# tools -# clang -# tags -# RELEASE_28 -# tools -# clang -# llvm-gcc -# trunk -# tags -# RELEASE_28 -# -# "gcc" above is the upstream FSF gcc and "gcc/trunk" refers to the -# 4.5 branch as discussed in the dragonegg build guide. -# -# In a typical workflow, the "official" tree always contains unchanged -# sources from the main LLVM project repositories. The "staging" tree -# is where local work is done. A set of changes resides there waiting -# to be moved upstream. The "commit" tree is where changes from -# "staging" make their way upstream. Individual incremental changes -# from "staging" are applied to "commit" and committed upstream after -# a successful build and test run. A successful build is one in which -# testing results in no more failures than seen in the testing of the -# "official" tree. -# -# A build may be invoked as such: -# -# llvmbuild --src=~/llvm/commit --src=~/llvm/staging -# --src=~/llvm/official --branch=trunk --branch=tags/RELEASE_28 -# --build=debug --build=release --build=paranoid -# --prefix=/home/greened/install --builddir=/home/greened/build -# -# This will build the LLVM ecosystem, including LLVM, Clang, llvm-gcc, -# gcc 4.5 and dragonegg, putting build results in ~/build and -# installing tools in ~/install. llvmbuild creates separate build and -# install directories for each source/branch/build flavor. In the -# above example, llvmbuild will build debug, release and paranoid -# (debug+checks) flavors of the trunk and RELEASE_28 branches from -# each source tree (official, staging and commit) for a total of -# eighteen builds. All builds will be run in parallel. -# -# The user may control parallelism via the --jobs and --threads -# switches. --jobs tells llvmbuild the maximum total number of builds -# to activate in parallel. The user may think of it as equivalent to -# the GNU make -j switch. --threads tells llvmbuild how many worker -# threads to use to accomplish those builds. If --threads is less -# than --jobs, --threads workers will be launched and each one will -# pick a source/branch/flavor combination to build. Then llvmbuild -# will invoke GNU make with -j (--jobs / --threads) to use up the -# remaining job capacity. Once a worker is finished with a build, it -# will pick another combination off the list and start building it. -# -##===----------------------------------------------------------------------===## - -import optparse -import os -import sys -import threading -import queue -import logging -import traceback -import subprocess -import re - -# TODO: Use shutil.which when it is available (3.2 or later) -def find_executable(executable, path=None): - """Try to find 'executable' in the directories listed in 'path' (a - string listing directories separated by 'os.pathsep'; defaults to - os.environ['PATH']). Returns the complete filename or None if not - found - """ - if path is None: - path = os.environ['PATH'] - paths = path.split(os.pathsep) - extlist = [''] - if os.name == 'os2': - (base, ext) = os.path.splitext(executable) - # executable files on OS/2 can have an arbitrary extension, but - # .exe is automatically appended if no dot is present in the name - if not ext: - executable = executable + ".exe" - elif sys.platform == 'win32': - pathext = os.environ['PATHEXT'].lower().split(os.pathsep) - (base, ext) = os.path.splitext(executable) - if ext.lower() not in pathext: - extlist = pathext - for ext in extlist: - execname = executable + ext - if os.path.isfile(execname): - return execname - else: - for p in paths: - f = os.path.join(p, execname) - if os.path.isfile(f): - return f - else: - return None - -def is_executable(fpath): - return os.path.exists(fpath) and os.access(fpath, os.X_OK) - -def add_options(parser): - parser.add_option("-v", "--verbose", action="store_true", - default=False, - help=("Output informational messages" - " [default: %default]")) - parser.add_option("--src", action="append", - help=("Top-level source directory [default: %default]")) - parser.add_option("--build", action="append", - help=("Build types to run [default: %default]")) - parser.add_option("--branch", action="append", - help=("Source branch to build [default: %default]")) - parser.add_option("--cc", default=find_executable("cc"), - help=("The C compiler to use [default: %default]")) - parser.add_option("--cxx", default=find_executable("c++"), - help=("The C++ compiler to use [default: %default]")) - parser.add_option("--threads", default=4, type="int", - help=("The number of worker threads to use " - "[default: %default]")) - parser.add_option("--jobs", "-j", default=8, type="int", - help=("The number of simultaneous build jobs " - "[default: %default]")) - parser.add_option("--prefix", - help=("Root install directory [default: %default]")) - parser.add_option("--builddir", - help=("Root build directory [default: %default]")) - parser.add_option("--extra-llvm-config-flags", default="", - help=("Extra flags to pass to llvm configure [default: %default]")) - parser.add_option("--extra-llvm-gcc-config-flags", default="", - help=("Extra flags to pass to llvm-gcc configure [default: %default]")) - parser.add_option("--extra-gcc-config-flags", default="", - help=("Extra flags to pass to gcc configure [default: %default]")) - parser.add_option("--force-configure", default=False, action="store_true", - help=("Force reconfigure of all components")) - parser.add_option("--no-gcc", default=False, action="store_true", - help=("Do not build dragonegg and gcc")) - parser.add_option("--no-install", default=False, action="store_true", - help=("Do not do installs")) - return - -def check_options(parser, options, valid_builds): - # See if we're building valid flavors. - for build in options.build: - if (build not in valid_builds): - parser.error("'" + build + "' is not a valid build flavor " - + str(valid_builds)) - - # See if we can find source directories. - for src in options.src: - for component in components: - component = component.rstrip("2") - compsrc = src + "/" + component - if (not os.path.isdir(compsrc)): - parser.error("'" + compsrc + "' does not exist") - if (options.branch is not None): - for branch in options.branch: - if (not os.path.isdir(os.path.join(compsrc, branch))): - parser.error("'" + os.path.join(compsrc, branch) - + "' does not exist") - - # See if we can find the compilers - options.cc = find_executable(options.cc) - options.cxx = find_executable(options.cxx) - - return - -# Find a unique short name for the given set of paths. This searches -# back through path components until it finds unique component names -# among all given paths. -def get_path_abbrevs(paths): - # Find the number of common starting characters in the last component - # of the paths. - unique_paths = list(paths) - - class NotFoundException(Exception): pass - - # Find a unique component of each path. - unique_bases = unique_paths[:] - found = 0 - while len(unique_paths) > 0: - bases = [os.path.basename(src) for src in unique_paths] - components = { c for c in bases } - # Account for single entry in paths. - if len(components) > 1 or len(components) == len(bases): - # We found something unique. - for c in components: - if bases.count(c) == 1: - index = bases.index(c) - unique_bases[index] = c - # Remove the corresponding path from the set under - # consideration. - unique_paths[index] = None - unique_paths = [ p for p in unique_paths if p is not None ] - unique_paths = [os.path.dirname(src) for src in unique_paths] - - if len(unique_paths) > 0: - raise NotFoundException() - - abbrevs = dict(zip(paths, [base for base in unique_bases])) - - return abbrevs - -# Given a set of unique names, find a short character sequence that -# uniquely identifies them. -def get_short_abbrevs(unique_bases): - # Find a unique start character for each path base. - my_unique_bases = unique_bases[:] - unique_char_starts = unique_bases[:] - while len(my_unique_bases) > 0: - for start, char_tuple in enumerate(zip(*[base - for base in my_unique_bases])): - chars = { c for c in char_tuple } - # Account for single path. - if len(chars) > 1 or len(chars) == len(char_tuple): - # We found something unique. - for c in chars: - if char_tuple.count(c) == 1: - index = char_tuple.index(c) - unique_char_starts[index] = start - # Remove the corresponding path from the set under - # consideration. - my_unique_bases[index] = None - my_unique_bases = [ b for b in my_unique_bases - if b is not None ] - break - - if len(my_unique_bases) > 0: - raise NotFoundException() - - abbrevs = [abbrev[start_index:start_index+3] - for abbrev, start_index - in zip([base for base in unique_bases], - [index for index in unique_char_starts])] - - abbrevs = dict(zip(unique_bases, abbrevs)) - - return abbrevs - -class Builder(threading.Thread): - class ExecutableNotFound(Exception): pass - class FileNotExecutable(Exception): pass - - def __init__(self, work_queue, jobs, - build_abbrev, source_abbrev, branch_abbrev, - options): - super().__init__() - self.work_queue = work_queue - self.jobs = jobs - self.cc = options.cc - self.cxx = options.cxx - self.build_abbrev = build_abbrev - self.source_abbrev = source_abbrev - self.branch_abbrev = branch_abbrev - self.build_prefix = options.builddir - self.install_prefix = options.prefix - self.options = options - self.component_abbrev = dict( - llvm="llvm", - llvm_gcc="lgcc", - llvm2="llv2", - gcc="ugcc", - dagonegg="degg") - def run(self): - while True: - try: - source, branch, build = self.work_queue.get() - self.dobuild(source, branch, build) - except: - traceback.print_exc() - finally: - self.work_queue.task_done() - - def execute(self, command, execdir, env, component): - prefix = self.component_abbrev[component.replace("-", "_")] - pwd = os.getcwd() - if not os.path.exists(execdir): - os.makedirs(execdir) - - execenv = os.environ.copy() - - for key, value in env.items(): - execenv[key] = value - - self.logger.debug("[" + prefix + "] " + "env " + str(env) + " " - + " ".join(command)); - - try: - proc = subprocess.Popen(command, - cwd=execdir, - env=execenv, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT) - - line = proc.stdout.readline() - while line: - self.logger.info("[" + prefix + "] " - + str(line, "utf-8").rstrip()) - line = proc.stdout.readline() - - except: - traceback.print_exc() - - # Get a list of C++ include directories to pass to clang. - def get_includes(self): - # Assume we're building with g++ for now. - command = [self.cxx] - command += ["-v", "-x", "c++", "/dev/null", "-fsyntax-only"] - includes = [] - self.logger.debug(command) - try: - proc = subprocess.Popen(command, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT) - - gather = False - line = proc.stdout.readline() - while line: - self.logger.debug(line) - if re.search("End of search list", str(line)) is not None: - self.logger.debug("Stop Gather") - gather = False - if gather: - includes.append(str(line, "utf-8").strip()) - if re.search("#include <...> search starts", str(line)) is not None: - self.logger.debug("Start Gather") - gather = True - line = proc.stdout.readline() - except: - traceback.print_exc() - self.logger.debug(includes) - return includes - - def dobuild(self, source, branch, build): - build_suffix = "" - - ssabbrev = get_short_abbrevs([ab for ab in self.source_abbrev.values()]) - - if branch is not None: - sbabbrev = get_short_abbrevs([ab for ab in self.branch_abbrev.values()]) - - prefix = "[" + ssabbrev[self.source_abbrev[source]] + "-" + sbabbrev[self.branch_abbrev[branch]] + "-" + self.build_abbrev[build] + "]" - self.install_prefix += "/" + self.source_abbrev[source] + "/" + branch + "/" + build - build_suffix += self.source_abbrev[source] + "/" + branch + "/" + build - else: - prefix = "[" + ssabbrev[self.source_abbrev[source]] + "-" + self.build_abbrev[build] + "]" - self.install_prefix += "/" + self.source_abbrev[source] + "/" + build - build_suffix += "/" + self.source_abbrev[source] + "/" + build - - self.logger = logging.getLogger(prefix) - - self.logger.debug(self.install_prefix) - - # Assume we're building with gcc for now. - cxxincludes = self.get_includes() - cxxroot = cxxincludes[0] - cxxarch = os.path.basename(cxxincludes[1]) - - configure_flags = dict( - llvm=dict(debug=["--prefix=" + self.install_prefix, - "--with-extra-options=-Werror", - "--enable-assertions", - "--disable-optimized", - "--with-cxx-include-root=" + cxxroot, - "--with-cxx-include-arch=" + cxxarch], - release=["--prefix=" + self.install_prefix, - "--with-extra-options=-Werror", - "--enable-optimized", - "--with-cxx-include-root=" + cxxroot, - "--with-cxx-include-arch=" + cxxarch], - paranoid=["--prefix=" + self.install_prefix, - "--with-extra-options=-Werror", - "--enable-assertions", - "--enable-expensive-checks", - "--disable-optimized", - "--with-cxx-include-root=" + cxxroot, - "--with-cxx-include-arch=" + cxxarch]), - llvm_gcc=dict(debug=["--prefix=" + self.install_prefix, - "--enable-checking", - "--program-prefix=llvm-", - "--enable-llvm=" + self.build_prefix + "/llvm/" + build_suffix, -# Fortran install seems to be broken. -# "--enable-languages=c,c++,fortran"], - "--enable-languages=c,c++"], - release=["--prefix=" + self.install_prefix, - "--program-prefix=llvm-", - "--enable-llvm=" + self.build_prefix + "/llvm/" + build_suffix, -# Fortran install seems to be broken. -# "--enable-languages=c,c++,fortran"], - "--enable-languages=c,c++"], - paranoid=["--prefix=" + self.install_prefix, - "--enable-checking", - "--program-prefix=llvm-", - "--enable-llvm=" + self.build_prefix + "/llvm/" + build_suffix, -# Fortran install seems to be broken. -# "--enable-languages=c,c++,fortran"]), - "--enable-languages=c,c++"]), - llvm2=dict(debug=["--prefix=" + self.install_prefix, - "--with-extra-options=-Werror", - "--enable-assertions", - "--disable-optimized", - "--with-llvmgccdir=" + self.install_prefix + "/bin", - "--with-cxx-include-root=" + cxxroot, - "--with-cxx-include-arch=" + cxxarch], - release=["--prefix=" + self.install_prefix, - "--with-extra-options=-Werror", - "--enable-optimized", - "--with-llvmgccdir=" + self.install_prefix + "/bin", - "--with-cxx-include-root=" + cxxroot, - "--with-cxx-include-arch=" + cxxarch], - paranoid=["--prefix=" + self.install_prefix, - "--with-extra-options=-Werror", - "--enable-assertions", - "--enable-expensive-checks", - "--disable-optimized", - "--with-llvmgccdir=" + self.install_prefix + "/bin", - "--with-cxx-include-root=" + cxxroot, - "--with-cxx-include-arch=" + cxxarch]), - gcc=dict(debug=["--prefix=" + self.install_prefix, - "--enable-checking"], - release=["--prefix=" + self.install_prefix], - paranoid=["--prefix=" + self.install_prefix, - "--enable-checking"]), - dragonegg=dict(debug=[], - release=[], - paranoid=[])) - - configure_env = dict( - llvm=dict(debug=dict(CC=self.cc, - CXX=self.cxx), - release=dict(CC=self.cc, - CXX=self.cxx), - paranoid=dict(CC=self.cc, - CXX=self.cxx)), - llvm_gcc=dict(debug=dict(CC=self.cc, - CXX=self.cxx), - release=dict(CC=self.cc, - CXX=self.cxx), - paranoid=dict(CC=self.cc, - CXX=self.cxx)), - llvm2=dict(debug=dict(CC=self.cc, - CXX=self.cxx), - release=dict(CC=self.cc, - CXX=self.cxx), - paranoid=dict(CC=self.cc, - CXX=self.cxx)), - gcc=dict(debug=dict(CC=self.cc, - CXX=self.cxx), - release=dict(CC=self.cc, - CXX=self.cxx), - paranoid=dict(CC=self.cc, - CXX=self.cxx)), - dragonegg=dict(debug=dict(CC=self.cc, - CXX=self.cxx), - release=dict(CC=self.cc, - CXX=self.cxx), - paranoid=dict(CC=self.cc, - CXX=self.cxx))) - - make_flags = dict( - llvm=dict(debug=["-j" + str(self.jobs)], - release=["-j" + str(self.jobs)], - paranoid=["-j" + str(self.jobs)]), - llvm_gcc=dict(debug=["-j" + str(self.jobs), - "bootstrap"], - release=["-j" + str(self.jobs), - "bootstrap"], - paranoid=["-j" + str(self.jobs), - "bootstrap"]), - llvm2=dict(debug=["-j" + str(self.jobs)], - release=["-j" + str(self.jobs)], - paranoid=["-j" + str(self.jobs)]), - gcc=dict(debug=["-j" + str(self.jobs), - "bootstrap"], - release=["-j" + str(self.jobs), - "bootstrap"], - paranoid=["-j" + str(self.jobs), - "bootstrap"]), - dragonegg=dict(debug=["-j" + str(self.jobs)], - release=["-j" + str(self.jobs)], - paranoid=["-j" + str(self.jobs)])) - - make_env = dict( - llvm=dict(debug=dict(), - release=dict(), - paranoid=dict()), - llvm_gcc=dict(debug=dict(), - release=dict(), - paranoid=dict()), - llvm2=dict(debug=dict(), - release=dict(), - paranoid=dict()), - gcc=dict(debug=dict(), - release=dict(), - paranoid=dict()), - dragonegg=dict(debug=dict(GCC=self.install_prefix + "/bin/gcc", - LLVM_CONFIG=self.install_prefix + "/bin/llvm-config"), - release=dict(GCC=self.install_prefix + "/bin/gcc", - LLVM_CONFIG=self.install_prefix + "/bin/llvm-config"), - paranoid=dict(GCC=self.install_prefix + "/bin/gcc", - LLVM_CONFIG=self.install_prefix + "/bin/llvm-config"))) - - make_install_flags = dict( - llvm=dict(debug=["install"], - release=["install"], - paranoid=["install"]), - llvm_gcc=dict(debug=["install"], - release=["install"], - paranoid=["install"]), - llvm2=dict(debug=["install"], - release=["install"], - paranoid=["install"]), - gcc=dict(debug=["install"], - release=["install"], - paranoid=["install"]), - dragonegg=dict(debug=["install"], - release=["install"], - paranoid=["install"])) - - make_install_env = dict( - llvm=dict(debug=dict(), - release=dict(), - paranoid=dict()), - llvm_gcc=dict(debug=dict(), - release=dict(), - paranoid=dict()), - llvm2=dict(debug=dict(), - release=dict(), - paranoid=dict()), - gcc=dict(debug=dict(), - release=dict(), - paranoid=dict()), - dragonegg=dict(debug=dict(), - release=dict(), - paranoid=dict())) - - make_check_flags = dict( - llvm=dict(debug=["check"], - release=["check"], - paranoid=["check"]), - llvm_gcc=dict(debug=["check"], - release=["check"], - paranoid=["check"]), - llvm2=dict(debug=["check"], - release=["check"], - paranoid=["check"]), - gcc=dict(debug=["check"], - release=["check"], - paranoid=["check"]), - dragonegg=dict(debug=["check"], - release=["check"], - paranoid=["check"])) - - make_check_env = dict( - llvm=dict(debug=dict(), - release=dict(), - paranoid=dict()), - llvm_gcc=dict(debug=dict(), - release=dict(), - paranoid=dict()), - llvm2=dict(debug=dict(), - release=dict(), - paranoid=dict()), - gcc=dict(debug=dict(), - release=dict(), - paranoid=dict()), - dragonegg=dict(debug=dict(), - release=dict(), - paranoid=dict())) - - for component in components: - comp = component[:] - - if (self.options.no_gcc): - if (comp == 'gcc' or comp == 'dragonegg' or comp == 'llvm2'): - self.logger.info("Skipping " + component + " in " - + builddir) - continue - - srcdir = source + "/" + comp.rstrip("2") - builddir = self.build_prefix + "/" + comp + "/" + build_suffix - installdir = self.install_prefix - - if (branch is not None): - srcdir += "/" + branch - - comp_key = comp.replace("-", "_") - - config_args = configure_flags[comp_key][build][:] - config_args.extend(getattr(self.options, - "extra_" + comp_key.rstrip("2") - + "_config_flags").split()) - - self.logger.info("Configuring " + component + " in " + builddir) - self.configure(component, srcdir, builddir, - config_args, - configure_env[comp_key][build]) - - self.logger.info("Building " + component + " in " + builddir) - self.logger.info("Build: make " + str(make_flags[comp_key][build])) - self.make(component, srcdir, builddir, - make_flags[comp_key][build], - make_env[comp_key][build]) - - if (not self.options.no_install): - self.logger.info("Installing " + component + " in " + installdir) - self.make(component, srcdir, builddir, - make_install_flags[comp_key][build], - make_install_env[comp_key][build]) - - self.logger.info("Testing " + component + " in " + builddir) - self.logger.info("Test: make " - + str(make_check_flags[comp_key][build])) - self.make(component, srcdir, builddir, - make_check_flags[comp_key][build], - make_check_env[comp_key][build]) - - - def configure(self, component, srcdir, builddir, flags, env): - self.logger.debug("Configure " + str(flags) + " " + str(srcdir) + " -> " - + str(builddir)) - - configure_files = dict( - llvm=[(srcdir + "/configure", builddir + "/Makefile")], - llvm_gcc=[(srcdir + "/configure", builddir + "/Makefile"), - (srcdir + "/gcc/configure", builddir + "/gcc/Makefile")], - llvm2=[(srcdir + "/configure", builddir + "/Makefile")], - gcc=[(srcdir + "/configure", builddir + "/Makefile"), - (srcdir + "/gcc/configure", builddir + "/gcc/Makefile")], - dragonegg=[()]) - - - doconfig = False - for conf, mf in configure_files[component.replace("-", "_")]: - if not os.path.exists(conf): - return - if os.path.exists(conf) and os.path.exists(mf): - confstat = os.stat(conf) - makestat = os.stat(mf) - if confstat.st_mtime > makestat.st_mtime: - doconfig = True - break - else: - doconfig = True - break - - if not doconfig and not self.options.force_configure: - return - - program = srcdir + "/configure" - if not is_executable(program): - return - - args = [program] - args += ["--verbose"] - args += flags - self.execute(args, builddir, env, component) - - def make(self, component, srcdir, builddir, flags, env): - program = find_executable("make") - if program is None: - raise ExecutableNotFound - - if not is_executable(program): - raise FileNotExecutable - - args = [program] - args += flags - self.execute(args, builddir, env, component) - -# Global constants -build_abbrev = dict(debug="dbg", release="opt", paranoid="par") -#components = ["llvm", "llvm-gcc", "llvm2", "gcc", "dragonegg"] -components = ["llvm", "llvm2", "gcc", "dragonegg"] - -# Parse options -parser = optparse.OptionParser(version="%prog 1.0") -add_options(parser) -(options, args) = parser.parse_args() -check_options(parser, options, build_abbrev.keys()); - -if options.verbose: - logging.basicConfig(level=logging.DEBUG, - format='%(name)-13s: %(message)s') -else: - logging.basicConfig(level=logging.INFO, - format='%(name)-13s: %(message)s') - -source_abbrev = get_path_abbrevs(set(options.src)) - -branch_abbrev = None -if options.branch is not None: - branch_abbrev = get_path_abbrevs(set(options.branch)) - -work_queue = queue.Queue() - -jobs = options.jobs // options.threads -if jobs == 0: - jobs = 1 - -numthreads = options.threads - -logging.getLogger().info("Building with " + str(options.jobs) + " jobs and " - + str(numthreads) + " threads using " + str(jobs) - + " make jobs") - -for t in range(numthreads): - builder = Builder(work_queue, jobs, - build_abbrev, source_abbrev, branch_abbrev, - options) - builder.daemon = True - builder.start() - -for build in set(options.build): - for source in set(options.src): - if options.branch is not None: - for branch in set(options.branch): - work_queue.put((source, branch, build)) - else: - work_queue.put((source, None, build)) - -work_queue.join() From daniel at zuster.org Thu Nov 3 20:11:56 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Thu, 3 Nov 2011 18:11:56 -0700 Subject: [llvm-commits] [llvm] r141977 - /llvm/trunk/utils/llvmbuild In-Reply-To: References: <20111014191237.51440312800A@llvm.org> <4EB19905.1020109@gmail.com> Message-ID: Works for me, I made it so in r143673. - Daniel 2011/11/3 David A. Greene : > T?r?k Edwin writes: > >> On 11/02/2011 08:19 PM, David A. Greene wrote: >>> Daniel Dunbar writes: >>> >>>> Ok, keeping it in the tree is fine with me if generally useful. >>>> >>>> It seems like the main focus is to build all the LLVM compilers, what >>>> about llvm-build-all-compilers or something? Doesn't cover the test >>>> side, but gets closer. Or maybe llvm-deep-check-compilers ? >>> >>> Both feel a bit wordy to me. ?Maybe llvm-commit-check, llvm-check or >>> llvm-verify? ?None of these is really good, however. ?:-/ >> >> llvm-compilers-check or llvm-frontend-check? > > It's not frontend-specific, so I don't think llvm-frontend-check is > quite right. ?I think llvm-compilers-check is the best I've seen so far. > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? -Dave > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > From evan.cheng at apple.com Thu Nov 3 20:48:58 2011 From: evan.cheng at apple.com (Evan Cheng) Date: Fri, 04 Nov 2011 01:48:58 -0000 Subject: [llvm-commits] [llvm] r143675 - /llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Message-ID: <20111104014858.5078E2A6C12C@llvm.org> Author: evancheng Date: Thu Nov 3 20:48:58 2011 New Revision: 143675 URL: http://llvm.org/viewvc/llvm-project?rev=143675&view=rev Log: Fix some minor scheduling itinerary bug. It's not expected to actually affect codegen. 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=143675&r1=143674&r2=143675&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Thu Nov 3 20:48:58 2011 @@ -2191,9 +2191,10 @@ } // Indexed loads -multiclass AI2_ldridx { +multiclass AI2_ldridx { def _PRE_IMM : AI2ldstidx<1, isByte, 1, (outs GPR:$Rt, GPR:$Rn_wb), - (ins addrmode_imm12:$addr), IndexModePre, LdFrm, itin, + (ins addrmode_imm12:$addr), IndexModePre, LdFrm, iii, opc, "\t$Rt, $addr!", "$addr.base = $Rn_wb", []> { bits<17> addr; let Inst{25} = 0; @@ -2205,7 +2206,7 @@ } def _PRE_REG : AI2ldstidx<1, isByte, 1, (outs GPR:$Rt, GPR:$Rn_wb), - (ins ldst_so_reg:$addr), IndexModePre, LdFrm, itin, + (ins ldst_so_reg:$addr), IndexModePre, LdFrm, iir, opc, "\t$Rt, $addr!", "$addr.base = $Rn_wb", []> { bits<17> addr; let Inst{25} = 1; @@ -2219,7 +2220,7 @@ def _POST_REG : AI2ldstidx<1, isByte, 0, (outs GPR:$Rt, GPR:$Rn_wb), (ins addr_offset_none:$addr, am2offset_reg:$offset), - IndexModePost, LdFrm, itin, + IndexModePost, LdFrm, iir, opc, "\t$Rt, $addr, $offset", "$addr.base = $Rn_wb", []> { // {12} isAdd @@ -2236,7 +2237,7 @@ def _POST_IMM : AI2ldstidx<1, isByte, 0, (outs GPR:$Rt, GPR:$Rn_wb), (ins addr_offset_none:$addr, am2offset_imm:$offset), - IndexModePost, LdFrm, itin, + IndexModePost, LdFrm, iii, opc, "\t$Rt, $addr, $offset", "$addr.base = $Rn_wb", []> { // {12} isAdd @@ -2254,8 +2255,10 @@ } let mayLoad = 1, neverHasSideEffects = 1 in { -defm LDR : AI2_ldridx<0, "ldr", IIC_iLoad_ru>; -defm LDRB : AI2_ldridx<1, "ldrb", IIC_iLoad_bh_ru>; +// FIXME: for LDR_PRE_REG etc. the itineray should be either IIC_iLoad_ru or +// IIC_iLoad_siu depending on whether it the offset register is shifted. +defm LDR : AI2_ldridx<0, "ldr", IIC_iLoad_iu, IIC_iLoad_ru>; +defm LDRB : AI2_ldridx<1, "ldrb", IIC_iLoad_bh_iu, IIC_iLoad_bh_ru>; } multiclass AI3_ldridx op, string opc, InstrItinClass itin> { @@ -2445,10 +2448,11 @@ } // Indexed stores -multiclass AI2_stridx { +multiclass AI2_stridx { def _PRE_IMM : AI2ldstidx<0, isByte, 1, (outs GPR:$Rn_wb), (ins GPR:$Rt, addrmode_imm12:$addr), IndexModePre, - StFrm, itin, + StFrm, iii, opc, "\t$Rt, $addr!", "$addr.base = $Rn_wb", []> { bits<17> addr; let Inst{25} = 0; @@ -2461,7 +2465,7 @@ def _PRE_REG : AI2ldstidx<0, isByte, 1, (outs GPR:$Rn_wb), (ins GPR:$Rt, ldst_so_reg:$addr), - IndexModePre, StFrm, itin, + IndexModePre, StFrm, iir, opc, "\t$Rt, $addr!", "$addr.base = $Rn_wb", []> { bits<17> addr; let Inst{25} = 1; @@ -2474,7 +2478,7 @@ } def _POST_REG : AI2ldstidx<0, isByte, 0, (outs GPR:$Rn_wb), (ins GPR:$Rt, addr_offset_none:$addr, am2offset_reg:$offset), - IndexModePost, StFrm, itin, + IndexModePost, StFrm, iir, opc, "\t$Rt, $addr, $offset", "$addr.base = $Rn_wb", []> { // {12} isAdd @@ -2491,7 +2495,7 @@ def _POST_IMM : AI2ldstidx<0, isByte, 0, (outs GPR:$Rn_wb), (ins GPR:$Rt, addr_offset_none:$addr, am2offset_imm:$offset), - IndexModePost, StFrm, itin, + IndexModePost, StFrm, iii, opc, "\t$Rt, $addr, $offset", "$addr.base = $Rn_wb", []> { // {12} isAdd @@ -2508,8 +2512,10 @@ } let mayStore = 1, neverHasSideEffects = 1 in { -defm STR : AI2_stridx<0, "str", IIC_iStore_ru>; -defm STRB : AI2_stridx<1, "strb", IIC_iStore_bh_ru>; +// FIXME: for STR_PRE_REG etc. the itineray should be either IIC_iStore_ru or +// IIC_iStore_siu depending on whether it the offset register is shifted. +defm STR : AI2_stridx<0, "str", IIC_iStore_iu, IIC_iStore_ru>; +defm STRB : AI2_stridx<1, "strb", IIC_iStore_bh_iu, IIC_iStore_bh_ru>; } def : ARMPat<(post_store GPR:$Rt, addr_offset_none:$addr, From nicholas at mxc.ca Fri Nov 4 00:16:55 2011 From: nicholas at mxc.ca (Nick Lewycky) Date: Thu, 03 Nov 2011 22:16:55 -0700 Subject: [llvm-commits] [PATCH] Missing check for FlagNW in ScalarEvolution analysis In-Reply-To: <00ce01cc9a4e$d93caa60$8bb5ff20$@org> References: <00ce01cc9a4e$d93caa60$8bb5ff20$@org> Message-ID: <4EB37547.3030104@mxc.ca> Brendon Cahoon wrote: > > This small patch adds the FlagNW flag to an existing check for NoWrap in > HowManyLessThans. Without the check for FlagNW, the function returns > CountNotCompute on some loops where it should be able to determine the > number of times a back edge will execute. The test case in the patch > shows an example loop. Looks great, you even included a test, no regressions in llvm-test. Do you have commit access or would you like me to commit it for you? Nick From craig.topper at gmail.com Fri Nov 4 01:59:21 2011 From: craig.topper at gmail.com (Craig Topper) Date: Fri, 04 Nov 2011 06:59:21 -0000 Subject: [llvm-commits] [llvm] r143682 - /llvm/trunk/test/CodeGen/X86/f16c-intrinsics.ll Message-ID: <20111104065921.7C7092A6C12C@llvm.org> Author: ctopper Date: Fri Nov 4 01:59:21 2011 New Revision: 143682 URL: http://llvm.org/viewvc/llvm-project?rev=143682&view=rev Log: Add intrinsics for X86 vcvtps2ph and vcvtph2ps instructions Added: llvm/trunk/test/CodeGen/X86/f16c-intrinsics.ll Added: llvm/trunk/test/CodeGen/X86/f16c-intrinsics.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/f16c-intrinsics.ll?rev=143682&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/f16c-intrinsics.ll (added) +++ llvm/trunk/test/CodeGen/X86/f16c-intrinsics.ll Fri Nov 4 01:59:21 2011 @@ -0,0 +1,32 @@ +; RUN: llc < %s -march=x86 -mattr=+avx,+f16c | FileCheck %s + +define <4 x float> @test_x86_vcvtph2ps_128(<8 x i16> %a0) { + ; CHECK: vcvtph2ps + %res = call <4 x float> @llvm.x86.vcvtph2ps.128(<8 x i16> %a0) ; <<4 x float>> [#uses=1] + ret <4 x float> %res +} +declare <4 x float> @llvm.x86.vcvtph2ps.128(<8 x i16>) nounwind readonly + + +define <8 x float> @test_x86_vcvtph2ps_256(<8 x i16> %a0) { + ; CHECK: vcvtph2ps + %res = call <8 x float> @llvm.x86.vcvtph2ps.256(<8 x i16> %a0) ; <<8 x float>> [#uses=1] + ret <8 x float> %res +} +declare <8 x float> @llvm.x86.vcvtph2ps.256(<8 x i16>) nounwind readonly + + +define <8 x i16> @test_x86_vcvtps2ph_128(<4 x float> %a0) { + ; CHECK: vcvtps2ph + %res = call <8 x i16> @llvm.x86.vcvtps2ph.128(<4 x float> %a0, i32 0) ; <<8 x i16>> [#uses=1] + ret <8 x i16> %res +} +declare <8 x i16> @llvm.x86.vcvtps2ph.128(<4 x float>, i32) nounwind readonly + + +define <8 x i16> @test_x86_vcvtps2ph_256(<8 x float> %a0) { + ; CHECK: vcvtps2ph + %res = call <8 x i16> @llvm.x86.vcvtps2ph.256(<8 x float> %a0, i32 0) ; <<8 x i16>> [#uses=1] + ret <8 x i16> %res +} +declare <8 x i16> @llvm.x86.vcvtps2ph.256(<8 x float>, i32) nounwind readonly From craig.topper at gmail.com Fri Nov 4 01:59:50 2011 From: craig.topper at gmail.com (Craig Topper) Date: Fri, 04 Nov 2011 06:59:50 -0000 Subject: [llvm-commits] [llvm] r143683 - in /llvm/trunk: include/llvm/IntrinsicsX86.td lib/Target/X86/X86InstrSSE.td Message-ID: <20111104065950.4D2372A6C12C@llvm.org> Author: ctopper Date: Fri Nov 4 01:59:49 2011 New Revision: 143683 URL: http://llvm.org/viewvc/llvm-project?rev=143683&view=rev Log: Add intrinsics for X86 vcvtps2ph and vcvtph2ps instructions Modified: llvm/trunk/include/llvm/IntrinsicsX86.td llvm/trunk/lib/Target/X86/X86InstrSSE.td Modified: llvm/trunk/include/llvm/IntrinsicsX86.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IntrinsicsX86.td?rev=143683&r1=143682&r2=143683&view=diff ============================================================================== --- llvm/trunk/include/llvm/IntrinsicsX86.td (original) +++ llvm/trunk/include/llvm/IntrinsicsX86.td Fri Nov 4 01:59:49 2011 @@ -2013,3 +2013,19 @@ def int_x86_wrgsbase_64 : GCCBuiltin<"__builtin_ia32_wrgsbase64">, Intrinsic<[], [llvm_i64_ty]>; } + +//===----------------------------------------------------------------------===// +// Half float conversion + +let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". + def int_x86_vcvtph2ps_128 : GCCBuiltin<"__builtin_ia32_vcvtph2ps">, + Intrinsic<[llvm_v4f32_ty], [llvm_v8i16_ty], [IntrNoMem]>; + def int_x86_vcvtph2ps_256 : GCCBuiltin<"__builtin_ia32_vcvtph2ps256">, + Intrinsic<[llvm_v8f32_ty], [llvm_v8i16_ty], [IntrNoMem]>; + def int_x86_vcvtps2ph_128 : GCCBuiltin<"__builtin_ia32_vcvtps2ph">, + Intrinsic<[llvm_v8i16_ty], [llvm_v4f32_ty, llvm_i32_ty], + [IntrNoMem]>; + def int_x86_vcvtps2ph_256 : GCCBuiltin<"__builtin_ia32_vcvtps2ph256">, + Intrinsic<[llvm_v8i16_ty], [llvm_v8f32_ty, llvm_i32_ty], + [IntrNoMem]>; +} Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=143683&r1=143682&r2=143683&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Fri Nov 4 01:59:49 2011 @@ -7365,29 +7365,34 @@ //===----------------------------------------------------------------------===// // Half precision conversion instructions // +multiclass f16c_ph2ps { let Predicates = [HasAVX, HasF16C] in { - def VCVTPH2PSrm : I<0x13, MRMSrcMem, (outs VR128:$dst), (ins f64mem:$src), - "vcvtph2ps\t{$src, $dst|$dst, $src}", []>, T8, OpSize, VEX; - def VCVTPH2PSrr : I<0x13, MRMSrcReg, (outs VR128:$dst), (ins VR128:$src), - "vcvtph2ps\t{$src, $dst|$dst, $src}", []>, T8, OpSize, VEX; - def VCVTPH2PSYrm : I<0x13, MRMSrcMem, (outs VR256:$dst), (ins f128mem:$src), - "vcvtph2ps\t{$src, $dst|$dst, $src}", []>, T8, OpSize, VEX; - def VCVTPH2PSYrr : I<0x13, MRMSrcReg, (outs VR256:$dst), (ins VR128:$src), - "vcvtph2ps\t{$src, $dst|$dst, $src}", []>, T8, OpSize, VEX; - def VCVTPS2PHmr : Ii8<0x1D, MRMDestMem, (outs f64mem:$dst), - (ins VR128:$src1, i32i8imm:$src2), - "vcvtps2ph\t{$src2, $src1, $dst|$dst, $src1, $src2}", []>, - TA, OpSize, VEX; - def VCVTPS2PHrr : Ii8<0x1D, MRMDestReg, (outs VR128:$dst), - (ins VR128:$src1, i32i8imm:$src2), - "vcvtps2ph\t{$src2, $src1, $dst|$dst, $src1, $src2}", []>, - TA, OpSize, VEX; - def VCVTPS2PHYmr : Ii8<0x1D, MRMDestMem, (outs f128mem:$dst), - (ins VR256:$src1, i32i8imm:$src2), - "vcvtps2ph\t{$src2, $src1, $dst|$dst, $src1, $src2}", []>, - TA, OpSize, VEX; - def VCVTPS2PHYrr : Ii8<0x1D, MRMDestReg, (outs VR128:$dst), - (ins VR256:$src1, i32i8imm:$src2), - "vcvtps2ph\t{$src2, $src1, $dst|$dst, $src1, $src2}", []>, - TA, OpSize, VEX; + def rr : I<0x13, MRMSrcReg, (outs RC:$dst), (ins VR128:$src), + "vcvtph2ps\t{$src, $dst|$dst, $src}", + [(set RC:$dst, (Int VR128:$src))]>, + T8, OpSize, VEX; + let neverHasSideEffects = 1, mayLoad = 1 in + def rm : I<0x13, MRMSrcMem, (outs RC:$dst), (ins x86memop:$src), + "vcvtph2ps\t{$src, $dst|$dst, $src}", []>, T8, OpSize, VEX; } +} + +multiclass f16c_ps2ph { +let Predicates = [HasAVX, HasF16C] in { + def rr : Ii8<0x1D, MRMDestReg, (outs VR128:$dst), + (ins RC:$src1, i32i8imm:$src2), + "vcvtps2ph\t{$src2, $src1, $dst|$dst, $src1, $src2}", + [(set VR128:$dst, (Int RC:$src1, imm:$src2))]>, + TA, OpSize, VEX; + let neverHasSideEffects = 1, mayLoad = 1 in + def mr : Ii8<0x1D, MRMDestMem, (outs x86memop:$dst), + (ins RC:$src1, i32i8imm:$src2), + "vcvtps2ph\t{$src2, $src1, $dst|$dst, $src1, $src2}", []>, + TA, OpSize, VEX; +} +} + +defm VCVTPH2PS : f16c_ph2ps; +defm VCVTPH2PSY : f16c_ph2ps; +defm VCVTPS2PH : f16c_ps2ph; +defm VCVTPS2PHY : f16c_ps2ph; From resistor at mac.com Fri Nov 4 03:49:29 2011 From: resistor at mac.com (Owen Anderson) Date: Fri, 04 Nov 2011 08:49:29 +0000 (GMT) Subject: [llvm-commits] MachOObjectFile fix functions In-Reply-To: <6AE1604EE3EC5F4296C096518C6B77EE1805B07349@mail.accesssoftek.com> Message-ID: Danil, These changes are not correct. ?I've spent a lot of time over the last few weeks getting these right by comparing them with existing MachO tools. ?While it's quite possible there are still bugs, I'm fairly confident of them in general. ?Specific incorrectness are noted below: - getSymbolOffset The Value field of a MachO symbol table entry is a virtual address, not a file offset. ?AFAIK, the best way to find the file offset for the symbol is to get the subtract the section virtual address from the symbol virtual address, and add that to section offset. - getSymbolAddress Your implementation of this seems to be based on an incorrect understanding of what this method is supposed to return. ?It is supposed to return the virtual address of the symbol, i.e. the address where the symbol will reside when the dynamic linker maps this object. ?Instead, you're returning a pointer in the current process's address space, based on where the object file happens to be memory mapped at the moment. ?If the ELF implementation does this, it is simply wrong. - getRelocationAddress This change is simply wrong. ?The value field on MachO relocations holds an offset from the beginning of the section, not a virtual address. ?You have to add that the the current section's virtual address to obtain the correct value, as the existing code currently does. --Owen On Nov 03, 2011, at 02:54 PM, Danil Malyshev wrote: Hello everyone, ? Please find attached the patch for review. The patch changed several MachOObjectFile functions: - Fix getSymbolOffset(), getSymbolAddress() and getRelocationAddress(), now it's works same as in ELFObjectFile. - Add implementation getSymbolSize() ? ? Regards, Danil ? _______________________________________________ llvm-commits mailing list llvm-commits at cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111104/95b039eb/attachment.html From isanbard at gmail.com Fri Nov 4 04:24:40 2011 From: isanbard at gmail.com (Bill Wendling) Date: Fri, 04 Nov 2011 09:24:40 -0000 Subject: [llvm-commits] [llvm] r143688 - in /llvm/trunk/tools/lto: LTOModule.cpp LTOModule.h Message-ID: <20111104092440.B5D4A2A6C12C@llvm.org> Author: void Date: Fri Nov 4 04:24:40 2011 New Revision: 143688 URL: http://llvm.org/viewvc/llvm-project?rev=143688&view=rev Log: Refactor the MCContext so that it's an ivar instead of a local which is passed around. This is important for some future work as well. Modified: llvm/trunk/tools/lto/LTOModule.cpp llvm/trunk/tools/lto/LTOModule.h Modified: llvm/trunk/tools/lto/LTOModule.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/LTOModule.cpp?rev=143688&r1=143687&r2=143688&view=diff ============================================================================== --- llvm/trunk/tools/lto/LTOModule.cpp (original) +++ llvm/trunk/tools/lto/LTOModule.cpp Fri Nov 4 04:24:40 2011 @@ -32,7 +32,6 @@ #include "llvm/Support/system_error.h" #include "llvm/Target/Mangler.h" #include "llvm/MC/MCAsmInfo.h" -#include "llvm/MC/MCContext.h" #include "llvm/MC/MCExpr.h" #include "llvm/MC/MCInst.h" #include "llvm/MC/MCParser/MCAsmParser.h" @@ -82,7 +81,8 @@ LTOModule::LTOModule(Module *m, TargetMachine *t) - : _module(m), _target(t) + : _module(m), _target(t), + _context(*_target->getMCAsmInfo(), *_target->getRegisterInfo(), NULL) { } @@ -613,17 +613,17 @@ }; } -bool LTOModule::addAsmGlobalSymbols(MCContext &Context, std::string &errMsg) { +bool LTOModule::addAsmGlobalSymbols(std::string &errMsg) { const std::string &inlineAsm = _module->getModuleInlineAsm(); if (inlineAsm.empty()) return false; - OwningPtr Streamer(new RecordStreamer(Context)); + OwningPtr Streamer(new RecordStreamer(_context)); MemoryBuffer *Buffer = MemoryBuffer::getMemBuffer(inlineAsm); SourceMgr SrcMgr; SrcMgr.AddNewSourceBuffer(Buffer, SMLoc()); OwningPtr Parser(createMCAsmParser(SrcMgr, - Context, *Streamer, + _context, *Streamer, *_target->getMCAsmInfo())); OwningPtr STI(_target->getTarget(). createMCSubtargetInfo(_target->getTargetTriple(), @@ -671,8 +671,7 @@ bool LTOModule::ParseSymbols(std::string &errMsg) { // Use mangler to add GlobalPrefix to names to match linker names. - MCContext Context(*_target->getMCAsmInfo(), *_target->getRegisterInfo(),NULL); - Mangler mangler(Context, *_target->getTargetData()); + Mangler mangler(_context, *_target->getTargetData()); // add functions for (Module::iterator f = _module->begin(); f != _module->end(); ++f) { @@ -692,7 +691,7 @@ } // add asm globals - if (addAsmGlobalSymbols(Context, errMsg)) + if (addAsmGlobalSymbols(errMsg)) return true; // add aliases Modified: llvm/trunk/tools/lto/LTOModule.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/LTOModule.h?rev=143688&r1=143687&r2=143688&view=diff ============================================================================== --- llvm/trunk/tools/lto/LTOModule.h (original) +++ llvm/trunk/tools/lto/LTOModule.h Fri Nov 4 04:24:40 2011 @@ -15,8 +15,9 @@ #define LTO_MODULE_H #include "llvm/Module.h" -#include "llvm/ADT/OwningPtr.h" +#include "llvm/MC/MCContext.h" #include "llvm/Target/TargetMachine.h" +#include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/StringMap.h" #include "llvm-c/lto.h" @@ -83,11 +84,10 @@ void addPotentialUndefinedSymbol(llvm::GlobalValue* decl, llvm::Mangler &mangler); void addDefinedFunctionSymbol(llvm::Function* f, - llvm::Mangler &mangler); + llvm::Mangler &mangler); void addDefinedDataSymbol(llvm::GlobalValue* v, - llvm::Mangler &mangler); - bool addAsmGlobalSymbols(llvm::MCContext &Context, - std::string &errMsg); + llvm::Mangler &mangler); + bool addAsmGlobalSymbols(std::string &errMsg); void addAsmGlobalSymbol(const char *, lto_symbol_attributes scope); void addAsmGlobalSymbolUndef(const char *); @@ -118,6 +118,7 @@ StringSet _defines; llvm::StringMap _undefines; std::vector _asm_undefines; + llvm::MCContext _context; }; #endif // LTO_MODULE_H From isanbard at gmail.com Fri Nov 4 04:30:19 2011 From: isanbard at gmail.com (Bill Wendling) Date: Fri, 04 Nov 2011 09:30:19 -0000 Subject: [llvm-commits] [llvm] r143689 - in /llvm/trunk/tools/lto: LTOModule.cpp LTOModule.h Message-ID: <20111104093019.591D72A6C12C@llvm.org> Author: void Date: Fri Nov 4 04:30:19 2011 New Revision: 143689 URL: http://llvm.org/viewvc/llvm-project?rev=143689&view=rev Log: Make the Mangler an ivar so that it doesn't have to be passed around everywhere. Modified: llvm/trunk/tools/lto/LTOModule.cpp llvm/trunk/tools/lto/LTOModule.h Modified: llvm/trunk/tools/lto/LTOModule.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/LTOModule.cpp?rev=143689&r1=143688&r2=143689&view=diff ============================================================================== --- llvm/trunk/tools/lto/LTOModule.cpp (original) +++ llvm/trunk/tools/lto/LTOModule.cpp Fri Nov 4 04:30:19 2011 @@ -30,7 +30,6 @@ #include "llvm/Support/TargetRegistry.h" #include "llvm/Support/TargetSelect.h" #include "llvm/Support/system_error.h" -#include "llvm/Target/Mangler.h" #include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCExpr.h" #include "llvm/MC/MCInst.h" @@ -82,7 +81,8 @@ LTOModule::LTOModule(Module *m, TargetMachine *t) : _module(m), _target(t), - _context(*_target->getMCAsmInfo(), *_target->getRegisterInfo(), NULL) + _context(*_target->getMCAsmInfo(), *_target->getRegisterInfo(), NULL), + _mangler(_context, *_target->getTargetData()) { } @@ -182,9 +182,9 @@ _module->setTargetTriple(triple); } -void LTOModule::addDefinedFunctionSymbol(Function *f, Mangler &mangler) { +void LTOModule::addDefinedFunctionSymbol(Function *f) { // add to list of defined symbols - addDefinedSymbol(f, mangler, true); + addDefinedSymbol(f, true); } // Get string that data pointer points to. @@ -280,9 +280,9 @@ } -void LTOModule::addDefinedDataSymbol(GlobalValue *v, Mangler &mangler) { +void LTOModule::addDefinedDataSymbol(GlobalValue *v) { // Add to list of defined symbols. - addDefinedSymbol(v, mangler, false); + addDefinedSymbol(v, false); // Special case i386/ppc ObjC data structures in magic sections: // The issue is that the old ObjC object format did some strange @@ -328,15 +328,14 @@ } -void LTOModule::addDefinedSymbol(GlobalValue *def, Mangler &mangler, - bool isFunction) { +void LTOModule::addDefinedSymbol(GlobalValue *def, bool isFunction) { // ignore all llvm.* symbols if (def->getName().startswith("llvm.")) return; // string is owned by _defines SmallString<64> Buffer; - mangler.getNameWithPrefix(Buffer, def, false); + _mangler.getNameWithPrefix(Buffer, def, false); // set alignment part log2() can have rounding errors uint32_t align = def->getAlignment(); @@ -426,8 +425,7 @@ entry.setValue(info); } -void LTOModule::addPotentialUndefinedSymbol(GlobalValue *decl, - Mangler &mangler) { +void LTOModule::addPotentialUndefinedSymbol(GlobalValue *decl) { // ignore all llvm.* symbols if (decl->getName().startswith("llvm.")) return; @@ -437,7 +435,7 @@ return; SmallString<64> name; - mangler.getNameWithPrefix(name, decl, false); + _mangler.getNameWithPrefix(name, decl, false); StringMap::value_type &entry = _undefines.GetOrCreateValue(name); @@ -671,23 +669,22 @@ bool LTOModule::ParseSymbols(std::string &errMsg) { // Use mangler to add GlobalPrefix to names to match linker names. - Mangler mangler(_context, *_target->getTargetData()); // add functions for (Module::iterator f = _module->begin(); f != _module->end(); ++f) { if (isDeclaration(*f)) - addPotentialUndefinedSymbol(f, mangler); + addPotentialUndefinedSymbol(f); else - addDefinedFunctionSymbol(f, mangler); + addDefinedFunctionSymbol(f); } // add data for (Module::global_iterator v = _module->global_begin(), e = _module->global_end(); v != e; ++v) { if (isDeclaration(*v)) - addPotentialUndefinedSymbol(v, mangler); + addPotentialUndefinedSymbol(v); else - addDefinedDataSymbol(v, mangler); + addDefinedDataSymbol(v); } // add asm globals @@ -698,9 +695,9 @@ for (Module::alias_iterator i = _module->alias_begin(), e = _module->alias_end(); i != e; ++i) { if (isAliasToDeclaration(*i)) - addPotentialUndefinedSymbol(i, mangler); + addPotentialUndefinedSymbol(i); else - addDefinedDataSymbol(i, mangler); + addDefinedDataSymbol(i); } // make symbols for all undefines Modified: llvm/trunk/tools/lto/LTOModule.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/LTOModule.h?rev=143689&r1=143688&r2=143689&view=diff ============================================================================== --- llvm/trunk/tools/lto/LTOModule.h (original) +++ llvm/trunk/tools/lto/LTOModule.h Fri Nov 4 04:30:19 2011 @@ -16,6 +16,7 @@ #include "llvm/Module.h" #include "llvm/MC/MCContext.h" +#include "llvm/Target/Mangler.h" #include "llvm/Target/TargetMachine.h" #include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/StringMap.h" @@ -28,7 +29,6 @@ // forward references to llvm classes namespace llvm { - class Mangler; class MemoryBuffer; class GlobalValue; class Value; @@ -78,15 +78,11 @@ LTOModule(llvm::Module* m, llvm::TargetMachine* t); bool ParseSymbols(std::string &errMsg); - void addDefinedSymbol(llvm::GlobalValue* def, - llvm::Mangler& mangler, - bool isFunction); - void addPotentialUndefinedSymbol(llvm::GlobalValue* decl, - llvm::Mangler &mangler); - void addDefinedFunctionSymbol(llvm::Function* f, - llvm::Mangler &mangler); - void addDefinedDataSymbol(llvm::GlobalValue* v, - llvm::Mangler &mangler); + void addDefinedSymbol(llvm::GlobalValue* def, + bool isFunction); + void addPotentialUndefinedSymbol(llvm::GlobalValue* decl); + void addDefinedFunctionSymbol(llvm::Function* f); + void addDefinedDataSymbol(llvm::GlobalValue* v); bool addAsmGlobalSymbols(std::string &errMsg); void addAsmGlobalSymbol(const char *, lto_symbol_attributes scope); @@ -119,6 +115,7 @@ llvm::StringMap _undefines; std::vector _asm_undefines; llvm::MCContext _context; + llvm::Mangler _mangler; }; #endif // LTO_MODULE_H From isanbard at gmail.com Fri Nov 4 04:34:06 2011 From: isanbard at gmail.com (Bill Wendling) Date: Fri, 04 Nov 2011 09:34:06 -0000 Subject: [llvm-commits] [llvm] r143690 - in /llvm/trunk/tools/lto: LTOModule.cpp LTOModule.h Message-ID: <20111104093406.BF3F22A6C12C@llvm.org> Author: void Date: Fri Nov 4 04:34:06 2011 New Revision: 143690 URL: http://llvm.org/viewvc/llvm-project?rev=143690&view=rev Log: Move comment to the correct place. Modified: llvm/trunk/tools/lto/LTOModule.cpp llvm/trunk/tools/lto/LTOModule.h Modified: llvm/trunk/tools/lto/LTOModule.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/LTOModule.cpp?rev=143690&r1=143689&r2=143690&view=diff ============================================================================== --- llvm/trunk/tools/lto/LTOModule.cpp (original) +++ llvm/trunk/tools/lto/LTOModule.cpp Fri Nov 4 04:34:06 2011 @@ -668,8 +668,6 @@ } bool LTOModule::ParseSymbols(std::string &errMsg) { - // Use mangler to add GlobalPrefix to names to match linker names. - // add functions for (Module::iterator f = _module->begin(); f != _module->end(); ++f) { if (isDeclaration(*f)) Modified: llvm/trunk/tools/lto/LTOModule.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/LTOModule.h?rev=143690&r1=143689&r2=143690&view=diff ============================================================================== --- llvm/trunk/tools/lto/LTOModule.h (original) +++ llvm/trunk/tools/lto/LTOModule.h Fri Nov 4 04:34:06 2011 @@ -115,6 +115,7 @@ llvm::StringMap _undefines; std::vector _asm_undefines; llvm::MCContext _context; + // Use mangler to add GlobalPrefix to names to match linker names. llvm::Mangler _mangler; }; From grosser at fim.uni-passau.de Fri Nov 4 05:08:03 2011 From: grosser at fim.uni-passau.de (Tobias Grosser) Date: Fri, 04 Nov 2011 10:08:03 -0000 Subject: [llvm-commits] [polly] r143691 - /polly/trunk/lib/Analysis/ScopInfo.cpp Message-ID: <20111104100803.9C0812A6C12C@llvm.org> Author: grosser Date: Fri Nov 4 05:08:03 2011 New Revision: 143691 URL: http://llvm.org/viewvc/llvm-project?rev=143691&view=rev Log: ScopInfo: Add two new asserts. They show a bug recently reported by Marcello Maggioni Modified: polly/trunk/lib/Analysis/ScopInfo.cpp Modified: polly/trunk/lib/Analysis/ScopInfo.cpp URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=143691&r1=143690&r2=143691&view=diff ============================================================================== --- polly/trunk/lib/Analysis/ScopInfo.cpp (original) +++ polly/trunk/lib/Analysis/ScopInfo.cpp Fri Nov 4 05:08:03 2011 @@ -201,11 +201,14 @@ int getLoopDepth(const Loop *L) { Loop *outerLoop = scop->getRegion().outermostLoopInRegion(const_cast(L)); + assert(outerLoop && "Scop does not contain this loop"); return L->getLoopDepth() - outerLoop->getLoopDepth(); } __isl_give isl_pw_aff *visitAddRecExpr(const SCEVAddRecExpr* Expr) { assert(Expr->isAffine() && "Only affine AddRecurrences allowed"); + assert(scop->getRegion().contains(Expr->getLoop()) + && "Scop does not contain the loop referenced in this AddRec"); isl_pw_aff *Start = visit(Expr->getStart()); isl_pw_aff *Step = visit(Expr->getOperand(1)); From grosser at fim.uni-passau.de Fri Nov 4 05:08:08 2011 From: grosser at fim.uni-passau.de (Tobias Grosser) Date: Fri, 04 Nov 2011 10:08:08 -0000 Subject: [llvm-commits] [polly] r143692 - /polly/trunk/lib/Analysis/ScopDetection.cpp Message-ID: <20111104100808.A50192A6C12D@llvm.org> Author: grosser Date: Fri Nov 4 05:08:08 2011 New Revision: 143692 URL: http://llvm.org/viewvc/llvm-project?rev=143692&view=rev Log: ScopDetection: Small fixes and improvements for the SCEVValidator These fixes were part of a code audit of the SCEVValidator. Modified: polly/trunk/lib/Analysis/ScopDetection.cpp Modified: polly/trunk/lib/Analysis/ScopDetection.cpp URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopDetection.cpp?rev=143692&r1=143691&r2=143692&view=diff ============================================================================== --- polly/trunk/lib/Analysis/ScopDetection.cpp (original) +++ polly/trunk/lib/Analysis/ScopDetection.cpp Fri Nov 4 05:08:08 2011 @@ -145,8 +145,9 @@ SCEVType::TYPE visitTruncateExpr(const SCEVTruncateExpr* Expr) { SCEVType::TYPE Op = visit(Expr->getOperand()); - // We cannot represent this as a affine expression yet. If it is constant - // during Scop execution treat this as a parameter, otherwise bail out. + // We currently do not represent a truncate expression as an affine + // expression. If it is constant during Scop execution, we treat it as a + // parameter, otherwise we bail out. if (Op == SCEVType::INT || Op == SCEVType::PARAM) return SCEVType::PARAM; @@ -156,8 +157,9 @@ SCEVType::TYPE visitZeroExtendExpr(const SCEVZeroExtendExpr * Expr) { SCEVType::TYPE Op = visit(Expr->getOperand()); - // We cannot represent this as a affine expression yet. If it is constant - // during Scop execution treat this as a parameter, otherwise bail out. + // We currently do not represent a zero extend expression as an affine + // expression. If it is constant during Scop execution, we treat it as a + // parameter, otherwise we bail out. if (Op == SCEVType::INT || Op == SCEVType::PARAM) return SCEVType::PARAM; @@ -165,8 +167,10 @@ } SCEVType::TYPE visitSignExtendExpr(const SCEVSignExtendExpr* Expr) { - // Assuming the value is signed, a sign extension is basically a noop. - // TODO: Reconsider this as soon as we support unsigned values. + // We currently allow only signed SCEV expressions. In the case of a + // signed value, a sign extend is a noop. + // + // TODO: Reconsider this when we add support for unsigned values. return visit(Expr->getOperand()); } @@ -175,6 +179,10 @@ for (int i = 0, e = Expr->getNumOperands(); i < e; ++i) { SCEVType::TYPE OpType = visit(Expr->getOperand(i)); + + if (OpType == SCEVType::INVALID) + return SCEVType::INVALID; + Return = std::max(Return, OpType); } @@ -188,26 +196,13 @@ for (int i = 0, e = Expr->getNumOperands(); i < e; ++i) { SCEVType::TYPE OpType = visit(Expr->getOperand(i)); - if (OpType == SCEVType::INVALID) - return SCEVType::INVALID; - - if (OpType == SCEVType::IV) { - if (Return == SCEVType::PARAM || Return == SCEVType::IV) - return SCEVType::INVALID; - - Return = OpType; + if (OpType == SCEVType::INT) continue; - } - - if (OpType == SCEVType::PARAM) { - if (Return == SCEVType::PARAM) - return SCEVType::INVALID; - Return = SCEVType::PARAM; - continue; - } + if (OpType == SCEVType::INVALID || Return != SCEVType::INT) + return SCEVType::INVALID; - // OpType == SCEVType::INT, no need to change anything. + Return = OpType; } // TODO: Check for NSW and NUW. @@ -215,7 +210,16 @@ } SCEVType::TYPE visitUDivExpr(const SCEVUDivExpr* Expr) { - // We do not yet support unsigned operations. + SCEVType::TYPE LHS = visit(Expr->getLHS()); + SCEVType::TYPE RHS = visit(Expr->getRHS()); + + // We currently do not represent a unsigned devision as an affine + // expression. If the division is constant during Scop execution we treat it + // as a parameter, otherwise we bail out. + if (LHS == SCEVType::INT || LHS == SCEVType::PARAM || + RHS == SCEVType::INT || RHS == SCEVType::PARAM) + return SCEVType::PARAM; + return SCEVType::INVALID; } @@ -224,15 +228,24 @@ return SCEVType::INVALID; SCEVType::TYPE Start = visit(Expr->getStart()); + SCEVType::TYPE Recurrence = visit(Expr->getStepRecurrence(SE)); - if (Start == SCEVType::INVALID) - return Start; + if (Start == SCEVType::INVALID || + Recurrence == SCEVType::INVALID || + Recurrence == SCEVType::IV) + return SCEVType::INVALID; + + if (!R->contains(Expr->getLoop())) { + if (Start == SCEVType::IV) + return SCEVType::INVALID; + else + return SCEVType::PARAM; + } - SCEVType::TYPE Recurrence = visit(Expr->getStepRecurrence(SE)); if (Recurrence != SCEVType::INT) return SCEVType::INVALID; - return SCEVType::PARAM; + return SCEVType::IV; } SCEVType::TYPE visitSMaxExpr(const SCEVSMaxExpr* Expr) { @@ -243,32 +256,31 @@ if (OpType == SCEVType::INVALID) return SCEVType::INVALID; - if (OpType == SCEVType::PARAM) - Return = SCEVType::PARAM; + + Return = std::max(Return, OpType); } return Return; } SCEVType::TYPE visitUMaxExpr(const SCEVUMaxExpr* Expr) { - // We do not yet support unsigned operations. If 'Expr' is constant - // during Scop execution treat this as a parameter, otherwise bail out. + // We do not support unsigned operations. If 'Expr' is constant during Scop + // execution we treat this as a parameter, otherwise we bail out. for (int i = 0, e = Expr->getNumOperands(); i < e; ++i) { SCEVType::TYPE OpType = visit(Expr->getOperand(i)); if (OpType != SCEVType::INT && OpType != SCEVType::PARAM) - return SCEVType::PARAM; + return SCEVType::INVALID; } return SCEVType::PARAM; } SCEVType::TYPE visitUnknown(const SCEVUnknown* Expr) { - Value *V = Expr->getValue(); if (isa(V)) - return SCEVType::INVALID; + return SCEVType::INVALID; if (BaseAddress) { if (*BaseAddress) @@ -280,6 +292,7 @@ if (Instruction *I = dyn_cast(Expr->getValue())) if (R->contains(I)) return SCEVType::INVALID; + return SCEVType::PARAM; } }; From benny.kra at googlemail.com Fri Nov 4 08:52:17 2011 From: benny.kra at googlemail.com (Benjamin Kramer) Date: Fri, 04 Nov 2011 13:52:17 -0000 Subject: [llvm-commits] [llvm] r143695 - /llvm/trunk/lib/Object/Archive.cpp Message-ID: <20111104135217.AD5772A6C12C@llvm.org> Author: d0k Date: Fri Nov 4 08:52:17 2011 New Revision: 143695 URL: http://llvm.org/viewvc/llvm-project?rev=143695&view=rev Log: Simplify code. Modified: llvm/trunk/lib/Object/Archive.cpp Modified: llvm/trunk/lib/Object/Archive.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/Archive.cpp?rev=143695&r1=143694&r2=143695&view=diff ============================================================================== --- llvm/trunk/lib/Object/Archive.cpp (original) +++ llvm/trunk/lib/Object/Archive.cpp Fri Nov 4 08:52:17 2011 @@ -242,10 +242,9 @@ Archive::Symbol Archive::Symbol::getNext() const { Symbol t(*this); - const char *buf = Parent->SymbolTable->getBuffer()->getBufferStart(); - buf += t.StringIndex; - while (*buf++); // Go to one past next null. - t.StringIndex = buf - Parent->SymbolTable->getBuffer()->getBufferStart(); + // Go to one past next null. + t.StringIndex = + Parent->SymbolTable->getBuffer()->getBuffer().find('\0', t.StringIndex) + 1; ++t.SymbolIndex; return t; } From anders at 0x63.nu Fri Nov 4 06:43:14 2011 From: anders at 0x63.nu (Anders Waldenborg) Date: Fri, 4 Nov 2011 12:43:14 +0100 Subject: [llvm-commits] [PATCH] Remove declarations for functions that doesn't exist (and never have). Message-ID: <20111104114314.GB8969@0x63.nu> Find patch attached. anders -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Remove-declarations-for-functions-that-doesn-t-exist.patch Type: text/x-diff Size: 1621 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111104/4c354cfd/attachment.bin From bcahoon at codeaurora.org Fri Nov 4 09:07:31 2011 From: bcahoon at codeaurora.org (Brendon Cahoon) Date: Fri, 4 Nov 2011 09:07:31 -0500 Subject: [llvm-commits] [PATCH] Missing check for FlagNW in ScalarEvolution analysis In-Reply-To: <4EB37547.3030104@mxc.ca> References: <00ce01cc9a4e$d93caa60$8bb5ff20$@org> <4EB37547.3030104@mxc.ca> Message-ID: <011701cc9afb$1849f2b0$48ddd810$@org> Great. I do not have commit access so I would appreciate it if you could commit it. Thanks, -- Brendon -- Qualcomm Innovation Center, Inc is a member of Code Aurora Forum -----Original Message----- From: Nick Lewycky [mailto:nicholas at mxc.ca] Sent: Friday, November 04, 2011 12:17 AM To: Brendon Cahoon Cc: llvm-commits at cs.uiuc.edu Subject: Re: [llvm-commits] [PATCH] Missing check for FlagNW in ScalarEvolution analysis Brendon Cahoon wrote: > > This small patch adds the FlagNW flag to an existing check for NoWrap in > HowManyLessThans. Without the check for FlagNW, the function returns > CountNotCompute on some loops where it should be able to determine the > number of times a back edge will execute. The test case in the patch > shows an example loop. Looks great, you even included a test, no regressions in llvm-test. Do you have commit access or would you like me to commit it for you? Nick From peter_cooper at apple.com Fri Nov 4 11:27:51 2011 From: peter_cooper at apple.com (Peter Cooper) Date: Fri, 04 Nov 2011 09:27:51 -0700 Subject: [llvm-commits] [llvm] r143630 - in /llvm/trunk: lib/Transforms/Scalar/DeadStoreElimination.cpp test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll In-Reply-To: References: <20111103180156.8DCC52A6C12C@llvm.org> Message-ID: <3989B3EB-AC0A-4C0B-8B7F-0458BAF5A4DE@apple.com> Hi Eli Thanks for letting me know. I'll revert it now until i've fixed the problems. Pete On Nov 3, 2011, at 3:09 PM, Eli Friedman wrote: > On Thu, Nov 3, 2011 at 11:01 AM, Pete Cooper wrote: >> Author: pete >> Date: Thu Nov 3 13:01:56 2011 >> New Revision: 143630 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=143630&view=rev >> Log: >> DeadStoreElimination can now trim the size of a store if the end of it is dead. >> >> Only currently done if the later store is writing to a power of 2 address or >> has the same alignment as the earlier store as then its likely to not break up >> large stores into smaller ones >> >> Fixes > > This appears to be causing a bunch of failures on buildbots; please > fix or revert. > > -Eli > >> Added: >> llvm/trunk/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll >> Modified: >> llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp >> >> Modified: llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp?rev=143630&r1=143629&r2=143630&view=diff >> ============================================================================== >> --- llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp (original) >> +++ llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp Thu Nov 3 13:01:56 2011 >> @@ -239,6 +239,24 @@ >> } >> } >> >> + >> +/// isShortenable - Returns true if this instruction can be safely shortened in >> +/// length. >> +static bool isShortenable(Instruction *I) { >> + // Don't shorten stores for now >> + if (isa(I)) >> + return false; >> + >> + IntrinsicInst *II = cast(I); >> + switch (II->getIntrinsicID()) { >> + default: return false; >> + case Intrinsic::memset: >> + case Intrinsic::memcpy: >> + // Do shorten memory intrinsics. >> + return true; >> + } >> +} >> + >> /// getStoredPointerOperand - Return the pointer that is being written to. >> static Value *getStoredPointerOperand(Instruction *I) { >> if (StoreInst *SI = dyn_cast(I)) >> @@ -293,11 +311,24 @@ >> return false; >> } >> >> -/// isCompleteOverwrite - Return true if a store to the 'Later' location >> +namespace { >> + enum OverwriteResult >> + { >> + OverwriteComplete, >> + OverwriteEnd, >> + OverwriteUnknown >> + }; >> +} >> + >> +/// isOverwrite - Return 'OverwriteComplete' if a store to the 'Later' location >> /// completely overwrites a store to the 'Earlier' location. >> -static bool isCompleteOverwrite(const AliasAnalysis::Location &Later, >> - const AliasAnalysis::Location &Earlier, >> - AliasAnalysis &AA) { >> +/// 'OverwriteEnd' if the end of the 'Earlier' location is completely >> +/// overwritten by 'Later', or 'OverwriteUnknown' if nothing can be determined >> +static OverwriteResult isOverwrite(const AliasAnalysis::Location &Later, >> + const AliasAnalysis::Location &Earlier, >> + AliasAnalysis &AA, >> + int64_t& EarlierOff, >> + int64_t& LaterOff) { >> const Value *P1 = Earlier.Ptr->stripPointerCasts(); >> const Value *P2 = Later.Ptr->stripPointerCasts(); >> >> @@ -311,23 +342,24 @@ >> // If we have no TargetData information around, then the size of the store >> // is inferrable from the pointee type. If they are the same type, then >> // we know that the store is safe. >> - if (AA.getTargetData() == 0) >> - return Later.Ptr->getType() == Earlier.Ptr->getType(); >> - return false; >> + if (AA.getTargetData() == 0 && >> + Later.Ptr->getType() == Earlier.Ptr->getType()) >> + return OverwriteComplete; >> + >> + return OverwriteUnknown; >> } >> >> // Make sure that the Later size is >= the Earlier size. >> - if (Later.Size < Earlier.Size) >> - return false; >> - return true; >> + if (Later.Size >= Earlier.Size) >> + return OverwriteComplete; >> } >> >> // Otherwise, we have to have size information, and the later store has to be >> // larger than the earlier one. >> if (Later.Size == AliasAnalysis::UnknownSize || >> Earlier.Size == AliasAnalysis::UnknownSize || >> - Later.Size <= Earlier.Size || AA.getTargetData() == 0) >> - return false; >> + AA.getTargetData() == 0) >> + return OverwriteUnknown; >> >> // Check to see if the later store is to the entire object (either a global, >> // an alloca, or a byval argument). If so, then it clearly overwrites any >> @@ -340,26 +372,27 @@ >> // If we can't resolve the same pointers to the same object, then we can't >> // analyze them at all. >> if (UO1 != UO2) >> - return false; >> + return OverwriteUnknown; >> >> // If the "Later" store is to a recognizable object, get its size. >> if (isObjectPointerWithTrustworthySize(UO2)) { >> uint64_t ObjectSize = >> TD.getTypeAllocSize(cast(UO2->getType())->getElementType()); >> if (ObjectSize == Later.Size) >> - return true; >> + return OverwriteComplete; >> } >> >> // Okay, we have stores to two completely different pointers. Try to >> // decompose the pointer into a "base + constant_offset" form. If the base >> // pointers are equal, then we can reason about the two stores. >> - int64_t EarlierOff = 0, LaterOff = 0; >> + EarlierOff = 0; >> + LaterOff = 0; >> const Value *BP1 = GetPointerBaseWithConstantOffset(P1, EarlierOff, TD); >> const Value *BP2 = GetPointerBaseWithConstantOffset(P2, LaterOff, TD); >> >> // If the base pointers still differ, we have two completely different stores. >> if (BP1 != BP2) >> - return false; >> + return OverwriteUnknown; >> >> // The later store completely overlaps the earlier store if: >> // >> @@ -377,11 +410,24 @@ >> // >> // We have to be careful here as *Off is signed while *.Size is unsigned. >> if (EarlierOff >= LaterOff && >> + Later.Size > Earlier.Size && >> uint64_t(EarlierOff - LaterOff) + Earlier.Size <= Later.Size) >> - return true; >> + return OverwriteComplete; >> + >> + // The other interesting case is if the later store overwrites the end of >> + // the earlier store >> + // >> + // |--earlier--| >> + // |-- later --| >> + // >> + // In this case we may want to trim the size of earlier to avoid generating >> + // writes to addresses which will definitely be overwritten later >> + if (LaterOff > EarlierOff && >> + LaterOff + Later.Size >= EarlierOff + Earlier.Size) >> + return OverwriteEnd; >> >> // Otherwise, they don't completely overlap. >> - return false; >> + return OverwriteUnknown; >> } >> >> /// isPossibleSelfRead - If 'Inst' might be a self read (i.e. a noop copy of a >> @@ -505,22 +551,52 @@ >> // If we find a write that is a) removable (i.e., non-volatile), b) is >> // completely obliterated by the store to 'Loc', and c) which we know that >> // 'Inst' doesn't load from, then we can remove it. >> - if (isRemovable(DepWrite) && isCompleteOverwrite(Loc, DepLoc, *AA) && >> + if (isRemovable(DepWrite) && >> !isPossibleSelfRead(Inst, Loc, DepWrite, *AA)) { >> - DEBUG(dbgs() << "DSE: Remove Dead Store:\n DEAD: " >> - << *DepWrite << "\n KILLER: " << *Inst << '\n'); >> - >> - // Delete the store and now-dead instructions that feed it. >> - DeleteDeadInstruction(DepWrite, *MD); >> - ++NumFastStores; >> - MadeChange = true; >> + int64_t InstWriteOffset, DepWriteOffset; >> + OverwriteResult OR = isOverwrite(Loc, DepLoc, *AA, >> + DepWriteOffset, InstWriteOffset); >> + if (OR == OverwriteComplete) { >> + DEBUG(dbgs() << "DSE: Remove Dead Store:\n DEAD: " >> + << *DepWrite << "\n KILLER: " << *Inst << '\n'); >> >> - // DeleteDeadInstruction can delete the current instruction in loop >> - // cases, reset BBI. >> - BBI = Inst; >> - if (BBI != BB.begin()) >> - --BBI; >> - break; >> + // Delete the store and now-dead instructions that feed it. >> + DeleteDeadInstruction(DepWrite, *MD); >> + ++NumFastStores; >> + MadeChange = true; >> + >> + // DeleteDeadInstruction can delete the current instruction in loop >> + // cases, reset BBI. >> + BBI = Inst; >> + if (BBI != BB.begin()) >> + --BBI; >> + break; >> + } else if (OR == OverwriteEnd && isShortenable(DepWrite)) { >> + // TODO: base this on the target vector size so that if the earlier >> + // store was too small to get vector writes anyway then its likely >> + // a good idea to shorten it >> + // Power of 2 vector writes are probably always a bad idea to optimize >> + // as any store/memset/memcpy is likely using vector instructions so >> + // shortening it to not vector size is likely to be slower >> + MemIntrinsic* DepIntrinsic = cast(DepWrite); >> + unsigned DepWriteAlign = DepIntrinsic->getAlignment(); >> + if (llvm::isPowerOf2_64(InstWriteOffset) || >> + ((DepWriteAlign != 0) && InstWriteOffset % DepWriteAlign == 0)) { >> + >> + DEBUG(dbgs() << "DSE: Remove Dead Store:\n OW END: " >> + << *DepWrite << "\n KILLER (offset " >> + << InstWriteOffset << ", " >> + << DepLoc.Size << ")" >> + << *Inst << '\n'); >> + >> + Value* DepWriteLength = DepIntrinsic->getLength(); >> + Value* TrimmedLength = ConstantInt::get(DepWriteLength->getType(), >> + InstWriteOffset - >> + DepWriteOffset); >> + DepIntrinsic->setLength(TrimmedLength); >> + MadeChange = true; >> + } >> + } >> } >> >> // If this is a may-aliased store that is clobbering the store value, we >> >> Added: llvm/trunk/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll?rev=143630&view=auto >> ============================================================================== >> --- llvm/trunk/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll (added) >> +++ llvm/trunk/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll Thu Nov 3 13:01:56 2011 >> @@ -0,0 +1,78 @@ >> +; RUN: opt < %s -basicaa -dse -S | FileCheck %s >> +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-S128" >> + >> +%struct.vec2 = type { <4 x i32>, <4 x i32> } >> +%struct.vec2plusi = type { <4 x i32>, <4 x i32>, i32 } >> + >> + at glob1 = global %struct.vec2 zeroinitializer, align 16 >> + at glob2 = global %struct.vec2plusi zeroinitializer, align 16 >> + >> +define void @write24to28(i32* nocapture %p) nounwind uwtable ssp { >> +; CHECK: @write24to28 >> +entry: >> + %arrayidx0 = getelementptr inbounds i32* %p, i64 1 >> + %p3 = bitcast i32* %arrayidx0 to i8* >> +; CHECK: call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 24, i32 4, i1 false) >> + call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 28, i32 4, i1 false) >> + %arrayidx1 = getelementptr inbounds i32* %p, i64 7 >> + store i32 1, i32* %arrayidx1, align 4 >> + ret void >> +} >> + >> +define void @write28to32(i32* nocapture %p) nounwind uwtable ssp { >> +; CHECK: @write28to32 >> +entry: >> + %p3 = bitcast i32* %p to i8* >> +; CHECK: call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 28, i32 4, i1 false) >> + call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 32, i32 4, i1 false) >> + %arrayidx1 = getelementptr inbounds i32* %p, i64 7 >> + store i32 1, i32* %arrayidx1, align 4 >> + ret void >> +} >> + >> +define void @dontwrite28to32memset(i32* nocapture %p) nounwind uwtable ssp { >> +; CHECK: @dontwrite28to32memset >> +entry: >> + %p3 = bitcast i32* %p to i8* >> +; CHECK: call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 32, i32 16, i1 false) >> + call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 32, i32 16, i1 false) >> + %arrayidx1 = getelementptr inbounds i32* %p, i64 7 >> + store i32 1, i32* %arrayidx1, align 4 >> + ret void >> +} >> + >> +define void @write32to36(%struct.vec2plusi* nocapture %p) nounwind uwtable ssp { >> +; CHECK: @write32to36 >> +entry: >> + %0 = bitcast %struct.vec2plusi* %p to i8* >> +; CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2plusi* @glob2 to i8*), i64 32, i32 16, i1 false) >> + tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2plusi* @glob2 to i8*), i64 36, i32 16, i1 false) >> + %c = getelementptr inbounds %struct.vec2plusi* %p, i64 0, i32 2 >> + store i32 1, i32* %c, align 4 >> + ret void >> +} >> + >> +define void @write16to32(%struct.vec2* nocapture %p) nounwind uwtable ssp { >> +; CHECK: @write16to32 >> +entry: >> + %0 = bitcast %struct.vec2* %p to i8* >> +; CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2* @glob1 to i8*), i64 16, i32 16, i1 false) >> + tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2* @glob1 to i8*), i64 32, i32 16, i1 false) >> + %c = getelementptr inbounds %struct.vec2* %p, i64 0, i32 1 >> + store <4 x i32> , <4 x i32>* %c, align 4 >> + ret void >> +} >> + >> +define void @dontwrite28to32memcpy(%struct.vec2* nocapture %p) nounwind uwtable ssp { >> +; CHECK: @dontwrite28to32memcpy >> +entry: >> + %0 = bitcast %struct.vec2* %p to i8* >> +; CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2* @glob1 to i8*), i64 32, i32 16, i1 false) >> + tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2* @glob1 to i8*), i64 32, i32 16, i1 false) >> + %arrayidx1 = getelementptr inbounds %struct.vec2* %p, i64 0, i32 0, i64 7 >> + store i32 1, i32* %arrayidx1, align 4 >> + ret void >> +} >> + >> +declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind >> +declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind >> >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits >> From mcrosier at apple.com Fri Nov 4 12:07:11 2011 From: mcrosier at apple.com (Chad Rosier) Date: Fri, 04 Nov 2011 17:07:11 -0000 Subject: [llvm-commits] [llvm] r143705 - /llvm/trunk/include/llvm-c/Core.h Message-ID: <20111104170711.DE9C92A6C12C@llvm.org> Author: mcrosier Date: Fri Nov 4 12:07:11 2011 New Revision: 143705 URL: http://llvm.org/viewvc/llvm-project?rev=143705&view=rev Log: Remove declarations for functions that don't exist (and never have). Patch by Anders Waldenborg . Modified: llvm/trunk/include/llvm-c/Core.h Modified: llvm/trunk/include/llvm-c/Core.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Core.h?rev=143705&r1=143704&r2=143705&view=diff ============================================================================== --- llvm/trunk/include/llvm-c/Core.h (original) +++ llvm/trunk/include/llvm-c/Core.h Fri Nov 4 12:07:11 2011 @@ -540,7 +540,7 @@ LLVMValueRef LLVMGetUser(LLVMUseRef U); LLVMValueRef LLVMGetUsedValue(LLVMUseRef U); -/* Operations on Users */ +/* Operations on Users and metadata */ LLVMValueRef LLVMGetOperand(LLVMValueRef Val, unsigned Index); void LLVMSetOperand(LLVMValueRef User, unsigned Index, LLVMValueRef Val); int LLVMGetNumOperands(LLVMValueRef Val); @@ -562,8 +562,6 @@ unsigned Count); LLVMValueRef LLVMMDNode(LLVMValueRef *Vals, unsigned Count); const char *LLVMGetMDString(LLVMValueRef V, unsigned* Len); -int LLVMGetMDNodeNumOperands(LLVMValueRef V); -LLVMValueRef *LLVMGetMDNodeOperand(LLVMValueRef V, unsigned i); unsigned LLVMGetNamedMetadataNumOperands(LLVMModuleRef M, const char* name); void LLVMGetNamedMetadataOperands(LLVMModuleRef M, const char* name, LLVMValueRef *Dest); From mcrosier at apple.com Fri Nov 4 12:09:52 2011 From: mcrosier at apple.com (Chad Rosier) Date: Fri, 04 Nov 2011 10:09:52 -0700 Subject: [llvm-commits] [PATCH] Remove declarations for functions that doesn't exist (and never have). In-Reply-To: <20111104114314.GB8969@0x63.nu> References: <20111104114314.GB8969@0x63.nu> Message-ID: <80C52665-6EEE-4B1A-8F68-767A5EEEB4AB@apple.com> Thanks Anders. Committed in revision 143705. Chad On Nov 4, 2011, at 4:43 AM, Anders Waldenborg wrote: > Find patch attached. > > anders > > <0001-Remove-declarations-for-functions-that-doesn-t-exist.patch>_______________________________________________ > 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 Fri Nov 4 12:15:39 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Fri, 4 Nov 2011 10:15:39 -0700 Subject: [llvm-commits] [llvm] r143630 - in /llvm/trunk: lib/Transforms/Scalar/DeadStoreElimination.cpp test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll In-Reply-To: <3989B3EB-AC0A-4C0B-8B7F-0458BAF5A4DE@apple.com> References: <20111103180156.8DCC52A6C12C@llvm.org> <3989B3EB-AC0A-4C0B-8B7F-0458BAF5A4DE@apple.com> Message-ID: r143668. -Eli On Fri, Nov 4, 2011 at 9:27 AM, Peter Cooper wrote: > Hi Eli > > Thanks for letting me know. ?I'll revert it now until i've fixed the problems. > > Pete > > On Nov 3, 2011, at 3:09 PM, Eli Friedman wrote: > >> On Thu, Nov 3, 2011 at 11:01 AM, Pete Cooper wrote: >>> Author: pete >>> Date: Thu Nov ?3 13:01:56 2011 >>> New Revision: 143630 >>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=143630&view=rev >>> Log: >>> DeadStoreElimination can now trim the size of a store if the end of it is dead. >>> >>> Only currently done if the later store is writing to a power of 2 address or >>> has the same alignment as the earlier store as then its likely to not break up >>> large stores into smaller ones >>> >>> Fixes >> >> This appears to be causing a bunch of failures on buildbots; please >> fix or revert. >> >> -Eli >> >>> Added: >>> ? ?llvm/trunk/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll >>> Modified: >>> ? ?llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp >>> >>> Modified: llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp >>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp?rev=143630&r1=143629&r2=143630&view=diff >>> ============================================================================== >>> --- llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp (original) >>> +++ llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp Thu Nov ?3 13:01:56 2011 >>> @@ -239,6 +239,24 @@ >>> ? } >>> ?} >>> >>> + >>> +/// isShortenable - Returns true if this instruction can be safely shortened in >>> +/// length. >>> +static bool isShortenable(Instruction *I) { >>> + ?// Don't shorten stores for now >>> + ?if (isa(I)) >>> + ? ?return false; >>> + >>> + ?IntrinsicInst *II = cast(I); >>> + ?switch (II->getIntrinsicID()) { >>> + ? ?default: return false; >>> + ? ?case Intrinsic::memset: >>> + ? ?case Intrinsic::memcpy: >>> + ? ? ?// Do shorten memory intrinsics. >>> + ? ? ?return true; >>> + ?} >>> +} >>> + >>> ?/// getStoredPointerOperand - Return the pointer that is being written to. >>> ?static Value *getStoredPointerOperand(Instruction *I) { >>> ? if (StoreInst *SI = dyn_cast(I)) >>> @@ -293,11 +311,24 @@ >>> ? return false; >>> ?} >>> >>> -/// isCompleteOverwrite - Return true if a store to the 'Later' location >>> +namespace { >>> + ?enum OverwriteResult >>> + ?{ >>> + ? ?OverwriteComplete, >>> + ? ?OverwriteEnd, >>> + ? ?OverwriteUnknown >>> + ?}; >>> +} >>> + >>> +/// isOverwrite - Return 'OverwriteComplete' if a store to the 'Later' location >>> ?/// completely overwrites a store to the 'Earlier' location. >>> -static bool isCompleteOverwrite(const AliasAnalysis::Location &Later, >>> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?const AliasAnalysis::Location &Earlier, >>> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?AliasAnalysis &AA) { >>> +/// 'OverwriteEnd' if the end of the 'Earlier' location is completely >>> +/// overwritten by 'Later', or 'OverwriteUnknown' if nothing can be determined >>> +static OverwriteResult isOverwrite(const AliasAnalysis::Location &Later, >>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? const AliasAnalysis::Location &Earlier, >>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? AliasAnalysis &AA, >>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? int64_t& EarlierOff, >>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? int64_t& LaterOff) { >>> ? const Value *P1 = Earlier.Ptr->stripPointerCasts(); >>> ? const Value *P2 = Later.Ptr->stripPointerCasts(); >>> >>> @@ -311,23 +342,24 @@ >>> ? ? ? // If we have no TargetData information around, then the size of the store >>> ? ? ? // is inferrable from the pointee type. ?If they are the same type, then >>> ? ? ? // we know that the store is safe. >>> - ? ? ?if (AA.getTargetData() == 0) >>> - ? ? ? ?return Later.Ptr->getType() == Earlier.Ptr->getType(); >>> - ? ? ?return false; >>> + ? ? ?if (AA.getTargetData() == 0 && >>> + ? ? ? ? ?Later.Ptr->getType() == Earlier.Ptr->getType()) >>> + ? ? ? ?return OverwriteComplete; >>> + >>> + ? ? ?return OverwriteUnknown; >>> ? ? } >>> >>> ? ? // Make sure that the Later size is >= the Earlier size. >>> - ? ?if (Later.Size < Earlier.Size) >>> - ? ? ?return false; >>> - ? ?return true; >>> + ? ?if (Later.Size >= Earlier.Size) >>> + ? ? ?return OverwriteComplete; >>> ? } >>> >>> ? // Otherwise, we have to have size information, and the later store has to be >>> ? // larger than the earlier one. >>> ? if (Later.Size == AliasAnalysis::UnknownSize || >>> ? ? ? Earlier.Size == AliasAnalysis::UnknownSize || >>> - ? ? ?Later.Size <= Earlier.Size || AA.getTargetData() == 0) >>> - ? ?return false; >>> + ? ? ?AA.getTargetData() == 0) >>> + ? ?return OverwriteUnknown; >>> >>> ? // Check to see if the later store is to the entire object (either a global, >>> ? // an alloca, or a byval argument). ?If so, then it clearly overwrites any >>> @@ -340,26 +372,27 @@ >>> ? // If we can't resolve the same pointers to the same object, then we can't >>> ? // analyze them at all. >>> ? if (UO1 != UO2) >>> - ? ?return false; >>> + ? ?return OverwriteUnknown; >>> >>> ? // If the "Later" store is to a recognizable object, get its size. >>> ? if (isObjectPointerWithTrustworthySize(UO2)) { >>> ? ? uint64_t ObjectSize = >>> ? ? ? TD.getTypeAllocSize(cast(UO2->getType())->getElementType()); >>> ? ? if (ObjectSize == Later.Size) >>> - ? ? ?return true; >>> + ? ? ?return OverwriteComplete; >>> ? } >>> >>> ? // Okay, we have stores to two completely different pointers. ?Try to >>> ? // decompose the pointer into a "base + constant_offset" form. ?If the base >>> ? // pointers are equal, then we can reason about the two stores. >>> - ?int64_t EarlierOff = 0, LaterOff = 0; >>> + ?EarlierOff = 0; >>> + ?LaterOff = 0; >>> ? const Value *BP1 = GetPointerBaseWithConstantOffset(P1, EarlierOff, TD); >>> ? const Value *BP2 = GetPointerBaseWithConstantOffset(P2, LaterOff, TD); >>> >>> ? // If the base pointers still differ, we have two completely different stores. >>> ? if (BP1 != BP2) >>> - ? ?return false; >>> + ? ?return OverwriteUnknown; >>> >>> ? // The later store completely overlaps the earlier store if: >>> ? // >>> @@ -377,11 +410,24 @@ >>> ? // >>> ? // We have to be careful here as *Off is signed while *.Size is unsigned. >>> ? if (EarlierOff >= LaterOff && >>> + ? ? ?Later.Size > Earlier.Size && >>> ? ? ? uint64_t(EarlierOff - LaterOff) + Earlier.Size <= Later.Size) >>> - ? ?return true; >>> + ? ?return OverwriteComplete; >>> + >>> + ?// The other interesting case is if the later store overwrites the end of >>> + ?// the earlier store >>> + ?// >>> + ?// ? ? ?|--earlier--| >>> + ?// ? ? ? ? ? ? ? ?|-- ? later ? --| >>> + ?// >>> + ?// In this case we may want to trim the size of earlier to avoid generating >>> + ?// writes to addresses which will definitely be overwritten later >>> + ?if (LaterOff > EarlierOff && >>> + ? ? ?LaterOff + Later.Size >= EarlierOff + Earlier.Size) >>> + ? ?return OverwriteEnd; >>> >>> ? // Otherwise, they don't completely overlap. >>> - ?return false; >>> + ?return OverwriteUnknown; >>> ?} >>> >>> ?/// isPossibleSelfRead - If 'Inst' might be a self read (i.e. a noop copy of a >>> @@ -505,22 +551,52 @@ >>> ? ? ? // If we find a write that is a) removable (i.e., non-volatile), b) is >>> ? ? ? // completely obliterated by the store to 'Loc', and c) which we know that >>> ? ? ? // 'Inst' doesn't load from, then we can remove it. >>> - ? ? ?if (isRemovable(DepWrite) && isCompleteOverwrite(Loc, DepLoc, *AA) && >>> + ? ? ?if (isRemovable(DepWrite) && >>> ? ? ? ? ? !isPossibleSelfRead(Inst, Loc, DepWrite, *AA)) { >>> - ? ? ? ?DEBUG(dbgs() << "DSE: Remove Dead Store:\n ?DEAD: " >>> - ? ? ? ? ? ? ?<< *DepWrite << "\n ?KILLER: " << *Inst << '\n'); >>> - >>> - ? ? ? ?// Delete the store and now-dead instructions that feed it. >>> - ? ? ? ?DeleteDeadInstruction(DepWrite, *MD); >>> - ? ? ? ?++NumFastStores; >>> - ? ? ? ?MadeChange = true; >>> + ? ? ? ?int64_t InstWriteOffset, DepWriteOffset; >>> + ? ? ? ?OverwriteResult OR = isOverwrite(Loc, DepLoc, *AA, >>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? DepWriteOffset, InstWriteOffset); >>> + ? ? ? ?if (OR == OverwriteComplete) { >>> + ? ? ? ? ?DEBUG(dbgs() << "DSE: Remove Dead Store:\n ?DEAD: " >>> + ? ? ? ? ? ? ? ?<< *DepWrite << "\n ?KILLER: " << *Inst << '\n'); >>> >>> - ? ? ? ?// DeleteDeadInstruction can delete the current instruction in loop >>> - ? ? ? ?// cases, reset BBI. >>> - ? ? ? ?BBI = Inst; >>> - ? ? ? ?if (BBI != BB.begin()) >>> - ? ? ? ? ?--BBI; >>> - ? ? ? ?break; >>> + ? ? ? ? ?// Delete the store and now-dead instructions that feed it. >>> + ? ? ? ? ?DeleteDeadInstruction(DepWrite, *MD); >>> + ? ? ? ? ?++NumFastStores; >>> + ? ? ? ? ?MadeChange = true; >>> + >>> + ? ? ? ? ?// DeleteDeadInstruction can delete the current instruction in loop >>> + ? ? ? ? ?// cases, reset BBI. >>> + ? ? ? ? ?BBI = Inst; >>> + ? ? ? ? ?if (BBI != BB.begin()) >>> + ? ? ? ? ? ?--BBI; >>> + ? ? ? ? ?break; >>> + ? ? ? ?} else if (OR == OverwriteEnd && isShortenable(DepWrite)) { >>> + ? ? ? ? ?// TODO: base this on the target vector size so that if the earlier >>> + ? ? ? ? ?// store was too small to get vector writes anyway then its likely >>> + ? ? ? ? ?// a good idea to shorten it >>> + ? ? ? ? ?// Power of 2 vector writes are probably always a bad idea to optimize >>> + ? ? ? ? ?// as any store/memset/memcpy is likely using vector instructions so >>> + ? ? ? ? ?// shortening it to not vector size is likely to be slower >>> + ? ? ? ? ?MemIntrinsic* DepIntrinsic = cast(DepWrite); >>> + ? ? ? ? ?unsigned DepWriteAlign = DepIntrinsic->getAlignment(); >>> + ? ? ? ? ?if (llvm::isPowerOf2_64(InstWriteOffset) || >>> + ? ? ? ? ? ? ?((DepWriteAlign != 0) && InstWriteOffset % DepWriteAlign == 0)) { >>> + >>> + ? ? ? ? ? ?DEBUG(dbgs() << "DSE: Remove Dead Store:\n ?OW END: " >>> + ? ? ? ? ? ? ? ? ?<< *DepWrite << "\n ?KILLER (offset " >>> + ? ? ? ? ? ? ? ? ?<< InstWriteOffset << ", " >>> + ? ? ? ? ? ? ? ? ?<< DepLoc.Size << ")" >>> + ? ? ? ? ? ? ? ? ?<< *Inst << '\n'); >>> + >>> + ? ? ? ? ? ?Value* DepWriteLength = DepIntrinsic->getLength(); >>> + ? ? ? ? ? ?Value* TrimmedLength = ConstantInt::get(DepWriteLength->getType(), >>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?InstWriteOffset - >>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?DepWriteOffset); >>> + ? ? ? ? ? ?DepIntrinsic->setLength(TrimmedLength); >>> + ? ? ? ? ? ?MadeChange = true; >>> + ? ? ? ? ?} >>> + ? ? ? ?} >>> ? ? ? } >>> >>> ? ? ? // If this is a may-aliased store that is clobbering the store value, we >>> >>> Added: llvm/trunk/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll >>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll?rev=143630&view=auto >>> ============================================================================== >>> --- llvm/trunk/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll (added) >>> +++ llvm/trunk/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll Thu Nov ?3 13:01:56 2011 >>> @@ -0,0 +1,78 @@ >>> +; RUN: opt < %s -basicaa -dse -S | FileCheck %s >>> +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-S128" >>> + >>> +%struct.vec2 = type { <4 x i32>, <4 x i32> } >>> +%struct.vec2plusi = type { <4 x i32>, <4 x i32>, i32 } >>> + >>> + at glob1 = global %struct.vec2 zeroinitializer, align 16 >>> + at glob2 = global %struct.vec2plusi zeroinitializer, align 16 >>> + >>> +define void @write24to28(i32* nocapture %p) nounwind uwtable ssp { >>> +; CHECK: @write24to28 >>> +entry: >>> + ?%arrayidx0 = getelementptr inbounds i32* %p, i64 1 >>> + ?%p3 = bitcast i32* %arrayidx0 to i8* >>> +; CHECK: call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 24, i32 4, i1 false) >>> + ?call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 28, i32 4, i1 false) >>> + ?%arrayidx1 = getelementptr inbounds i32* %p, i64 7 >>> + ?store i32 1, i32* %arrayidx1, align 4 >>> + ?ret void >>> +} >>> + >>> +define void @write28to32(i32* nocapture %p) nounwind uwtable ssp { >>> +; CHECK: @write28to32 >>> +entry: >>> + ?%p3 = bitcast i32* %p to i8* >>> +; CHECK: call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 28, i32 4, i1 false) >>> + ?call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 32, i32 4, i1 false) >>> + ?%arrayidx1 = getelementptr inbounds i32* %p, i64 7 >>> + ?store i32 1, i32* %arrayidx1, align 4 >>> + ?ret void >>> +} >>> + >>> +define void @dontwrite28to32memset(i32* nocapture %p) nounwind uwtable ssp { >>> +; CHECK: @dontwrite28to32memset >>> +entry: >>> + ?%p3 = bitcast i32* %p to i8* >>> +; CHECK: call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 32, i32 16, i1 false) >>> + ?call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 32, i32 16, i1 false) >>> + ?%arrayidx1 = getelementptr inbounds i32* %p, i64 7 >>> + ?store i32 1, i32* %arrayidx1, align 4 >>> + ?ret void >>> +} >>> + >>> +define void @write32to36(%struct.vec2plusi* nocapture %p) nounwind uwtable ssp { >>> +; CHECK: @write32to36 >>> +entry: >>> + ?%0 = bitcast %struct.vec2plusi* %p to i8* >>> +; CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2plusi* @glob2 to i8*), i64 32, i32 16, i1 false) >>> + ?tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2plusi* @glob2 to i8*), i64 36, i32 16, i1 false) >>> + ?%c = getelementptr inbounds %struct.vec2plusi* %p, i64 0, i32 2 >>> + ?store i32 1, i32* %c, align 4 >>> + ?ret void >>> +} >>> + >>> +define void @write16to32(%struct.vec2* nocapture %p) nounwind uwtable ssp { >>> +; CHECK: @write16to32 >>> +entry: >>> + ?%0 = bitcast %struct.vec2* %p to i8* >>> +; CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2* @glob1 to i8*), i64 16, i32 16, i1 false) >>> + ?tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2* @glob1 to i8*), i64 32, i32 16, i1 false) >>> + ?%c = getelementptr inbounds %struct.vec2* %p, i64 0, i32 1 >>> + ?store <4 x i32> , <4 x i32>* %c, align 4 >>> + ?ret void >>> +} >>> + >>> +define void @dontwrite28to32memcpy(%struct.vec2* nocapture %p) nounwind uwtable ssp { >>> +; CHECK: @dontwrite28to32memcpy >>> +entry: >>> + ?%0 = bitcast %struct.vec2* %p to i8* >>> +; CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2* @glob1 to i8*), i64 32, i32 16, i1 false) >>> + ?tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2* @glob1 to i8*), i64 32, i32 16, i1 false) >>> + ?%arrayidx1 = getelementptr inbounds %struct.vec2* %p, i64 0, i32 0, i64 7 >>> + ?store i32 1, i32* %arrayidx1, align 4 >>> + ?ret void >>> +} >>> + >>> +declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind >>> +declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind >>> >>> >>> _______________________________________________ >>> llvm-commits mailing list >>> llvm-commits at cs.uiuc.edu >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits >>> > > From daniel at zuster.org Fri Nov 4 12:14:44 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Fri, 04 Nov 2011 17:14:44 -0000 Subject: [llvm-commits] [llvm] r143708 - in /llvm/trunk: ModuleInfo.txt build-for-llvm-top.sh Message-ID: <20111104171444.4B11E2A6C12C@llvm.org> Author: ddunbar Date: Fri Nov 4 12:14:44 2011 New Revision: 143708 URL: http://llvm.org/viewvc/llvm-project?rev=143708&view=rev Log: utils: Remove build-for-llvm-top.sh and ModuleInfo.txt, which are not documented and I am pretty sure no one uses. Removed: llvm/trunk/ModuleInfo.txt llvm/trunk/build-for-llvm-top.sh Removed: llvm/trunk/ModuleInfo.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/ModuleInfo.txt?rev=143707&view=auto ============================================================================== --- llvm/trunk/ModuleInfo.txt (original) +++ llvm/trunk/ModuleInfo.txt (removed) @@ -1,4 +0,0 @@ -DepModule: -BuildCmd: ./build-for-llvm-top.sh -CleanCmd: make clean -C ../build.llvm -InstallCmd: make install -C ../build.llvm Removed: llvm/trunk/build-for-llvm-top.sh URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/build-for-llvm-top.sh?rev=143707&view=auto ============================================================================== --- llvm/trunk/build-for-llvm-top.sh (original) +++ llvm/trunk/build-for-llvm-top.sh (removed) @@ -1,68 +0,0 @@ -#!/bin/sh - -# This includes the Bourne shell library from llvm-top. Since this file is -# generally only used when building from llvm-top, it is safe to assume that -# llvm is checked out into llvm-top in which case .. just works. -. ../library.sh - -# Process the options passed in to us by the build script into standard -# variables. -process_arguments "$@" - -# First, see if the build directory is there. If not, create it. -build_dir="$LLVM_TOP/build.llvm" -if test ! -d "$build_dir" ; then - mkdir -p "$build_dir" -fi - -# See if we have previously been configured by sensing the presence -# of the config.status scripts -config_status="$build_dir/config.status" -if test ! -f "$config_status" -o "$config_status" -ot "$0" ; then - # We must configure so build a list of configure options - config_options="--prefix=$PREFIX --with-llvmgccdir=$PREFIX" - if test "$OPTIMIZED" -eq 1 ; then - config_options="$config_options --enable-optimized" - else - config_options="$config_options --disable-optimized" - fi - if test "$DEBUG" -eq 1 ; then - config_options="$config_options --enable-debug" - else - config_options="$config_options --disable-debug" - fi - if test "$ASSERTIONS" -eq 1 ; then - config_options="$config_options --enable-assertions" - else - config_options="$config_options --disable-assertions" - fi - if test "$CHECKING" -eq 1 ; then - config_options="$config_options --enable-expensive-checks" - else - config_options="$config_options --disable-expensive-checks" - fi - if test "$DOXYGEN" -eq 1 ; then - config_options="$config_options --enable-doxygen" - else - config_options="$config_options --disable-doxygen" - fi - if test "$THREADS" -eq 1 ; then - config_options="$config_options --enable-threads" - else - config_options="$config_options --disable-threads" - fi - config_options="$config_options $OPTIONS_DASH $OPTIONS_DASH_DASH" - src_dir=`pwd` - cd "$build_dir" - msg 0 Configuring $module with: - msg 0 " $src_dir/configure" $config_options - $src_dir/configure $config_options || \ - die $? "Configuring $module module failed" -else - msg 0 Module $module already configured, ignoring configure options. - cd "$build_dir" -fi - -msg 0 Building $module with: -msg 0 " make" $OPTIONS_ASSIGN tools-only -make $OPTIONS_ASSIGN tools-only From eli.friedman at gmail.com Fri Nov 4 12:27:36 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Fri, 4 Nov 2011 10:27:36 -0700 Subject: [llvm-commits] [llvm] r143662 - /llvm/trunk/Makefile.rules In-Reply-To: <20111103224622.08E1A2A6C12C@llvm.org> References: <20111103224622.08E1A2A6C12C@llvm.org> Message-ID: On Thu, Nov 3, 2011 at 3:46 PM, Daniel Dunbar wrote: > Author: ddunbar > Date: Thu Nov ?3 17:46:21 2011 > New Revision: 143662 > > URL: http://llvm.org/viewvc/llvm-project?rev=143662&view=rev > Log: > build/Make: Integrate llvm-build into Makefiles. > ?- Basically, we coordinate with llvm-build to create a Makefile fragment we can > ? easily use. For now, nothing is wired in except the support to automatically > ? regenerate this file when necessary. This appears to be breaking builds on some buildbots; see http://bb.pgr.jp/builders/clang-i686-msys http://lab.llvm.org:8011/builders/clang-native-mingw32-win7 . -Eli > Modified: > ? ?llvm/trunk/Makefile.rules > > Modified: llvm/trunk/Makefile.rules > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=143662&r1=143661&r2=143662&view=diff > ============================================================================== > --- llvm/trunk/Makefile.rules (original) > +++ llvm/trunk/Makefile.rules Thu Nov ?3 17:46:21 2011 > @@ -57,6 +57,54 @@ > > ?$(UserTargets):: > > +#------------------------------------------------------------------------ > +# LLVMBuild Integration > +#------------------------------------------------------------------------ > +# > +# We use llvm-build to generate all the data required by the Makefile based > +# build system in one swoop: > +# > +# ?- We generate a file (a Makefile fragment) in the object root which contains > +# ? ?all the definitions that are required by Makefiles across the entire > +# ? ?project. > +# > +# ?- We generate the library table used by llvm-config. > +# > +# ?- We generate the dependencies for the Makefile fragment, so that we will > +# ? ?automatically reconfigure outselves. > + > +# The path to the llvm-build tool itself. > +LLVMBuildTool ?:= $(PROJ_SRC_ROOT)/utils/llvm-build/llvm-build > + > +# The files we are going to generate using llvm-build. > +LLVMBuildMakeFrag := $(PROJ_OBJ_ROOT)/Makefile.llvmbuild > +LLVMConfigLibraryDependenciesInc := \ > + ? ? ? $(PROJ_OBJ_ROOT)/tools/llvm-config/LibraryDependencies.inc > + > +# The rule to create the LLVMBuild Makefile fragment as well as the llvm-config > +# library table. > +# > +# Note that this target gets its real dependencies generated for us by > +# llvm-build. > +$(LLVMBuildMakeFrag): > + ? ? ? $(EchoCmd) Constructing LLVMBuild project information. ; \ > + ? ? ? $(LLVMBuildTool) \ > + ? ? ? ? --write-library-table $(LLVMConfigLibraryDependenciesInc) \ > + ? ? ? ? --write-make-fragment $(LLVMBuildMakeFrag) > + > +# Include the generated Makefile fragment. > +# > +# We currently only include the dependencies for the fragment itself if we are > +# at the top-level. Otherwise, recursive invocations would ends up doing > +# substantially more redundant stat'ing. > +# > +# This means that we won't properly regenerate things for developers used to > +# building from a subdirectory, but that is always somewhat unreliable. > +ifeq ($(LEVEL),.) > +LLVMBUILD_INCLUDE_DEPENDENCIES := 1 > +endif > +-include $(LLVMBuildMakeFrag) > + > ?################################################################################ > ?# PRECONDITIONS: that which must be built/checked first > ?################################################################################ > > > _______________________________________________ > 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 Fri Nov 4 12:29:35 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Fri, 04 Nov 2011 17:29:35 -0000 Subject: [llvm-commits] [llvm] r143712 - /llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp Message-ID: <20111104172935.5F04F2A6C12C@llvm.org> Author: efriedma Date: Fri Nov 4 12:29:35 2011 New Revision: 143712 URL: http://llvm.org/viewvc/llvm-project?rev=143712&view=rev Log: Add missing argument for atomic instructions in c++ backend. PR11268, part 2. 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=143712&r1=143711&r2=143712&view=diff ============================================================================== --- llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp (original) +++ llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp Fri Nov 4 12:29:35 2011 @@ -1492,7 +1492,7 @@ StringRef CrossThread = ConvertAtomicSynchScope(fi->getSynchScope()); Out << "FenceInst* " << iName << " = new FenceInst(mod->getContext(), " - << Ordering << ", " << CrossThread + << Ordering << ", " << CrossThread << ", " << bbname << ");"; break; } @@ -1503,7 +1503,7 @@ Out << "AtomicCmpXchgInst* " << iName << " = new AtomicCmpXchgInst(" << opNames[0] << ", " << opNames[1] << ", " << opNames[2] << ", " - << Ordering << ", " << CrossThread + << Ordering << ", " << CrossThread << ", " << bbname << ");"; nl(Out) << iName << "->setName(\""; printEscapedString(cxi->getName()); @@ -1533,7 +1533,7 @@ << " = new AtomicRMWInst(" << Operation << ", " << opNames[0] << ", " << opNames[1] << ", " - << Ordering << ", " << CrossThread + << Ordering << ", " << CrossThread << ", " << bbname << ");"; nl(Out) << iName << "->setName(\""; printEscapedString(rmwi->getName()); From bob.wilson at apple.com Fri Nov 4 12:57:13 2011 From: bob.wilson at apple.com (Bob Wilson) Date: Fri, 04 Nov 2011 17:57:13 -0000 Subject: [llvm-commits] [llvm] r143714 - /llvm/trunk/utils/buildit/build_llvm Message-ID: <20111104175713.7E7CE2A6C12C@llvm.org> Author: bwilson Date: Fri Nov 4 12:57:13 2011 New Revision: 143714 URL: http://llvm.org/viewvc/llvm-project?rev=143714&view=rev Log: Build llvmCore with RTTI enabled. Modified: llvm/trunk/utils/buildit/build_llvm Modified: llvm/trunk/utils/buildit/build_llvm URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/buildit/build_llvm?rev=143714&r1=143713&r2=143714&view=diff ============================================================================== --- llvm/trunk/utils/buildit/build_llvm (original) +++ llvm/trunk/utils/buildit/build_llvm Fri Nov 4 12:57:13 2011 @@ -156,6 +156,7 @@ UNIVERSAL_SDK_PATH=$SDKROOT \ NO_RUNTIME_LIBS=1 \ DISABLE_EDIS=1 \ + REQUIRES_RTTI=1 \ DEBUG_SYMBOLS=1 \ LLVM_SUBMIT_VERSION=$LLVM_SUBMIT_VERSION \ LLVM_SUBMIT_SUBVERSION=$LLVM_SUBMIT_SUBVERSION \ From greened at obbligato.org Fri Nov 4 13:03:28 2011 From: greened at obbligato.org (David A. Greene) Date: Fri, 04 Nov 2011 13:03:28 -0500 Subject: [llvm-commits] [llvm] r141977 - /llvm/trunk/utils/llvmbuild In-Reply-To: (Daniel Dunbar's message of "Thu, 3 Nov 2011 18:11:56 -0700") References: <20111014191237.51440312800A@llvm.org> <4EB19905.1020109@gmail.com> Message-ID: Daniel Dunbar writes: > Works for me, I made it so in r143673. Thanks! -Dave From eli.friedman at gmail.com Fri Nov 4 13:11:56 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Fri, 04 Nov 2011 18:11:56 -0000 Subject: [llvm-commits] [llvm] r143715 - in /llvm/trunk/include/llvm: Analysis/CFGPrinter.h Assembly/AssemblyAnnotationWriter.h ExecutionEngine/JITEventListener.h Support/DOTGraphTraits.h Message-ID: <20111104181156.792D22A6C12C@llvm.org> Author: efriedma Date: Fri Nov 4 13:11:56 2011 New Revision: 143715 URL: http://llvm.org/viewvc/llvm-project?rev=143715&view=rev Log: Delete names for unused parameters in inline function definitions in headers, so LLVM users can compile with -Wunused-parameter. PR11257; based on patch by Kevin Harris. Modified: llvm/trunk/include/llvm/Analysis/CFGPrinter.h llvm/trunk/include/llvm/Assembly/AssemblyAnnotationWriter.h llvm/trunk/include/llvm/ExecutionEngine/JITEventListener.h llvm/trunk/include/llvm/Support/DOTGraphTraits.h Modified: llvm/trunk/include/llvm/Analysis/CFGPrinter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/CFGPrinter.h?rev=143715&r1=143714&r2=143715&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/CFGPrinter.h (original) +++ llvm/trunk/include/llvm/Analysis/CFGPrinter.h Fri Nov 4 13:11:56 2011 @@ -33,7 +33,7 @@ } static std::string getSimpleNodeLabel(const BasicBlock *Node, - const Function *Graph) { + const Function *) { if (!Node->getName().empty()) return Node->getNameStr(); @@ -45,7 +45,7 @@ } static std::string getCompleteNodeLabel(const BasicBlock *Node, - const Function *Graph) { + const Function *) { std::string Str; raw_string_ostream OS(Str); Modified: llvm/trunk/include/llvm/Assembly/AssemblyAnnotationWriter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Assembly/AssemblyAnnotationWriter.h?rev=143715&r1=143714&r2=143715&view=diff ============================================================================== --- llvm/trunk/include/llvm/Assembly/AssemblyAnnotationWriter.h (original) +++ llvm/trunk/include/llvm/Assembly/AssemblyAnnotationWriter.h Fri Nov 4 13:11:56 2011 @@ -32,30 +32,30 @@ /// emitFunctionAnnot - This may be implemented to emit a string right before /// the start of a function. - virtual void emitFunctionAnnot(const Function *F, - formatted_raw_ostream &OS) {} + virtual void emitFunctionAnnot(const Function *, + formatted_raw_ostream &) {} /// emitBasicBlockStartAnnot - This may be implemented to emit a string right /// after the basic block label, but before the first instruction in the /// block. - virtual void emitBasicBlockStartAnnot(const BasicBlock *BB, - formatted_raw_ostream &OS) { + virtual void emitBasicBlockStartAnnot(const BasicBlock *, + formatted_raw_ostream &) { } /// emitBasicBlockEndAnnot - This may be implemented to emit a string right /// after the basic block. - virtual void emitBasicBlockEndAnnot(const BasicBlock *BB, - formatted_raw_ostream &OS) { + virtual void emitBasicBlockEndAnnot(const BasicBlock *, + formatted_raw_ostream &) { } /// emitInstructionAnnot - This may be implemented to emit a string right /// before an instruction is emitted. - virtual void emitInstructionAnnot(const Instruction *I, - formatted_raw_ostream &OS) {} + virtual void emitInstructionAnnot(const Instruction *, + formatted_raw_ostream &) {} /// printInfoComment - This may be implemented to emit a comment to the /// right of an instruction or global value. - virtual void printInfoComment(const Value &V, formatted_raw_ostream &OS) {} + virtual void printInfoComment(const Value &, formatted_raw_ostream &) {} }; } // End llvm namespace Modified: llvm/trunk/include/llvm/ExecutionEngine/JITEventListener.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/JITEventListener.h?rev=143715&r1=143714&r2=143715&view=diff ============================================================================== --- llvm/trunk/include/llvm/ExecutionEngine/JITEventListener.h (original) +++ llvm/trunk/include/llvm/ExecutionEngine/JITEventListener.h Fri Nov 4 13:11:56 2011 @@ -59,9 +59,9 @@ /// NotifyFunctionEmitted - Called after a function has been successfully /// emitted to memory. The function still has its MachineFunction attached, /// if you should happen to need that. - virtual void NotifyFunctionEmitted(const Function &F, - void *Code, size_t Size, - const EmittedFunctionDetails &Details) {} + virtual void NotifyFunctionEmitted(const Function &, + void *, size_t, + const EmittedFunctionDetails &) {} /// NotifyFreeingMachineCode - Called from freeMachineCodeForFunction(), after /// the global mapping is removed, but before the machine code is returned to @@ -71,7 +71,7 @@ /// parameter to a previous NotifyFunctionEmitted call. The Function passed /// to NotifyFunctionEmitted may have been destroyed by the time of the /// matching NotifyFreeingMachineCode call. - virtual void NotifyFreeingMachineCode(void *OldPtr) {} + virtual void NotifyFreeingMachineCode(void *) {} }; // This returns NULL if support isn't available. Modified: llvm/trunk/include/llvm/Support/DOTGraphTraits.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/DOTGraphTraits.h?rev=143715&r1=143714&r2=143715&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/DOTGraphTraits.h (original) +++ llvm/trunk/include/llvm/Support/DOTGraphTraits.h Fri Nov 4 13:11:56 2011 @@ -42,13 +42,13 @@ /// top of the graph. /// template - static std::string getGraphName(const GraphType& Graph) { return ""; } + static std::string getGraphName(const GraphType &) { return ""; } /// getGraphProperties - Return any custom properties that should be included /// in the top level graph structure for dot. /// template - static std::string getGraphProperties(const GraphType& Graph) { + static std::string getGraphProperties(const GraphType &) { return ""; } @@ -61,44 +61,44 @@ /// isNodeHidden - If the function returns true, the given node is not /// displayed in the graph. - static bool isNodeHidden(const void *Node) { + static bool isNodeHidden(const void *) { return false; } /// getNodeLabel - Given a node and a pointer to the top level graph, return /// the label to print in the node. template - std::string getNodeLabel(const void *Node, const GraphType& Graph) { + std::string getNodeLabel(const void *, const GraphType &) { return ""; } /// hasNodeAddressLabel - If this method returns true, the address of the node /// is added to the label of the node. template - static bool hasNodeAddressLabel(const void *Node, const GraphType& Graph) { + static bool hasNodeAddressLabel(const void *, const GraphType &) { return false; } /// If you want to specify custom node attributes, this is the place to do so /// template - static std::string getNodeAttributes(const void *Node, - const GraphType& Graph) { + static std::string getNodeAttributes(const void *, + const GraphType &) { return ""; } /// If you want to override the dot attributes printed for a particular edge, /// override this method. template - static std::string getEdgeAttributes(const void *Node, EdgeIter EI, - const GraphType& Graph) { + static std::string getEdgeAttributes(const void *, EdgeIter, + const GraphType &) { return ""; } /// getEdgeSourceLabel - If you want to label the edge source itself, /// implement this method. template - static std::string getEdgeSourceLabel(const void *Node, EdgeIter I) { + static std::string getEdgeSourceLabel(const void *, EdgeIter) { return ""; } @@ -106,7 +106,7 @@ /// should actually target another edge source, not a node. If this method is /// implemented, getEdgeTarget should be implemented. template - static bool edgeTargetsEdgeSource(const void *Node, EdgeIter I) { + static bool edgeTargetsEdgeSource(const void *, EdgeIter) { return false; } @@ -114,7 +114,7 @@ /// called to determine which outgoing edge of Node is the target of this /// edge. template - static EdgeIter getEdgeTarget(const void *Node, EdgeIter I) { + static EdgeIter getEdgeTarget(const void *, EdgeIter I) { return I; } @@ -126,13 +126,13 @@ /// numEdgeDestLabels - If hasEdgeDestLabels, this function returns the /// number of incoming edge labels the given node has. - static unsigned numEdgeDestLabels(const void *Node) { + static unsigned numEdgeDestLabels(const void *) { return 0; } /// getEdgeDestLabel - If hasEdgeDestLabels, this function returns the /// incoming edge label with the given index in the given node. - static std::string getEdgeDestLabel(const void *Node, unsigned i) { + static std::string getEdgeDestLabel(const void *, unsigned) { return ""; } @@ -143,7 +143,7 @@ /// it to add things to the output graph. /// template - static void addCustomGraphFeatures(const GraphType& Graph, GraphWriter &GW) {} + static void addCustomGraphFeatures(const GraphType &, GraphWriter &) {} }; From eli.friedman at gmail.com Fri Nov 4 13:15:07 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Fri, 4 Nov 2011 11:15:07 -0700 Subject: [llvm-commits] Tentative header modifications to resolve Bugzilla 11257 (unnecessary "Unused parameter" warnings) In-Reply-To: <451DDDBC99EEAD40911267DB962DEC7C6BDFF61953@USEA-EXCH8.na.uis.unisys.com> References: <451DDDBC99EEAD40911267DB962DEC7C6BDFF61953@USEA-EXCH8.na.uis.unisys.com> Message-ID: On Mon, Oct 31, 2011 at 1:22 PM, Harris, Kevin wrote: > At Eli's request, I'm submitting my tentative edits for resolving the compile warnings for 4 headers. ?In effect, this is an attachment to Bugzilla 11257, which reports "Unused parameter" warnings for these 4 headers, when compiled with gcc 4.5.3, using "-Wall -Wextra -Wshadow" compilation warnings options. > > I make no claim to the desirability of these particular edits, other than the fact that they resolve the warnings in a way that is semantically innocuous and results in little or no compilation performance impact after optimization. > > Note that the first edit to the first of these 4 files is actually intended to fix a "shadow" warning in the same file (see Bugzilla 11256) rather than an "Unused parameter" warning. I applied a variant of this to fix the -Wunused-parameter warnings in r143715. -Eli > ? ? ? ?-Kevin > > Index: llvm/rc1/include/llvm/Analysis/CFGPrinter.h > =================================================================== > --- llvm/rc1/include/llvm/Analysis/CFGPrinter.h (revision 143139) > +++ llvm/rc1/include/llvm/Analysis/CFGPrinter.h (working copy) > @@ -26,7 +26,7 @@ > ?template<> > ?struct DOTGraphTraits : public DefaultDOTGraphTraits { > > - ?DOTGraphTraits (bool isSimple=false) : DefaultDOTGraphTraits(isSimple) {} > + ?DOTGraphTraits (bool isSimple1=false) : DefaultDOTGraphTraits(isSimple1) {} > > ? static std::string getGraphName(const Function *F) { > ? ? return "CFG for '" + F->getNameStr() + "' function"; > @@ -41,7 +41,7 @@ > ? ? raw_string_ostream OS(Str); > > ? ? WriteAsOperand(OS, Node, false); > - ? ?return OS.str(); > + ? ?if (Graph == NULL) {return OS.str();} else {return OS.str();} > ? } > > ? static std::string getCompleteNodeLabel(const BasicBlock *Node, > @@ -69,7 +69,7 @@ > ? ? ? ? --i; > ? ? ? } > > - ? ?return OutStr; > + ? ? ?if (Graph == NULL) {return OutStr;} else {return OutStr;} > ? } > > ? std::string getNodeLabel(const BasicBlock *Node, > > Index: llvm/rc1/include/llvm/Assembly/AssemblyAnnotationWriter.h > =================================================================== > --- llvm/rc1/include/llvm/Assembly/AssemblyAnnotationWriter.h ? (revision 143139) > +++ llvm/rc1/include/llvm/Assembly/AssemblyAnnotationWriter.h ? (working copy) > @@ -33,29 +33,37 @@ > ? /// emitFunctionAnnot - This may be implemented to emit a string right before > ? /// the start of a function. > ? virtual void emitFunctionAnnot(const Function *F, > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? formatted_raw_ostream &OS) {} > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? formatted_raw_ostream &OS) { > + ? ?if (F == NULL || OS.DELETE_STREAM) return; > + ?} > > ? /// emitBasicBlockStartAnnot - This may be implemented to emit a string right > ? /// after the basic block label, but before the first instruction in the > ? /// block. > ? virtual void emitBasicBlockStartAnnot(const BasicBlock *BB, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? formatted_raw_ostream &OS) { > + ? ?if (BB == NULL || OS.DELETE_STREAM) return; > ? } > > ? /// emitBasicBlockEndAnnot - This may be implemented to emit a string right > ? /// after the basic block. > ? virtual void emitBasicBlockEndAnnot(const BasicBlock *BB, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? formatted_raw_ostream &OS) { > + ? ?if (BB == NULL || OS.DELETE_STREAM) return; > ? } > > ? /// emitInstructionAnnot - This may be implemented to emit a string right > ? /// before an instruction is emitted. > ? virtual void emitInstructionAnnot(const Instruction *I, > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?formatted_raw_ostream &OS) {} > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?formatted_raw_ostream &OS) { > + ? ?if (I == NULL || OS.DELETE_STREAM) return; > + ?} > > ? /// printInfoComment - This may be implemented to emit a comment to the > ? /// right of an instruction or global value. > - ?virtual void printInfoComment(const Value &V, formatted_raw_ostream &OS) {} > + ?virtual void printInfoComment(const Value &V, formatted_raw_ostream &OS) { > + ? ?if (V.hasName() || OS.DELETE_STREAM) return; > + ?} > ?}; > > ?} // End llvm namespace > > Index: llvm/rc1/include/llvm/ExecutionEngine/JITEventListener.h > =================================================================== > --- llvm/rc1/include/llvm/ExecutionEngine/JITEventListener.h ? ?(revision 143139) > +++ llvm/rc1/include/llvm/ExecutionEngine/JITEventListener.h ? ?(working copy) > @@ -61,7 +61,9 @@ > ? /// if you should happen to need that. > ? virtual void NotifyFunctionEmitted(const Function &F, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?void *Code, size_t Size, > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? const EmittedFunctionDetails &Details) {} > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? const EmittedFunctionDetails &Details) { > + ? ?if (F.isNullValue() || Code == NULL || Size == 0 || Details.MF == NULL) return; > + ?} > > ? /// NotifyFreeingMachineCode - Called from freeMachineCodeForFunction(), after > ? /// the global mapping is removed, but before the machine code is returned to > @@ -71,7 +73,9 @@ > ? /// parameter to a previous NotifyFunctionEmitted call. ?The Function passed > ? /// to NotifyFunctionEmitted may have been destroyed by the time of the > ? /// matching NotifyFreeingMachineCode call. > - ?virtual void NotifyFreeingMachineCode(void *OldPtr) {} > + ?virtual void NotifyFreeingMachineCode(void *OldPtr) { > + ? ? ?if (OldPtr == NULL) return; > + ?} > ?}; > > ?// This returns NULL if support isn't available. > > Index: llvm/rc1/include/llvm/Support/DOTGraphTraits.h > =================================================================== > --- llvm/rc1/include/llvm/Support/DOTGraphTraits.h ? ? ?(revision 143139) > +++ llvm/rc1/include/llvm/Support/DOTGraphTraits.h ? ? ?(working copy) > @@ -62,7 +62,7 @@ > ? /// isNodeHidden - If the function returns true, the given node is not > ? /// displayed in the graph. > ? static bool isNodeHidden(const void *Node) { > - ? ?return false; > + ? ? ?if (Node == NULL) {return false;} else {return false;} > ? } > > ? /// getNodeLabel - Given a node and a pointer to the top level graph, return > @@ -127,13 +127,13 @@ > ? /// numEdgeDestLabels - If hasEdgeDestLabels, this function returns the > ? /// number of incoming edge labels the given node has. > ? static unsigned numEdgeDestLabels(const void *Node) { > - ? ?return 0; > + ? ? ?if (Node == NULL) {return 0;} else {return 0;} > ? } > > ? /// getEdgeDestLabel - If hasEdgeDestLabels, this function returns the > ? /// incoming edge label with the given index in the given node. > ? static std::string getEdgeDestLabel(const void *Node, unsigned i) { > - ? ?return ""; > + ? ? ?if (Node == NULL || i == 0) {return "";} else {return "";} > ? } > > ? /// addCustomGraphFeatures - If a graph is made up of more than just > > _______________________________________________ > 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 Fri Nov 4 13:19:43 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Fri, 04 Nov 2011 18:19:43 -0000 Subject: [llvm-commits] [llvm] r143716 - in /llvm/trunk/include/llvm: DefaultPasses.h PassAnalysisSupport.h Message-ID: <20111104181943.9878D2A6C12C@llvm.org> Author: efriedma Date: Fri Nov 4 13:19:43 2011 New Revision: 143716 URL: http://llvm.org/viewvc/llvm-project?rev=143716&view=rev Log: Add a couple missing includes; found while analyzing LLVM headers. Modified: llvm/trunk/include/llvm/DefaultPasses.h llvm/trunk/include/llvm/PassAnalysisSupport.h Modified: llvm/trunk/include/llvm/DefaultPasses.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DefaultPasses.h?rev=143716&r1=143715&r2=143716&view=diff ============================================================================== --- llvm/trunk/include/llvm/DefaultPasses.h (original) +++ llvm/trunk/include/llvm/DefaultPasses.h Fri Nov 4 13:19:43 2011 @@ -14,6 +14,8 @@ #ifndef LLVM_DEFAULT_PASS_SUPPORT_H #define LLVM_DEFAULT_PASS_SUPPORT_H +#include + namespace llvm { class PassManagerBase; Modified: llvm/trunk/include/llvm/PassAnalysisSupport.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassAnalysisSupport.h?rev=143716&r1=143715&r2=143716&view=diff ============================================================================== --- llvm/trunk/include/llvm/PassAnalysisSupport.h (original) +++ llvm/trunk/include/llvm/PassAnalysisSupport.h Fri Nov 4 13:19:43 2011 @@ -19,6 +19,7 @@ #ifndef LLVM_PASS_ANALYSIS_SUPPORT_H #define LLVM_PASS_ANALYSIS_SUPPORT_H +#include "llvm/Pass.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" #include From eli.friedman at gmail.com Fri Nov 4 13:29:09 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Fri, 04 Nov 2011 18:29:09 -0000 Subject: [llvm-commits] [llvm] r143717 - /llvm/trunk/include/llvm/Analysis/CodeMetrics.h Message-ID: <20111104182909.65E602A6C12C@llvm.org> Author: efriedma Date: Fri Nov 4 13:29:09 2011 New Revision: 143717 URL: http://llvm.org/viewvc/llvm-project?rev=143717&view=rev Log: Add missing forward declarations. Modified: llvm/trunk/include/llvm/Analysis/CodeMetrics.h Modified: llvm/trunk/include/llvm/Analysis/CodeMetrics.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/CodeMetrics.h?rev=143717&r1=143716&r2=143717&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/CodeMetrics.h (original) +++ llvm/trunk/include/llvm/Analysis/CodeMetrics.h Fri Nov 4 13:29:09 2011 @@ -19,7 +19,10 @@ namespace llvm { + class BasicBlock; + class Function; class TargetData; + class Value; // CodeMetrics - Calculate size and a few similar metrics for a set of // basic blocks. From eli.friedman at gmail.com Fri Nov 4 13:30:30 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Fri, 04 Nov 2011 18:30:30 -0000 Subject: [llvm-commits] [llvm] r143718 - in /llvm/trunk/include/llvm/Support: BlockFrequency.h Capacity.h DynamicLibrary.h Message-ID: <20111104183030.B43342A6C12C@llvm.org> Author: efriedma Date: Fri Nov 4 13:30:30 2011 New Revision: 143718 URL: http://llvm.org/viewvc/llvm-project?rev=143718&view=rev Log: Add missing includes/class declaration. Modified: llvm/trunk/include/llvm/Support/BlockFrequency.h llvm/trunk/include/llvm/Support/Capacity.h llvm/trunk/include/llvm/Support/DynamicLibrary.h Modified: llvm/trunk/include/llvm/Support/BlockFrequency.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/BlockFrequency.h?rev=143718&r1=143717&r2=143718&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/BlockFrequency.h (original) +++ llvm/trunk/include/llvm/Support/BlockFrequency.h Fri Nov 4 13:30:30 2011 @@ -14,6 +14,8 @@ #ifndef LLVM_SUPPORT_BLOCKFREQUENCY_H #define LLVM_SUPPORT_BLOCKFREQUENCY_H +#include "llvm/Support/DataTypes.h" + namespace llvm { class raw_ostream; Modified: llvm/trunk/include/llvm/Support/Capacity.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Capacity.h?rev=143718&r1=143717&r2=143718&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/Capacity.h (original) +++ llvm/trunk/include/llvm/Support/Capacity.h Fri Nov 4 13:30:30 2011 @@ -15,6 +15,8 @@ #ifndef LLVM_SUPPORT_CAPACITY_H #define LLVM_SUPPORT_CAPACITY_H +#include + namespace llvm { template Modified: llvm/trunk/include/llvm/Support/DynamicLibrary.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/DynamicLibrary.h?rev=143718&r1=143717&r2=143718&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/DynamicLibrary.h (original) +++ llvm/trunk/include/llvm/Support/DynamicLibrary.h Fri Nov 4 13:30:30 2011 @@ -17,6 +17,9 @@ #include namespace llvm { + +class StringRef; + namespace sys { /// This class provides a portable interface to dynamic libraries which also From gohman at apple.com Fri Nov 4 13:32:43 2011 From: gohman at apple.com (Dan Gohman) Date: Fri, 04 Nov 2011 18:32:43 -0000 Subject: [llvm-commits] [llvm] r143719 - in /llvm/trunk: lib/Analysis/InstructionSimplify.cpp test/Transforms/InstSimplify/undef.ll Message-ID: <20111104183243.1A9272A6C12C@llvm.org> Author: djg Date: Fri Nov 4 13:32:42 2011 New Revision: 143719 URL: http://llvm.org/viewvc/llvm-project?rev=143719&view=rev Log: Teach instsimplify to simplify calls to undef. Modified: llvm/trunk/lib/Analysis/InstructionSimplify.cpp llvm/trunk/test/Transforms/InstSimplify/undef.ll Modified: llvm/trunk/lib/Analysis/InstructionSimplify.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InstructionSimplify.cpp?rev=143719&r1=143718&r2=143719&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/InstructionSimplify.cpp (original) +++ llvm/trunk/lib/Analysis/InstructionSimplify.cpp Fri Nov 4 13:32:42 2011 @@ -2474,6 +2474,14 @@ return ::SimplifyCmpInst(Predicate, LHS, RHS, TD, DT, RecursionLimit); } +static Value *SimplifyCallInst(CallInst *CI) { + // call undef -> undef + if (isa(CI->getCalledValue())) + return UndefValue::get(CI->getType()); + + return 0; +} + /// SimplifyInstruction - See if we can compute a simplified version of this /// instruction. If not, this returns null. Value *llvm::SimplifyInstruction(Instruction *I, const TargetData *TD, @@ -2569,6 +2577,9 @@ case Instruction::PHI: Result = SimplifyPHINode(cast(I), DT); break; + case Instruction::Call: + Result = SimplifyCallInst(cast(I)); + break; } /// If called on unreachable code, the above logic may report that the Modified: llvm/trunk/test/Transforms/InstSimplify/undef.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstSimplify/undef.ll?rev=143719&r1=143718&r2=143719&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstSimplify/undef.ll (original) +++ llvm/trunk/test/Transforms/InstSimplify/undef.ll Fri Nov 4 13:32:42 2011 @@ -125,3 +125,10 @@ %r = select i1 undef, i64 undef, i64 %a ret i64 %r } + +; @test18 +; CHECK: ret i64 undef +define i64 @test18(i64 %a) { + %r = call i64 (i64)* undef(i64 %a) + ret i64 %r +} From gohman at apple.com Fri Nov 4 13:39:16 2011 From: gohman at apple.com (Dan Gohman) Date: Fri, 04 Nov 2011 18:39:16 -0000 Subject: [llvm-commits] [llvm] r143721 - /llvm/trunk/test/Transforms/InstSimplify/undef.ll Message-ID: <20111104183916.8D0452A6C12C@llvm.org> Author: djg Date: Fri Nov 4 13:39:16 2011 New Revision: 143721 URL: http://llvm.org/viewvc/llvm-project?rev=143721&view=rev Log: Add tests for existing InstSimplify features. Modified: llvm/trunk/test/Transforms/InstSimplify/undef.ll Modified: llvm/trunk/test/Transforms/InstSimplify/undef.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstSimplify/undef.ll?rev=143721&r1=143720&r2=143721&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstSimplify/undef.ll (original) +++ llvm/trunk/test/Transforms/InstSimplify/undef.ll Fri Nov 4 13:39:16 2011 @@ -84,6 +84,13 @@ ret i64 %r } +; @test11b +; CHECK: ret i64 undef +define i64 @test11b(i64 %a) { + %r = shl i64 %a, undef + ret i64 %r +} + ; @test12 ; CHECK: ret i64 undef define i64 @test12() { @@ -91,6 +98,13 @@ ret i64 %r } +; @test12b +; CHECK: ret i64 undef +define i64 @test12b(i64 %a) { + %r = ashr i64 %a, undef + ret i64 %r +} + ; @test13 ; CHECK: ret i64 undef define i64 @test13() { @@ -98,6 +112,13 @@ ret i64 %r } +; @test13b +; CHECK: ret i64 undef +define i64 @test13b(i64 %a) { + %r = lshr i64 %a, undef + ret i64 %r +} + ; @test14 ; CHECK: ret i1 undef define i1 @test14() { From eli.friedman at gmail.com Fri Nov 4 13:45:34 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Fri, 04 Nov 2011 18:45:34 -0000 Subject: [llvm-commits] [llvm] r143722 - in /llvm/trunk/include/llvm/Target: TargetCallingConv.h TargetOptions.h Message-ID: <20111104184534.884962A6C12C@llvm.org> Author: efriedma Date: Fri Nov 4 13:45:34 2011 New Revision: 143722 URL: http://llvm.org/viewvc/llvm-project?rev=143722&view=rev Log: Add missing includes/decls. Modified: llvm/trunk/include/llvm/Target/TargetCallingConv.h llvm/trunk/include/llvm/Target/TargetOptions.h Modified: llvm/trunk/include/llvm/Target/TargetCallingConv.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetCallingConv.h?rev=143722&r1=143721&r2=143722&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetCallingConv.h (original) +++ llvm/trunk/include/llvm/Target/TargetCallingConv.h Fri Nov 4 13:45:34 2011 @@ -14,6 +14,11 @@ #ifndef LLVM_TARGET_TARGETCALLINGCONV_H #define LLVM_TARGET_TARGETCALLINGCONV_H +#include "llvm/CodeGen/ValueTypes.h" +#include "llvm/Support/DataTypes.h" +#include "llvm/Support/MathExtras.h" +#include + namespace llvm { namespace ISD { Modified: llvm/trunk/include/llvm/Target/TargetOptions.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetOptions.h?rev=143722&r1=143721&r2=143722&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetOptions.h (original) +++ llvm/trunk/include/llvm/Target/TargetOptions.h Fri Nov 4 13:45:34 2011 @@ -17,6 +17,7 @@ namespace llvm { class MachineFunction; + class StringRef; // Possible float ABI settings. Used with FloatABIType in TargetOptions.h. namespace FloatABI { From isanbard at gmail.com Fri Nov 4 13:48:00 2011 From: isanbard at gmail.com (Bill Wendling) Date: Fri, 04 Nov 2011 18:48:00 -0000 Subject: [llvm-commits] [llvm] r143723 - /llvm/trunk/tools/lto/LTOModule.cpp Message-ID: <20111104184800.5518E2A6C12C@llvm.org> Author: void Date: Fri Nov 4 13:48:00 2011 New Revision: 143723 URL: http://llvm.org/viewvc/llvm-project?rev=143723&view=rev Log: Reformatting changes to get rid of blank lines, put code on one line, and to decrease some code indentation. No intended functional changes. Modified: llvm/trunk/tools/lto/LTOModule.cpp Modified: llvm/trunk/tools/lto/LTOModule.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/LTOModule.cpp?rev=143723&r1=143722&r2=143723&view=diff ============================================================================== --- llvm/trunk/tools/lto/LTOModule.cpp (original) +++ llvm/trunk/tools/lto/LTOModule.cpp Fri Nov 4 13:48:00 2011 @@ -61,7 +61,6 @@ return isTargetMatch(buffer, triplePrefix); } - bool LTOModule::isBitcodeFileForTarget(const char *path, const char *triplePrefix) { OwningPtr buffer; @@ -74,8 +73,7 @@ bool LTOModule::isTargetMatch(MemoryBuffer *buffer, const char *triplePrefix) { std::string Triple = getBitcodeTargetTriple(buffer, getGlobalContext()); delete buffer; - return (strncmp(Triple.c_str(), triplePrefix, - strlen(triplePrefix)) == 0); + return strncmp(Triple.c_str(), triplePrefix, strlen(triplePrefix)) == 0; } @@ -97,8 +95,7 @@ } LTOModule *LTOModule::makeLTOModule(int fd, const char *path, - size_t size, - std::string &errMsg) { + size_t size, std::string &errMsg) { return makeLTOModule(fd, path, size, size, 0, errMsg); } @@ -122,7 +119,6 @@ return MemoryBuffer::getMemBuffer(StringRef(startPtr, length), "", false); } - LTOModule *LTOModule::makeLTOModule(const void *mem, size_t length, std::string &errMsg) { OwningPtr buffer(makeBuffer(mem, length)); @@ -165,15 +161,14 @@ std::string CPU; TargetMachine *target = march->createTargetMachine(Triple, CPU, FeatureStr); LTOModule *Ret = new LTOModule(m.take(), target); - bool Err = Ret->ParseSymbols(errMsg); - if (Err) { + if (Ret->ParseSymbols(errMsg)) { delete Ret; return NULL; } + return Ret; } - const char *LTOModule::getTargetTriple() { return _module->getTargetTriple().c_str(); } @@ -206,77 +201,78 @@ // Parse i386/ppc ObjC class data structure. void LTOModule::addObjCClass(GlobalVariable *clgv) { - if (ConstantStruct *c = dyn_cast(clgv->getInitializer())) { - // second slot in __OBJC,__class is pointer to superclass name - std::string superclassName; - if (objcClassNameFromExpression(c->getOperand(1), superclassName)) { - NameAndAttributes info; - StringMap::value_type &entry = - _undefines.GetOrCreateValue(superclassName); - if (!entry.getValue().name) { - const char *symbolName = entry.getKey().data(); - info.name = symbolName; - info.attributes = LTO_SYMBOL_DEFINITION_UNDEFINED; - entry.setValue(info); - } - } - // third slot in __OBJC,__class is pointer to class name - std::string className; - if (objcClassNameFromExpression(c->getOperand(2), className)) { - StringSet::value_type &entry = - _defines.GetOrCreateValue(className); - entry.setValue(1); - NameAndAttributes info; - info.name = entry.getKey().data(); - info.attributes = (lto_symbol_attributes) - (LTO_SYMBOL_PERMISSIONS_DATA | - LTO_SYMBOL_DEFINITION_REGULAR | - LTO_SYMBOL_SCOPE_DEFAULT); - _symbols.push_back(info); + ConstantStruct *c = dyn_cast(clgv->getInitializer()); + if (!c) return; + + // second slot in __OBJC,__class is pointer to superclass name + std::string superclassName; + if (objcClassNameFromExpression(c->getOperand(1), superclassName)) { + NameAndAttributes info; + StringMap::value_type &entry = + _undefines.GetOrCreateValue(superclassName); + if (!entry.getValue().name) { + const char *symbolName = entry.getKey().data(); + info.name = symbolName; + info.attributes = LTO_SYMBOL_DEFINITION_UNDEFINED; + entry.setValue(info); } } + + // third slot in __OBJC,__class is pointer to class name + std::string className; + if (objcClassNameFromExpression(c->getOperand(2), className)) { + StringSet::value_type &entry = _defines.GetOrCreateValue(className); + entry.setValue(1); + NameAndAttributes info; + info.name = entry.getKey().data(); + info.attributes = lto_symbol_attributes(LTO_SYMBOL_PERMISSIONS_DATA | + LTO_SYMBOL_DEFINITION_REGULAR | + LTO_SYMBOL_SCOPE_DEFAULT); + _symbols.push_back(info); + } } // Parse i386/ppc ObjC category data structure. void LTOModule::addObjCCategory(GlobalVariable *clgv) { - if (ConstantStruct *c = dyn_cast(clgv->getInitializer())) { - // second slot in __OBJC,__category is pointer to target class name - std::string targetclassName; - if (objcClassNameFromExpression(c->getOperand(1), targetclassName)) { - NameAndAttributes info; + ConstantStruct *c = dyn_cast(clgv->getInitializer()); + if (!c) return; - StringMap::value_type &entry = - _undefines.GetOrCreateValue(targetclassName); + // second slot in __OBJC,__category is pointer to target class name + std::string targetclassName; + if (!objcClassNameFromExpression(c->getOperand(1), targetclassName)) + return; - if (entry.getValue().name) - return; + NameAndAttributes info; + StringMap::value_type &entry = + _undefines.GetOrCreateValue(targetclassName); - const char *symbolName = entry.getKey().data(); - info.name = symbolName; - info.attributes = LTO_SYMBOL_DEFINITION_UNDEFINED; - entry.setValue(info); - } - } + if (entry.getValue().name) + return; + + const char *symbolName = entry.getKey().data(); + info.name = symbolName; + info.attributes = LTO_SYMBOL_DEFINITION_UNDEFINED; + entry.setValue(info); } // Parse i386/ppc ObjC class list data structure. void LTOModule::addObjCClassRef(GlobalVariable *clgv) { std::string targetclassName; - if (objcClassNameFromExpression(clgv->getInitializer(), targetclassName)) { - NameAndAttributes info; + if (!objcClassNameFromExpression(clgv->getInitializer(), targetclassName)) + return; - StringMap::value_type &entry = - _undefines.GetOrCreateValue(targetclassName); - if (entry.getValue().name) - return; + NameAndAttributes info; + StringMap::value_type &entry = + _undefines.GetOrCreateValue(targetclassName); + if (entry.getValue().name) + return; - const char *symbolName = entry.getKey().data(); - info.name = symbolName; - info.attributes = LTO_SYMBOL_DEFINITION_UNDEFINED; - entry.setValue(info); - } + const char *symbolName = entry.getKey().data(); + info.name = symbolName; + info.attributes = LTO_SYMBOL_DEFINITION_UNDEFINED; + entry.setValue(info); } @@ -327,7 +323,6 @@ } } - void LTOModule::addDefinedSymbol(GlobalValue *def, bool isFunction) { // ignore all llvm.* symbols if (def->getName().startswith("llvm.")) @@ -455,7 +450,6 @@ entry.setValue(info); } - namespace { class RecordStreamer : public MCStreamer { public: @@ -711,12 +705,10 @@ return false; } - uint32_t LTOModule::getSymbolCount() { return _symbols.size(); } - lto_symbol_attributes LTOModule::getSymbolAttributes(uint32_t index) { if (index < _symbols.size()) return _symbols[index].attributes; From peter_cooper at apple.com Fri Nov 4 13:56:18 2011 From: peter_cooper at apple.com (Peter Cooper) Date: Fri, 04 Nov 2011 11:56:18 -0700 Subject: [llvm-commits] LoadSDNode invariance Message-ID: <72DEEAEF-7CA4-45AF-9286-0ADD7082EB96@apple.com> Hi I've added new metadata to load IR instructions to say if they are invariant, i.e., don't change at runtime. The IR change was simple but i'm not sure about the MachineInstr/DAG level. I've attached the change which encodes the invariant flag in the MemSDNodeFlags next to the volatile flag. Please have a look and tell me if this is ideal? The main thing i wasn't happy doing was adding another DAG.getLoad method with the invariant flag, but the alternative was changing the existing method which would lead to changing dozens of calls. Thanks, Pete -------------- next part -------------- A non-text attachment was scrubbed... Name: p.patch Type: application/octet-stream Size: 15617 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111104/e81ae7df/attachment-0001.obj From rafael.espindola at gmail.com Fri Nov 4 14:00:29 2011 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Fri, 04 Nov 2011 19:00:29 -0000 Subject: [llvm-commits] [llvm] r143726 - in /llvm/trunk: lib/CodeGen/AsmPrinter/DwarfDebug.cpp test/DebugInfo/pr11300.ll Message-ID: <20111104190029.BD43E2A6C12E@llvm.org> Author: rafael Date: Fri Nov 4 14:00:29 2011 New Revision: 143726 URL: http://llvm.org/viewvc/llvm-project?rev=143726&view=rev Log: Emit declarations before definitions if they are available. This causes DW_AT_specification to point back in the file in the included testcase. Fixes PR11300. Added: llvm/trunk/test/DebugInfo/pr11300.ll Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=143726&r1=143725&r2=143726&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Fri Nov 4 14:00:29 2011 @@ -194,11 +194,7 @@ DISubprogram SP(SPNode); DISubprogram SPDecl = SP.getFunctionDeclaration(); - if (SPDecl.isSubprogram()) - // Refer function declaration directly. - SPCU->addDIEEntry(SPDie, dwarf::DW_AT_specification, dwarf::DW_FORM_ref4, - SPCU->getOrCreateSubprogramDIE(SPDecl)); - else { + if (!SPDecl.isSubprogram()) { // There is not any need to generate specification DIE for a function // defined at compile unit level. If a function is defined inside another // function then gdb prefers the definition at top level and but does not @@ -512,14 +508,31 @@ /// construct SubprogramDIE - Construct subprogram DIE. void DwarfDebug::constructSubprogramDIE(CompileUnit *TheCU, const MDNode *N) { + CompileUnit *&CURef = SPMap[N]; + if (CURef) + return; + CURef = TheCU; + DISubprogram SP(N); if (!SP.isDefinition()) // This is a method declaration which will be handled while constructing // class type. return; + DISubprogram SPDecl = SP.getFunctionDeclaration(); + DIE *DeclDie = NULL; + if (SPDecl.isSubprogram()) { + DeclDie = TheCU->getOrCreateSubprogramDIE(SPDecl); + } + DIE *SubprogramDie = TheCU->getOrCreateSubprogramDIE(SP); + if (DeclDie) { + // Refer function declaration directly. + TheCU->addDIEEntry(SubprogramDie, dwarf::DW_AT_specification, + dwarf::DW_FORM_ref4, DeclDie); + } + // Add to map. TheCU->insertDIE(N, SubprogramDie); @@ -529,7 +542,6 @@ // Expose as global. TheCU->addGlobal(SP.getName(), SubprogramDie); - SPMap[N] = TheCU; return; } Added: llvm/trunk/test/DebugInfo/pr11300.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/pr11300.ll?rev=143726&view=auto ============================================================================== --- llvm/trunk/test/DebugInfo/pr11300.ll (added) +++ llvm/trunk/test/DebugInfo/pr11300.ll Fri Nov 4 14:00:29 2011 @@ -0,0 +1,65 @@ +; RUN: llc %s -o %t -filetype=obj +; RUN: llvm-dwarfdump %t | FileCheck %s + +; test that the DW_AT_specification is a back edge in the file. + +; CHECK: 0x00000063: DW_TAG_subprogram [5] +; CHECK: 0x00000089: DW_AT_specification [DW_FORM_ref4] (cu + 0x0063 => {0x00000063}) + +%struct.foo = type { i8 } + +define void @_Z3zedP3foo(%struct.foo* %x) uwtable { +entry: + %x.addr = alloca %struct.foo*, align 8 + store %struct.foo* %x, %struct.foo** %x.addr, align 8 + call void @llvm.dbg.declare(metadata !{%struct.foo** %x.addr}, metadata !23), !dbg !24 + %0 = load %struct.foo** %x.addr, align 8, !dbg !25 + call void @_ZN3foo3barEv(%struct.foo* %0), !dbg !25 + ret void, !dbg !27 +} + +declare void @llvm.dbg.declare(metadata, metadata) nounwind readnone + +define linkonce_odr void @_ZN3foo3barEv(%struct.foo* %this) nounwind uwtable align 2 { +entry: + %this.addr = alloca %struct.foo*, align 8 + store %struct.foo* %this, %struct.foo** %this.addr, align 8 + call void @llvm.dbg.declare(metadata !{%struct.foo** %this.addr}, metadata !28), !dbg !29 + %this1 = load %struct.foo** %this.addr + ret void, !dbg !30 +} + +!llvm.dbg.cu = !{!0} + +!0 = metadata !{i32 720913, i32 0, i32 4, metadata !"/home/espindola/llvm/test.cc", metadata !"/home/espindola/tmpfs/build", metadata !"clang version 3.0 ()", i1 true, i1 false, metadata !"", i32 0, metadata !1, metadata !1, metadata !3, metadata !1} ; [ DW_TAG_compile_unit ] +!1 = metadata !{metadata !2} +!2 = metadata !{i32 0} +!3 = metadata !{metadata !4} +!4 = metadata !{metadata !5, metadata !20} +!5 = metadata !{i32 720942, i32 0, metadata !6, metadata !"zed", metadata !"zed", metadata !"_Z3zedP3foo", metadata !6, i32 4, metadata !7, i1 false, i1 true, i32 0, i32 0, i32 0, i32 256, i1 false, void (%struct.foo*)* @_Z3zedP3foo, null, null, metadata !18} ; [ DW_TAG_subprogram ] +!6 = metadata !{i32 720937, metadata !"/home/espindola/llvm/test.cc", metadata !"/home/espindola/tmpfs/build", null} ; [ DW_TAG_file_type ] +!7 = metadata !{i32 720917, i32 0, metadata !"", i32 0, i32 0, i64 0, i64 0, i32 0, i32 0, i32 0, metadata !8, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] +!8 = metadata !{null, metadata !9} +!9 = metadata !{i32 720911, null, metadata !"", null, i32 0, i64 64, i64 64, i64 0, i32 0, metadata !10} ; [ DW_TAG_pointer_type ] +!10 = metadata !{i32 720898, null, metadata !"foo", metadata !6, i32 1, i64 8, i64 8, i32 0, i32 0, null, metadata !11, i32 0, null, null} ; [ DW_TAG_class_type ] +!11 = metadata !{metadata !12} +!12 = metadata !{i32 720942, i32 0, metadata !10, metadata !"bar", metadata !"bar", metadata !"_ZN3foo3barEv", metadata !6, i32 2, metadata !13, i1 false, i1 false, i32 0, i32 0, null, i32 256, i1 false, null, null, i32 0, metadata !16} ; [ DW_TAG_subprogram ] +!13 = metadata !{i32 720917, i32 0, metadata !"", i32 0, i32 0, i64 0, i64 0, i32 0, i32 0, i32 0, metadata !14, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] +!14 = metadata !{null, metadata !15} +!15 = metadata !{i32 720911, i32 0, metadata !"", i32 0, i32 0, i64 64, i64 64, i64 0, i32 64, metadata !10} ; [ DW_TAG_pointer_type ] +!16 = metadata !{metadata !17} +!17 = metadata !{i32 720932} ; [ DW_TAG_base_type ] +!18 = metadata !{metadata !19} +!19 = metadata !{i32 720932} ; [ DW_TAG_base_type ] +!20 = metadata !{i32 720942, i32 0, null, metadata !"bar", metadata !"bar", metadata !"_ZN3foo3barEv", metadata !6, i32 2, metadata !13, i1 false, i1 true, i32 0, i32 0, i32 0, i32 256, i1 false, void (%struct.foo*)* @_ZN3foo3barEv, null, metadata !12, metadata !21} ; [ DW_TAG_subprogram ] +!21 = metadata !{metadata !22} +!22 = metadata !{i32 720932} ; [ DW_TAG_base_type ] +!23 = metadata !{i32 721153, metadata !5, metadata !"x", metadata !6, i32 16777220, metadata !9, i32 0, i32 0} ; [ DW_TAG_arg_variable ] +!24 = metadata !{i32 4, i32 15, metadata !5, null} +!25 = metadata !{i32 4, i32 20, metadata !26, null} +!26 = metadata !{i32 720907, metadata !5, i32 4, i32 18, metadata !6, i32 0} ; [ DW_TAG_lexical_block ] +!27 = metadata !{i32 4, i32 30, metadata !26, null} +!28 = metadata !{i32 721153, metadata !20, metadata !"this", metadata !6, i32 16777218, metadata !15, i32 64, i32 0} ; [ DW_TAG_arg_variable ] +!29 = metadata !{i32 2, i32 8, metadata !20, null} +!30 = metadata !{i32 2, i32 15, metadata !31, null} +!31 = metadata !{i32 720907, metadata !20, i32 2, i32 14, metadata !6, i32 1} ; [ DW_TAG_lexical_block ] From daniel at zuster.org Fri Nov 4 14:04:24 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Fri, 04 Nov 2011 19:04:24 -0000 Subject: [llvm-commits] [llvm] r143727 - in /llvm/trunk: CMakeLists.txt include/llvm/CMakeLists.txt lib/Target/ARM/CMakeLists.txt lib/Target/CellSPU/CMakeLists.txt lib/Target/MBlaze/CMakeLists.txt lib/Target/MSP430/CMakeLists.txt lib/Target/Mips/CMakeLists.txt lib/Target/PTX/CMakeLists.txt lib/Target/PowerPC/CMakeLists.txt lib/Target/Sparc/CMakeLists.txt lib/Target/X86/CMakeLists.txt lib/Target/XCore/CMakeLists.txt Message-ID: <20111104190424.691DF2A6C12C@llvm.org> Author: ddunbar Date: Fri Nov 4 14:04:23 2011 New Revision: 143727 URL: http://llvm.org/viewvc/llvm-project?rev=143727&view=rev Log: build/cmake: Use tblgen macro directly instead of llvm_tablegen, which just added a layer of indirection with no value (not even conciseness). Modified: llvm/trunk/CMakeLists.txt llvm/trunk/include/llvm/CMakeLists.txt llvm/trunk/lib/Target/ARM/CMakeLists.txt llvm/trunk/lib/Target/CellSPU/CMakeLists.txt llvm/trunk/lib/Target/MBlaze/CMakeLists.txt llvm/trunk/lib/Target/MSP430/CMakeLists.txt llvm/trunk/lib/Target/Mips/CMakeLists.txt llvm/trunk/lib/Target/PTX/CMakeLists.txt llvm/trunk/lib/Target/PowerPC/CMakeLists.txt llvm/trunk/lib/Target/Sparc/CMakeLists.txt llvm/trunk/lib/Target/X86/CMakeLists.txt llvm/trunk/lib/Target/XCore/CMakeLists.txt Modified: llvm/trunk/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=143727&r1=143726&r2=143727&view=diff ============================================================================== --- llvm/trunk/CMakeLists.txt (original) +++ llvm/trunk/CMakeLists.txt Fri Nov 4 14:04:23 2011 @@ -184,10 +184,6 @@ include(AddLLVM) include(TableGen) -macro(llvm_tablegen) - tablegen(LLVM ${ARGN}) -endmacro() - if( MINGW ) # People report that -O3 is unreliable on MinGW. The traditional # build also uses -O2 for that reason: Modified: llvm/trunk/include/llvm/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CMakeLists.txt?rev=143727&r1=143726&r2=143727&view=diff ============================================================================== --- llvm/trunk/include/llvm/CMakeLists.txt (original) +++ llvm/trunk/include/llvm/CMakeLists.txt Fri Nov 4 14:04:23 2011 @@ -1,6 +1,6 @@ set(LLVM_TARGET_DEFINITIONS Intrinsics.td) -llvm_tablegen(Intrinsics.gen -gen-intrinsic) +tablegen(LLVM Intrinsics.gen -gen-intrinsic) add_custom_target(intrinsics_gen ALL DEPENDS ${llvm_builded_incs_dir}/Intrinsics.gen) Modified: llvm/trunk/lib/Target/ARM/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/CMakeLists.txt?rev=143727&r1=143726&r2=143727&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/ARM/CMakeLists.txt Fri Nov 4 14:04:23 2011 @@ -1,18 +1,18 @@ set(LLVM_TARGET_DEFINITIONS ARM.td) -llvm_tablegen(ARMGenRegisterInfo.inc -gen-register-info) -llvm_tablegen(ARMGenInstrInfo.inc -gen-instr-info) -llvm_tablegen(ARMGenCodeEmitter.inc -gen-emitter) -llvm_tablegen(ARMGenMCCodeEmitter.inc -gen-emitter -mc-emitter) -llvm_tablegen(ARMGenMCPseudoLowering.inc -gen-pseudo-lowering) -llvm_tablegen(ARMGenAsmWriter.inc -gen-asm-writer) -llvm_tablegen(ARMGenAsmMatcher.inc -gen-asm-matcher) -llvm_tablegen(ARMGenDAGISel.inc -gen-dag-isel) -llvm_tablegen(ARMGenFastISel.inc -gen-fast-isel) -llvm_tablegen(ARMGenCallingConv.inc -gen-callingconv) -llvm_tablegen(ARMGenSubtargetInfo.inc -gen-subtarget) -llvm_tablegen(ARMGenEDInfo.inc -gen-enhanced-disassembly-info) -llvm_tablegen(ARMGenDisassemblerTables.inc -gen-disassembler) +tablegen(LLVM ARMGenRegisterInfo.inc -gen-register-info) +tablegen(LLVM ARMGenInstrInfo.inc -gen-instr-info) +tablegen(LLVM ARMGenCodeEmitter.inc -gen-emitter) +tablegen(LLVM ARMGenMCCodeEmitter.inc -gen-emitter -mc-emitter) +tablegen(LLVM ARMGenMCPseudoLowering.inc -gen-pseudo-lowering) +tablegen(LLVM ARMGenAsmWriter.inc -gen-asm-writer) +tablegen(LLVM ARMGenAsmMatcher.inc -gen-asm-matcher) +tablegen(LLVM ARMGenDAGISel.inc -gen-dag-isel) +tablegen(LLVM ARMGenFastISel.inc -gen-fast-isel) +tablegen(LLVM ARMGenCallingConv.inc -gen-callingconv) +tablegen(LLVM ARMGenSubtargetInfo.inc -gen-subtarget) +tablegen(LLVM ARMGenEDInfo.inc -gen-enhanced-disassembly-info) +tablegen(LLVM ARMGenDisassemblerTables.inc -gen-disassembler) add_public_tablegen_target(ARMCommonTableGen) add_llvm_target(ARMCodeGen Modified: llvm/trunk/lib/Target/CellSPU/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/CMakeLists.txt?rev=143727&r1=143726&r2=143727&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/CellSPU/CMakeLists.txt Fri Nov 4 14:04:23 2011 @@ -1,12 +1,12 @@ set(LLVM_TARGET_DEFINITIONS SPU.td) -llvm_tablegen(SPUGenAsmWriter.inc -gen-asm-writer) -llvm_tablegen(SPUGenCodeEmitter.inc -gen-emitter) -llvm_tablegen(SPUGenRegisterInfo.inc -gen-register-info) -llvm_tablegen(SPUGenInstrInfo.inc -gen-instr-info) -llvm_tablegen(SPUGenDAGISel.inc -gen-dag-isel) -llvm_tablegen(SPUGenSubtargetInfo.inc -gen-subtarget) -llvm_tablegen(SPUGenCallingConv.inc -gen-callingconv) +tablegen(LLVM SPUGenAsmWriter.inc -gen-asm-writer) +tablegen(LLVM SPUGenCodeEmitter.inc -gen-emitter) +tablegen(LLVM SPUGenRegisterInfo.inc -gen-register-info) +tablegen(LLVM SPUGenInstrInfo.inc -gen-instr-info) +tablegen(LLVM SPUGenDAGISel.inc -gen-dag-isel) +tablegen(LLVM SPUGenSubtargetInfo.inc -gen-subtarget) +tablegen(LLVM SPUGenCallingConv.inc -gen-callingconv) add_public_tablegen_target(CellSPUCommonTableGen) add_llvm_target(CellSPUCodeGen Modified: llvm/trunk/lib/Target/MBlaze/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/CMakeLists.txt?rev=143727&r1=143726&r2=143727&view=diff ============================================================================== --- llvm/trunk/lib/Target/MBlaze/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/MBlaze/CMakeLists.txt Fri Nov 4 14:04:23 2011 @@ -1,15 +1,15 @@ set(LLVM_TARGET_DEFINITIONS MBlaze.td) -llvm_tablegen(MBlazeGenRegisterInfo.inc -gen-register-info) -llvm_tablegen(MBlazeGenInstrInfo.inc -gen-instr-info) -llvm_tablegen(MBlazeGenCodeEmitter.inc -gen-emitter) -llvm_tablegen(MBlazeGenAsmWriter.inc -gen-asm-writer) -llvm_tablegen(MBlazeGenAsmMatcher.inc -gen-asm-matcher) -llvm_tablegen(MBlazeGenDAGISel.inc -gen-dag-isel) -llvm_tablegen(MBlazeGenCallingConv.inc -gen-callingconv) -llvm_tablegen(MBlazeGenSubtargetInfo.inc -gen-subtarget) -llvm_tablegen(MBlazeGenIntrinsics.inc -gen-tgt-intrinsic) -llvm_tablegen(MBlazeGenEDInfo.inc -gen-enhanced-disassembly-info) +tablegen(LLVM MBlazeGenRegisterInfo.inc -gen-register-info) +tablegen(LLVM MBlazeGenInstrInfo.inc -gen-instr-info) +tablegen(LLVM MBlazeGenCodeEmitter.inc -gen-emitter) +tablegen(LLVM MBlazeGenAsmWriter.inc -gen-asm-writer) +tablegen(LLVM MBlazeGenAsmMatcher.inc -gen-asm-matcher) +tablegen(LLVM MBlazeGenDAGISel.inc -gen-dag-isel) +tablegen(LLVM MBlazeGenCallingConv.inc -gen-callingconv) +tablegen(LLVM MBlazeGenSubtargetInfo.inc -gen-subtarget) +tablegen(LLVM MBlazeGenIntrinsics.inc -gen-tgt-intrinsic) +tablegen(LLVM MBlazeGenEDInfo.inc -gen-enhanced-disassembly-info) add_public_tablegen_target(MBlazeCommonTableGen) add_llvm_target(MBlazeCodeGen Modified: llvm/trunk/lib/Target/MSP430/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/CMakeLists.txt?rev=143727&r1=143726&r2=143727&view=diff ============================================================================== --- llvm/trunk/lib/Target/MSP430/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/MSP430/CMakeLists.txt Fri Nov 4 14:04:23 2011 @@ -1,11 +1,11 @@ set(LLVM_TARGET_DEFINITIONS MSP430.td) -llvm_tablegen(MSP430GenRegisterInfo.inc -gen-register-info) -llvm_tablegen(MSP430GenInstrInfo.inc -gen-instr-info) -llvm_tablegen(MSP430GenAsmWriter.inc -gen-asm-writer) -llvm_tablegen(MSP430GenDAGISel.inc -gen-dag-isel) -llvm_tablegen(MSP430GenCallingConv.inc -gen-callingconv) -llvm_tablegen(MSP430GenSubtargetInfo.inc -gen-subtarget) +tablegen(LLVM MSP430GenRegisterInfo.inc -gen-register-info) +tablegen(LLVM MSP430GenInstrInfo.inc -gen-instr-info) +tablegen(LLVM MSP430GenAsmWriter.inc -gen-asm-writer) +tablegen(LLVM MSP430GenDAGISel.inc -gen-dag-isel) +tablegen(LLVM MSP430GenCallingConv.inc -gen-callingconv) +tablegen(LLVM MSP430GenSubtargetInfo.inc -gen-subtarget) add_public_tablegen_target(MSP430CommonTableGen) add_llvm_target(MSP430CodeGen Modified: llvm/trunk/lib/Target/Mips/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/CMakeLists.txt?rev=143727&r1=143726&r2=143727&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/Mips/CMakeLists.txt Fri Nov 4 14:04:23 2011 @@ -1,12 +1,12 @@ set(LLVM_TARGET_DEFINITIONS Mips.td) -llvm_tablegen(MipsGenRegisterInfo.inc -gen-register-info) -llvm_tablegen(MipsGenInstrInfo.inc -gen-instr-info) -llvm_tablegen(MipsGenCodeEmitter.inc -gen-emitter) -llvm_tablegen(MipsGenAsmWriter.inc -gen-asm-writer) -llvm_tablegen(MipsGenDAGISel.inc -gen-dag-isel) -llvm_tablegen(MipsGenCallingConv.inc -gen-callingconv) -llvm_tablegen(MipsGenSubtargetInfo.inc -gen-subtarget) +tablegen(LLVM MipsGenRegisterInfo.inc -gen-register-info) +tablegen(LLVM MipsGenInstrInfo.inc -gen-instr-info) +tablegen(LLVM MipsGenCodeEmitter.inc -gen-emitter) +tablegen(LLVM MipsGenAsmWriter.inc -gen-asm-writer) +tablegen(LLVM MipsGenDAGISel.inc -gen-dag-isel) +tablegen(LLVM MipsGenCallingConv.inc -gen-callingconv) +tablegen(LLVM MipsGenSubtargetInfo.inc -gen-subtarget) add_public_tablegen_target(MipsCommonTableGen) add_llvm_target(MipsCodeGen Modified: llvm/trunk/lib/Target/PTX/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/CMakeLists.txt?rev=143727&r1=143726&r2=143727&view=diff ============================================================================== --- llvm/trunk/lib/Target/PTX/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/PTX/CMakeLists.txt Fri Nov 4 14:04:23 2011 @@ -1,10 +1,10 @@ set(LLVM_TARGET_DEFINITIONS PTX.td) -llvm_tablegen(PTXGenAsmWriter.inc -gen-asm-writer) -llvm_tablegen(PTXGenDAGISel.inc -gen-dag-isel) -llvm_tablegen(PTXGenInstrInfo.inc -gen-instr-info) -llvm_tablegen(PTXGenRegisterInfo.inc -gen-register-info) -llvm_tablegen(PTXGenSubtargetInfo.inc -gen-subtarget) +tablegen(LLVM PTXGenAsmWriter.inc -gen-asm-writer) +tablegen(LLVM PTXGenDAGISel.inc -gen-dag-isel) +tablegen(LLVM PTXGenInstrInfo.inc -gen-instr-info) +tablegen(LLVM PTXGenRegisterInfo.inc -gen-register-info) +tablegen(LLVM PTXGenSubtargetInfo.inc -gen-subtarget) add_public_tablegen_target(PTXCommonTableGen) add_llvm_target(PTXCodeGen Modified: llvm/trunk/lib/Target/PowerPC/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/CMakeLists.txt?rev=143727&r1=143726&r2=143727&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/PowerPC/CMakeLists.txt Fri Nov 4 14:04:23 2011 @@ -1,13 +1,13 @@ set(LLVM_TARGET_DEFINITIONS PPC.td) -llvm_tablegen(PPCGenAsmWriter.inc -gen-asm-writer) -llvm_tablegen(PPCGenCodeEmitter.inc -gen-emitter) -llvm_tablegen(PPCGenMCCodeEmitter.inc -gen-emitter -mc-emitter) -llvm_tablegen(PPCGenRegisterInfo.inc -gen-register-info) -llvm_tablegen(PPCGenInstrInfo.inc -gen-instr-info) -llvm_tablegen(PPCGenDAGISel.inc -gen-dag-isel) -llvm_tablegen(PPCGenCallingConv.inc -gen-callingconv) -llvm_tablegen(PPCGenSubtargetInfo.inc -gen-subtarget) +tablegen(LLVM PPCGenAsmWriter.inc -gen-asm-writer) +tablegen(LLVM PPCGenCodeEmitter.inc -gen-emitter) +tablegen(LLVM PPCGenMCCodeEmitter.inc -gen-emitter -mc-emitter) +tablegen(LLVM PPCGenRegisterInfo.inc -gen-register-info) +tablegen(LLVM PPCGenInstrInfo.inc -gen-instr-info) +tablegen(LLVM PPCGenDAGISel.inc -gen-dag-isel) +tablegen(LLVM PPCGenCallingConv.inc -gen-callingconv) +tablegen(LLVM PPCGenSubtargetInfo.inc -gen-subtarget) add_public_tablegen_target(PowerPCCommonTableGen) add_llvm_target(PowerPCCodeGen Modified: llvm/trunk/lib/Target/Sparc/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/CMakeLists.txt?rev=143727&r1=143726&r2=143727&view=diff ============================================================================== --- llvm/trunk/lib/Target/Sparc/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/Sparc/CMakeLists.txt Fri Nov 4 14:04:23 2011 @@ -1,11 +1,11 @@ set(LLVM_TARGET_DEFINITIONS Sparc.td) -llvm_tablegen(SparcGenRegisterInfo.inc -gen-register-info) -llvm_tablegen(SparcGenInstrInfo.inc -gen-instr-info) -llvm_tablegen(SparcGenAsmWriter.inc -gen-asm-writer) -llvm_tablegen(SparcGenDAGISel.inc -gen-dag-isel) -llvm_tablegen(SparcGenSubtargetInfo.inc -gen-subtarget) -llvm_tablegen(SparcGenCallingConv.inc -gen-callingconv) +tablegen(LLVM SparcGenRegisterInfo.inc -gen-register-info) +tablegen(LLVM SparcGenInstrInfo.inc -gen-instr-info) +tablegen(LLVM SparcGenAsmWriter.inc -gen-asm-writer) +tablegen(LLVM SparcGenDAGISel.inc -gen-dag-isel) +tablegen(LLVM SparcGenSubtargetInfo.inc -gen-subtarget) +tablegen(LLVM SparcGenCallingConv.inc -gen-callingconv) add_public_tablegen_target(SparcCommonTableGen) add_llvm_target(SparcCodeGen Modified: llvm/trunk/lib/Target/X86/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/CMakeLists.txt?rev=143727&r1=143726&r2=143727&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/X86/CMakeLists.txt Fri Nov 4 14:04:23 2011 @@ -1,16 +1,16 @@ set(LLVM_TARGET_DEFINITIONS X86.td) -llvm_tablegen(X86GenRegisterInfo.inc -gen-register-info) -llvm_tablegen(X86GenDisassemblerTables.inc -gen-disassembler) -llvm_tablegen(X86GenInstrInfo.inc -gen-instr-info) -llvm_tablegen(X86GenAsmWriter.inc -gen-asm-writer) -llvm_tablegen(X86GenAsmWriter1.inc -gen-asm-writer -asmwriternum=1) -llvm_tablegen(X86GenAsmMatcher.inc -gen-asm-matcher) -llvm_tablegen(X86GenDAGISel.inc -gen-dag-isel) -llvm_tablegen(X86GenFastISel.inc -gen-fast-isel) -llvm_tablegen(X86GenCallingConv.inc -gen-callingconv) -llvm_tablegen(X86GenSubtargetInfo.inc -gen-subtarget) -llvm_tablegen(X86GenEDInfo.inc -gen-enhanced-disassembly-info) +tablegen(LLVM X86GenRegisterInfo.inc -gen-register-info) +tablegen(LLVM X86GenDisassemblerTables.inc -gen-disassembler) +tablegen(LLVM X86GenInstrInfo.inc -gen-instr-info) +tablegen(LLVM X86GenAsmWriter.inc -gen-asm-writer) +tablegen(LLVM X86GenAsmWriter1.inc -gen-asm-writer -asmwriternum=1) +tablegen(LLVM X86GenAsmMatcher.inc -gen-asm-matcher) +tablegen(LLVM X86GenDAGISel.inc -gen-dag-isel) +tablegen(LLVM X86GenFastISel.inc -gen-fast-isel) +tablegen(LLVM X86GenCallingConv.inc -gen-callingconv) +tablegen(LLVM X86GenSubtargetInfo.inc -gen-subtarget) +tablegen(LLVM X86GenEDInfo.inc -gen-enhanced-disassembly-info) add_public_tablegen_target(X86CommonTableGen) set(sources Modified: llvm/trunk/lib/Target/XCore/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/CMakeLists.txt?rev=143727&r1=143726&r2=143727&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/XCore/CMakeLists.txt Fri Nov 4 14:04:23 2011 @@ -1,11 +1,11 @@ set(LLVM_TARGET_DEFINITIONS XCore.td) -llvm_tablegen(XCoreGenRegisterInfo.inc -gen-register-info) -llvm_tablegen(XCoreGenInstrInfo.inc -gen-instr-info) -llvm_tablegen(XCoreGenAsmWriter.inc -gen-asm-writer) -llvm_tablegen(XCoreGenDAGISel.inc -gen-dag-isel) -llvm_tablegen(XCoreGenCallingConv.inc -gen-callingconv) -llvm_tablegen(XCoreGenSubtargetInfo.inc -gen-subtarget) +tablegen(LLVM XCoreGenRegisterInfo.inc -gen-register-info) +tablegen(LLVM XCoreGenInstrInfo.inc -gen-instr-info) +tablegen(LLVM XCoreGenAsmWriter.inc -gen-asm-writer) +tablegen(LLVM XCoreGenDAGISel.inc -gen-dag-isel) +tablegen(LLVM XCoreGenCallingConv.inc -gen-callingconv) +tablegen(LLVM XCoreGenSubtargetInfo.inc -gen-subtarget) add_public_tablegen_target(XCoreCommonTableGen) add_llvm_target(XCoreCodeGen From daniel at zuster.org Fri Nov 4 14:04:35 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Fri, 04 Nov 2011 19:04:35 -0000 Subject: [llvm-commits] [llvm] r143728 - in /llvm/trunk: CMakeLists.txt cmake/modules/HandleLLVMOptions.cmake Message-ID: <20111104190435.4312B2A6C12C@llvm.org> Author: ddunbar Date: Fri Nov 4 14:04:35 2011 New Revision: 143728 URL: http://llvm.org/viewvc/llvm-project?rev=143728&view=rev Log: build/cmake: Move all the user controllable options into top-level CMakeLists for consistency. Modified: llvm/trunk/CMakeLists.txt llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Modified: llvm/trunk/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=143728&r1=143727&r2=143728&view=diff ============================================================================== --- llvm/trunk/CMakeLists.txt (original) +++ llvm/trunk/CMakeLists.txt Fri Nov 4 14:04:35 2011 @@ -151,6 +151,39 @@ option(LLVM_ENABLE_ASSERTIONS "Enable assertions" ON) endif() +# Define an option controlling whether we should build for 32-bit on 64-bit +# platforms, where supported. +if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 ) + # TODO: support other platforms and toolchains. + option(LLVM_BUILD_32_BITS "Build 32 bits executables and libraries." OFF) +endif() + +# Define an option controlling whether or not we include the test targets in the +# project. +option(LLVM_INCLUDE_TESTS "Generate build targets for the LLVM unit tests." ON) + +# Define the default arguments to use with 'lit', and an option for the user to +# override. +set(LIT_ARGS_DEFAULT "-sv") +if (MSVC OR XCODE) + set(LIT_ARGS_DEFAULT "${LIT_ARGS_DEFAULT} --no-progress-bar") +endif() +set(LLVM_LIT_ARGS "${LIT_ARGS_DEFAULT}" CACHE STRING "Default options for lit") + +# On Win32/Cygwin, provide an option to specify the path to the GnuWin32 tools. +if( WIN32 AND CYGWIN ) + set(LLVM_LIT_TOOLS_DIR "" CACHE PATH "Path to GnuWin32 tools") +endif() + +# On Win32 using MS tools, provide an option to set the number of parallel jobs +# to use. +if( MSVC_IDE AND ( MSVC90 OR MSVC10 ) ) + # Only Visual Studio 2008 and 2010 officially supports /MP. Visual Studio + # 2005 supports it but it is experimental. + set(LLVM_COMPILER_JOBS "0" CACHE STRING + "Number of parallel compiler jobs. 0 means use all processors. Default is 0.") +endif() + # All options referred to from HandleLLVMOptions have to be specified # BEFORE this include, otherwise options will not be correctly set on # first cmake run Modified: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/HandleLLVMOptions.cmake?rev=143728&r1=143727&r2=143728&view=diff ============================================================================== --- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake (original) +++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Fri Nov 4 14:04:35 2011 @@ -1,3 +1,7 @@ +# This CMake module is responsible for interpreting the user defined LLVM_ +# options and executing the appropriate CMake commands to realize the users' +# selections. + include(AddLLVMDefinitions) if( CMAKE_COMPILER_IS_GNUCXX ) @@ -20,13 +24,6 @@ set(RUNTIME_BUILD_MODE "${CMAKE_CFG_INTDIR}") endif() -set(LIT_ARGS_DEFAULT "-sv") -if (MSVC OR XCODE) - set(LIT_ARGS_DEFAULT "${LIT_ARGS_DEFAULT} --no-progress-bar") -endif() -set(LLVM_LIT_ARGS "${LIT_ARGS_DEFAULT}" - CACHE STRING "Default options for lit") - if( LLVM_ENABLE_ASSERTIONS ) # MSVC doesn't like _DEBUG on release builds. See PR 4379. if( NOT MSVC ) @@ -52,9 +49,6 @@ else(CYGWIN) set(LLVM_ON_WIN32 1) set(LLVM_ON_UNIX 0) - - # This is effective only on Win32 hosts to use gnuwin32 tools. - set(LLVM_LIT_TOOLS_DIR "" CACHE PATH "Path to GnuWin32 tools") endif(CYGWIN) set(LTDL_SHLIB_EXT ".dll") set(EXEEXT ".exe") @@ -99,7 +93,6 @@ if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 ) # TODO: support other platforms and toolchains. - option(LLVM_BUILD_32_BITS "Build 32 bits executables and libraries." OFF) if( LLVM_BUILD_32_BITS ) message(STATUS "Building 32 bits executables and libraries.") add_llvm_definitions( -m32 ) @@ -189,5 +182,3 @@ add_llvm_definitions( -D__STDC_CONSTANT_MACROS ) add_llvm_definitions( -D__STDC_FORMAT_MACROS ) add_llvm_definitions( -D__STDC_LIMIT_MACROS ) - -option(LLVM_INCLUDE_TESTS "Generate build targets for the LLVM unit tests." ON) From daniel at zuster.org Fri Nov 4 14:04:37 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Fri, 04 Nov 2011 19:04:37 -0000 Subject: [llvm-commits] [llvm] r143729 - /llvm/trunk/CMakeLists.txt Message-ID: <20111104190437.AC0A72A6C12C@llvm.org> Author: ddunbar Date: Fri Nov 4 14:04:37 2011 New Revision: 143729 URL: http://llvm.org/viewvc/llvm-project?rev=143729&view=rev Log: build/cmake: Tidy up specification of build/include options for (tools, runtime, examples, and tests). Modified: llvm/trunk/CMakeLists.txt Modified: llvm/trunk/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=143729&r1=143728&r2=143729&view=diff ============================================================================== --- llvm/trunk/CMakeLists.txt (original) +++ llvm/trunk/CMakeLists.txt Fri Nov 4 14:04:37 2011 @@ -158,10 +158,6 @@ option(LLVM_BUILD_32_BITS "Build 32 bits executables and libraries." OFF) endif() -# Define an option controlling whether or not we include the test targets in the -# project. -option(LLVM_INCLUDE_TESTS "Generate build targets for the LLVM unit tests." ON) - # Define the default arguments to use with 'lit', and an option for the user to # override. set(LIT_ARGS_DEFAULT "-sv") @@ -184,6 +180,27 @@ "Number of parallel compiler jobs. 0 means use all processors. Default is 0.") endif() +# Define options to control the inclusion and default build behavior for +# components which may not strictly be necessary (tools, runtime, examples, and +# tests). +# +# This is primarily to support building smaller or faster project files. +option(LLVM_INCLUDE_TOOLS "Generate build targets for the LLVM tools." ON) +option(LLVM_BUILD_TOOLS + "Build the LLVM tools. If OFF, just generate build targets." ON) + +option(LLVM_INCLUDE_RUNTIME "Generate build targets for the LLVM runtimes" ON) +option(LLVM_BUILD_RUNTIME + "Build the LLVM runtime libraries. If OFF, just generate build targets." ON) + +option(LLVM_BUILD_EXAMPLES + "Build the LLVM example programs. If OFF, just generate build targets." OFF) +option(LLVM_INCLUDE_EXAMPLES "Generate build targets for the LLVM examples" ON) + +option(LLVM_BUILD_TESTS + "Build LLVM unit tests. If OFF, just generate build targets." OFF) +option(LLVM_INCLUDE_TESTS "Generate build targets for the LLVM unit tests." ON) + # All options referred to from HandleLLVMOptions have to be specified # BEFORE this include, otherwise options will not be correctly set on # first cmake run @@ -241,29 +258,18 @@ add_subdirectory(projects) -option(LLVM_BUILD_TOOLS - "Build the LLVM tools. If OFF, just generate build targets." ON) -option(LLVM_INCLUDE_TOOLS "Generate build targets for the LLVM tools." ON) if( LLVM_INCLUDE_TOOLS ) add_subdirectory(tools) endif() -option(LLVM_BUILD_RUNTIME - "Build the LLVM runtime libraries. If OFF, just generate build targets." ON) -option(LLVM_INCLUDE_RUNTIME "Generate build targets for the LLVM runtimes" ON) if( LLVM_INCLUDE_RUNTIME ) add_subdirectory(runtime) endif() -option(LLVM_BUILD_EXAMPLES - "Build the LLVM example programs. If OFF, just generate build targets." OFF) -option(LLVM_INCLUDE_EXAMPLES "Generate build targets for the LLVM examples" ON) if( LLVM_INCLUDE_EXAMPLES ) add_subdirectory(examples) endif() -option(LLVM_BUILD_TESTS - "Build LLVM unit tests. If OFF, just generate build targets." OFF) if( LLVM_INCLUDE_TESTS ) add_subdirectory(test) add_subdirectory(utils/unittest) From daniel at zuster.org Fri Nov 4 14:04:39 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Fri, 04 Nov 2011 19:04:39 -0000 Subject: [llvm-commits] [llvm] r143730 - /llvm/trunk/CMakeLists.txt Message-ID: <20111104190439.DBE902A6C12C@llvm.org> Author: ddunbar Date: Fri Nov 4 14:04:39 2011 New Revision: 143730 URL: http://llvm.org/viewvc/llvm-project?rev=143730&view=rev Log: build/cmake: Coalesce in-tree sanity checks. Modified: llvm/trunk/CMakeLists.txt Modified: llvm/trunk/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=143730&r1=143729&r2=143730&view=diff ============================================================================== --- llvm/trunk/CMakeLists.txt (original) +++ llvm/trunk/CMakeLists.txt Fri Nov 4 14:04:39 2011 @@ -27,6 +27,11 @@ set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") set(PACKAGE_BUGREPORT "llvmbugs at cs.uiuc.edu") +# Sanity check our source directory to make sure that we are not trying to +# generate an in-tree build (unless on MSVC_IDE, where it is ok), and to make +# sure that we don't have any stray generated files lying around in the tree +# (which would end up getting picked up by header search, instead of the correct +# versions). if( CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT MSVC_IDE ) message(FATAL_ERROR "In-source builds are not allowed. CMake would overwrite the makefiles distributed with LLVM. @@ -35,27 +40,17 @@ This process created the file `CMakeCache.txt' and the directory `CMakeFiles'. Please delete them.") endif() - -string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE) - -set(LLVM_MAIN_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}) -set(LLVM_MAIN_INCLUDE_DIR ${LLVM_MAIN_SRC_DIR}/include) -set(LLVM_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) -set(LLVM_TOOLS_BINARY_DIR ${LLVM_BINARY_DIR}/bin) -set(LLVM_EXAMPLES_BINARY_DIR ${LLVM_BINARY_DIR}/examples) -set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" ) - if( NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR ) file(GLOB_RECURSE tablegenned_files_on_include_dir - "${LLVM_MAIN_SRC_DIR}/include/llvm/*.gen") + "${CMAKE_CURRENT_SOURCE_DIR}/include/llvm/*.gen") file(GLOB_RECURSE tablegenned_files_on_lib_dir - "${LLVM_MAIN_SRC_DIR}/lib/Target/*.inc") + "${CMAKE_CURRENT_SOURCE_DIR}/lib/Target/*.inc") if( tablegenned_files_on_include_dir OR tablegenned_files_on_lib_dir) message(FATAL_ERROR "Apparently there is a previous in-source build, probably as the result of running `configure' and `make' on -${LLVM_MAIN_SRC_DIR}. +${CMAKE_CURRENT_SOURCE_DIR}. This may cause problems. The suspicious files are: ${tablegenned_files_on_lib_dir} ${tablegenned_files_on_include_dir} @@ -63,6 +58,15 @@ endif() endif() +string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE) + +set(LLVM_MAIN_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}) +set(LLVM_MAIN_INCLUDE_DIR ${LLVM_MAIN_SRC_DIR}/include) +set(LLVM_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) +set(LLVM_TOOLS_BINARY_DIR ${LLVM_BINARY_DIR}/bin) +set(LLVM_EXAMPLES_BINARY_DIR ${LLVM_BINARY_DIR}/examples) +set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" ) + set(LLVM_ALL_TARGETS ARM CBackend From daniel at zuster.org Fri Nov 4 14:04:42 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Fri, 04 Nov 2011 19:04:42 -0000 Subject: [llvm-commits] [llvm] r143731 - in /llvm/trunk: CMakeLists.txt lib/Target/CMakeLists.txt Message-ID: <20111104190442.D6BDB2A6C12C@llvm.org> Author: ddunbar Date: Fri Nov 4 14:04:42 2011 New Revision: 143731 URL: http://llvm.org/viewvc/llvm-project?rev=143731&view=rev Log: build/cmake: Coalesce the configuration time header include fragment generation for target definitions. Modified: llvm/trunk/CMakeLists.txt llvm/trunk/lib/Target/CMakeLists.txt Modified: llvm/trunk/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=143731&r1=143730&r2=143731&view=diff ============================================================================== --- llvm/trunk/CMakeLists.txt (original) +++ llvm/trunk/CMakeLists.txt Fri Nov 4 14:04:42 2011 @@ -127,12 +127,6 @@ endif() endforeach(c) -# Produce llvm/Config/Targets.def -configure_file( - ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/Targets.def.in - ${LLVM_BINARY_DIR}/include/llvm/Config/Targets.def - ) - set(llvm_builded_incs_dir ${LLVM_BINARY_DIR}/include/llvm) include(AddLLVMDefinitions) @@ -211,14 +205,54 @@ include(config-ix) include(HandleLLVMOptions) +# Configure all of the various header file fragments LLVM uses which depend on +# configuration variables. +set(LLVM_ENUM_ASM_PRINTERS "") +set(LLVM_ENUM_ASM_PARSERS "") +set(LLVM_ENUM_DISASSEMBLERS "") +foreach(t ${LLVM_TARGETS_TO_BUILD}) + set( td ${LLVM_MAIN_SRC_DIR}/lib/Target/${t} ) + file(GLOB asmp_file "${td}/*AsmPrinter.cpp") + if( asmp_file ) + set(LLVM_ENUM_ASM_PRINTERS + "${LLVM_ENUM_ASM_PRINTERS}LLVM_ASM_PRINTER(${t})\n") + endif() + if( EXISTS ${td}/AsmParser/CMakeLists.txt ) + set(LLVM_ENUM_ASM_PARSERS + "${LLVM_ENUM_ASM_PARSERS}LLVM_ASM_PARSER(${t})\n") + endif() + if( EXISTS ${td}/Disassembler/CMakeLists.txt ) + set(LLVM_ENUM_DISASSEMBLERS + "${LLVM_ENUM_DISASSEMBLERS}LLVM_DISASSEMBLER(${t})\n") + endif() +endforeach(t) + +# Produce the target definition files, which provide a way for clients to easily +# include various classes of targets. +configure_file( + ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/AsmPrinters.def.in + ${LLVM_BINARY_DIR}/include/llvm/Config/AsmPrinters.def + ) +configure_file( + ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/AsmParsers.def.in + ${LLVM_BINARY_DIR}/include/llvm/Config/AsmParsers.def + ) +configure_file( + ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/Disassemblers.def.in + ${LLVM_BINARY_DIR}/include/llvm/Config/Disassemblers.def + ) +configure_file( + ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/Targets.def.in + ${LLVM_BINARY_DIR}/include/llvm/Config/Targets.def + ) + +# Configure the three LLVM configuration header files. configure_file( ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/config.h.cmake ${LLVM_BINARY_DIR}/include/llvm/Config/config.h) - configure_file( ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/llvm-config.h.cmake ${LLVM_BINARY_DIR}/include/llvm/Config/llvm-config.h) - configure_file( ${LLVM_MAIN_INCLUDE_DIR}/llvm/Support/DataTypes.h.cmake ${LLVM_BINARY_DIR}/include/llvm/Support/DataTypes.h) Modified: llvm/trunk/lib/Target/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CMakeLists.txt?rev=143731&r1=143730&r2=143731&view=diff ============================================================================== --- llvm/trunk/lib/Target/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/CMakeLists.txt Fri Nov 4 14:04:42 2011 @@ -19,42 +19,7 @@ LLVMSupport ) -set(LLVM_ENUM_ASM_PRINTERS "") -set(LLVM_ENUM_ASM_PARSERS "") -set(LLVM_ENUM_DISASSEMBLERS "") foreach(t ${LLVM_TARGETS_TO_BUILD}) message(STATUS "Targeting ${t}") add_subdirectory(${t}) - set( td ${LLVM_MAIN_SRC_DIR}/lib/Target/${t} ) - file(GLOB asmp_file "${td}/*AsmPrinter.cpp") - if( asmp_file ) - set(LLVM_ENUM_ASM_PRINTERS - "${LLVM_ENUM_ASM_PRINTERS}LLVM_ASM_PRINTER(${t})\n") - endif() - if( EXISTS ${td}/AsmParser/CMakeLists.txt ) - set(LLVM_ENUM_ASM_PARSERS - "${LLVM_ENUM_ASM_PARSERS}LLVM_ASM_PARSER(${t})\n") - endif() - if( EXISTS ${td}/Disassembler/CMakeLists.txt ) - set(LLVM_ENUM_DISASSEMBLERS - "${LLVM_ENUM_DISASSEMBLERS}LLVM_DISASSEMBLER(${t})\n") - endif() -endforeach(t) - -# Produce llvm/Config/AsmPrinters.def -configure_file( - ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/AsmPrinters.def.in - ${LLVM_BINARY_DIR}/include/llvm/Config/AsmPrinters.def - ) - -# Produce llvm/Config/AsmParsers.def -configure_file( - ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/AsmParsers.def.in - ${LLVM_BINARY_DIR}/include/llvm/Config/AsmParsers.def - ) - -# Produce llvm/Config/Disassemblers.def -configure_file( - ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/Disassemblers.def.in - ${LLVM_BINARY_DIR}/include/llvm/Config/Disassemblers.def - ) +endforeach() From jfonseca at vmware.com Fri Nov 4 14:42:37 2011 From: jfonseca at vmware.com (Jose Fonseca) Date: Fri, 4 Nov 2011 12:42:37 -0700 (PDT) Subject: [llvm-commits] [PATCH] Fix CRT selection logic when using CMake NMake generator. In-Reply-To: <1318620024-8108-1-git-send-email-jfonseca@vmware.com> Message-ID: <1313208683.205578.1320435757913.JavaMail.root@zimbra-prod-mbox-2.vmware.com> Ping? It's really trivial. Jose ----- Original Message ----- > > CMAKE_CONFIGURATION_TYPES is only set on Visual Studio generators. > For > NMake CMAKE_BUILD_TYPE is used instead. > --- > cmake/modules/ChooseMSVCCRT.cmake | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Fix-CRT-selection-logic-when-using-CMake-NMake-gener.patch Type: text/x-patch Size: 952 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111104/4b85835f/attachment.bin From rafael.espindola at gmail.com Fri Nov 4 15:20:35 2011 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Fri, 04 Nov 2011 20:20:35 -0000 Subject: [llvm-commits] [llvm] r143735 - /llvm/trunk/test/DebugInfo/pr11300.ll Message-ID: <20111104202035.0E01B2A6C12C@llvm.org> Author: rafael Date: Fri Nov 4 15:20:34 2011 New Revision: 143735 URL: http://llvm.org/viewvc/llvm-project?rev=143735&view=rev Log: Add triple to test. Modified: llvm/trunk/test/DebugInfo/pr11300.ll Modified: llvm/trunk/test/DebugInfo/pr11300.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/pr11300.ll?rev=143735&r1=143734&r2=143735&view=diff ============================================================================== --- llvm/trunk/test/DebugInfo/pr11300.ll (original) +++ llvm/trunk/test/DebugInfo/pr11300.ll Fri Nov 4 15:20:34 2011 @@ -1,4 +1,4 @@ -; RUN: llc %s -o %t -filetype=obj +; RUN: llc -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj ; RUN: llvm-dwarfdump %t | FileCheck %s ; test that the DW_AT_specification is a back edge in the file. From isanbard at gmail.com Fri Nov 4 15:40:42 2011 From: isanbard at gmail.com (Bill Wendling) Date: Fri, 04 Nov 2011 20:40:42 -0000 Subject: [llvm-commits] [llvm] r143737 - /llvm/trunk/docs/LangRef.html Message-ID: <20111104204042.26EC22A6C12C@llvm.org> Author: void Date: Fri Nov 4 15:40:41 2011 New Revision: 143737 URL: http://llvm.org/viewvc/llvm-project?rev=143737&view=rev Log: Fix some misplaced punctuation. 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=143737&r1=143736&r2=143737&view=diff ============================================================================== --- llvm/trunk/docs/LangRef.html (original) +++ llvm/trunk/docs/LangRef.html Fri Nov 4 15:40:41 2011 @@ -635,7 +635,7 @@ be merged with equivalent globals. These linkage types are otherwise the same as their non-odr versions. -

    external:
    +
    external
    If none of the above identifiers are used, the global is externally visible, meaning that it participates in linkage and can be used to resolve external symbol references.
    @@ -932,7 +932,7 @@ alignments must be a power of 2.

    If the unnamed_addr attribute is given, the address is know to not - be significant and two identical functions can be merged

    . + be significant and two identical functions can be merged.

    Syntax:
    
    
    
    From evan.cheng at apple.com  Fri Nov  4 15:44:53 2011
    From: evan.cheng at apple.com (Evan Cheng)
    Date: Fri, 04 Nov 2011 13:44:53 -0700
    Subject: [llvm-commits] LoadSDNode invariance
    In-Reply-To: <72DEEAEF-7CA4-45AF-9286-0ADD7082EB96@apple.com>
    References: <72DEEAEF-7CA4-45AF-9286-0ADD7082EB96@apple.com>
    Message-ID: <0CD49991-E497-4531-8554-E9168E566EB4@apple.com>
    
    
    On Nov 4, 2011, at 11:56 AM, Peter Cooper wrote:
    
    > Hi
    > 
    > I've added new metadata to load IR instructions to say if they are invariant, i.e., don't change at runtime.
    > 
    > The IR change was simple but i'm not sure about the MachineInstr/DAG level.  I've attached the change which encodes the invariant flag in the MemSDNodeFlags next to the volatile flag.
    > 
    > Please have a look and tell me if this is ideal?  The main thing i wasn't happy doing was adding another DAG.getLoad method with the invariant flag, but the alternative was changing the existing method which would lead to changing dozens of calls.
    
    If it's only dozens of calls, then I vote for changing the existing method.
    
    Evan
    
    > 
    > Thanks,
    > Pete
    > 
    > _______________________________________________
    > llvm-commits mailing list
    > llvm-commits at cs.uiuc.edu
    > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
    
    
    From peter_cooper at apple.com  Fri Nov  4 15:52:14 2011
    From: peter_cooper at apple.com (Peter Cooper)
    Date: Fri, 04 Nov 2011 13:52:14 -0700
    Subject: [llvm-commits] LoadSDNode invariance
    In-Reply-To: <0CD49991-E497-4531-8554-E9168E566EB4@apple.com>
    References: <72DEEAEF-7CA4-45AF-9286-0ADD7082EB96@apple.com>
    	<0CD49991-E497-4531-8554-E9168E566EB4@apple.com>
    Message-ID: 
    
    I'm happy doing that.  Hopefully it doesn't end up as too many changes for people with their own backends.
    
    Pete
    
    On Nov 4, 2011, at 1:44 PM, Evan Cheng wrote:
    
    > 
    > On Nov 4, 2011, at 11:56 AM, Peter Cooper wrote:
    > 
    >> Hi
    >> 
    >> I've added new metadata to load IR instructions to say if they are invariant, i.e., don't change at runtime.
    >> 
    >> The IR change was simple but i'm not sure about the MachineInstr/DAG level.  I've attached the change which encodes the invariant flag in the MemSDNodeFlags next to the volatile flag.
    >> 
    >> Please have a look and tell me if this is ideal?  The main thing i wasn't happy doing was adding another DAG.getLoad method with the invariant flag, but the alternative was changing the existing method which would lead to changing dozens of calls.
    > 
    > If it's only dozens of calls, then I vote for changing the existing method.
    > 
    > Evan
    > 
    >> 
    >> Thanks,
    >> Pete
    >> 
    >> _______________________________________________
    >> llvm-commits mailing list
    >> llvm-commits at cs.uiuc.edu
    >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
    > 
    
    
    From bruno.cardoso at gmail.com  Fri Nov  4 17:24:36 2011
    From: bruno.cardoso at gmail.com (Bruno Cardoso Lopes)
    Date: Fri, 04 Nov 2011 22:24:36 -0000
    Subject: [llvm-commits] [llvm] r143738 -
    	/llvm/trunk/lib/MC/ELFObjectWriter.cpp
    Message-ID: <20111104222436.C0D222A6C12C@llvm.org>
    
    Author: bruno
    Date: Fri Nov  4 17:24:36 2011
    New Revision: 143738
    
    URL: http://llvm.org/viewvc/llvm-project?rev=143738&view=rev
    Log:
    Add mips ELF relocation types. Patch by Jack Carter!
    
    Modified:
        llvm/trunk/lib/MC/ELFObjectWriter.cpp
    
    Modified: llvm/trunk/lib/MC/ELFObjectWriter.cpp
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/ELFObjectWriter.cpp?rev=143738&r1=143737&r2=143738&view=diff
    ==============================================================================
    --- llvm/trunk/lib/MC/ELFObjectWriter.cpp (original)
    +++ llvm/trunk/lib/MC/ELFObjectWriter.cpp Fri Nov  4 17:24:36 2011
    @@ -28,6 +28,7 @@
     #include "llvm/ADT/Statistic.h"
     #include "llvm/ADT/StringSwitch.h"
     
    +#include "../Target/Mips/MCTargetDesc/MipsFixupKinds.h"
     #include "../Target/X86/MCTargetDesc/X86FixupKinds.h"
     #include "../Target/ARM/MCTargetDesc/ARMFixupKinds.h"
     #include "../Target/PowerPC/MCTargetDesc/PPCFixupKinds.h"
    @@ -277,7 +278,7 @@
                                            MCDataFragment *ShndxF,
                                            const MCAssembler &Asm,
                                            const MCAsmLayout &Layout,
    -                                     const SectionIndexMapTy &SectionIndexMap) {
    +                                    const SectionIndexMapTy &SectionIndexMap) {
       // The string table must be emitted first because we need the index
       // into the string table for all the symbol names.
       assert(StringTable.size() && "Missing string table");
    @@ -306,7 +307,8 @@
             Section.getType() == ELF::SHT_SYMTAB_SHNDX)
           continue;
         WriteSymbolEntry(SymtabF, ShndxF, 0, ELF::STT_SECTION, 0, 0,
    -                     ELF::STV_DEFAULT, SectionIndexMap.lookup(&Section), false);
    +                     ELF::STV_DEFAULT, SectionIndexMap.lookup(&Section),
    +                     false);
         LastLocalSymbolIndex++;
       }
     
    @@ -416,7 +418,7 @@
           // Offset of the symbol in the section
           int64_t a = Layout.getSymbolOffset(&SDB);
     
    -      // Ofeset of the relocation in the section
    +      // Offset of the relocation in the section
           int64_t b = Layout.getFragmentOffset(Fragment) + Fixup.getOffset();
           Value += b - a;
         }
    @@ -1273,7 +1275,6 @@
       }
     }
     
    -
     /// START OF SUBCLASSES for ELFObjectWriter
     //===- ARMELFObjectWriter -------------------------------------------===//
     
    @@ -1815,6 +1816,8 @@
       return Type;
     }
     
    +//===- MipsELFObjectWriter -------------------------------------------===//
    +
     MipsELFObjectWriter::MipsELFObjectWriter(MCELFObjectTargetWriter *MOTW,
                                              raw_ostream &_OS,
                                              bool IsLittleEndian)
    @@ -1827,6 +1830,52 @@
                                                bool IsPCRel,
                                                bool IsRelocWithSymbol,
                                                int64_t Addend) {
    -  // tbd
    -  return 1;
    +  // determine the type of the relocation
    +  unsigned Type = (unsigned)ELF::R_MIPS_NONE;
    +  unsigned Kind = (unsigned)Fixup.getKind();
    +
    +  switch (Kind) {
    +  default:
    +    llvm_unreachable("invalid fixup kind!");
    +  case FK_Data_4:
    +    Type = ELF::R_MIPS_32;
    +    break;
    +  case Mips::fixup_Mips_GPREL16:
    +    Type = ELF::R_MIPS_GPREL16;
    +    break;
    +  case Mips::fixup_Mips_26:
    +    Type = ELF::R_MIPS_26;
    +    break;
    +  case Mips::fixup_Mips_CALL16:
    +    Type = ELF::R_MIPS_CALL16;
    +    break;
    +  case Mips::fixup_Mips_GOT16:
    +    Type = ELF::R_MIPS_GOT16;
    +    break;
    +  case Mips::fixup_Mips_HI16:
    +    Type = ELF::R_MIPS_HI16;
    +    break;
    +  case Mips::fixup_Mips_LO16:
    +    Type = ELF::R_MIPS_LO16;
    +    break;
    +  case Mips::fixup_Mips_TLSGD:
    +    Type = ELF::R_MIPS_TLS_GD;
    +    break;
    +  case Mips::fixup_Mips_GOTTPREL:
    +    Type = ELF::R_MIPS_TLS_GOTTPREL;
    +    break;
    +  case Mips::fixup_Mips_TPREL_HI:
    +    Type = ELF::R_MIPS_TLS_TPREL_HI16;
    +    break;
    +  case Mips::fixup_Mips_TPREL_LO:
    +    Type = ELF::R_MIPS_TLS_TPREL_LO16;
    +    break;
    +  case Mips::fixup_Mips_Branch_PCRel:
    +  case Mips::fixup_Mips_PC16:
    +    Type = ELF::R_MIPS_PC16;
    +    break;
    +  }
    +
    +  return Type;
     }
    +
    
    
    
    From mcrosier at apple.com  Fri Nov  4 17:29:00 2011
    From: mcrosier at apple.com (Chad Rosier)
    Date: Fri, 04 Nov 2011 22:29:00 -0000
    Subject: [llvm-commits] [llvm] r143739 -
    	/llvm/trunk/lib/Target/ARM/ARMFastISel.cpp
    Message-ID: <20111104222900.B18DD2A6C12C@llvm.org>
    
    Author: mcrosier
    Date: Fri Nov  4 17:29:00 2011
    New Revision: 143739
    
    URL: http://llvm.org/viewvc/llvm-project?rev=143739&view=rev
    Log:
    Enable support for materializing i1, i8, and i16 integers via move immediate.
    
    Modified:
        llvm/trunk/lib/Target/ARM/ARMFastISel.cpp
    
    Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMFastISel.cpp?rev=143739&r1=143738&r2=143739&view=diff
    ==============================================================================
    --- llvm/trunk/lib/Target/ARM/ARMFastISel.cpp (original)
    +++ llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Fri Nov  4 17:29:00 2011
    @@ -545,22 +545,27 @@
     
     unsigned ARMFastISel::ARMMaterializeInt(const Constant *C, EVT VT) {
     
    -  // For now 32-bit only.
    -  if (VT != MVT::i32) return false;
    -
    -  unsigned DestReg = createResultReg(TLI.getRegClassFor(VT));
    +  if (VT != MVT::i32 && VT != MVT::i16 && VT != MVT::i8 && VT != MVT::i1)
    +    return false;
     
       // If we can do this in a single instruction without a constant pool entry
       // do so now.
       const ConstantInt *CI = cast(C);
       if (Subtarget->hasV6T2Ops() && isUInt<16>(CI->getSExtValue())) {
         unsigned Opc = isThumb ? ARM::t2MOVi16 : ARM::MOVi16;
    +    unsigned ImmReg = createResultReg(TLI.getRegClassFor(VT));
         AddOptionalDefs(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
    -                            TII.get(Opc), DestReg)
    +                            TII.get(Opc), ImmReg)
                         .addImm(CI->getSExtValue()));
    -    return DestReg;
    +    return ImmReg;
       }
     
    +  // For now 32-bit only.
    +  if (VT != MVT::i32)
    +    return false;
    +
    +  unsigned DestReg = createResultReg(TLI.getRegClassFor(VT));
    +
       // MachineConstantPool wants an explicit alignment.
       unsigned Align = TD.getPrefTypeAlignment(C->getType());
       if (Align == 0) {
    
    
    
    From daniel at zuster.org  Fri Nov  4 17:44:04 2011
    From: daniel at zuster.org (Daniel Dunbar)
    Date: Fri, 4 Nov 2011 15:44:04 -0700
    Subject: [llvm-commits] [llvm] r143662 - /llvm/trunk/Makefile.rules
    In-Reply-To: 
    References: <20111103224622.08E1A2A6C12C@llvm.org>
    	
    Message-ID: 
    
    Thanks for pointing this out Eli, I'll take a look.
    
    Nakamura, do you own these bots? Is it possible for you to send me a
    copy of the Makefile.llvmbuild file in the build directory?
    
    I'll try and reproduce locally, but I have never set up an msys
    environment on my Win32 box.
    
     - Daniel
    
    On Fri, Nov 4, 2011 at 10:27 AM, Eli Friedman  wrote:
    > On Thu, Nov 3, 2011 at 3:46 PM, Daniel Dunbar  wrote:
    >> Author: ddunbar
    >> Date: Thu Nov ?3 17:46:21 2011
    >> New Revision: 143662
    >>
    >> URL: http://llvm.org/viewvc/llvm-project?rev=143662&view=rev
    >> Log:
    >> build/Make: Integrate llvm-build into Makefiles.
    >> ?- Basically, we coordinate with llvm-build to create a Makefile fragment we can
    >> ? easily use. For now, nothing is wired in except the support to automatically
    >> ? regenerate this file when necessary.
    >
    > This appears to be breaking builds on some buildbots; see
    > http://bb.pgr.jp/builders/clang-i686-msys
    > http://lab.llvm.org:8011/builders/clang-native-mingw32-win7 .
    >
    > -Eli
    >
    >> Modified:
    >> ? ?llvm/trunk/Makefile.rules
    >>
    >> Modified: llvm/trunk/Makefile.rules
    >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=143662&r1=143661&r2=143662&view=diff
    >> ==============================================================================
    >> --- llvm/trunk/Makefile.rules (original)
    >> +++ llvm/trunk/Makefile.rules Thu Nov ?3 17:46:21 2011
    >> @@ -57,6 +57,54 @@
    >>
    >> ?$(UserTargets)::
    >>
    >> +#------------------------------------------------------------------------
    >> +# LLVMBuild Integration
    >> +#------------------------------------------------------------------------
    >> +#
    >> +# We use llvm-build to generate all the data required by the Makefile based
    >> +# build system in one swoop:
    >> +#
    >> +# ?- We generate a file (a Makefile fragment) in the object root which contains
    >> +# ? ?all the definitions that are required by Makefiles across the entire
    >> +# ? ?project.
    >> +#
    >> +# ?- We generate the library table used by llvm-config.
    >> +#
    >> +# ?- We generate the dependencies for the Makefile fragment, so that we will
    >> +# ? ?automatically reconfigure outselves.
    >> +
    >> +# The path to the llvm-build tool itself.
    >> +LLVMBuildTool ?:= $(PROJ_SRC_ROOT)/utils/llvm-build/llvm-build
    >> +
    >> +# The files we are going to generate using llvm-build.
    >> +LLVMBuildMakeFrag := $(PROJ_OBJ_ROOT)/Makefile.llvmbuild
    >> +LLVMConfigLibraryDependenciesInc := \
    >> + ? ? ? $(PROJ_OBJ_ROOT)/tools/llvm-config/LibraryDependencies.inc
    >> +
    >> +# The rule to create the LLVMBuild Makefile fragment as well as the llvm-config
    >> +# library table.
    >> +#
    >> +# Note that this target gets its real dependencies generated for us by
    >> +# llvm-build.
    >> +$(LLVMBuildMakeFrag):
    >> + ? ? ? $(EchoCmd) Constructing LLVMBuild project information. ; \
    >> + ? ? ? $(LLVMBuildTool) \
    >> + ? ? ? ? --write-library-table $(LLVMConfigLibraryDependenciesInc) \
    >> + ? ? ? ? --write-make-fragment $(LLVMBuildMakeFrag)
    >> +
    >> +# Include the generated Makefile fragment.
    >> +#
    >> +# We currently only include the dependencies for the fragment itself if we are
    >> +# at the top-level. Otherwise, recursive invocations would ends up doing
    >> +# substantially more redundant stat'ing.
    >> +#
    >> +# This means that we won't properly regenerate things for developers used to
    >> +# building from a subdirectory, but that is always somewhat unreliable.
    >> +ifeq ($(LEVEL),.)
    >> +LLVMBUILD_INCLUDE_DEPENDENCIES := 1
    >> +endif
    >> +-include $(LLVMBuildMakeFrag)
    >> +
    >> ?################################################################################
    >> ?# PRECONDITIONS: that which must be built/checked first
    >> ?################################################################################
    >>
    >>
    >> _______________________________________________
    >> llvm-commits mailing list
    >> llvm-commits at cs.uiuc.edu
    >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
    >>
    >
    
    
    From rafael.espindola at gmail.com  Fri Nov  4 17:52:41 2011
    From: rafael.espindola at gmail.com (=?UTF-8?Q?Rafael_Esp=C3=ADndola?=)
    Date: Fri, 4 Nov 2011 18:52:41 -0400
    Subject: [llvm-commits] [patch] More DW_AT_specification forward references
    	fixes
    Message-ID: 
    
    This is a more general fix for pr11300. The test included in the patch
    shows another path that can cause a subprogram die to be created
    before its declaration. In this case, the definition is found when we
    emit a DIE for a static local variable.
    
    The patch fixes the problem by moving the check for a declaration to
    CompileUnit::getOrCreateSubprogramDIE, which makes sure we cannot be
    adding a definition before a declaration.
    
    I am currently rebuilding firefox to see if this fixes all remaining
    DW_AT_specification that point forward in the file. Is the patch OK if
    it does?
    
    Thanks,
    Rafael
    -------------- next part --------------
    A non-text attachment was scrubbed...
    Name: t.patch
    Type: application/octet-stream
    Size: 5370 bytes
    Desc: not available
    Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111104/1b2a0589/attachment.obj 
    
    From daniel at zuster.org  Fri Nov  4 18:04:05 2011
    From: daniel at zuster.org (Daniel Dunbar)
    Date: Fri, 04 Nov 2011 23:04:05 -0000
    Subject: [llvm-commits] [llvm] r143742 - in /llvm/trunk: CMakeLists.txt
    	test/CMakeLists.txt
    Message-ID: <20111104230405.866782A6C12C@llvm.org>
    
    Author: ddunbar
    Date: Fri Nov  4 18:04:05 2011
    New Revision: 143742
    
    URL: http://llvm.org/viewvc/llvm-project?rev=143742&view=rev
    Log:
    build/cmake: Change to require Python be available.
    
    Modified:
        llvm/trunk/CMakeLists.txt
        llvm/trunk/test/CMakeLists.txt
    
    Modified: llvm/trunk/CMakeLists.txt
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=143742&r1=143741&r2=143742&view=diff
    ==============================================================================
    --- llvm/trunk/CMakeLists.txt (original)
    +++ llvm/trunk/CMakeLists.txt Fri Nov  4 18:04:05 2011
    @@ -205,6 +205,15 @@
     include(config-ix)
     include(HandleLLVMOptions)
     
    +# Verify that we can find a Python interpreter,
    +include(FindPythonInterp)
    +if( NOT PYTHONINTERP_FOUND )
    +  message(FATAL_ERROR
    +"Unable to find Python interpreter, required for builds and testing.
    +
    +Please install Python or specify the PYTHON_EXECUTABLE CMake variable.")
    +endif()
    +
     # Configure all of the various header file fragments LLVM uses which depend on
     # configuration variables.
     set(LLVM_ENUM_ASM_PRINTERS "")
    
    Modified: llvm/trunk/test/CMakeLists.txt
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CMakeLists.txt?rev=143742&r1=143741&r2=143742&view=diff
    ==============================================================================
    --- llvm/trunk/test/CMakeLists.txt (original)
    +++ llvm/trunk/test/CMakeLists.txt Fri Nov  4 18:04:05 2011
    @@ -24,62 +24,58 @@
       set(SHLIBPATH_VAR "LD_LIBRARY_PATH")
     endif()
     
    -include(FindPythonInterp)
    -if(PYTHONINTERP_FOUND)
    -  set(LIT_ARGS "${LLVM_LIT_ARGS}")
    -  separate_arguments(LIT_ARGS)
    -
    -  configure_file(
    -    ${CMAKE_CURRENT_SOURCE_DIR}/site.exp.in
    -    ${CMAKE_CURRENT_BINARY_DIR}/site.exp)
    -
    -  MAKE_DIRECTORY(${CMAKE_CURRENT_BINARY_DIR}/Unit)
    -
    -  # Configuration-time: See Unit/lit.site.cfg.in
    -  set(LLVM_BUILD_MODE "%(build_mode)s")
    -
    -  set(LLVM_SOURCE_DIR ${LLVM_MAIN_SRC_DIR})
    -  set(LLVM_BINARY_DIR ${LLVM_BINARY_DIR})
    -  set(LLVM_TOOLS_DIR "${LLVM_TOOLS_BINARY_DIR}/%(build_config)s")
    -  set(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE})
    -  set(ENABLE_SHARED ${LLVM_SHARED_LIBS_ENABLED})
    -  set(SHLIBPATH_VAR ${SHLIBPATH_VAR})
    -
    -  if(LLVM_ENABLE_ASSERTIONS AND NOT MSVC_IDE)
    -    set(ENABLE_ASSERTIONS "1")
    -  else()
    -    set(ENABLE_ASSERTIONS "0")
    -  endif()
    -
    -  configure_file(
    -    ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
    -    ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
    -    @ONLY)
    -  configure_file(
    -    ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in
    -    ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
    -    @ONLY)
    -
    -  add_custom_target(check
    -    COMMAND ${PYTHON_EXECUTABLE}
    -                ${LLVM_SOURCE_DIR}/utils/lit/lit.py
    -                --param llvm_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
    -                --param llvm_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
    -                --param build_config=${CMAKE_CFG_INTDIR}
    -                --param build_mode=${RUNTIME_BUILD_MODE}
    -                ${LIT_ARGS}
    -                ${CMAKE_CURRENT_BINARY_DIR}
    -                COMMENT "Running LLVM regression tests")
    -  set_target_properties(check PROPERTIES FOLDER "Tests")
    -
    -  add_custom_target(check.deps)
    -  add_dependencies(check check.deps)
    -  add_dependencies(check.deps
    -                UnitTests
    -                BugpointPasses LLVMHello
    -                llc lli llvm-ar llvm-as llvm-dis llvm-extract llvm-dwarfdump
    -                llvm-ld llvm-link llvm-mc llvm-nm llvm-objdump macho-dump opt
    -                FileCheck count not)
    -  set_target_properties(check.deps PROPERTIES FOLDER "Tests")
    +set(LIT_ARGS "${LLVM_LIT_ARGS}")
    +separate_arguments(LIT_ARGS)
     
    +configure_file(
    +  ${CMAKE_CURRENT_SOURCE_DIR}/site.exp.in
    +  ${CMAKE_CURRENT_BINARY_DIR}/site.exp)
    +
    +MAKE_DIRECTORY(${CMAKE_CURRENT_BINARY_DIR}/Unit)
    +
    +# Configuration-time: See Unit/lit.site.cfg.in
    +set(LLVM_BUILD_MODE "%(build_mode)s")
    +
    +set(LLVM_SOURCE_DIR ${LLVM_MAIN_SRC_DIR})
    +set(LLVM_BINARY_DIR ${LLVM_BINARY_DIR})
    +set(LLVM_TOOLS_DIR "${LLVM_TOOLS_BINARY_DIR}/%(build_config)s")
    +set(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE})
    +set(ENABLE_SHARED ${LLVM_SHARED_LIBS_ENABLED})
    +set(SHLIBPATH_VAR ${SHLIBPATH_VAR})
    +
    +if(LLVM_ENABLE_ASSERTIONS AND NOT MSVC_IDE)
    +  set(ENABLE_ASSERTIONS "1")
    +else()
    +  set(ENABLE_ASSERTIONS "0")
     endif()
    +
    +configure_file(
    +  ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
    +  ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
    +  @ONLY)
    +configure_file(
    +  ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in
    +  ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
    +  @ONLY)
    +
    +add_custom_target(check
    +  COMMAND ${PYTHON_EXECUTABLE}
    +              ${LLVM_SOURCE_DIR}/utils/lit/lit.py
    +              --param llvm_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
    +              --param llvm_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
    +              --param build_config=${CMAKE_CFG_INTDIR}
    +              --param build_mode=${RUNTIME_BUILD_MODE}
    +              ${LIT_ARGS}
    +              ${CMAKE_CURRENT_BINARY_DIR}
    +              COMMENT "Running LLVM regression tests")
    +set_target_properties(check PROPERTIES FOLDER "Tests")
    +
    +add_custom_target(check.deps)
    +add_dependencies(check check.deps)
    +add_dependencies(check.deps
    +              UnitTests
    +              BugpointPasses LLVMHello
    +              llc lli llvm-ar llvm-as llvm-dis llvm-extract llvm-dwarfdump
    +              llvm-ld llvm-link llvm-mc llvm-nm llvm-objdump macho-dump opt
    +              FileCheck count not)
    +set_target_properties(check.deps PROPERTIES FOLDER "Tests")
    
    
    
    From rafael.espindola at gmail.com  Fri Nov  4 18:10:39 2011
    From: rafael.espindola at gmail.com (=?UTF-8?Q?Rafael_Esp=C3=ADndola?=)
    Date: Fri, 4 Nov 2011 19:10:39 -0400
    Subject: [llvm-commits] [patch] More DW_AT_specification forward
    	references fixes
    In-Reply-To: 
    References: 
    Message-ID: 
    
    > I am currently rebuilding firefox to see if this fixes all remaining
    > DW_AT_specification that point forward in the file. Is the patch OK if
    > it does?
    
    It fixes it. There are still other attributes to handle, but all
    DW_AT_specification in firefox's XUL are backedges with this patch.
    
    Cheers,
    Rafael
    
    From mcrosier at apple.com  Fri Nov  4 18:09:49 2011
    From: mcrosier at apple.com (Chad Rosier)
    Date: Fri, 04 Nov 2011 23:09:49 -0000
    Subject: [llvm-commits] [llvm] r143743 -
    	/llvm/trunk/lib/Target/ARM/ARMFastISel.cpp
    Message-ID: <20111104230949.A0D262A6C12C@llvm.org>
    
    Author: mcrosier
    Date: Fri Nov  4 18:09:49 2011
    New Revision: 143743
    
    URL: http://llvm.org/viewvc/llvm-project?rev=143743&view=rev
    Log:
    When materializing an i32, SExt vs ZExt doesn't matter when we're trying to fit
    in a 16-bit immediate.  However, for the shorter non-legal types (i.e., i1, i8,
    i16) we should not sign-extend.  This prevents us from materializing things
    such as 'true' (i.e., i1 1).
    
    Modified:
        llvm/trunk/lib/Target/ARM/ARMFastISel.cpp
    
    Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMFastISel.cpp?rev=143743&r1=143742&r2=143743&view=diff
    ==============================================================================
    --- llvm/trunk/lib/Target/ARM/ARMFastISel.cpp (original)
    +++ llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Fri Nov  4 18:09:49 2011
    @@ -551,7 +551,7 @@
       // If we can do this in a single instruction without a constant pool entry
       // do so now.
       const ConstantInt *CI = cast(C);
    -  if (Subtarget->hasV6T2Ops() && isUInt<16>(CI->getSExtValue())) {
    +  if (Subtarget->hasV6T2Ops() && isUInt<16>(CI->getZExtValue())) {
         unsigned Opc = isThumb ? ARM::t2MOVi16 : ARM::MOVi16;
         unsigned ImmReg = createResultReg(TLI.getRegClassFor(VT));
         AddOptionalDefs(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
    
    
    
    From daniel at zuster.org  Fri Nov  4 18:10:37 2011
    From: daniel at zuster.org (Daniel Dunbar)
    Date: Fri, 04 Nov 2011 23:10:37 -0000
    Subject: [llvm-commits] [llvm] r143744 - in /llvm/trunk:
     docs/CommandGuide/llvm-build.pod utils/llvm-build/llvmbuild/main.py
    Message-ID: <20111104231037.7CBCA2A6C12C@llvm.org>
    
    Author: ddunbar
    Date: Fri Nov  4 18:10:37 2011
    New Revision: 143744
    
    URL: http://llvm.org/viewvc/llvm-project?rev=143744&view=rev
    Log:
    llvm-build: Add initial --write-cmake-fragment option.
    
    Modified:
        llvm/trunk/docs/CommandGuide/llvm-build.pod
        llvm/trunk/utils/llvm-build/llvmbuild/main.py
    
    Modified: llvm/trunk/docs/CommandGuide/llvm-build.pod
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CommandGuide/llvm-build.pod?rev=143744&r1=143743&r2=143744&view=diff
    ==============================================================================
    --- llvm/trunk/docs/CommandGuide/llvm-build.pod (original)
    +++ llvm/trunk/docs/CommandGuide/llvm-build.pod Fri Nov  4 18:10:37 2011
    @@ -48,6 +48,13 @@
     Write out new I files based on the loaded components. This is
     useful for auto-upgrading the schema of the files.
     
    +=item B<--write-cmake-fragment>
    +
    +Write out the LLVMBuild in the form of a CMake fragment, so it can easily be
    +consumed by the CMake based build system. The exact contents and format of this
    +file are closely tied to how LLVMBuild is integrated with CMake, see LLVM's
    +top-level CMakeLists.txt.
    +
     =item B<--write-make-fragment>
     
     Write out the LLVMBuild in the form of a Makefile fragment, so it can easily be
    
    Modified: llvm/trunk/utils/llvm-build/llvmbuild/main.py
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvm-build/llvmbuild/main.py?rev=143744&r1=143743&r2=143744&view=diff
    ==============================================================================
    --- llvm/trunk/utils/llvm-build/llvmbuild/main.py (original)
    +++ llvm/trunk/utils/llvm-build/llvmbuild/main.py Fri Nov  4 18:10:37 2011
    @@ -286,22 +286,21 @@
             print >>f, '};'
             f.close()
     
    -    def write_make_fragment(self, output_path):
    +    def get_fragment_dependencies(self):
             """
    -        write_make_fragment(output_path) -> None
    +        get_fragment_dependencies() -> iter
     
    -        Generate a Makefile fragment which includes all of the collated
    -        LLVMBuild information in a format that is easily digestible by a
    -        Makefile. The exact contents of this are closely tied to how the LLVM
    -        Makefiles integrate LLVMBuild, see Makefile.rules in the top-level.
    +        Compute the list of files (as absolute paths) on which the output
    +        fragments depend (i.e., files for which a modification should trigger a
    +        rebuild of the fragment).
             """
     
             # Construct a list of all the dependencies of the Makefile fragment
             # itself. These include all the LLVMBuild files themselves, as well as
             # all of our own sources.
    -        dependencies = []
             for ci in self.component_infos:
    -            dependencies.append(os.path.join(self.source_root, ci.subpath[1:]))
    +            yield os.path.join(self.source_root, ci.subpath[1:],
    +                               'LLVMBuild.txt')
     
             # Gather the list of necessary sources by just finding all loaded
             # modules that are inside the LLVM source tree.
    @@ -320,7 +319,77 @@
                 # If the path exists and is in the source tree, consider it a
                 # dependency.
                 if (path.startswith(self.source_root) and os.path.exists(path)):
    -                dependencies.append(path)
    +                yield path
    +
    +    def write_cmake_fragment(self, output_path):
    +        """
    +        write_cmake_fragment(output_path) -> None
    +
    +        Generate a CMake fragment which includes all of the collated LLVMBuild
    +        information in a format that is easily digestible by a CMake. The exact
    +        contents of this are closely tied to how the CMake configuration
    +        integrates LLVMBuild, see CMakeLists.txt in the top-level.
    +        """
    +
    +        dependencies = list(self.get_fragment_dependencies())
    +
    +        # Write out the CMake fragment.
    +        f = open(output_path, 'w')
    +
    +        # Write the header.
    +        header_fmt = '\
    +#===-- %s - LLVMBuild Configuration for LLVM %s-*- CMake -*--===#'
    +        header_name = os.path.basename(output_path)
    +        header_pad = '-' * (80 - len(header_fmt % (header_name, '')))
    +        header_string = header_fmt % (header_name, header_pad)
    +        print >>f, """\
    +%s
    +#
    +#                     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 LLVMBuild project information in a format easily
    +# consumed by the CMake based build system.
    +#
    +# This file is autogenerated by llvm-build, do not edit!
    +#
    +#===------------------------------------------------------------------------===#
    +""" % header_string
    +
    +        # Write the dependency information in the best way we can.
    +        print >>f, """
    +# LLVMBuild CMake fragment dependencies.
    +#
    +# CMake has no builtin way to declare that the configuration depends on
    +# a particular file. However, a side effect of configure_file is to add
    +# said input file to CMake's internal dependency list. So, we use that
    +# and a dummy output file to communicate the dependency information to
    +# CMake.
    +#
    +# FIXME: File a CMake RFE to get a properly supported version of this
    +# feature."""
    +        for dep in dependencies:
    +            print >>f, """\
    +configure_file(\"%s\"
    +               ${CMAKE_CURRENT_BINARY_DIR}/DummyConfigureOutput)""" % (dep,)
    +            
    +        f.close()
    +
    +    def write_make_fragment(self, output_path):
    +        """
    +        write_make_fragment(output_path) -> None
    +
    +        Generate a Makefile fragment which includes all of the collated
    +        LLVMBuild information in a format that is easily digestible by a
    +        Makefile. The exact contents of this are closely tied to how the LLVM
    +        Makefiles integrate LLVMBuild, see Makefile.rules in the top-level.
    +        """
    +
    +        dependencies = list(self.get_fragment_dependencies())
     
             # Write out the Makefile fragment.
             f = open(output_path, 'w')
    @@ -390,6 +459,10 @@
                           dest="write_library_table", metavar="PATH",
                           help="Write the C++ library dependency table to PATH",
                           action="store", default=None)
    +    parser.add_option("", "--write-cmake-fragment",
    +                      dest="write_cmake_fragment", metavar="PATH",
    +                      help="Write the CMake project information to PATH",
    +                      action="store", default=None)
         parser.add_option("", "--write-make-fragment",
                           dest="write_make_fragment", metavar="PATH",
                           help="Write the Makefile project information to PATH",
    @@ -430,13 +503,17 @@
         if opts.write_llvmbuild:
             project_info.write_components(opts.write_llvmbuild)
     
    -    # Write out the required librariy, if requested.
    +    # Write out the required library table, if requested.
         if opts.write_library_table:
             project_info.write_library_table(opts.write_library_table)
     
    -    # Write out the required librariy, if requested.
    +    # Write out the make fragment, if requested.
         if opts.write_make_fragment:
             project_info.write_make_fragment(opts.write_make_fragment)
     
    +    # Write out the cmake fragment, if requested.
    +    if opts.write_cmake_fragment:
    +        project_info.write_cmake_fragment(opts.write_cmake_fragment)
    +
     if __name__=='__main__':
         main()
    
    
    
    From dpatel at apple.com  Fri Nov  4 18:16:39 2011
    From: dpatel at apple.com (Devang Patel)
    Date: Fri, 04 Nov 2011 16:16:39 -0700
    Subject: [llvm-commits] [patch] More DW_AT_specification
     forward	references fixes
    In-Reply-To: 
    References: 
    	
    Message-ID: <4C139C9E-9EF5-4AC3-B6E2-7F539C8B9627@apple.com>
    
    
    On Nov 4, 2011, at 4:10 PM, Rafael Esp?ndola wrote:
    
    >> I am currently rebuilding firefox to see if this fixes all remaining
    >> DW_AT_specification that point forward in the file. Is the patch OK if
    >> it does?
    > 
    > It fixes it. There are still other attributes to handle, but all
    > DW_AT_specification in firefox's XUL are backedges with this patch.
    
    Thanks for checking. LGTM.
    -
    Devang
    
    From geek4civic at gmail.com  Fri Nov  4 18:19:19 2011
    From: geek4civic at gmail.com (NAKAMURA Takumi)
    Date: Sat, 5 Nov 2011 08:19:19 +0900
    Subject: [llvm-commits] [llvm] r143662 - /llvm/trunk/Makefile.rules
    In-Reply-To: 
    References: <20111103224622.08E1A2A6C12C@llvm.org>
    	
    	
    Message-ID: 
    
    2011/11/5 Daniel Dunbar :
    > Nakamura, do you own these bots? Is it possible for you to send me a
    > copy of the Makefile.llvmbuild file in the build directory?
    
    Here is. It is made by generic Python/w32.
    
    ...Takumi
    -------------- next part --------------
    A non-text attachment was scrubbed...
    Name: Makefile.llvmbuild
    Type: application/octet-stream
    Size: 16167 bytes
    Desc: not available
    Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111105/e14f579a/attachment.obj 
    
    From gkistanova at gmail.com  Fri Nov  4 18:29:49 2011
    From: gkistanova at gmail.com (Galina Kistanova)
    Date: Fri, 4 Nov 2011 16:29:49 -0700
    Subject: [llvm-commits] [llvm] r143662 - /llvm/trunk/Makefile.rules
    In-Reply-To: 
    References: <20111103224622.08E1A2A6C12C@llvm.org>
    	
    	
    Message-ID: 
    
    Windows builders clang-native-mingw32-win7, llvm-gcc-native-mingw32,
    llvm-gcc-native-mingw32-win7 also fail:
    http://lab.llvm.org:8011/builders/llvm-gcc-native-mingw32/builds/239/steps/run.build.step.make_llvm/logs/stdio
    
    
    Thanks
    
    Galina
    
    
    
    On Fri, Nov 4, 2011 at 3:44 PM, Daniel Dunbar  wrote:
    > Thanks for pointing this out Eli, I'll take a look.
    >
    > Nakamura, do you own these bots? Is it possible for you to send me a
    > copy of the Makefile.llvmbuild file in the build directory?
    >
    > I'll try and reproduce locally, but I have never set up an msys
    > environment on my Win32 box.
    >
    > ?- Daniel
    >
    > On Fri, Nov 4, 2011 at 10:27 AM, Eli Friedman  wrote:
    >> On Thu, Nov 3, 2011 at 3:46 PM, Daniel Dunbar  wrote:
    >>> Author: ddunbar
    >>> Date: Thu Nov ?3 17:46:21 2011
    >>> New Revision: 143662
    >>>
    >>> URL: http://llvm.org/viewvc/llvm-project?rev=143662&view=rev
    >>> Log:
    >>> build/Make: Integrate llvm-build into Makefiles.
    >>> ?- Basically, we coordinate with llvm-build to create a Makefile fragment we can
    >>> ? easily use. For now, nothing is wired in except the support to automatically
    >>> ? regenerate this file when necessary.
    >>
    >> This appears to be breaking builds on some buildbots; see
    >> http://bb.pgr.jp/builders/clang-i686-msys
    >> http://lab.llvm.org:8011/builders/clang-native-mingw32-win7 .
    >>
    >> -Eli
    >>
    >>> Modified:
    >>> ? ?llvm/trunk/Makefile.rules
    >>>
    >>> Modified: llvm/trunk/Makefile.rules
    >>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=143662&r1=143661&r2=143662&view=diff
    >>> ==============================================================================
    >>> --- llvm/trunk/Makefile.rules (original)
    >>> +++ llvm/trunk/Makefile.rules Thu Nov ?3 17:46:21 2011
    >>> @@ -57,6 +57,54 @@
    >>>
    >>> ?$(UserTargets)::
    >>>
    >>> +#------------------------------------------------------------------------
    >>> +# LLVMBuild Integration
    >>> +#------------------------------------------------------------------------
    >>> +#
    >>> +# We use llvm-build to generate all the data required by the Makefile based
    >>> +# build system in one swoop:
    >>> +#
    >>> +# ?- We generate a file (a Makefile fragment) in the object root which contains
    >>> +# ? ?all the definitions that are required by Makefiles across the entire
    >>> +# ? ?project.
    >>> +#
    >>> +# ?- We generate the library table used by llvm-config.
    >>> +#
    >>> +# ?- We generate the dependencies for the Makefile fragment, so that we will
    >>> +# ? ?automatically reconfigure outselves.
    >>> +
    >>> +# The path to the llvm-build tool itself.
    >>> +LLVMBuildTool ?:= $(PROJ_SRC_ROOT)/utils/llvm-build/llvm-build
    >>> +
    >>> +# The files we are going to generate using llvm-build.
    >>> +LLVMBuildMakeFrag := $(PROJ_OBJ_ROOT)/Makefile.llvmbuild
    >>> +LLVMConfigLibraryDependenciesInc := \
    >>> + ? ? ? $(PROJ_OBJ_ROOT)/tools/llvm-config/LibraryDependencies.inc
    >>> +
    >>> +# The rule to create the LLVMBuild Makefile fragment as well as the llvm-config
    >>> +# library table.
    >>> +#
    >>> +# Note that this target gets its real dependencies generated for us by
    >>> +# llvm-build.
    >>> +$(LLVMBuildMakeFrag):
    >>> + ? ? ? $(EchoCmd) Constructing LLVMBuild project information. ; \
    >>> + ? ? ? $(LLVMBuildTool) \
    >>> + ? ? ? ? --write-library-table $(LLVMConfigLibraryDependenciesInc) \
    >>> + ? ? ? ? --write-make-fragment $(LLVMBuildMakeFrag)
    >>> +
    >>> +# Include the generated Makefile fragment.
    >>> +#
    >>> +# We currently only include the dependencies for the fragment itself if we are
    >>> +# at the top-level. Otherwise, recursive invocations would ends up doing
    >>> +# substantially more redundant stat'ing.
    >>> +#
    >>> +# This means that we won't properly regenerate things for developers used to
    >>> +# building from a subdirectory, but that is always somewhat unreliable.
    >>> +ifeq ($(LEVEL),.)
    >>> +LLVMBUILD_INCLUDE_DEPENDENCIES := 1
    >>> +endif
    >>> +-include $(LLVMBuildMakeFrag)
    >>> +
    >>> ?################################################################################
    >>> ?# PRECONDITIONS: that which must be built/checked first
    >>> ?################################################################################
    >>>
    >>>
    >>> _______________________________________________
    >>> llvm-commits mailing list
    >>> llvm-commits at cs.uiuc.edu
    >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
    >>>
    >>
    >
    > _______________________________________________
    > llvm-commits mailing list
    > llvm-commits at cs.uiuc.edu
    > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
    >
    
    
    From lhames at gmail.com  Fri Nov  4 18:30:04 2011
    From: lhames at gmail.com (Lang Hames)
    Date: Fri, 4 Nov 2011 16:30:04 -0700
    Subject: [llvm-commits] [PATCH] Smarter unaligned stores of constant values.
    Message-ID: 
    
    Encountered the following when I tried outputting an unaligned store of -1
    on ARM:
    
    _foo:                                   @ @foo
    @ BB#0:                                 @ %entry
            mov     r1, #255
            mov     r2, #255
            strb    r1, [r0, #3]
            orr     r1, r2, #65280
            strb    r1, [r0, #2]
            mvn     r1, #-16777216
            strb    r1, [r0, #1]
            mvn     r1, #0
            strb    r1, [r0]
            mov     pc, lr
    
    The strange constants are coming out of the legalizer, which tries to
    legalize the unaligned store by repeatedly splitting it into two half-sized
    stores, and shifting the constant around. This results in several new and
    confusing constants being introduced.
    
    This patch checks for constant value stores, and if the two halves of the
    constant have the same bit-pattern it avoids creating new constants.
    
    Could someone who's more familiar with the legalizer take a look and let me
    know if this is Ok to commit?  (I'm also planning to enable unaligned
    stores on supported subtargets, but that's a different issue)
    
    Cheers,
    Lang.
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111104/8902373f/attachment.html 
    -------------- next part --------------
    A non-text attachment was scrubbed...
    Name: legalizer.patch
    Type: application/octet-stream
    Size: 2104 bytes
    Desc: not available
    Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111104/8902373f/attachment.obj 
    
    From lhames at gmail.com  Fri Nov  4 18:33:29 2011
    From: lhames at gmail.com (Lang Hames)
    Date: Fri, 4 Nov 2011 16:33:29 -0700
    Subject: [llvm-commits] [PATCH] Smarter unaligned stores of constant
    	values.
    In-Reply-To: 
    References: 
    Message-ID: 
    
    Postscript: Output with patch is exactly what you'd expect:
    
    _foo:                                   @ @foo
    @ BB#0:                                 @ %entry
            mvn     r1, #0
            strb    r1, [r0, #3]
            strb    r1, [r0, #2]
            strb    r1, [r0, #1]
            strb    r1, [r0]
            mov     pc, lr
    
    Cheers,
    Lang.
    
    On Fri, Nov 4, 2011 at 4:30 PM, Lang Hames  wrote:
    
    > Encountered the following when I tried outputting an unaligned store of -1
    > on ARM:
    >
    > _foo:                                   @ @foo
    > @ BB#0:                                 @ %entry
    >         mov     r1, #255
    >         mov     r2, #255
    >         strb    r1, [r0, #3]
    >         orr     r1, r2, #65280
    >         strb    r1, [r0, #2]
    >         mvn     r1, #-16777216
    >         strb    r1, [r0, #1]
    >         mvn     r1, #0
    >         strb    r1, [r0]
    >         mov     pc, lr
    >
    > The strange constants are coming out of the legalizer, which tries to
    > legalize the unaligned store by repeatedly splitting it into two half-sized
    > stores, and shifting the constant around. This results in several new and
    > confusing constants being introduced.
    >
    > This patch checks for constant value stores, and if the two halves of the
    > constant have the same bit-pattern it avoids creating new constants.
    >
    > Could someone who's more familiar with the legalizer take a look and let
    > me know if this is Ok to commit?  (I'm also planning to enable unaligned
    > stores on supported subtargets, but that's a different issue)
    >
    > Cheers,
    > Lang.
    >
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111104/1f59633e/attachment.html 
    
    From eli.friedman at gmail.com  Fri Nov  4 18:41:32 2011
    From: eli.friedman at gmail.com (Eli Friedman)
    Date: Fri, 4 Nov 2011 16:41:32 -0700
    Subject: [llvm-commits] [PATCH] Smarter unaligned stores of constant
    	values.
    In-Reply-To: 
    References: 
    Message-ID: 
    
    On Fri, Nov 4, 2011 at 4:30 PM, Lang Hames  wrote:
    > Encountered the following when I tried outputting an unaligned store of -1
    > on ARM:
    > _foo: ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? @ @foo
    > @ BB#0: ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? @ %entry
    > ? ? ? ? mov ? ? r1, #255
    > ? ? ? ? mov ? ? r2, #255
    > ? ? ? ? strb ? ?r1, [r0, #3]
    > ? ? ? ? orr ? ? r1, r2, #65280
    > ? ? ? ? strb ? ?r1, [r0, #2]
    > ? ? ? ? mvn ? ? r1, #-16777216
    > ? ? ? ? strb ? ?r1, [r0, #1]
    > ? ? ? ? mvn ? ? r1, #0
    > ? ? ? ? strb ? ?r1, [r0]
    > ? ? ? ? mov ? ? pc, lr
    > The strange constants are coming out of the legalizer, which tries to
    > legalize the unaligned store by repeatedly splitting it into two half-sized
    > stores, and shifting the constant around. This results in several new and
    > confusing constants being introduced.
    > This patch checks for constant value stores, and if the two halves of the
    > constant have the same bit-pattern it avoids creating new constants.
    > Could someone who's more familiar with the legalizer take a look and let me
    > know if this is Ok to commit? ?(I'm also planning to enable unaligned stores
    > on supported subtargets, but that's a different issue)
    
    TargetLowering::SimplifyDemandedBits should be able to take care of
    this; if it can't, it should be fixed.
    
    -Eli
    
    
    From daniel at zuster.org  Fri Nov  4 18:40:11 2011
    From: daniel at zuster.org (Daniel Dunbar)
    Date: Fri, 04 Nov 2011 23:40:11 -0000
    Subject: [llvm-commits] [llvm] r143745 -
    	/llvm/trunk/utils/llvm-build/llvmbuild/main.py
    Message-ID: <20111104234011.DB9672A6C12C@llvm.org>
    
    Author: ddunbar
    Date: Fri Nov  4 18:40:11 2011
    New Revision: 143745
    
    URL: http://llvm.org/viewvc/llvm-project?rev=143745&view=rev
    Log:
    llvm-build: Quote colons in target names, in an attempt to make msys happy.
    
    Modified:
        llvm/trunk/utils/llvm-build/llvmbuild/main.py
    
    Modified: llvm/trunk/utils/llvm-build/llvmbuild/main.py
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvm-build/llvmbuild/main.py?rev=143745&r1=143744&r2=143745&view=diff
    ==============================================================================
    --- llvm/trunk/utils/llvm-build/llvmbuild/main.py (original)
    +++ llvm/trunk/utils/llvm-build/llvmbuild/main.py Fri Nov  4 18:40:11 2011
    @@ -7,6 +7,19 @@
     
     ###
     
    +def mk_quote_string_for_target(value):
    +    """
    +    mk_quote_string_for_target(target_name) -> str
    +
    +    Return a quoted form of the given target_name suitable for including in a 
    +    Makefile as a target name.
    +    """
    +
    +    # The only quoting we currently perform is for ':', to support msys users.
    +    return value.replace(":", "\\:")
    +
    +###
    +
     class LLVMProjectInfo(object):
         @staticmethod
         def load_infos_from_path(llvmbuild_source_root):
    @@ -427,7 +440,7 @@
     # performance of recursive Make systems.""" 
             print >>f, 'ifeq ($(LLVMBUILD_INCLUDE_DEPENDENCIES),1)'
             print >>f, "# The dependencies for this Makefile fragment itself."
    -        print >>f, "%s: \\" % (output_path,)
    +        print >>f, "%s: \\" % (mk_quote_string_for_target(output_path),)
             for dep in dependencies:
                 print >>f, "\t%s \\" % (dep,)
             print >>f
    @@ -438,7 +451,7 @@
     # The dummy targets to allow proper regeneration even when files are moved or
     # removed."""
             for dep in dependencies:
    -            print >>f, "%s:" % (dep,)
    +            print >>f, "%s:" % (mk_quote_string_for_target(dep),)
             print >>f, 'endif'
     
             f.close()
    
    
    
    From daniel at zuster.org  Fri Nov  4 18:40:14 2011
    From: daniel at zuster.org (Daniel Dunbar)
    Date: Fri, 04 Nov 2011 23:40:14 -0000
    Subject: [llvm-commits] [llvm] r143746 - /llvm/trunk/Makefile.rules
    Message-ID: <20111104234014.CE1942A6C12C@llvm.org>
    
    Author: ddunbar
    Date: Fri Nov  4 18:40:14 2011
    New Revision: 143746
    
    URL: http://llvm.org/viewvc/llvm-project?rev=143746&view=rev
    Log:
    build/make: Fix the output path of the llvm-config-2 library dependency table.
    
    Modified:
        llvm/trunk/Makefile.rules
    
    Modified: llvm/trunk/Makefile.rules
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=143746&r1=143745&r2=143746&view=diff
    ==============================================================================
    --- llvm/trunk/Makefile.rules (original)
    +++ llvm/trunk/Makefile.rules Fri Nov  4 18:40:14 2011
    @@ -79,7 +79,7 @@
     # The files we are going to generate using llvm-build.
     LLVMBuildMakeFrag := $(PROJ_OBJ_ROOT)/Makefile.llvmbuild
     LLVMConfigLibraryDependenciesInc := \
    -	$(PROJ_OBJ_ROOT)/tools/llvm-config/LibraryDependencies.inc
    +	$(PROJ_OBJ_ROOT)/tools/llvm-config-2/LibraryDependencies.inc
     
     # The rule to create the LLVMBuild Makefile fragment as well as the llvm-config
     # library table.
    
    
    
    From mcrosier at apple.com  Fri Nov  4 18:45:39 2011
    From: mcrosier at apple.com (Chad Rosier)
    Date: Fri, 04 Nov 2011 23:45:39 -0000
    Subject: [llvm-commits] [llvm] r143749 -
    	/llvm/trunk/lib/Target/ARM/ARMFastISel.cpp
    Message-ID: <20111104234539.E9F1F2A6C12C@llvm.org>
    
    Author: mcrosier
    Date: Fri Nov  4 18:45:39 2011
    New Revision: 143749
    
    URL: http://llvm.org/viewvc/llvm-project?rev=143749&view=rev
    Log:
    Cannot create a result register for non-legal types.
    
    Modified:
        llvm/trunk/lib/Target/ARM/ARMFastISel.cpp
    
    Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMFastISel.cpp?rev=143749&r1=143748&r2=143749&view=diff
    ==============================================================================
    --- llvm/trunk/lib/Target/ARM/ARMFastISel.cpp (original)
    +++ llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Fri Nov  4 18:45:39 2011
    @@ -552,8 +552,9 @@
       // do so now.
       const ConstantInt *CI = cast(C);
       if (Subtarget->hasV6T2Ops() && isUInt<16>(CI->getZExtValue())) {
    +    EVT SrcVT = MVT::i32;
         unsigned Opc = isThumb ? ARM::t2MOVi16 : ARM::MOVi16;
    -    unsigned ImmReg = createResultReg(TLI.getRegClassFor(VT));
    +    unsigned ImmReg = createResultReg(TLI.getRegClassFor(SrcVT));
         AddOptionalDefs(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
                                 TII.get(Opc), ImmReg)
                         .addImm(CI->getSExtValue()));
    
    
    
    From eli.friedman at gmail.com  Fri Nov  4 18:46:11 2011
    From: eli.friedman at gmail.com (Eli Friedman)
    Date: Fri, 04 Nov 2011 23:46:11 -0000
    Subject: [llvm-commits] [llvm] r143750 - in /llvm/trunk:
     lib/Target/X86/X86VZeroUpper.cpp test/CodeGen/X86/avx-vzeroupper.ll
    Message-ID: <20111104234612.08C762A6C12C@llvm.org>
    
    Author: efriedma
    Date: Fri Nov  4 18:46:11 2011
    New Revision: 143750
    
    URL: http://llvm.org/viewvc/llvm-project?rev=143750&view=rev
    Log:
    Enhanced vzeroupper insertion pass that avoids inserting vzeroupper where it is unnecessary through local analysis.  Patch from Bruno Cardoso Lopes, with some additional changes.
    
    I'm going to wait for any review comments and perform some additional testing before turning this on by default.
    
    
    Modified:
        llvm/trunk/lib/Target/X86/X86VZeroUpper.cpp
        llvm/trunk/test/CodeGen/X86/avx-vzeroupper.ll
    
    Modified: llvm/trunk/lib/Target/X86/X86VZeroUpper.cpp
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86VZeroUpper.cpp?rev=143750&r1=143749&r2=143750&view=diff
    ==============================================================================
    --- llvm/trunk/lib/Target/X86/X86VZeroUpper.cpp (original)
    +++ llvm/trunk/lib/Target/X86/X86VZeroUpper.cpp Fri Nov  4 18:46:11 2011
    @@ -14,14 +14,16 @@
     //
     //===----------------------------------------------------------------------===//
     
    -#define DEBUG_TYPE "x86-codegen"
    +#define DEBUG_TYPE "x86-vzeroupper"
     #include "X86.h"
     #include "X86InstrInfo.h"
     #include "llvm/ADT/Statistic.h"
     #include "llvm/CodeGen/MachineFunctionPass.h"
     #include "llvm/CodeGen/MachineInstrBuilder.h"
    +#include "llvm/CodeGen/MachineRegisterInfo.h"
     #include "llvm/CodeGen/Passes.h"
    -#include "llvm/GlobalValue.h"
    +#include "llvm/Support/Debug.h"
    +#include "llvm/Support/raw_ostream.h"
     #include "llvm/Target/TargetInstrInfo.h"
     using namespace llvm;
     
    @@ -41,6 +43,60 @@
       private:
         const TargetInstrInfo *TII; // Machine instruction info.
         MachineBasicBlock *MBB;     // Current basic block
    +
    +    // Any YMM register live-in to this function?
    +    bool FnHasLiveInYmm;
    +
    +    // BBState - Contains the state of each MBB: unknown, clean, dirty
    +    SmallVector BBState;
    +
    +    // BBSolved - Keep track of all MBB which had been already analyzed
    +    // and there is no further processing required.
    +    BitVector BBSolved;
    +
    +    // Machine Basic Blocks are classified according this pass:
    +    //
    +    //  ST_UNKNOWN - The MBB state is unknown, meaning from the entry state
    +    //    until the MBB exit there isn't a instruction using YMM to change
    +    //    the state to dirty, or one of the incoming predecessors is unknown
    +    //    and there's not a dirty predecessor between them.
    +    //
    +    //  ST_CLEAN - No YMM usage in the end of the MBB. A MBB could have
    +    //    instructions using YMM and be marked ST_CLEAN, as long as the state
    +    //    is cleaned by a vzeroupper before any call.
    +    //
    +    //  ST_DIRTY - Any MBB ending with a YMM usage not cleaned up by a
    +    //    vzeroupper instruction.
    +    //
    +    //  ST_INIT - Placeholder for an empty state set
    +    //
    +    enum {
    +      ST_UNKNOWN = 0,
    +      ST_CLEAN   = 1,
    +      ST_DIRTY   = 2,
    +      ST_INIT    = 3
    +    };
    +
    +    // computeState - Given two states, compute the resulting state, in
    +    // the following way
    +    //
    +    //  1) One dirty state yields another dirty state
    +    //  2) All states must be clean for the result to be clean
    +    //  3) If none above and one unknown, the result state is also unknown
    +    //
    +    unsigned computeState(unsigned PrevState, unsigned CurState) {
    +      if (PrevState == ST_INIT)
    +        return CurState;
    +
    +      if (PrevState == ST_DIRTY || CurState == ST_DIRTY)
    +        return ST_DIRTY;
    +
    +      if (PrevState == ST_CLEAN && CurState == ST_CLEAN)
    +        return ST_CLEAN;
    +
    +      return ST_UNKNOWN;
    +    }
    +
       };
       char VZeroUpperInserter::ID = 0;
     }
    @@ -49,57 +105,181 @@
       return new VZeroUpperInserter();
     }
     
    -/// runOnMachineFunction - Loop over all of the basic blocks, inserting
    -/// vzero upper instructions before function calls.
    -bool VZeroUpperInserter::runOnMachineFunction(MachineFunction &MF) {
    -  TII = MF.getTarget().getInstrInfo();
    -  bool Changed = false;
    -
    -  // Process any unreachable blocks in arbitrary order now.
    -  for (MachineFunction::iterator BB = MF.begin(), E = MF.end(); BB != E; ++BB)
    -    Changed |= processBasicBlock(MF, *BB);
    +static bool isYmmReg(unsigned Reg) {
    +  if (Reg >= X86::YMM0 && Reg <= X86::YMM15)
    +    return true;
     
    -  return Changed;
    +  return false;
     }
     
    -static bool isCallToModuleFn(const MachineInstr *MI) {
    -  assert(MI->getDesc().isCall() && "Isn't a call instruction");
    +static bool checkFnHasLiveInYmm(MachineRegisterInfo &MRI) {
    +  for (MachineRegisterInfo::livein_iterator I = MRI.livein_begin(),
    +       E = MRI.livein_end(); I != E; ++I)
    +    if (isYmmReg(I->first))
    +      return true;
     
    +  return false;
    +}
    +
    +static bool hasYmmReg(MachineInstr *MI) {
       for (int i = 0, e = MI->getNumOperands(); i != e; ++i) {
         const MachineOperand &MO = MI->getOperand(i);
    -
    -    if (!MO.isGlobal())
    +    if (!MO.isReg())
           continue;
    -
    -    const GlobalValue *GV = MO.getGlobal();
    -    GlobalValue::LinkageTypes LT = GV->getLinkage();
    -    if (GV->isInternalLinkage(LT) || GV->isPrivateLinkage(LT) ||
    -        (GV->isExternalLinkage(LT) && !GV->isDeclaration()))
    +    if (MO.isDebug())
    +      continue;
    +    if (isYmmReg(MO.getReg()))
           return true;
    -
    -    return false;
       }
       return false;
     }
     
    +/// runOnMachineFunction - Loop over all of the basic blocks, inserting
    +/// vzero upper instructions before function calls.
    +bool VZeroUpperInserter::runOnMachineFunction(MachineFunction &MF) {
    +  TII = MF.getTarget().getInstrInfo();
    +  MachineRegisterInfo &MRI = MF.getRegInfo();
    +  bool EverMadeChange = false;
    +
    +  // Fast check: if the function doesn't use any ymm registers, we don't need
    +  // to insert any VZEROUPPER instructions.  This is constant-time, so it is
    +  // cheap in the common case of no ymm use.
    +  bool YMMUsed = false;
    +  TargetRegisterClass *RC = X86::VR256RegisterClass;
    +  for (TargetRegisterClass::iterator i = RC->begin(), e = RC->end();
    +       i != e; i++) {
    +    if (MRI.isPhysRegUsed(*i)) {
    +      YMMUsed = true;
    +      break;
    +    }
    +  }
    +  if (!YMMUsed)
    +    return EverMadeChange;
    +
    +  // Pre-compute the existence of any live-in YMM registers to this function
    +  FnHasLiveInYmm = checkFnHasLiveInYmm(MRI);
    +
    +  assert(BBState.empty());
    +  BBState.resize(MF.getNumBlockIDs(), 0);
    +  BBSolved.resize(MF.getNumBlockIDs(), 0);
    +
    +  // Each BB state depends on all predecessors, loop over until everything
    +  // converges.  (Once we converge, we can implicitly mark everything that is
    +  // still ST_UNKNOWN as ST_CLEAN.)
    +  while (1) {
    +    bool MadeChange = false;
    +
    +    // Process all basic blocks.
    +    for (MachineFunction::iterator I = MF.begin(), E = MF.end(); I != E; ++I)
    +      MadeChange |= processBasicBlock(MF, *I);
    +
    +    // If this iteration over the code changed anything, keep iterating.
    +    if (!MadeChange) break;
    +    EverMadeChange = true;
    +  }
    +
    +  BBState.clear();
    +  BBSolved.clear();
    +  return EverMadeChange;
    +}
    +
     /// processBasicBlock - Loop over all of the instructions in the basic block,
     /// inserting vzero upper instructions before function calls.
     bool VZeroUpperInserter::processBasicBlock(MachineFunction &MF,
                                                MachineBasicBlock &BB) {
       bool Changed = false;
    +  unsigned BBNum = BB.getNumber();
       MBB = &BB;
     
    +  // Don't process already solved BBs
    +  if (BBSolved[BBNum])
    +    return false; // No changes
    +
    +  // Check the state of all predecessors
    +  unsigned EntryState = ST_INIT;
    +  for (MachineBasicBlock::const_pred_iterator PI = BB.pred_begin(),
    +       PE = BB.pred_end(); PI != PE; ++PI) {
    +    EntryState = computeState(EntryState, BBState[(*PI)->getNumber()]);
    +    if (EntryState == ST_DIRTY)
    +      break;
    +  }
    +
    +
    +  // The entry MBB for the function may set the inital state to dirty if
    +  // the function receives any YMM incoming arguments
    +  if (MBB == MF.begin()) {
    +    EntryState = ST_CLEAN;
    +    if (FnHasLiveInYmm)
    +      EntryState = ST_DIRTY;
    +  }
    +
    +  // The current state is initialized according to the predecessors
    +  unsigned CurState = EntryState;
    +  bool BBHasCall = false;
    +
       for (MachineBasicBlock::iterator I = BB.begin(); I != BB.end(); ++I) {
         MachineInstr *MI = I;
         DebugLoc dl = I->getDebugLoc();
    +    bool isControlFlow = MI->getDesc().isCall() || MI->getDesc().isReturn();
    +
    +    // Shortcut: don't need to check regular instructions in dirty state. 
    +    if (!isControlFlow && CurState == ST_DIRTY)
    +      continue;
     
    -    // Insert a vzeroupper instruction before each control transfer
    -    // to functions outside this module
    -    if (MI->getDesc().isCall() && !isCallToModuleFn(MI)) {
    -      BuildMI(*MBB, I, dl, TII->get(X86::VZEROUPPER));
    -      ++NumVZU;
    +    if (hasYmmReg(MI)) {
    +      // We found a ymm-using instruction; this could be an AVX instruction,
    +      // or it could be control flow.
    +      CurState = ST_DIRTY;
    +      continue;
    +    }
    +
    +    // Check for control-flow out of the current function (which might
    +    // indirectly execute SSE instructions).
    +    if (!isControlFlow)
    +      continue;
    +
    +    BBHasCall = true;
    +
    +    // The VZEROUPPER instruction resets the upper 128 bits of all Intel AVX
    +    // registers. This instruction has zero latency. In addition, the processor
    +    // changes back to Clean state, after which execution of Intel SSE
    +    // instructions or Intel AVX instructions has no transition penalty. Add
    +    // the VZEROUPPER instruction before any function call/return that might
    +    // execute SSE code.
    +    // FIXME: In some cases, we may want to move the VZEROUPPER into a
    +    // predecessor block.
    +    if (CurState == ST_DIRTY) {
    +      // Only insert the VZEROUPPER in case the entry state isn't unknown.
    +      // When unknown, only compute the information within the block to have
    +      // it available in the exit if possible, but don't change the block.
    +      if (EntryState != ST_UNKNOWN) {
    +        BuildMI(*MBB, I, dl, TII->get(X86::VZEROUPPER));
    +        ++NumVZU;
    +      }
    +
    +      // After the inserted VZEROUPPER the state becomes clean again, but
    +      // other YMM may appear before other subsequent calls or even before
    +      // the end of the BB.
    +      CurState = ST_CLEAN;
         }
       }
     
    +  DEBUG(dbgs() << "MBB #" << BBNum
    +               << ", current state: " << CurState << '\n');
    +
    +  // A BB can only be considered solved when we both have done all the
    +  // necessary transformations, and have computed the exit state.  This happens
    +  // in two cases:
    +  //  1) We know the entry state: this immediately implies the exit state and
    +  //     all the necessary transformations.
    +  //  2) There are no calls, and and a non-call instruction marks this block:
    +  //     no transformations are necessary, and we know the exit state.
    +  if (EntryState != ST_UNKNOWN || (!BBHasCall && CurState != ST_UNKNOWN))
    +    BBSolved[BBNum] = true;
    +
    +  if (CurState != BBState[BBNum])
    +    Changed = true;
    +
    +  BBState[BBNum] = CurState;
       return Changed;
     }
    
    Modified: llvm/trunk/test/CodeGen/X86/avx-vzeroupper.ll
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx-vzeroupper.ll?rev=143750&r1=143749&r2=143750&view=diff
    ==============================================================================
    --- llvm/trunk/test/CodeGen/X86/avx-vzeroupper.ll (original)
    +++ llvm/trunk/test/CodeGen/X86/avx-vzeroupper.ll Fri Nov  4 18:46:11 2011
    @@ -1,26 +1,83 @@
     ; RUN: llc < %s -x86-use-vzeroupper -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -mattr=+avx | FileCheck %s
     
    -define <4 x float> @do_sse_local(<4 x float> %a) nounwind uwtable readnone ssp {
    -entry:
    -  %add.i = fadd <4 x float> %a, %a
    -  ret <4 x float> %add.i
    -}
    +declare <4 x float> @do_sse(<4 x float>)
    +declare <8 x float> @do_avx(<8 x float>)
    +declare <4 x float> @llvm.x86.avx.vextractf128.ps.256(<8 x float>, i8) nounwind readnone
    + at x = common global <4 x float> zeroinitializer, align 16
    + at g = common global <8 x float> zeroinitializer, align 32
    +
    +;; Basic checking - don't emit any vzeroupper instruction
     
     ; CHECK: _test00
     define <4 x float> @test00(<4 x float> %a, <4 x float> %b) nounwind uwtable ssp {
     entry:
    +  ; CHECK-NOT: vzeroupper
       %add.i = fadd <4 x float> %a, %b
    +  %call3 = call <4 x float> @do_sse(<4 x float> %add.i) nounwind
    +  ; CHECK: ret
    +  ret <4 x float> %call3
    +}
    +
    +;; Check parameter 256-bit parameter passing
    +
    +; CHECK: _test01
    +define <8 x float> @test01(<4 x float> %a, <4 x float> %b, <8 x float> %c) nounwind uwtable ssp {
    +entry:
    +  %tmp = load <4 x float>* @x, align 16
       ; CHECK: vzeroupper
       ; CHECK-NEXT: callq _do_sse
    -  %call3 = tail call <4 x float> @do_sse(<4 x float> %add.i) nounwind
    -  %sub.i = fsub <4 x float> %call3, %add.i
    +  %call = tail call <4 x float> @do_sse(<4 x float> %tmp) nounwind
    +  store <4 x float> %call, <4 x float>* @x, align 16
       ; CHECK-NOT: vzeroupper
    -  ; CHECK: callq _do_sse_local
    -  %call8 = tail call <4 x float> @do_sse_local(<4 x float> %sub.i)
    +  ; CHECK: callq _do_sse
    +  %call2 = tail call <4 x float> @do_sse(<4 x float> %call) nounwind
    +  store <4 x float> %call2, <4 x float>* @x, align 16
    +  ; CHECK: ret
    +  ret <8 x float> %c
    +}
    +
    +;; Test the pass convergence and also that vzeroupper is only issued when necessary,
    +;; for this function it should be only once
    +
    +; CHECK: _test02
    +define <4 x float> @test02(<4 x float> %a, <4 x float> %b) nounwind uwtable ssp {
    +entry:
    +  %add.i = fadd <4 x float> %a, %b
    +  br label %for.body
    +
    +for.body:                                         ; preds = %for.body, %entry
    +  ; CHECK: LBB
    +  ; CHECK-NOT: vzeroupper
    +  %i.018 = phi i32 [ 0, %entry ], [ %1, %for.body ]
    +  %c.017 = phi <4 x float> [ %add.i, %entry ], [ %call14, %for.body ]
    +  ; CHECK: callq _do_sse
    +  %call5 = tail call <4 x float> @do_sse(<4 x float> %c.017) nounwind
    +  ; CHECK-NEXT: callq _do_sse
    +  %call7 = tail call <4 x float> @do_sse(<4 x float> %call5) nounwind
    +  %tmp11 = load <8 x float>* @g, align 32
    +  %0 = tail call <4 x float> @llvm.x86.avx.vextractf128.ps.256(<8 x float> %tmp11, i8 1) nounwind
       ; CHECK: vzeroupper
    -  ; CHECK-NEXT: jmp _do_sse
    -  %call10 = tail call <4 x float> @do_sse(<4 x float> %call8) nounwind
    -  ret <4 x float> %call10
    +  ; CHECK-NEXT: callq _do_sse
    +  %call14 = tail call <4 x float> @do_sse(<4 x float> %0) nounwind
    +  %1 = add nsw i32 %i.018, 1
    +  %exitcond = icmp eq i32 %1, 4
    +  br i1 %exitcond, label %for.end, label %for.body
    +
    +for.end:                                          ; preds = %for.body
    +  ret <4 x float> %call14
     }
     
    -declare <4 x float> @do_sse(<4 x float>)
    +;; Check that we also perform vzeroupper when we return from a function.
    +
    +; CHECK: _test03
    +define <4 x float> @test03(<4 x float> %a, <4 x float> %b) nounwind uwtable ssp {
    +entry:
    +  %shuf = shufflevector <4 x float> %a, <4 x float> %b, <8 x i32> 
    +  ; CHECK-NOT: vzeroupper
    +  ; CHECK: call
    +  %call = call <8 x float> @do_avx(<8 x float> %shuf) nounwind
    +  %shuf2 = shufflevector <8 x float> %call, <8 x float> undef, <4 x i32> 
    +  ; CHECK: vzeroupper
    +  ; CHECK: ret
    +  ret <4 x float> %shuf2
    +}
    
    
    
    From peter_cooper at apple.com  Fri Nov  4 18:49:15 2011
    From: peter_cooper at apple.com (Pete Cooper)
    Date: Fri, 04 Nov 2011 23:49:15 -0000
    Subject: [llvm-commits] [llvm] r143753 -
    	/llvm/trunk/lib/CodeGen/IfConversion.cpp
    Message-ID: <20111104234915.183A72A6C12C@llvm.org>
    
    Author: pete
    Date: Fri Nov  4 18:49:14 2011
    New Revision: 143753
    
    URL: http://llvm.org/viewvc/llvm-project?rev=143753&view=rev
    Log:
    Added missing &.  Fixes 
    
    Modified:
        llvm/trunk/lib/CodeGen/IfConversion.cpp
    
    Modified: llvm/trunk/lib/CodeGen/IfConversion.cpp
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/IfConversion.cpp?rev=143753&r1=143752&r2=143753&view=diff
    ==============================================================================
    --- llvm/trunk/lib/CodeGen/IfConversion.cpp (original)
    +++ llvm/trunk/lib/CodeGen/IfConversion.cpp Fri Nov  4 18:49:14 2011
    @@ -1319,7 +1319,7 @@
       // fold the tail block in as well. Otherwise, unless it falls through to the
       // tail, add a unconditional branch to it.
       if (TailBB) {
    -    BBInfo TailBBI = BBAnalysis[TailBB->getNumber()];
    +    BBInfo &TailBBI = BBAnalysis[TailBB->getNumber()];
         bool CanMergeTail = !TailBBI.HasFallThrough;
         // There may still be a fall-through edge from BBI1 or BBI2 to TailBB;
         // check if there are any other predecessors besides those.
    
    
    
    From evan.cheng at apple.com  Fri Nov  4 18:55:06 2011
    From: evan.cheng at apple.com (Evan Cheng)
    Date: Fri, 04 Nov 2011 16:55:06 -0700
    Subject: [llvm-commits] [llvm] r143753 -
     /llvm/trunk/lib/CodeGen/IfConversion.cpp
    In-Reply-To: <20111104234915.183A72A6C12C@llvm.org>
    References: <20111104234915.183A72A6C12C@llvm.org>
    Message-ID: <4AFBFB5D-AB18-464C-AAEB-3987ADB8E7CF@apple.com>
    
    Thanks. Is it possible to add a reduced test case?
    
    Evan
    
    On Nov 4, 2011, at 4:49 PM, Pete Cooper wrote:
    
    > Author: pete
    > Date: Fri Nov  4 18:49:14 2011
    > New Revision: 143753
    > 
    > URL: http://llvm.org/viewvc/llvm-project?rev=143753&view=rev
    > Log:
    > Added missing &.  Fixes 
    > 
    > Modified:
    >    llvm/trunk/lib/CodeGen/IfConversion.cpp
    > 
    > Modified: llvm/trunk/lib/CodeGen/IfConversion.cpp
    > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/IfConversion.cpp?rev=143753&r1=143752&r2=143753&view=diff
    > ==============================================================================
    > --- llvm/trunk/lib/CodeGen/IfConversion.cpp (original)
    > +++ llvm/trunk/lib/CodeGen/IfConversion.cpp Fri Nov  4 18:49:14 2011
    > @@ -1319,7 +1319,7 @@
    >   // fold the tail block in as well. Otherwise, unless it falls through to the
    >   // tail, add a unconditional branch to it.
    >   if (TailBB) {
    > -    BBInfo TailBBI = BBAnalysis[TailBB->getNumber()];
    > +    BBInfo &TailBBI = BBAnalysis[TailBB->getNumber()];
    >     bool CanMergeTail = !TailBBI.HasFallThrough;
    >     // There may still be a fall-through edge from BBI1 or BBI2 to TailBB;
    >     // check if there are any other predecessors besides those.
    > 
    > 
    > _______________________________________________
    > llvm-commits mailing list
    > llvm-commits at cs.uiuc.edu
    > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
    
    
    From peter_cooper at apple.com  Fri Nov  4 18:55:45 2011
    From: peter_cooper at apple.com (Peter Cooper)
    Date: Fri, 04 Nov 2011 16:55:45 -0700
    Subject: [llvm-commits] [llvm] r143753 -
     /llvm/trunk/lib/CodeGen/IfConversion.cpp
    In-Reply-To: <4AFBFB5D-AB18-464C-AAEB-3987ADB8E7CF@apple.com>
    References: <20111104234915.183A72A6C12C@llvm.org>
    	<4AFBFB5D-AB18-464C-AAEB-3987ADB8E7CF@apple.com>
    Message-ID: 
    
    Hope so.  Just trying to come up with one now
    
    Pete
    
    On Nov 4, 2011, at 4:55 PM, Evan Cheng wrote:
    
    > Thanks. Is it possible to add a reduced test case?
    > 
    > Evan
    > 
    > On Nov 4, 2011, at 4:49 PM, Pete Cooper wrote:
    > 
    >> Author: pete
    >> Date: Fri Nov  4 18:49:14 2011
    >> New Revision: 143753
    >> 
    >> URL: http://llvm.org/viewvc/llvm-project?rev=143753&view=rev
    >> Log:
    >> Added missing &.  Fixes 
    >> 
    >> Modified:
    >>   llvm/trunk/lib/CodeGen/IfConversion.cpp
    >> 
    >> Modified: llvm/trunk/lib/CodeGen/IfConversion.cpp
    >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/IfConversion.cpp?rev=143753&r1=143752&r2=143753&view=diff
    >> ==============================================================================
    >> --- llvm/trunk/lib/CodeGen/IfConversion.cpp (original)
    >> +++ llvm/trunk/lib/CodeGen/IfConversion.cpp Fri Nov  4 18:49:14 2011
    >> @@ -1319,7 +1319,7 @@
    >>  // fold the tail block in as well. Otherwise, unless it falls through to the
    >>  // tail, add a unconditional branch to it.
    >>  if (TailBB) {
    >> -    BBInfo TailBBI = BBAnalysis[TailBB->getNumber()];
    >> +    BBInfo &TailBBI = BBAnalysis[TailBB->getNumber()];
    >>    bool CanMergeTail = !TailBBI.HasFallThrough;
    >>    // There may still be a fall-through edge from BBI1 or BBI2 to TailBB;
    >>    // check if there are any other predecessors besides those.
    >> 
    >> 
    >> _______________________________________________
    >> llvm-commits mailing list
    >> llvm-commits at cs.uiuc.edu
    >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
    > 
    
    
    From lhames at gmail.com  Fri Nov  4 18:58:45 2011
    From: lhames at gmail.com (Lang Hames)
    Date: Fri, 4 Nov 2011 16:58:45 -0700
    Subject: [llvm-commits] [PATCH] Smarter unaligned stores of constant
    	values.
    In-Reply-To: 
    References: 
    	
    Message-ID: 
    
    Thanks Eli! Looking into SimplifyDemandedBits now...
    
    Cheers,
    Lang.
    
    On Fri, Nov 4, 2011 at 4:41 PM, Eli Friedman  wrote:
    
    > On Fri, Nov 4, 2011 at 4:30 PM, Lang Hames  wrote:
    > > Encountered the following when I tried outputting an unaligned store of
    > -1
    > > on ARM:
    > > _foo:                                   @ @foo
    > > @ BB#0:                                 @ %entry
    > >         mov     r1, #255
    > >         mov     r2, #255
    > >         strb    r1, [r0, #3]
    > >         orr     r1, r2, #65280
    > >         strb    r1, [r0, #2]
    > >         mvn     r1, #-16777216
    > >         strb    r1, [r0, #1]
    > >         mvn     r1, #0
    > >         strb    r1, [r0]
    > >         mov     pc, lr
    > > The strange constants are coming out of the legalizer, which tries to
    > > legalize the unaligned store by repeatedly splitting it into two
    > half-sized
    > > stores, and shifting the constant around. This results in several new and
    > > confusing constants being introduced.
    > > This patch checks for constant value stores, and if the two halves of the
    > > constant have the same bit-pattern it avoids creating new constants.
    > > Could someone who's more familiar with the legalizer take a look and let
    > me
    > > know if this is Ok to commit?  (I'm also planning to enable unaligned
    > stores
    > > on supported subtargets, but that's a different issue)
    >
    > TargetLowering::SimplifyDemandedBits should be able to take care of
    > this; if it can't, it should be fixed.
    >
    > -Eli
    >
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111104/4bf71477/attachment.html 
    
    From mcrosier at apple.com  Fri Nov  4 19:02:56 2011
    From: mcrosier at apple.com (Chad Rosier)
    Date: Sat, 05 Nov 2011 00:02:56 -0000
    Subject: [llvm-commits] [llvm] r143755 -
    	/llvm/trunk/lib/Target/ARM/ARMCallingConv.td
    Message-ID: <20111105000256.ABADD2A6C12C@llvm.org>
    
    Author: mcrosier
    Date: Fri Nov  4 19:02:56 2011
    New Revision: 143755
    
    URL: http://llvm.org/viewvc/llvm-project?rev=143755&view=rev
    Log:
    Allow i1 to be promoted to i32 for ARM APCS calling convention.
    
    Modified:
        llvm/trunk/lib/Target/ARM/ARMCallingConv.td
    
    Modified: llvm/trunk/lib/Target/ARM/ARMCallingConv.td
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMCallingConv.td?rev=143755&r1=143754&r2=143755&view=diff
    ==============================================================================
    --- llvm/trunk/lib/Target/ARM/ARMCallingConv.td (original)
    +++ llvm/trunk/lib/Target/ARM/ARMCallingConv.td Fri Nov  4 19:02:56 2011
    @@ -25,7 +25,7 @@
       // Handles byval parameters.
       CCIfByVal>,
         
    -  CCIfType<[i8, i16], CCPromoteToType>,
    +  CCIfType<[i1, i8, i16], CCPromoteToType>,
     
       // Handle all vector types as either f64 or v2f64.
       CCIfType<[v1i64, v2i32, v4i16, v8i8, v2f32], CCBitConvertToType>,
    
    
    
    From echristo at apple.com  Fri Nov  4 19:41:16 2011
    From: echristo at apple.com (Eric Christopher)
    Date: Fri, 04 Nov 2011 17:41:16 -0700
    Subject: [llvm-commits] [llvm] r143749 -
     /llvm/trunk/lib/Target/ARM/ARMFastISel.cpp
    In-Reply-To: <20111104234539.E9F1F2A6C12C@llvm.org>
    References: <20111104234539.E9F1F2A6C12C@llvm.org>
    Message-ID: <67A3D530-8A2D-4022-9BE2-2344EE0ED5F5@apple.com>
    
    
    On Nov 4, 2011, at 4:45 PM, Chad Rosier wrote:
    
    > +    EVT SrcVT = MVT::i32;
    >     unsigned Opc = isThumb ? ARM::t2MOVi16 : ARM::MOVi16;
    > -    unsigned ImmReg = createResultReg(TLI.getRegClassFor(VT));
    > +    unsigned ImmReg = createResultReg(TLI.getRegClassFor(SrcVT));
    
    There's a lot of code that uses this construct as well:
    
    TargetRegisterClass *RC = isThumb?ARM::rGPRRegisterClass
                                            		    :ARM::GPRRegisterClass;
    
    Yours is likely shorter if we wanted to change all of them :)
    
    -eric
    
    
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111104/ef658493/attachment.html 
    
    From daniel at zuster.org  Fri Nov  4 23:07:44 2011
    From: daniel at zuster.org (Daniel Dunbar)
    Date: Sat, 05 Nov 2011 04:07:44 -0000
    Subject: [llvm-commits] [llvm] r143781 -
    	/llvm/trunk/utils/llvm-build/llvmbuild/main.py
    Message-ID: <20111105040744.3CFAA2A6C12C@llvm.org>
    
    Author: ddunbar
    Date: Fri Nov  4 23:07:43 2011
    New Revision: 143781
    
    URL: http://llvm.org/viewvc/llvm-project?rev=143781&view=rev
    Log:
    utils/llvm-build: Add trivial quoting of slashes for CMake fragment.
    
    Modified:
        llvm/trunk/utils/llvm-build/llvmbuild/main.py
    
    Modified: llvm/trunk/utils/llvm-build/llvmbuild/main.py
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvm-build/llvmbuild/main.py?rev=143781&r1=143780&r2=143781&view=diff
    ==============================================================================
    --- llvm/trunk/utils/llvm-build/llvmbuild/main.py (original)
    +++ llvm/trunk/utils/llvm-build/llvmbuild/main.py Fri Nov  4 23:07:43 2011
    @@ -7,6 +7,19 @@
     
     ###
     
    +def cmake_quote_string(value):
    +    """
    +    cmake_quote_string(value) -> str
    +
    +    Return a quoted form of the given value that is suitable for use in CMake
    +    language files.
    +    """
    +
    +    # Currently, we only handle escaping backslashes.
    +    value = value.replace("\\", "\\\\")
    +
    +    return value
    +
     def mk_quote_string_for_target(value):
         """
         mk_quote_string_for_target(target_name) -> str
    @@ -388,8 +401,9 @@
             for dep in dependencies:
                 print >>f, """\
     configure_file(\"%s\"
    -               ${CMAKE_CURRENT_BINARY_DIR}/DummyConfigureOutput)""" % (dep,)
    -            
    +               ${CMAKE_CURRENT_BINARY_DIR}/DummyConfigureOutput)""" % (
    +                cmake_quote_string(dep),)
    +
             f.close()
     
         def write_make_fragment(self, output_path):
    
    
    
    From daniel at zuster.org  Fri Nov  4 23:07:49 2011
    From: daniel at zuster.org (Daniel Dunbar)
    Date: Sat, 05 Nov 2011 04:07:49 -0000
    Subject: [llvm-commits] [llvm] r143782 -
    	/llvm/trunk/utils/llvm-build/llvmbuild/main.py
    Message-ID: <20111105040749.481B02A6C12C@llvm.org>
    
    Author: ddunbar
    Date: Fri Nov  4 23:07:49 2011
    New Revision: 143782
    
    URL: http://llvm.org/viewvc/llvm-project?rev=143782&view=rev
    Log:
    utils/llvm-build: Ensure output directory exists for tools which write various fragments.
    
    Modified:
        llvm/trunk/utils/llvm-build/llvmbuild/main.py
    
    Modified: llvm/trunk/utils/llvm-build/llvmbuild/main.py
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvm-build/llvmbuild/main.py?rev=143782&r1=143781&r2=143782&view=diff
    ==============================================================================
    --- llvm/trunk/utils/llvm-build/llvmbuild/main.py (original)
    +++ llvm/trunk/utils/llvm-build/llvmbuild/main.py Fri Nov  4 23:07:49 2011
    @@ -31,6 +31,17 @@
         # The only quoting we currently perform is for ':', to support msys users.
         return value.replace(":", "\\:")
     
    +def make_install_dir(path):
    +    """
    +    make_install_dir(path) -> None
    +
    +    Create the given directory path for installation, including any parents.
    +    """
    +
    +    # os.makedirs considers it an error to be called with an existant path.
    +    if not os.path.exists(path):
    +        os.makedirs(path)
    +
     ###
     
     class LLVMProjectInfo(object):
    @@ -276,6 +287,7 @@
                                          for _,_,deps in entries) + 1
     
             # Write out the library table.
    +        make_install_dir(os.path.dirname(output_path))
             f = open(output_path, 'w')
             print >>f, """\
     //===- llvm-build generated file --------------------------------*- C++ -*-===//
    @@ -360,6 +372,7 @@
             dependencies = list(self.get_fragment_dependencies())
     
             # Write out the CMake fragment.
    +        make_install_dir(os.path.dirname(output_path))
             f = open(output_path, 'w')
     
             # Write the header.
    @@ -419,6 +432,7 @@
             dependencies = list(self.get_fragment_dependencies())
     
             # Write out the Makefile fragment.
    +        make_install_dir(os.path.dirname(output_path))
             f = open(output_path, 'w')
     
             # Write the header.
    
    
    
    From peter at pcc.me.uk  Fri Nov  4 23:17:20 2011
    From: peter at pcc.me.uk (Peter Collingbourne)
    Date: Sat, 05 Nov 2011 04:17:20 -0000
    Subject: [llvm-commits] [llvm] r143783 -
    	/llvm/trunk/tools/gold/CMakeLists.txt
    Message-ID: <20111105041721.020B32A6C12C@llvm.org>
    
    Author: pcc
    Date: Fri Nov  4 23:17:20 2011
    New Revision: 143783
    
    URL: http://llvm.org/viewvc/llvm-project?rev=143783&view=rev
    Log:
    Use absolute path to exportsfile in gold plugin CMake build.
    
    (Ninja generator requirement.)
    
    Modified:
        llvm/trunk/tools/gold/CMakeLists.txt
    
    Modified: llvm/trunk/tools/gold/CMakeLists.txt
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/gold/CMakeLists.txt?rev=143783&r1=143782&r2=143783&view=diff
    ==============================================================================
    --- llvm/trunk/tools/gold/CMakeLists.txt (original)
    +++ llvm/trunk/tools/gold/CMakeLists.txt Fri Nov  4 23:17:20 2011
    @@ -40,6 +40,7 @@
       set_property(SOURCE gold-plugin.cpp APPEND PROPERTY
         OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/exportsfile)
     
    -  target_link_libraries(LLVMgold LTO -Wl,--version-script,exportsfile)
    +  target_link_libraries(LLVMgold LTO
    +                   -Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/exportsfile)
       add_dependencies(LLVMgold gold_exports)
     endif()
    
    
    
    From peter at pcc.me.uk  Fri Nov  4 23:17:25 2011
    From: peter at pcc.me.uk (Peter Collingbourne)
    Date: Sat, 05 Nov 2011 04:17:25 -0000
    Subject: [llvm-commits] [llvm] r143784 -
    	/llvm/trunk/tools/lto/LTOCodeGenerator.cpp
    Message-ID: <20111105041725.89C8F2A6C12C@llvm.org>
    
    Author: pcc
    Date: Fri Nov  4 23:17:25 2011
    New Revision: 143784
    
    URL: http://llvm.org/viewvc/llvm-project?rev=143784&view=rev
    Log:
    Now that the linker supports lazily materialising globals, don't
    materialise them in LTO.
    
    I observed a ~0.5-1% speedup for an LTO link of opt.
    
    Modified:
        llvm/trunk/tools/lto/LTOCodeGenerator.cpp
    
    Modified: llvm/trunk/tools/lto/LTOCodeGenerator.cpp
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/LTOCodeGenerator.cpp?rev=143784&r1=143783&r2=143784&view=diff
    ==============================================================================
    --- llvm/trunk/tools/lto/LTOCodeGenerator.cpp (original)
    +++ llvm/trunk/tools/lto/LTOCodeGenerator.cpp Fri Nov  4 23:17:25 2011
    @@ -90,10 +90,6 @@
     
     bool LTOCodeGenerator::addModule(LTOModule* mod, std::string& errMsg)
     {
    -
    -  if(mod->getLLVVMModule()->MaterializeAllPermanently(&errMsg))
    -    return true;
    -
       bool ret = _linker.LinkInModule(mod->getLLVVMModule(), &errMsg);
     
       const std::vector &undefs = mod->getAsmUndefinedRefs();
    
    
    
    From peter at pcc.me.uk  Fri Nov  4 23:17:28 2011
    From: peter at pcc.me.uk (Peter Collingbourne)
    Date: Sat, 05 Nov 2011 04:17:28 -0000
    Subject: [llvm-commits] [llvm] r143785 - /llvm/trunk/docs/GoldPlugin.html
    Message-ID: <20111105041729.061522A6C12C@llvm.org>
    
    Author: pcc
    Date: Fri Nov  4 23:17:28 2011
    New Revision: 143785
    
    URL: http://llvm.org/viewvc/llvm-project?rev=143785&view=rev
    Log:
    Recommend the -flto flag instead of -use-gold-plugin, and update
    other aspects of the gold plugin docs to reflect reality.
    
    Modified:
        llvm/trunk/docs/GoldPlugin.html
    
    Modified: llvm/trunk/docs/GoldPlugin.html
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/GoldPlugin.html?rev=143785&r1=143784&r2=143785&view=diff
    ==============================================================================
    --- llvm/trunk/docs/GoldPlugin.html (original)
    +++ llvm/trunk/docs/GoldPlugin.html Fri Nov  4 23:17:28 2011
    @@ -89,11 +89,11 @@
       -emit-llvm or -flto, or the -O4 flag which is
       synonymous with -O3 -flto.

    -

    Clang has a -use-gold-plugin option which looks for the - gold plugin in the same directories as it looks for cc1 and passes - the -plugin option to ld. It will not look for an alternate - linker, which is why you need gold to be the installed system linker in your - path.

    +

    Any of these flags will also cause clang to look for the + gold plugin in the lib directory under its prefix and pass the + -plugin option to ld. It will not look for an alternate + linker, which is why you need gold to be the installed system linker in + your path.

    If you want ar and nm to work seamlessly as well, install LLVMgold.so to /usr/lib/bfd-plugins. If you built your @@ -141,10 +141,10 @@ } --- command lines --- -$ clang -flto a.c -c -o a.o # <-- a.o is LLVM bitcode file -$ ar q a.a a.o # <-- a.a is an archive with LLVM bitcode -$ clang b.c -c -o b.o # <-- b.o is native object file -$ clang -use-gold-plugin a.a b.o -o main # <-- link with LLVMgold plugin +$ clang -flto a.c -c -o a.o # <-- a.o is LLVM bitcode file +$ ar q a.a a.o # <-- a.a is an archive with LLVM bitcode +$ clang b.c -c -o b.o # <-- b.o is native object file +$ clang -flto a.a b.o -o main # <-- link with LLVMgold plugin

    Gold informs the plugin that foo3 is never referenced outside the IR, @@ -171,13 +171,12 @@

  • Follow the instructions on how to build LLVMgold.so.
  • Install the newly built binutils to $PREFIX
  • Copy Release/lib/LLVMgold.so to - $PREFIX/libexec/gcc/x86_64-unknown-linux-gnu/4.2.1/ and $PREFIX/lib/bfd-plugins/
  • Set environment variables ($PREFIX is where you installed clang and binutils):
    -export CC="$PREFIX/bin/clang -use-gold-plugin"
    -export CXX="$PREFIX/bin/clang++ -use-gold-plugin"
    +export CC="$PREFIX/bin/clang -flto"
    +export CXX="$PREFIX/bin/clang++ -flto"
     export AR="$PREFIX/bin/ar"
     export NM="$PREFIX/bin/nm"
     export RANLIB=/bin/true #ranlib is not needed, and doesn't support .bc files in .a
    @@ -187,8 +186,8 @@
          
  • Or you can just set your path:
     export PATH="$PREFIX/bin:$PATH"
    -export CC="clang -use-gold-plugin"
    -export CXX="clang++ -use-gold-plugin"
    +export CC="clang -flto"
    +export CXX="clang++ -flto"
     export RANLIB=/bin/true
     export CFLAGS="-O4"
     
  • From daniel at zuster.org Sat Nov 5 01:30:03 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Sat, 05 Nov 2011 06:30:03 -0000 Subject: [llvm-commits] [llvm] r143793 - /llvm/trunk/CMakeLists.txt Message-ID: <20111105063004.01E052A6C12C@llvm.org> Author: ddunbar Date: Sat Nov 5 01:30:03 2011 New Revision: 143793 URL: http://llvm.org/viewvc/llvm-project?rev=143793&view=rev Log: build/cmake: Enable initial llvm-build integration. - Generates the llvm-config-2 LibraryDependencies.inc file. - Generates dependency information so that cmake will automatically reconfigure when LLVMBuild.txt files are changed. Modified: llvm/trunk/CMakeLists.txt Modified: llvm/trunk/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=143793&r1=143792&r2=143793&view=diff ============================================================================== --- llvm/trunk/CMakeLists.txt (original) +++ llvm/trunk/CMakeLists.txt Sat Nov 5 01:30:03 2011 @@ -214,6 +214,54 @@ Please install Python or specify the PYTHON_EXECUTABLE CMake variable.") endif() +###### +# LLVMBuild Integration +# +# We use llvm-build to generate all the data required by the CMake based +# build system in one swoop: +# +# - We generate a file (a CMake fragment) in the object root which contains +# all the definitions that are required by CMake. +# +# - We generate the library table used by llvm-config. +# +# - We generate the dependencies for the CMake fragment, so that we will +# automatically reconfigure outselves. + +set(LLVMBUILDTOOL "${LLVM_MAIN_SRC_DIR}/utils/llvm-build/llvm-build") +set(LLVMCONFIGLIBRARYDEPENDENCIESINC + "${LLVM_BINARY_DIR}/tools/llvm-config-2/LibraryDependencies.inc") +set(LLVMBUILDCMAKEFRAG + "${LLVM_BINARY_DIR}/LLVMBuild.cmake") +message(STATUS "Constructing LLVMBuild project information") +execute_process( + COMMAND ${PYTHON_EXECUTABLE} ${LLVMBUILDTOOL} + --write-library-table ${LLVMCONFIGLIBRARYDEPENDENCIESINC} + --write-cmake-fragment ${LLVMBUILDCMAKEFRAG} + ERROR_VARIABLE LLVMBUILDOUTPUT + ERROR_VARIABLE LLVMBUILDERRORS + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE + RESULT_VARIABLE LLVMBUILDRESULT) + +# On Win32, CMake doesn't properly handle piping the default output/error +# streams into the GUI console. So, we explicitly catch and report them. +if( NOT "${LLVMBUILDOUTPUT}" STREQUAL "") + message(STATUS "llvm-build output: ${LLVMBUILDOUTPUT}") +endif() +if( NOT "${LLVMBUILDRESULT}" STREQUAL "0" ) + message(FATAL_ERROR + "Unexpected failure executing llvm-build: ${LLVMBUILDERRORS}") +endif() + +# Include the generated CMake fragment. This will define properties from the +# LLVMBuild files in a format which is easy to consume from CMake, and will add +# the dependencies so that CMake will reconfigure properly when the LLVMBuild +# files change. +include(${LLVMBUILDCMAKEFRAG}) + +###### + # Configure all of the various header file fragments LLVM uses which depend on # configuration variables. set(LLVM_ENUM_ASM_PRINTERS "") From benny.kra at googlemail.com Sat Nov 5 03:57:41 2011 From: benny.kra at googlemail.com (Benjamin Kramer) Date: Sat, 05 Nov 2011 08:57:41 -0000 Subject: [llvm-commits] [llvm] r143799 - in /llvm/trunk: include/llvm/Support/DataTypes.h.cmake include/llvm/Support/DataTypes.h.in lib/CodeGen/AsmPrinter/AsmPrinter.cpp lib/CodeGen/AsmPrinter/DIE.cpp lib/DebugInfo/DWARFDebugArangeSet.cpp lib/DebugInfo/DWARFDebugAranges.cpp lib/DebugInfo/DWARFDebugLine.cpp lib/DebugInfo/DWARFFormValue.cpp lib/Support/Timer.cpp lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp tools/llvm-objdump/MachODump.cpp tools/llvm-size/llvm-size.cpp Message-ID: <20111105085741.50BB02A6C12C@llvm.org> Author: d0k Date: Sat Nov 5 03:57:40 2011 New Revision: 143799 URL: http://llvm.org/viewvc/llvm-project?rev=143799&view=rev Log: Add more PRI.64 macros for MSVC and use them throughout the codebase. Modified: llvm/trunk/include/llvm/Support/DataTypes.h.cmake llvm/trunk/include/llvm/Support/DataTypes.h.in llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp llvm/trunk/lib/DebugInfo/DWARFDebugArangeSet.cpp llvm/trunk/lib/DebugInfo/DWARFDebugAranges.cpp llvm/trunk/lib/DebugInfo/DWARFDebugLine.cpp llvm/trunk/lib/DebugInfo/DWARFFormValue.cpp llvm/trunk/lib/Support/Timer.cpp llvm/trunk/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp llvm/trunk/tools/llvm-objdump/MachODump.cpp llvm/trunk/tools/llvm-size/llvm-size.cpp Modified: llvm/trunk/include/llvm/Support/DataTypes.h.cmake URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/DataTypes.h.cmake?rev=143799&r1=143798&r2=143799&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/DataTypes.h.cmake (original) +++ llvm/trunk/include/llvm/Support/DataTypes.h.cmake Sat Nov 5 03:57:40 2011 @@ -167,9 +167,24 @@ # define UINT64_C(C) C##ui64 #endif +#ifndef PRId64 +# define PRId64 "I64d" +#endif +#ifndef PRIi64 +# define PRIu64 "I64i" +#endif +#ifndef PRIo64 +# define PRIx64 "I64o" +#endif +#ifndef PRIu64 +# define PRIu64 "I64u" +#endif #ifndef PRIx64 # define PRIx64 "I64x" #endif +#ifndef PRIX64 +# define PRIX64 "I64X" +#endif #endif /* _MSC_VER */ Modified: llvm/trunk/include/llvm/Support/DataTypes.h.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/DataTypes.h.in?rev=143799&r1=143798&r2=143799&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/DataTypes.h.in (original) +++ llvm/trunk/include/llvm/Support/DataTypes.h.in Sat Nov 5 03:57:40 2011 @@ -167,9 +167,24 @@ # define UINT64_C(C) C##ui64 #endif +#ifndef PRId64 +# define PRId64 "I64d" +#endif +#ifndef PRIi64 +# define PRIu64 "I64i" +#endif +#ifndef PRIo64 +# define PRIx64 "I64o" +#endif +#ifndef PRIu64 +# define PRIu64 "I64u" +#endif #ifndef PRIx64 # define PRIx64 "I64x" #endif +#ifndef PRIX64 +# define PRIX64 "I64X" +#endif #endif /* _MSC_VER */ Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=143799&r1=143798&r2=143799&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Sat Nov 5 03:57:40 2011 @@ -1759,7 +1759,8 @@ case 4: case 8: if (AP.isVerbose()) - AP.OutStreamer.GetCommentOS() << format("0x%llx\n", CI->getZExtValue()); + AP.OutStreamer.GetCommentOS() << format("0x%" PRIx64 "\n", + CI->getZExtValue()); AP.OutStreamer.EmitIntValue(CI->getZExtValue(), Size, AddrSpace); return; default: Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp?rev=143799&r1=143798&r2=143799&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp Sat Nov 5 03:57:40 2011 @@ -230,8 +230,8 @@ #ifndef NDEBUG void DIEInteger::print(raw_ostream &O) { - O << "Int: " << (int64_t)Integer - << format(" 0x%llx", (unsigned long long)Integer); + O << "Int: " << (int64_t)Integer << " 0x"; + O.write_hex(Integer); } #endif Modified: llvm/trunk/lib/DebugInfo/DWARFDebugArangeSet.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFDebugArangeSet.cpp?rev=143799&r1=143798&r2=143799&view=diff ============================================================================== --- llvm/trunk/lib/DebugInfo/DWARFDebugArangeSet.cpp (original) +++ llvm/trunk/lib/DebugInfo/DWARFDebugArangeSet.cpp Sat Nov 5 03:57:40 2011 @@ -122,8 +122,9 @@ const uint32_t hex_width = Header.AddrSize * 2; for (DescriptorConstIter pos = ArangeDescriptors.begin(), end = ArangeDescriptors.end(); pos != end; ++pos) - OS << format("[0x%*.*llx -", hex_width, hex_width, pos->Address) - << format(" 0x%*.*llx)\n", hex_width, hex_width, pos->getEndAddress()); + OS << format("[0x%*.*" PRIx64 " -", hex_width, hex_width, pos->Address) + << format(" 0x%*.*" PRIx64 ")\n", + hex_width, hex_width, pos->getEndAddress()); } Modified: llvm/trunk/lib/DebugInfo/DWARFDebugAranges.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFDebugAranges.cpp?rev=143799&r1=143798&r2=143799&view=diff ============================================================================== --- llvm/trunk/lib/DebugInfo/DWARFDebugAranges.cpp (original) +++ llvm/trunk/lib/DebugInfo/DWARFDebugAranges.cpp Sat Nov 5 03:57:40 2011 @@ -100,13 +100,14 @@ const uint32_t num_ranges = getNumRanges(); for (uint32_t i = 0; i < num_ranges; ++i) { const Range &range = Aranges[i]; - OS << format("0x%8.8x: [0x%8.8llx - 0x%8.8llx)\n", range.Offset, - (uint64_t)range.LoPC, (uint64_t)range.HiPC()); + OS << format("0x%8.8x: [0x%8.8" PRIx64 " - 0x%8.8" PRIx64 ")\n", + range.Offset, (uint64_t)range.LoPC, (uint64_t)range.HiPC()); } } void DWARFDebugAranges::Range::dump(raw_ostream &OS) const { - OS << format("{0x%8.8x}: [0x%8.8llx - 0x%8.8llx)\n", Offset, LoPC, HiPC()); + OS << format("{0x%8.8x}: [0x%8.8" PRIx64 " - 0x%8.8" PRIx64 ")\n", + Offset, LoPC, HiPC()); } void DWARFDebugAranges::appendRange(uint32_t offset, uint64_t low_pc, Modified: llvm/trunk/lib/DebugInfo/DWARFDebugLine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFDebugLine.cpp?rev=143799&r1=143798&r2=143799&view=diff ============================================================================== --- llvm/trunk/lib/DebugInfo/DWARFDebugLine.cpp (original) +++ llvm/trunk/lib/DebugInfo/DWARFDebugLine.cpp Sat Nov 5 03:57:40 2011 @@ -68,7 +68,7 @@ } void DWARFDebugLine::Row::dump(raw_ostream &OS) const { - OS << format("0x%16.16llx %6u %6u", Address, Line, Column) + OS << format("0x%16.16" PRIx64 " %6u %6u", Address, Line, Column) << format(" %6u %3u ", File, Isa) << (IsStmt ? " is_stmt" : "") << (BasicBlock ? " basic_block" : "") Modified: llvm/trunk/lib/DebugInfo/DWARFFormValue.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFFormValue.cpp?rev=143799&r1=143798&r2=143799&view=diff ============================================================================== --- llvm/trunk/lib/DebugInfo/DWARFFormValue.cpp (original) +++ llvm/trunk/lib/DebugInfo/DWARFFormValue.cpp Sat Nov 5 03:57:40 2011 @@ -280,7 +280,7 @@ case DW_FORM_block4: if (uvalue > 0) { switch (Form) { - case DW_FORM_block: OS << format("<0x%llx> ", uvalue); break; + case DW_FORM_block: OS << format("<0x%" PRIx64 "> ", uvalue); break; case DW_FORM_block1: OS << format("<0x%2.2x> ", (uint8_t)uvalue); break; case DW_FORM_block2: OS << format("<0x%4.4x> ", (uint16_t)uvalue); break; case DW_FORM_block4: OS << format("<0x%8.8x> ", (uint32_t)uvalue); break; @@ -330,11 +330,11 @@ break; case DW_FORM_ref8: cu_relative_offset = true; - OS << format("cu + 0x%8.8llx", uvalue); + OS << format("cu + 0x%8.8" PRIx64, uvalue); break; case DW_FORM_ref_udata: cu_relative_offset = true; - OS << format("cu + 0x%llx", uvalue); + OS << format("cu + 0x%" PRIx64, uvalue); break; // All DW_FORM_indirect attributes should be resolved prior to calling Modified: llvm/trunk/lib/Support/Timer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Timer.cpp?rev=143799&r1=143798&r2=143799&view=diff ============================================================================== --- llvm/trunk/lib/Support/Timer.cpp (original) +++ llvm/trunk/lib/Support/Timer.cpp Sat Nov 5 03:57:40 2011 @@ -184,7 +184,7 @@ OS << " "; if (Total.getMemUsed()) - OS << format("%9lld ", (long long)getMemUsed()); + OS << format("%9" PRId64 " ", (int64_t)getMemUsed()); } Modified: llvm/trunk/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp?rev=143799&r1=143798&r2=143799&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp (original) +++ llvm/trunk/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp Sat Nov 5 03:57:40 2011 @@ -97,7 +97,7 @@ O << '$' << (int64_t)Op.getImm(); if (CommentStream && (Op.getImm() > 255 || Op.getImm() < -256)) - *CommentStream << format("imm = 0x%llX\n", (long long)Op.getImm()); + *CommentStream << format("imm = 0x%" PRIX64 "\n", (uint64_t)Op.getImm()); } else { assert(Op.isExpr() && "unknown operand kind in printOperand"); Modified: llvm/trunk/tools/llvm-objdump/MachODump.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/MachODump.cpp?rev=143799&r1=143798&r2=143799&view=diff ============================================================================== --- llvm/trunk/tools/llvm-objdump/MachODump.cpp (original) +++ llvm/trunk/tools/llvm-objdump/MachODump.cpp Sat Nov 5 03:57:40 2011 @@ -459,7 +459,7 @@ DebugOut, nulls())) { uint64_t SectAddress = 0; Sections[SectIdx].getAddress(SectAddress); - outs() << format("%8llx:\t", SectAddress + Index); + outs() << format("%8" PRIx64 ":\t", SectAddress + Index); DumpBytes(StringRef(Bytes.data() + Index, Size)); IP->printInst(&Inst, outs(), ""); @@ -579,7 +579,7 @@ outs() << FunctionMap[SectAddress + Inst.Address]-> getName() << ":\n"; - outs() << format("%8llx:\t", SectAddress + Inst.Address); + outs() << format("%8" PRIx64 ":\t", SectAddress + Inst.Address); DumpBytes(StringRef(Bytes.data() + Inst.Address, Inst.Size)); if (fi->second.contains(fi->first)) // Indent simple loops. Modified: llvm/trunk/tools/llvm-size/llvm-size.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-size/llvm-size.cpp?rev=143799&r1=143798&r2=143799&view=diff ============================================================================== --- llvm/trunk/tools/llvm-size/llvm-size.cpp (original) +++ llvm/trunk/tools/llvm-size/llvm-size.cpp Sat Nov 5 03:57:40 2011 @@ -96,13 +96,13 @@ const char *radix_fmt = 0; switch (Radix) { case octal: - radix_fmt = "llo"; + radix_fmt = PRIo64; break; case decimal: - radix_fmt = "llu"; + radix_fmt = PRIu64; break; case hexadecimal: - radix_fmt = "llx"; + radix_fmt = PRIx64; break; } if (OutputFormat == sysv) { @@ -223,8 +223,8 @@ total_data, total_bss); fmtbuf.clear(); - fmt << "%7" << (Radix == octal ? "llo" : "llu") << " " - << "%7llx "; + fmt << "%7" << (Radix == octal ? PRIo64 : PRIu64) << " " + << "%7" PRIx64 " "; outs() << format(fmt.str().c_str(), total, total); From benny.kra at googlemail.com Sat Nov 5 04:45:18 2011 From: benny.kra at googlemail.com (Benjamin Kramer) Date: Sat, 05 Nov 2011 09:45:18 -0000 Subject: [llvm-commits] [llvm] r143802 - in /llvm/trunk/include/llvm/Support: DataTypes.h.cmake DataTypes.h.in Message-ID: <20111105094518.18E842A6C12C@llvm.org> Author: d0k Date: Sat Nov 5 04:45:17 2011 New Revision: 143802 URL: http://llvm.org/viewvc/llvm-project?rev=143802&view=rev Log: Fix pasto. Modified: llvm/trunk/include/llvm/Support/DataTypes.h.cmake llvm/trunk/include/llvm/Support/DataTypes.h.in Modified: llvm/trunk/include/llvm/Support/DataTypes.h.cmake URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/DataTypes.h.cmake?rev=143802&r1=143801&r2=143802&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/DataTypes.h.cmake (original) +++ llvm/trunk/include/llvm/Support/DataTypes.h.cmake Sat Nov 5 04:45:17 2011 @@ -171,10 +171,10 @@ # define PRId64 "I64d" #endif #ifndef PRIi64 -# define PRIu64 "I64i" +# define PRIi64 "I64i" #endif #ifndef PRIo64 -# define PRIx64 "I64o" +# define PRIo64 "I64o" #endif #ifndef PRIu64 # define PRIu64 "I64u" Modified: llvm/trunk/include/llvm/Support/DataTypes.h.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/DataTypes.h.in?rev=143802&r1=143801&r2=143802&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/DataTypes.h.in (original) +++ llvm/trunk/include/llvm/Support/DataTypes.h.in Sat Nov 5 04:45:17 2011 @@ -171,10 +171,10 @@ # define PRId64 "I64d" #endif #ifndef PRIi64 -# define PRIu64 "I64i" +# define PRIi64 "I64i" #endif #ifndef PRIo64 -# define PRIx64 "I64o" +# define PRIo64 "I64o" #endif #ifndef PRIu64 # define PRIu64 "I64u" From nicholas at mxc.ca Sat Nov 5 05:48:42 2011 From: nicholas at mxc.ca (Nick Lewycky) Date: Sat, 05 Nov 2011 10:48:42 -0000 Subject: [llvm-commits] [llvm] r143808 - in /llvm/trunk: lib/Transforms/Scalar/DeadStoreElimination.cpp test/Transforms/DeadStoreElimination/free.ll Message-ID: <20111105104842.708212A6C12C@llvm.org> Author: nicholas Date: Sat Nov 5 05:48:42 2011 New Revision: 143808 URL: http://llvm.org/viewvc/llvm-project?rev=143808&view=rev Log: Do simple cross-block DSE when we encounter a free statement. Fixes PR11240. Modified: llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp llvm/trunk/test/Transforms/DeadStoreElimination/free.ll Modified: llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp?rev=143808&r1=143807&r2=143808&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp Sat Nov 5 05:48:42 2011 @@ -34,6 +34,7 @@ #include "llvm/Support/Debug.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/Statistic.h" +#include "llvm/ADT/STLExtras.h" using namespace llvm; STATISTIC(NumFastStores, "Number of stores deleted"); @@ -43,25 +44,26 @@ struct DSE : public FunctionPass { AliasAnalysis *AA; MemoryDependenceAnalysis *MD; + DominatorTree *DT; static char ID; // Pass identification, replacement for typeid - DSE() : FunctionPass(ID), AA(0), MD(0) { + DSE() : FunctionPass(ID), AA(0), MD(0), DT(0) { initializeDSEPass(*PassRegistry::getPassRegistry()); } virtual bool runOnFunction(Function &F) { AA = &getAnalysis(); MD = &getAnalysis(); - DominatorTree &DT = getAnalysis(); + DT = &getAnalysis(); bool Changed = false; for (Function::iterator I = F.begin(), E = F.end(); I != E; ++I) // Only check non-dead blocks. Dead blocks may have strange pointer // cycles that will confuse alias analysis. - if (DT.isReachableFromEntry(I)) + if (DT->isReachableFromEntry(I)) Changed |= runOnBasicBlock(*I); - AA = 0; MD = 0; + AA = 0; MD = 0; DT = 0; return Changed; } @@ -549,37 +551,66 @@ return MadeChange; } +/// Find all blocks that will unconditionally lead to the block BB and append +/// them to F. +static void FindUnconditionalPreds(SmallVectorImpl &Blocks, + BasicBlock *BB, DominatorTree *DT) { + for (pred_iterator I = pred_begin(BB), E = pred_end(BB); I != E; ++I) { + BasicBlock *Pred = *I; + TerminatorInst *PredTI = Pred->getTerminator(); + if (PredTI->getNumSuccessors() != 1) + continue; + + if (DT->isReachableFromEntry(Pred)) + Blocks.push_back(Pred); + } +} + /// HandleFree - Handle frees of entire structures whose dependency is a store /// to a field of that structure. bool DSE::HandleFree(CallInst *F) { bool MadeChange = false; - MemDepResult Dep = MD->getDependency(F); + AliasAnalysis::Location Loc = AliasAnalysis::Location(F->getOperand(0)); + SmallVector Blocks; + Blocks.push_back(F->getParent()); + + while (!Blocks.empty()) { + BasicBlock *BB = Blocks.pop_back_val(); + Instruction *InstPt = BB->getTerminator(); + if (BB == F->getParent()) InstPt = F; + + MemDepResult Dep = MD->getPointerDependencyFrom(Loc, false, InstPt, BB); + while (Dep.isDef() || Dep.isClobber()) { + Instruction *Dependency = Dep.getInst(); + if (!hasMemoryWrite(Dependency) || !isRemovable(Dependency)) + break; + + Value *DepPointer = + GetUnderlyingObject(getStoredPointerOperand(Dependency)); - while (Dep.isDef() || Dep.isClobber()) { - Instruction *Dependency = Dep.getInst(); - if (!hasMemoryWrite(Dependency) || !isRemovable(Dependency)) - return MadeChange; - - Value *DepPointer = - GetUnderlyingObject(getStoredPointerOperand(Dependency)); - - // Check for aliasing. - if (!AA->isMustAlias(F->getArgOperand(0), DepPointer)) - return MadeChange; - - // DCE instructions only used to calculate that store - DeleteDeadInstruction(Dependency, *MD); - ++NumFastStores; - MadeChange = true; - - // Inst's old Dependency is now deleted. Compute the next dependency, - // which may also be dead, as in - // s[0] = 0; - // s[1] = 0; // This has just been deleted. - // free(s); - Dep = MD->getDependency(F); - }; + // Check for aliasing. + if (!AA->isMustAlias(F->getArgOperand(0), DepPointer)) + break; + + Instruction *Next = llvm::next(BasicBlock::iterator(Dependency)); + + // DCE instructions only used to calculate that store + DeleteDeadInstruction(Dependency, *MD); + ++NumFastStores; + MadeChange = true; + + // Inst's old Dependency is now deleted. Compute the next dependency, + // which may also be dead, as in + // s[0] = 0; + // s[1] = 0; // This has just been deleted. + // free(s); + Dep = MD->getPointerDependencyFrom(Loc, false, Next, BB); + } + + if (Dep.isNonLocal()) + FindUnconditionalPreds(Blocks, BB, DT); + } return MadeChange; } Modified: llvm/trunk/test/Transforms/DeadStoreElimination/free.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/DeadStoreElimination/free.ll?rev=143808&r1=143807&r2=143808&view=diff ============================================================================== --- llvm/trunk/test/Transforms/DeadStoreElimination/free.ll (original) +++ llvm/trunk/test/Transforms/DeadStoreElimination/free.ll Sat Nov 5 05:48:42 2011 @@ -2,6 +2,9 @@ target datalayout = "e-p:64:64:64" +declare void @free(i8* nocapture) +declare noalias i8* @malloc(i64) + ; CHECK: @test ; CHECK-NEXT: bitcast ; CHECK-NEXT: @free @@ -26,10 +29,10 @@ ret void } -; CHECK: @test4 +; CHECK: @test3 ; CHECK-NOT: store ; CHECK: ret void -define void @test4() { +define void @test3() { %m = call i8* @malloc(i64 24) store i8 0, i8* %m %m1 = getelementptr i8* %m, i64 1 @@ -38,5 +41,20 @@ ret void } -declare void @free(i8*) -declare i8* @malloc(i64) +; PR11240 +; CHECK: @test4 +; CHECK-NOT: store +; CHECK: ret void +define void @test4(i1 %x) nounwind { +entry: + %alloc1 = tail call noalias i8* @malloc(i64 4) nounwind + br i1 %x, label %skipinit1, label %init1 + +init1: + store i8 1, i8* %alloc1 + br label %skipinit1 + +skipinit1: + tail call void @free(i8* %alloc1) nounwind + ret void +} From benny.kra at googlemail.com Sat Nov 5 06:52:44 2011 From: benny.kra at googlemail.com (Benjamin Kramer) Date: Sat, 05 Nov 2011 11:52:44 -0000 Subject: [llvm-commits] [llvm] r143809 - in /llvm/trunk: include/llvm/MC/MCObjectWriter.h include/llvm/MC/MCStreamer.h lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp lib/MC/MCObjectWriter.cpp lib/MC/MCStreamer.cpp test/CodeGen/ARM/debug-info-qreg.ll test/CodeGen/ARM/debug-info-s16-reg.ll test/CodeGen/X86/2010-06-28-DbgEntryPC.ll Message-ID: <20111105115245.258532A6C12C@llvm.org> Author: d0k Date: Sat Nov 5 06:52:44 2011 New Revision: 143809 URL: http://llvm.org/viewvc/llvm-project?rev=143809&view=rev Log: Add an option to pad an uleb128 to MCObjectWriter and remove the uleb128 encoding from the DWARF asm printer. As a side effect we now print dwarf ulebs with .ascii directives. Modified: llvm/trunk/include/llvm/MC/MCObjectWriter.h llvm/trunk/include/llvm/MC/MCStreamer.h llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp llvm/trunk/lib/MC/MCObjectWriter.cpp llvm/trunk/lib/MC/MCStreamer.cpp llvm/trunk/test/CodeGen/ARM/debug-info-qreg.ll llvm/trunk/test/CodeGen/ARM/debug-info-s16-reg.ll llvm/trunk/test/CodeGen/X86/2010-06-28-DbgEntryPC.ll Modified: llvm/trunk/include/llvm/MC/MCObjectWriter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCObjectWriter.h?rev=143809&r1=143808&r2=143809&view=diff ============================================================================== --- llvm/trunk/include/llvm/MC/MCObjectWriter.h (original) +++ llvm/trunk/include/llvm/MC/MCObjectWriter.h Sat Nov 5 06:52:44 2011 @@ -188,7 +188,8 @@ /// Utility function to encode a SLEB128 value. static void EncodeSLEB128(int64_t Value, raw_ostream &OS); /// Utility function to encode a ULEB128 value. - static void EncodeULEB128(uint64_t Value, raw_ostream &OS); + static void EncodeULEB128(uint64_t Value, raw_ostream &OS, + unsigned Padding = 0); }; MCObjectWriter *createWinCOFFObjectWriter(raw_ostream &OS, bool is64Bit); Modified: llvm/trunk/include/llvm/MC/MCStreamer.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCStreamer.h?rev=143809&r1=143808&r2=143809&view=diff ============================================================================== --- llvm/trunk/include/llvm/MC/MCStreamer.h (original) +++ llvm/trunk/include/llvm/MC/MCStreamer.h Sat Nov 5 06:52:44 2011 @@ -420,7 +420,8 @@ /// EmitULEB128Value - Special case of EmitULEB128Value that avoids the /// client having to pass in a MCExpr for constant integers. - void EmitULEB128IntValue(uint64_t Value, unsigned AddrSpace = 0); + void EmitULEB128IntValue(uint64_t Value, unsigned AddrSpace = 0, + unsigned Padding = 0); /// EmitSLEB128Value - Special case of EmitSLEB128Value that avoids the /// client having to pass in a MCExpr for constant integers. Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp?rev=143809&r1=143808&r2=143809&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp Sat Nov 5 06:52:44 2011 @@ -35,23 +35,8 @@ void AsmPrinter::EmitSLEB128(int Value, const char *Desc) const { if (isVerbose() && Desc) OutStreamer.AddComment(Desc); - - if (MAI->hasLEB128()) { - OutStreamer.EmitSLEB128IntValue(Value); - return; - } - // If we don't have .sleb128, emit as .bytes. - int Sign = Value >> (8 * sizeof(Value) - 1); - bool IsMore; - - do { - unsigned char Byte = static_cast(Value & 0x7f); - Value >>= 7; - IsMore = Value != Sign || ((Byte ^ Sign) & 0x40) != 0; - if (IsMore) Byte |= 0x80; - OutStreamer.EmitIntValue(Byte, 1, /*addrspace*/0); - } while (IsMore); + OutStreamer.EmitSLEB128IntValue(Value); } /// EmitULEB128 - emit the specified signed leb128 value. @@ -60,25 +45,7 @@ if (isVerbose() && Desc) OutStreamer.AddComment(Desc); - // FIXME: Should we add a PadTo option to the streamer? - if (MAI->hasLEB128() && PadTo == 0) { - OutStreamer.EmitULEB128IntValue(Value); - return; - } - - // 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 || PadTo != 0) Byte |= 0x80; - OutStreamer.EmitIntValue(Byte, 1, /*addrspace*/0); - } while (Value); - - if (PadTo) { - if (PadTo > 1) - OutStreamer.EmitFill(PadTo - 1, 0x80/*fillval*/, 0/*addrspace*/); - OutStreamer.EmitFill(1, 0/*fillval*/, 0/*addrspace*/); - } + OutStreamer.EmitULEB128IntValue(Value, 0/*addrspace*/, PadTo); } /// EmitCFAByte - Emit a .byte 42 directive for a DW_CFA_xxx value. Modified: llvm/trunk/lib/MC/MCObjectWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCObjectWriter.cpp?rev=143809&r1=143808&r2=143809&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCObjectWriter.cpp (original) +++ llvm/trunk/lib/MC/MCObjectWriter.cpp Sat Nov 5 06:52:44 2011 @@ -33,14 +33,22 @@ } /// Utility function to encode a ULEB128 value. -void MCObjectWriter::EncodeULEB128(uint64_t Value, raw_ostream &OS) { +void MCObjectWriter::EncodeULEB128(uint64_t Value, raw_ostream &OS, + unsigned Padding) { do { uint8_t Byte = Value & 0x7f; Value >>= 7; - if (Value != 0) + if (Value != 0 || Padding != 0) Byte |= 0x80; // Mark this byte that that more bytes will follow. OS << char(Byte); } while (Value != 0); + + // Pad with 0x80 and emit a null byte at the end. + if (Padding != 0) { + for (; Padding != 1; --Padding) + OS << '\x80'; + OS << '\x00'; + } } bool Modified: llvm/trunk/lib/MC/MCStreamer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCStreamer.cpp?rev=143809&r1=143808&r2=143809&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCStreamer.cpp (original) +++ llvm/trunk/lib/MC/MCStreamer.cpp Sat Nov 5 06:52:44 2011 @@ -94,10 +94,11 @@ /// EmitULEB128Value - Special case of EmitULEB128Value that avoids the /// client having to pass in a MCExpr for constant integers. -void MCStreamer::EmitULEB128IntValue(uint64_t Value, unsigned AddrSpace) { +void MCStreamer::EmitULEB128IntValue(uint64_t Value, unsigned AddrSpace, + unsigned Padding) { SmallString<32> Tmp; raw_svector_ostream OSE(Tmp); - MCObjectWriter::EncodeULEB128(Value, OSE); + MCObjectWriter::EncodeULEB128(Value, OSE, Padding); EmitBytes(OSE.str(), AddrSpace); } Modified: llvm/trunk/test/CodeGen/ARM/debug-info-qreg.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/debug-info-qreg.ll?rev=143809&r1=143808&r2=143809&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/ARM/debug-info-qreg.ll (original) +++ llvm/trunk/test/CodeGen/ARM/debug-info-qreg.ll Sat Nov 5 06:52:44 2011 @@ -3,13 +3,11 @@ target triple = "thumbv7-apple-macosx10.6.7" ;CHECK: DW_OP_regx for Q register: D1 -;CHECK-NEXT: byte -;CHECK-NEXT: byte +;CHECK-NEXT: ascii ;CHECK-NEXT: DW_OP_piece 8 ;CHECK-NEXT: byte 8 ;CHECK-NEXT: DW_OP_regx for Q register: D2 -;CHECK-NEXT: byte -;CHECK-NEXT: byte +;CHECK-NEXT: ascii ;CHECK-NEXT: DW_OP_piece 8 ;CHECK-NEXT: byte 8 Modified: llvm/trunk/test/CodeGen/ARM/debug-info-s16-reg.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/debug-info-s16-reg.ll?rev=143809&r1=143808&r2=143809&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/ARM/debug-info-s16-reg.ll (original) +++ llvm/trunk/test/CodeGen/ARM/debug-info-s16-reg.ll Sat Nov 5 06:52:44 2011 @@ -2,8 +2,7 @@ ; Radar 9309221 ; Test dwarf reg no for s16 ;CHECK: DW_OP_regx for S register -;CHECK-NEXT: byte -;CHECK-NEXT: byte +;CHECK-NEXT: ascii ;CHECK-NEXT: DW_OP_bit_piece 32 0 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:32:64-v128:32:128-a0:0:32-n32" Modified: llvm/trunk/test/CodeGen/X86/2010-06-28-DbgEntryPC.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2010-06-28-DbgEntryPC.ll?rev=143809&r1=143808&r2=143809&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/2010-06-28-DbgEntryPC.ll (original) +++ llvm/trunk/test/CodeGen/X86/2010-06-28-DbgEntryPC.ll Sat Nov 5 06:52:44 2011 @@ -16,7 +16,7 @@ ; CHECK-NEXT: .byte 6 ## DW_FORM_data4 ; CHECK-NEXT: .byte 27 ## DW_AT_comp_dir ; CHECK-NEXT: .byte 14 ## DW_FORM_strp -; CHECK-NEXT: .byte 225 ## DW_AT_APPLE_optimized +; CHECK-NEXT: .ascii "\341\177" ## DW_AT_APPLE_optimized %struct.a = type { i32, %struct.a* } From benny.kra at googlemail.com Sat Nov 5 07:13:21 2011 From: benny.kra at googlemail.com (Benjamin Kramer) Date: Sat, 05 Nov 2011 12:13:21 -0000 Subject: [llvm-commits] [llvm] r143810 - /llvm/trunk/lib/Object/MachOObject.cpp Message-ID: <20111105121321.F16D32A6C12C@llvm.org> Author: d0k Date: Sat Nov 5 07:13:21 2011 New Revision: 143810 URL: http://llvm.org/viewvc/llvm-project?rev=143810&view=rev Log: MachOObject: Use DataExtractor's uleb parser instead of rolling our own. Modified: llvm/trunk/lib/Object/MachOObject.cpp Modified: llvm/trunk/lib/Object/MachOObject.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/MachOObject.cpp?rev=143810&r1=143809&r2=143810&view=diff ============================================================================== --- llvm/trunk/lib/Object/MachOObject.cpp (original) +++ llvm/trunk/lib/Object/MachOObject.cpp Sat Nov 5 07:13:21 2011 @@ -10,11 +10,12 @@ #include "llvm/Object/MachOObject.h" #include "llvm/ADT/StringRef.h" #include "llvm/ADT/SmallVector.h" -#include "llvm/Support/MemoryBuffer.h" +#include "llvm/Support/DataExtractor.h" +#include "llvm/Support/Debug.h" #include "llvm/Support/Host.h" -#include "llvm/Support/SwapByteOrder.h" +#include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/raw_ostream.h" -#include "llvm/Support/Debug.h" +#include "llvm/Support/SwapByteOrder.h" using namespace llvm; using namespace llvm::object; @@ -359,25 +360,13 @@ void MachOObject::ReadULEB128s(uint64_t Index, SmallVectorImpl &Out) const { - const char *ptr = Buffer->getBufferStart() + Index; + DataExtractor extractor(Buffer->getBuffer(), true, 0); + + uint32_t offset = Index; uint64_t data = 0; - uint64_t delta = 0; - uint32_t shift = 0; - while (true) { - assert(ptr < Buffer->getBufferEnd() && "index out of bounds"); - assert(shift < 64 && "too big for uint64_t"); - - uint8_t byte = *ptr++; - delta |= ((byte & 0x7F) << shift); - shift += 7; - if (byte < 0x80) { - if (delta == 0) - break; - data += delta; - Out.push_back(data); - delta = 0; - shift = 0; - } + while (uint64_t delta = extractor.getULEB128(&offset)) { + data += delta; + Out.push_back(data); } } From benny.kra at googlemail.com Sat Nov 5 08:11:26 2011 From: benny.kra at googlemail.com (Benjamin Kramer) Date: Sat, 05 Nov 2011 13:11:26 -0000 Subject: [llvm-commits] [llvm] r143811 - /llvm/trunk/lib/MC/MCStreamer.cpp Message-ID: <20111105131126.2531C2A6C12C@llvm.org> Author: d0k Date: Sat Nov 5 08:11:25 2011 New Revision: 143811 URL: http://llvm.org/viewvc/llvm-project?rev=143811&view=rev Log: Twinify. Modified: llvm/trunk/lib/MC/MCStreamer.cpp Modified: llvm/trunk/lib/MC/MCStreamer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCStreamer.cpp?rev=143811&r1=143810&r2=143811&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCStreamer.cpp (original) +++ llvm/trunk/lib/MC/MCStreamer.cpp Sat Nov 5 08:11:25 2011 @@ -16,7 +16,6 @@ #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" #include "llvm/ADT/SmallString.h" -#include "llvm/ADT/StringExtras.h" #include "llvm/ADT/Twine.h" #include using namespace llvm; @@ -188,9 +187,8 @@ if (!MAI.getSupportsDataRegions()) return; // Generate a unique symbol name. - MCSymbol *NewSym = Context.GetOrCreateSymbol( - Twine(MAI.getDataBeginLabelName()) + - utostr(UniqueDataBeginSuffix++)); + MCSymbol *NewSym = Context.GetOrCreateSymbol(MAI.getDataBeginLabelName() + + Twine(UniqueDataBeginSuffix++)); EmitLabel(NewSym); RegionIndicator = Data; @@ -204,9 +202,8 @@ if (!MAI.getSupportsDataRegions()) return; // Generate a unique symbol name. - MCSymbol *NewSym = Context.GetOrCreateSymbol( - Twine(MAI.getCodeBeginLabelName()) + - utostr(UniqueCodeBeginSuffix++)); + MCSymbol *NewSym = Context.GetOrCreateSymbol(MAI.getCodeBeginLabelName() + + Twine(UniqueCodeBeginSuffix++)); EmitLabel(NewSym); RegionIndicator = Code; @@ -220,9 +217,9 @@ if (!MAI.getSupportsDataRegions()) return; // Generate a unique symbol name. - MCSymbol *NewSym = Context.GetOrCreateSymbol( - Twine(MAI.getJumpTable8BeginLabelName()) + - utostr(UniqueDataBeginSuffix++)); + MCSymbol *NewSym = + Context.GetOrCreateSymbol(MAI.getJumpTable8BeginLabelName() + + Twine(UniqueDataBeginSuffix++)); EmitLabel(NewSym); RegionIndicator = JumpTable8; @@ -236,9 +233,9 @@ if (!MAI.getSupportsDataRegions()) return; // Generate a unique symbol name. - MCSymbol *NewSym = Context.GetOrCreateSymbol( - Twine(MAI.getJumpTable16BeginLabelName()) + - utostr(UniqueDataBeginSuffix++)); + MCSymbol *NewSym = + Context.GetOrCreateSymbol(MAI.getJumpTable16BeginLabelName() + + Twine(UniqueDataBeginSuffix++)); EmitLabel(NewSym); RegionIndicator = JumpTable16; @@ -253,9 +250,9 @@ if (!MAI.getSupportsDataRegions()) return; // Generate a unique symbol name. - MCSymbol *NewSym = Context.GetOrCreateSymbol( - Twine(MAI.getJumpTable32BeginLabelName()) + - utostr(UniqueDataBeginSuffix++)); + MCSymbol *NewSym = + Context.GetOrCreateSymbol(MAI.getJumpTable32BeginLabelName() + + Twine(UniqueDataBeginSuffix++)); EmitLabel(NewSym); RegionIndicator = JumpTable32; From benny.kra at googlemail.com Sat Nov 5 10:35:00 2011 From: benny.kra at googlemail.com (Benjamin Kramer) Date: Sat, 05 Nov 2011 15:35:00 -0000 Subject: [llvm-commits] [llvm] r143812 - in /llvm/trunk/lib/DebugInfo: DWARFDebugInfoEntry.cpp DWARFDebugInfoEntry.h Message-ID: <20111105153500.97E412A6C12C@llvm.org> Author: d0k Date: Sat Nov 5 10:35:00 2011 New Revision: 143812 URL: http://llvm.org/viewvc/llvm-project?rev=143812&view=rev Log: Reduce the offsets in DwarfDebugInfoEntry to 32 bit, they're printed with %x and that breaks on big-endian machines. I have to clean up the 32/64 bit confusion in libDebugInfo some day. Modified: llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.cpp llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.h Modified: llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.cpp?rev=143812&r1=143811&r2=143812&view=diff ============================================================================== --- llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.cpp (original) +++ llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.cpp Sat Nov 5 10:35:00 2011 @@ -26,7 +26,7 @@ uint32_t offset = Offset; if (debug_info_data.isValidOffset(offset)) { - uint64_t abbrCode = debug_info_data.getULEB128(&offset); + uint32_t abbrCode = debug_info_data.getULEB128(&offset); OS << format("\n0x%8.8x: ", Offset); if (abbrCode) { Modified: llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.h?rev=143812&r1=143811&r2=143812&view=diff ============================================================================== --- llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.h (original) +++ llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.h Sat Nov 5 10:35:00 2011 @@ -23,7 +23,7 @@ /// DWARFDebugInfoEntryMinimal - A DIE with only the minimum required data. class DWARFDebugInfoEntryMinimal { /// Offset within the .debug_info of the start of this entry. - uint64_t Offset; + uint32_t Offset; /// How many to subtract from "this" to get the parent. /// If zero this die has no parent. @@ -52,7 +52,7 @@ uint32_t getTag() const { return AbbrevDecl ? AbbrevDecl->getTag() : 0; } bool isNULL() const { return AbbrevDecl == 0; } - uint64_t getOffset() const { return Offset; } + uint32_t getOffset() const { return Offset; } uint32_t getNumAttributes() const { return !isNULL() ? AbbrevDecl->getNumAttributes() : 0; } From jabbey at arxan.com Sat Nov 5 10:52:46 2011 From: jabbey at arxan.com (Joe Abbey) Date: Sat, 5 Nov 2011 10:52:46 -0500 Subject: [llvm-commits] [llvm] r143812 - in /llvm/trunk/lib/DebugInfo: DWARFDebugInfoEntry.cpp DWARFDebugInfoEntry.h In-Reply-To: <20111105153500.97E412A6C12C@llvm.org> References: <20111105153500.97E412A6C12C@llvm.org> Message-ID: pr11300.ll still fails on PPC with this patch. Please apply Index: lib/DebugInfo/DWARFDebugInfoEntry.cpp =================================================================== --- lib/DebugInfo/DWARFDebugInfoEntry.cpp (revision 143812) +++ lib/DebugInfo/DWARFDebugInfoEntry.cpp (working copy) @@ -26,9 +26,9 @@ uint32_t offset = Offset; if (debug_info_data.isValidOffset(offset)) { + OS << format("\n0x%8.8x: ", offset); uint32_t abbrCode = debug_info_data.getULEB128(&offset); - - OS << format("\n0x%8.8x: ", Offset); + if (abbrCode) { if (AbbrevDecl) { const char *tagString = TagString(getTag()); Cheers, Joe Abbey Software Architect Arxan Technologies, Inc. 1305 Cumberland Ave, Ste 215 West Lafayette, IN 47906 jabbey at arxan.com www.arxan.com On Nov 5, 2011, at 11:35 AM, Benjamin Kramer wrote: > Author: d0k > Date: Sat Nov 5 10:35:00 2011 > New Revision: 143812 > > URL: http://llvm.org/viewvc/llvm-project?rev=143812&view=rev > Log: > Reduce the offsets in DwarfDebugInfoEntry to 32 bit, they're printed with %x and > that breaks on big-endian machines. > > I have to clean up the 32/64 bit confusion in libDebugInfo some day. > > Modified: > llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.cpp > llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.h > > Modified: llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.cpp?rev=143812&r1=143811&r2=143812&view=diff > ============================================================================== > --- llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.cpp (original) > +++ llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.cpp Sat Nov 5 10:35:00 2011 > @@ -26,7 +26,7 @@ > uint32_t offset = Offset; > > if (debug_info_data.isValidOffset(offset)) { > - uint64_t abbrCode = debug_info_data.getULEB128(&offset); > + uint32_t abbrCode = debug_info_data.getULEB128(&offset); > > OS << format("\n0x%8.8x: ", Offset); > if (abbrCode) { > > Modified: llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.h > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.h?rev=143812&r1=143811&r2=143812&view=diff > ============================================================================== > --- llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.h (original) > +++ llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.h Sat Nov 5 10:35:00 2011 > @@ -23,7 +23,7 @@ > /// DWARFDebugInfoEntryMinimal - A DIE with only the minimum required data. > class DWARFDebugInfoEntryMinimal { > /// Offset within the .debug_info of the start of this entry. > - uint64_t Offset; > + uint32_t Offset; > > /// How many to subtract from "this" to get the parent. > /// If zero this die has no parent. > @@ -52,7 +52,7 @@ > > uint32_t getTag() const { return AbbrevDecl ? AbbrevDecl->getTag() : 0; } > bool isNULL() const { return AbbrevDecl == 0; } > - uint64_t getOffset() const { return Offset; } > + uint32_t getOffset() const { return Offset; } > uint32_t getNumAttributes() const { > return !isNULL() ? AbbrevDecl->getNumAttributes() : 0; > } > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111105/ef8b9c76/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4350 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111105/ef8b9c76/attachment-0001.bin From jabbey at arxan.com Sat Nov 5 10:57:20 2011 From: jabbey at arxan.com (Joe Abbey) Date: Sat, 5 Nov 2011 10:57:20 -0500 Subject: [llvm-commits] [llvm] r143812 - in /llvm/trunk/lib/DebugInfo: DWARFDebugInfoEntry.cpp DWARFDebugInfoEntry.h In-Reply-To: References: <20111105153500.97E412A6C12C@llvm.org> Message-ID: Whoops, It works just fine Joe Joe Abbey Software Architect Arxan Technologies, Inc. 1305 Cumberland Ave, Ste 215 West Lafayette, IN 47906 jabbey at arxan.com www.arxan.com On Nov 5, 2011, at 11:52 AM, Joe Abbey wrote: > pr11300.ll still fails on PPC with this patch. > > Please apply > > Index: lib/DebugInfo/DWARFDebugInfoEntry.cpp > =================================================================== > --- lib/DebugInfo/DWARFDebugInfoEntry.cpp (revision 143812) > +++ lib/DebugInfo/DWARFDebugInfoEntry.cpp (working copy) > @@ -26,9 +26,9 @@ > uint32_t offset = Offset; > > if (debug_info_data.isValidOffset(offset)) { > + OS << format("\n0x%8.8x: ", offset); > uint32_t abbrCode = debug_info_data.getULEB128(&offset); > - > - OS << format("\n0x%8.8x: ", Offset); > + > if (abbrCode) { > if (AbbrevDecl) { > const char *tagString = TagString(getTag()); > > Cheers, > > Joe Abbey > Software Architect > Arxan Technologies, Inc. > 1305 Cumberland Ave, Ste 215 > West Lafayette, IN 47906 > jabbey at arxan.com > www.arxan.com > > > On Nov 5, 2011, at 11:35 AM, Benjamin Kramer wrote: > >> Author: d0k >> Date: Sat Nov 5 10:35:00 2011 >> New Revision: 143812 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=143812&view=rev >> Log: >> Reduce the offsets in DwarfDebugInfoEntry to 32 bit, they're printed with %x and >> that breaks on big-endian machines. >> >> I have to clean up the 32/64 bit confusion in libDebugInfo some day. >> >> Modified: >> llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.cpp >> llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.h >> >> Modified: llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.cpp >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.cpp?rev=143812&r1=143811&r2=143812&view=diff >> ============================================================================== >> --- llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.cpp (original) >> +++ llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.cpp Sat Nov 5 10:35:00 2011 >> @@ -26,7 +26,7 @@ >> uint32_t offset = Offset; >> >> if (debug_info_data.isValidOffset(offset)) { >> - uint64_t abbrCode = debug_info_data.getULEB128(&offset); >> + uint32_t abbrCode = debug_info_data.getULEB128(&offset); >> >> OS << format("\n0x%8.8x: ", Offset); >> if (abbrCode) { >> >> Modified: llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.h >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.h?rev=143812&r1=143811&r2=143812&view=diff >> ============================================================================== >> --- llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.h (original) >> +++ llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.h Sat Nov 5 10:35:00 2011 >> @@ -23,7 +23,7 @@ >> /// DWARFDebugInfoEntryMinimal - A DIE with only the minimum required data. >> class DWARFDebugInfoEntryMinimal { >> /// Offset within the .debug_info of the start of this entry. >> - uint64_t Offset; >> + uint32_t Offset; >> >> /// How many to subtract from "this" to get the parent. >> /// If zero this die has no parent. >> @@ -52,7 +52,7 @@ >> >> uint32_t getTag() const { return AbbrevDecl ? AbbrevDecl->getTag() : 0; } >> bool isNULL() const { return AbbrevDecl == 0; } >> - uint64_t getOffset() const { return Offset; } >> + uint32_t getOffset() const { return Offset; } >> uint32_t getNumAttributes() const { >> return !isNULL() ? AbbrevDecl->getNumAttributes() : 0; >> } >> >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111105/4720efde/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4350 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111105/4720efde/attachment.bin From benny.kra at googlemail.com Sat Nov 5 11:01:13 2011 From: benny.kra at googlemail.com (Benjamin Kramer) Date: Sat, 05 Nov 2011 16:01:13 -0000 Subject: [llvm-commits] [llvm] r143814 - in /llvm/trunk/lib/DebugInfo: DWARFDebugAbbrev.cpp DWARFDebugAbbrev.h DWARFDebugLine.cpp DWARFFormValue.cpp Message-ID: <20111105160114.044F02A6C12C@llvm.org> Author: d0k Date: Sat Nov 5 11:01:13 2011 New Revision: 143814 URL: http://llvm.org/viewvc/llvm-project?rev=143814&view=rev Log: Audited all the format strings in libDebugInfo and fixed those that didn't match the types. Modified: llvm/trunk/lib/DebugInfo/DWARFDebugAbbrev.cpp llvm/trunk/lib/DebugInfo/DWARFDebugAbbrev.h llvm/trunk/lib/DebugInfo/DWARFDebugLine.cpp llvm/trunk/lib/DebugInfo/DWARFFormValue.cpp Modified: llvm/trunk/lib/DebugInfo/DWARFDebugAbbrev.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFDebugAbbrev.cpp?rev=143814&r1=143813&r2=143814&view=diff ============================================================================== --- llvm/trunk/lib/DebugInfo/DWARFDebugAbbrev.cpp (original) +++ llvm/trunk/lib/DebugInfo/DWARFDebugAbbrev.cpp Sat Nov 5 11:01:13 2011 @@ -83,7 +83,7 @@ DWARFAbbreviationDeclarationCollMapConstIter pos; for (pos = AbbrevCollMap.begin(); pos != AbbrevCollMap.end(); ++pos) { - OS << format("Abbrev table for offset: 0x%8.8x\n", pos->first); + OS << format("Abbrev table for offset: 0x%8.8" PRIx64 "\n", pos->first); pos->second.dump(OS); } } Modified: llvm/trunk/lib/DebugInfo/DWARFDebugAbbrev.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFDebugAbbrev.h?rev=143814&r1=143813&r2=143814&view=diff ============================================================================== --- llvm/trunk/lib/DebugInfo/DWARFDebugAbbrev.h (original) +++ llvm/trunk/lib/DebugInfo/DWARFDebugAbbrev.h Sat Nov 5 11:01:13 2011 @@ -25,21 +25,21 @@ DWARFAbbreviationDeclarationCollConstIter; class DWARFAbbreviationDeclarationSet { - uint64_t Offset; + uint32_t Offset; uint32_t IdxOffset; std::vector Decls; public: DWARFAbbreviationDeclarationSet() : Offset(0), IdxOffset(0) {} - DWARFAbbreviationDeclarationSet(uint64_t offset, uint32_t idxOffset) + DWARFAbbreviationDeclarationSet(uint32_t offset, uint32_t idxOffset) : Offset(offset), IdxOffset(idxOffset) {} void clear() { IdxOffset = 0; Decls.clear(); } - uint64_t getOffset() const { return Offset; } + uint32_t getOffset() const { return Offset; } void dump(raw_ostream &OS) const; bool extract(DataExtractor data, uint32_t* offset_ptr); Modified: llvm/trunk/lib/DebugInfo/DWARFDebugLine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFDebugLine.cpp?rev=143814&r1=143813&r2=143814&view=diff ============================================================================== --- llvm/trunk/lib/DebugInfo/DWARFDebugLine.cpp (original) +++ llvm/trunk/lib/DebugInfo/DWARFDebugLine.cpp Sat Nov 5 11:01:13 2011 @@ -41,8 +41,9 @@ "----------------\n"; for (uint32_t i = 0; i < FileNames.size(); ++i) { const FileNameEntry& fileEntry = FileNames[i]; - OS << format("file_names[%3u] %4u ", i+1, fileEntry.DirIdx) - << format("0x%8.8x 0x%8.8x ", fileEntry.ModTime, fileEntry.Length) + OS << format("file_names[%3u] %4" PRIu64 " ", i+1, fileEntry.DirIdx) + << format("0x%8.8" PRIx64 " 0x%8.8" PRIx64 " ", + fileEntry.ModTime, fileEntry.Length) << fileEntry.Name << '\n'; } } Modified: llvm/trunk/lib/DebugInfo/DWARFFormValue.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFFormValue.cpp?rev=143814&r1=143813&r2=143814&view=diff ============================================================================== --- llvm/trunk/lib/DebugInfo/DWARFFormValue.cpp (original) +++ llvm/trunk/lib/DebugInfo/DWARFFormValue.cpp Sat Nov 5 11:01:13 2011 @@ -263,12 +263,12 @@ bool cu_relative_offset = false; switch (Form) { - case DW_FORM_addr: OS << format("0x%016x", uvalue); break; + case DW_FORM_addr: OS << format("0x%016" PRIx64, uvalue); break; case DW_FORM_flag: - case DW_FORM_data1: OS << format("0x%02x", uvalue); break; - case DW_FORM_data2: OS << format("0x%04x", uvalue); break; - case DW_FORM_data4: OS << format("0x%08x", uvalue); break; - case DW_FORM_data8: OS << format("0x%016x", uvalue); break; + case DW_FORM_data1: OS << format("0x%02x", (uint8_t)uvalue); break; + case DW_FORM_data2: OS << format("0x%04x", (uint16_t)uvalue); break; + case DW_FORM_data4: OS << format("0x%08x", (uint32_t)uvalue); break; + case DW_FORM_data8: OS << format("0x%016" PRIx64, uvalue); break; case DW_FORM_string: OS << '"'; OS.write_escaped(getAsCString(NULL)); @@ -314,7 +314,7 @@ break; } case DW_FORM_ref_addr: - OS << format("0x%016x", uvalue); + OS << format("0x%016" PRIx64, uvalue); break; case DW_FORM_ref1: cu_relative_offset = true; @@ -348,7 +348,7 @@ } if (cu_relative_offset) - OS << format(" => {0x%8.8x}", (uvalue + (cu ? cu->getOffset() : 0))); + OS << format(" => {0x%8.8"PRIx64"}", (uvalue + (cu ? cu->getOffset() : 0))); } const char* From benny.kra at googlemail.com Sat Nov 5 11:20:52 2011 From: benny.kra at googlemail.com (Benjamin Kramer) Date: Sat, 05 Nov 2011 16:20:52 -0000 Subject: [llvm-commits] [llvm] r143815 - /llvm/trunk/test/lit.cfg Message-ID: <20111105162053.09A712A6C12C@llvm.org> Author: d0k Date: Sat Nov 5 11:20:52 2011 New Revision: 143815 URL: http://llvm.org/viewvc/llvm-project?rev=143815&view=rev Log: Update lit's list of tools. 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=143815&r1=143814&r2=143815&view=diff ============================================================================== --- llvm/trunk/test/lit.cfg (original) +++ llvm/trunk/test/lit.cfg Sat Nov 5 11:20:52 2011 @@ -162,12 +162,14 @@ r"\bllc\b", r"\blli\b", r"\bllvm-ar\b", r"\bllvm-as\b", r"\bllvm-bcanalyzer\b", r"\bllvm-config\b", - r"\bllvm-diff\b", r"\bllvm-dis\b", + r"\bllvm-cov\b", r"\bllvm-diff\b", + r"\bllvm-dis\b", r"\bllvm-dwarfdump\b", r"\bllvm-extract\b", r"\bllvm-ld\b", r"\bllvm-link\b", r"\bllvm-mc\b", - r"\bllvm-nm\b", r"\bllvm-prof\b", - r"\bllvm-ranlib\b", r"\bllvm-shlib\b", - r"\bllvm-stub\b", r"\bllvm2cpp\b", + r"\bllvm-nm\b", r"\bllvm-objdump\b", + r"\bllvm-prof\b", r"\bllvm-ranlib\b", + r"\bllvm-rtdyld\b", r"\bllvm-shlib\b", + r"\bllvm-size\b", r"\bllvm-stub\b", # Don't match '-llvmc'. r"(? Author: tbrethou Date: Sat Nov 5 14:40:17 2011 New Revision: 143817 URL: http://llvm.org/viewvc/llvm-project?rev=143817&view=rev Log: Add agenda. Modified: www/trunk/devmtg/2011-11/index.html Modified: www/trunk/devmtg/2011-11/index.html URL: http://llvm.org/viewvc/llvm-project/www/trunk/devmtg/2011-11/index.html?rev=143817&r1=143816&r2=143817&view=diff ============================================================================== --- www/trunk/devmtg/2011-11/index.html (original) +++ www/trunk/devmtg/2011-11/index.html Sat Nov 5 14:40:17 2011 @@ -76,18 +76,55 @@

    Agenda
    -

    The deadline for talk proposals has passed. Those who submitted a talk proposal will be notified of their status shortly. The agenda will be posted closer to the meeting.

    -

    -There will be 3 classes of sessions -

    • Keynote
    • -
    • Technical
    • -
    • Birds-of-a-feather (BoF).
    • -
    -

    -

    For examples from last year's meeting, visit the following: -http://llvm.org/devmtg/2010-11/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TimeTalkLocation
    9:00 - 9:20Welcome
    Chris Lattner, Apple Inc.
    Main Hall
    9:20 - 10:05Integrating LLVM into FreeBSD
    Brooks Davis, The FreeBSD Project
    Main Hall
    Intel OpenCL SDK Vectorizer
    Nadav Rotem, Intel
    Second Hall
    10:05 - 10:50Clang MapReduce -- Automatic C++ Refactoring at Google Scale
    Chandler Carruth, Google
    Main Hall
    PTX Back-End: GPU Programming With LLVM
    Justin Holewinski, Ohio State
    Second Hall
    Improving LLVM Testing
    David Blaikie, Microsoft
    TBD
    10:50 - 11:05BreakTBD
    11:05 - 11:50Extending Clang
    Doug Gregor, Apple Inc.
    Main Hall
    Porting LLVM to a Next Generation DSP
    Taylor Simpson, QuIC
    Second Hall
    11:50 - 12:35DXR: Semantic Code Browsing with Clang
    Joshua Cranmer, Mozilla
    Main Hall
    LLVM MC In Practice
    Jim Grosbach, Owen Anderson Apple Inc.
    Second Hall
    12:35 - 1:35LunchTBD
    1:35 - 2:20Using clang in the Chromium project
    Nico Weber, Hans Wennborg, Google
    Main Hall
    Polly - First successful optimizations - How to proceed?
    Tobias Grosser, ENS/INRIA
    Second Hall
    MC Linkers BOF
    Luba Tang, Mediatek
    TBD
    2:20 - 3:05Android Renderscript
    Stephen Hines, Google
    Main Hall
    SKIR: Just-in-Time Compilation for Parallelism with LLVM
    Jeff Fifield, University of Colorado
    Second Hall
    Improving the Clang Driver
    James Molloy, ARM
    TBD
    3:05 - 3:45PostersTBD
    3:45 - 4:30Register Allocation in LLVM 3.0
    Jakob Olesen, Apple
    Main Hall
    Exporting 3D scenes from Maya to WebGL using clang and LLVM
    Jochen Wilhelmy, consultant
    Second Hall
    4:30 - 5:15Super-optimizing LLVM IR
    Duncan Sands, DeepBlueCapital
    Main Hall
    Finding races and memory errors with LLVM instrumentation
    Konstantin Serebryany, Google
    Second Hall
    Bitcode Portability/Versioning
    Stephen Hines, David Sehr, Google
    TBD
    4:30 - 5:10Thread Safety Annotations in Clang
    DeLesley Hutchins, Google
    Almaden Ballroom
    Backend/Infrastructure Super BoF
    Jim Grosbach, Apple
    Second Hall
    Community Event Planning
    David Kipping, Qualcomm
    TBD
    6:30 - 9:30Dinner (Il Fornaio - Separate registration required)

    +
    Dinner

    Dinner attendance is capped at 140 and you must select this option during the registration process in order to attend.

    Dinner will be held after the meeting has concluded. The exact start time will be set once the meeting agenda is formalized. Dinner will be held at Il Fornaio which is within walking distance of the Marriott. From tonic at nondot.org Sat Nov 5 14:44:44 2011 From: tonic at nondot.org (Tanya Lattner) Date: Sat, 05 Nov 2011 19:44:44 -0000 Subject: [llvm-commits] [www] r143818 - /www/trunk/devmtg/2011-11/index.html Message-ID: <20111105194444.56F9D2A6C12C@llvm.org> Author: tbrethou Date: Sat Nov 5 14:44:43 2011 New Revision: 143818 URL: http://llvm.org/viewvc/llvm-project?rev=143818&view=rev Log: Clean up table. Modified: www/trunk/devmtg/2011-11/index.html Modified: www/trunk/devmtg/2011-11/index.html URL: http://llvm.org/viewvc/llvm-project/www/trunk/devmtg/2011-11/index.html?rev=143818&r1=143817&r2=143818&view=diff ============================================================================== --- www/trunk/devmtg/2011-11/index.html (original) +++ www/trunk/devmtg/2011-11/index.html Sat Nov 5 14:44:43 2011 @@ -83,7 +83,7 @@ 9:00 - 9:20Welcome
    Chris Lattner, Apple Inc.Main Hall -9:20 - 10:05Integrating LLVM into FreeBSD
    Brooks Davis, The FreeBSD ProjectMain Hall +9:20 - 10:05Integrating LLVM into FreeBSD
    Brooks Davis, The FreeBSD ProjectMain Hall Intel OpenCL SDK Vectorizer
    Nadav Rotem, IntelSecond Hall 10:05 - 10:50Clang MapReduce -- Automatic C++ Refactoring at Google Scale
    Chandler Carruth, GoogleMain Hall @@ -108,9 +108,9 @@ SKIR: Just-in-Time Compilation for Parallelism with LLVM
    Jeff Fifield, University of ColoradoSecond Hall Improving the Clang Driver
    James Molloy, ARMTBD -3:05 - 3:45PostersTBD +3:05 - 3:45PostersTBD -3:45 - 4:30Register Allocation in LLVM 3.0
    Jakob Olesen, AppleMain Hall +3:45 - 4:30Register Allocation in LLVM 3.0
    Jakob Olesen, AppleMain Hall Exporting 3D scenes from Maya to WebGL using clang and LLVM
    Jochen Wilhelmy, consultantSecond Hall 4:30 - 5:15Super-optimizing LLVM IR
    Duncan Sands, DeepBlueCapitalMain Hall From tonic at nondot.org Sat Nov 5 14:45:50 2011 From: tonic at nondot.org (Tanya Lattner) Date: Sat, 05 Nov 2011 19:45:50 -0000 Subject: [llvm-commits] [www] r143819 - /www/trunk/devmtg/2011-11/index.html Message-ID: <20111105194550.EE7A82A6C12C@llvm.org> Author: tbrethou Date: Sat Nov 5 14:45:50 2011 New Revision: 143819 URL: http://llvm.org/viewvc/llvm-project?rev=143819&view=rev Log: Update hall. Modified: www/trunk/devmtg/2011-11/index.html Modified: www/trunk/devmtg/2011-11/index.html URL: http://llvm.org/viewvc/llvm-project/www/trunk/devmtg/2011-11/index.html?rev=143819&r1=143818&r2=143819&view=diff ============================================================================== --- www/trunk/devmtg/2011-11/index.html (original) +++ www/trunk/devmtg/2011-11/index.html Sat Nov 5 14:45:50 2011 @@ -117,7 +117,7 @@ Finding races and memory errors with LLVM instrumentation
    Konstantin Serebryany, GoogleSecond Hall Bitcode Portability/Versioning
    Stephen Hines, David Sehr, GoogleTBD -4:30 - 5:10Thread Safety Annotations in Clang
    DeLesley Hutchins, GoogleAlmaden Ballroom +4:30 - 5:10Thread Safety Annotations in Clang
    DeLesley Hutchins, GoogleMain Hall Backend/Infrastructure Super BoF
    Jim Grosbach, AppleSecond Hall Community Event Planning
    David Kipping, QualcommTBD From tonic at nondot.org Sat Nov 5 15:07:29 2011 From: tonic at nondot.org (Tanya Lattner) Date: Sat, 05 Nov 2011 20:07:29 -0000 Subject: [llvm-commits] [www] r143820 - /www/trunk/devmtg/2011-11/index.html Message-ID: <20111105200730.089242A6C12C@llvm.org> Author: tbrethou Date: Sat Nov 5 15:07:29 2011 New Revision: 143820 URL: http://llvm.org/viewvc/llvm-project?rev=143820&view=rev Log: Update some titles. Modified: www/trunk/devmtg/2011-11/index.html Modified: www/trunk/devmtg/2011-11/index.html URL: http://llvm.org/viewvc/llvm-project/www/trunk/devmtg/2011-11/index.html?rev=143820&r1=143819&r2=143820&view=diff ============================================================================== --- www/trunk/devmtg/2011-11/index.html (original) +++ www/trunk/devmtg/2011-11/index.html Sat Nov 5 15:07:29 2011 @@ -88,7 +88,7 @@ 10:05 - 10:50Clang MapReduce -- Automatic C++ Refactoring at Google Scale
    Chandler Carruth, GoogleMain Hall PTX Back-End: GPU Programming With LLVM
    Justin Holewinski, Ohio StateSecond Hall -Improving LLVM Testing
    David Blaikie, MicrosoftTBD +Improving LLVM Testing BOF
    David BlaikieTBD 10:50 - 11:05BreakTBD @@ -106,7 +106,7 @@ 2:20 - 3:05Android Renderscript
    Stephen Hines, GoogleMain Hall SKIR: Just-in-Time Compilation for Parallelism with LLVM
    Jeff Fifield, University of ColoradoSecond Hall -Improving the Clang Driver
    James Molloy, ARMTBD +Improving the Clang Driver BOF
    James Molloy, ARMTBD 3:05 - 3:45PostersTBD @@ -115,10 +115,10 @@ 4:30 - 5:15Super-optimizing LLVM IR
    Duncan Sands, DeepBlueCapitalMain Hall Finding races and memory errors with LLVM instrumentation
    Konstantin Serebryany, GoogleSecond Hall -Bitcode Portability/Versioning
    Stephen Hines, David Sehr, GoogleTBD +Bitcode Portability/Versioning BOF
    Stephen Hines, David Sehr, GoogleTBD 4:30 - 5:10Thread Safety Annotations in Clang
    DeLesley Hutchins, GoogleMain Hall -Backend/Infrastructure Super BoF
    Jim Grosbach, AppleSecond Hall +Backend/Infrastructure Super BoF
    Jim Grosbach, Apple Inc.Second Hall Community Event Planning
    David Kipping, QualcommTBD 6:30 - 9:30Dinner (Il Fornaio - Separate registration required) From mcrosier at apple.com Sat Nov 5 15:16:15 2011 From: mcrosier at apple.com (Chad Rosier) Date: Sat, 05 Nov 2011 20:16:15 -0000 Subject: [llvm-commits] [llvm] r143821 - in /llvm/trunk: lib/Target/ARM/ARMFastISel.cpp test/CodeGen/ARM/fast-isel-call.ll Message-ID: <20111105201615.662902A6C12C@llvm.org> Author: mcrosier Date: Sat Nov 5 15:16:15 2011 New Revision: 143821 URL: http://llvm.org/viewvc/llvm-project?rev=143821&view=rev Log: Add support for passing i1, i8, and i16 call parameters. Also, be sure to zero-extend the constant integer encoding. Test case provides testing for both call parameters and materialization of i1, i8, and i16 types. Added: llvm/trunk/test/CodeGen/ARM/fast-isel-call.ll Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMFastISel.cpp?rev=143821&r1=143820&r2=143821&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMFastISel.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Sat Nov 5 15:16:15 2011 @@ -557,7 +557,7 @@ unsigned ImmReg = createResultReg(TLI.getRegClassFor(SrcVT)); AddOptionalDefs(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, TII.get(Opc), ImmReg) - .addImm(CI->getSExtValue())); + .addImm(CI->getZExtValue())); return ImmReg; } @@ -1599,33 +1599,21 @@ switch (VA.getLocInfo()) { case CCValAssign::Full: break; case CCValAssign::SExt: { - bool Emitted = FastEmitExtend(ISD::SIGN_EXTEND, VA.getLocVT(), - Arg, ArgVT, Arg); - assert(Emitted && "Failed to emit a sext!"); (void)Emitted; - Emitted = true; - ArgVT = VA.getLocVT(); + EVT DestVT = VA.getLocVT(); + unsigned ResultReg = ARMEmitIntExt(ArgVT, Arg, DestVT, + /*isZExt*/false); + assert (ResultReg != 0 && "Failed to emit a sext"); + Arg = ResultReg; break; } + case CCValAssign::AExt: + // Intentional fall-through. Handle AExt and ZExt. case CCValAssign::ZExt: { - bool Emitted = FastEmitExtend(ISD::ZERO_EXTEND, VA.getLocVT(), - Arg, ArgVT, Arg); - assert(Emitted && "Failed to emit a zext!"); (void)Emitted; - Emitted = true; - ArgVT = VA.getLocVT(); - break; - } - case CCValAssign::AExt: { - bool Emitted = FastEmitExtend(ISD::ANY_EXTEND, VA.getLocVT(), - Arg, ArgVT, Arg); - if (!Emitted) - Emitted = FastEmitExtend(ISD::ZERO_EXTEND, VA.getLocVT(), - Arg, ArgVT, Arg); - if (!Emitted) - Emitted = FastEmitExtend(ISD::SIGN_EXTEND, VA.getLocVT(), - Arg, ArgVT, Arg); - - assert(Emitted && "Failed to emit a aext!"); (void)Emitted; - ArgVT = VA.getLocVT(); + EVT DestVT = VA.getLocVT(); + unsigned ResultReg = ARMEmitIntExt(ArgVT, Arg, DestVT, + /*isZExt*/true); + assert (ResultReg != 0 && "Failed to emit a sext"); + Arg = ResultReg; break; } case CCValAssign::BCvt: { @@ -1643,7 +1631,7 @@ if (VA.isRegLoc() && !VA.needsCustom()) { BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, TII.get(TargetOpcode::COPY), VA.getLocReg()) - .addReg(Arg); + .addReg(Arg); RegArgs.push_back(VA.getLocReg()); } else if (VA.needsCustom()) { // TODO: We need custom lowering for vector (v2f64) args. @@ -1962,8 +1950,8 @@ Type *ArgTy = (*i)->getType(); MVT ArgVT; - // FIXME: Should be able to handle i1, i8, and/or i16 parameters. - if (!isTypeLegal(ArgTy, ArgVT)) + if (!isTypeLegal(ArgTy, ArgVT) && ArgVT != MVT::i16 && ArgVT != MVT::i8 && + ArgVT != MVT::i1) return false; unsigned OriginalAlignment = TD.getABITypeAlignment(ArgTy); Flags.setOrigAlign(OriginalAlignment); Added: llvm/trunk/test/CodeGen/ARM/fast-isel-call.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-call.ll?rev=143821&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/ARM/fast-isel-call.ll (added) +++ llvm/trunk/test/CodeGen/ARM/fast-isel-call.ll Sat Nov 5 15:16:15 2011 @@ -0,0 +1,67 @@ +; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-darwin | FileCheck %s --check-prefix=ARM +; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-darwin | FileCheck %s --check-prefix=THUMB + +define i32 @t0(i1 zeroext %a) nounwind { + %1 = zext i1 %a to i32 + ret i32 %1 +} + +define i32 @t1(i8 signext %a) nounwind { + %1 = sext i8 %a to i32 + ret i32 %1 +} + +define i32 @t2(i8 zeroext %a) nounwind { + %1 = zext i8 %a to i32 + ret i32 %1 +} + +define i32 @t3(i16 signext %a) nounwind { + %1 = sext i16 %a to i32 + ret i32 %1 +} + +define i32 @t4(i16 zeroext %a) nounwind { + %1 = zext i16 %a to i32 + ret i32 %1 +} + +define void @foo(i8 %a, i16 %b) nounwind { +; ARM: foo +; THUMB: foo +;; Materialize i1 1 +; ARM: movw r2, #1 +;; zero-ext +; ARM: and r2, r2, #1 +; THUMB: and r2, r2, #1 + %1 = call i32 @t0(i1 zeroext 1) +; ARM: sxtb r2, r1 +; ARM: mov r0, r2 +; THUMB: sxtb r2, r1 +; THUMB: mov r0, r2 + %2 = call i32 @t1(i8 signext %a) +; ARM: uxtb r2, r1 +; ARM: mov r0, r2 +; THUMB: uxtb r2, r1 +; THUMB: mov r0, r2 + %3 = call i32 @t2(i8 zeroext %a) +; ARM: sxth r2, r1 +; ARM: mov r0, r2 +; THUMB: sxth r2, r1 +; THUMB: mov r0, r2 + %4 = call i32 @t3(i16 signext %b) +; ARM: uxth r2, r1 +; ARM: mov r0, r2 +; THUMB: uxth r2, r1 +; THUMB: mov r0, r2 + %5 = call i32 @t4(i16 zeroext %b) + +;; A few test to check materialization +;; Note: i1 1 was materialized with t1 call +; ARM: movw r1, #255 +%6 = call i32 @t2(i8 zeroext 255) +; ARM: movw r1, #65535 +; THUMB: movw r1, #65535 +%7 = call i32 @t4(i16 zeroext 65535) + ret void +} From chenwj at iis.sinica.edu.tw Sat Nov 5 04:10:29 2011 From: chenwj at iis.sinica.edu.tw (=?utf-8?B?6Zmz6Z+L5Lu7?=) Date: Sat, 5 Nov 2011 17:10:29 +0800 Subject: [llvm-commits] [PATCH][docs/GettingStarted.html] Add git imap config for Traditional Chinese GMail account Message-ID: <20111105091029.GA48964@cs.nctu.edu.tw> Hi, "[Gmail]/Drafts" is only for English GMail account. This patch give an example for those developers who use Traditional Chinese GMail account. Thanks. :) Regards, chenwj -- Wei-Ren Chen (???) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 -------------- next part -------------- A non-text attachment was scrubbed... Name: GettingStarted.html.patch Type: text/x-diff Size: 415 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111105/668c374d/attachment.bin From chandlerc at gmail.com Sat Nov 5 16:18:59 2011 From: chandlerc at gmail.com (Chandler Carruth) Date: Sat, 05 Nov 2011 21:18:59 -0000 Subject: [llvm-commits] [llvm] r143834 - /llvm/trunk/CMakeLists.txt Message-ID: <20111105211859.43DE92A6C12C@llvm.org> Author: chandlerc Date: Sat Nov 5 16:18:59 2011 New Revision: 143834 URL: http://llvm.org/viewvc/llvm-project?rev=143834&view=rev Log: CMake should join the party in a post 3.0 world. ;] This brings CMake's version in-line with the configure-based version. Modified: llvm/trunk/CMakeLists.txt Modified: llvm/trunk/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=143834&r1=143833&r2=143834&view=diff ============================================================================== --- llvm/trunk/CMakeLists.txt (original) +++ llvm/trunk/CMakeLists.txt Sat Nov 5 16:18:59 2011 @@ -10,7 +10,7 @@ "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" ) -set(PACKAGE_VERSION "3.0") +set(PACKAGE_VERSION "3.1svn") set_property(GLOBAL PROPERTY USE_FOLDERS ON) From tonic at nondot.org Sat Nov 5 19:14:18 2011 From: tonic at nondot.org (Tanya Lattner) Date: Sun, 06 Nov 2011 00:14:18 -0000 Subject: [llvm-commits] [www] r143843 - /www/trunk/devmtg/2011-11/index.html Message-ID: <20111106001418.532912A6C12C@llvm.org> Author: tbrethou Date: Sat Nov 5 19:14:18 2011 New Revision: 143843 URL: http://llvm.org/viewvc/llvm-project?rev=143843&view=rev Log: Add talk descriptions. Modified: www/trunk/devmtg/2011-11/index.html Modified: www/trunk/devmtg/2011-11/index.html URL: http://llvm.org/viewvc/llvm-project/www/trunk/devmtg/2011-11/index.html?rev=143843&r1=143842&r2=143843&view=diff ============================================================================== --- www/trunk/devmtg/2011-11/index.html (original) +++ www/trunk/devmtg/2011-11/index.html Sat Nov 5 19:14:18 2011 @@ -125,6 +125,106 @@

    +

    +Integrating LLVM into FreeBSD
    +Brooks Davis - The FreeBSD Project
    +The FreeBSD Project has been actively working to incorporate tools from the LLVM project into our base system including clang, libc++, and possibly lldb. This talk will cover our efforts so far including our plans to ship FreeBSD 9.0 with clang in the base system. I will cover both our current work to replace GPL licensed components with BSD(ish) licensed components and future or experimental work to incorporate new technologies made possible by LLVM. +
    + +Clang MapReduce -- Automatic C++ Refactoring at Google Scale
    +Chandler Carruth - Google
    +Google has over 100 million lines of code, and our biggest programming language is C++. We have a single, shared codebase developed primarily on mainline. We build every binary and all of its libraries from scratch every time, allowing us to incrementally evolve APIs and libraries over time. The entire development process is extremely incremental in nature, and even API-breaking changes are a regular occurrence. However, for core libraries used throughout the codebase, this development model is a huge challenge: how do we incrementally evolve an API in use by tens of thousands of other libraries? The answer is to use Clang to automatically refactor APIs and their users across the codebase. How do we scale Clang up to possibly the single largest unified codebase in the world? The same way Google scales anything else: MapReduce. By coupling Clang???s library design and architecture to existing Google infrastructure we can automatically compile, analyze, and refactor the ent ire Google codebase in minutes. In this talk, I will dive into the challenges of refactoring C++ code, how we???re using Clang and making it even better at solving them, and how we scale these solutions to the size of our codebase. +
    + +Thread Safety Annotations in Clang
    +DeLesley Hutchins - Google
    +This talk introduces the new thread safety annotations for Clang and describes the static analysis used to check them. These annotations can be used to specify properties such as whether a variable is guarded by a particular mutex, or a desired lock acquisition order. These annotations were originally introduced in gcc, and have recently been reimplemented in Clang. +
    + +Extending Clang
    +Doug Gregor - Apple
    +You have an idea for the next great C(++) language feature, but how do you realize that idea? This talk will describe how to extend Clang to add new language features, from parsing and AST-construction basics to properly handling C++ templates and ensuring smooth integration into IDEs. Particular attention will be given to capturing source information in ASTs, developing bulletproof semantic analysis, and write proper regression tests to exercise the various aspects of a language feature. +
    + +Super-optimizing LLVM IR
    +Duncan Sands - DeepBlueCapital / CNRS
    +I will describe a tool to harvest expression sequences from LLVM IR and automatically discover equivalent simplified expressions. The original version of this tool only looked for sub-expressions that were equivalent to the whole, but nonetheless discovered many simplifications missed by the LLVM optimizers (most of these have now been implemented in LLVM). The tool has since been extended to a general super optimizer by Rafael Auler. +
    + +Register Allocation in LLVM 3.0
    +Jakob Olesen - Apple
    +An overview of the features in LLVM's new register allocator +
    + +SKIR: Just-in-Time Compilation for Parallelism with LLVM
    +Jeff Fifield - University of Colorado
    +The Stream and Kernel Intermediate Representation (SKIR) is a small set of LLVM intrinsics for expressing parallel computation as a graph of sequential processes (kernels) communicating over abstract data channels (streams). At runtime, programs use the SKIR intrinsics to identify functions to use as kernels, to connect kernels together using streams, and to execute resulting program graphs. Formally, the stream parallelism expressed by SKIR programs can be viewed as a generalization of Kahn process networks. More practically, we can use SKIR as a compilation target for high level languages and frameworks containing this style of program decomposition and communication. We have used SKIR to implement a compiler for the StreamIt language, to create a C++ user library for stream/data/pipeline parallel programming, and to enable parallel programming for JavaScript applications. SKIR is implemented on top of the LLVM JIT compiler and a work stealing task scheduler. We use runtim e compilation because of the runtime construction of program graphs, so that we can support dynamic optimization, and so that we can perform dynamic recompilation for heterogeneous targets. In this talk I will describe the SKIR intrinsics and programming model, and briefly describe high level language support that has been implemented for SKIR. I will present the compilation and optimization techniques used to transform the sequential LLVM+SKIR input code into concurrent code which can be executed in parallel using dynamic scheduling techniques. I will also describe how we can use LLVM JIT compilation to dynamically increase or decrease the amount of parallelism in a SKIR program depending on runtime hardware and application characteristics. Finally, I will describe how we can further accelerate SKIR program kernels using JIT compilation, our OpenCL backend, and GPUs. +
    + +LLVM MC In Practice
    +Jim Grosbach, Owen Anderson - Apple Inc.
    +Overview of projects and new developments in the LLVM MC layer, with emphasis on the MCJIT, binary analysis, ARM integrated assembler and ARM disassembler. +
    + +Exporting 3D scenes from Maya to WebGL using clang and LLVM
    +Jochen Wilhelmy - Engineering consultant Wilhelmy
    +Modern content creation tools such as Autodesk Maya can be seen as graphical programming language. Features like animation of attributes, embedded scripts, shading networks and vertex deformations can be translated to c++, then compiled to LLVM IR and distributed to CPU and GPU. An award winning WebGL demo is shown which was produced using this approach. +
    + +DXR: Semantic Code Browsing with Clang
    +Joshua Cranmer - Mozilla
    +DXR is a source code browser which uses a clang plugin to determine information about all types, variables, and functions in a program to make reading, searching, and understanding source code easier. +
    + +PTX Back-End: GPU Programming With LLVM
    +Justin Holewinski - Ohio State University
    +In this talk, the PTX back-end for LLVM will be discussed, including its' past, present, and future. The current status of the back-end will be explored, with an emphasis on the portions of the LLVM IR instruction set and PTX intrinsics that are currently supported during code generation. This talk will also highlight the difficulties and issues that have been discovered while writing an LLVM back-end for a virtual ISA such as PTX, such as infinite register files. Through-out the talk, examples will be provided to highlight key features of the back-end and show preliminary performance data. +
    +In addition to back-end details, this talk will also highlight the use of Clang as a front-end for generating PTX code for NVIDIA GPUs. Through the use of Clang and the CUDA Driver API, GPGPU programs can be developed that harness the optimization power of the LLVM compiler infrastructure. Finally, the talk will conclude with an exploration of the open issues that remain in the backend, and a discussion on how the back-end can be used within larger GPGPU compiler projects. +
    + +Finding races and memory errors with LLVM instrumentation
    +Konstantin Serebryany - Google
    +We will present two dynamic testing tools based on compile-time instrumentation, both tools use the LLVM compiler. +

    • AddressSanitizer (ASan) finds memory bugs, such as use-after-free and out-of-bound accesses to heap and stack. This tool could be seen as a partial replacement for Valgrind and similar tools. The major advantages over Valgrind are the speed (less than 2x slowdown on average) and the ability to handle bugs related to stack and globals. +
    • +ThreadSanitizer (TSan) finds data races. It uses the same race detection algorithm as the Valgrind-based TSan, but compile-time instrumentation allows it to be much faster (2x-4x slowdown). +
    +We will also share our experience in deploying theses testing tools in large software projects. + +Intel OpenCL SDK Vectorizer
    +Nadav Rotem - Intel +In this talk, we will present our OpenCL SDK and its core technology ??? the vectorizer compiler. We plan to present an overview of our vectorizer and discuss our experience with the LLVM compiler toolkit over the last few years. We will discuss some of our design decisions and our and plans for future features (future instruction sets, vector select, predicated instructions, etc). +
    + +Using clang in the Chromium project
    +Nico Weber, Hans Wennborg - Google
    +The Chromium project is the open-source foundation on which the Google Chrome web browser is built. It is a multi-million line codebase that uses open source libraries such as WebKit, libpng, skia, ffmpeg, and leveldb. We have been able to build Chromium using clang since October 2010, and since then we've continuously expanded what we use clang for: as continuous build compiler to catch bugs with clang's superior diagnostics, with project-specific clang plugins that enforce coding-style guidelines or find domain-specific bugs in V8, and starting with Chrome 15 as production compiler on Mac OS X. We will share our experiences using clang in a mature open-source project and cover, e.g., how clang's fabled compilation speed fares in a distributed build system with 100 parallel jobs, which parts of a browser blow up when the default compiler is changed, and which of clang's warnings catch the most bugs in practice. +
    + +Android Renderscript
    +Stephen Hines - Google
    +Renderscript is Android's advanced 3D graphics rendering and compute API. It provides a portable C99-based language with extensions to facilitate common use cases for enhancing graphics and thread level parallelism. The Renderscript compiler frontend is based on Clang/LLVM. It emits a portable bitcode format for the actual compiled script code, as well as reflects a Java interface for developers to control the execution of the compiled bitcode. Executable machine code is then generated from this bitcode by an LLVM backend on the device. Renderscript is thus able to provide a mechanism by which Android developers can improve performance of their applications while retaining portability. +
    +This talk focuses on the design and implementation of Renderscript using Clang/LLVM. Renderscript leverages Clang's AST to provide a Java reflection of globally visible symbols in the compilation unit. This includes both global variables as well as invocable parameterized functions. We also transform the Clang-based AST before emitting bitcode to provide support for reference-counted types that span the Renderscript/Java memory domains. Renderscript uses bitcode as a portable code format so that we can leverage other hardware architectures in addition to the CPU in the future (GPU, DSP). +
    +Interesting facts: +
      +
    • Difference in Clang source: 6 lines (all upstreamable with a bit of configuration logic)
    • +
    • Difference in LLVM source: ~300 lines (possibly worth upstreaming, but some fixes for legacy JIT mode are no longer relevant to TOT) +
    • The frontend compiler is layered completely on top of Clang, so everything we use is sub-classed and/or recombined for our purposes in the llvm-rs-cc compiler driver. +
    • The backend compiler is stripped down to fit on a tablet/smartphone stack. + +Porting LLVM to a Next Generation DSP
      +Taylor Simpson - Qualcomm Innovation Center
      +This talk will describe our experiences in porting LLVM to Qualcomm's latest generation DSP, Hexagon. The overall experience of porting to a new architecture will be discussed. The challenges of achieving high quality code generation for a VLIW with LLVM with also be outlined. +
      + +Polly - First successful optimizations - How to proceed?
      +Tobias Grosser - ENS/INRIA
      +Polly, the LLVM Polyhedral Optimizer, was presented one year ago. At that point, only the basic infrastructure was in place and many important parts not even started. Even though Polly is still more research than production quality, we made big improvements during the last 12 months. Polly itself moved to the LLVM infrastructure with Bugtracker, Buildbot and VCS. It can now conveniently be loaded into clang as part of clang -O3. We also implemented automatic SIMD and OpenMP code generation and we created a bridge to the external PoCC optimizer. With PoCC and Polly, we were able to compile and _optimize_ the first benchmarks fully automatically and have shown significant improvements over clang -O3. In this talk we give a detailed update about the current status and want to present ideas on how to move further. These will include both research relevant ideas like automatic OpenCL code generation as well as concepts on how to develop robust loop transformations and vectorizati on for mainstream use. http://polly.grosser.es +

      +
      Dinner

      Dinner attendance is capped at 140 and you must select this option during the registration process in order to attend.

      Dinner will be held after the meeting has concluded. The exact start time will be set once the meeting agenda is formalized. Dinner will be held at Il Fornaio which is within walking distance of the Marriott. From tonic at nondot.org Sat Nov 5 19:21:09 2011 From: tonic at nondot.org (Tanya Lattner) Date: Sun, 06 Nov 2011 00:21:09 -0000 Subject: [llvm-commits] [www] r143844 - /www/trunk/devmtg/2011-11/index.html Message-ID: <20111106002109.870F32A6C12C@llvm.org> Author: tbrethou Date: Sat Nov 5 19:21:09 2011 New Revision: 143844 URL: http://llvm.org/viewvc/llvm-project?rev=143844&view=rev Log: Clean up descriptions. Modified: www/trunk/devmtg/2011-11/index.html Modified: www/trunk/devmtg/2011-11/index.html URL: http://llvm.org/viewvc/llvm-project/www/trunk/devmtg/2011-11/index.html?rev=143844&r1=143843&r2=143844&view=diff ============================================================================== --- www/trunk/devmtg/2011-11/index.html (original) +++ www/trunk/devmtg/2011-11/index.html Sat Nov 5 19:21:09 2011 @@ -129,60 +129,71 @@ Integrating LLVM into FreeBSD
      Brooks Davis - The FreeBSD Project
      The FreeBSD Project has been actively working to incorporate tools from the LLVM project into our base system including clang, libc++, and possibly lldb. This talk will cover our efforts so far including our plans to ship FreeBSD 9.0 with clang in the base system. I will cover both our current work to replace GPL licensed components with BSD(ish) licensed components and future or experimental work to incorporate new technologies made possible by LLVM. -
      +

      +

      Clang MapReduce -- Automatic C++ Refactoring at Google Scale
      Chandler Carruth - Google
      Google has over 100 million lines of code, and our biggest programming language is C++. We have a single, shared codebase developed primarily on mainline. We build every binary and all of its libraries from scratch every time, allowing us to incrementally evolve APIs and libraries over time. The entire development process is extremely incremental in nature, and even API-breaking changes are a regular occurrence. However, for core libraries used throughout the codebase, this development model is a huge challenge: how do we incrementally evolve an API in use by tens of thousands of other libraries? The answer is to use Clang to automatically refactor APIs and their users across the codebase. How do we scale Clang up to possibly the single largest unified codebase in the world? The same way Google scales anything else: MapReduce. By coupling Clang???s library design and architecture to existing Google infrastructure we can automatically compile, analyze, and refactor the ent ire Google codebase in minutes. In this talk, I will dive into the challenges of refactoring C++ code, how we???re using Clang and making it even better at solving them, and how we scale these solutions to the size of our codebase. -
      +

      +

      Thread Safety Annotations in Clang
      DeLesley Hutchins - Google
      This talk introduces the new thread safety annotations for Clang and describes the static analysis used to check them. These annotations can be used to specify properties such as whether a variable is guarded by a particular mutex, or a desired lock acquisition order. These annotations were originally introduced in gcc, and have recently been reimplemented in Clang. -
      - +

      + +

      Extending Clang
      Doug Gregor - Apple
      You have an idea for the next great C(++) language feature, but how do you realize that idea? This talk will describe how to extend Clang to add new language features, from parsing and AST-construction basics to properly handling C++ templates and ensuring smooth integration into IDEs. Particular attention will be given to capturing source information in ASTs, developing bulletproof semantic analysis, and write proper regression tests to exercise the various aspects of a language feature. -
      +

      +

      Super-optimizing LLVM IR
      Duncan Sands - DeepBlueCapital / CNRS
      I will describe a tool to harvest expression sequences from LLVM IR and automatically discover equivalent simplified expressions. The original version of this tool only looked for sub-expressions that were equivalent to the whole, but nonetheless discovered many simplifications missed by the LLVM optimizers (most of these have now been implemented in LLVM). The tool has since been extended to a general super optimizer by Rafael Auler. -
      +

      +

      Register Allocation in LLVM 3.0
      Jakob Olesen - Apple
      An overview of the features in LLVM's new register allocator -
      +

      +

      SKIR: Just-in-Time Compilation for Parallelism with LLVM
      Jeff Fifield - University of Colorado
      The Stream and Kernel Intermediate Representation (SKIR) is a small set of LLVM intrinsics for expressing parallel computation as a graph of sequential processes (kernels) communicating over abstract data channels (streams). At runtime, programs use the SKIR intrinsics to identify functions to use as kernels, to connect kernels together using streams, and to execute resulting program graphs. Formally, the stream parallelism expressed by SKIR programs can be viewed as a generalization of Kahn process networks. More practically, we can use SKIR as a compilation target for high level languages and frameworks containing this style of program decomposition and communication. We have used SKIR to implement a compiler for the StreamIt language, to create a C++ user library for stream/data/pipeline parallel programming, and to enable parallel programming for JavaScript applications. SKIR is implemented on top of the LLVM JIT compiler and a work stealing task scheduler. We use runtim e compilation because of the runtime construction of program graphs, so that we can support dynamic optimization, and so that we can perform dynamic recompilation for heterogeneous targets. In this talk I will describe the SKIR intrinsics and programming model, and briefly describe high level language support that has been implemented for SKIR. I will present the compilation and optimization techniques used to transform the sequential LLVM+SKIR input code into concurrent code which can be executed in parallel using dynamic scheduling techniques. I will also describe how we can use LLVM JIT compilation to dynamically increase or decrease the amount of parallelism in a SKIR program depending on runtime hardware and application characteristics. Finally, I will describe how we can further accelerate SKIR program kernels using JIT compilation, our OpenCL backend, and GPUs. -
      - +

      + +

      LLVM MC In Practice
      Jim Grosbach, Owen Anderson - Apple Inc.
      Overview of projects and new developments in the LLVM MC layer, with emphasis on the MCJIT, binary analysis, ARM integrated assembler and ARM disassembler. -
      +

      +

      Exporting 3D scenes from Maya to WebGL using clang and LLVM
      Jochen Wilhelmy - Engineering consultant Wilhelmy
      Modern content creation tools such as Autodesk Maya can be seen as graphical programming language. Features like animation of attributes, embedded scripts, shading networks and vertex deformations can be translated to c++, then compiled to LLVM IR and distributed to CPU and GPU. An award winning WebGL demo is shown which was produced using this approach. -
      +

      +

      DXR: Semantic Code Browsing with Clang
      Joshua Cranmer - Mozilla
      DXR is a source code browser which uses a clang plugin to determine information about all types, variables, and functions in a program to make reading, searching, and understanding source code easier. -
      - +

      + +

      PTX Back-End: GPU Programming With LLVM
      Justin Holewinski - Ohio State University
      In this talk, the PTX back-end for LLVM will be discussed, including its' past, present, and future. The current status of the back-end will be explored, with an emphasis on the portions of the LLVM IR instruction set and PTX intrinsics that are currently supported during code generation. This talk will also highlight the difficulties and issues that have been discovered while writing an LLVM back-end for a virtual ISA such as PTX, such as infinite register files. Through-out the talk, examples will be provided to highlight key features of the back-end and show preliminary performance data.
      In addition to back-end details, this talk will also highlight the use of Clang as a front-end for generating PTX code for NVIDIA GPUs. Through the use of Clang and the CUDA Driver API, GPGPU programs can be developed that harness the optimization power of the LLVM compiler infrastructure. Finally, the talk will conclude with an exploration of the open issues that remain in the backend, and a discussion on how the back-end can be used within larger GPGPU compiler projects. -
      +

      +

      Finding races and memory errors with LLVM instrumentation
      Konstantin Serebryany - Google
      We will present two dynamic testing tools based on compile-time instrumentation, both tools use the LLVM compiler. @@ -191,17 +202,21 @@ ThreadSanitizer (TSan) finds data races. It uses the same race detection algorithm as the Valgrind-based TSan, but compile-time instrumentation allows it to be much faster (2x-4x slowdown).

    We will also share our experience in deploying theses testing tools in large software projects. +

    +

    Intel OpenCL SDK Vectorizer
    Nadav Rotem - Intel In this talk, we will present our OpenCL SDK and its core technology ??? the vectorizer compiler. We plan to present an overview of our vectorizer and discuss our experience with the LLVM compiler toolkit over the last few years. We will discuss some of our design decisions and our and plans for future features (future instruction sets, vector select, predicated instructions, etc). -
    +

    +

    Using clang in the Chromium project
    Nico Weber, Hans Wennborg - Google
    The Chromium project is the open-source foundation on which the Google Chrome web browser is built. It is a multi-million line codebase that uses open source libraries such as WebKit, libpng, skia, ffmpeg, and leveldb. We have been able to build Chromium using clang since October 2010, and since then we've continuously expanded what we use clang for: as continuous build compiler to catch bugs with clang's superior diagnostics, with project-specific clang plugins that enforce coding-style guidelines or find domain-specific bugs in V8, and starting with Chrome 15 as production compiler on Mac OS X. We will share our experiences using clang in a mature open-source project and cover, e.g., how clang's fabled compilation speed fares in a distributed build system with 100 parallel jobs, which parts of a browser blow up when the default compiler is changed, and which of clang's warnings catch the most bugs in practice. -
    +

    +

    Android Renderscript
    Stephen Hines - Google
    Renderscript is Android's advanced 3D graphics rendering and compute API. It provides a portable C99-based language with extensions to facilitate common use cases for enhancing graphics and thread level parallelism. The Renderscript compiler frontend is based on Clang/LLVM. It emits a portable bitcode format for the actual compiled script code, as well as reflects a Java interface for developers to control the execution of the compiled bitcode. Executable machine code is then generated from this bitcode by an LLVM backend on the device. Renderscript is thus able to provide a mechanism by which Android developers can improve performance of their applications while retaining portability. @@ -211,15 +226,18 @@ Interesting facts:

    • Difference in Clang source: 6 lines (all upstreamable with a bit of configuration logic)
    • -
    • Difference in LLVM source: ~300 lines (possibly worth upstreaming, but some fixes for legacy JIT mode are no longer relevant to TOT) -
    • The frontend compiler is layered completely on top of Clang, so everything we use is sub-classed and/or recombined for our purposes in the llvm-rs-cc compiler driver. -
    • The backend compiler is stripped down to fit on a tablet/smartphone stack. +
    • Difference in LLVM source: ~300 lines (possibly worth upstreaming, but some fixes for legacy JIT mode are no longer relevant to TOT)
    • +
    • The frontend compiler is layered completely on top of Clang, so everything we use is sub-classed and/or recombined for our purposes in the llvm-rs-cc compiler driver.
    • +
    • The backend compiler is stripped down to fit on a tablet/smartphone stack.
    • +

    +

    Porting LLVM to a Next Generation DSP
    Taylor Simpson - Qualcomm Innovation Center
    This talk will describe our experiences in porting LLVM to Qualcomm's latest generation DSP, Hexagon. The overall experience of porting to a new architecture will be discussed. The challenges of achieving high quality code generation for a VLIW with LLVM with also be outlined. -
    +

    +

    Polly - First successful optimizations - How to proceed?
    Tobias Grosser - ENS/INRIA
    Polly, the LLVM Polyhedral Optimizer, was presented one year ago. At that point, only the basic infrastructure was in place and many important parts not even started. Even though Polly is still more research than production quality, we made big improvements during the last 12 months. Polly itself moved to the LLVM infrastructure with Bugtracker, Buildbot and VCS. It can now conveniently be loaded into clang as part of clang -O3. We also implemented automatic SIMD and OpenMP code generation and we created a bridge to the external PoCC optimizer. With PoCC and Polly, we were able to compile and _optimize_ the first benchmarks fully automatically and have shown significant improvements over clang -O3. In this talk we give a detailed update about the current status and want to present ideas on how to move further. These will include both research relevant ideas like automatic OpenCL code generation as well as concepts on how to develop robust loop transformations and vectorizati on for mainstream use. http://polly.grosser.es From tonic at nondot.org Sat Nov 5 19:39:32 2011 From: tonic at nondot.org (Tanya Lattner) Date: Sun, 06 Nov 2011 00:39:32 -0000 Subject: [llvm-commits] [www] r143845 - /www/trunk/devmtg/2011-11/index.html Message-ID: <20111106003932.280502A6C12C@llvm.org> Author: tbrethou Date: Sat Nov 5 19:39:31 2011 New Revision: 143845 URL: http://llvm.org/viewvc/llvm-project?rev=143845&view=rev Log: Add links for talks. Modified: www/trunk/devmtg/2011-11/index.html Modified: www/trunk/devmtg/2011-11/index.html URL: http://llvm.org/viewvc/llvm-project/www/trunk/devmtg/2011-11/index.html?rev=143845&r1=143844&r2=143845&view=diff ============================================================================== --- www/trunk/devmtg/2011-11/index.html (original) +++ www/trunk/devmtg/2011-11/index.html Sat Nov 5 19:39:31 2011 @@ -83,41 +83,41 @@ 9:00 - 9:20Welcome
    Chris Lattner, Apple Inc.Main Hall -9:20 - 10:05Integrating LLVM into FreeBSD
    Brooks Davis, The FreeBSD ProjectMain Hall -Intel OpenCL SDK Vectorizer
    Nadav Rotem, IntelSecond Hall +9:20 - 10:05Integrating LLVM into FreeBSD
    Brooks Davis, The FreeBSD ProjectMain Hall +Intel OpenCL SDK Vectorizer
    Nadav Rotem, IntelSecond Hall -10:05 - 10:50Clang MapReduce -- Automatic C++ Refactoring at Google Scale
    Chandler Carruth, GoogleMain Hall -PTX Back-End: GPU Programming With LLVM
    Justin Holewinski, Ohio StateSecond Hall +10:05 - 10:50Clang MapReduce -- Automatic C++ Refactoring at Google Scale
    Chandler Carruth, GoogleMain Hall +PTX Back-End: GPU Programming With LLVM
    Justin Holewinski, Ohio StateSecond Hall Improving LLVM Testing BOF
    David BlaikieTBD 10:50 - 11:05BreakTBD -11:05 - 11:50Extending Clang
    Doug Gregor, Apple Inc.Main Hall -Porting LLVM to a Next Generation DSP
    Taylor Simpson, QuICSecond Hall +11:05 - 11:50Extending Clang
    Doug Gregor, Apple Inc.Main Hall +Porting LLVM to a Next Generation DSP
    Taylor Simpson, QuICSecond Hall -11:50 - 12:35DXR: Semantic Code Browsing with Clang
    Joshua Cranmer, MozillaMain Hall -LLVM MC In Practice
    Jim Grosbach, Owen Anderson Apple Inc.Second Hall +11:50 - 12:35DXR: Semantic Code Browsing with Clang
    Joshua Cranmer, MozillaMain Hall +LLVM MC In Practice
    Jim Grosbach, Owen Anderson Apple Inc.Second Hall 12:35 - 1:35LunchTBD -1:35 - 2:20Using clang in the Chromium project
    Nico Weber, Hans Wennborg, GoogleMain Hall -Polly - First successful optimizations - How to proceed?
    Tobias Grosser, ENS/INRIASecond Hall +1:35 - 2:20Using clang in the Chromium project
    Nico Weber, Hans Wennborg, GoogleMain Hall +Polly - First successful optimizations - How to proceed?
    Tobias Grosser, ENS/INRIASecond Hall MC Linkers BOF
    Luba Tang, MediatekTBD -2:20 - 3:05Android Renderscript
    Stephen Hines, GoogleMain Hall -SKIR: Just-in-Time Compilation for Parallelism with LLVM
    Jeff Fifield, University of ColoradoSecond Hall +2:20 - 3:05Android Renderscript
    Stephen Hines, GoogleMain Hall +SKIR: Just-in-Time Compilation for Parallelism with LLVM
    Jeff Fifield, University of ColoradoSecond Hall Improving the Clang Driver BOF
    James Molloy, ARMTBD 3:05 - 3:45PostersTBD -3:45 - 4:30Register Allocation in LLVM 3.0
    Jakob Olesen, AppleMain Hall -Exporting 3D scenes from Maya to WebGL using clang and LLVM
    Jochen Wilhelmy, consultantSecond Hall +3:45 - 4:30Register Allocation in LLVM 3.0
    Jakob Olesen, AppleMain Hall +Exporting 3D scenes from Maya to WebGL using clang and LLVM
    Jochen Wilhelmy, consultantSecond Hall -4:30 - 5:15Super-optimizing LLVM IR
    Duncan Sands, DeepBlueCapitalMain Hall -Finding races and memory errors with LLVM instrumentation
    Konstantin Serebryany, GoogleSecond Hall +4:30 - 5:15Super-optimizing LLVM IR
    Duncan Sands, DeepBlueCapitalMain Hall +Finding races and memory errors with LLVM instrumentation
    Konstantin Serebryany, GoogleSecond Hall Bitcode Portability/Versioning BOF
    Stephen Hines, David Sehr, GoogleTBD -4:30 - 5:10Thread Safety Annotations in Clang
    DeLesley Hutchins, GoogleMain Hall +4:30 - 5:10Thread Safety Annotations in Clang
    DeLesley Hutchins, GoogleMain Hall Backend/Infrastructure Super BoF
    Jim Grosbach, Apple Inc.Second Hall Community Event Planning
    David Kipping, QualcommTBD @@ -126,67 +126,67 @@

    -Integrating LLVM into FreeBSD
    +Integrating LLVM into FreeBSD
    Brooks Davis - The FreeBSD Project
    The FreeBSD Project has been actively working to incorporate tools from the LLVM project into our base system including clang, libc++, and possibly lldb. This talk will cover our efforts so far including our plans to ship FreeBSD 9.0 with clang in the base system. I will cover both our current work to replace GPL licensed components with BSD(ish) licensed components and future or experimental work to incorporate new technologies made possible by LLVM.

    -Clang MapReduce -- Automatic C++ Refactoring at Google Scale
    +Clang MapReduce -- Automatic C++ Refactoring at Google Scale
    Chandler Carruth - Google
    Google has over 100 million lines of code, and our biggest programming language is C++. We have a single, shared codebase developed primarily on mainline. We build every binary and all of its libraries from scratch every time, allowing us to incrementally evolve APIs and libraries over time. The entire development process is extremely incremental in nature, and even API-breaking changes are a regular occurrence. However, for core libraries used throughout the codebase, this development model is a huge challenge: how do we incrementally evolve an API in use by tens of thousands of other libraries? The answer is to use Clang to automatically refactor APIs and their users across the codebase. How do we scale Clang up to possibly the single largest unified codebase in the world? The same way Google scales anything else: MapReduce. By coupling Clang???s library design and architecture to existing Google infrastructure we can automatically compile, analyze, and refactor the ent ire Google codebase in minutes. In this talk, I will dive into the challenges of refactoring C++ code, how we???re using Clang and making it even better at solving them, and how we scale these solutions to the size of our codebase.

    -Thread Safety Annotations in Clang
    +Thread Safety Annotations in Clang
    DeLesley Hutchins - Google
    This talk introduces the new thread safety annotations for Clang and describes the static analysis used to check them. These annotations can be used to specify properties such as whether a variable is guarded by a particular mutex, or a desired lock acquisition order. These annotations were originally introduced in gcc, and have recently been reimplemented in Clang.

    -Extending Clang
    +Extending Clang
    Doug Gregor - Apple
    You have an idea for the next great C(++) language feature, but how do you realize that idea? This talk will describe how to extend Clang to add new language features, from parsing and AST-construction basics to properly handling C++ templates and ensuring smooth integration into IDEs. Particular attention will be given to capturing source information in ASTs, developing bulletproof semantic analysis, and write proper regression tests to exercise the various aspects of a language feature.

    -Super-optimizing LLVM IR
    +Super-optimizing LLVM IR
    Duncan Sands - DeepBlueCapital / CNRS
    I will describe a tool to harvest expression sequences from LLVM IR and automatically discover equivalent simplified expressions. The original version of this tool only looked for sub-expressions that were equivalent to the whole, but nonetheless discovered many simplifications missed by the LLVM optimizers (most of these have now been implemented in LLVM). The tool has since been extended to a general super optimizer by Rafael Auler.

    -Register Allocation in LLVM 3.0
    +Register Allocation in LLVM 3.0
    Jakob Olesen - Apple
    An overview of the features in LLVM's new register allocator

    -SKIR: Just-in-Time Compilation for Parallelism with LLVM
    +SKIR: Just-in-Time Compilation for Parallelism with LLVM
    Jeff Fifield - University of Colorado
    The Stream and Kernel Intermediate Representation (SKIR) is a small set of LLVM intrinsics for expressing parallel computation as a graph of sequential processes (kernels) communicating over abstract data channels (streams). At runtime, programs use the SKIR intrinsics to identify functions to use as kernels, to connect kernels together using streams, and to execute resulting program graphs. Formally, the stream parallelism expressed by SKIR programs can be viewed as a generalization of Kahn process networks. More practically, we can use SKIR as a compilation target for high level languages and frameworks containing this style of program decomposition and communication. We have used SKIR to implement a compiler for the StreamIt language, to create a C++ user library for stream/data/pipeline parallel programming, and to enable parallel programming for JavaScript applications. SKIR is implemented on top of the LLVM JIT compiler and a work stealing task scheduler. We use runtim e compilation because of the runtime construction of program graphs, so that we can support dynamic optimization, and so that we can perform dynamic recompilation for heterogeneous targets. In this talk I will describe the SKIR intrinsics and programming model, and briefly describe high level language support that has been implemented for SKIR. I will present the compilation and optimization techniques used to transform the sequential LLVM+SKIR input code into concurrent code which can be executed in parallel using dynamic scheduling techniques. I will also describe how we can use LLVM JIT compilation to dynamically increase or decrease the amount of parallelism in a SKIR program depending on runtime hardware and application characteristics. Finally, I will describe how we can further accelerate SKIR program kernels using JIT compilation, our OpenCL backend, and GPUs.

    -LLVM MC In Practice
    +LLVM MC In Practice
    Jim Grosbach, Owen Anderson - Apple Inc.
    Overview of projects and new developments in the LLVM MC layer, with emphasis on the MCJIT, binary analysis, ARM integrated assembler and ARM disassembler.

    -Exporting 3D scenes from Maya to WebGL using clang and LLVM
    +Exporting 3D scenes from Maya to WebGL using clang and LLVM
    Jochen Wilhelmy - Engineering consultant Wilhelmy
    Modern content creation tools such as Autodesk Maya can be seen as graphical programming language. Features like animation of attributes, embedded scripts, shading networks and vertex deformations can be translated to c++, then compiled to LLVM IR and distributed to CPU and GPU. An award winning WebGL demo is shown which was produced using this approach.

    -DXR: Semantic Code Browsing with Clang
    +DXR: Semantic Code Browsing with Clang
    Joshua Cranmer - Mozilla
    DXR is a source code browser which uses a clang plugin to determine information about all types, variables, and functions in a program to make reading, searching, and understanding source code easier.

    -PTX Back-End: GPU Programming With LLVM
    +PTX Back-End: GPU Programming With LLVM
    Justin Holewinski - Ohio State University
    In this talk, the PTX back-end for LLVM will be discussed, including its' past, present, and future. The current status of the back-end will be explored, with an emphasis on the portions of the LLVM IR instruction set and PTX intrinsics that are currently supported during code generation. This talk will also highlight the difficulties and issues that have been discovered while writing an LLVM back-end for a virtual ISA such as PTX, such as infinite register files. Through-out the talk, examples will be provided to highlight key features of the back-end and show preliminary performance data.
    @@ -194,7 +194,7 @@

    -Finding races and memory errors with LLVM instrumentation
    +Finding races and memory errors with LLVM instrumentation
    Konstantin Serebryany - Google
    We will present two dynamic testing tools based on compile-time instrumentation, both tools use the LLVM compiler.

    • AddressSanitizer (ASan) finds memory bugs, such as use-after-free and out-of-bound accesses to heap and stack. This tool could be seen as a partial replacement for Valgrind and similar tools. The major advantages over Valgrind are the speed (less than 2x slowdown on average) and the ability to handle bugs related to stack and globals. @@ -205,19 +205,19 @@

      -Intel OpenCL SDK Vectorizer
      +Intel OpenCL SDK Vectorizer
      Nadav Rotem - Intel In this talk, we will present our OpenCL SDK and its core technology ??? the vectorizer compiler. We plan to present an overview of our vectorizer and discuss our experience with the LLVM compiler toolkit over the last few years. We will discuss some of our design decisions and our and plans for future features (future instruction sets, vector select, predicated instructions, etc).

      -Using clang in the Chromium project
      +Using clang in the Chromium project
      Nico Weber, Hans Wennborg - Google
      The Chromium project is the open-source foundation on which the Google Chrome web browser is built. It is a multi-million line codebase that uses open source libraries such as WebKit, libpng, skia, ffmpeg, and leveldb. We have been able to build Chromium using clang since October 2010, and since then we've continuously expanded what we use clang for: as continuous build compiler to catch bugs with clang's superior diagnostics, with project-specific clang plugins that enforce coding-style guidelines or find domain-specific bugs in V8, and starting with Chrome 15 as production compiler on Mac OS X. We will share our experiences using clang in a mature open-source project and cover, e.g., how clang's fabled compilation speed fares in a distributed build system with 100 parallel jobs, which parts of a browser blow up when the default compiler is changed, and which of clang's warnings catch the most bugs in practice.

      -Android Renderscript
      +Android Renderscript
      Stephen Hines - Google
      Renderscript is Android's advanced 3D graphics rendering and compute API. It provides a portable C99-based language with extensions to facilitate common use cases for enhancing graphics and thread level parallelism. The Renderscript compiler frontend is based on Clang/LLVM. It emits a portable bitcode format for the actual compiled script code, as well as reflects a Java interface for developers to control the execution of the compiled bitcode. Executable machine code is then generated from this bitcode by an LLVM backend on the device. Renderscript is thus able to provide a mechanism by which Android developers can improve performance of their applications while retaining portability.
      @@ -232,13 +232,13 @@

    -Porting LLVM to a Next Generation DSP
    +Porting LLVM to a Next Generation DSP
    Taylor Simpson - Qualcomm Innovation Center
    This talk will describe our experiences in porting LLVM to Qualcomm's latest generation DSP, Hexagon. The overall experience of porting to a new architecture will be discussed. The challenges of achieving high quality code generation for a VLIW with LLVM with also be outlined.

    -Polly - First successful optimizations - How to proceed?
    +Polly - First successful optimizations - How to proceed?
    Tobias Grosser - ENS/INRIA
    Polly, the LLVM Polyhedral Optimizer, was presented one year ago. At that point, only the basic infrastructure was in place and many important parts not even started. Even though Polly is still more research than production quality, we made big improvements during the last 12 months. Polly itself moved to the LLVM infrastructure with Bugtracker, Buildbot and VCS. It can now conveniently be loaded into clang as part of clang -O3. We also implemented automatic SIMD and OpenMP code generation and we created a bridge to the external PoCC optimizer. With PoCC and Polly, we were able to compile and _optimize_ the first benchmarks fully automatically and have shown significant improvements over clang -O3. In this talk we give a detailed update about the current status and want to present ideas on how to move further. These will include both research relevant ideas like automatic OpenCL code generation as well as concepts on how to develop robust loop transformations and vectorizati on for mainstream use. http://polly.grosser.es

    From tonic at nondot.org Sat Nov 5 19:41:17 2011 From: tonic at nondot.org (Tanya Lattner) Date: Sun, 06 Nov 2011 00:41:17 -0000 Subject: [llvm-commits] [www] r143847 - /www/trunk/devmtg/2011-11/index.html Message-ID: <20111106004117.0DE612A6C12C@llvm.org> Author: tbrethou Date: Sat Nov 5 19:41:16 2011 New Revision: 143847 URL: http://llvm.org/viewvc/llvm-project?rev=143847&view=rev Log: Fix a couple links. Modified: www/trunk/devmtg/2011-11/index.html Modified: www/trunk/devmtg/2011-11/index.html URL: http://llvm.org/viewvc/llvm-project/www/trunk/devmtg/2011-11/index.html?rev=143847&r1=143846&r2=143847&view=diff ============================================================================== --- www/trunk/devmtg/2011-11/index.html (original) +++ www/trunk/devmtg/2011-11/index.html Sat Nov 5 19:41:16 2011 @@ -95,7 +95,7 @@ 11:05 - 11:50Extending Clang
    Doug Gregor, Apple Inc.Main Hall Porting LLVM to a Next Generation DSP
    Taylor Simpson, QuICSecond Hall -11:50 - 12:35DXR: Semantic Code Browsing with Clang
    Joshua Cranmer, MozillaMain Hall +11:50 - 12:35DXR: Semantic Code Browsing with Clang
    Joshua Cranmer, MozillaMain Hall LLVM MC In Practice
    Jim Grosbach, Owen Anderson Apple Inc.Second Hall 12:35 - 1:35LunchTBD @@ -104,7 +104,7 @@ Polly - First successful optimizations - How to proceed?
    Tobias Grosser, ENS/INRIASecond Hall MC Linkers BOF
    Luba Tang, MediatekTBD -2:20 - 3:05Android Renderscript
    Stephen Hines, GoogleMain Hall +2:20 - 3:05Android Renderscript
    Stephen Hines, GoogleMain Hall SKIR: Just-in-Time Compilation for Parallelism with LLVM
    Jeff Fifield, University of ColoradoSecond Hall Improving the Clang Driver BOF
    James Molloy, ARMTBD From tonic at nondot.org Sat Nov 5 19:42:36 2011 From: tonic at nondot.org (Tanya Lattner) Date: Sun, 06 Nov 2011 00:42:36 -0000 Subject: [llvm-commits] [www] r143848 - /www/trunk/devmtg/2011-11/index.html Message-ID: <20111106004236.541462A6C12C@llvm.org> Author: tbrethou Date: Sat Nov 5 19:42:36 2011 New Revision: 143848 URL: http://llvm.org/viewvc/llvm-project?rev=143848&view=rev Log: Add sponsor. Modified: www/trunk/devmtg/2011-11/index.html Modified: www/trunk/devmtg/2011-11/index.html URL: http://llvm.org/viewvc/llvm-project/www/trunk/devmtg/2011-11/index.html?rev=143848&r1=143847&r2=143848&view=diff ============================================================================== --- www/trunk/devmtg/2011-11/index.html (original) +++ www/trunk/devmtg/2011-11/index.html Sat Nov 5 19:42:36 2011 @@ -21,7 +21,7 @@ -

    SPONSORED BY: QuIC, Apple

    +

    SPONSORED BY: QuIC, Apple

    ,Google

    We are eager to find companies to help cover travel expenses for speakers needing assistance. If your company is interested, please contact dkipping at qualcomm.com.

    From tonic at nondot.org Sat Nov 5 19:43:20 2011 From: tonic at nondot.org (Tanya Lattner) Date: Sun, 06 Nov 2011 00:43:20 -0000 Subject: [llvm-commits] [www] r143849 - /www/trunk/devmtg/2011-11/index.html Message-ID: <20111106004320.10D3D2A6C12C@llvm.org> Author: tbrethou Date: Sat Nov 5 19:43:19 2011 New Revision: 143849 URL: http://llvm.org/viewvc/llvm-project?rev=143849&view=rev Log: Fix sponsor header. Modified: www/trunk/devmtg/2011-11/index.html Modified: www/trunk/devmtg/2011-11/index.html URL: http://llvm.org/viewvc/llvm-project/www/trunk/devmtg/2011-11/index.html?rev=143849&r1=143848&r2=143849&view=diff ============================================================================== --- www/trunk/devmtg/2011-11/index.html (original) +++ www/trunk/devmtg/2011-11/index.html Sat Nov 5 19:43:19 2011 @@ -21,7 +21,7 @@ -

    SPONSORED BY: QuIC, Apple

    ,Google

    +

    SPONSORED BY: QuIC, Apple,Google

    We are eager to find companies to help cover travel expenses for speakers needing assistance. If your company is interested, please contact dkipping at qualcomm.com.

    From tonic at nondot.org Sat Nov 5 19:44:11 2011 From: tonic at nondot.org (Tanya Lattner) Date: Sun, 06 Nov 2011 00:44:11 -0000 Subject: [llvm-commits] [www] r143850 - /www/trunk/devmtg/2011-11/index.html Message-ID: <20111106004411.BB5B72A6C12C@llvm.org> Author: tbrethou Date: Sat Nov 5 19:44:11 2011 New Revision: 143850 URL: http://llvm.org/viewvc/llvm-project?rev=143850&view=rev Log: Add space. Modified: www/trunk/devmtg/2011-11/index.html Modified: www/trunk/devmtg/2011-11/index.html URL: http://llvm.org/viewvc/llvm-project/www/trunk/devmtg/2011-11/index.html?rev=143850&r1=143849&r2=143850&view=diff ============================================================================== --- www/trunk/devmtg/2011-11/index.html (original) +++ www/trunk/devmtg/2011-11/index.html Sat Nov 5 19:44:11 2011 @@ -21,7 +21,7 @@ -

    SPONSORED BY: QuIC, Apple,Google

    +

    SPONSORED BY: QuIC, Apple, Google

    We are eager to find companies to help cover travel expenses for speakers needing assistance. If your company is interested, please contact dkipping at qualcomm.com.

    From tonic at nondot.org Sat Nov 5 19:53:07 2011 From: tonic at nondot.org (Tanya Lattner) Date: Sun, 06 Nov 2011 00:53:07 -0000 Subject: [llvm-commits] [www] r143851 - /www/trunk/devmtg/2011-11/index.html Message-ID: <20111106005307.393202A6C12C@llvm.org> Author: tbrethou Date: Sat Nov 5 19:53:06 2011 New Revision: 143851 URL: http://llvm.org/viewvc/llvm-project?rev=143851&view=rev Log: Update session time. Modified: www/trunk/devmtg/2011-11/index.html Modified: www/trunk/devmtg/2011-11/index.html URL: http://llvm.org/viewvc/llvm-project/www/trunk/devmtg/2011-11/index.html?rev=143851&r1=143850&r2=143851&view=diff ============================================================================== --- www/trunk/devmtg/2011-11/index.html (original) +++ www/trunk/devmtg/2011-11/index.html Sat Nov 5 19:53:06 2011 @@ -117,7 +117,7 @@ Finding races and memory errors with LLVM instrumentation
    Konstantin Serebryany, GoogleSecond Hall Bitcode Portability/Versioning BOF
    Stephen Hines, David Sehr, GoogleTBD -4:30 - 5:10Thread Safety Annotations in Clang
    DeLesley Hutchins, GoogleMain Hall +5:15 - 6:00Thread Safety Annotations in Clang
    DeLesley Hutchins, GoogleMain Hall Backend/Infrastructure Super BoF
    Jim Grosbach, Apple Inc.Second Hall Community Event Planning
    David Kipping, QualcommTBD From tonic at nondot.org Sat Nov 5 20:08:36 2011 From: tonic at nondot.org (Tanya Lattner) Date: Sun, 06 Nov 2011 01:08:36 -0000 Subject: [llvm-commits] [www] r143852 - /www/trunk/devmtg/2011-11/index.html Message-ID: <20111106010836.5F9A02A6C12C@llvm.org> Author: tbrethou Date: Sat Nov 5 20:08:36 2011 New Revision: 143852 URL: http://llvm.org/viewvc/llvm-project?rev=143852&view=rev Log: Add poster sessions. Modified: www/trunk/devmtg/2011-11/index.html Modified: www/trunk/devmtg/2011-11/index.html URL: http://llvm.org/viewvc/llvm-project/www/trunk/devmtg/2011-11/index.html?rev=143852&r1=143851&r2=143852&view=diff ============================================================================== --- www/trunk/devmtg/2011-11/index.html (original) +++ www/trunk/devmtg/2011-11/index.html Sat Nov 5 20:08:36 2011 @@ -8,6 +8,8 @@
  • Funding Assistance
  • Location
  • Agenda
  • +
  • Talk Abstracts
  • +
  • Poster Abstracts
  • Dinner
  • @@ -108,7 +110,11 @@ SKIR: Just-in-Time Compilation for Parallelism with LLVM
    Jeff Fifield, University of ColoradoSecond Hall Improving the Clang Driver BOF
    James Molloy, ARMTBD -3:05 - 3:45PostersTBD +3:05 - 3:45PostersTBD +LunarGLASS: A LLVM-based shader compiler stack
    Michael Ilseman, LunarGTBD +Symbolic Testing of OpenCL Code
    Peter Collingbourne, Imperial College LondonTBD +Code verification based on attributes annotation - Implementing custom attributes check using Clang
    Michael Han, AutodeskTBD +Parfait - A Scalable Static Bug-Checking Tool Built on LLVM
    Cristina Cifuentes, Nathan Keynes, Andrew Craik, Lian Li, Nathan Hawes, Andrew Browne, and Manuel Valdiviezo, Oracle LabsTBD 3:45 - 4:30Register Allocation in LLVM 3.0
    Jakob Olesen, AppleMain Hall Exporting 3D scenes from Maya to WebGL using clang and LLVM
    Jochen Wilhelmy, consultantSecond Hall @@ -125,6 +131,7 @@

    +
    Talk Abstracts

    Integrating LLVM into FreeBSD
    Brooks Davis - The FreeBSD Project
    @@ -243,6 +250,44 @@ Polly, the LLVM Polyhedral Optimizer, was presented one year ago. At that point, only the basic infrastructure was in place and many important parts not even started. Even though Polly is still more research than production quality, we made big improvements during the last 12 months. Polly itself moved to the LLVM infrastructure with Bugtracker, Buildbot and VCS. It can now conveniently be loaded into clang as part of clang -O3. We also implemented automatic SIMD and OpenMP code generation and we created a bridge to the external PoCC optimizer. With PoCC and Polly, we were able to compile and _optimize_ the first benchmarks fully automatically and have shown significant improvements over clang -O3. In this talk we give a detailed update about the current status and want to present ideas on how to move further. These will include both research relevant ideas like automatic OpenCL code generation as well as concepts on how to develop robust loop transformations and vectorizati on for mainstream use. http://polly.grosser.es

    + +
    Poster Abstracts
    +

    +Parfait - A Scalable Static Bug-Checking Tool Built on LLVM
    +Cristina Cifuentes, Nathan Keynes, Andrew Craik, Lian Li, Nathan Hawes, Andrew Browne, and Manuel Valdiviezo - Oracle Labs
    +Parfait is a static bug-checking tool for C/C++ applications built on the LLVM framework. Parfait achieves precision and scalability at the same time by employing a layered program analysis framework. In Parfait, different analyses varying in precision and runtime expense are invoked on demand to detect defects of a specific type, effectively achieving higher precision with smaller runtime overheads. +
    +Parfait has been deployed into several development organizations within Oracle. It is being run over millions of lines of C and C++ code on a daily basis. Parfait is currently processing code written for a variety of different platforms including: +

      +
    • Oracle Solaris Studio on Solaris
    • +
    • Microsoft Visual C/C++ on Windows (excluding MFC headers)
    • +
    • GCC on Linux
    • +
    • Intel C/C++ Compiler on Linux
    • +
    + +Despite the size and complexity of the code bases being analyzed, the Parfait false-positive rate has remained below 10%. +
    > +This poster will present the design of the Parfait tool, summarize our experience with the LLVM infrastructure, and present more comprehensive results than the preliminary results we first presented to the LLVM community at the LLVM Developers Conference in 2009. +

    + +

    +Code verification based on attributes annotation - Implementing custom attributes check using Clang
    +Michael Han - Autodesk
    +Introduce a tool named "Hippocrates" we developed at Autodesk based on Clang's attribute system to help engineers verify functions being behaved as designed. The talk will focus on the motivation and goal of the tool, how we hacked Clang (would be a very high level 1000 feet overview due to time limits), and some results of using the tool on our large code base like Autodesk Maya with millions of lines C++ code. +

    + +

    +LunarGLASS: A LLVM-based shader compiler stack
    +Michael Ilseman - LunarG
    +LunarGLASS is an LLVM-based shader compiler stack. It brings a new approach to shader compilation by splitting the common shared intermediate representation (IR) into two levels; the top level is completely platform independent while the bottom level is dynamically tailorable to different families of architecture. http://www.lunarglass.org/documentation +

    + +

    +Symbolic Testing of OpenCL Code
    +Peter Collingbourne - Imperial College London
    +The poster will describe our research on the subject of verification of OpenCL kernels using symbolic execution. We present an effective technique for crosschecking a C program against an accelerated OpenCL version, as well as a technique for detecting data races in OpenCL programs. Our techniques are implemented in KLEE-CL, a symbolic execution engine based on KLEE and KLEE-FP that supports symbolic reasoning on the equivalence between symbolic values. Our approach is to symbolically model the OpenCL environment using an OpenCL runtime library targeted to symbolic execution. Using this model we are able to run OpenCL programs symbolically, keeping track of memory accesses for the purpose of race detection. We then compare the symbolic result against the plain C program in order to detect mismatches between the two versions. We applied KLEE-CL to the Parboil benchmark suite, the Bullet physics library and the OP2 library, in which we were able to find a total of seven errors : three mismatches between the OpenCL and C implementations, two memory errors, one OpenCL compiler bug and one race condition. +

    +
    Dinner

    Dinner attendance is capped at 140 and you must select this option during the registration process in order to attend.

    Dinner will be held after the meeting has concluded. The exact start time will be set once the meeting agenda is formalized. Dinner will be held at Il Fornaio which is within walking distance of the Marriott. From tonic at nondot.org Sat Nov 5 20:10:07 2011 From: tonic at nondot.org (Tanya Lattner) Date: Sun, 06 Nov 2011 01:10:07 -0000 Subject: [llvm-commits] [www] r143853 - /www/trunk/devmtg/2011-11/index.html Message-ID: <20111106011007.CD66F2A6C12C@llvm.org> Author: tbrethou Date: Sat Nov 5 20:10:07 2011 New Revision: 143853 URL: http://llvm.org/viewvc/llvm-project?rev=143853&view=rev Log: Fix poster title. Modified: www/trunk/devmtg/2011-11/index.html Modified: www/trunk/devmtg/2011-11/index.html URL: http://llvm.org/viewvc/llvm-project/www/trunk/devmtg/2011-11/index.html?rev=143853&r1=143852&r2=143853&view=diff ============================================================================== --- www/trunk/devmtg/2011-11/index.html (original) +++ www/trunk/devmtg/2011-11/index.html Sat Nov 5 20:10:07 2011 @@ -250,8 +250,7 @@ Polly, the LLVM Polyhedral Optimizer, was presented one year ago. At that point, only the basic infrastructure was in place and many important parts not even started. Even though Polly is still more research than production quality, we made big improvements during the last 12 months. Polly itself moved to the LLVM infrastructure with Bugtracker, Buildbot and VCS. It can now conveniently be loaded into clang as part of clang -O3. We also implemented automatic SIMD and OpenMP code generation and we created a bridge to the external PoCC optimizer. With PoCC and Polly, we were able to compile and _optimize_ the first benchmarks fully automatically and have shown significant improvements over clang -O3. In this talk we give a detailed update about the current status and want to present ideas on how to move further. These will include both research relevant ideas like automatic OpenCL code generation as well as concepts on how to develop robust loop transformations and vectorizati on for mainstream use. http://polly.grosser.es

    - -
    Poster Abstracts
    +
    Poster Abstracts

    Parfait - A Scalable Static Bug-Checking Tool Built on LLVM
    Cristina Cifuentes, Nathan Keynes, Andrew Craik, Lian Li, Nathan Hawes, Andrew Browne, and Manuel Valdiviezo - Oracle Labs
    From tonic at nondot.org Sat Nov 5 20:11:53 2011 From: tonic at nondot.org (Tanya Lattner) Date: Sun, 06 Nov 2011 01:11:53 -0000 Subject: [llvm-commits] [www] r143854 - /www/trunk/devmtg/2011-11/index.html Message-ID: <20111106011153.D48D72A6C12C@llvm.org> Author: tbrethou Date: Sat Nov 5 20:11:53 2011 New Revision: 143854 URL: http://llvm.org/viewvc/llvm-project?rev=143854&view=rev Log: Increase rowspan for posters. Modified: www/trunk/devmtg/2011-11/index.html Modified: www/trunk/devmtg/2011-11/index.html URL: http://llvm.org/viewvc/llvm-project/www/trunk/devmtg/2011-11/index.html?rev=143854&r1=143853&r2=143854&view=diff ============================================================================== --- www/trunk/devmtg/2011-11/index.html (original) +++ www/trunk/devmtg/2011-11/index.html Sat Nov 5 20:11:53 2011 @@ -110,7 +110,7 @@ SKIR: Just-in-Time Compilation for Parallelism with LLVM
    Jeff Fifield, University of ColoradoSecond Hall Improving the Clang Driver BOF
    James Molloy, ARMTBD -3:05 - 3:45PostersTBD +3:05 - 3:45PostersTBD LunarGLASS: A LLVM-based shader compiler stack
    Michael Ilseman, LunarGTBD Symbolic Testing of OpenCL Code
    Peter Collingbourne, Imperial College LondonTBD Code verification based on attributes annotation - Implementing custom attributes check using Clang
    Michael Han, AutodeskTBD @@ -265,7 +265,7 @@ Despite the size and complexity of the code bases being analyzed, the Parfait false-positive rate has remained below 10%. -
    > +
    This poster will present the design of the Parfait tool, summarize our experience with the LLVM infrastructure, and present more comprehensive results than the preliminary results we first presented to the LLVM community at the LLVM Developers Conference in 2009.

    From nicholas at mxc.ca Sat Nov 5 20:41:01 2011 From: nicholas at mxc.ca (Nick Lewycky) Date: Sun, 06 Nov 2011 01:41:01 -0000 Subject: [llvm-commits] [www] r143855 - /www/trunk/devmtg/2011-11/index.html Message-ID: <20111106014101.63C342A6C12C@llvm.org> Author: nicholas Date: Sat Nov 5 20:41:01 2011 New Revision: 143855 URL: http://llvm.org/viewvc/llvm-project?rev=143855&view=rev Log: Fix two formatting errors; remove broken
  • From geek4civic at gmail.com Sun Nov 6 01:58:26 2011 From: geek4civic at gmail.com (NAKAMURA Takumi) Date: Sun, 6 Nov 2011 15:58:26 +0900 Subject: [llvm-commits] [PATCH][docs/GettingStarted.html] Add git imap config for Traditional Chinese GMail account In-Reply-To: <20111105091029.GA48964@cs.nctu.edu.tw> References: <20111105091029.GA48964@cs.nctu.edu.tw> Message-ID: 2011/11/5 ??? : > "[Gmail]/Drafts" is only for English GMail account. This patch > give an example for those developers who use Traditional Chinese > GMail account. Thanks. :) Applied in r143862. I am afraid the section might grow like "the Universal Expo". :p I found "modified utf-7" stuff for git-imap-send gmail at first in certain Taiwanese blog. I cannot find it any more. :p ...Takumi From peter at pcc.me.uk Sun Nov 6 10:45:46 2011 From: peter at pcc.me.uk (Peter Collingbourne) Date: Sun, 06 Nov 2011 16:45:46 -0000 Subject: [llvm-commits] [llvm] r143876 - /llvm/trunk/lib/Support/Windows/Program.inc Message-ID: <20111106164546.AC31E2A6C12C@llvm.org> Author: pcc Date: Sun Nov 6 10:45:46 2011 New Revision: 143876 URL: http://llvm.org/viewvc/llvm-project?rev=143876&view=rev Log: Return only the least significant 8 bits of the exit status from Process::Wait on Windows (mimicing POSIX behaviour). Modified: llvm/trunk/lib/Support/Windows/Program.inc Modified: llvm/trunk/lib/Support/Windows/Program.inc URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Program.inc?rev=143876&r1=143875&r2=143876&view=diff ============================================================================== --- llvm/trunk/lib/Support/Windows/Program.inc (original) +++ llvm/trunk/lib/Support/Windows/Program.inc Sun Nov 6 10:45:46 2011 @@ -367,7 +367,7 @@ return -2; } - return status; + return status & 0377; } bool From atrick at apple.com Sun Nov 6 11:59:24 2011 From: atrick at apple.com (Andrew Trick) Date: Sun, 06 Nov 2011 17:59:24 -0000 Subject: [llvm-commits] [llvm] r143878 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20111106175924.A38962A6C12C@llvm.org> Author: atrick Date: Sun Nov 6 11:59:24 2011 New Revision: 143878 URL: http://llvm.org/viewvc/llvm-project?rev=143878&view=rev Log: Release Notes: add a description of -enable-iv-rewrite. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=143878&r1=143877&r2=143878&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Sun Nov 6 11:59:24 2011 @@ -836,6 +836,29 @@

    +Loop Optimization Improvements +

    + +
    +

    The induction variable simplification pass in 3.0 only modifies + induction variables when profitable. Sign and zero extension + elimination, linear function test replacement, loop unrolling, and + other simplifications that require induction variable analysis have + been generalized so they no longer require loops to be rewritten in a + typically suboptimal form prior to optimization. This new design + preserves more IR level information, avoids undoing earlier loop + optimizations (particularly hand-optimized loops), and no longer + strongly depends on the code generator rewriting loops a second time + in a now optimal form--an intractable problem.

    + +

    The original behavior can be restored with -mllvm -enable-iv-rewrite; + however, support for this mode will be short lived. As such, bug + reports should be filed for any significant performance regressions + when moving from -mllvm -enable-iv-rewrite to the 3.0 default mode.

    +
    + + +

    Optimizer Improvements

    From daniel at zuster.org Sun Nov 6 12:04:24 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Sun, 06 Nov 2011 18:04:24 -0000 Subject: [llvm-commits] [llvm] r143879 - /llvm/trunk/tools/llvm-config-2/llvm-config.cpp Message-ID: <20111106180424.109712A6C12C@llvm.org> Author: ddunbar Date: Sun Nov 6 12:04:23 2011 New Revision: 143879 URL: http://llvm.org/viewvc/llvm-project?rev=143879&view=rev Log: llvm-config-2: Switch to using real library dependency table. - Also, fix a refacto that left extra "all" component in list (this is now defined in the groups explicitly) Modified: llvm/trunk/tools/llvm-config-2/llvm-config.cpp Modified: llvm/trunk/tools/llvm-config-2/llvm-config.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-config-2/llvm-config.cpp?rev=143879&r1=143878&r2=143879&view=diff ============================================================================== --- llvm/trunk/tools/llvm-config-2/llvm-config.cpp (original) +++ llvm/trunk/tools/llvm-config-2/llvm-config.cpp Sun Nov 6 12:04:23 2011 @@ -43,15 +43,7 @@ // // Not all components define a library, we also use "library groups" as a way to // create entries for pseudo groups like x86 or all-targets. -// -// FIXME: Include real component table. -struct AvailableComponent { - const char *Name; - const char *Library; - const char *RequiredLibraries[1]; -} AvailableComponents[1] = { - { "all", 0, { } } -}; +#include "LibraryDependencies.inc" /// \brief Traverse a single component adding to the topological ordering in /// \arg RequiredLibs. @@ -261,7 +253,6 @@ } else if (Arg == "--libfiles") { PrintLibFiles = true; } else if (Arg == "--components") { - OS << "all"; for (unsigned j = 0; j != array_lengthof(AvailableComponents); ++j) { OS << ' '; OS << AvailableComponents[j].Name; From daniel at zuster.org Sun Nov 6 12:04:44 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Sun, 06 Nov 2011 18:04:44 -0000 Subject: [llvm-commits] [llvm] r143880 - in /llvm/trunk: include/llvm/ADT/StringRef.h lib/Support/StringRef.cpp Message-ID: <20111106180444.117382A6C12C@llvm.org> Author: ddunbar Date: Sun Nov 6 12:04:43 2011 New Revision: 143880 URL: http://llvm.org/viewvc/llvm-project?rev=143880&view=rev Log: ADT/StringRef: Add ::lower() and ::upper() methods. Modified: llvm/trunk/include/llvm/ADT/StringRef.h llvm/trunk/lib/Support/StringRef.cpp Modified: llvm/trunk/include/llvm/ADT/StringRef.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/StringRef.h?rev=143880&r1=143879&r2=143880&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/StringRef.h (original) +++ llvm/trunk/include/llvm/ADT/StringRef.h Sun Nov 6 12:04:43 2011 @@ -327,6 +327,16 @@ bool getAsInteger(unsigned Radix, APInt &Result) const; /// @} + /// @name String Operations + /// @{ + + // lower - Convert the given ASCII string to lowercase. + std::string lower() const; + + /// upper - Convert the given ASCII string to uppercase. + std::string upper() const; + + /// @} /// @name Substring Operations /// @{ Modified: llvm/trunk/lib/Support/StringRef.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/StringRef.cpp?rev=143880&r1=143879&r2=143880&view=diff ============================================================================== --- llvm/trunk/lib/Support/StringRef.cpp (original) +++ llvm/trunk/lib/Support/StringRef.cpp Sun Nov 6 12:04:43 2011 @@ -25,6 +25,12 @@ return x; } +static char ascii_toupper(char x) { + if (x >= 'a' && x <= 'z') + return x - 'a' + 'A'; + return x; +} + static bool ascii_isdigit(char x) { return x >= '0' && x <= '9'; } @@ -132,6 +138,26 @@ } //===----------------------------------------------------------------------===// +// String Operations +//===----------------------------------------------------------------------===// + +std::string StringRef::lower() const { + std::string Result(size(), char()); + for (size_type i = 0, e = size(); i != e; ++i) { + Result[i] = ascii_tolower(Data[i]); + } + return Result; +} + +std::string StringRef::upper() const { + std::string Result(size(), char()); + for (size_type i = 0, e = size(); i != e; ++i) { + Result[i] = ascii_tolower(Data[i]); + } + return Result; +} + +//===----------------------------------------------------------------------===// // String Searching //===----------------------------------------------------------------------===// From daniel at zuster.org Sun Nov 6 12:04:50 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Sun, 06 Nov 2011 18:04:50 -0000 Subject: [llvm-commits] [llvm] r143881 - /llvm/trunk/tools/llvm-config-2/llvm-config.cpp Message-ID: <20111106180450.0FB2B2A6C12C@llvm.org> Author: ddunbar Date: Sun Nov 6 12:04:49 2011 New Revision: 143881 URL: http://llvm.org/viewvc/llvm-project?rev=143881&view=rev Log: llvm-config: Users are allowed to provide component names in mixed case. Modified: llvm/trunk/tools/llvm-config-2/llvm-config.cpp Modified: llvm/trunk/tools/llvm-config-2/llvm-config.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-config-2/llvm-config.cpp?rev=143881&r1=143880&r2=143881&view=diff ============================================================================== --- llvm/trunk/tools/llvm-config-2/llvm-config.cpp (original) +++ llvm/trunk/tools/llvm-config-2/llvm-config.cpp Sun Nov 6 12:04:49 2011 @@ -97,14 +97,17 @@ // Visit the components. for (unsigned i = 0, e = Components.size(); i != e; ++i) { + // Users are allowed to provide mixed case component names. + std::string ComponentLower = Components[i].lower(); + // Validate that the user supplied a valid component name. - if (!ComponentMap.count(Components[i])) { + if (!ComponentMap.count(ComponentLower)) { llvm::errs() << "llvm-config: unknown component name: " << Components[i] << "\n"; exit(1); } - VisitComponent(Components[i], ComponentMap, VisitedComponents, + VisitComponent(ComponentLower, ComponentMap, VisitedComponents, RequiredLibs); } From joe.abbey at gmail.com Sun Nov 6 12:16:55 2011 From: joe.abbey at gmail.com (Joe Abbey) Date: Sun, 6 Nov 2011 13:16:55 -0500 Subject: [llvm-commits] [llvm] r143880 - in /llvm/trunk: include/llvm/ADT/StringRef.h lib/Support/StringRef.cpp In-Reply-To: <20111106180444.117382A6C12C@llvm.org> References: <20111106180444.117382A6C12C@llvm.org> Message-ID: <0246EF7D-B28C-4ED0-BEE5-8245597BAF77@gmail.com> Shouldn't upper call ascii_toupper? Joe Sent from my iPhone On Nov 6, 2011, at 1:04 PM, Daniel Dunbar wrote: > Author: ddunbar > Date: Sun Nov 6 12:04:43 2011 > New Revision: 143880 > > URL: http://llvm.org/viewvc/llvm-project?rev=143880&view=rev > Log: > ADT/StringRef: Add ::lower() and ::upper() methods. > > Modified: > llvm/trunk/include/llvm/ADT/StringRef.h > llvm/trunk/lib/Support/StringRef.cpp > > Modified: llvm/trunk/include/llvm/ADT/StringRef.h > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/StringRef.h?rev=143880&r1=143879&r2=143880&view=diff > ============================================================================== > --- llvm/trunk/include/llvm/ADT/StringRef.h (original) > +++ llvm/trunk/include/llvm/ADT/StringRef.h Sun Nov 6 12:04:43 2011 > @@ -327,6 +327,16 @@ > bool getAsInteger(unsigned Radix, APInt &Result) const; > > /// @} > + /// @name String Operations > + /// @{ > + > + // lower - Convert the given ASCII string to lowercase. > + std::string lower() const; > + > + /// upper - Convert the given ASCII string to uppercase. > + std::string upper() const; > + > + /// @} > /// @name Substring Operations > /// @{ > > > Modified: llvm/trunk/lib/Support/StringRef.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/StringRef.cpp?rev=143880&r1=143879&r2=143880&view=diff > ============================================================================== > --- llvm/trunk/lib/Support/StringRef.cpp (original) > +++ llvm/trunk/lib/Support/StringRef.cpp Sun Nov 6 12:04:43 2011 > @@ -25,6 +25,12 @@ > return x; > } > > +static char ascii_toupper(char x) { > + if (x >= 'a' && x <= 'z') > + return x - 'a' + 'A'; > + return x; > +} > + > static bool ascii_isdigit(char x) { > return x >= '0' && x <= '9'; > } > @@ -132,6 +138,26 @@ > } > > //===----------------------------------------------------------------------===// > +// String Operations > +//===----------------------------------------------------------------------===// > + > +std::string StringRef::lower() const { > + std::string Result(size(), char()); > + for (size_type i = 0, e = size(); i != e; ++i) { > + Result[i] = ascii_tolower(Data[i]); > + } > + return Result; > +} > + > +std::string StringRef::upper() const { > + std::string Result(size(), char()); > + for (size_type i = 0, e = size(); i != e; ++i) { > + Result[i] = ascii_tolower(Data[i]); > + } > + return Result; > +} > + > +//===----------------------------------------------------------------------===// > // String Searching > //===----------------------------------------------------------------------===// > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From benny.kra at googlemail.com Sun Nov 6 12:21:45 2011 From: benny.kra at googlemail.com (Benjamin Kramer) Date: Sun, 6 Nov 2011 19:21:45 +0100 Subject: [llvm-commits] [llvm] r143880 - in /llvm/trunk: include/llvm/ADT/StringRef.h lib/Support/StringRef.cpp In-Reply-To: <20111106180444.117382A6C12C@llvm.org> References: <20111106180444.117382A6C12C@llvm.org> Message-ID: <9BD1691A-931B-4B3B-B3D2-9C8E9ED68493@googlemail.com> On 06.11.2011, at 19:04, Daniel Dunbar wrote: > Author: ddunbar > Date: Sun Nov 6 12:04:43 2011 > New Revision: 143880 > > URL: http://llvm.org/viewvc/llvm-project?rev=143880&view=rev > Log: > ADT/StringRef: Add ::lower() and ::upper() methods. > > Modified: > llvm/trunk/include/llvm/ADT/StringRef.h > llvm/trunk/lib/Support/StringRef.cpp > > Modified: llvm/trunk/include/llvm/ADT/StringRef.h > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/StringRef.h?rev=143880&r1=143879&r2=143880&view=diff > ============================================================================== > --- llvm/trunk/include/llvm/ADT/StringRef.h (original) > +++ llvm/trunk/include/llvm/ADT/StringRef.h Sun Nov 6 12:04:43 2011 > @@ -327,6 +327,16 @@ > bool getAsInteger(unsigned Radix, APInt &Result) const; > > /// @} > + /// @name String Operations > + /// @{ > + > + // lower - Convert the given ASCII string to lowercase. > + std::string lower() const; > + > + /// upper - Convert the given ASCII string to uppercase. > + std::string upper() const; > + > + /// @} > /// @name Substring Operations > /// @{ > > > Modified: llvm/trunk/lib/Support/StringRef.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/StringRef.cpp?rev=143880&r1=143879&r2=143880&view=diff > ============================================================================== > --- llvm/trunk/lib/Support/StringRef.cpp (original) > +++ llvm/trunk/lib/Support/StringRef.cpp Sun Nov 6 12:04:43 2011 > @@ -25,6 +25,12 @@ > return x; > } > > +static char ascii_toupper(char x) { > + if (x >= 'a' && x <= 'z') > + return x - 'a' + 'A'; > + return x; > +} > + > static bool ascii_isdigit(char x) { > return x >= '0' && x <= '9'; > } > @@ -132,6 +138,26 @@ > } > > //===----------------------------------------------------------------------===// > +// String Operations > +//===----------------------------------------------------------------------===// > + > +std::string StringRef::lower() const { > + std::string Result(size(), char()); > + for (size_type i = 0, e = size(); i != e; ++i) { > + Result[i] = ascii_tolower(Data[i]); > + } > + return Result; > +} > + > +std::string StringRef::upper() const { > + std::string Result(size(), char()); > + for (size_type i = 0, e = size(); i != e; ++i) { > + Result[i] = ascii_tolower(Data[i]); toupper? > + } > + return Result; > +} > + > +//===----------------------------------------------------------------------===// > // String Searching > //===----------------------------------------------------------------------===// > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From daniel at zuster.org Sun Nov 6 13:57:04 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Sun, 06 Nov 2011 19:57:04 -0000 Subject: [llvm-commits] [llvm] r143888 - /llvm/trunk/tools/llvm-config-2/llvm-config.cpp Message-ID: <20111106195704.B15BA2A6C12C@llvm.org> Author: ddunbar Date: Sun Nov 6 13:57:04 2011 New Revision: 143888 URL: http://llvm.org/viewvc/llvm-project?rev=143888&view=rev Log: Revert "llvm-config-2: Switch to using real library dependency table." while I investigate build failure. Modified: llvm/trunk/tools/llvm-config-2/llvm-config.cpp Modified: llvm/trunk/tools/llvm-config-2/llvm-config.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-config-2/llvm-config.cpp?rev=143888&r1=143887&r2=143888&view=diff ============================================================================== --- llvm/trunk/tools/llvm-config-2/llvm-config.cpp (original) +++ llvm/trunk/tools/llvm-config-2/llvm-config.cpp Sun Nov 6 13:57:04 2011 @@ -43,7 +43,15 @@ // // Not all components define a library, we also use "library groups" as a way to // create entries for pseudo groups like x86 or all-targets. -#include "LibraryDependencies.inc" +// +// FIXME: Include real component table. +struct AvailableComponent { + const char *Name; + const char *Library; + const char *RequiredLibraries[1]; +} AvailableComponents[1] = { + { "all", 0, { } } +}; /// \brief Traverse a single component adding to the topological ordering in /// \arg RequiredLibs. @@ -256,6 +264,7 @@ } else if (Arg == "--libfiles") { PrintLibFiles = true; } else if (Arg == "--components") { + OS << "all"; for (unsigned j = 0; j != array_lengthof(AvailableComponents); ++j) { OS << ' '; OS << AvailableComponents[j].Name; From benny.kra at googlemail.com Sun Nov 6 14:36:50 2011 From: benny.kra at googlemail.com (Benjamin Kramer) Date: Sun, 06 Nov 2011 20:36:50 -0000 Subject: [llvm-commits] [llvm] r143890 - /llvm/trunk/lib/Support/StringRef.cpp Message-ID: <20111106203650.A6A812A6C12C@llvm.org> Author: d0k Date: Sun Nov 6 14:36:50 2011 New Revision: 143890 URL: http://llvm.org/viewvc/llvm-project?rev=143890&view=rev Log: Fix a typo. Modified: llvm/trunk/lib/Support/StringRef.cpp Modified: llvm/trunk/lib/Support/StringRef.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/StringRef.cpp?rev=143890&r1=143889&r2=143890&view=diff ============================================================================== --- llvm/trunk/lib/Support/StringRef.cpp (original) +++ llvm/trunk/lib/Support/StringRef.cpp Sun Nov 6 14:36:50 2011 @@ -152,7 +152,7 @@ std::string StringRef::upper() const { std::string Result(size(), char()); for (size_type i = 0, e = size(); i != e; ++i) { - Result[i] = ascii_tolower(Data[i]); + Result[i] = ascii_toupper(Data[i]); } return Result; } From benny.kra at googlemail.com Sun Nov 6 14:37:06 2011 From: benny.kra at googlemail.com (Benjamin Kramer) Date: Sun, 06 Nov 2011 20:37:06 -0000 Subject: [llvm-commits] [llvm] r143891 - in /llvm/trunk: include/llvm/ADT/StringExtras.h lib/MC/SubtargetFeature.cpp lib/Target/ARM/ARMAsmPrinter.cpp lib/Target/ARM/AsmParser/ARMAsmLexer.cpp lib/Target/ARM/AsmParser/ARMAsmParser.cpp lib/Target/MBlaze/AsmParser/MBlazeAsmLexer.cpp lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp lib/Target/Mips/MipsAsmPrinter.cpp lib/Target/Sparc/SparcAsmPrinter.cpp lib/Target/X86/AsmParser/X86AsmLexer.cpp lib/Target/X86/AsmParser/X86AsmParser.cpp Message-ID: <20111106203707.1969C3524001@llvm.org> Author: d0k Date: Sun Nov 6 14:37:06 2011 New Revision: 143891 URL: http://llvm.org/viewvc/llvm-project?rev=143891&view=rev Log: Replace (Lower|Upper)caseString in favor of StringRef's newest methods. Modified: llvm/trunk/include/llvm/ADT/StringExtras.h llvm/trunk/lib/MC/SubtargetFeature.cpp llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmLexer.cpp llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp llvm/trunk/lib/Target/MBlaze/AsmParser/MBlazeAsmLexer.cpp llvm/trunk/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp llvm/trunk/lib/Target/Sparc/SparcAsmPrinter.cpp llvm/trunk/lib/Target/X86/AsmParser/X86AsmLexer.cpp llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Modified: llvm/trunk/include/llvm/ADT/StringExtras.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/StringExtras.h?rev=143891&r1=143890&r2=143891&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/StringExtras.h (original) +++ llvm/trunk/include/llvm/ADT/StringExtras.h Sun Nov 6 14:37:06 2011 @@ -117,22 +117,6 @@ return ""; // error } -static inline std::string LowercaseString(const std::string &S) { - std::string result(S); - for (unsigned i = 0; i < S.length(); ++i) - if (isupper(result[i])) - result[i] = char(tolower(result[i])); - return result; -} - -static inline std::string UppercaseString(const std::string &S) { - std::string result(S); - for (unsigned i = 0; i < S.length(); ++i) - if (islower(result[i])) - result[i] = char(toupper(result[i])); - return result; -} - /// StrInStrNoCase - Portable version of strcasestr. Locates the first /// occurrence of string 's1' in string 's2', ignoring case. Returns /// the offset of s2 in s1 or npos if s2 cannot be found. Modified: llvm/trunk/lib/MC/SubtargetFeature.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/SubtargetFeature.cpp?rev=143891&r1=143890&r2=143891&view=diff ============================================================================== --- llvm/trunk/lib/MC/SubtargetFeature.cpp (original) +++ llvm/trunk/lib/MC/SubtargetFeature.cpp Sun Nov 6 14:37:06 2011 @@ -15,7 +15,6 @@ #include "llvm/Support/Debug.h" #include "llvm/Support/Format.h" #include "llvm/Support/raw_ostream.h" -#include "llvm/ADT/StringExtras.h" #include #include #include @@ -115,7 +114,7 @@ // Don't add empty features if (!String.empty()) { // Convert to lowercase, prepend flag and add to vector - Features.push_back(PrependFlag(LowercaseString(String), IsEnabled)); + Features.push_back(PrependFlag(String.lower(), IsEnabled)); } } Modified: llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp?rev=143891&r1=143890&r2=143891&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp Sun Nov 6 14:37:06 2011 @@ -47,7 +47,6 @@ #include "llvm/Target/TargetOptions.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallString.h" -#include "llvm/ADT/StringExtras.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" @@ -86,12 +85,12 @@ void EmitTextAttribute(unsigned Attribute, StringRef String) { switch (Attribute) { case ARMBuildAttrs::CPU_name: - Streamer.EmitRawText(StringRef("\t.cpu ") + LowercaseString(String)); + Streamer.EmitRawText(StringRef("\t.cpu ") + String.lower()); break; /* GAS requires .fpu to be emitted regardless of EABI attribute */ case ARMBuildAttrs::Advanced_SIMD_arch: case ARMBuildAttrs::VFP_arch: - Streamer.EmitRawText(StringRef("\t.fpu ") + LowercaseString(String)); + Streamer.EmitRawText(StringRef("\t.fpu ") + String.lower()); break; default: assert(0 && "Unsupported Text attribute in ASM Mode"); break; } @@ -201,7 +200,7 @@ Streamer.EmitULEB128IntValue(item.IntValue, 0); break; case AttributeItemType::TextAttribute: - Streamer.EmitBytes(UppercaseString(item.StringValue), 0); + Streamer.EmitBytes(item.StringValue.upper(), 0); Streamer.EmitIntValue(0, 1); // '\0' break; default: Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmLexer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmLexer.cpp?rev=143891&r1=143890&r2=143891&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmLexer.cpp (original) +++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmLexer.cpp Sun Nov 6 14:37:06 2011 @@ -19,7 +19,6 @@ #include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringSwitch.h" #include @@ -107,11 +106,9 @@ SetError(Lexer->getErrLoc(), Lexer->getErr()); break; case AsmToken::Identifier: { - std::string upperCase = lexedToken.getString().str(); - std::string lowerCase = LowercaseString(upperCase); - StringRef lowerRef(lowerCase); + std::string lowerCase = lexedToken.getString().lower(); - unsigned regID = MatchRegisterName(lowerRef); + unsigned regID = MatchRegisterName(lowerCase); // Check for register aliases. // r13 -> sp // r14 -> lr Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp?rev=143891&r1=143890&r2=143891&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original) +++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Sun Nov 6 14:37:06 2011 @@ -30,7 +30,6 @@ #include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/ADT/Twine.h" @@ -2063,8 +2062,7 @@ // FIXME: Validate register for the current architecture; we have to do // validation later, so maybe there is no need for this here. - std::string upperCase = Tok.getString().str(); - std::string lowerCase = LowercaseString(upperCase); + std::string lowerCase = Tok.getString().lower(); unsigned RegNum = MatchRegisterName(lowerCase); if (!RegNum) { RegNum = StringSwitch(lowerCase) @@ -2092,8 +2090,7 @@ const AsmToken &Tok = Parser.getTok(); assert(Tok.is(AsmToken::Identifier) && "Token is not an Identifier"); - std::string upperCase = Tok.getString().str(); - std::string lowerCase = LowercaseString(upperCase); + std::string lowerCase = Tok.getString().lower(); ARM_AM::ShiftOpc ShiftTy = StringSwitch(lowerCase) .Case("lsl", ARM_AM::lsl) .Case("lsr", ARM_AM::lsr) @@ -2688,7 +2685,7 @@ // Split spec_reg from flag, example: CPSR_sxf => "CPSR" and "sxf" size_t Start = 0, Next = Mask.find('_'); StringRef Flags = ""; - std::string SpecReg = LowercaseString(Mask.slice(Start, Next)); + std::string SpecReg = Mask.slice(Start, Next).lower(); if (Next != StringRef::npos) Flags = Mask.slice(Next+1, Mask.size()); @@ -2756,8 +2753,8 @@ return MatchOperand_ParseFail; } StringRef ShiftName = Tok.getString(); - std::string LowerOp = LowercaseString(Op); - std::string UpperOp = UppercaseString(Op); + std::string LowerOp = Op.lower(); + std::string UpperOp = Op.upper(); if (ShiftName != LowerOp && ShiftName != UpperOp) { Error(Parser.getTok().getLoc(), Op + " operand expected."); return MatchOperand_ParseFail; Modified: llvm/trunk/lib/Target/MBlaze/AsmParser/MBlazeAsmLexer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/AsmParser/MBlazeAsmLexer.cpp?rev=143891&r1=143890&r2=143891&view=diff ============================================================================== --- llvm/trunk/lib/Target/MBlaze/AsmParser/MBlazeAsmLexer.cpp (original) +++ llvm/trunk/lib/Target/MBlaze/AsmParser/MBlazeAsmLexer.cpp Sun Nov 6 14:37:06 2011 @@ -11,7 +11,6 @@ #include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/StringExtras.h" #include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCParser/MCAsmLexer.h" @@ -100,11 +99,7 @@ return AsmToken(lexedToken); case AsmToken::Identifier: { - std::string upperCase = lexedToken.getString().str(); - std::string lowerCase = LowercaseString(upperCase); - StringRef lowerRef(lowerCase); - - unsigned regID = MatchRegisterName(lowerRef); + unsigned regID = MatchRegisterName(lexedToken.getString().lower()); if (regID) { return AsmToken(AsmToken::Register, Modified: llvm/trunk/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp?rev=143891&r1=143890&r2=143891&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp (original) +++ llvm/trunk/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp Sun Nov 6 14:37:06 2011 @@ -17,7 +17,6 @@ #include "llvm/MC/MCInst.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" -#include "llvm/ADT/StringExtras.h" using namespace llvm; #define GET_INSTRUCTION_NAME @@ -66,7 +65,7 @@ } void MipsInstPrinter::printRegName(raw_ostream &OS, unsigned RegNo) const { - OS << '$' << LowercaseString(getRegisterName(RegNo)); + OS << '$' << StringRef(getRegisterName(RegNo)).lower(); } void MipsInstPrinter::printInst(const MCInst *MI, raw_ostream &O, Modified: llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp?rev=143891&r1=143890&r2=143891&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp Sun Nov 6 14:37:06 2011 @@ -36,7 +36,6 @@ #include "llvm/Target/TargetLoweringObjectFile.h" #include "llvm/Target/TargetOptions.h" #include "llvm/ADT/SmallString.h" -#include "llvm/ADT/StringExtras.h" #include "llvm/ADT/Twine.h" #include "llvm/Support/TargetRegistry.h" #include "llvm/Support/raw_ostream.h" @@ -177,7 +176,7 @@ void MipsAsmPrinter::printHex32(unsigned Value, raw_ostream &O) { O << "0x"; for (int i = 7; i >= 0; i--) - O << utohexstr((Value & (0xF << (i*4))) >> (i*4)); + O.write_hex((Value & (0xF << (i*4))) >> (i*4)); } //===----------------------------------------------------------------------===// @@ -193,9 +192,9 @@ unsigned stackSize = MF->getFrameInfo()->getStackSize(); OutStreamer.EmitRawText("\t.frame\t$" + - Twine(LowercaseString(MipsInstPrinter::getRegisterName(stackReg))) + + StringRef(MipsInstPrinter::getRegisterName(stackReg)).lower() + "," + Twine(stackSize) + ",$" + - Twine(LowercaseString(MipsInstPrinter::getRegisterName(returnReg)))); + StringRef(MipsInstPrinter::getRegisterName(returnReg)).lower()); } /// Emit Set directives. @@ -335,7 +334,7 @@ switch (MO.getType()) { case MachineOperand::MO_Register: O << '$' - << LowercaseString(MipsInstPrinter::getRegisterName(MO.getReg())); + << StringRef(MipsInstPrinter::getRegisterName(MO.getReg())).lower(); break; case MachineOperand::MO_Immediate: Modified: llvm/trunk/lib/Target/Sparc/SparcAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcAsmPrinter.cpp?rev=143891&r1=143890&r2=143891&view=diff ============================================================================== --- llvm/trunk/lib/Target/Sparc/SparcAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/Sparc/SparcAsmPrinter.cpp Sun Nov 6 14:37:06 2011 @@ -23,7 +23,6 @@ #include "llvm/MC/MCSymbol.h" #include "llvm/Target/Mangler.h" #include "llvm/ADT/SmallString.h" -#include "llvm/ADT/StringExtras.h" #include "llvm/Support/TargetRegistry.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; @@ -82,7 +81,7 @@ } switch (MO.getType()) { case MachineOperand::MO_Register: - O << "%" << LowercaseString(getRegisterName(MO.getReg())); + O << "%" << StringRef(getRegisterName(MO.getReg())).lower(); break; case MachineOperand::MO_Immediate: @@ -147,7 +146,7 @@ "Operand is not a physical register "); assert(MO.getReg() != SP::O7 && "%o7 is assigned as destination for getpcx!"); - operand = "%" + LowercaseString(getRegisterName(MO.getReg())); + operand = "%" + StringRef(getRegisterName(MO.getReg())).lower(); break; } Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmLexer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/X86AsmLexer.cpp?rev=143891&r1=143890&r2=143891&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmParser/X86AsmLexer.cpp (original) +++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmLexer.cpp Sun Nov 6 14:37:06 2011 @@ -14,7 +14,6 @@ #include "llvm/MC/MCTargetAsmLexer.h" #include "llvm/Support/TargetRegistry.h" #include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/StringExtras.h" using namespace llvm; @@ -144,11 +143,7 @@ SetError(Lexer->getErrLoc(), Lexer->getErr()); return lexedToken; case AsmToken::Identifier: { - std::string upperCase = lexedToken.getString().str(); - std::string lowerCase = LowercaseString(upperCase); - StringRef lowerRef(lowerCase); - - unsigned regID = MatchRegisterName(lowerRef); + unsigned regID = MatchRegisterName(lexedToken.getString().lower()); if (regID) return AsmToken(AsmToken::Register, Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp?rev=143891&r1=143890&r2=143891&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original) +++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Sun Nov 6 14:37:06 2011 @@ -20,7 +20,6 @@ #include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/SmallString.h" #include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/ADT/Twine.h" #include "llvm/Support/SourceMgr.h" @@ -412,7 +411,7 @@ // If the match failed, try the register name as lowercase. if (RegNo == 0) - RegNo = MatchRegisterName(LowercaseString(Tok.getString())); + RegNo = MatchRegisterName(Tok.getString().lower()); if (!is64BitMode()) { // FIXME: This should be done using Requires and From craig.topper at gmail.com Sun Nov 6 17:04:09 2011 From: craig.topper at gmail.com (Craig Topper) Date: Sun, 06 Nov 2011 23:04:09 -0000 Subject: [llvm-commits] [llvm] r143895 - in /llvm/trunk: include/llvm/IntrinsicsX86.td lib/Target/X86/Disassembler/X86DisassemblerDecoder.c lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h lib/Target/X86/X86InstrFormats.td lib/Target/X86/X86InstrSSE.td test/CodeGen/X86/avx2-intrinsics-x86.ll utils/TableGen/X86DisassemblerTables.cpp utils/TableGen/X86RecognizableInstr.cpp Message-ID: <20111106230409.50D033524001@llvm.org> Author: ctopper Date: Sun Nov 6 17:04:08 2011 New Revision: 143895 URL: http://llvm.org/viewvc/llvm-project?rev=143895&view=rev Log: More AVX2 instructions and their intrinsics. Modified: llvm/trunk/include/llvm/IntrinsicsX86.td llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h llvm/trunk/lib/Target/X86/X86InstrFormats.td llvm/trunk/lib/Target/X86/X86InstrSSE.td llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp Modified: llvm/trunk/include/llvm/IntrinsicsX86.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IntrinsicsX86.td?rev=143895&r1=143894&r2=143895&view=diff ============================================================================== --- llvm/trunk/include/llvm/IntrinsicsX86.td (original) +++ llvm/trunk/include/llvm/IntrinsicsX86.td Sun Nov 6 17:04:08 2011 @@ -1112,7 +1112,7 @@ Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_v4f64_ty, llvm_i8_ty], [IntrNoMem]>; def int_x86_avx_vperm2f128_ps_256 : - GCCBuiltin<"__builtin_ia32_vperm2f128_ps256">, + GCCBuiltin<"_builtin_ia32_vperm2f128_ps256">, Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_v8f32_ty, llvm_i8_ty], [IntrNoMem]>; def int_x86_avx_vperm2f128_si_256 : @@ -1716,6 +1716,25 @@ Intrinsic<[llvm_v4i64_ty], [llvm_v2i64_ty], [IntrNoMem]>; } +// Vector permutation +let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". + def int_x86_avx2_permd : GCCBuiltin<"__builtin_ia32_permvarsi256">, + Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, llvm_v8i32_ty], + [IntrNoMem]>; + def int_x86_avx2_permq : GCCBuiltin<"__builtin_ia32_permdi256">, + Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, llvm_i8_ty], + [IntrNoMem]>; + def int_x86_avx2_permps : GCCBuiltin<"__builtin_ia32_permvarsf256">, + Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_v8f32_ty], + [IntrNoMem]>; + def int_x86_avx2_permpd : GCCBuiltin<"__builtin_ia32_permdf256">, + Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_i8_ty], + [IntrNoMem]>; + def int_x86_avx2_vperm2i128 : GCCBuiltin<"__builtin_ia32_permti256">, + Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, + llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; +} + // Misc. let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". def int_x86_avx2_pmovmskb : GCCBuiltin<"__builtin_ia32_pmovmskb256">, Modified: llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c?rev=143895&r1=143894&r2=143895&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c (original) +++ llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c Sun Nov 6 17:04:08 2011 @@ -773,17 +773,20 @@ if (insn->rexPrefix & 0x08) attrMask |= ATTR_REXW; - + if (getIDWithAttrMask(&instructionID, insn, attrMask)) return -1; - + /* The following clauses compensate for limitations of the tables. */ - - if ((attrMask & ATTR_VEXL) && (attrMask & ATTR_REXW)) { + + if ((attrMask & ATTR_VEXL) && (attrMask & ATTR_REXW) && + !(attrMask & ATTR_OPSIZE)) { /* * Some VEX instructions ignore the L-bit, but use the W-bit. Normally L-bit * has precedence since there are no L-bit with W-bit entries in the tables. * So if the L-bit isn't significant we should use the W-bit instead. + * We only need to do this if the instruction doesn't specify OpSize since + * there is a VEX_L_W_OPSIZE table. */ const struct InstructionSpecifier *spec; Modified: llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h?rev=143895&r1=143894&r2=143895&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h (original) +++ llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h Sun Nov 6 17:04:08 2011 @@ -111,7 +111,8 @@ ENUM_ENTRY(IC_VEX_L, 3, "requires VEX and the L prefix") \ ENUM_ENTRY(IC_VEX_L_XS, 4, "requires VEX and the L and XS prefix")\ ENUM_ENTRY(IC_VEX_L_XD, 4, "requires VEX and the L and XD prefix")\ - ENUM_ENTRY(IC_VEX_L_OPSIZE, 4, "requires VEX, L, and OpSize") + ENUM_ENTRY(IC_VEX_L_OPSIZE, 4, "requires VEX, L, and OpSize") \ + ENUM_ENTRY(IC_VEX_L_W_OPSIZE, 5, "requires VEX, L, W and OpSize") #define ENUM_ENTRY(n, r, d) n, Modified: llvm/trunk/lib/Target/X86/X86InstrFormats.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrFormats.td?rev=143895&r1=143894&r2=143895&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrFormats.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrFormats.td Sun Nov 6 17:04:08 2011 @@ -460,7 +460,7 @@ list pattern> : I, T8, OpSize, Requires<[HasAVX2]>; -class AVX2Ii8 o, Format F, dag outs, dag ins, string asm, +class AVX2AIi8 o, Format F, dag outs, dag ins, string asm, list pattern> : Ii8, TA, OpSize, Requires<[HasAVX2]>; Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=143895&r1=143894&r2=143895&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Sun Nov 6 17:04:08 2011 @@ -7310,14 +7310,17 @@ //===----------------------------------------------------------------------===// // VPERM2F128 - Permute Floating-Point Values in 128-bit chunks // +let neverHasSideEffects = 1 in { def VPERM2F128rr : AVXAIi8<0x06, MRMSrcReg, (outs VR256:$dst), (ins VR256:$src1, VR256:$src2, i8imm:$src3), "vperm2f128\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}", []>, VEX_4V; +let mayLoad = 1 in def VPERM2F128rm : AVXAIi8<0x06, MRMSrcMem, (outs VR256:$dst), (ins VR256:$src1, f256mem:$src2, i8imm:$src3), "vperm2f128\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}", []>, VEX_4V; +} def : Pat<(int_x86_avx_vperm2f128_ps_256 VR256:$src1, VR256:$src2, imm:$src3), (VPERM2F128rr VR256:$src1, VR256:$src2, imm:$src3)>; @@ -7402,18 +7405,18 @@ // AVX2 Instructions //===----------------------------------------------------------------------===// -/// AVX2I_binop_rmi_int - AVX2 binary operator with 8-bit immediate -multiclass AVX2I_binop_rmi_int opc, string OpcodeStr, +/// AVX2_binop_rmi_int - AVX2 binary operator with 8-bit immediate +multiclass AVX2_binop_rmi_int opc, string OpcodeStr, Intrinsic IntId, RegisterClass RC, PatFrag memop_frag, X86MemOperand x86memop> { let isCommutable = 1 in - def rri : AVX2Ii8, VEX_4V; - def rmi : AVX2Ii8; -defm VPBLENDDY : AVX2I_binop_rmi_int<0x02, "vpblendd", int_x86_avx2_pblendd_256, - VR256, memopv32i8, i256mem>; +defm VPBLENDD : AVX2_binop_rmi_int<0x02, "vpblendd", int_x86_avx2_pblendd_128, + VR128, memopv16i8, i128mem>; +defm VPBLENDDY : AVX2_binop_rmi_int<0x02, "vpblendd", int_x86_avx2_pblendd_256, + VR256, memopv32i8, i256mem>; } //===----------------------------------------------------------------------===// @@ -7465,3 +7468,62 @@ defm VPBROADCASTQ : avx2_broadcast<0x59, "vpbroadcastq", i64mem, loadi64, int_x86_avx2_pbroadcastq_128, int_x86_avx2_pbroadcastq_256>; + +//===----------------------------------------------------------------------===// +// VPERM - Permute instructions +// + +multiclass avx2_perm opc, string OpcodeStr, PatFrag mem_frag, + Intrinsic Int> { + def Yrr : AVX28I, VEX_4V; + def Yrm : AVX28I, + VEX_4V; +} + +defm VPERMD : avx2_perm<0x36, "vpermd", memopv8i32, int_x86_avx2_permd>; +defm VPERMPS : avx2_perm<0x16, "vpermps", memopv8f32, int_x86_avx2_permps>; + +multiclass avx2_perm_imm opc, string OpcodeStr, PatFrag mem_frag, + Intrinsic Int> { + def Yrr : AVX2AIi8, VEX; + def Yrm : AVX2AIi8, + VEX; +} + +defm VPERMQ : avx2_perm_imm<0x00, "vpermq", memopv4i64, int_x86_avx2_permq>, + VEX_W; +defm VPERMPD : avx2_perm_imm<0x01, "vpermpd", memopv4f64, int_x86_avx2_permpd>, + VEX_W; + +//===----------------------------------------------------------------------===// +// VPERM2F128 - Permute Floating-Point Values in 128-bit chunks +// +def VPERM2I128rr : AVXAIi8<0x46, MRMSrcReg, (outs VR256:$dst), + (ins VR256:$src1, VR256:$src2, i8imm:$src3), + "vperm2i128\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}", + [(set VR256:$dst, + (int_x86_avx2_vperm2i128 VR256:$src1, VR256:$src2, imm:$src3))]>, + VEX_4V; +def VPERM2I128rm : AVXAIi8<0x46, MRMSrcMem, (outs VR256:$dst), + (ins VR256:$src1, f256mem:$src2, i8imm:$src3), + "vperm2i128\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}", + [(set VR256:$dst, + (int_x86_avx2_vperm2i128 VR256:$src1, (memopv4i64 addr:$src2), + imm:$src3))]>, + VEX_4V; Modified: llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll?rev=143895&r1=143894&r2=143895&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll (original) +++ llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll Sun Nov 6 17:04:08 2011 @@ -846,3 +846,43 @@ ret <4 x i64> %res } declare <4 x i64> @llvm.x86.avx2.pbroadcastq.256(<2 x i64>) nounwind readonly + + +define <8 x i32> @test_x86_avx2_permd(<8 x i32> %a0, <8 x i32> %a1) { + ; CHECK: vpermd + %res = call <8 x i32> @llvm.x86.avx2.permd(<8 x i32> %a0, <8 x i32> %a1) ; <<8 x i32>> [#uses=1] + ret <8 x i32> %res +} +declare <8 x i32> @llvm.x86.avx2.permd(<8 x i32>, <8 x i32>) nounwind readonly + + +define <8 x float> @test_x86_avx2_permps(<8 x float> %a0, <8 x float> %a1) { + ; CHECK: vpermps + %res = call <8 x float> @llvm.x86.avx2.permps(<8 x float> %a0, <8 x float> %a1) ; <<8 x float>> [#uses=1] + ret <8 x float> %res +} +declare <8 x float> @llvm.x86.avx2.permps(<8 x float>, <8 x float>) nounwind readonly + + +define <4 x i64> @test_x86_avx2_permq(<4 x i64> %a0) { + ; CHECK: vpermq + %res = call <4 x i64> @llvm.x86.avx2.permq(<4 x i64> %a0, i8 7) ; <<4 x i64>> [#uses=1] + ret <4 x i64> %res +} +declare <4 x i64> @llvm.x86.avx2.permq(<4 x i64>, i8) nounwind readonly + + +define <4 x double> @test_x86_avx2_permpd(<4 x double> %a0) { + ; CHECK: vpermpd + %res = call <4 x double> @llvm.x86.avx2.permpd(<4 x double> %a0, i8 7) ; <<4 x double>> [#uses=1] + ret <4 x double> %res +} +declare <4 x double> @llvm.x86.avx2.permpd(<4 x double>, i8) nounwind readonly + + +define <4 x i64> @test_x86_avx2_vperm2i128(<4 x i64> %a0, <4 x i64> %a1) { + ; CHECK: vperm2i128 + %res = call <4 x i64> @llvm.x86.avx2.vperm2i128(<4 x i64> %a0, <4 x i64> %a1, i8 1) ; <<4 x i64>> [#uses=1] + ret <4 x i64> %res +} +declare <4 x i64> @llvm.x86.avx2.vperm2i128(<4 x i64>, <4 x i64>, i8) nounwind readonly Modified: llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp?rev=143895&r1=143894&r2=143895&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp (original) +++ llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp Sun Nov 6 17:04:08 2011 @@ -95,7 +95,10 @@ case IC_VEX_L: case IC_VEX_L_XS: case IC_VEX_L_XD: + return false; case IC_VEX_L_OPSIZE: + return inheritsFrom(child, IC_VEX_L_W_OPSIZE); + case IC_VEX_L_W_OPSIZE: return false; default: llvm_unreachable("Unknown instruction class"); @@ -494,7 +497,9 @@ for (index = 0; index < 256; ++index) { o.indent(i * 2); - if ((index & ATTR_VEXL) && (index & ATTR_OPSIZE)) + if ((index & ATTR_VEXL) && (index & ATTR_REXW) && (index & ATTR_OPSIZE)) + o << "IC_VEX_L_W_OPSIZE"; + else if ((index & ATTR_VEXL) && (index & ATTR_OPSIZE)) o << "IC_VEX_L_OPSIZE"; else if ((index & ATTR_VEXL) && (index & ATTR_XD)) o << "IC_VEX_L_XD"; Modified: llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp?rev=143895&r1=143894&r2=143895&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp (original) +++ llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp Sun Nov 6 17:04:08 2011 @@ -285,9 +285,12 @@ InstructionContext insnContext; if (HasVEX_4VPrefix || HasVEX_4VOp3Prefix|| HasVEXPrefix) { - if (HasVEX_LPrefix && HasVEX_WPrefix) - llvm_unreachable("Don't support VEX.L and VEX.W together"); - else if (HasOpSizePrefix && HasVEX_LPrefix) + if (HasVEX_LPrefix && HasVEX_WPrefix) { + if (HasOpSizePrefix) + insnContext = IC_VEX_L_W_OPSIZE; + else + llvm_unreachable("Don't support VEX.L and VEX.W together"); + } else if (HasOpSizePrefix && HasVEX_LPrefix) insnContext = IC_VEX_L_OPSIZE; else if (HasOpSizePrefix && HasVEX_WPrefix) insnContext = IC_VEX_W_OPSIZE; From geek4civic at gmail.com Sun Nov 6 17:37:22 2011 From: geek4civic at gmail.com (NAKAMURA Takumi) Date: Sun, 06 Nov 2011 23:37:22 -0000 Subject: [llvm-commits] [llvm] r143898 - /llvm/trunk/cmake/modules/ChooseMSVCCRT.cmake Message-ID: <20111106233722.502792A6C12C@llvm.org> Author: chapuni Date: Sun Nov 6 17:37:22 2011 New Revision: 143898 URL: http://llvm.org/viewvc/llvm-project?rev=143898&view=rev Log: Fix CRT selection logic when using CMake NMake generator. CMAKE_CONFIGURATION_TYPES is only set on Visual Studio generators. For NMake CMAKE_BUILD_TYPE is used instead. Patch by EJose Fonseca! Modified: llvm/trunk/cmake/modules/ChooseMSVCCRT.cmake Modified: llvm/trunk/cmake/modules/ChooseMSVCCRT.cmake URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/ChooseMSVCCRT.cmake?rev=143898&r1=143897&r2=143898&view=diff ============================================================================== --- llvm/trunk/cmake/modules/ChooseMSVCCRT.cmake (original) +++ llvm/trunk/cmake/modules/ChooseMSVCCRT.cmake Sun Nov 6 17:37:22 2011 @@ -60,7 +60,7 @@ make_crt_regex(MSVC_CRT_REGEX ${MSVC_CRT}) - foreach(build_type ${CMAKE_CONFIGURATION_TYPES}) + foreach(build_type ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE}) string(TOUPPER "${build_type}" build) if (NOT LLVM_USE_CRT_${build}) get_current_crt(LLVM_USE_CRT_${build} @@ -75,7 +75,7 @@ endif(NOT LLVM_USE_CRT_${build}) endforeach(build_type) - foreach(build_type ${CMAKE_CONFIGURATION_TYPES}) + foreach(build_type ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE}) string(TOUPPER "${build_type}" build) if ("${LLVM_USE_CRT_${build}}" STREQUAL "") set(flag_string " ") From geek4civic at gmail.com Sun Nov 6 17:41:22 2011 From: geek4civic at gmail.com (NAKAMURA Takumi) Date: Mon, 7 Nov 2011 08:41:22 +0900 Subject: [llvm-commits] [PATCH] Fix CRT selection logic when using CMake NMake generator. In-Reply-To: <1313208683.205578.1320435757913.JavaMail.root@zimbra-prod-mbox-2.vmware.com> References: <1318620024-8108-1-git-send-email-jfonseca@vmware.com> <1313208683.205578.1320435757913.JavaMail.root@zimbra-prod-mbox-2.vmware.com> Message-ID: Jose, applied in r143898, thank you! I believe it is trivial, too. ...Takumi 2011/11/5 Jose Fonseca : > Ping? > > It's really trivial. > > Jose > > ----- Original Message ----- >> >> CMAKE_CONFIGURATION_TYPES is only set on Visual Studio generators. >> ?For >> NMake CMAKE_BUILD_TYPE is used instead. >> --- >> ?cmake/modules/ChooseMSVCCRT.cmake | ? ?4 ++-- >> ?1 files changed, 2 insertions(+), 2 deletions(-) >> >> > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > From craig.topper at gmail.com Sun Nov 6 18:54:28 2011 From: craig.topper at gmail.com (Craig Topper) Date: Mon, 07 Nov 2011 00:54:28 -0000 Subject: [llvm-commits] [llvm] r143901 - /llvm/trunk/include/llvm/IntrinsicsX86.td Message-ID: <20111107005428.76D682A6C12C@llvm.org> Author: ctopper Date: Sun Nov 6 18:54:28 2011 New Revision: 143901 URL: http://llvm.org/viewvc/llvm-project?rev=143901&view=rev Log: Fix accidental edit to __builtin_ia32_vperm2f128_ps256's name Modified: llvm/trunk/include/llvm/IntrinsicsX86.td Modified: llvm/trunk/include/llvm/IntrinsicsX86.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IntrinsicsX86.td?rev=143901&r1=143900&r2=143901&view=diff ============================================================================== --- llvm/trunk/include/llvm/IntrinsicsX86.td (original) +++ llvm/trunk/include/llvm/IntrinsicsX86.td Sun Nov 6 18:54:28 2011 @@ -1112,7 +1112,7 @@ Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_v4f64_ty, llvm_i8_ty], [IntrNoMem]>; def int_x86_avx_vperm2f128_ps_256 : - GCCBuiltin<"_builtin_ia32_vperm2f128_ps256">, + GCCBuiltin<"__builtin_ia32_vperm2f128_ps256">, Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_v8f32_ty, llvm_i8_ty], [IntrNoMem]>; def int_x86_avx_vperm2f128_si_256 : From craig.topper at gmail.com Sun Nov 6 20:00:04 2011 From: craig.topper at gmail.com (Craig Topper) Date: Mon, 07 Nov 2011 02:00:04 -0000 Subject: [llvm-commits] [llvm] r143902 - in /llvm/trunk: include/llvm/IntrinsicsX86.td lib/Target/X86/X86InstrSSE.td test/CodeGen/X86/avx2-intrinsics-x86.ll Message-ID: <20111107020004.D479B2A6C12C@llvm.org> Author: ctopper Date: Sun Nov 6 20:00:04 2011 New Revision: 143902 URL: http://llvm.org/viewvc/llvm-project?rev=143902&view=rev Log: Add AVX2 VEXTRACTI128 and VINSERTI128 instructions. Fix VPERM2I128 to be qualified with HasAVX2 instead of HasAVX. Mark VINSERTF128 and VEXTRACTF128 as never having side effects. Modified: llvm/trunk/include/llvm/IntrinsicsX86.td llvm/trunk/lib/Target/X86/X86InstrSSE.td llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll Modified: llvm/trunk/include/llvm/IntrinsicsX86.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IntrinsicsX86.td?rev=143902&r1=143901&r2=143902&view=diff ============================================================================== --- llvm/trunk/include/llvm/IntrinsicsX86.td (original) +++ llvm/trunk/include/llvm/IntrinsicsX86.td Sun Nov 6 20:00:04 2011 @@ -1731,10 +1731,19 @@ Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_i8_ty], [IntrNoMem]>; def int_x86_avx2_vperm2i128 : GCCBuiltin<"__builtin_ia32_permti256">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, - llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; + Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, + llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; } +// Vector extract and insert +let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". + def int_x86_avx2_vextracti128 : GCCBuiltin<"__builtin_ia32_extract128i256">, + Intrinsic<[llvm_v2i64_ty], [llvm_v4i64_ty, + llvm_i8_ty], [IntrNoMem]>; + def int_x86_avx2_vinserti128 : GCCBuiltin<"__builtin_ia32_insert128i256">, + Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, + llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; +} // Misc. let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". def int_x86_avx2_pmovmskb : GCCBuiltin<"__builtin_ia32_pmovmskb256">, Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=143902&r1=143901&r2=143902&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Sun Nov 6 20:00:04 2011 @@ -7130,14 +7130,17 @@ //===----------------------------------------------------------------------===// // VINSERTF128 - Insert packed floating-point values // +let neverHasSideEffects = 1 in { def VINSERTF128rr : AVXAIi8<0x18, MRMSrcReg, (outs VR256:$dst), (ins VR256:$src1, VR128:$src2, i8imm:$src3), "vinsertf128\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}", []>, VEX_4V; +let mayLoad = 1 in def VINSERTF128rm : AVXAIi8<0x18, MRMSrcMem, (outs VR256:$dst), (ins VR256:$src1, f128mem:$src2, i8imm:$src3), "vinsertf128\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}", []>, VEX_4V; +} def : Pat<(int_x86_avx_vinsertf128_pd_256 VR256:$src1, VR128:$src2, imm:$src3), (VINSERTF128rr VR256:$src1, VR128:$src2, imm:$src3)>; @@ -7174,14 +7177,17 @@ //===----------------------------------------------------------------------===// // VEXTRACTF128 - Extract packed floating-point values // +let neverHasSideEffects = 1 in { def VEXTRACTF128rr : AVXAIi8<0x19, MRMDestReg, (outs VR128:$dst), (ins VR256:$src1, i8imm:$src2), "vextractf128\t{$src2, $src1, $dst|$dst, $src1, $src2}", []>, VEX; +let mayStore = 1 in def VEXTRACTF128mr : AVXAIi8<0x19, MRMDestMem, (outs), (ins f128mem:$dst, VR256:$src1, i8imm:$src2), "vextractf128\t{$src2, $src1, $dst|$dst, $src1, $src2}", []>, VEX; +} def : Pat<(int_x86_avx_vextractf128_pd_256 VR256:$src1, imm:$src2), (VEXTRACTF128rr VR256:$src1, imm:$src2)>; @@ -7514,16 +7520,46 @@ //===----------------------------------------------------------------------===// // VPERM2F128 - Permute Floating-Point Values in 128-bit chunks // -def VPERM2I128rr : AVXAIi8<0x46, MRMSrcReg, (outs VR256:$dst), +def VPERM2I128rr : AVX2AIi8<0x46, MRMSrcReg, (outs VR256:$dst), (ins VR256:$src1, VR256:$src2, i8imm:$src3), "vperm2i128\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}", [(set VR256:$dst, (int_x86_avx2_vperm2i128 VR256:$src1, VR256:$src2, imm:$src3))]>, VEX_4V; -def VPERM2I128rm : AVXAIi8<0x46, MRMSrcMem, (outs VR256:$dst), +def VPERM2I128rm : AVX2AIi8<0x46, MRMSrcMem, (outs VR256:$dst), (ins VR256:$src1, f256mem:$src2, i8imm:$src3), "vperm2i128\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}", [(set VR256:$dst, (int_x86_avx2_vperm2i128 VR256:$src1, (memopv4i64 addr:$src2), imm:$src3))]>, VEX_4V; + +//===----------------------------------------------------------------------===// +// VINSERTI128 - Insert packed integer values +// +def VINSERTI128rr : AVX2AIi8<0x38, MRMSrcReg, (outs VR256:$dst), + (ins VR256:$src1, VR128:$src2, i8imm:$src3), + "vinserti128\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}", + [(set VR256:$dst, + (int_x86_avx2_vinserti128 VR256:$src1, VR128:$src2, imm:$src3))]>, + VEX_4V; +def VINSERTI128rm : AVX2AIi8<0x38, MRMSrcMem, (outs VR256:$dst), + (ins VR256:$src1, i128mem:$src2, i8imm:$src3), + "vinserti128\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}", + [(set VR256:$dst, + (int_x86_avx2_vinserti128 VR256:$src1, (memopv2i64 addr:$src2), + imm:$src3))]>, VEX_4V; + +//===----------------------------------------------------------------------===// +// VEXTRACTI128 - Extract packed integer values +// +def VEXTRACTI128rr : AVX2AIi8<0x39, MRMDestReg, (outs VR128:$dst), + (ins VR256:$src1, i8imm:$src2), + "vextracti128\t{$src2, $src1, $dst|$dst, $src1, $src2}", + [(set VR128:$dst, + (int_x86_avx2_vextracti128 VR256:$src1, imm:$src2))]>, + VEX; +let neverHasSideEffects = 1, mayStore = 1 in +def VEXTRACTI128mr : AVX2AIi8<0x39, MRMDestMem, (outs), + (ins i128mem:$dst, VR256:$src1, i8imm:$src2), + "vextracti128\t{$src2, $src1, $dst|$dst, $src1, $src2}", []>, VEX; Modified: llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll?rev=143902&r1=143901&r2=143902&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll (original) +++ llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll Sun Nov 6 20:00:04 2011 @@ -886,3 +886,19 @@ ret <4 x i64> %res } declare <4 x i64> @llvm.x86.avx2.vperm2i128(<4 x i64>, <4 x i64>, i8) nounwind readonly + + +define <2 x i64> @test_x86_avx2_vextracti128(<4 x i64> %a0) { + ; CHECK: vextracti128 + %res = call <2 x i64> @llvm.x86.avx2.vextracti128(<4 x i64> %a0, i8 7) ; <<2 x i64>> [#uses=1] + ret <2 x i64> %res +} +declare <2 x i64> @llvm.x86.avx2.vextracti128(<4 x i64>, i8) nounwind readnone + + +define <4 x i64> @test_x86_avx2_vinserti128(<4 x i64> %a0, <2 x i64> %a1) { + ; CHECK: vinserti128 + %res = call <4 x i64> @llvm.x86.avx2.vinserti128(<4 x i64> %a0, <2 x i64> %a1, i8 7) ; <<4 x i64>> [#uses=1] + ret <4 x i64> %res +} +declare <4 x i64> @llvm.x86.avx2.vinserti128(<4 x i64>, <2 x i64>, i8) nounwind readnone From craig.topper at gmail.com Sun Nov 6 21:20:36 2011 From: craig.topper at gmail.com (Craig Topper) Date: Mon, 07 Nov 2011 03:20:36 -0000 Subject: [llvm-commits] [llvm] r143904 - in /llvm/trunk: include/llvm/IntrinsicsX86.td lib/Target/X86/X86InstrSSE.td test/CodeGen/X86/avx2-intrinsics-x86.ll Message-ID: <20111107032036.4D53B2A6C12C@llvm.org> Author: ctopper Date: Sun Nov 6 21:20:35 2011 New Revision: 143904 URL: http://llvm.org/viewvc/llvm-project?rev=143904&view=rev Log: Add AVX2 VPMOVMASK instructions and intrinsics. Modified: llvm/trunk/include/llvm/IntrinsicsX86.td llvm/trunk/lib/Target/X86/X86InstrSSE.td llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll Modified: llvm/trunk/include/llvm/IntrinsicsX86.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IntrinsicsX86.td?rev=143904&r1=143903&r2=143904&view=diff ============================================================================== --- llvm/trunk/include/llvm/IntrinsicsX86.td (original) +++ llvm/trunk/include/llvm/IntrinsicsX86.td Sun Nov 6 21:20:35 2011 @@ -1744,6 +1744,33 @@ Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; } + +// Conditional load ops +let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". + def int_x86_avx2_maskload_d : GCCBuiltin<"__builtin_ia32_maskloadd">, + Intrinsic<[llvm_v4i32_ty], [llvm_ptr_ty, llvm_v4i32_ty], [IntrReadMem]>; + def int_x86_avx2_maskload_q : GCCBuiltin<"__builtin_ia32_maskloadq">, + Intrinsic<[llvm_v2i64_ty], [llvm_ptr_ty, llvm_v2i64_ty], [IntrReadMem]>; + def int_x86_avx2_maskload_d_256 : GCCBuiltin<"__builtin_ia32_maskloadd256">, + Intrinsic<[llvm_v8i32_ty], [llvm_ptr_ty, llvm_v8i32_ty], [IntrReadMem]>; + def int_x86_avx2_maskload_q_256 : GCCBuiltin<"__builtin_ia32_maskloadq256">, + Intrinsic<[llvm_v4i64_ty], [llvm_ptr_ty, llvm_v4i64_ty], [IntrReadMem]>; +} + +// Conditional store ops +let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". + def int_x86_avx2_maskstore_d : GCCBuiltin<"__builtin_ia32_maskstored">, + Intrinsic<[], [llvm_ptr_ty, llvm_v4i32_ty, llvm_v4i32_ty], []>; + def int_x86_avx2_maskstore_q : GCCBuiltin<"__builtin_ia32_maskstoreq">, + Intrinsic<[], [llvm_ptr_ty, llvm_v2i64_ty, llvm_v2i64_ty], []>; + def int_x86_avx2_maskstore_d_256 : + GCCBuiltin<"__builtin_ia32_maskstored256">, + Intrinsic<[], [llvm_ptr_ty, llvm_v8i32_ty, llvm_v8i32_ty], []>; + def int_x86_avx2_maskstore_q_256 : + GCCBuiltin<"__builtin_ia32_maskstoreq256">, + Intrinsic<[], [llvm_ptr_ty, llvm_v4i64_ty, llvm_v4i64_ty], []>; +} + // Misc. let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". def int_x86_avx2_pmovmskb : GCCBuiltin<"__builtin_ia32_pmovmskb256">, Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=143904&r1=143903&r2=143904&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Sun Nov 6 21:20:35 2011 @@ -7563,3 +7563,41 @@ def VEXTRACTI128mr : AVX2AIi8<0x39, MRMDestMem, (outs), (ins i128mem:$dst, VR256:$src1, i8imm:$src2), "vextracti128\t{$src2, $src1, $dst|$dst, $src1, $src2}", []>, VEX; + +//===----------------------------------------------------------------------===// +// VPMASKMOV - Conditional SIMD Integer Packed Loads and Stores +// +multiclass avx2_pmovmask { + def rm : AVX28I<0x8c, MRMSrcMem, (outs VR128:$dst), + (ins VR128:$src1, i128mem:$src2), + !strconcat(OpcodeStr, "\t{$src2, $src1, $dst|$dst, $src1, $src2}"), + [(set VR128:$dst, (IntLd128 addr:$src2, VR128:$src1))]>, VEX_4V; + def Yrm : AVX28I<0x8c, MRMSrcMem, (outs VR256:$dst), + (ins VR256:$src1, i256mem:$src2), + !strconcat(OpcodeStr, "\t{$src2, $src1, $dst|$dst, $src1, $src2}"), + [(set VR256:$dst, (IntLd256 addr:$src2, VR256:$src1))]>, VEX_4V; + def mr : AVX28I<0x8e, MRMDestMem, (outs), + (ins i128mem:$dst, VR128:$src1, VR128:$src2), + !strconcat(OpcodeStr, "\t{$src2, $src1, $dst|$dst, $src1, $src2}"), + [(IntSt128 addr:$dst, VR128:$src1, VR128:$src2)]>, VEX_4V; + def Ymr : AVX28I<0x8e, MRMDestMem, (outs), + (ins i256mem:$dst, VR256:$src1, VR256:$src2), + !strconcat(OpcodeStr, "\t{$src2, $src1, $dst|$dst, $src1, $src2}"), + [(IntSt256 addr:$dst, VR256:$src1, VR256:$src2)]>, VEX_4V; +} + +defm VPMASKMOVD : avx2_pmovmask<"vpmaskmovd", + int_x86_avx2_maskload_d, + int_x86_avx2_maskload_d_256, + int_x86_avx2_maskstore_d, + int_x86_avx2_maskstore_d_256, + memopv4i32, memopv8i32>; +defm VPMASKMOVQ : avx2_pmovmask<"vpmaskmovq", + int_x86_avx2_maskload_q, + int_x86_avx2_maskload_q_256, + int_x86_avx2_maskstore_q, + int_x86_avx2_maskstore_q_256, + memopv2i64, memopv4i64>, VEX_W; Modified: llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll?rev=143904&r1=143903&r2=143904&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll (original) +++ llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll Sun Nov 6 21:20:35 2011 @@ -902,3 +902,67 @@ ret <4 x i64> %res } declare <4 x i64> @llvm.x86.avx2.vinserti128(<4 x i64>, <2 x i64>, i8) nounwind readnone + + +define <2 x i64> @test_x86_avx2_maskload_q(i8* %a0, <2 x i64> %a1) { + ; CHECK: vpmaskmovq + %res = call <2 x i64> @llvm.x86.avx2.maskload.q(i8* %a0, <2 x i64> %a1) ; <<2 x i64>> [#uses=1] + ret <2 x i64> %res +} +declare <2 x i64> @llvm.x86.avx2.maskload.q(i8*, <2 x i64>) nounwind readonly + + +define <4 x i64> @test_x86_avx2_maskload_q_256(i8* %a0, <4 x i64> %a1) { + ; CHECK: vpmaskmovq + %res = call <4 x i64> @llvm.x86.avx2.maskload.q.256(i8* %a0, <4 x i64> %a1) ; <<4 x i64>> [#uses=1] + ret <4 x i64> %res +} +declare <4 x i64> @llvm.x86.avx2.maskload.q.256(i8*, <4 x i64>) nounwind readonly + + +define <4 x i32> @test_x86_avx2_maskload_d(i8* %a0, <4 x i32> %a1) { + ; CHECK: vpmaskmovd + %res = call <4 x i32> @llvm.x86.avx2.maskload.d(i8* %a0, <4 x i32> %a1) ; <<4 x i32>> [#uses=1] + ret <4 x i32> %res +} +declare <4 x i32> @llvm.x86.avx2.maskload.d(i8*, <4 x i32>) nounwind readonly + + +define <8 x i32> @test_x86_avx2_maskload_d_256(i8* %a0, <8 x i32> %a1) { + ; CHECK: vpmaskmovd + %res = call <8 x i32> @llvm.x86.avx2.maskload.d.256(i8* %a0, <8 x i32> %a1) ; <<8 x i32>> [#uses=1] + ret <8 x i32> %res +} +declare <8 x i32> @llvm.x86.avx2.maskload.d.256(i8*, <8 x i32>) nounwind readonly + + +define void @test_x86_avx2_maskstore_q(i8* %a0, <2 x i64> %a1, <2 x i64> %a2) { + ; CHECK: vpmaskmovq + call void @llvm.x86.avx2.maskstore.q(i8* %a0, <2 x i64> %a1, <2 x i64> %a2) + ret void +} +declare void @llvm.x86.avx2.maskstore.q(i8*, <2 x i64>, <2 x i64>) nounwind + + +define void @test_x86_avx2_maskstore_q_256(i8* %a0, <4 x i64> %a1, <4 x i64> %a2) { + ; CHECK: vpmaskmovq + call void @llvm.x86.avx2.maskstore.q.256(i8* %a0, <4 x i64> %a1, <4 x i64> %a2) + ret void +} +declare void @llvm.x86.avx2.maskstore.q.256(i8*, <4 x i64>, <4 x i64>) nounwind + + +define void @test_x86_avx2_maskstore_d(i8* %a0, <4 x i32> %a1, <4 x i32> %a2) { + ; CHECK: vpmaskmovd + call void @llvm.x86.avx2.maskstore.d(i8* %a0, <4 x i32> %a1, <4 x i32> %a2) + ret void +} +declare void @llvm.x86.avx2.maskstore.d(i8*, <4 x i32>, <4 x i32>) nounwind + + +define void @test_x86_avx2_maskstore_d_256(i8* %a0, <8 x i32> %a1, <8 x i32> %a2) { + ; CHECK: vpmaskmovd + call void @llvm.x86.avx2.maskstore.d.256(i8* %a0, <8 x i32> %a1, <8 x i32> %a2) + ret void +} +declare void @llvm.x86.avx2.maskstore.d.256(i8*, <8 x i32>, <8 x i32>) nounwind From bcahoon at codeaurora.org Sun Nov 6 17:22:39 2011 From: bcahoon at codeaurora.org (Brendon Cahoon) Date: Sun, 6 Nov 2011 17:22:39 -0600 Subject: [llvm-commits] [PATCH] Loop unrolling for run-time trip counts Message-ID: <01a401cc9cda$fa184580$ee48d080$@org> Hi, This patch contains code to unroll loops that contain a run-time trip count. It extends the existing code, in the LoopUnroll and LoopUnrollPass classes, that unrolls loops with compile-time trip counts. The ability to unroll loops with run-time trip counts using this patch is turned off by default. To enable the transformation, I added an option, -unroll-runtime. It's probably best to keep it disabled for now since some programs may degrade in performance with the option enabled. We're hoping that some more tuning will help minimize any performance regressions. Of course, we do see performance improvements as well. I tested llvm with the patch and it passes 'make check-all' and there are no regressions in test-suite when using the 'simple' test target. I have also enabled the option and tested using test-suite, and there are no regressions with the option enabled. With the option enabled, there will be some errors with the tests when running 'make check-all' for two reasons. The existing tests assume that there is no loop unrolling for run-time trip counts, and my implementation requires that loop simplify is run afterward (I am planning on fixing this issue). I've also tested the code on a different test suite for ARM and our soon to be added backend. This implementation works by using the existing loop unrolling code to actually unroll the loop by some unroll factor (the default is 8 iterations). This patch generates code prior to the loop to compute the number of extra iterations to execute before entering the unrolled loop. The number of extra iterations is the run-time trip count modulo the unroll factor. We generate code to check the number of extra iterations and branch to the extra copies of the loop body that execute the extra iterations before entering the unrolled loop. We generate an if-then-else sequence, which may get converted to a switch statement by LLVM. The patch generates 'unroll factor - 1' copies of the loop body prior to the loop to execute these extra iterations. This implementation only allow unroll factors that are a power to 2 to reduce the cost of computing the number of extra iterations. There are other limitations in implementation including only allowing loops with a single exit that occurs in the latch block. There is certainly some room for improving the code, but it works and improves performance on some actual benchmarks. The patch includes changes to the following files: lib/Transforms/Scalar/LoopUnrollPass.cpp lib/Transfoms/Utils/LoopUnroll.cpp include/llvm/Transforms/Utils/UnrollLoop.h And new files in the test directory: test/Transforms/LoopUnroll/runtime-loop[1-3].ll I appreciate any comments, questions, etc. on the code. Thanks, -- Brendon Cahoon -- Qualcomm Innovation Center, Inc is a member of Code Aurora Forum -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111106/676b55c4/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: unroll-runtime.patch Type: application/octet-stream Size: 30517 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111106/676b55c4/attachment.obj