1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-26 06:22:56 +02:00
Commit Graph

45761 Commits

Author SHA1 Message Date
Sanjiv Gupta
bbb78a0034 Handle indirect function calls.
Every function has the address of its frame in the beginning of code section.
The frame address is retrieved and used to pass arguments.

llvm-svn: 68597
2009-04-08 05:38:48 +00:00
Chris Lattner
f2349b2f5a disable this code for now, re-breaking PR2975, but fixing
a testcase I'm about to attach to that pr.

llvm-svn: 68592
2009-04-08 04:36:59 +00:00
Chris Lattner
fc47fb0629 Remove AllowInverse: it leaks memory and is not the right
abstraction for CommandLine.

llvm-svn: 68588
2009-04-08 03:43:51 +00:00
Dan Gohman
94fde57da3 Fully escape the grep string for this test.
llvm-svn: 68580
2009-04-08 00:54:40 +00:00
Dan Gohman
b979f332fd Update this test for recent codegen improvements. CodeGen is now
using an lea in place of a mov and an add for this test.

llvm-svn: 68579
2009-04-08 00:51:11 +00:00
Chris Lattner
80cbd85a29 change printStringChar to emit characters as unsigned char instead of char,
avoiding sign extension for the top octet.  For "negative" chars, we'd print
stuff like:

.asciz	"\702...
now we print:
.asciz	"\302...

llvm-svn: 68577
2009-04-08 00:28:38 +00:00
Dan Gohman
c9ce27d6b7 Implement support for using modeling implicit-zero-extension on x86-64
with SUBREG_TO_REG, teach SimpleRegisterCoalescing to coalesce
SUBREG_TO_REG instructions (which are similar to INSERT_SUBREG
instructions), and teach the DAGCombiner to take advantage of this on
targets which support it. This eliminates many redundant
zero-extension operations on x86-64.

This adds a new TargetLowering hook, isZExtFree. It's similar to
isTruncateFree, except it only applies to actual definitions, and not
no-op truncates which may not zero the high bits.

Also, this adds a new optimization to SimplifyDemandedBits: transform
operations like x+y into (zext (add (trunc x), (trunc y))) on targets
where all the casts are no-ops. In contexts where the high part of the
add is explicitly masked off, this allows the mask operation to be
eliminated. Fix the DAGCombiner to avoid undoing these transformations
to eliminate casts on targets where the casts are no-ops.

Also, this adds a new two-address lowering heuristic. Since
two-address lowering runs before coalescing, it helps to be able to
look through copies when deciding whether commuting and/or
three-address conversion are profitable.

Also, fix a bug in LiveInterval::MergeInClobberRanges. It didn't handle
the case that a clobber range extended both before and beyond an
existing live range. In that case, multiple live ranges need to be
added. This was exposed by the new subreg coalescing code.

Remove 2008-05-06-SpillerBug.ll. It was bugpoint-reduced, and the
spiller behavior it was looking for no longer occurrs with the new
instruction selection.

llvm-svn: 68576
2009-04-08 00:15:30 +00:00
Devang Patel
74fc1ab23d Revert prev. patch for now.
llvm-svn: 68569
2009-04-07 23:00:04 +00:00
Bill Wendling
6e702cf68c Temporarily revert r68552. This was causing a failure in the self-hosting LLVM
builds.

--- Reverse-merging (from foreign repository) r68552 into '.':
U    test/CodeGen/X86/tls8.ll
U    test/CodeGen/X86/tls10.ll
U    test/CodeGen/X86/tls2.ll
U    test/CodeGen/X86/tls6.ll
U    lib/Target/X86/X86Instr64bit.td
U    lib/Target/X86/X86InstrSSE.td
U    lib/Target/X86/X86InstrInfo.td
U    lib/Target/X86/X86RegisterInfo.cpp
U    lib/Target/X86/X86ISelLowering.cpp
U    lib/Target/X86/X86CodeEmitter.cpp
U    lib/Target/X86/X86FastISel.cpp
U    lib/Target/X86/X86InstrInfo.h
U    lib/Target/X86/X86ISelDAGToDAG.cpp
U    lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
U    lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp
U    lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h
U    lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h
U    lib/Target/X86/X86ISelLowering.h
U    lib/Target/X86/X86InstrInfo.cpp
U    lib/Target/X86/X86InstrBuilder.h
U    lib/Target/X86/X86RegisterInfo.td

