Chris Lattner
2b40a207bc
more interface cleanup make some helpers static functions.
...
llvm-svn: 100343
2010-04-04 18:58:53 +00:00
Chris Lattner
7bde8c07a7
clean up the asmprinter header and privatize some stuff.
...
llvm-svn: 100342
2010-04-04 18:52:31 +00:00
Chris Lattner
baa2c972e9
use stringref instead of strtol to avoid errno gymnastics.
...
llvm-svn: 100341
2010-04-04 18:42:18 +00:00
Chris Lattner
1e15869d1f
split inline asm support out to its own .cpp file.
...
llvm-svn: 100340
2010-04-04 18:34:07 +00:00
Chris Lattner
8ff29c523e
inline processDebugLoc and simplify it.
...
llvm-svn: 100339
2010-04-04 18:18:51 +00:00
Chris Lattner
c334d80b0d
minor tidying.
...
llvm-svn: 100338
2010-04-04 18:16:38 +00:00
Chris Lattner
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
Chris Lattner
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
Jakob Stoklund Olesen
42caaa4f5b
Switch SSEDomainFix to SpecificBumpPtrAllocator.
...
llvm-svn: 100332
2010-04-04 18:00:21 +00:00
Chris Lattner
2cf5f9ec05
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
9b9dc4d4c6
CurFn is only used for relocations. Use EmissionDetails.MF->getFunction() instead.
...
llvm-svn: 100328
2010-04-04 10:31:49 +00:00
Chris Lattner
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
Chris Lattner
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
Chris Lattner
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
Chris Lattner
ef8240bbac
mcize the gc metadata printing stuff.
...
llvm-svn: 100324
2010-04-04 07:39:04 +00:00
Chris Lattner
dd89ce9a82
use EmitRawText instead of O in DwarfPrinter.
...
llvm-svn: 100323
2010-04-04 07:25:52 +00:00
Chris Lattner
3cb9086c26
mc'ize the remaining uses of O.
...
llvm-svn: 100322
2010-04-04 07:23:00 +00:00
Chris Lattner
4f63f7ee8e
finish eliminating uses of O.
...
llvm-svn: 100321
2010-04-04 07:17:25 +00:00
Chris Lattner
794b2f1b37
mcize more of ppc stub printing.
...
llvm-svn: 100320
2010-04-04 07:12:28 +00:00
Chris Lattner
5e5961864f
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
3d86cd6710
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
83a093183c
streamerize the rest of PIC16 asm printer.
...
llvm-svn: 100317
2010-04-04 05:53:03 +00:00
Chris Lattner
d479317d65
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
bf43d4b6e9
split DEBUG_VALUE printing stuff out to its own method.
...
llvm-svn: 100315
2010-04-04 05:38:19 +00:00
Chris Lattner
9b13639f45
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
3bb09768cb
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
787253819a
use predicates in DBG_VALUE printing code to simplify it.
...
llvm-svn: 100312
2010-04-04 05:21:31 +00:00
Chris Lattner
562e02e4e1
remove more implicit uses of "O".
...
llvm-svn: 100311
2010-04-04 05:19:20 +00:00
Chris Lattner
0124fe38a6
change this back too
...
llvm-svn: 100310
2010-04-04 05:09:10 +00:00
Chris Lattner
aa70abba05
check in what I tested. :(
...
llvm-svn: 100309
2010-04-04 05:08:10 +00:00
Chris Lattner
f64c982943
MMI is always available, rename O -> OS in printInlineAsm.
...
llvm-svn: 100308
2010-04-04 05:07:45 +00:00
Chris Lattner
7012916275
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
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
Mon P Wang
cc2ab0cdc9
Reapply patch for adding support for address spaces and added a isVolatile field to memcpy, memmove, and memset.
...
llvm-svn: 100305
2010-04-04 03:10:52 +00:00
Mon P Wang
c576ee9040
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
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
Chris Lattner
c6d67d4ca5
emit the cygwin stub thing through mcstreamer.
...
llvm-svn: 100295
2010-04-03 22:19:41 +00:00
Chris Lattner
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
Chris Lattner
aca014e24e
allow attaching comments to raw text.
...
llvm-svn: 100292
2010-04-03 22:06:56 +00:00
Chris Lattner
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
Chris Lattner
6ec72d2e8f
add <cstdlib> header for abort() on linux builders.
...
llvm-svn: 100290
2010-04-03 21:48:59 +00:00
Chris Lattner
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
Chris Lattner
fed39fa7b3
mc'ize comment printing around file scope inline asm.
...
llvm-svn: 100288
2010-04-03 21:13:18 +00:00
Chris Lattner
9f59b3dd9b
remove some extraneous casts
...
llvm-svn: 100287
2010-04-03 21:03:50 +00:00
Chris Lattner
ecb536313f
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
40060d33f6
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
69913466cb
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
40ea690f39
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
Chris Lattner
2508bcf176
convert to filecheck
...
llvm-svn: 100281
2010-04-03 06:27:56 +00:00
Chris Lattner
42202868c3
just eliminate the uitofp checks. This code isn't doing
...
the required validity checks in the first place, and supporting
a condition large enough to require the 32'nd bit isn't worth it.
llvm-svn: 100280
2010-04-03 06:25:21 +00:00