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
Chris Lattner
c13dd4f035
convert to filecheck
...
llvm-svn: 100281
2010-04-03 06:27:56 +00:00
Chris Lattner
29e43ff58f
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
Chris Lattner
e1f0cf628b
rename feature test.
...
llvm-svn: 100279
2010-04-03 06:24:28 +00:00
Chris Lattner
4d6928d1c7
actually just remove this, will move the real feature test here.
...
llvm-svn: 100278
2010-04-03 06:24:03 +00:00
Chris Lattner
17259c40aa
rename test since it is a feature test.
...
llvm-svn: 100277
2010-04-03 06:22:52 +00:00
Chris Lattner
8ffa990600
rename PH -> PN to be consistent with WeakPN and the rest
...
of llvm.
llvm-svn: 100276
2010-04-03 06:17:08 +00:00
Chris Lattner
8bc4749f9f
improve comment and drop a dead check. If PH had
...
no uses, it would have been deleted by
RecursivelyDeleteTriviallyDeadInstructions
llvm-svn: 100275
2010-04-03 06:16:22 +00:00
Chris Lattner
93b0a5e901
strength reduce a ridiculous use of APInt.
...
llvm-svn: 100274
2010-04-03 06:13:12 +00:00
Chris Lattner
7282b7cbe0
rename stuff improve comment grammar.
...
llvm-svn: 100273
2010-04-03 06:11:07 +00:00
Chris Lattner
028bdcd418
simplify some code and resolve a fixme.
...
llvm-svn: 100272
2010-04-03 06:06:59 +00:00
Chris Lattner
cdc272fa9d
There is no guarantee that the increment and the branch
...
are in the same block. Insert the new increment in the
correct location.
Also, more cleanups.
llvm-svn: 100271
2010-04-03 06:05:10 +00:00
Chris Lattner
5c2f2edd08
first half of a pass through IndVarSimplify::HandleFloatingPointIV,
...
this cleans up a bunch of code and also fixes several crashes and
miscompiles. More to come unfortunately, this optimization
is quite broken.
llvm-svn: 100270
2010-04-03 05:54:59 +00:00
Chris Lattner
b259395cd8
don't internalize available_externally functions, they are
...
really just declarations. This is related to PR6524
llvm-svn: 100269
2010-04-03 05:24:50 +00:00
Chandler Carruth
6d6f54a390
Fix a warning in GCC about a pointless typedef.
...
llvm-svn: 100268
2010-04-03 04:45:24 +00:00