llvm-svn: 68560
2009-04-07 22:35:25 +00:00
Devang Patel
6fce3ad779 Right now DBG_LABEL are required for llvm.dbg.region_start and llvm.dbg.region_end in non-fast mode also.
llvm-svn: 68559
2009-04-07 22:27:56 +00:00
Rafael Espindola
0324937229 Reduce code duplication on the TLS implementation.
This introduces a small regression on the generated code
quality in the case we are just computing addresses, not
loading values.

Will work on it and on X86-64 support.

llvm-svn: 68552
2009-04-07 21:37:46 +00:00
Dan Gohman
e98c3b1ea1 Don't attempt to handle aggregate argument values in FastISel; let
SelectionDAG do those. This fixes PR3955.

llvm-svn: 68546
2009-04-07 20:40:11 +00:00
Jim Grosbach
e2b20a3526 PR2985 / <rdar://problem/6584986>
When compiling in Thumb mode, only the low (R0-R7) registers are available
for most instructions. Breaking the low registers into a new register class
handles this. Uses of R12, SP, etc, are handled explicitly where needed
with copies inserted to move results into low registers where the rest of
the code generator can deal with them.

llvm-svn: 68545
2009-04-07 20:34:09 +00:00
Mike Stump
f105732a13 Remove ccc now. Radar 6737767
llvm-svn: 68544
2009-04-07 20:29:25 +00:00
Torok Edwin
2816bd3729 fix style.
llvm-svn: 68542
2009-04-07 19:45:59 +00:00
Bill Wendling
f833088369 Use 'name' instead of 'href'.
llvm-svn: 68534
2009-04-07 18:54:06 +00:00
Bill Wendling
3da6e4a800 Fix verification failure.
llvm-svn: 68531
2009-04-07 18:52:30 +00:00
Bill Wendling
d8ad7f85a3 Offer an explanation of why building LLVM-GCC with objdir == srcdir doesn't
work.

llvm-svn: 68530
2009-04-07 18:51:13 +00:00
Bill Wendling
fad0a6efa8 Another reformatting. No change in docs.
llvm-svn: 68528
2009-04-07 18:40:56 +00:00
Torok Edwin
f57704fbed Another attempt at fixing PR2975.
Types can have references to eachother, so we can't just call destroy on them.

llvm-svn: 68523
2009-04-07 17:23:02 +00:00
Chris Lattner
ce9fec457b fix comment to reflect the implementation I ended up settling on.
Thanks to Duncan for noticing this

llvm-svn: 68518
2009-04-07 16:30:31 +00:00
Chris Lattner
2f520929d4 fix rdar://6762290, a crash compiling cxx filt with clang.
llvm-svn: 68500
2009-04-07 05:03:34 +00:00
Chris Lattner
12dadd5a5e Add an API for the bitstream reader to read blobs and return
them by reference, instead of packing each byte into a
smallvector.

llvm-svn: 68486
2009-04-07 02:56:46 +00:00
Chris Lattner
e872752d66 remove empty section
llvm-svn: 68485
2009-04-07 02:55:53 +00:00
Chris Lattner
a98e068143 stub out code for reading record with blobs as blobs. Not active yet.
llvm-svn: 68472
2009-04-06 22:44:40 +00:00
Chris Lattner
bd885be4b0 allow clients to look up abbrev id's
llvm-svn: 68471
2009-04-06 22:43:46 +00:00
Chris Lattner
c4c57e4369 Add a new EmitRecordWithBlob API that allows a blob to be emitted
without converting each byte to a uint64_t to stick in a SmallVector.

llvm-svn: 68469
2009-04-06 22:26:26 +00:00
Chris Lattner
ac7e143979 add a new Blob encoding abbreviation for bitcode files that emits
elements in a form that is efficient for the reader to just get a
pointer in memory and start reading.  APIs to do efficient reading
and writing are still todo.

