Chris Lattner
2b89b0d279
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
Chris Lattner
0744c47856
Move EmitFrameMoves into AsmPrinter.
...
llvm-svn: 100371
2010-04-04 23:41:46 +00:00
Chris Lattner
303e9e2e0a
simplify code and reduce indentation.
...
llvm-svn: 100369
2010-04-04 23:31:58 +00:00
Chris Lattner
2eaed62f7c
now that the magic is dispelled, move EmitSectionOffset to AsmPrinter.
...
llvm-svn: 100368
2010-04-04 23:25:33 +00:00
Chris Lattner
ecdad4bb0c
eliminate the magic AbsoluteDebugSectionOffsets MAI hook,
...
which is really a property of the section being referenced.
Add a predicate to MCSection to replace it.
Yay for reduction in magic.
llvm-svn: 100367
2010-04-04 23:22:29 +00:00
Chris Lattner
957eddbcb0
only emit section labels if we have debug info, fixing a few
...
regtest failures.
llvm-svn: 100366
2010-04-04 23:17:54 +00:00
Chris Lattner
7295a273aa
I was wrong, ocaml isn't referencing 'Ldata_begin', so remove it.
...
llvm-svn: 100365
2010-04-04 23:10:38 +00:00
Chris Lattner
4bd354ecd8
add some assertions to EmitSectionOffset.
...
llvm-svn: 100364
2010-04-04 23:06:31 +00:00
Chris Lattner
a991a67a29
stop emitting some dead L labels.
...
llvm-svn: 100363
2010-04-04 23:02:02 +00:00
Chris Lattner
265b59119d
Store an use the symbols emitted at the start of the debug
...
sections instead of magically rematerializing them later.
llvm-svn: 100362
2010-04-04 22:59:04 +00:00
Chris Lattner
53453a2dc8
remove the didInitial ivar, rename emitInitial to be more
...
descriptive, change EmitSectionOffset back to taking a
symbol instead of a string.
llvm-svn: 100361
2010-04-04 22:33:59 +00:00
Chris Lattner
df18fb3a6d
simplify EmitSectionOffset a little bit, improve comments.
...
llvm-svn: 100360
2010-04-04 22:25:14 +00:00
Chris Lattner
168d49e6cd
The "IsSmall" argument to EmitSectionOffset is always true,
...
constant fold it away.
llvm-svn: 100356
2010-04-04 21:34:40 +00:00
Chris Lattner
da4fe3e7d2
eliminate the "isEH" argument to EmitSectionOffset.
...
llvm-svn: 100355
2010-04-04 21:31:54 +00:00
Chris Lattner
2f1c065cef
isAbsoluteEHSectionOffsets always returns false, eliminate it
...
and substitute false at the one call site.
llvm-svn: 100354
2010-04-04 21:29:44 +00:00
Chris Lattner
c83be77854
move some more stuff to asmprinter.
...
llvm-svn: 100351
2010-04-04 20:20:50 +00:00
Chris Lattner
7214d4d564
simplify some code.
...
llvm-svn: 100350
2010-04-04 20:10:41 +00:00
Chris Lattner
703ccb1b4c
move EmitEncodingByte to AsmPrinter.
...
llvm-svn: 100349
2010-04-04 20:04:21 +00:00
Chris Lattner
071eb40cd2
move EmitCFAByte to AsmPrinter.
...
llvm-svn: 100348
2010-04-04 20:01:25 +00:00
Chris Lattner
24ed58efd1
inline EmitDifference away.
...
llvm-svn: 100347
2010-04-04 19:58:12 +00:00
Chris Lattner
779e051357
resolve a fixme.
...
llvm-svn: 100346
2010-04-04 19:28:59 +00:00
Chris Lattner
c2b0a02be0
move gettemplabel and getdwlabel to AsmPrinter and rename
...
them for consistency.
llvm-svn: 100345
2010-04-04 19:25:43 +00:00
Chris Lattner
342b44f89f
move uleb/sleb printing into AsmPrinter from DwarfPrinter.
...
llvm-svn: 100344
2010-04-04 19:09:29 +00:00
Chris Lattner
3bdfd5a34d
more interface cleanup make some helpers static functions.
...
llvm-svn: 100343
2010-04-04 18:58:53 +00:00
Chris Lattner
328ffc8c32
clean up the asmprinter header and privatize some stuff.
...
llvm-svn: 100342
2010-04-04 18:52:31 +00:00
Chris Lattner
dd1f2b6e33
use stringref instead of strtol to avoid errno gymnastics.
...
llvm-svn: 100341
2010-04-04 18:42:18 +00:00
Chris Lattner
d7a37abb77
split inline asm support out to its own .cpp file.
...
llvm-svn: 100340
2010-04-04 18:34:07 +00:00
Chris Lattner
e55c5e9d81
inline processDebugLoc and simplify it.
...
llvm-svn: 100339
2010-04-04 18:18:51 +00:00
Chris Lattner
a5c6be681c
minor tidying.
...
llvm-svn: 100338
2010-04-04 18:16:38 +00:00
Chris Lattner
0d3490e0b0
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
Chris Lattner
cb654f3113
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
Chris Lattner
71a1b87241
lazily allocate the GCMetadataPrinters map and remove DenseMap
...
from the AsmPrinter interface.
llvm-svn: 100331
2010-04-04 17:57:56 +00:00
Chris Lattner
3eaaa7bb6c
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
Chris Lattner
b0eb3e8e49
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
Chris Lattner
1917725796
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
Chris Lattner
6142bb4162
mcize the gc metadata printing stuff.
...
llvm-svn: 100324
2010-04-04 07:39:04 +00:00
Chris Lattner
da368251bf
use EmitRawText instead of O in DwarfPrinter.
...
llvm-svn: 100323
2010-04-04 07:25:52 +00:00
Chris Lattner
00699c02d5
fix PrintAsmOperand and PrintAsmMemoryOperand to pass down
...
raw_ostream to print to.
llvm-svn: 100313
2010-04-04 05:29:35 +00:00
Chris Lattner
f56580493f
change this back too
...
llvm-svn: 100310
2010-04-04 05:09:10 +00:00
Chris Lattner
d37e89c481
check in what I tested. :(
...
llvm-svn: 100309
2010-04-04 05:08:10 +00:00
Chris Lattner
d3805cbfe6
MMI is always available, rename O -> OS in printInlineAsm.
...
llvm-svn: 100308
2010-04-04 05:07:45 +00:00
Chris Lattner
8fb6be1886
fix an ugly wart in the MCInstPrinter api where the
...
raw_ostream to print an instruction to had to be specified
at MCInstPrinter construction time instead of being able
to pick at each call to printInstruction.
llvm-svn: 100307
2010-04-04 05:04:31 +00:00
Chris Lattner
cdbca3e8fe
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
Mon P Wang
484bbe6aa9
Reapply address space patch after fixing an issue in MemCopyOptimizer.
...
Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset,
e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1)
llvm-svn: 100304
2010-04-04 03:10:48 +00:00
Chris Lattner
fde2b21277
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
Chris Lattner
e952450d5a
emit the cygwin stub thing through mcstreamer.
...
llvm-svn: 100295
2010-04-03 22:19:41 +00:00
Chris Lattner
b6769a8513
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
Chris Lattner
940911edf1
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
Chris Lattner
4e8e791414
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
Chris Lattner
512e2aa3d2
mc'ize comment printing around file scope inline asm.
...
llvm-svn: 100288
2010-04-03 21:13:18 +00:00