50f02cb21b 
								
							 
						 
						
							
							
								
								Move global variables in TargetMachine into new TargetOptions class. As an API  
							
							... 
							
							
							
							change, now you need a TargetOptions object to create a TargetMachine. Clang
patch to follow.
One small functionality change in PTX. PTX had commented out the machine
verifier parts in their copy of printAndVerify. That now calls the version in
LLVMTargetMachine. Users of PTX who need verification disabled should rely on
not passing the command-line flag to enable it.
llvm-svn: 145714 
							
						 
						
							2011-12-02 22:16:29 +00:00  
				
					
						
							
							
								 
						
							
								bbf3b0de8b 
								
							 
						 
						
							
							
								
								Goodbye TargetAsmInfo. This eliminate last bit of CodeGen and Target in llvm-mc.  
							
							... 
							
							
							
							There is still a bit more refactoring left to do in Targets. But we are now very
close to fixing all the layering issues in MC.
llvm-svn: 135611 
							
						 
						
							2011-07-20 19:50:42 +00:00  
				
					
						
							
							
								 
						
							
								76792992d6 
								
							 
						 
						
							
							
								
								Add MCObjectFileInfo and sink the MCSections initialization code from  
							
							... 
							
							
							
							TargetLoweringObjectFileImpl down to MCObjectFileInfo.
TargetAsmInfo is done to one last method. It's *almost* gone!
llvm-svn: 135569 
							
						 
						
							2011-07-20 05:58:47 +00:00  
				
					
						
							
							
								 
						
							
								229907cd11 
								
							 
						 
						
							
							
								
								land David Blaikie's patch to de-constify Type, with a few tweaks.  
							
							... 
							
							
							
							llvm-svn: 135375 
							
						 
						
							2011-07-18 04:54:35 +00:00  
				
					
						
							
							
								 
						
							
								2d7faa5e3e 
								
							 
						 
						
							
							
								
								Fix up TargetLoweringObjectFile ctors to properly initialize fields.  
							
							... 
							
							
							
							llvm-svn: 135068 
							
						 
						
							2011-07-13 19:54:59 +00:00  
				
					
						
							
							
								 
						
							
								9af2fa9d1b 
								
							 
						 
						
							
							
								
								Use the presence of the __compact_unwind section to indicate that a target  
							
							... 
							
							
							
							supports compact unwind info instead of having a separate flag indicating this.
llvm-svn: 133685 
							
						 
						
							2011-06-23 05:13:28 +00:00  
				
					
						
							
							
								 
						
							
								f942585dae 
								
							 
						 
						
							
							
								
								Add a flag that indicates whether a target supports compact unwind info or not.  
							
							... 
							
							
							
							llvm-svn: 133662 
							
						 
						
							2011-06-22 23:16:51 +00:00  
				
					
						
							
							
								 
						
							
								d346304373 
								
							 
						 
						
							
							
								
								Add a __LD,__compact_unwind section.  
							
							... 
							
							
							
							If the linker supports it, this will hold the CIE and FDE information in a
compact format. The implementation of the compact unwinding emission is coming
soon.
llvm-svn: 133658 
							
						 
						
							2011-06-22 22:22:24 +00:00  
				
					
						
							
							
								 
						
							
								6002068c13 
								
							 
						 
						
							
							
								
								Fix a FIXME by making GlobalVariable::getInitializer() return a  
							
							... 
							
							
							
							const Constant *.
llvm-svn: 133400 
							
						 
						
							2011-06-19 18:37:11 +00:00  
				
					
						
							
							
								 
						
							
								a48b1375df 
								
							 
						 
						
							
							
								
								Remove a flag that would set the ".eh" symbol as .globl. MachO was the only one  
							
							... 
							
							
							
							who used this flag, and it now emits CFI and doesn't emit this anymore. All
other targets left this flag "false".
<rdar://problem/8486371>
llvm-svn: 130918 
							
						 
						
							2011-05-05 06:49:15 +00:00  
				
					
						
							
							
								 
						
							
								750cb61553 
								
							 
						 
						
							
							
								
								GCC uses a different encoding of pointers in the FDE when using  
							
							... 
							
							
							
							-fno-dwarf2-cfi-asm. Implement the same behavior.
llvm-svn: 130637 
							
						 
						
							2011-05-01 04:49:54 +00:00  
				
					
						
							
							
								 
						
							
								ce83fc3463 
								
							 
						 
						
							
							
								
								Remove unnecessary argument.  
							
							... 
							
							
							
							llvm-svn: 130343 
							
						 
						
							2011-04-27 23:17:57 +00:00  
				
					
						
							
							
								 
						
							
								08704349da 
								
							 
						 
						
							
							
								
								Rename getPersonalityPICSymbol to getCFIPersonalitySymbol, document it, and  
							
							... 
							
							
							
							give it a bit more responsibility. Also implement it for MachO.
