92aba5a817 
								
							 
						 
						
							
							
								
								propagate cookie management out one layer of function calls.  
							
							... 
							
							
							
							llvm-svn: 100510 
							
						 
						
							2010-04-06 00:58:50 +00:00  
				
					
						
							
							
								 
						
							
								fc4a1db23b 
								
							 
						 
						
							
							
								
								Remove unnecessary include.  
							
							... 
							
							
							
							llvm-svn: 100505 
							
						 
						
							2010-04-06 00:38:32 +00:00  
				
					
						
							
							
								 
						
							
								f0d6bd3ef4 
								
							 
						 
						
							
							
								
								change AsmPrinter to use DwarfDebug/DwarfException directly  
							
							... 
							
							
							
							instead of going through DwarfWriter.
llvm-svn: 100405 
							
						 
						
							2010-04-05 05:11:15 +00:00  
				
					
						
							
							
								 
						
							
								626cb66fdb 
								
							 
						 
						
							
							
								
								just have all targets create the DwarfWriter.  
							
							... 
							
							
							
							llvm-svn: 100377 
							
						 
						
							2010-04-05 00:42:55 +00:00  
				
					
						
							
							
								 
						
							
								3a383cb7d9 
								
							 
						 
						
							
							
								
								1) make DIE take AsmPrinter instead of DwarfPrinter.  
							
							... 
							
							
							
							2) change DwarfDebug to not inherit from DwarfPrinter.
llvm-svn: 100372 
							
						 
						
							2010-04-05 00:13:49 +00:00  
				
					
						
							
							
								 
						
							
								4e4549deea 
								
							 
						 
						
							
							
								
								resolve a fixme.  
							
							... 
							
							
							
							llvm-svn: 100346 
							
						 
						
							2010-04-04 19:28:59 +00:00  
				
					
						
							
							
								 
						
							
								a179b52361 
								
							 
						 
						
							
							
								
								move gettemplabel and getdwlabel to AsmPrinter and rename  
							
							... 
							
							
							
							them for consistency.
llvm-svn: 100345 
							
						 
						
							2010-04-04 19:25:43 +00:00  
				
					
						
							
							
								 
						
							
								2b40a207bc 
								
							 
						 
						
							
							
								
								more interface cleanup make some helpers static functions.  
							
							... 
							
							
							
							llvm-svn: 100343 
							
						 
						
							2010-04-04 18:58:53 +00:00  
				
					
						
							
							
								 
						
							
								7bde8c07a7 
								
							 
						 
						
							
							
								
								clean up the asmprinter header and privatize some stuff.  
							
							... 
							
							
							
							llvm-svn: 100342 
							
						 
						
							2010-04-04 18:52:31 +00:00  
				
					
						
							
							
								 
						
							
								1e15869d1f 
								
							 
						 
						
							
							
								
								split inline asm support out to its own .cpp file.  
							
							... 
							
							
							
							llvm-svn: 100340 
							
						 
						
							2010-04-04 18:34:07 +00:00  
				
					
						
							
							
								 
						
							
								8ff29c523e 
								
							 
						 
						
							
							
								
								inline processDebugLoc and simplify it.  
							
							... 
							
							
							
							llvm-svn: 100339 
							
						 
						
							2010-04-04 18:18:51 +00:00  
				
					
						
							
							
								 
						
							
								c334d80b0d 
								
							 
						 
						
							
							
								
								minor tidying.  
							
							... 
							
							
							
							llvm-svn: 100338 
							
						 
						
							2010-04-04 18:16:38 +00:00  
				
					
						
							
							
								 
						
							
								4a4710a055 
								
							 
						 
						
							
							
								
								clean up the asmprinter interface a bit, rename a few  
							
							... 
							
							
							
							"Print" methods to "Emit".  Emit is something that goes
to an mc streamer, Print is something that goes to a
raw_ostream (for inline asm) 
llvm-svn: 100337 
							
						 
						
							2010-04-04 18:14:01 +00:00  
				
					
						
							
							
								 
						
							
								21dc46e256 
								
							 
						 
						
							
							
								
								remove TargetMachine.h #include, also, TRI isn't used frequently  
							
							... 
							
							
							
							enough to warrant caching in AsmPrinter, so remove it.
llvm-svn: 100336 
							
						 
						
							2010-04-04 18:06:11 +00:00  
				
					
						
							
							
								 
						
							
								2cf5f9ec05 
								
							 
						 
						
							
							
								
								lazily allocate the GCMetadataPrinters map and remove DenseMap  
							
							... 
							
							
							
							from the AsmPrinter interface.
llvm-svn: 100331 
							
						 
						
							2010-04-04 17:57:56 +00:00  
				
					
						
							
							
								 
						
							
								d20699bc87 
								
							 
						 
						
							
							
								
								Momentous day: remove the "O" member from AsmPrinter.  Now all  
							
							... 
							
							
							
							"asm printering" happens through MCStreamer.  This also 
Streamerizes PIC16 debug info, which escaped my attention.
This removes a leak from LLVMTargetMachine of the 'legacy'
output stream.
llvm-svn: 100327 
							
						 
						
							2010-04-04 08:18:47 +00:00  
				
					
						
							
							
								 
						
							
								462720b1b6 
								
							 
						 
						
							
							
								
								now that all operand printing happens to specified streams, we can  
							
							... 
							
							
							
							print function level inline asm with EmitInlineAsm instead of writing
it directly to "O".
llvm-svn: 100326 
							
						 
						
							2010-04-04 07:50:12 +00:00  
				
					
						
							
							
								 
						
							
								1198002c81 
								
							 
						 
						
							
							
								
								remove the raw_ostream from various dwarf printing things.  
							
							... 
							
							
							
							The only thing left is LEB printing, which uses EmitRawText
for now.
llvm-svn: 100325 
							
						 
						
							2010-04-04 07:48:20 +00:00  
				
					
						
							
							
								 
						
							
								ef8240bbac 
								
							 
						 
						
							
							
								
								mcize the gc metadata printing stuff.  
							
							... 
							
							
							
							llvm-svn: 100324 
							
						 
						
							2010-04-04 07:39:04 +00:00  
				
					
						
							
							
								 
						
							
								dd89ce9a82 
								
							 
						 
						
							
							
								
								use EmitRawText instead of O in DwarfPrinter.  
							
							... 
							
							
							
							llvm-svn: 100323 
							
						 
						
							2010-04-04 07:25:52 +00:00  
				
					
						
							
							
								 
						
							
								3bb09768cb 
								
							 
						 
						
							
							
								
								fix PrintAsmOperand and PrintAsmMemoryOperand to pass down  
							
							... 
							
							
							
							raw_ostream to print to.
