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

38451 Commits

Author SHA1 Message Date
Evan Cheng
862e3a147c Not safe folding a load + FsXORPSrr into FsXORPSrm. It's loading a FR64 value but the load folding variant expects a 16-byte aligned address.
llvm-svn: 50574
2008-05-02 07:50:58 +00:00
Bill Wendling
277f2a205d Porting r50563 from Tak to mainline.
llvm-svn: 50564
2008-05-02 00:43:20 +00:00
Dan Gohman
4de7fe7ddc Fix a typo in a comment.
llvm-svn: 50562
2008-05-02 00:05:03 +00:00
Dan Gohman
a55bbcacce Use push_back(...) instead of resize(1, ...), per review feedback.
llvm-svn: 50561
2008-05-02 00:03:54 +00:00
Dan Gohman
04e2b94842 Update old-style syntax in some "not grep" tests.
llvm-svn: 50560
2008-05-01 23:50:07 +00:00
Dan Gohman
148b1904fe Fix uninitialized uses of the FPC variable.
llvm-svn: 50558
2008-05-01 23:40:44 +00:00
Dale Johannesen
4ab8b00dfa New test for bug fixed in 50545.
llvm-svn: 50548
2008-05-01 22:50:14 +00:00
Dale Johannesen
d758175889 Don't try to create PHIs of struct types. Fallout
from x86-64 calling convention work.

llvm-svn: 50545
2008-05-01 22:27:44 +00:00
Dan Gohman
793c9fed45 Fix an overaggressive SimplifyDemandedBits optimization on urem. This
fixes the 254.gap regression on x86 and the 403.gcc regression on x86-64.

llvm-svn: 50537
2008-05-01 19:13:24 +00:00
Bill Wendling
81b5245cec Adding testcase.
llvm-svn: 50536
2008-05-01 18:41:09 +00:00
Ted Kremenek
9d8f6a05b6 Initialize a local variable.
llvm-svn: 50527
2008-05-01 17:08:00 +00:00
Chris Lattner
e9bbe8e6b6 don't randomly miscompile seto/setuo just because we are in
ffastmath mode.  This fixes rdar://5902801, a miscompilation
of gcc.dg/builtins-8.c.

Bill, please pull this into Tak.

llvm-svn: 50523
2008-05-01 07:26:11 +00:00
Chris Lattner
ab0c73a95c 1) add '-debug' output
2) Return NULL instead of false in several places for tidiness.
3) fix a bug optimizing  sprintf(p, "%c", x)

llvm-svn: 50521
2008-05-01 06:39:12 +00:00
Chris Lattner
be2bafbe92 Delete the IPO simplify-libcalls and completely reimplement it as
a FunctionPass.  This makes it simpler, fixes dozens of bugs, adds
a couple of minor features, and shrinks is considerably: from
2214 to 1437 lines.

llvm-svn: 50520
2008-05-01 06:25:24 +00:00
Chris Lattner
9d73228708 fix typo
llvm-svn: 50519
2008-05-01 06:16:48 +00:00
Chris Lattner
9a678d6f55 instcombine does memset optzns.
llvm-svn: 50518
2008-05-01 06:16:38 +00:00
Chris Lattner
926efd9174 simplifylibcalls doesn't optimize llvm.memmove, instcombine does.
llvm-svn: 50517
2008-05-01 06:14:24 +00:00
Chris Lattner
d4bf588b85 move some tests from libcall optimizer suite.
llvm-svn: 50516
2008-05-01 06:13:48 +00:00
Chris Lattner
3835284f4c Add CreateCall3/CreateCall4 at Eric's request.
llvm-svn: 50515
2008-05-01 05:23:45 +00:00
Chris Lattner
09cf777a96 Add a spiffy little "CreateCall2" method, which can be used to make
a function call that takes two Value*'s as arguments.

llvm-svn: 50514
2008-05-01 05:11:00 +00:00
Chris Lattner
757d7d318a fix a bug in my previous patch, a classic =/== bug.
llvm-svn: 50483
2008-04-30 15:27:09 +00:00
Arnold Schwaighofer
29a654857a Really commit the test checking the argument lowering behaviour on x86-64 :).
llvm-svn: 50478
2008-04-30 09:19:47 +00:00
Arnold Schwaighofer
f58a35e2ec Tail call optimization improvements:
Move platform independent code (lowering of possibly overwritten
arguments, check for tail call optimization eligibility) from
target X86ISelectionLowering.cpp to TargetLowering.h and
SelectionDAGISel.cpp.

Initial PowerPC tail call implementation:

Support ppc32 implemented and tested (passes my tests and
test-suite llvm-test).  
Support ppc64 implemented and half tested (passes my tests).
On ppc tail call optimization is performed if 
  caller and callee are fastcc
  call is a tail call (in tail call position, call followed by ret)
  no variable argument lists or byval arguments
  option -tailcallopt is enabled
Supported:
 * non pic tail calls on linux/darwin
 * module-local tail calls on linux(PIC/GOT)/darwin(PIC)
 * inter-module tail calls on darwin(PIC)
If constraints are not met a normal call will be emitted.

A test checking the argument lowering behaviour on x86-64 was added.

