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

53440 Commits

Author SHA1 Message Date
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
Chris Lattner
a77d439989 add a new 'SetCurrentDebugType' API (requested by Andrew Haley for JIT
stuff) to programmatically control the current debug flavor.  While 
I'm at it, doxygenate Debug.h and clean it up.

llvm-svn: 85395
2009-10-28 15:32:19 +00:00
Dan Gohman
7948563977 Don't call SDNode::isPredecessorOf when it isn't necessary. If the load's
chains have no users, they can't be predecessors of the condition.

llvm-svn: 85394
2009-10-28 15:28:02 +00:00
Dan Gohman
a43a2a10a1 Simplify this code: if the unfolded load can't be hoisted, just delete
the new instructions and leave the old one in place.

llvm-svn: 85393
2009-10-28 15:23:36 +00:00
Edward O'Callaghan
fbe911a40e No newline at end of file.
llvm-svn: 85390
2009-10-28 15:04:53 +00:00
Benjamin Kramer
51f925548b Update CMake file.
llvm-svn: 85389
2009-10-28 13:29:18 +00:00
Gabor Greif
f47a614c2f use metavariable <result> instead of SSA name %result for consistency
llvm-svn: 85388
2009-10-28 13:14:50 +00:00
Gabor Greif
bb9bbb25af ooops, SSA name should not be part of the link
llvm-svn: 85387
2009-10-28 13:05:07 +00:00
Gabor Greif
fad893b79c advertise new syntax for unnamed instructions
and eliminate confusing double-use of SSA names
(work in progress)

llvm-svn: 85385
2009-10-28 09:21:30 +00:00
Owen Anderson
cfb2c9edeb Treat lifetime begin/end markers as allocations/frees respectively for the
purposes for GVN/DSE.

llvm-svn: 85383
2009-10-28 07:05:35 +00:00
Nick Lewycky
0376e34268 Add ABCD, a generalized implementation of the Elimination of Array Bounds
Checks on Demand algorithm which looks at arbitrary branches instead of loop
iterations. This is GSoC work by Andre Tavares with only editorial changes
applied!

llvm-svn: 85382
2009-10-28 07:03:15 +00:00
Evan Cheng
16ed5ac7ff Give ARMISD::EH_SJLJ_LONGJMP and EH_SJLJ_SETJMP names.
llvm-svn: 85381
2009-10-28 06:55:03 +00:00