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

64866 Commits

Author SHA1 Message Date
Chris Lattner
b227ae4ddb reimplement support for GS and FS relative address space matching
by having X86DAGToDAGISel::SelectAddr get passed in the parent node
of the operand match (the load/store/atomic op) and having it get
the address space from that, instead of having special FS/GS addr
mode operations that require duplicating the entire instruction set
to support.

This makes FS and GS relative accesses *far* more predictable and
work much better.  It also simplifies the X86 backend a bit, more
to come.

There is still a pending issue with nodes like ISD::PREFETCH and
X86ISD::FLD, which really should be MemSDNode's but aren't.

llvm-svn: 114491
2010-09-21 22:07:31 +00:00
John Thompson
5c363e0ebf Fixed pr20314-2.c failure, added E, F, p constraint letters.
llvm-svn: 114490
2010-09-21 22:04:54 +00:00
Chris Lattner
6543dacfac Rework passing parent pointers into complexpatterns, I forgot
that complex patterns are matched after the entire pattern has
a structural match, therefore the NodeStack isn't in a useful
state when the actual call to the matcher happens.

llvm-svn: 114489
2010-09-21 22:00:25 +00:00
Bob Wilson
a22747a563 Move a sign-extend or a zero-extend of a load to the same basic block as the
load when the type of the load is not legal, even if truncates are not free.
The load is going to be legalized to an extending load anyway.

llvm-svn: 114488
2010-09-21 21:54:27 +00:00
Bob Wilson
064f6a1a3d Clarify a comment.
llvm-svn: 114487
2010-09-21 21:44:14 +00:00
Dan Gohman
008676d2ee Add some utility routines.
llvm-svn: 114483
2010-09-21 21:20:13 +00:00
Devang Patel
904f538a7a Add insertAfter. This should have accompanied previous check-in.
llvm-svn: 114481
2010-09-21 21:10:42 +00:00
Devang Patel
a6b9c79c24 If only user of a vreg is an copy instruction to export copy of vreg out of current basic block then insert DBG_VALUE so that debug value of the variable is also transfered to new vreg.
Testcase is in r114476.
This fixes radar 8412415.

llvm-svn: 114478
2010-09-21 20:56:33 +00:00
Devang Patel
53b709a85c Use FileCheck
llvm-svn: 114475
2010-09-21 20:50:32 +00:00
Chris Lattner
7798a97041 correct this logic.
llvm-svn: 114474
2010-09-21 20:46:40 +00:00
Owen Anderson
f6dd8e7f5c Reimplement r114460 in target-independent DAGCombine rather than target-dependent, by using
the predicate to discover the number of sign bits.  Enhance X86's target lowering to provide
a useful response to this query.

llvm-svn: 114473
2010-09-21 20:42:50 +00:00
Chris Lattner
a911c9ed3a just like they can opt into getting the root of the pattern being
matched, allow ComplexPatterns to opt into getting the parent node
of the operand being matched.

llvm-svn: 114472
2010-09-21 20:37:12 +00:00
Chris Lattner
55043ef46a fix a long standing wart: all the ComplexPattern's were being
passed the root of the match, even though only a few patterns
actually needed this (one in X86, several in ARM [which should
be refactored anyway], and some in CellSPU that I don't feel 
like detangling).   Instead of requiring all ComplexPatterns to
take the dead root, have targets opt into getting the root by
putting SDNPWantRoot on the ComplexPattern.

llvm-svn: 114471
2010-09-21 20:31:19 +00:00
Jakob Stoklund Olesen
cb8f334578 Refix MSVC9 and upper_bound. It actually needs a fully symmetric comparator.
llvm-svn: 114469
2010-09-21 20:16:12 +00:00
Chris Lattner
c153d48869 even though I'm about to rip it out, simplify the address mode stuff
llvm-svn: 114468
2010-09-21 19:41:58 +00:00
Chris Lattner
32ec32b690 finish pushing MachinePointerInfo through selectiondags. At this point,
I think I've audited all uses, so it should be dependable for address spaces,
and the pointer+offset info should also be accurate when there.

llvm-svn: 114464
2010-09-21 18:58:22 +00:00
Chris Lattner
3dde58c15a convert a couple more places to use the new getStore()
llvm-svn: 114463
2010-09-21 18:51:21 +00:00
Chris Lattner
8cdc5e75f7 update a bunch of code to use the MachinePointerInfo version of getStore.
llvm-svn: 114461
2010-09-21 18:41:36 +00:00
Owen Anderson
97a8fdc19c When adding the carry bit to another value on X86, exploit the fact that the carry-materialization
(sbbl x, x) sets the registers to 0 or ~0.  Combined with two's complement arithmetic, we can fold
the intermediate AND and the ADD into a single SUB.

This fixes <rdar://problem/8449754>.

llvm-svn: 114460
2010-09-21 18:41:19 +00:00
Jakob Stoklund Olesen
d09d4a9693 Don't pollute the global namespace.
llvm-svn: 114459
2010-09-21 18:34:17 +00:00
Jakob Stoklund Olesen
375867aa60 MSVC9 does not support upper_bound with an asymmetric comparator.
llvm-svn: 114455
2010-09-21 18:24:30 +00:00
Bob Wilson
c4345abcc0 Define the TargetLowering::getTgtMemIntrinsic hook for ARM so that NEON load
and store intrinsics are represented with MemIntrinsicSDNodes.

llvm-svn: 114454
2010-09-21 17:56:22 +00:00
Chris Lattner
5f584efd31 eliminate some uses of the getStore overload.
llvm-svn: 114453
2010-09-21 17:50:43 +00:00
Chris Lattner
86b3f287ce eliminate an old SelectionDAG::getTruncStore method, propagating
MachinePointerInfo around more.