If hacked to use cfi, 32 bit MachO will produce
.cfi_personality 155, L___gxx_personality_v0$non_lazy_ptr
and 64 bit will produce
.cfi_presonality ___gxx_personality_v0
The general idea is that .cfi_personality gets passed the final symbol. It is
up to codegen to produce it if using indirect representation (like 32 bit
MachO), but it is up to MC to decide which relocations to create.
llvm-svn: 130341 
							
						 
						
							2011-04-27 23:08:15 +00:00  
				
					
						
							
							
								 
						
							
								e473aaf540 
								
							 
						 
						
							
							
								
								Remove unused arguments.  
							
							... 
							
							
							
							llvm-svn: 129844 
							
						 
						
							2011-04-20 03:08:09 +00:00  
				
					
						
							
							
								 
						
							
								47f86e6c60 
								
							 
						 
						
							
							
								
								MSVC needs the return 0 to compile.  
							
							... 
							
							
							
							llvm-svn: 129640 
							
						 
						
							2011-04-16 13:59:23 +00:00  
				
					
						
							
							
								 
						
							
								a83b177035 
								
							 
						 
						
							
							
								
								Put each personality function in a section. This fixes the gnu ld warning:  
							
							... 
							
							
							
							error in foo.o; no .eh_frame_hdr table will be created.
llvm-svn: 129635 
							
						 
						
							2011-04-16 03:51:21 +00:00  
				
					
						
							
							
								 
						
							
								a01cdb0e37 
								
							 
						 
						
							
							
								
								Add 129518 back with a fix for when we are producing eh just because of debug info.  
							
							... 
							
							
							
							Change ELF systems to use CFI for producing the EH tables. This reduces the
size of the clang binary in Debug builds from 690MB to 679MB.
llvm-svn: 129571 
							
						 
						
							2011-04-15 15:11:06 +00:00  
				
					
						
							
							
								 
						
							
								b5e3e9dd27 
								
							 
						 
						
							
							
								
								Revert r129518, "Change ELF systems to use CFI for producing the EH tables. This reduces the"  
							
							... 
							
							
							
							It broke several builds.
llvm-svn: 129557 
							
						 
						
							2011-04-15 03:35:57 +00:00  
				
					
						
							
							
								 
						
							
								aa2a7cd828 
								
							 
						 
						
							
							
								
								Change ELF systems to use CFI for producing the EH tables. This reduces the  
							
							... 
							
							
							
							size of the clang binary in Debug builds from 690MB to 679MB.
llvm-svn: 129518 
							
						 
						
							2011-04-14 15:18:53 +00:00  
				
					
						
							
							
								 
						
							
								4b7b7fba38 
								
							 
						 
						
							
							
								
								Delay the creation of eh_frame so that the user can change the defaults.  
							
							... 
							
							
							
							Add support for SHT_X86_64_UNWIND.
llvm-svn: 124059 
							
						 
						
							2011-01-23 05:43:40 +00:00  
				
					
						
							
							
								 
						
							
								ea4e983d70 
								
							 
						 
						
							
							
								
								minor change to rafael's recent patches: if something is  
							
							... 
							
							
							
							constant but requires a unique address, we can still put it in a
readonly section, just not a mergable one.
llvm-svn: 123711 
							
						 
						
							2011-01-18 01:23:44 +00:00  
				
					
						
							
							
								 
						
							
								cba4c33949 
								
							 
						 
						
							
							
								
								Only put unnamed_addr constants in mergeable sections. Fixes PR8297.  
							
							... 
							
							
							
							llvm-svn: 123585 
							
						 
						
							2011-01-16 17:19:34 +00:00  
				
					
						
							
							
								 
						
							
								9f06f911d1 
								
							 
						 
						
							
							
								
								the latest assembler that runs on powerpc 10.4 machines doesn't  
							
							... 
							
							
							
							support aligned comm.  Detect when compiling for 10.4 and don't
emit an alignment for comm.  THis will hopefully fix PR8198.
llvm-svn: 114817 
							
						 
						
							2010-09-27 06:44:54 +00:00  
				
					
						
							
							
								 
						
							
								f1d8304fe3 
								
							 
						 
						
							
							
								
								Eliminate unnecessary uses of getZExtValue().  
							
							... 
							
							
							
							llvm-svn: 106279 
							
						 
						
							2010-06-18 14:22:04 +00:00  
				
					
						
							
							
								 
						
							
								2104b8d36e 
								
							 
						 
						
							
							
								
								rename llvm::llvm_report_error -> llvm::report_fatal_error  
							
							... 
							
							
							
							llvm-svn: 100709 
							
						 
						
							2010-04-07 22:58:41 +00:00  
				
					
						
							
							
								 
						
							
								aed00fa039 
								
							 
						 
						
							
							
								
								fix GetOrCreateTemporarySymbol to require a name, clients  
							
							... 
							
							
							
							should use CreateTempSymbol() if they don't care about the
