1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

59209 Commits

Author SHA1 Message Date
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
Chandler Carruth
c6c39a6380 Add the new ARMDecodeEmitter to CMake build.
llvm-svn: 100267
2010-04-03 04:36:43 +00:00
Johnny Chen
9da90c8593 Get rid of the middleman (ARMAlgorithm), which causes more trouble than the
abstraction it brings.  And also get rid of the atexit() handler, it does not
belong in the lib directory. :-)

llvm-svn: 100265
2010-04-03 04:10:56 +00:00
Bob Wilson
5a3200f750 Revert all my SSAUpdater patches. The PHI placement algorithm is not correct
(what was I thinking?) and there's also a problem with LCSSA.  I'll try again
later with fixes.

--- Reverse-merging r100263 into '.':
U    lib/Transforms/Utils/SSAUpdater.cpp
--- Reverse-merging r100177 into '.':
G    lib/Transforms/Utils/SSAUpdater.cpp
--- Reverse-merging r100148 into '.':
G    lib/Transforms/Utils/SSAUpdater.cpp
--- Reverse-merging r100147 into '.':
U    include/llvm/Transforms/Utils/SSAUpdater.h
G    lib/Transforms/Utils/SSAUpdater.cpp
--- Reverse-merging r100131 into '.':
G    include/llvm/Transforms/Utils/SSAUpdater.h
G    lib/Transforms/Utils/SSAUpdater.cpp
--- Reverse-merging r100130 into '.':
G    lib/Transforms/Utils/SSAUpdater.cpp
--- Reverse-merging r100126 into '.':
G    include/llvm/Transforms/Utils/SSAUpdater.h
G    lib/Transforms/Utils/SSAUpdater.cpp
--- Reverse-merging r100050 into '.':
D    test/Transforms/GVN/2010-03-31-RedundantPHIs.ll
--- Reverse-merging r100047 into '.':
G    include/llvm/Transforms/Utils/SSAUpdater.h
G    lib/Transforms/Utils/SSAUpdater.cpp

llvm-svn: 100264
2010-04-03 03:50:38 +00:00
Bob Wilson
71b0b33e05 Add a DEBUG_TYPE for the SSAUpdater.
llvm-svn: 100263
2010-04-03 03:28:44 +00:00
Evan Cheng
b56fbc400f Code refactoring.
llvm-svn: 100262
2010-04-03 02:23:43 +00:00
Chris Lattner
c2f273b52d Add special case bitcode support for DebugLoc. This avoids
having the bitcode writer materialize mdnodes for all the
debug location tuples when writing out the bc file and 
stores the information in a more compact form.  For example,
the -O0 -g bc file for combine.c in 176.gcc shrinks from
739392 to 512096 bytes.

This concludes my planned short-term debug info work.

llvm-svn: 100261
2010-04-03 02:17:50 +00:00
Mikhail Glushenkov
f4668a70f5 Pass -shared to the linker.
llvm-svn: 100260
2010-04-03 02:00:03 +00:00
Johnny Chen
9b96a2cf47 Fix comment.
llvm-svn: 100259
2010-04-03 01:17:30 +00:00
Johnny Chen
313183d079 Register ARMAlgorithm::DoCleanup() to be called on exit to free the memory
occuplied by the cached ARMAlgorithm objects.

llvm-svn: 100258
2010-04-03 01:09:47 +00:00
Chris Lattner
6fb3f169c8 add a couple missing enum names.
llvm-svn: 100257
2010-04-03 01:05:24 +00:00
Eric Christopher
0e238efc7d Rewrite aesimc handling. It only takes a single input and has a single
dest.

llvm-svn: 100252
2010-04-02 23:48:33 +00:00
Johnny Chen
fc49453e45 Fix another build warning.
llvm-svn: 100251
2010-04-02 23:43:38 +00:00
Eric Christopher
7263b3d802 Fix typo aeskeygenassist -> aeskeygenassist128.
llvm-svn: 100250
2010-04-02 23:29:36 +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