Commit Graph

59373 Commits

Author SHA1 Message Date
Chris Lattner
a64371828e inline EmitDifference away.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100347 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 19:58:12 +00:00
Chris Lattner
af8df26495 resolve a fixme.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100346 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 19:28:59 +00:00
Chris Lattner
c021572511 move gettemplabel and getdwlabel to AsmPrinter and rename
them for consistency.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100345 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 19:25:43 +00:00
Chris Lattner
7e1a8f882f move uleb/sleb printing into AsmPrinter from DwarfPrinter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100344 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 19:09:29 +00:00
Chris Lattner
17fedf216b more interface cleanup make some helpers static functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100343 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 18:58:53 +00:00
Chris Lattner
3f53c8398d clean up the asmprinter header and privatize some stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100342 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 18:52:31 +00:00
Chris Lattner
65eeaad91d use stringref instead of strtol to avoid errno gymnastics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100341 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 18:42:18 +00:00
Chris Lattner
736e31d0cf split inline asm support out to its own .cpp file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100340 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 18:34:07 +00:00
Chris Lattner
285199502b inline processDebugLoc and simplify it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100339 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 18:18:51 +00:00
Chris Lattner
dfa107e45a minor tidying.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100338 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 18:16:38 +00:00
Chris Lattner
300a4c5640 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) 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100337 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 18:14:01 +00:00
Chris Lattner
9d1c1ada21 remove TargetMachine.h #include, also, TRI isn't used frequently
enough to warrant caching in AsmPrinter, so remove it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100336 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 18:06:11 +00:00
Jakob Stoklund Olesen
bbef815a3b Switch SSEDomainFix to SpecificBumpPtrAllocator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100332 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 18:00:21 +00:00
Chris Lattner
e00b59f954 lazily allocate the GCMetadataPrinters map and remove DenseMap
from the AsmPrinter interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100331 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 17:57:56 +00:00
Nicolas Geoffray
9041ae274b CurFn is only used for relocations. Use EmissionDetails.MF->getFunction() instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100328 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 10:31:49 +00:00
Chris Lattner
b23569aff0 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100327 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 08:18:47 +00:00
Chris Lattner
de0f339ec3 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".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100326 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 07:50:12 +00:00
Chris Lattner
75f50725c1 remove the raw_ostream from various dwarf printing things.
The only thing left is LEB printing, which uses EmitRawText
for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100325 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 07:48:20 +00:00
Chris Lattner
7d73c7f0d6 mcize the gc metadata printing stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100324 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 07:39:04 +00:00
Chris Lattner
0b9bdb47bd use EmitRawText instead of O in DwarfPrinter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100323 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 07:25:52 +00:00
Chris Lattner
73ce0a63e6 mc'ize the remaining uses of O.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100322 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 07:23:00 +00:00
Chris Lattner
1841b34f53 finish eliminating uses of O.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100321 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 07:17:25 +00:00
Chris Lattner
2dc6fa67ee mcize more of ppc stub printing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100320 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 07:12:28 +00:00
Chris Lattner
9d7efd3081 mcize a bunch more stuff, using EmitRawText for things we
don't have mcstreamer support for yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100319 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 07:05:53 +00:00
Chris Lattner
7ad07c4636 convert the non-MCInstPrinter'ized EmitInstruction
implementations to use EmitRawText instead of writing
directly to "O".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100318 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 06:12:20 +00:00
Chris Lattner
f2777d7cd9 streamerize the rest of PIC16 asm printer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100317 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 05:53:03 +00:00
Chris Lattner
1ce3f565ef streamerize printing of dbg_value, the x86 backend is now fully
streamerized for everything.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100316 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 05:40:34 +00:00
Chris Lattner
bfbab35653 split DEBUG_VALUE printing stuff out to its own method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100315 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 05:38:19 +00:00
Chris Lattner
c82d9c4e5c mc'ize elf stub printing, convert cygwin stuff to EmitRawText,
which will abort in .o file writing mode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100314 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 05:35:04 +00:00
Chris Lattner
c75c028a15 fix PrintAsmOperand and PrintAsmMemoryOperand to pass down
raw_ostream to print to.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100313 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 05:29:35 +00:00
Chris Lattner
e812d4c604 use predicates in DBG_VALUE printing code to simplify it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100312 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 05:21:31 +00:00
Chris Lattner
88db786712 remove more implicit uses of "O".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100311 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 05:19:20 +00:00
Chris Lattner
d32c8a5617 change this back too
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100310 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 05:09:10 +00:00
Chris Lattner
e1783cadf7 check in what I tested. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100309 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 05:08:10 +00:00
Chris Lattner
c1e0b76306 MMI is always available, rename O -> OS in printInlineAsm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100308 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 05:07:45 +00:00
Chris Lattner
d374087be5 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100307 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 05:04:31 +00:00
Chris Lattner
35c33bd772 change a ton of code to not implicitly use the "O" raw_ostream
member of AsmPrinter.  Instead, pass it in explicitly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100306 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 04:47:45 +00:00
Mon P Wang
20adc9dc46 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)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100304 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 03:10:48 +00:00
Chris Lattner
0c08d09204 asmstreamerize the .size directive for function bodies, force clients
of printOffset to pass in a stream to print to.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100296 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-03 22:28:33 +00:00
Chris Lattner
fd60b8b484 emit the cygwin stub thing through mcstreamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100295 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-03 22:19:41 +00:00
Chris Lattner
58bc4dd4a9 add a twine form of MCStreamer::EmitRawText, and mc'ize
a few more things in AsmPrinter.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100294 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-03 22:12:35 +00:00
Chris Lattner
d5928dcd78 allow attaching comments to raw text.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100292 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-03 22:06:56 +00:00
Chris Lattner
f94f8dcda7 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100291 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-03 22:01:50 +00:00
Chris Lattner
3580dea910 add <cstdlib> header for abort() on linux builders.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100290 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-03 21:48:59 +00:00
Chris Lattner
91bead7905 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100289 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-03 21:35:55 +00:00
Chris Lattner
47b7e5dae9 mc'ize comment printing around file scope inline asm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100288 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-03 21:13:18 +00:00
Chris Lattner
4d12fdc2d9 remove some extraneous casts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100287 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-03 21:03:50 +00:00
Chris Lattner
d52c072777 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100285 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-03 07:21:39 +00:00
Chris Lattner
96fd76638b 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100284 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-03 07:18:48 +00:00
Chris Lattner
bbb91498da 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100283 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-03 06:41:49 +00:00