llvm-svn: 114452
2010-09-21 17:42:31 +00:00
Chris Lattner
bf98f86fed eliminate last SelectionDAG::getLoad old entrypoint, on to stores.
llvm-svn: 114450
2010-09-21 17:28:52 +00:00
Chris Lattner
8af4fb7aed fix the code that infers SV info to be correct when dealing
with an indexed load/store that has an offset in the index.

llvm-svn: 114449
2010-09-21 17:24:05 +00:00
Jakob Stoklund Olesen
03451a0e51 Add LiveInterval::find and use it for most LiveRange searching operations
instead of calling lower_bound or upper_bound directly.

This cleans up the search logic a bit because {lower,upper}_bound compare
LR->start by default, and it is usually simpler to search LR->end.

Funnelling all searches through one function also makes it possible to replace
the search algorithm with something faster than binary search.

llvm-svn: 114448
2010-09-21 17:12:18 +00:00
Jakob Stoklund Olesen
73d2940daa Remove dead method.
llvm-svn: 114447
2010-09-21 17:12:15 +00:00
Chris Lattner
cdfd993df0 propagate MachinePointerInfo through various uses of the old
SelectionDAG::getExtLoad overload, and eliminate it.

llvm-svn: 114446
2010-09-21 17:04:51 +00:00
Jim Grosbach
32cfcf5bba Fix errant printing of [v]ldm instructions that aren't a pop
llvm-svn: 114445
2010-09-21 16:45:31 +00:00
Benjamin Kramer
98e1aab5a8 Simplify code.
llvm-svn: 114444
2010-09-21 16:41:29 +00:00
Chris Lattner
0d430648ae continue MachinePointerInfo'izing, eliminating use of one of the old
getLoad overloads.

llvm-svn: 114443
2010-09-21 16:36:31 +00:00
Chris Lattner
5c0bdf4543 convert dagcombine off the old form of getLoad. This fixes several bugs
with SVOffset computation.

llvm-svn: 114442
2010-09-21 16:08:50 +00:00
Benjamin Kramer
a81f2ba27e Make CreateComplexVariable independent of SmallVector.
llvm-svn: 114439
2010-09-21 16:00:03 +00:00
Chris Lattner
637762e6d1 simplify DAGCombiner::SimplifySelectOps step #2/2.
llvm-svn: 114437
2010-09-21 15:58:55 +00:00
Chris Lattner
e3616071c5 substantially reduce indentation and simplify DAGCombiner::SimplifySelectOps.
no functionality change (step #1)

llvm-svn: 114436
2010-09-21 15:46:59 +00:00
Mikhail Glushenkov
94fc12258f Trailing whitespace, 80-col violations.
llvm-svn: 114435
2010-09-21 14:59:50 +00:00
Mikhail Glushenkov
eacda4d1ca llvmc: split llvm_gcc_based into llvm_gcc_{pch,comp}_based.
llvm-svn: 114434
2010-09-21 14:59:47 +00:00
Mikhail Glushenkov
35e2ea68d2 llvmc: Allow multiple output languages.
llvm-svn: 114433
2010-09-21 14:59:42 +00:00
Mikhail Glushenkov
637b2871f8 Trailing whitespace.
llvm-svn: 114432
2010-09-21 14:59:34 +00:00
Lang Hames
f2e621dcb8 Fixed ambiguous call.
llvm-svn: 114431
2010-09-21 13:47:10 +00:00
Gabor Greif
324a43436f Fix buglet when the TST instruction directly uses the AND result.
I am unable to write a test for this case, help is solicited, though...
What I did is to tickle the code in the debugger and verify that we do the right thing.

llvm-svn: 114430
2010-09-21 13:30:57 +00:00
Lang Hames
eae68e1117 Added an additional PBQP problem builder which adds coalescing costs (both between pairs of virtuals, and between virtuals and physicals).
llvm-svn: 114429
2010-09-21 13:19:36 +00:00
Gabor Greif
99c07b1d95 Move the search for the appropriate AND instruction
into OptimizeCompareInstr.
This necessitates the passing of CmpValue around,
so widen the virtual functions to accomodate.

No functionality changes.

llvm-svn: 114428
2010-09-21 12:01:15 +00:00
Mikhail Glushenkov
2294629636 llvmc: put linker options in a separate OptList.
llvm-svn: 114427
2010-09-21 11:57:04 +00:00
Chris Lattner
b68bd70665 a few more trivial updates. This fixes PerformInsertVectorEltInMemory to not
pass a completely incorrect SrcValue, which would result in a miscompile with
combiner-aa.

llvm-svn: 114411
2010-09-21 07:32:19 +00:00
Chris Lattner
4320dda4fb convert the targets off the non-MachinePointerInfo of getLoad.
llvm-svn: 114410
2010-09-21 06:44:06 +00:00
Chris Lattner
1cad885bf7 add some accessors
llvm-svn: 114409
2010-09-21 06:43:24 +00:00
Chris Lattner
112cf9bc89 it's more elegant to put the "getConstantPool" and
"getFixedStack" on the MachinePointerInfo class.  While
this isn't the problem I'm setting out to solve, it is the
right way to eliminate PseudoSourceValue, so lets go with it.

llvm-svn: 114406
2010-09-21 06:22:23 +00:00
Chris Lattner
3496d7e718 ugh, missed a file.
llvm-svn: 114405
2010-09-21 06:16:40 +00:00