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

53651 Commits

Author SHA1 Message Date
Dan Gohman
2767aa065e Initial x86 support for BlockAddresses.
llvm-svn: 85557
2009-10-30 01:28:02 +00:00
Dan Gohman
6b7d1390d7 Initial target-independent CodeGen support for BlockAddresses.
llvm-svn: 85556
2009-10-30 01:27:03 +00:00
Devang Patel
134ea45684 Remove dead code.
llvm-svn: 85551
2009-10-30 00:39:25 +00:00
Dan Gohman
adf4f4b7f2 Add a BlockAddress MachineOperand kind.
llvm-svn: 85549
2009-10-30 00:20:08 +00:00
Dan Gohman
acbd7911fb Remove a redundant copy constructor.
llvm-svn: 85547
2009-10-30 00:14:33 +00:00
Jim Grosbach
95e1ff2dba Dial back the realignment a bit.
llvm-svn: 85546
2009-10-30 00:08:40 +00:00
David Goodwin
9a91b1fe3d Between scheduling regions, correctly maintain anti-dep breaking state so that we don't incorrectly rename registers that span these regions.
llvm-svn: 85537
2009-10-29 23:30:59 +00:00
Dan Gohman
ed15829b83 Remove some unnecessary spaces in debug output.
llvm-svn: 85536
2009-10-29 23:30:06 +00:00
Dan Gohman
7f5acc4b57 Move some code from being emitted as boilerplate duplicated in every
*ISelDAGToDAG.cpp to being regular code in SelectionDAGISel.cpp.

llvm-svn: 85530
2009-10-29 22:30:23 +00:00
David Goodwin
ad8a169be4 Fix a couple of bugs in aggressive anti-dep breaking.
llvm-svn: 85522
2009-10-29 19:17:04 +00:00
Bob Wilson
e99d5530a3 Refactor complicated predicate into a separate function.
llvm-svn: 85519
2009-10-29 18:40:06 +00:00
Devang Patel
093d35bd8a First bitcase use may not lead to a dbg.declare intrinsic. Iterate uses until one find's dbg.declare intrinsic.
Patch by Sunae Seo.

llvm-svn: 85518
2009-10-29 18:20:34 +00:00
Dan Gohman
3393a4c997 Rename usesCustomDAGSchedInserter to usesCustomInserter, and update a
bunch of associated comments, because it doesn't have anything to do
with DAGs or scheduling. This is another step in decoupling MachineInstr
emitting from scheduling.

llvm-svn: 85517
2009-10-29 18:10:34 +00:00
Dan Gohman
4620ed7bb7 Refactor the code for unfolding a load into a separate function.
llvm-svn: 85515
2009-10-29 17:47:20 +00:00
Bill Wendling
c0aefdd3db Reapply r85338.
llvm-svn: 85514
2009-10-29 17:39:46 +00:00
Benjamin Kramer
c2ed14cdb8 Fix MSVC build.
llvm-svn: 85505
2009-10-29 12:55:32 +00:00
Nick Lewycky
5207d16c05 Apply some cleanups. No functionality changes.
llvm-svn: 85498
2009-10-29 07:35:15 +00:00
Chris Lattner
57a8d8d4e0 add sanity check for indbr.
llvm-svn: 85496
2009-10-29 05:53:32 +00:00
Chris Lattner
e83554145a just for the hell of it, allow globalopt to statically evaluate
static constructors with indirect gotos :)

llvm-svn: 85495
2009-10-29 05:51:50 +00:00
Chris Lattner
9bc4a421e2 add interpreter support for indirect goto / blockaddress. The interpreter
now correctly runs clang's test/CodeGen/indirect-goto.c.  The JIT will abort
on it until someone feels compelled to implement this.

llvm-svn: 85488
2009-10-29 05:26:09 +00:00
Zhongxing Xu
befbf73b93 add newline to make cl.exe happy.
llvm-svn: 85483
2009-10-29 05:07:14 +00:00
Zhongxing Xu
93af2d027f fix 80-col.
llvm-svn: 85480
2009-10-29 04:41:24 +00:00
Chris Lattner
91d310f259 greatly improve the LLVM IR bitcode encoding documentation,
patch by Peter Housel!

llvm-svn: 85479
2009-10-29 04:25:46 +00:00
Zhongxing Xu
45d8013f73 Explicitly convert to double to suppress Visual C++ 2008 build error C2668 pow is ambiguous call to overloaded function
llvm-svn: 85478
2009-10-29 03:43:06 +00:00
Jim Grosbach
071b4ec891 To get more thorough testing from llc-beta nightly runs, do dynamic stack
realignment regardless of whether it's strictly necessary.

llvm-svn: 85476
2009-10-29 02:41:21 +00:00
Jim Grosbach
220e39263c When the function is doing dynamic stack realignment, the spill slot will be
indexed via the stack pointer, even if a frame pointer is present. Update the
heuristic to place it nearest the stack pointer in that case, rather than
nearest the frame pointer.

llvm-svn: 85474
2009-10-29 02:33:47 +00:00
Johnny Chen
bcb6d87c9d Sorry to break the build.
I was trying to check the WIP file to some local repository, but ended up
checking in the llvm repository.  Oops!

