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
Jakob Stoklund Olesen
70757478a1
Switch SSEDomainFix to SpecificBumpPtrAllocator.
...
llvm-svn: 100332
2010-04-04 18:00:21 +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
Nicolas Geoffray
be623e86f8
CurFn is only used for relocations. Use EmissionDetails.MF->getFunction() instead.
...
llvm-svn: 100328
2010-04-04 10:31:49 +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
5cd83c0773
mc'ize the remaining uses of O.
...
llvm-svn: 100322
2010-04-04 07:23:00 +00:00
Chris Lattner
36df7ab0ae
finish eliminating uses of O.
...
llvm-svn: 100321
2010-04-04 07:17:25 +00:00
Chris Lattner
380fd2ed89
mcize more of ppc stub printing.
...
llvm-svn: 100320
2010-04-04 07:12:28 +00:00
Chris Lattner
67a2898dcc
mcize a bunch more stuff, using EmitRawText for things we
...
don't have mcstreamer support for yet.
llvm-svn: 100319
2010-04-04 07:05:53 +00:00
Chris Lattner
781b877495
convert the non-MCInstPrinter'ized EmitInstruction
...
implementations to use EmitRawText instead of writing
directly to "O".
llvm-svn: 100318
2010-04-04 06:12:20 +00:00
Chris Lattner
658ba9b004
streamerize the rest of PIC16 asm printer.
...
llvm-svn: 100317
2010-04-04 05:53:03 +00:00
Chris Lattner
fb7128c165
streamerize printing of dbg_value, the x86 backend is now fully
...
streamerized for everything.
llvm-svn: 100316
2010-04-04 05:40:34 +00:00
Chris Lattner
696d811e4d
split DEBUG_VALUE printing stuff out to its own method.
...
llvm-svn: 100315
2010-04-04 05:38:19 +00:00
Chris Lattner
4b7a56f4fe
mc'ize elf stub printing, convert cygwin stuff to EmitRawText,
...
which will abort in .o file writing mode.
llvm-svn: 100314
2010-04-04 05:35:04 +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
1a83b72699
use predicates in DBG_VALUE printing code to simplify it.
...
llvm-svn: 100312
2010-04-04 05:21:31 +00:00
Chris Lattner
0dcd134769
remove more implicit uses of "O".
...
llvm-svn: 100311
2010-04-04 05:19:20 +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
fad8688f5d
allow attaching comments to raw text.
...
llvm-svn: 100292
2010-04-03 22:06:56 +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
cf35bb049a
add <cstdlib> header for abort() on linux builders.
...
llvm-svn: 100290
2010-04-03 21:48:59 +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
Chris Lattner
fb18894982
remove some extraneous casts
...
llvm-svn: 100287
2010-04-03 21:03:50 +00:00
Chris Lattner
8923a39d37
require that the branch being controlled by the IV
...
exits the loop. With this information we can guarantee
the iteration count of the loop is bounded by the
compare. I think this xforms is finally safe now.
llvm-svn: 100285
2010-04-03 07:21:39 +00:00
Chris Lattner
065798cd82
add integer overflow check for the fp induction variable
...
checker. Amusingly, we already had tests that we should
have rejects because they would be miscompiled in the
testsuite.
The remaining issue with this is that we don't check that
the branch causes us to exit the loop if it fails, so we
don't actually know if we remain in bounds.
llvm-svn: 100284
2010-04-03 07:18:48 +00:00
Chris Lattner
bef7001a34
add a comment and fix some consistency issues, converting
...
to a signed vs unsigned value depending on the sign of the
constant fp means that we can't distinguish between a
truly negative number and a positive number so large the
32nd bit is set. So, do don't this!
llvm-svn: 100283
2010-04-03 06:41:49 +00:00
Chris Lattner
a8c9d26ea1
fix PR6761, a miscompilation due to the fp->int IV conversion
...
stuff. More bugs remain though.
llvm-svn: 100282
2010-04-03 06:30:03 +00:00