1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

38421 Commits

Author SHA1 Message Date
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
Chris Lattner
b3972afe89 new testcase for PR2094. The inline asms should not pin allocas to the
stack anymore.

llvm-svn: 50397
2008-04-29 05:53:29 +00:00
Chris Lattner
51fe8415da don't delete the last store to an alloca if the store is volatile.
llvm-svn: 50390
2008-04-29 04:58:38 +00:00
Chris Lattner
0f63b8fecc make the vector conversion magic handle multiple results.
We now compile test2/test3 to:

_test2:
	## InlineAsm Start
	set %xmm0, %xmm1
	## InlineAsm End
	addps	%xmm1, %xmm0
	ret
_test3:
	## InlineAsm Start
	set %xmm0, %xmm1
	## InlineAsm End
	paddd	%xmm1, %xmm0
	ret

as expected.

llvm-svn: 50389
2008-04-29 04:48:56 +00:00
Chris Lattner
e75d09711d add support for multiple return values in inline asm. This is a step
towards PR2094.  It now compiles the attached .ll file to:

_sad16_sse2:
	movslq	%ecx, %rax
	## InlineAsm Start
	%ecx %rdx %rax %rax %r8d %rdx %rsi
	## InlineAsm End
	## InlineAsm Start
	set %eax
	## InlineAsm End
	ret

which is pretty decent for a 3 output, 4 input asm.

llvm-svn: 50386
2008-04-29 04:29:54 +00:00
Evan Cheng
381b094a2b Another extract_subreg coalescing bug.
e.g.
vr1024<2> extract_subreg vr1025, 2
If vr1024 do not have the same register class as vr1025, it's not safe to coalesce this away. For example, vr1024 might be a GPR32 while vr1025 might be a GPR64.

llvm-svn: 50385
2008-04-29 01:41:44 +00:00
Owen Anderson
45b160745b Add some more comments.
llvm-svn: 50384
2008-04-29 00:45:15 +00:00
Owen Anderson
e0f9e8446b Remove debugging code.
llvm-svn: 50383
2008-04-29 00:39:24 +00:00
Owen Anderson
4cc52fd657 Add dead loop elimination, which removes dead loops for which we can compute
the trip count.

llvm-svn: 50382
2008-04-29 00:38:34 +00:00
Evan Cheng
8696eb18c1 Add -march=x86.
llvm-svn: 50380
2008-04-28 23:31:41 +00:00
Dan Gohman
fa033a0fbd Update and_ops.ll according to the recent dagcombiner changes.
Add a new test, and_ops_more.ll, which is XFAIL'd, to
record the parts of and_ops.ll that were affected by this
change.

llvm-svn: 50379
2008-04-28 23:26:22 +00:00
Evan Cheng
3167c716f2 Test case.
llvm-svn: 50377
2008-04-28 22:14:34 +00:00
Evan Cheng
a2e4ffcd8a Fix a bug in RegsForValue::getCopyToRegs() that causes cyclical scheduling units. If it's creating multiple CopyToReg nodes that are "flagged" together, it should not create a TokenFactor for it's chain outputs:
c1, f1 = CopyToReg                                                                                                                                                                                             
c2, f2 = CopyToReg                                                                                                                                                                                             
c3     = TokenFactor c1, c2                                                                                                                                                                                    
 ...                                                                                                                                                                                                                      
       = user c3, ..., f2

Now that the two CopyToReg's and the user are "flagged" together. They effectively forms a single scheduling unit. The TokenFactor is now both an operand and a successor of the Flagged nodes.

llvm-svn: 50376
2008-04-28 22:07:13 +00:00
Anton Korobeynikov
a2edd9607f Correct parameter attributes encoding for C bindings.
Patch by Anders Johnsen!

llvm-svn: 50375
2008-04-28 21:48:04 +00:00
Anton Korobeynikov
ce2ed94866 Add possibility of using arbitrary to to execute stuff from bugpoint.
Patch by Pekka Jääskeläinen!

llvm-svn: 50373
2008-04-28 20:53:48 +00:00
Dan Gohman
e921f90c15 Fix a pointer-arithmetic bug that caused 64-bit host pointer values to
be truncated to 32 bits. This fixes the recent Benchmarks/McCat/09-vor
regression on x86-64, among other things.

llvm-svn: 50372
2008-04-28 20:25:15 +00:00
Dan Gohman
9e4db7f0bd Fix DSE to not eliminate volatile loads with no uses.
llvm-svn: 50370
2008-04-28 19:51:27 +00:00
Dale Johannesen
08671c6cac Don't try to convert PPC long double.
llvm-svn: 50369
2008-04-28 19:46:58 +00:00
Dan Gohman
6df962bf9a Evan pointed out that folding sext to zext may not be correct
if the zext is not legal.

llvm-svn: 50368
2008-04-28 18:47:17 +00:00
Dan Gohman
d67d878df0 Delete an unused constructor.
llvm-svn: 50367
2008-04-28 18:28:49 +00:00
Dan Gohman
733bb3e992 Add a comment to CreateRegForValue that clarifies the handling of
aggregate types.

llvm-svn: 50366
2008-04-28 18:19:43 +00:00
Dan Gohman
2f0476499c Rewrite the comments for RegsForValue and its members, and
reorder some of the members for clarity.

llvm-svn: 50365
2008-04-28 18:10:39 +00:00
Ted Kremenek
fd04109260 Add more alignment enums.
llvm-svn: 50363
2008-04-28 17:58:20 +00:00
Ted Kremenek
f1304a3762 Bug fix in BumpPtrAllocator: don't assume that all objects have the same alignment. "Bump" of the pointer for the next allocated object to be of the specified alignment.
llvm-svn: 50362
2008-04-28 17:58:07 +00:00
Dan Gohman
5d36cd74b0 Don't call size() on each iteration of the loop.
llvm-svn: 50361
2008-04-28 17:42:03 +00:00
Gordon Henriksen
0b2f0d3007 Expose parameter attributes via C bindings.
Patch by Anders Johnsen!

llvm-svn: 50360
2008-04-28 17:37:06 +00:00
Dan Gohman
0285c1e9bb Fix the SVOffset values for loads and stores produced by
memcpy/memset expansion. It was a bug for the SVOffset value
to be used in the actual address calculations.

llvm-svn: 50359
2008-04-28 17:15:20 +00:00
Dan Gohman
1b7238e6e4 Teach InstCombine's ComputeMaskedBits what SelectionDAG's
ComputeMaskedBits knows about cttz, ctlz, and ctpop. Teach
SelectionDAG's ComputeMaskedBits what InstCombine's knows
about SRem. And teach them both some things about high bits
in Mul, UDiv, URem, and Sub. This allows instcombine and
dagcombine to eliminate sign-extension operations in
several new cases.

llvm-svn: 50358
2008-04-28 17:02:21 +00:00
Dan Gohman
389a3ff9c7 Teach DAGCombine to convert (sext x) to (zext x) when the
sign-bit of x is known to be zero.

llvm-svn: 50357
2008-04-28 16:58:24 +00:00
Mikhail Glushenkov
4c358b3125 Add support for response files to the CommandLine library.
llvm-svn: 50355
2008-04-28 16:44:25 +00:00
Anton Korobeynikov
54791c2a43 Fix FP return for Win64 ABI
llvm-svn: 50342
2008-04-28 07:40:07 +00:00