name.
llvm-svn: 98712 
							
						 
						
							2010-03-17 05:41:18 +00:00  
				
					
						
							
							
								 
						
							
								be3242b523 
								
							 
						 
						
							
							
								
								finally give Mangler a getSymbol method, which returns an MCSymbol  
							
							... 
							
							
							
							for a global instead of messing around with string buffers.
llvm-svn: 98366 
							
						 
						
							2010-03-12 18:55:20 +00:00  
				
					
						
							
							
								 
						
							
								47bef1a8a2 
								
							 
						 
						
							
							
								
								make TargetLoweringObjectFile::getExprForDwarfReference  
							
							... 
							
							
							
							just make unnamed temp symbols instead of having to come
up with its own names.
llvm-svn: 98324 
							
						 
						
							2010-03-12 01:56:43 +00:00  
				
					
						
							
							
								 
						
							
								03627cb12c 
								
							 
						 
						
							
							
								
								fix a fixme in TargetLoweringObjectFile::getExprForDwarfReference  
							
							... 
							
							
							
							where we used ot create an MCSymbol for ".".  Now emit an assembler
temporary label and reference it instead of "." textually.
rdar://7739457
llvm-svn: 98292 
							
						 
						
							2010-03-11 21:55:20 +00:00  
				
					
						
							
							
								 
						
							
								2562356992 
								
							 
						 
						
							
							
								
								rename getSymbolForDwarf* to getExprForDwarf* since it returns  
							
							... 
							
							
							
							an MCExpr and not an MCSymbol.  Change it to take an MCStreamer,
which is currently unused.
No functionality change.
llvm-svn: 98278 
							
						 
						
							2010-03-11 19:41:58 +00:00  
				
					
						
							
							
								 
						
							
								71c30c164f 
								
							 
						 
						
							
							
								
								move three lowering hooks from MAI to TLOF and make one of them  
							
							... 
							
							
							
							semantic instead of syntactic.  This completes MCization of
darwin/x86[-64]!
llvm-svn: 98145 
							
						 
						
							2010-03-10 07:20:42 +00:00  
				
					
						
							
							
								 
						
							
								ac2361a9b0 
								
							 
						 
						
							
							
								
								set the temporary bit on MCSymbols correctly.  
							
							... 
							
							
							
							llvm-svn: 98124 
							
						 
						
							2010-03-10 02:25:11 +00:00  
				
					
						
							
							
								 
						
							
								85e5081c77 
								
							 
						 
						
							
							
								
								Make error statement more personal.  
							
							... 
							
							
							
							llvm-svn: 96410 
							
						 
						
							2010-02-16 22:47:14 +00:00  
				
					
						
							
							
								 
						
							
								ab663a0bfe 
								
							 
						 
						
							
							
								
								Move TLOF implementations to libCodegen to resolve layering violation.  
							
							... 
							
							
							
							llvm-svn: 96288 
							
						 
						
							2010-02-15 22:37:53 +00:00  
				
					
						
							
							
								 
						
							
								397aecb6d6 
								
							 
						 
						
							
							
								
								Add suffix for stubs, so we won't have name clashes with private symbols.  
							
							... 
							
							
							
							llvm-svn: 96286 
							
						 
						
							2010-02-15 22:36:26 +00:00  
				
					
						
							
							
								 
						
							
								ae4ccc10da 
								
							 
						 
						
							
							
								
								Preliminary patch to improve dwarf EH generation - Hooks to return Personality / FDE / LSDA / TType encoding depending on target / options (e.g. code model / relocation model) - MCIzation of Dwarf EH printer to use encoding information - Stub generation for ELF target (needed for indirect references) - Some other small changes here and there  
							
							... 
							
							
							
							llvm-svn: 96285 
							
						 
						
							2010-02-15 22:35:59 +00:00  
				
					
						
							
							
								 
						
							
								94b993ed8a 
								
							 
						 
						
							
							
								
								Simplify some uses of str(n)cmp with StringRef.  
							
							... 
							
							
							
							llvm-svn: 94189 
							
						 
						
							2010-01-22 18:21:23 +00:00  
				
					
						
							
							
								 
						
							
								cd2915e467 
								
							 
						 
						
							
							
								
								stop using the .lcomm pseudoop on darwin, instead, directly use the  
							
							... 
							
							
							
							.zerofill directive.  Streamerize its generation.