llvm-svn: 85470
2009-10-29 02:04:53 +00:00
Johnny Chen
19209e26ff Minor tweak to forgo the the curly braces for most case blocks, except when
declaring local variables.

llvm-svn: 85467
2009-10-29 01:45:07 +00:00
Chris Lattner
a0e35cae82 teach various passes about blockaddress. We no longer
crash on any clang tests.

llvm-svn: 85465
2009-10-29 01:21:20 +00:00
Dale Johannesen
2dcd23d6f7 When there is a 2-instruction spill sequence, record
the second (store) instruction in SpillSlotToUsesMap
consistently.  I don't think this matters functionally,
but it's cleaner and Evan wants it this way.

llvm-svn: 85463
2009-10-29 01:15:40 +00:00
Bill Wendling
58923e365d Don't put in these EH changes.
llvm-svn: 85460
2009-10-29 00:37:35 +00:00
Douglas Gregor
354d1b85b2 A switch-on-string-literal construct that is a nice alternative to
cascading "ifs" of strcmps/memcmps.

llvm-svn: 85459
2009-10-29 00:34:30 +00:00
Chris Lattner
0a782eec94 teach ValueMapper about BlockAddress', making bugpoint a lot more useful.
llvm-svn: 85458
2009-10-29 00:31:02 +00:00
Chris Lattner
8f70e602d3 unindent massive blocks, no functionality change.
llvm-svn: 85457
2009-10-29 00:28:30 +00:00
Bill Wendling
784d38511f Reverting r85338 for now. It's causing a bootstrap failure on PPC darwin9.
--- Reverse-merging r85338 into '.':
U    lib/CodeGen/SimpleRegisterCoalescing.cpp
U    lib/CodeGen/SimpleRegisterCoalescing.h

llvm-svn: 85454
2009-10-29 00:22:16 +00:00
Dan Gohman
3f9f33080a Add indirectbr and blockaddress to the vim syntax highlighting file.
llvm-svn: 85451
2009-10-29 00:14:44 +00:00
Dan Gohman
c80f1a4033 Add a hasAddressTaken for BasicBlock.
llvm-svn: 85449
2009-10-29 00:09:08 +00:00
Chris Lattner
64ba3671c9 add IRBuilder support for IndirectBr
llvm-svn: 85445
2009-10-28 23:25:00 +00:00
Bob Wilson
f13be9d41e Reimplement BranchFolding change to avoid tail merging for a 1 instruction
common tail, except when the OptimizeForSize function attribute is present.
Radar 7338114.

llvm-svn: 85441
2009-10-28 22:10:20 +00:00
Dale Johannesen
e6fe8733fd When we generate spill code, then decide we don't need
to spill after all, we weren't handling 2-instruction
spill sequences correctly (PPC Altivec).  We need to
remove the store in this case.  Removing the other
instruction(s) would be goodness but is not needed for
correctness, and isn't done here.  7331562.

llvm-svn: 85437
2009-10-28 21:56:18 +00:00
Eric Christopher
d34a37560a Make sure we return the right sized type here.
llvm-svn: 85436
2009-10-28 21:32:16 +00:00
Bob Wilson
fc1194919b Revert r85346 change to control tail merging by CodeGenOpt::Level.
I'm going to redo this using the OptimizeForSize function attribute.

llvm-svn: 85426
2009-10-28 20:46:46 +00:00
Victor Hernandez
917cf94b22 Extend getMallocArraySize() to determine the array size if the malloc argument is:
ArraySize * ElementSize
ElementSize * ArraySize
ArraySize << log2(ElementSize)
ElementSize << log2(ArraySize)

Refactor isArrayMallocHelper and delete isSafeToGetMallocArraySize, so that there is only 1 copy of the malloc array determining logic.
Update users of getMallocArraySize() to not bother calling isArrayMalloc() as well.

llvm-svn: 85421
2009-10-28 20:18:55 +00:00
Viktor Kutuzov
4da1a5215a Fix to pass options from Gold plugin to LTO codegen
llvm-svn: 85419
2009-10-28 18:55:55 +00:00
Benjamin Kramer
0613c84aba Teach cmake that mk[sd]temp is defined in stdlib.h on some systems.
This fixes parallel build with clang on glibc platforms.

llvm-svn: 85414
2009-10-28 18:37:31 +00:00
David Goodwin
ae4f8e01b0 Make AntiDepReg.h internal.
llvm-svn: 85412
2009-10-28 18:29:54 +00:00
Bob Wilson
af37728221 Add a Thumb BRIND pattern. Change the ARM BRIND assembly to separate the
opcode and operand with a tab.  Check for these instructions in the usual
places.

llvm-svn: 85411
2009-10-28 18:26:41 +00:00
Evan Cheng
519b231883 fconsts and fconstd are obviously re-materializable.
llvm-svn: 85410
2009-10-28 18:19:56 +00:00
Jim Grosbach
e42dc83a9f Cleanup now that frame index scavenging via post-pass is working for ARM and Thumb2.
llvm-svn: 85406
2009-10-28 17:33:28 +00:00
Devang Patel
de81397884 llvm.dbg.global_variables do not exist anymore.
llvm-svn: 85402
2009-10-28 16:51:52 +00:00