1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 04:52:54 +02:00
Commit Graph

9343 Commits

Author SHA1 Message Date
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
David Greene
7c81589636 Ok, third time's the charm. No changes from last time except the CMake
source addition.  Apparently the buildbots were wrong about failures.

---

Add some switches helpful for debugging:

-print-before=<Pass Name>

Dump IR before running pass <Pass Name>.

-print-before-all

Dump IR before running each pass.

-print-after-all

Dump IR after running each pass.

These are helpful when tracking down a miscompilation.  It is easy to
get IR dumps and do diffs on them, etc.

To make this work well, add a new getPrinterPass API to Pass so that
each kind of pass (ModulePass, FunctionPass, etc.) can create a Pass
suitable for dumping out the kind of object the Pass works on.

llvm-svn: 100249
2010-04-02 23:17:14 +00:00
Dale Johannesen
86b4078f90 Skip debug info when looking for existing EH calls at the
beginning of a block.

llvm-svn: 100230
2010-04-02 21:49:27 +00:00
Benjamin Kramer
88e421e531 Fix anachronism.
llvm-svn: 100225
2010-04-02 20:47:05 +00:00
Chris Lattner
9da2b8a955 fix the llvm-x86_64-linux buildbot.
llvm-svn: 100223
2010-04-02 20:36:25 +00:00
Chris Lattner
c7be637524 remove empty file.
llvm-svn: 100222
2010-04-02 20:26:36 +00:00
Chris Lattner
0da97990f6 stop using DebugLoc::getUnknownLoc()
llvm-svn: 100215
2010-04-02 20:17:23 +00:00
Chris Lattner
305c84b8ee 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
Evan Cheng
5d825988d0 Correctly lower memset / memcpy of undef. It should be a nop. PR6767.
llvm-svn: 100208
2010-04-02 19:36:14 +00:00
Evan Cheng
499918dabf Revert 100204. It broke a bunch of tests and apparently changed what passes are run during codegen.
llvm-svn: 100207
2010-04-02 19:29:15 +00:00
Benjamin Kramer
69aee9e31b Update CMake.
llvm-svn: 100206
2010-04-02 19:09:51 +00:00
David Greene
554373897c Let's try this again. Re-apply 100143 including an apparent missing
<string> include.  For some reason the buildbot choked on this while my
builds did not.  It's probably due to a difference in system headers.

---

Add some switches helpful for debugging:

-print-before=<Pass Name>

Dump IR before running pass <Pass Name>.

-print-before-all

Dump IR before running each pass.

-print-after-all

Dump IR after running each pass.

These are helpful when tracking down a miscompilation.  It is easy to
get IR dumps and do diffs on them, etc.

To make this work well, add a new getPrinterPass API to Pass so that
each kind of pass (ModulePass, FunctionPass, etc.) can create a Pass
suitable for dumping out the kind of object the Pass works on.

llvm-svn: 100204
2010-04-02 18:46:26 +00:00
Mon P Wang
0ccf050ca3 Revert r100191 since it breaks objc in clang
llvm-svn: 100199
2010-04-02 18:43:02 +00:00
Mon P Wang
a01350755e 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: 100191
2010-04-02 18:04:15 +00:00
Evan Cheng
921fc2c77b After trivial coalescing, the MI being visited may have become a copy. Avoid adding it to CSE hash table since copies aren't being considered for CSE and they may be deleted.
rdar://7819990

llvm-svn: 100170
2010-04-02 02:21:24 +00:00
Dale Johannesen
5b35f2ee86 Teach AnalyzeBranch, RemoveBranch and the branch
folder to be tolerant of debug info following the
branch(es) at the end of a block.

llvm-svn: 100168
2010-04-02 01:38:09 +00:00