llvm-svn: 50477
2008-04-30 09:16:33 +00:00
Gabor Greif
134707f8e8 fcntl.h is pretty standard on unix (without the sys/)
llvm-svn: 50475
2008-04-30 08:53:22 +00:00
Owen Anderson
f8c80ca156 Move this test to LoopDeletion, where it now passes.
llvm-svn: 50474
2008-04-30 07:17:22 +00:00
Owen Anderson
aaa86b3249 This condition got inverted accidentally.
llvm-svn: 50473
2008-04-30 07:16:33 +00:00
Chris Lattner
15195e00ee move lowering of llvm.memset -> store from simplify libcalls
to instcombine.

llvm-svn: 50472
2008-04-30 06:39:11 +00:00
Chris Lattner
ce01263bff no reason for simplifylibcalls to simplify intrinsics, instcombine does
a fine job.

llvm-svn: 50470
2008-04-30 06:12:15 +00:00
Chris Lattner
a62a4d407a remove redundant check.
llvm-svn: 50469
2008-04-30 06:06:37 +00:00
Chris Lattner
8f27116c1d add missing #include
llvm-svn: 50468
2008-04-30 04:56:14 +00:00
Chris Lattner
710d05695f add a method for comparing to see if a value has a specified name.
llvm-svn: 50465
2008-04-30 03:55:40 +00:00
Chris Lattner
844e32537d use string length computation to generalize several xforms.
llvm-svn: 50464
2008-04-30 03:07:53 +00:00
Dale Johannesen
c15de2b0a7 Add comments for previous patch as requested.
llvm-svn: 50463
2008-04-30 00:43:29 +00:00
Scott Michel
9dec950785 Bug fixes and updates for CellSPU, syncing up with trunk. Most notable
fixes are target-specific lowering of frame indices, fix constants generated
for the FSMBI instruction, and fixing SPUTargetLowering::computeMaskedBitsFor-
TargetNode().

llvm-svn: 50462
2008-04-30 00:30:08 +00:00
Scott Michel
ea31e77f83 Fix custom target lowering for zero/any/sign_extend: make sure that
DAG.UpdateNodeOperands() is called before (not after) the call to
TLI.LowerOperation().

llvm-svn: 50461
2008-04-30 00:26:38 +00:00
Dale Johannesen
78acf71493 Make eh_frame objects by 8-byte aligned on 64-bit
targets.

llvm-svn: 50451
2008-04-29 22:58:20 +00:00
John Criswell
a806bf2de1 Minor spelling and typo fixes.
llvm-svn: 50448
2008-04-29 22:12:40 +00:00
Owen Anderson
cc69e3444e Revert r50441. The original code was correct. Add some more comments so that I don't make the same mistake in the future.
llvm-svn: 50446
2008-04-29 21:51:00 +00:00
Owen Anderson
2caa79ae70 Fix a bug in memcpyopt where the memcpy-memcpy transform was never being applied because
we were checking for it in the wrong order.  This caused a miscompilation because the
return slot optimization assumes that the call it is dealing with is NOT a memcpy.

llvm-svn: 50444
2008-04-29 21:26:06 +00:00
Owen Anderson
8150660ba3 We should be returning true here since we've changed the function.
llvm-svn: 50442
2008-04-29 21:02:46 +00:00
Owen Anderson
9db9df7329 A lot of cleanups and documentation improvements, as well as a few corner case fixes. Most
of this was suggested by Chris.

llvm-svn: 50441
2008-04-29 20:59:33 +00:00
Owen Anderson
5b7928f3d2 Rename DeadLoopElimination to LoopDeletion, part 2.
llvm-svn: 50437
2008-04-29 20:06:54 +00:00
Owen Anderson
f9e11b8327 Rename DeadLoopElimination to LoopDeletion, part one.
llvm-svn: 50436
2008-04-29 19:58:07 +00:00
Anton Korobeynikov
2dca0c7323 Don't do stupid things: doInitialization(Module&) is not applicable to ModulePass :)
llvm-svn: 50433
2008-04-29 18:16:22 +00:00
Chris Lattner
5bd55b0885 don't eliminate load from volatile value on paths where the load is dead.
This fixes the second half of PR2262

llvm-svn: 50430
2008-04-29 17:28:22 +00:00
Chris Lattner
4b5d48a3f0 make this test reduced and *valid*
llvm-svn: 50429
2008-04-29 17:25:32 +00:00
Chris Lattner
7099f3c400 fix a subtle volatile handling bug.
llvm-svn: 50428
2008-04-29 17:13:43 +00:00
Roman Levenstein
35f24acb46 Use std::set instead of std::priority_queue for the RegReductionPriorityQueue.
This removes the existing bottleneck related to the removal of elements from 
the middle of the queue.

Also fixes a subtle bug in ScheduleDAGRRList::CapturePred:
It was updating the state of the SUnit before removing it. As a result, the
comparison operators were working incorrectly and this SUnit could not be removed 
from the queue properly.

Reviewed by Evan and Dan. Approved by Dan.

llvm-svn: 50412
2008-04-29 09:07:59 +00:00
Chris Lattner
5e47b186a7 Implement more aggressive support for analyzing string length. This
generalizes the previous code to handle the case when the string is not
an immediate to the strlen call (for example, crazy stuff like 
strlen(c ? "foo" : "bart"+1) -> 3).  This implements 
gcc.c-torture/execute/builtins/strlen-2.c.  I will generalize other
cases in simplifylibcalls to use the same routine later.

llvm-svn: 50408
2008-04-29 06:56:02 +00:00
Owen Anderson
dc1c838b4d Clarify what we mean by a dead loop.
llvm-svn: 50406
2008-04-29 06:34:55 +00:00