llvm-svn: 100313 
							
						 
						
							2010-04-04 05:29:35 +00:00  
				
					
						
							
							
								 
						
							
								0124fe38a6 
								
							 
						 
						
							
							
								
								change this back too  
							
							... 
							
							
							
							llvm-svn: 100310 
							
						 
						
							2010-04-04 05:09:10 +00:00  
				
					
						
							
							
								 
						
							
								aa70abba05 
								
							 
						 
						
							
							
								
								check in what I tested. :(  
							
							... 
							
							
							
							llvm-svn: 100309 
							
						 
						
							2010-04-04 05:08:10 +00:00  
				
					
						
							
							
								 
						
							
								f64c982943 
								
							 
						 
						
							
							
								
								MMI is always available, rename O -> OS in printInlineAsm.  
							
							... 
							
							
							
							llvm-svn: 100308 
							
						 
						
							2010-04-04 05:07:45 +00:00  
				
					
						
							
							
								 
						
							
								76c564b1bb 
								
							 
						 
						
							
							
								
								change a ton of code to not implicitly use the "O" raw_ostream  
							
							... 
							
							
							
							member of AsmPrinter.  Instead, pass it in explicitly.
llvm-svn: 100306 
							
						 
						
							2010-04-04 04:47:45 +00:00  
				
					
						
							
							
								 
						
							
								f33c7fcc28 
								
							 
						 
						
							
							
								
								asmstreamerize the .size directive for function bodies, force clients  
							
							... 
							
							
							
							of printOffset to pass in a stream to print to.
llvm-svn: 100296 
							
						 
						
							2010-04-03 22:28:33 +00:00  
				
					
						
							
							
								 
						
							
								c6d67d4ca5 
								
							 
						 
						
							
							
								
								emit the cygwin stub thing through mcstreamer.  
							
							... 
							
							
							
							llvm-svn: 100295 
							
						 
						
							2010-04-03 22:19:41 +00:00  
				
					
						
							
							
								 
						
							
								1716721df1 
								
							 
						 
						
							
							
								
								add a twine form of MCStreamer::EmitRawText, and mc'ize  
							
							... 
							
							
							
							a few more things in AsmPrinter.cpp.
llvm-svn: 100294 
							
						 
						
							2010-04-03 22:12:35 +00:00  
				
					
						
							
							
								 
						
							
								86d61b5837 
								
							 
						 
						
							
							
								
								start moving towards emitting inline asm statements with  
							
							... 
							
							
							
							EmitInlineAsm.  However, this attempt is foiled by operands
being emitted directly to "O" so I'll have to do some surgery
and finish MCizing the world.
llvm-svn: 100291 
							
						 
						
							2010-04-03 22:01:50 +00:00  
				
					
						
							
							
								 
						
							
								8a87fb7633 
								
							 
						 
						
							
							
								
								add a new EmitInlineAsm function to asmprinter to handle inline asm.  
							
							... 
							
							
							
							If we have an MCAsmStreamer, we continue to emit asm textually, 
otherwise we (currently) emit an error to errs and ignore it.
llvm-svn: 100289 
							
						 
						
							2010-04-03 21:35:55 +00:00  
				
					
						
							
							
								 
						
							
								fed39fa7b3 
								
							 
						 
						
							
							
								
								mc'ize comment printing around file scope inline asm.  
							
							... 
							
							
							
							llvm-svn: 100288 
							
						 
						
							2010-04-03 21:13:18 +00:00  
				
					
						
							
							
								 
						
							
								915c5f9862 
								
							 
						 
						
							
							
								
								Switch the code generator (except the JIT) onto the new DebugLoc  
							
							... 
							
							
							
							representation.  This eliminates the 'DILocation' MDNodes for 
file/line/col tuples from -O0 -g codegen.
This remove the old DebugLoc class, making it a typedef for DebugLoc,
I'll rename NewDebugLoc next.
I didn't update the JIT to use the new apis, so it will continue to
work, but be as slow as before.  Someone should eventually do this
or, better yet, rip out the JIT debug info stuff and build the JIT
on top of MC.
llvm-svn: 100209 
							
						 
						
							2010-04-02 19:42:39 +00:00  
				
					
						
							
							
								 
						
							
								9897043928 
								
							 
						 
						
							
							
								
								Rip out the 'is temporary' nonsense from the MCContext interface to  
							
							... 
							
							
							
							create symbols.  It is extremely error prone and a source of a lot
of the remaining integrated assembler bugs on x86-64.
This fixes rdar://7807601.
llvm-svn: 99902 
							
						 
						
							2010-03-30 18:10:53 +00:00  
				
					
						
							
							
								 
						
							
								bd477bef25 
								
							 
						 
						
							
							
								
								Refactor code to push DILocation prcessing into DwarfDebug.cpp from AsmPrinter.cpp.  
							
							... 
							
							
							
							This is same as r99772 (which was reverted) with just one meaningful difference where two source lines exchanged their positions.
llvm-svn: 99816 
							
						 
						
							2010-03-29 17:20:31 +00:00  
				
					
						
							
							
								 
						
							
								1e8ccb5f8b 
								
							 
						 
						
							
							
								
								Revert 99772.  
							
							... 
							
							
							
							llvm-svn: 99778 
							
						 
						
							2010-03-28 21:23:37 +00:00  
				
					
						
							
							
								 
						
							
								32bdaef3fe 
								
							 
						 
						
							
							
								
								Refactoring. Push DILocation processing in to DwarfDebug from AsmPrinter.  
							
							... 
							
							
							
							llvm-svn: 99772 
							
						 
						
							2010-03-28 18:57:09 +00:00  
				
					
						
							
							
								 
						
							
								8fce3dddfa 
								
							 
						 
						
							
							
								
								reapply r98656 unmodified, which exposed the asmprinter not  
							
							... 
							
							
							
							handling constant unions.
llvm-svn: 98680 
							
						 
						
							2010-03-16 21:25:55 +00:00  
				
					
						
							
							
								 
						
							
								3a374da973 
								
							 
						 
						
							
							
								
								Revert r98656, its breaking all over the place.  
							
							... 
							
							
							
							llvm-svn: 98662 
							
						 
						
							2010-03-16 19:35:34 +00:00  
				
					
						
							
							
								 
						
							
								9ae99e0df5 
								
							 
						 
						
							
							
								
								improve support for uniontype and ConstantUnion, patch by Tim Northover!  
							
							... 
							
							
							
							llvm-svn: 98656 
							
						 
						
							2010-03-16 19:15:03 +00:00  
				
					
						
							
							
								 
						
							
								db035a0af2 
								
							 
						 
						
							
							
								
								Fix the third (and last known) case of code update problems due  
							
							... 
							
							
							
							to LLVM IR changes with addr label weirdness.  In the testcase, we
generate references to the two bb's when codegen'ing the first
function:
_test1:                                 ## @test1 
	leaq	Ltmp0(%rip), %rax
..
	leaq	Ltmp1(%rip), %rax
Then continue to codegen the second function where the blocks
get merged.  We're now smart enough to emit both labels, producing
this code:
_test_fun:                              ## @test_fun
## BB#0:                                ## %entry
Ltmp1:                                  ## Block address taken
Ltmp0:
## BB#1:                                ## %ret
	movl	$-1, %eax
	ret
Rejoice.
llvm-svn: 98595 
							
						 
						
							2010-03-16 00:29:39 +00:00  
				
					
						
							
							
								 
						
							
								561334a81f 
								
							 
						 
						
							
							
								
								Implement support for the case when a reference to a addr-of-bb  
							
							... 
							
							
							
							label is generated, but then the block is deleted.  Since the
value is undefined, we just emit the label right after the entry 
label of the function.  It might matter that the label is in the
same section as the function was afterall.
llvm-svn: 98579 
							
						 
						
							2010-03-15 20:39:00 +00:00  
				
					
						
							
							
								 
						
							
								a3e9c9ca7b 
								
							 
						 
						
							
							
								
								Emit dwarf variable info communicated by code generator through DBG_VALUE machine instructions.  
							
							... 
							
							
							
							This is a work in progress.
llvm-svn: 98556 
							
						 
						
							2010-03-15 18:33:46 +00:00  
				
					
						
							
							
								 
						
							
								f18c0e6b4b 
								
							 
						 
						
							
							
								
								remove dead method.  
							
							... 
							
							
							
							llvm-svn: 98526 
							
						 
						
							2010-03-15 00:00:42 +00:00  
				
					
						
							
							
								 
						
							
								9efbbcbe45 
								
							 
						 
						
							
							
								
								fix AsmPrinter::GetBlockAddressSymbol to always return a unique  
							
							... 
							
							
							
							label instead of trying to form one based on the BB name (which
causes collisions if the name is empty).  This fixes PR6608
llvm-svn: 98495 
							
						 
						
							2010-03-14 17:53:23 +00:00  
				
					
						
							
							
								 
						
							
								c26f44fb07 
								
							 
						 
						
							
							
								
								change the DBG_LABEL MachineInstr to always be created  
							
							... 
							
							
							
							with an MCSymbol instead of an immediate.
llvm-svn: 98481 
							
						 
						
							2010-03-14 07:56:48 +00:00  
				
					
						
							
							
								 
						
							
								1065f49ad9 
								
							 
						 
						
							
							
								
								switch GC_LABEL to use an MCSymbol operand instead of a label ID operand.  
							
							... 
							
							
							
							llvm-svn: 98474 
							
						 
						
							2010-03-14 07:27:07 +00:00  
				
					
						
							
							
								 
						
							
								ee2fbbc978 
								
							 
						 
						
							
							
								
								change the LabelSDNode to be EHLabelSDNode and make it hold  
							
							... 
							
							
							
							an MCSymbol.  Make the EH_LABEL MachineInstr hold its label
with an MCSymbol instead of ID.  Fix a bug in MMI.cpp which
would return labels named "Label4" instead of "label4".
llvm-svn: 98463 
							
						 
						
							2010-03-14 02:33:54 +00:00  
				
					
						
							
							
								 
						
							
								29bdac4928 
								
							 
						 
						
							
							
								
								eliminate the now-unneeded context argument of MBB::getSymbol()  
							
							... 
							
							
							
							llvm-svn: 98451 
							
						 
						
							2010-03-13 21:04:28 +00:00  
				
					
						
							
							
								 
						
							
								e468f88b26 
								
							 
						 
						
							
							
								
								rearrange MCContext ownership.  Before LLVMTargetMachine created it  
							
							... 
							
							
							
							and passing off ownership to AsmPrinter.  Now MachineModuleInfo
creates it and owns it by value.  This allows us to use MCSymbols
more consistently throughout the rest of the code generator, and
simplifies a bit of code.  This also allows MachineFunction to 
keep an MCContext reference handy, and cleans up the TargetRegistry
interfaces for AsmPrinters.
llvm-svn: 98450 
							
						 
						
							2010-03-13 20:55:24 +00:00  
				
					
						
							
							
								 
						
							
								5ea039ad5c 
								
							 
						 
						
							
							
								
								remove gone method, grr symlinks.  
							
							... 
							
							
							
							llvm-svn: 98392 
							
						 
						
							2010-03-12 21:30:49 +00:00  
				
					
						
							
							
								 
						
							
								9e4cafe6f1 
								
							 
						 
						
							
							
								
								inline the now-trivial implementation of GetGlobalValueSymbol into  
							
							... 
							
							
							
							some of its callers.
llvm-svn: 98388 
							
						 
						
							2010-03-12 21:09:07 +00:00  
				
					
						
							
							
								 
						
							
								c7b46f9d9c 
								
							 
						 
						
							
							
								
								give Mangler access to TargetData.  
							
							... 
							
							
							
							llvm-svn: 98378 
							
						 
						
							2010-03-12 20:47:28 +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  
				
					
						
							
							
								 
						
							
								2eff505fba 
								
							 
						 
						
							
							
								
								make the mangler take an MCContext instead of an MAI.  
							
							... 
							
							
							
							No functionality change.
llvm-svn: 98363 
							
						 
						
							2010-03-12 18:44:54 +00:00  
				
					
						
							
							
								 
						
							
								6d3e92dfee 
								
							 
						 
						
							
							
								
								Add a new jump table encoding to indicate jump tables entries  
							
							... 
							
							
							
							are inside the function by the target at the point of use.
llvm-svn: 98255 
							
						 
						
							2010-03-11 14:58:16 +00:00  
				
					
						
							
							
								 
						
							
								ac2361a9b0 
								
							 
						 
						
							
							
								
								set the temporary bit on MCSymbols correctly.  
							
							... 
							
							
							
							llvm-svn: 98124 
							
						 
						
							2010-03-10 02:25:11 +00:00  
				
					
						
							
							
								 
						
							
								ba35a67062 
								
							 
						 
						
							
							
								
								reapply r98035:  
							
							... 
							
							
							
							Now that setStartLabel takes an MCSymbol, we can de-ID'ize
beginScope and RecordSourceLine.
llvm-svn: 98047 
							
						 
						
							2010-03-09 04:54:43 +00:00  
				
					
						
							
							
								 
						
							
								66194fbf86 
								
							 
						 
						
							
							
								
								Speculatively revert r98035. It appears to have caused a set of buildbot  
							
							... 
							
							
							
							failures.
llvm-svn: 98039 
							
						 
						
							2010-03-09 02:36:31 +00:00  
				
					
						
							
							
								 
						
							
								06c5e9060c 
								
							 
						 
						
							
							
								
								Now that setStartLabel takes an MCSymbol, we can de-ID'ize  
							
							... 
							
							
							
							beginScope and RecordSourceLine.
llvm-svn: 98035 
							
						 
						
							2010-03-09 02:08:02 +00:00  
				
					
						
							
							
								 
						
							
								9e57c676dd 
								
							 
						 
						
							
							
								
								mcstreamerize AsmPrinter::printLabel.  
							
							... 
							
							
							
							llvm-svn: 98025 
							
						 
						
							2010-03-09 01:02:30 +00:00  
				
					
						
							
							
								 
						
							
								b14490d912 
								
							 
						 
						
							
							
								
								add a EmitSymbolValue convenience method to MCStreamer.  
							
							... 
							
							
							
							llvm-svn: 98017 
							
						 
						
							2010-03-09 00:39:24 +00:00  
				
					
						
							
							
								 
						
							
								9889c1eb9e 
								
							 
						 
						
							
							
								
								move .set generation out of DwarfPrinter into AsmPrinter and  
							
							... 
							
							
							
							MCize it.
llvm-svn: 98010 
							
						 
						
							2010-03-08 23:58:37 +00:00  
				
					
						
							
							
								 
						
							
								3b548aa8e2 
								
							 
						 
						
							
							
								
								Avoid using DIDescriptor.isNull().  
							
							... 
							
							
							
							This is a first step towards eliminating checks in Descriptor constructors.
llvm-svn: 97975 
							
						 
						
							2010-03-08 20:52:55 +00:00  
				
					
						
							
							
								 
						
							
								bc97f6b757 
								
							 
						 
						
							
							
								
								Revert r97947.  
							
							... 
							
							
							
							llvm-svn: 97963 
							
						 
						
							2010-03-08 19:20:38 +00:00  
				
					
						
							
							
								 
						
							
								fe28599f6f 
								
							 
						 
						
							
							
								
								Avoid using DIDescriptor.isNull().  
							
							... 
							
							
							
							This is a first step towards eliminating unncessary constructor checks in light weight DIDescriptor wrappers.
llvm-svn: 97947 
							
						 
						
							2010-03-08 18:25:48 +00:00  
				
					
						
							
							
								 
						
							
								e4f249bc06 
								
							 
						 
						
							
							
								
								use OutStreamer.EmitCodeAlignment for alignment in the text  
							
							... 
							
							
							
							segment.
llvm-svn: 96967 
							
						 
						
							2010-02-23 18:46:22 +00:00  
				
					
						
							
							
								 
						
							
								1fa9c2cce4 
								
							 
						 
						
							
							
								
								move isOnlyReachableByFallthrough out of MachineBasicBlock into AsmPrinter,  
							
							... 
							
							
							
							and add a sparc implementation that knows about delay slots.  Patch by
Nathan Keynes!
llvm-svn: 96492 
							
						 
						
							2010-02-17 18:52:56 +00:00  
				
					
						
							
							
								 
						
							
								4a618827de 
								
							 
						 
						
							
							
								
								Fix "the the" and similar typos.  
							
							... 
							
							
							
							llvm-svn: 95781 
							
						 
						
							2010-02-10 16:03:48 +00:00  
				
					
						
							
							
								 
						
							
								ea26fa9971 
								
							 
						 
						
							
							
								
								fix a layering violation: VirtRegRewriter.cpp shouldn't use AsmPrinter.h.  
							
							... 
							
							
							
							llvm-svn: 95748 
							
						 
						
							2010-02-10 01:23:18 +00:00  
				
					
						
							
							
								 
						
							
								74e6852510 
								
							 
						 
						
							
							
								
								Move verbose asm instruction comments to using MCStreamer.  
							
							... 
							
							
							
							The major win of this is that the code is simpler and they 
print on the same line as the instruction again:
        movl    %eax, 96(%esp)          ## 4-byte Spill
        movl    96(%esp), %eax          ## 4-byte Reload
        cmpl    92(%esp), %eax          ## 4-byte Folded Reload
        jl      LBB7_86
llvm-svn: 95738 
							
						 
						
							2010-02-10 00:47:53 +00:00  
				
					
						
							
							
								 
						
							
								ff68a42121 
								
							 
						 
						
							
							
								
								print all the newlines at the end of instructions with  
							
							... 
							
							
							
							OutStreamer.AddBlankLine instead of textually.
llvm-svn: 95734 
							
						 
						
							2010-02-10 00:36:00 +00:00  
				
					
						
							
							
								 
						
							
								b06015aa69 
								
							 
						 
						
							
							
								
								move target-independent opcodes out of TargetInstrInfo  
							
							... 
							
							
							
							into TargetOpcodes.h.  #include the new TargetOpcodes.h
into MachineInstr.  Add new inline accessors (like isPHI())
to MachineInstr, and start using them throughout the 
codebase.
llvm-svn: 95687 
							
						 
						
							2010-02-09 19:54:29 +00:00  
				
					
						
							
							
								 
						
							
								227077d1be 
								
							 
						 
						
							
							
								
								Implement AsmPrinter support for several more operators which have  
							
							... 
							
							
							
							direct MCExpr equivalents. Don't use MCExpr::Shr because it isn't
consistent between targets.
llvm-svn: 95620 
							
						 
						
							2010-02-09 00:02:37 +00:00  
				
					
						
							
							
								 
						
							
								ebc970e4eb 
								
							 
						 
						
							
							
								
								now that @GOTOFF is no longer represented as a suffix on a  
							
							... 
							
							
							
							MCSymbol, we can remove the 'suffix' argument of 
GetBlockAddressSymbol.  Do so.
llvm-svn: 95601 
							
						 
						
							2010-02-08 23:10:08 +00:00  
				
					
						
							
							
								 
						
							
								e51b57bee0 
								
							 
						 
						
							
							
								
								ConstantFoldConstantExpression can theoretically return the original  
							
							... 
							
							
							
							expression; don't go into an infinite loop if it does.
llvm-svn: 95591 
							
						 
						
							2010-02-08 22:19:11 +00:00  
				
					
						
							
							
								 
						
							
								4268d6a7c3 
								
							 
						 
						
							
							
								
								When CodeGen'ing unoptimized code, there may be unfolded constant expressions  
							
							... 
							
							
							
							in global initializers. Instead of aborting, attempt to fold them on the
spot. If folding succeeds, emit the folded expression instead.
This fixes PR6255.
llvm-svn: 95583 
							
						 
						
							2010-02-08 22:02:38 +00:00  
				
					
						
							
							
								 
						
							
								6510dc8dc3 
								
							 
						 
						
							
							
								
								An empty global constant (one of size 0) may have a section immediately  
							
							... 
							
							
							
							following it. However, the EmitGlobalConstant method wasn't emitting a body for
the constant. The assembler doesn't like that. Before, we were generating this:
  .zerofill __DATA, __common, __cmd, 1, 3
This fix puts us back to that semantic.
llvm-svn: 95336 
							
						 
						
							2010-02-05 00:17:02 +00:00  
				
					
						
							
							
								 
						
							
								0b78cc2af5 
								
							 
						 
						
							
							
								
								don't emit \n's at the start of X86AsmPrinter::runOnMachineFunction,  
							
							... 
							
							
							
							.o files don't like that.
llvm-svn: 95187 
							
						 
						
							2010-02-03 01:49:49 +00:00  
				
					
						
							
							
								 
						
							
								f1866ab682 
								
							 
						 
						
							
							
								
								privatize a bunch of methods and move \n printing into them.  
							
							... 
							
							
							
							llvm-svn: 95186 
							
						 
						
							2010-02-03 01:46:05 +00:00  
				
					
						
							
							
								 
						
							
								996ec840d0 
								
							 
						 
						
							
							
								
								rejigger the world so that EmitInstruction prints the \n at  
							
							... 
							
							
							
							the end of the instruction instead of expecting the caller to
do it.  This currently causes the asm-verbose instruction 
comments to be on the next line.
llvm-svn: 95178 
							
						 
						
							2010-02-03 01:09:55 +00:00  
				
					
						
							
							
								 
						
							
								41ad1905c9 
								
							 
						 
						
							
							
								
								sink handling of target-independent machine instrs (other  
							
							... 
							
							
							
							than DEBUG_VALUE :(  ) into the target indep AsmPrinter.cpp
file.   This allows elimination of the 
NO_ASM_WRITER_BOILERPLATE hack among other things.
llvm-svn: 95177 
							
						 
						
							2010-02-03 01:00:52 +00:00  
				
					
						
							
							
								 
						
							
								b0d44c3807 
								
							 
						 
						
							
							
								
								refactor code so that LLVMTargetMachine creates the asmstreamer and  
							
							... 
							
							
							
							mccontext instead of having AsmPrinter do it.  This allows other 
types of MCStreamer's to be passed in.
llvm-svn: 95155 
							
						 
						
							2010-02-02 23:37:42 +00:00  
				
					
						
							
							
								 
						
							
								32445d300f 
								
							 
						 
						
							
							
								
								move handling of asm-verbose out of AsmPrinter.cpp into LLVMTargetMachine.cpp with the rest of the command line options.  
							
							... 
							
							
							
							llvm-svn: 95152 
							
						 
						
							2010-02-02 22:54:51 +00:00  
				
					
						
							
							
								 
						
							
								c968f4475e 
								
							 
						 
						
							
							
								
								add target hooks for emitting random gunk before and after the function body.  
							
							... 
							
							
							
							llvm-svn: 94732 
							
						 
						
							2010-01-28 01:58:58 +00:00  
				
					
						
							
							
								 
						
							
								73de5fbfc3 
								
							 
						 
						
							
							
								
								Give AsmPrinter the most common expected implementation of  
							
							... 
							
							
							
							runOnMachineFunction, and switch PPC to use EmitFunctionBody.
The two ppc asmprinters now don't heave to define 
runOnMachineFunction.
llvm-svn: 94722 
							
						 
						
							2010-01-28 01:28:58 +00:00  
				
					
						
							
							
								 
						
							
								565896b9eb 
								
							 
						 
						
							
							
								
								emit a 0 byte instead of a noop if a function is empty on darwin.  
							
							... 
							
							
							
							"0" is nice and target independent.
llvm-svn: 94718 
							
						 
						
							2010-01-28 01:06:32 +00:00  
				
					
						
							
							
								 
						
							
								94a946cac4 
								
							 
						 
						
							
							
								
								Remove the argument from EmitJumpTableInfo, because it doesn't need it.  
							
							... 
							
							
							
							Move the X86 implementation of function body emission up to 
AsmPrinter::EmitFunctionBody, which works by calling the virtual
EmitInstruction method.
llvm-svn: 94716 
							
						 
						
							2010-01-28 01:02:27 +00:00  
				
					
						
							
							
								 
						
							
								2b796241a7 
								
							 
						 
						
							
							
								
								Drop the argument to AsmPrinter::EmitConstantPool and make it virtual.  
							
							... 
							
							
							
							Overload it in the ARM backend to do nothing, since is does insane
constant pool emission.
llvm-svn: 94708 
							
						 
						
							2010-01-28 00:19:24 +00:00  
				
					
						
							
							
								 
						
							
								cd99546b03 
								
							 
						 
						
							
							
								
								rename printVisibility to EmitVisibility and make it private,  
							
							... 
							
							
							
							constify EmitLinkage.
llvm-svn: 94705 
							
						 
						
							2010-01-28 00:05:10 +00:00  
				
					
						
							
							
								 
						
							
								bc1e6f0873 
								
							 
						 
						
							
							
								
								add a new AsmPrinter::EmitFunctionEntryLabel virtual function,  
							
							... 
							
							
							
							which allows targets to override function entry label emission.
Use it to convert linux/ppc to use EmitFunctionHeader().
llvm-svn: 94667 
							
						 
						
							2010-01-27 07:21:55 +00:00  
				
					
						
							
							
								 
						
							
								bac7498f8e 
								
							 
						 
						
							
							
								
								mcize label emission for functions.  
							
							... 
							
							
							
							llvm-svn: 94624 
							
						 
						
							2010-01-26 23:53:39 +00:00  
				
					
						
							
							
								 
						
							
								fc2e376a15 
								
							 
						 
						
							
							
								
								use EmitLinkage for functions as well as globals.  One output  
							
							... 
							
							
							
							change is that we now use ".linkonce discard" for global variables
instead of ".linkonce samesize".  These should be the same, just less
strict.  If anyone is interested in mcizing MCSection for COFF targets,
this should be easy to fix.
llvm-svn: 94623 
							
						 
						
							2010-01-26 23:51:52 +00:00  
				
					
						
							
							
								 
						
							
								dbf5a7617d 
								
							 
						 
						
							
							
								
								pull linkage emission code out to a new EmitLinkage function.  
							
							... 
							
							
							
							llvm-svn: 94621 
							
						 
						
							2010-01-26 23:47:12 +00:00  
				
					
						
							
							
								 
						
							
								22fc38dd4f 
								
							 
						 
						
							
							
								
								rearrange some directives, no functionality change.  
							
							... 
							
							
							
							llvm-svn: 94620 
							
						 
						
							2010-01-26 23:41:48 +00:00  
				
					
						
							
							
								 
						
							
								c7b91156e4 
								
							 
						 
						
							
							
								
								now that enough stuff is constified, move function header printing  
							
							... 
							
							
							
							logic up from X86 into the common code.  The other targets will 
hopefully start using this soon.
llvm-svn: 94614 
							
						 
						
							2010-01-26 23:18:44 +00:00  
				
					
						
							
							
								 
						
							
								b657c4cdc3 
								
							 
						 
						
							
							
								
								emit jump table an alias ".set" directives through MCStreamer as  
							
							... 
							
							
							
							assignments.
.set x, a-b
is the same as:
x = a-b
llvm-svn: 94596 
							
						 
						
							2010-01-26 21:53:08 +00:00  
				
					
						
							
							
								 
						
							
								ff234e09b9 
								
							 
						 
						
							
							
								
								Eliminate SetDirective, and replace it with HasSetDirective.  
							
							... 
							
							
							
							Default HasSetDirective to true, since most targets have it.
The targets that claim to not have it probably do, or it is
spelled differently. These include Blackfin, Mips, Alpha, and
PIC16.  All of these except pic16 are normal ELF targets, so
they almost certainly have it.
llvm-svn: 94585 
							
						 
						
							2010-01-26 20:40:54 +00:00  
				
					
						
							
							
								 
						
							
								547c761dd6 
								
							 
						 
						
							
							
								
								eliminate the TargetLowering::UsesGlobalOffsetTable bool, which is  
							
							... 
							
							
							
							subsumed by TargetLowering::getJumpTableEncoding().  Change uses of
it to be more specific.
llvm-svn: 94529 
							
						 
						
							2010-01-26 06:53:37 +00:00  
				
					
						
							
							
								 
						
							
								4db603f93b 
								
							 
						 
						
							
							
								
								Now that printPICJumpTableSetLabel is not overloaded,  
							
							... 
							
							
							
							inline it into its only caller, allowing us to simplify it
and hoist bits out of the loop.
llvm-svn: 94528 
							
						 
						
							2010-01-26 06:42:44 +00:00  
				
					
						
							
							
								 
						
							
								8a785d7a67 
								
							 
						 
						
							
							
								
								Move getJTISymbol from MachineJumpTableInfo to MachineFunction,  
							
							... 
							
							
							
							which is more convenient, and change getPICJumpTableRelocBaseExpr
to take a MachineFunction to match.
Next, move the X86 code that create a PICBase symbol to
X86TargetLowering::getPICBaseSymbol from 
X86MCInstLower::GetPICBaseSymbol, which was an asmprinter specific 
library.  This eliminates a 'gross hack', and allows us to
implement X86ISelLowering::getPICJumpTableRelocBaseExpr which now
calls it.
This in turn allows us to eliminate the 
X86AsmPrinter::printPICJumpTableSetLabel method, which was the
only overload of printPICJumpTableSetLabel.
llvm-svn: 94526 
							
						 
						
							2010-01-26 06:28:43 +00:00  
				
					
						
							
							
								 
						
							
								273735bc5a 
								
							 
						 
						
							
							
								
								add a new MachineJumpTableInfo::getJTISymbol method,  
							
							... 
							
							
							
							use it to implement the default TargetLowering::getPICJumpTableRelocBaseExpr
llvm-svn: 94523 
							
						 
						
							2010-01-26 05:58:28 +00:00  
				
					
						
							
							
								 
						
							
								cc0f734cd0 
								
							 
						 
						
							
							
								
								simplify asmprinter: only emit .set directives when entries have  
							
							... 
							
							
							
							EK_LabelDifference32 kind and the target has .set support.  Simplify
X86AsmPrinter::printPICJumpTableSetLabel to make use of recent helpers.
llvm-svn: 94518 
							
						 
						
							2010-01-26 05:15:20 +00:00  
				
					
						
							
							
								 
						
							
								279de3ef64 
								
							 
						 
						
							
							
								
								rename printPICJumpTableEntry -> EmitJumpTableEntry,  
							
							... 
							
							
							
							make it private and non-virtual.  It handles the non-pic
case too, so just use it, simplifying EmitJumpTableInfo.
llvm-svn: 94517 
							
						 
						
							2010-01-26 05:10:10 +00:00  
				
					
						
							
							
								 
						
							
								d051af7551 
								
							 
						 
						
							
							
								
								add a new MachineBasicBlock::getSymbol method, replacing  
							
							... 
							
							
							
							the AsmPrinter::GetMBBSymbol.
llvm-svn: 94515 
							
						 
						
							2010-01-26 04:55:51 +00:00  
				
					
						
							
							
								 
						
							
								6715952c25 
								
							 
						 
						
							
							
								
								make MachineFunction keep track of its ID and make  
							
							... 
							
							
							
							MachineFunctionAnalysis dole them out, instead of having
AsmPrinter do both.  Have the AsmPrinter::SetupMachineFunction
method set the 'AsmPrinter::MF' variable.
llvm-svn: 94509 
							
						 
						
							2010-01-26 04:35:26 +00:00  
				
					
						
							
							
								 
						
							
								5fc4160ea3 
								
							 
						 
						
							
							
								
								Add support for target-specific 32-bit custom-lowered  
							
							... 
							
							
							
							jump table entries.
llvm-svn: 94505 
							
						 
						
							2010-01-26 04:05:28 +00:00  
				
					
						
							
							
								 
						
							
								a7c116016e 
								
							 
						 
						
							
							
								
								switch jump table entry emission to be based on EntryKind  
							
							... 
							
							
							
							instead of magic variables.
llvm-svn: 94500 
							
						 
						
							2010-01-26 03:43:22 +00:00  
				
					
						
							
							
								 
						
							
								b6db2c6b31 
								
							 
						 
						
							
							
								
								Rearrange handling of jump tables.  Highlights:  
							
							... 
							
							
							
							1. MachineJumpTableInfo is now created lazily for a function the first time
   it actually makes a jump table instead of for every function.
2. The encoding of jump table entries is now described by the
   MachineJumpTableInfo::JTEntryKind enum.  This enum is determined by the
   TLI::getJumpTableEncoding() hook, instead of by lots of code scattered
   throughout the compiler that "knows" that jump table entries are always
   32-bits in pic mode (for example).
3. The size and alignment of jump table entries is now calculated based on
   their kind, instead of at machinefunction creation time.
Future work includes using the EntryKind in more places in the compiler,
eliminating other logic that "knows" the layout of jump tables in various
situations.
llvm-svn: 94470 
							
						 
						
							2010-01-25 23:26:13 +00:00  
				
					
						
							
							
								 
						
							
								a4074257ab 
								
							 
						 
						
							
							
								
								eliminate redundant argument to EmitJumpTableInfo  
							
							... 
							
							
							
							llvm-svn: 94464 
							
						 
						
							2010-01-25 22:41:33 +00:00  
				
					
						
							
							
								 
						
							
								3cde760023 
								
							 
						 
						
							
							
								
								mcstreamerize gprel32 emission.  
							
							... 
							
							
							
							llvm-svn: 94452 
							
						 
						
							2010-01-25 21:28:50 +00:00  
				
					
						
							
							
								 
						
							
								822742fef9 
								
							 
						 
						
							
							
								
								mcize the non-gprel cases of AsmPrinter::printPICJumpTableEntry  
							
							... 
							
							
							
							llvm-svn: 94450 
							
						 
						
							2010-01-25 21:22:22 +00:00  
				
					
						
							
							
								 
						
							
								00d188f379 
								
							 
						 
						
							
							
								
								handle the _set_ symbol with an MCSymbol.  
							
							... 
							
							
							
							llvm-svn: 94449 
							
						 
						
							2010-01-25 21:17:10 +00:00  
				
					
						
							
							
								 
						
							
								19bd039896 
								
							 
						 
						
							
							
								
								rename MAI::PICJumpTableDirective to MAI::GPRel32Directive to  
							
							... 
							
							
							
							make it clear what it is, instead of how it is used.
llvm-svn: 94448 
							
						 
						
							2010-01-25 21:10:10 +00:00  
				
					
						
							
							
								 
						
							
								360aeb76a2 
								
							 
						 
						
							
							
								
								pull the non-pic jump table case out of printPICJumpTableEntry  
							
							... 
							
							
							
							and MCize the non-pic case.  Now printPICJumpTableEntry really
is just about printing PIC entries.
llvm-svn: 94446 
							
						 
						
							2010-01-25 21:01:58 +00:00  
				
					
						
							
							
								 
						
							
								ccabcd7f85 
								
							 
						 
						
							
							
								
								remove JumpTableDirective, it is always null.  
							
							... 
							
							
							
							llvm-svn: 94445 
							
						 
						
							2010-01-25 20:52:54 +00:00  
				
					
						
							
							
								 
						
							
								6330d5330e 
								
							 
						 
						
							
							
								
								sink an arm specific method out of asmprinter into the ARMAsmPrinter and  
							
							... 
							
							
							
							rename it to avoid shadowing.
llvm-svn: 94440 
							
						 
						
							2010-01-25 19:39:52 +00:00  
				
					
						
							
							
								 
						
							
								601ef33c77 
								
							 
						 
						
							
							
								
								mcstreamerize .file and .file.  This also fixes an issue where the  
							
							... 
							
							
							
							normal form of .file would fail if the filename had a weird character
in it.
llvm-svn: 94437 
							
						 
						
							2010-01-25 18:58:59 +00:00  
				
					
						
							
							
								 
						
							
								bc696445e1 
								
							 
						 
						
							
							
								
								emit ELF .type directives through MCStreamer instead of doing it textually.  
							
							... 
							
							
							
							llvm-svn: 94436 
							
						 
						
							2010-01-25 18:33:40 +00:00  
				
					
						
							
							
								 
						
							
								866a539f5f 
								
							 
						 
						
							
							
								
								add a comment  
							
							... 
							
							
							
							llvm-svn: 94417 
							
						 
						
							2010-01-25 07:53:05 +00:00  
				
					
						
							
							
								 
						
							
								91dac6d570 
								
							 
						 
						
							
							
								
								emit the .size directive for global variables on ELF through  
							
							... 
							
							
							
							mcstreamer.
llvm-svn: 94416 
							
						 
						
							2010-01-25 07:52:13 +00:00  
				
					
						
							
							
								 
						
							
								b1301f7bce 
								
							 
						 
						
							
							
								
								mcize lcomm, simplify .comm, extend both to support 64-bit sizes.  
							
							... 
							
							
							
							llvm-svn: 94299 
							
						 
						
							2010-01-23 07:47:02 +00:00  
				
					
						
							
							
								 
						
							
								76bdea3290 
								
							 
						 
						
							
							
								
								resolve a fixme: the "nonexecutable stack directive" is actually  
							
							... 
							
							
							
							a .section.  Switch to it with SwitchSection.
However, I think that this directive should be safe on any ELF target.
If so, we should hoist it up out of the X86 and SystemZ targets.
llvm-svn: 94298 
							
						 
						
							2010-01-23 07:21:06 +00:00  
				
					
						
							
							
								 
						
							
								0bfd279b37 
								
							 
						 
						
							
							
								
								mcize visibility directives.  
							
							... 
							
							
							
							llvm-svn: 94295 
							
						 
						
							2010-01-23 06:53:23 +00:00  
				
					
						
							
							
								 
						
							
								685508cf49 
								
							 
						 
						
							
							
								
								move the various directive enums out of the MCStreamer class  
							
							... 
							
							
							
							into a new MCDirectives.h file.
llvm-svn: 94294 
							
						 
						
							2010-01-23 06:39:22 +00:00  
				
					
						
							
							
								 
						
							
								d1acffc845 
								
							 
						 
						
							
							
								
								Change constantexpr global variable initializers to convert the constants  
							
							... 
							
							
							
							to MCExpr then emit them through MCStreamer with EmitValue.  I think all
global variable initializers are now going through mcstreamer.
llvm-svn: 94293 
							
						 
						
							2010-01-23 06:17:14 +00:00  
				
					
						
							
							
								 
						
							
								1deb09c28d 
								
							 
						 
						
							
							
								
								mcstreamerize .no_dead_strip and .reference for static ctors/dtors.  
							
							... 
							
							
							
							llvm-svn: 94290 
							
						 
						
							2010-01-23 05:51:36 +00:00  
				
					
						
							
							
								 
						
							
								4225a7b987 
								
							 
						 
						
							
							
								
								mcize jump table and constant pool entry labels, .local on elf,  
							
							... 
							
							
							
							and some .weak directives.
llvm-svn: 94284 
							
						 
						
							2010-01-23 05:19:23 +00:00  
				
					
						
							
							
								 
						
							
								68eeb5ec9c 
								
							 
						 
						
							
							
								
								emit .ascii and .asciz through MCStreamer.  
							
							... 
							
							
							
							llvm-svn: 94282 
							
						 
						
							2010-01-23 04:54:10 +00:00  
				
					
						
							
							
								 
						
							
								c3f23b84ea 
								
							 
						 
						
							
							
								
								remove one form of EmitString, just use EmitBytes instead.  We must  
							
							... 
							
							
							
							be careful to add a \0 at the end though, because EmitString didn't
do this.
llvm-svn: 94277 
							
						 
						
							2010-01-23 03:11:46 +00:00  
				
					
						
							
							
								 
						
							
								6f2d99df03 
								
							 
						 
						
							
							
								
								move "EOL" from asmprinter to dwarfprinter.  It should eventually  
							
							... 
							
							
							
							be completely eliminated, but today is not that day.
llvm-svn: 94253 
							
						 
						
							2010-01-22 23:47:11 +00:00  
				
					
						
							
							
								 
						
							
								fa82355f33 
								
							 
						 
						
							
							
								
								move uleb printing from asmprinter to dwarfprinter, mcize,  
							
							... 
							
							
							
							cleanup and eliminate a bunch more uses of "EOL".
llvm-svn: 94250 
							
						 
						
							2010-01-22 23:18:42 +00:00  
				
					
						
							
							
								 
						
							
								2303145081 
								
							 
						 
						
							
							
								
								move sleb printing out of asmprinter into dwarf printer, make clients  
							
							... 
							
							
							
							handle the comment better, MCize the non-.sleb case.
llvm-svn: 94244 
							
						 
						
							2010-01-22 22:56:55 +00:00  
				
					
						
							
							
								 
						
							
								edf96a4cc3 
								
							 
						 
						
							
							
								
								add a new DwarfPrinter::EmitEncodingByte method which handles  
							
							... 
							
							
							
							pretty printing encoding comments and eliminates redundancy on
the client side.  We now get pretty dwarf like this again:
        .byte   255                                         ## @LPStart Encoding = omit
        .byte   0                                           ## @TType Encoding = absptr
        .byte   0x28                                        ## @TType base offset
        .byte   3                                           ## Call site Encoding = udata4
        .byte   0x1a                                        ## Call site table size
...
llvm-svn: 94239 
							
						 
						
							2010-01-22 22:38:16 +00:00  
				
					
						
							
							
								 
						
							
								f5c834fce1 
								
							 
						 
						
							
							
								
								inline away the trivial AsmPrinter::EOL() method.  
							
							... 
							
							
							
							llvm-svn: 94230 
							
						 
						
							2010-01-22 22:09:00 +00:00  
				
					
						
							
							
								 
						
							
								13037516aa 
								
							 
						 
						
							
							
								
								inline AsmPrinter::PrintHex into its two trivial callers.  
							
							... 
							
							
							
							llvm-svn: 94228 
							
						 
						
							2010-01-22 21:57:56 +00:00  
				
					
						
							
							
								 
						
							
								978e2f02a8 
								
							 
						 
						
							
							
								
								change this to be a static function instead of a method on asmprinter.  
							
							... 
							
							
							
							llvm-svn: 94227 
							
						 
						
							2010-01-22 21:50:41 +00:00  
				
					
						
							
							
								 
						
							
								00562558ab 
								
							 
						 
						
							
							
								
								make the loop comment printer print out a much better structured  
							
							... 
							
							
							
							output.  An example:
        .align  4, 0x90
LBB1_5:                                                     ## %while.cond3
                                                            ##   Parent Loop BB1_1 Depth=1
                                                            ## =>  This Loop Header: Depth=2
                                                            ##       Child Loop BB1_8 Depth 3
                                                            ##       Child Loop BB1_6 Depth 3
llvm-svn: 94225 
							
						 
						
							2010-01-22 21:43:28 +00:00  
				
					
						
							
							
								 
						
							
								e567c8e67f 
								
							 
						 
						
							
							
								
								For blocks that are not loop headers, just print their loop depth and header BB.  
							
							... 
							
							
							
							For loop headers, print Inner loop along with the other stuff so it doesn't take
an extra line.  We now get stuff like this:
LBB1_4:                                                     ## %land.end
                                                            ##   in Loop: Header=BB1_1 Depth=1
        notb    %al
        testb   $1, %al
        jne     LBB1_8
and:
LBB1_6:                                                     ## %while.cond7
                                                            ## Inner Loop Header: Depth=3
                                                            ##     Inside Loop BB1_5 Depth 2
                                                            ##   Inside Loop BB1_1 Depth 1
which still isn't great for loop headers, but is much less verbose.
llvm-svn: 94221 
							
						 
						
							2010-01-22 21:11:06 +00:00  
				
					
						
							
							
								 
						
							
								23e43dbba1 
								
							 
						 
						
							
							
								
								reenable the label loop comments and switch them to use the formatted  
							
							... 
							
							
							
							comment emission stuff.  I'm going to rewrite this though because the
current output doesn't make sense.
llvm-svn: 94215 
							
						 
						
							2010-01-22 21:00:45 +00:00  
				
					
						
							
							
								 
						
							
								a3eee3cb69 
								
							 
						 
						
							
							
								
								Convert some more random-comment-printing stuff to use  
							
							... 
							
							
							
							AddComment and GetCommentOS.  Add a blank line between globals
(even in non-verbose mode) to make the assembly more readable.
llvm-svn: 94202 
							
						 
						
							2010-01-22 19:52:01 +00:00  
				
					
						
							
							
								 
						
							
								8fa0e35f97 
								
							 
						 
						
							
							
								
								add a new MCAsmStreamer::GetCommentOS method to simplify stuff  
							
							... 
							
							
							
							that doesn't want to use twines.
llvm-svn: 94199 
							
						 
						
							2010-01-22 19:17:48 +00:00  
				
					
						
							
							
								 
						
							
								e1d8a319a1 
								
							 
						 
						
							
							
								
								rename addComment -> AddComment for consistency.  
							
							... 
							
							
							
							llvm-svn: 94190 
							
						 
						
							2010-01-22 18:21:35 +00:00  
				
					
						
							
							
								 
						
							
								38e9219f71 
								
							 
						 
						
							
							
								
								Add the ability for MCStreamer to emit comments on the same line as directives.  
							
							... 
							
							
							
							Switch over the asm-verbose comment for double values to use it.  We now get:
_x:
	.long	343597384                                   ## double 1.231200e+02
	.long	1079953326
For example, note that the comment is on the same line as the .long.  Woo.
llvm-svn: 94166 
							
						 
						
							2010-01-22 07:29:22 +00:00  
				
					
						
							
							
								 
						
							
								0522eb2160 
								
							 
						 
						
							
							
								
								pass "-fasm-verbose" into createAsmStreamer.  
							
							... 
							
							
							
							llvm-svn: 94165 
							
						 
						
							2010-01-22 07:06:15 +00:00  
				
					
						
							
							
								 
						
							
								c47ece59a8 
								
							 
						 
						
							
							
								
								don't send null pointers through the constantexpr codepath unneededly.  
							
							... 
							
							
							
							llvm-svn: 94010 
							
						 
						
							2010-01-20 17:57:50 +00:00  
				
					
						
							
							
								 
						
							
								71601e8b3b 
								
							 
						 
						
							
							
								
								eliminate some uses of AsmPrinter::EmitIntXXX  
							
							... 
							
							
							
							llvm-svn: 93996 
							
						 
						
							2010-01-20 07:41:15 +00:00  
				
					
						
							
							
								 
						
							
								db42c8d23d 
								
							 
						 
						
							
							
								
								inline and radically simplify printDataDirective.  It will eventually  
							
							... 
							
							
							
							go completely away.
llvm-svn: 93994 
							
						 
						
							2010-01-20 07:33:29 +00:00  
				
					
						
							
							
								 
						
							
								f8dcf784a7 
								
							 
						 
						
							
							
								
								emit basic block labels with mcstreamer.  
							
							... 
							
							
							
							llvm-svn: 93993 
							
						 
						
							2010-01-20 07:24:05 +00:00  
				
					
						
							
							
								 
						
							
								4c8b1824f0 
								
							 
						 
						
							
							
								
								emit integer and fp zeros as (e.g.) .byte 0 instead of .space 1,  
							
							... 
							
							
							
							for tidiness.
llvm-svn: 93992 
							
						 
						
							2010-01-20 07:19:19 +00:00  
				
					
						
							
							
								 
						
							
								03cb2a3035 
								
							 
						 
						
							
							
								
								signficant cleanups to EmitGlobalConstant (including streamerization  
							
							... 
							
							
							
							of int initializers), change some methods to be static functions,
use raw_ostream::write_hex instead of a smallstring dance with 
APValue::toStringUnsigned(S, 16).
llvm-svn: 93991 
							
						 
						
							2010-01-20 07:11:32 +00:00  
				
					
						
							
							
								 
						
							
								37020ccf48 
								
							 
						 
						
							
							
								
								switch ConstantFP emission to use MCStreamer, significantly  
							
							... 
							
							
							
							simplifying the code.
llvm-svn: 93988 
							
						 
						
							2010-01-20 06:53:37 +00:00  
				
					
						
							
							
								 
						
							
								45eeffcc2a 
								
							 
						 
						
							
							
								
								make mcasmstreamer handle expanding 8 byte integer constants to  
							
							... 
							
							
							
							4-byte constants if .quad isn't supported.  Switch a bunch of
methods used by the dwarf writer to use OutStreamer.EmitIntValue.
llvm-svn: 93987 
							
						 
						
							2010-01-20 06:45:39 +00:00  
				
					
						
							
							
								 
						
							
								38caaf14c1 
								
							 
						 
						
							
							
								
								give createAsmStreamer an 'isLittleEndian' argument.  
							
							... 
							
							
							
							llvm-svn: 93986 
							
						 
						
							2010-01-20 06:39:07 +00:00  
				
					
						
							
							
								 
						
							
								eaef5e111d 
								
							 
						 
						
							
							
								
								simplify the rest of fp constant printing.  
							
							... 
							
							
							
							llvm-svn: 93929 
							
						 
						
							2010-01-19 22:16:33 +00:00  
				
					
						
							
							
								 
						
							
								c70daf316e 
								
							 
						 
						
							
							
								
								simplify the code for printing x86 long double, don't do work  
							
							... 
							
							
							
							for -fverbose-asm unless it's on.
llvm-svn: 93926 
							
						 
						
							2010-01-19 22:11:05 +00:00  
				
					
						
							
							
								 
						
							
								ecaf0dcbc6 
								
							 
						 
						
							
							
								
								eliminate AsmPrinter::EmitZeros: just use MCStreamer directly.  
							
							... 
							
							
							
							llvm-svn: 93918 
							
						 
						
							2010-01-19 21:51:22 +00:00  
				
					
						
							
							
								 
						
							
								c35681b298 
								
							 
						 
						
							
							
								
								Generalize mcasmstreamer data emission APIs to take an address space  
							
							... 
							
							
							
							identifier.  There is no way to work around it.
llvm-svn: 93896 
							
						 
						
							2010-01-19 19:46:13 +00:00  
				
					
						
							
							
								 
						
							
								fefcb1531c 
								
							 
						 
						
							
							
								
								refactor code to be static functions instead of methods on AsmPrinter.  
							
							... 
							
							
							
							This fixes some bugs handling address spaces.
llvm-svn: 93891 
							
						 
						
							2010-01-19 19:10:44 +00:00  
				
					
						
							
							
								 
						
							
								ed89f60f5e 
								
							 
						 
						
							
							
								
								mcstreamerize AsmPrinter::EmitZeros, at least when emitting to the  
							
							... 
							
							
							
							default address space.
llvm-svn: 93890 
							
						 
						
							2010-01-19 18:58:52 +00:00  
				
					
						
							
							
								 
						
							
								9c31b0c695 
								
							 
						 
						
							
							
								
								remove MAI::ZeroDirectiveSuffix, which is only used by MASM,  
							
							... 
							
							
							
							which we don't support anymore.
llvm-svn: 93886 
							
						 
						
							2010-01-19 18:37:01 +00:00  
				
					
						
							
							
								 
						
							
								3024e9813e 
								
							 
						 
						
							
							
								
								mcstreamer'ize the rest of EmitGlobalVariable that is used on  
							
							... 
							
							
							
							darwin.  The next big piece to get global variables streamerized
is EmitGlobalConstant.
llvm-svn: 93870 
							
						 
						
							2010-01-19 06:41:24 +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  
				
					
						
							
							
								 
						
							
								1083b5fc3f 
								
							 
						 
						
							
							
								
								Avoid including DebugInfo.h in AsmPrinter.h  
							
							... 
							
							
							
							llvm-svn: 93864 
							
						 
						
							2010-01-19 06:09:04 +00:00  
				
					
						
							
							
								 
						
							
								95b98959b0 
								
							 
						 
						
							
							
								
								mc'ize some stuff, don't comment out .lcomm directive in -fverbose-asm mode.  
							
							... 
							
							
							
							llvm-svn: 93860 
							
						 
						
							2010-01-19 06:01:04 +00:00  
				
					
						
							
							
								 
						
							
								282466abf7 
								
							 
						 
						
							
							
								
								factor this code better.  
							
							... 
							
							
							
							llvm-svn: 93859 
							
						 
						
							2010-01-19 05:51:42 +00:00  
				
					
						
							
							
								 
						
							
								c7a062d187 
								
							 
						 
						
							
							
								
								Now that we have everything nicely factored (e.g. asmprinter is not  
							
							... 
							
							
							
							doing global variable classification anymore) and hookized, sink almost
all target targets global variable emission code into AsmPrinter and out
of each target.
Some notes:
1. PIC16 does completely custom and crazy stuff, so it is not changed.
2. XCore has some custom handling for extra directives.  I'll look at it next.
3. This switches linux/ppc to use .globl instead of .global.  If .globl is
   actually wrong, let me know and I'll fix it.
4. This makes linux/ppc get a lot of random cases right which were obviously
   wrong before, it is probably now a bit healthier.
5. Blackfin will probably start getting .comm and other things that it didn't
   before.  If this is undesirable, it should explicitly opt out of these
   things by clearing the relevant fields of MCAsmInfo.
This leads to a nice diffstat:
 14 files changed, 127 insertions(+), 830 deletions(-)
llvm-svn: 93858 
							
						 
						
							2010-01-19 05:38:33 +00:00  
				
					
						
							
							
								 
						
							
								6a160517a0 
								
							 
						 
						
							
							
								
								hoist handling of external globals and special globals up to common code.  
							
							... 
							
							
							
							This makes a similar code dead in all the other targets, I'll clean it up
in a bit.
This also moves handling of lcomm up before acquisition of a section,
since lcomm never needs a section.
llvm-svn: 93851 
							
						 
						
							2010-01-19 04:39:15 +00:00  
				
					
						
							
							
								 
						
							
								e9d28b19cf 
								
							 
						 
						
							
							
								
								move production of .reference directives for static ctor/dtor list on  
							
							... 
							
							
							
							darwin into common code.
llvm-svn: 93849 
							
						 
						
							2010-01-19 04:34:02 +00:00  
				
					
						
							
							
								 
						
							
								8b5d55ed06 
								
							 
						 
						
							
							
								
								now that MCSymbol::print doesn't use it's MAI argument, we can  
							
							... 
							
							
							
							remove it and change all the code that prints MCSymbols to use 
<< instead, which is much simpler and cleaner.
llvm-svn: 93695 
							
						 
						
							2010-01-17 21:43:43 +00:00  
				
					
						
							
							
								 
						
							
								b4ffc894e6 
								
							 
						 
						
							
							
								
								now that mangler is in libtarget, it can use MCAsmInfo instead of clients  
							
							... 
							
							
							
							having to pass various fields from it in.  Simplify.
llvm-svn: 93686 
							
						 
						
							2010-01-17 18:22:35 +00:00  
				
					
						
							
							
								 
						
							
								4d128a2387 
								
							 
						 
						
							
							
								
								Switch some functions to take Twines, eliminate uses of StringExtras.h.  
							
							... 
							
							
							
							llvm-svn: 93680 
							
						 
						
							2010-01-17 07:46:39 +00:00  
				
					
						
							
							
								 
						
							
								f62e3ee8c5 
								
							 
						 
						
							
							
								
								move the mangler into libtarget from vmcore.  
							
							... 
							
							
							
							llvm-svn: 93664 
							
						 
						
							2010-01-16 21:57:06 +00:00  
				
					
						
							
							
								 
						
							
								d3b1808876 
								
							 
						 
						
							
							
								
								unbreak the build.  
							
							... 
							
							
							
							llvm-svn: 93654 
							
						 
						
							2010-01-16 20:53:11 +00:00  
				
					
						
							
							
								 
						
							
								555ceabe64 
								
							 
						 
						
							
							
								
								rename GetPrivateGlobalValueSymbolStub -> GetSymbolWithGlobalValueBase,  
							
							... 
							
							
							
							and add an explicit ForcePrivate argument.
Switch FunctionEHFrameInfo to be MCSymbol based instead of string based.
llvm-svn: 93646 
							
						 
						
							2010-01-16 18:37:32 +00:00  
				
					
						
							
							
								 
						
							
								8a1f23af11 
								
							 
						 
						
							
							
								
								eliminate uses of getMangledName from AsmPrinter.cpp, last up is  
							
							... 
							
							
							
							dwarf emission which is going to be more invasive.
llvm-svn: 93645 
							
						 
						
							2010-01-16 18:17:26 +00:00  
				
					
						
							
							
								 
						
							
								c0e17df3ce 
								
							 
						 
						
							
							
								
								Replace DebugLocTuple with DILocation.  
							
							... 
							
							
							
							llvm-svn: 93630 
							
						 
						
							2010-01-16 06:09:35 +00:00  
				
					
						
							
							
								 
						
							
								a689edd067 
								
							 
						 
						
							
							
								
								fix inverted conditional  
							
							... 
							
							
							
							llvm-svn: 93614 
							
						 
						
							2010-01-16 01:37:14 +00:00  
				
					
						
							
							
								 
						
							
								a091179b5f 
								
							 
						 
						
							
							
								
								CurrentFnName is now dead, remove it.  
							
							... 
							
							
							
							llvm-svn: 93612 
							
						 
						
							2010-01-16 01:24:10 +00:00  
				
					
						
							
							
								 
						
							
								fedff0f67d 
								
							 
						 
						
							
							
								
								remove the string form of printVisibility.  
							
							... 
							
							
							
							llvm-svn: 93609 
							
						 
						
							2010-01-16 01:17:26 +00:00  
				
					
						
							
							
								 
						
							
								ae9b9eed18 
								
							 
						 
						
							
							
								
								supplement CurrentFnName with CurrentFnSym, which will eventually  
							
							... 
							
							
							
							replace it.  Upgrade Alpha, Blackfin, and part of CellSPU to not
use mangler anymore.  CellSPU needs more invasive surgery.
llvm-svn: 93589 
							
						 
						
							2010-01-15 23:55:16 +00:00  
				
					
						
							
							
								 
						
							
								7fec180909 
								
							 
						 
						
							
							
								
								add a version of AsmPrinter::printVisibility that takes an MCSymbol.  
							
							... 
							
							
							
							llvm-svn: 93587 
							
						 
						
							2010-01-15 23:38:51 +00:00  
				
					
						
							
							
								 
						
							
								0dca0a9650 
								
							 
						 
						
							
							
								
								add another helper  
							
							... 
							
							
							
							llvm-svn: 93577 
							
						 
						
							2010-01-15 23:25:11 +00:00  
				
					
						
							
							
								 
						
							
								91687f6e28 
								
							 
						 
						
							
							
								
								add a AsmPrinter::GetGlobalValueSymbol and GetExternalSymbolSymbol  
							
							... 
							
							
							
							helper method, use it to simplify some code.
llvm-svn: 93575 
							
						 
						
							2010-01-15 23:18:17 +00:00  
				
					
						
							
							
								 
						
							
								b297cdd937 
								
							 
						 
						
							
							
								
								Fix a comment.  
							
							... 
							
							
							
							llvm-svn: 93463 
							
						 
						
							2010-01-14 21:50:17 +00:00  
				
					
						
							
							
								 
						
							
								25d8ed3773 
								
							 
						 
						
							
							
								
								remove uses of deprecated functions, this generates slightly  
							
							... 
							
							
							
							different BlockAddress labels, but nothing semantically important.
Add a FIXME that BlockAddress codegen is broken if the LLVM BB has 
an empty name (e.g. strip was run).
llvm-svn: 93303 
							
						 
						
							2010-01-13 07:30:49 +00:00  
				
					
						
							
							
								 
						
							
								2b630fe822 
								
							 
						 
						
							
							
								
								use the new form of getNameWithPrefix, not makeNameProper.  
							
							... 
							
							
							
							Among other things, this would do very weird things if the 
basic block name had (e.g.) a space in it on darwin:
makeNameProper would add quotes, then the mcsymbol would 
escape the quotes.
llvm-svn: 93302 
							
						 
						
							2010-01-13 07:16:53 +00:00  
				
					
						
							
							
								 
						
							
								209aecad0c 
								
							 
						 
						
							
							
								
								change Mangler::makeNameProper to return its result in a SmallVector  
							
							... 
							
							
							
							instead of returning it in an std::string.  Based on this change:
1. Change TargetLoweringObjectFileCOFF::getCOFFSection to take a StringRef
2. Change a bunch of targets to call makeNameProper with a smallstring,
   making several of them *much* more efficient.
3. Rewrite Mangler::makeNameProper to not build names and then prepend
   prefixes, not use temporary std::strings, and to avoid other crimes.
llvm-svn: 93298 
							
						 
						
							2010-01-13 06:38:18 +00:00  
				
					
						
							
							
								 
						
							
								8e26d19cb3 
								
							 
						 
						
							
							
								
								fix assert in AsmPrinter::EmitGlobalConstantLargeInt to match reality.  
							
							... 
							
							
							
							llvm-svn: 93293 
							
						 
						
							2010-01-13 04:39:46 +00:00  
				
					
						
							
							
								 
						
							
								4581a4f03a 
								
							 
						 
						
							
							
								
								reduce nesting and code duplication in AsmPrinter::EmitGlobalConstantLargeInt.  
							
							... 
							
							
							
							llvm-svn: 93292 
							
						 
						
							2010-01-13 04:38:16 +00:00  
				
					
						
							
							
								 
						
							
								a32ba6d056 
								
							 
						 
						
							
							
								
								reduce indentation and add a fast-path to EmitGlobalConstant for 8-byte  
							
							... 
							
							
							
							integers on 64-bit systems.
llvm-svn: 93291 
							
						 
						
							2010-01-13 04:34:19 +00:00  
				
					
						
							
							
								 
						
							
								7e0c164b5e 
								
							 
						 
						
							
							
								
								reduce indentation and use early exits in AsmPrinter::EmitConstantValueOnly  
							
							... 
							
							
							
							llvm-svn: 93290 
							
						 
						
							2010-01-13 04:29:19 +00:00  
				
					
						
							
							
								 
						
							
								1dae8766b1 
								
							 
						 
						
							
							
								
								fix PR5930, allowing the asmprinter to emit difference between  
							
							... 
							
							
							
							two labels as a truncate.
llvm-svn: 92455 
							
						 
						
							2010-01-03 18:33:18 +00:00  
				
					
						
							
							
								 
						
							
								ba27bef114 
								
							 
						 
						
							
							
								
								Remove dead store.  
							
							... 
							
							
							
							llvm-svn: 92156 
							
						 
						
							2009-12-25 13:37:27 +00:00  
				
					
						
							
							
								 
						
							
								740ab38bb7 
								
							 
						 
						
							
							
								
								Fix a bunch of little errors that Clang complains about when its being pedantic  
							
							... 
							
							
							
							llvm-svn: 91764 
							
						 
						
							2009-12-19 07:05:23 +00:00  
				
					
						
							
							
								 
						
							
								3a6164e8ab 
								
							 
						 
						
							
							
								
								Print newlines after printing labels for debug info, so that the output  
							
							... 
							
							
							
							isn't cluttered with things like "Llabel47:Llabel48:  movq  (%rsi), %xmm3"
llvm-svn: 90638 
							
						 
						
							2009-12-05 01:42:34 +00:00  
				
					
						
							
							
								 
						
							
								abc77742c8 
								
							 
						 
						
							
							
								
								Fix this code to use DIScope instead of DICompileUnit, as in r90181.  
							
							... 
							
							
							
							Don't print "SrcLine"; just print the filename and line number, which
is obvious enough and more informative.
llvm-svn: 90631 
							
						 
						
							2009-12-05 00:23:29 +00:00  
				
					
						
							
							
								 
						
							
								e6d5445dc1 
								
							 
						 
						
							
							
								
								Print a space between the comment character and the text.  
							
							... 
							
							
							
							llvm-svn: 90621 
							
						 
						
							2009-12-04 23:19:55 +00:00  
				
					
						
							
							
								 
						
							
								15f9df5f4b 
								
							 
						 
						
							
							
								
								Use new interfaces to print spill size.  
							
							... 
							
							
							
							llvm-svn: 90611 
							
						 
						
							2009-12-04 22:46:04 +00:00  
				
					
						
							
							
								 
						
							
								b3e0168428 
								
							 
						 
						
							
							
								
								Use StringRef instead of std::string in DIEString.  
							
							... 
							
							
							
							llvm-svn: 89793 
							
						 
						
							2009-11-24 19:42:17 +00:00  
				
					
						
							
							
								 
						
							
								7a6611793f 
								
							 
						 
						
							
							
								
								Target-independent support for TargetFlags on BlockAddress operands,  
							
							... 
							
							
							
							and support for blockaddresses in x86-32 PIC mode.
llvm-svn: 89506 
							
						 
						
							2009-11-20 23:18:13 +00:00