llvm-svn: 68465
2009-04-06 21:50:39 +00:00
Bob Wilson
39c7bec188 Handle 'a' modifier in ARM inline assembly.
Patch by Richard Pennington.

llvm-svn: 68464
2009-04-06 21:46:51 +00:00
Chris Lattner
c67eb55ed2 split ReadAbbreviatedLiteral out of ReadAbbreviatedField.
llvm-svn: 68463
2009-04-06 21:37:10 +00:00
Chris Lattner
44a17471be reduce indentation with early-out
llvm-svn: 68462
2009-04-06 21:34:58 +00:00
Chris Lattner
5a3ece0cff simplify code a bit.
llvm-svn: 68461
2009-04-06 21:20:01 +00:00
Chris Lattner
07fdd28798 simplify to reduce indentation.
llvm-svn: 68460
2009-04-06 21:12:29 +00:00
Torok Edwin
4ca1b23dd7 revert r68457, its crashing in make check.
llvm-svn: 68459
2009-04-06 20:57:34 +00:00
Chris Lattner
7e2c9be68e Teach llvm-bcanalyzer to skip over the header we use on LLVM IR files.
llvm-svn: 68458
2009-04-06 20:54:32 +00:00
Torok Edwin
bf09e5c8f6 fix (part of) memory leak on shutdown. See PR2975.
llvm-svn: 68457
2009-04-06 20:49:21 +00:00
Chris Lattner
367120583b clean up some html
llvm-svn: 68456
2009-04-06 20:35:19 +00:00
Mike Stump
f8e3eea558 Avoid -O3 on Darwin for now.
llvm-svn: 68455
2009-04-06 19:58:11 +00:00
Ed Schouten
ff25f858fd Let the strcat optimizer return the pointer to the start of the buffer,
instead of the place where it started to perform the string copy.

- PR3661
- Patch by Benjamin Kramer!

llvm-svn: 68443
2009-04-06 13:06:48 +00:00
Sanjiv Gupta
14d86f7755 Map stack based frameindices for spills to zero based indices that can be accessed based on an external symbol defining the location of temporary data for a function. For example: we have spill slots addressed as foo.tmp + 0, foo.tmp + 1 etc.
llvm-svn: 68442
2009-04-06 10:54:50 +00:00
Bill Wendling
ca348b1f8e Add character encoding declaration to fix verification warning.
llvm-svn: 68440
2009-04-05 12:38:44 +00:00
Bill Wendling
c9e0b30d02 Obsessively format this document.
llvm-svn: 68439
2009-04-05 12:37:44 +00:00
Mikhail Glushenkov
80402f1dc8 Add segment flag bits to ELF.h.
llvm-svn: 68438
2009-04-05 09:07:08 +00:00
Bill Wendling
ce489ee879 Add character encoding declaration.
llvm-svn: 68433
2009-04-05 00:44:06 +00:00
Bill Wendling
1b27430c80 Fix validation error.
llvm-svn: 68432
2009-04-05 00:43:04 +00:00
Bill Wendling
de19a199b5 A lot of formatting changes.
llvm-svn: 68431
2009-04-05 00:41:19 +00:00
Oscar Fuentes
cccbe484b5 CMake: Added notes pointing to the LLVM CMake documentation.
llvm-svn: 68429
2009-04-04 22:52:02 +00:00
Oscar Fuentes
2da28965f6 CMake: defines and uses macro add_llvm_definitions for keeping track
of compiler parameters explicitly added by the build
specification. This macro replaces the cmake built-in
`add_definitions'.

Detects glibc and defines _GNU_SOURCE accordingly.

Resolves bug 3882.

llvm-svn: 68428
2009-04-04 22:41:07 +00:00
Bill Wendling
6ccfb904ac Fix some HTML validation errors.
llvm-svn: 68427
2009-04-04 22:36:02 +00:00
Bill Wendling
c4f6e63a82 General clean-up of the bitcode format documentation. Having the paragraphs
formatted the same, putting words in <tt> tags, adding &mdash;s, etc.

llvm-svn: 68426
2009-04-04 22:27:03 +00:00