llvm-svn: 93868 
							
						 
						
							2010-01-19 06:25:51 +00:00  
				
					
						
							
							
								 
						
							
								b253421711 
								
							 
						 
						
							
							
								
								make TLOF subclassify BSS based on linkage type into private, external  
							
							... 
							
							
							
							and everything else (weak).
llvm-svn: 93846 
							
						 
						
							2010-01-19 04:15:51 +00:00  
				
					
						
							
							
								 
						
							
								a986aa33eb 
								
							 
						 
						
							
							
								
								fix a significant difference between llvm and gcc on ELF systems:  
							
							... 
							
							
							
							GCC would put weak zero initialized mutable data in the .bss section,
we would put it into a crasy '.gnu.linkonce.b.test,"aw",@nobits' 
section.  Fixing this will allow simplifications next up.
llvm-svn: 93844 
							
						 
						
							2010-01-19 03:06:01 +00:00  
				
					
						
							
							
								 
						
							
								5b585f8b1a 
								
							 
						 
						
							
							
								
								introduce a section kind for common linkage.  Use this to slightly  
							
							... 
							
							
							
							simplify and commonize some of the asmprinter logic for globals.
This also avoids printing the MCSection for .zerofill, which broke
the llvm-gcc build.
llvm-svn: 93843 
							
						 
						
							2010-01-19 02:48:26 +00:00  
				
					
						
							
							
								 
						
							
								1d371882b6 
								
							 
						 
						
							
							
								
								Cleanup handling of .zerofill on darwin:  
							
							... 
							
							
							
							1. TargetLoweringObjectFileMachO should decide if something
   goes in zerofill instead of having every target do it.
2. TargetLoweringObjectFileMachO should assign said symbols to
   the right MCSection, the asmprinters should just emit to the
   right section.
3. Since all zerofill stuff goes through mcstreamer anymore,
   MAI can have a bool "haszerofill" instead of having the textual
   directive to emit.
llvm-svn: 93838 
							
						 
						
							2010-01-19 02:09:44 +00:00  
				
					
						
							
							
								 
						
							
								83e872e1c4 
								
							 
						 
						
							
							
								
								Get MCSymbol out of the mangling business, and move all the logic  
							
							... 
							
							
							
							to Mangler.  Now MCSymbol just decides whether to slap quotes around
a symbol when printing it.
This also fixes some weirdness where two MCSymbols could be created
for the same symbol, if one needed to be mangled and got mangled to
the other one.
llvm-svn: 93690 
							
						 
						
							2010-01-17 19:23:46 +00:00  
				
					
						
							
							
								 
						
							
								f62e3ee8c5 
								
							 
						 
						
							
							
								
								move the mangler into libtarget from vmcore.  
							
							... 
							
							
							
							llvm-svn: 93664 
							
						 
						
							2010-01-16 21:57:06 +00:00  
				
					
						
							
							
								 
						
							
								a44d8f806b 
								
							 
						 
						
							
							
								
								fix build failure.  
							
							... 
							
							
							
							llvm-svn: 93628 
							
						 
						
							2010-01-16 03:38:27 +00:00  
				
					
						
							
							
								 
						
							
								32c9512132 
								
							 
						 
						
							
							
								
								remove a couple of actively incorrect uses of getMangledName.  
							
							... 
							
							
							
							llvm-svn: 93627 
							
						 
						
							2010-01-16 02:16:09 +00:00  
				
					
						
							
							
								 
						
							
								ccbeed2af4 
								
							 
						 
						
							
							
								
								fix ELF section mangling stuff for weak symbols to not use  
							
							... 
							
							
							
							obsolete Mangler interfaces.
llvm-svn: 93356 
							
						 
						
							2010-01-13 21:29:21 +00:00  
				
					
						
							
							
								 
						
							
								643b817d92 
								
							 
						 
						
							
							
								
								Use the GV version of getNameWithPrefix in TargetLoweringObjectFileCOFF::  
							
							... 
							
							
							
							SelectSectionForGlobal, unbreaking weak globals with no-name.
llvm-svn: 93336 
							
						 
						
							2010-01-13 19:19:17 +00:00  
				
					
						
							
							
								 
						
							
								b0dc959e1d 
								
							 
						 
						
							
							
								
								add a fixme, ELF MCSection isn't quite right and weak unnamed globals are broken  
							
							... 
							
							
							
							on linux (even though they are pointless, they shouldn't ICE).
llvm-svn: 93308 
							
						 
						
							2010-01-13 08:02:14 +00:00  
				
					
						
							
							
								 
						
							
								f0a401fcf0 
								
							 
						 
						
							
							
								
								eliminate some uses of Mangler::makeNameProper.  
							
							... 
							
							
							
							llvm-svn: 93305 
							
						 
						
							2010-01-13 07:56:59 +00:00