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

311 Commits

Author SHA1 Message Date
Jim Grosbach
ca3006c171 EmitAtomicCmpSwap() custome inserter needs to delete the MI passed in. EmitAtomicBinary() already does this.
llvm-svn: 93479
2010-01-15 00:18:34 +00:00
Jakob Stoklund Olesen
97a8d154fb ARM "l" constraint for inline asm means R0-R7, also for Thumb2.
This is consistent with llvm-gcc's arm/constraints.md.

Certain instructions (e.g. CBZ, CBNZ) require a low register, even in Thumb2
mode.

llvm-svn: 93436
2010-01-14 18:19:56 +00:00
Jakob Stoklund Olesen
27e36e52f5 Fix pasto
llvm-svn: 93342
2010-01-13 19:54:39 +00:00
Bill Wendling
fc4c238bd5 Add more plumbing. This time in the LowerArguments and "get" functions which
return partial registers. This affected the back-end lowering code some.

Also patch up some places I missed before in the "get" functions.

llvm-svn: 91880
2009-12-22 02:10:19 +00:00
Evan Cheng
c46a0ba3fc Delete the instruction just before the function terminates for consistency sake.
llvm-svn: 91836
2009-12-21 19:53:39 +00:00
Rafael Espindola
4f903d4548 Fix libstdc++ build on ARM linux and part of PR5770.
MI was not being used but it was also not being deleted, so it was kept in the garbage list. The memory itself was freed once the function code gen was done.

Once in a while the codegen of another function would create an instruction on the same address. Adding it to the garbage group would work once, but when another pointer was added it would cause an assert as "Cache" was about to be pushed to Ts.

For a patch that make us detect problems like this earlier, take a look at

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20091214/092758.html

With that patch we assert as soon and the new instruction is added to the garbage set.

llvm-svn: 91691
2009-12-18 16:59:39 +00:00
Bob Wilson
a9f20f9f6e Handle ARM inline asm "w" constraints with 64-bit ("d") registers.
The change in SelectionDAGBuilder is needed to allow using bitcasts to convert
between f64 (the default type for ARM "d" registers) and 64-bit Neon vector
types.  Radar 7457110.

llvm-svn: 91649
2009-12-18 01:03:29 +00:00
Jim Grosbach
76d722dd6c nand atomic requires opposite operand ordering
llvm-svn: 91371
2009-12-15 00:12:35 +00:00
Jim Grosbach
09167e5bbb Add ARMv6 memory and sync barrier instructions
llvm-svn: 91329
2009-12-14 21:24:16 +00:00
Jim Grosbach
266c2d59e6 Thumb2 atomic operations
llvm-svn: 91321
2009-12-14 20:14:59 +00:00
Jim Grosbach
87975f6229 atomic binary operations up to 32-bits wide.
llvm-svn: 91260
2009-12-14 04:22:04 +00:00
Jim Grosbach
187ad02a4f Framework for atomic binary operations. The emitter for the pseudo instructions
just issues an error for the moment. The front end won't yet generate these
intrinsics for ARM, so this is behind the scenes until complete.

llvm-svn: 91200
2009-12-12 01:40:06 +00:00
Jim Grosbach
5a1c16e5bb Rough first pass at compare_and_swap atomic builtins for ARM mode. Work in progress.
llvm-svn: 91090
2009-12-11 01:42:04 +00:00
Jim Grosbach
be89da9845 Add memory barrier intrinsic support for ARM. Moving towards adding the atomic operations intrinsics.
llvm-svn: 91003
2009-12-10 00:11:09 +00:00
Evan Cheng
edcc21919f - Support inline asm 'w' constraint for 128-bit vector types.
- Also support the 'q' NEON registers asm code.

llvm-svn: 90894
2009-12-08 23:06:22 +00:00
Bob Wilson
b53c801366 Recognize canonical forms of vector shuffles where the same vector is used for
both source operands.  In the canonical form, the 2nd operand is changed to an
undef and the shuffle mask is adjusted to only reference elements from the 1st
operand.  Radar 7434842.

llvm-svn: 90417
2009-12-03 06:40:55 +00:00
Anton Korobeynikov
0f885eb7fd Materialize global addresses via movt/movw pair, this is always better
than doing the same via constpool:
1. Load from constpool costs 3 cycles on A9, movt/movw pair - just 2.
2. Load from constpool might stall up to 300 cycles due to cache miss.
3. Movt/movw does not use load/store unit.
4. Less constpool entries => better compiler performance.

This is only enabled on ELF systems, since darwin does not have needed
relocations (yet).

llvm-svn: 89720
2009-11-24 00:44:37 +00:00
Dan Gohman
b5ec39e2dc Remove ISD::DEBUG_LOC and ISD::DBG_LABEL, which are no longer used.
Note that "hasDotLocAndDotFile"-style debug info was already broken;
people wanting this functionality should implement it in the
AsmPrinter/DwarfWriter code.

llvm-svn: 89711
2009-11-23 23:20:51 +00:00
Devang Patel
327919890c We are not using DBG_STOPPOINT anymore.
llvm-svn: 89536
2009-11-21 02:46:55 +00:00
David Greene
58e7c6145b Add a bool flag to StackObjects telling whether they reference spill
slots.  The AsmPrinter will use this information to determine whether to
print a spill/reload comment.

Remove default argument values.  It's too easy to pass a wrong argument
value when multiple arguments have default values.  Make everything
explicit to trap bugs early.

Update all targets to adhere to the new interfaces..

llvm-svn: 87022
2009-11-12 20:49:22 +00:00
Evan Cheng
af90768b3c isLegalICmpImmediate should take a signed integer; code clean up.
llvm-svn: 86964
2009-11-12 07:13:11 +00:00
Evan Cheng
a11308742c Add TargetLowering::isLegalICmpImmediate. It tells LSR what immediate can be folded into target icmp instructions.
llvm-svn: 86858
2009-11-11 19:05:52 +00:00
Jim Grosbach
ea6c9c17f5 Use Unified Assembly Syntax for the ARM backend.
llvm-svn: 86494
2009-11-09 00:11:35 +00:00
Evan Cheng
aaf30ce699 Remove ARMPCLabelIndex from ARMISelLowering. Use ARMFunctionInfo::createConstPoolEntryUId() instead.
llvm-svn: 86294
2009-11-06 22:24:13 +00:00
Bob Wilson
7e071e14eb Revert previous change to a comment. The BlockAddresses go in the
constant pool so they don't get wrapped separately.

llvm-svn: 85844
2009-11-03 00:02:05 +00:00
Bob Wilson
3144715b53 Put BlockAddresses into ARM constant pools.
llvm-svn: 85824
2009-11-02 20:59:23 +00:00
Anton Korobeynikov
09147da530 Handle splats of undefs properly. This includes the testcase for PR5364 as well.
llvm-svn: 85767
2009-11-02 00:12:06 +00:00
Jim Grosbach
ace75c4288 Expand 64-bit logical shift right inline
llvm-svn: 85687
2009-10-31 21:42:19 +00:00
Jim Grosbach
16ae289667 Expand 64-bit arithmetic shift right inline
llvm-svn: 85685
2009-10-31 21:00:56 +00:00
Jim Grosbach
534d2cb249 Expand 64 bit left shift inline rather than using the libcall. For now, this
is unconditional. Making it still use the libcall when optimizing for size
would be a good adjustment.

llvm-svn: 85675
2009-10-31 19:38:01 +00:00
Evan Cheng
9178904e56 It's safe to remat t2LDRpci; Add PseudoSourceValue to load / store's to enable more machine licm. More changes coming.
llvm-svn: 85643
2009-10-31 03:39:36 +00:00
Bob Wilson
94d79c1f43 Fix a comment.
llvm-svn: 85610
2009-10-30 20:13:25 +00:00
Rafael Espindola
d4fadd76da This fixes functions like
void f (int a1, int a2, int a3, int a4, int a5,...)

In ARMTargetLowering::LowerFormalArguments if the function has 4 or
more regular arguments we used to set VarArgsFrameIndex using an
offset of 0, which is only correct if the function has exactly 4
regular arguments.

llvm-svn: 85590
2009-10-30 14:33:14 +00:00
Bob Wilson
95064e348a Add ARM codegen for indirect branches.
clang/test/CodeGen/indirect-goto.c runs! (unoptimized)

llvm-svn: 85577
2009-10-30 05:45:42 +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
Evan Cheng
1babe43881 Use fconsts and fconstd to materialize small fp constants.
llvm-svn: 85362
2009-10-28 01:44:26 +00:00
Bob Wilson
26a4580439 Most of the NEON shuffle instructions do not support 64-bit element types.
llvm-svn: 84785
2009-10-21 21:36:27 +00:00
Evan Cheng
275a09e55d Match more patterns to movt.
llvm-svn: 84751
2009-10-21 08:15:52 +00:00
Benjamin Kramer
dee347a8e8 Random #include pruning.
llvm-svn: 84632
2009-10-20 11:44:38 +00:00
Bob Wilson
60ffc7b6b9 Revert svn r80498 and replace it with a different solution. The only problem
I can see with the original code was that I forgot that this runs after
type legalization and hence the result type will always be i32. (Custom
legalization of EXTRACT_VECTOR_ELT is only enabled for vector types with
8- and 16-bit elements.)

Regarding the FIXME comment: any information about sign and zero-extension
should be captured by separate extension operations.  The DAG combiner should
handle those to produce either VGETLANEu or VGETLANEs, and that seems to be
working now.  If there are cases that we're missing, let me know.

llvm-svn: 84218
2009-10-15 23:12:05 +00:00
Bob Wilson
a98883deaa More Neon clean-up: avoid the need for custom-lowering vld/st-lane intrinsics
by creating TargetConstants during instruction selection instead of during
legalization.

llvm-svn: 84042
2009-10-13 22:29:24 +00:00
Bob Wilson
88df19e49a NEON VLD/VST are now fully implemented. For operations that expand to
multiple instructions, the expansion is done during selection so there is
no need to do anything special during legalization.

llvm-svn: 84036
2009-10-13 21:55:24 +00:00
Anton Korobeynikov
aba66ae89b Add PseudoSourceValues for constpool stuff on ELF (Darwin should use something similar)
and register spills.

llvm-svn: 83435
2009-10-07 00:06:35 +00:00
Evan Cheng
8cf9f56cca getFunctionAlignment should return log2 alignment.
llvm-svn: 83242
2009-10-02 06:57:25 +00:00
Anton Korobeynikov
829a3a18d2 ARM does not support offset folding (yet). Disable it for now.
This fixes PR5031. Unfortunately, there is no small testcase :(

llvm-svn: 82643
2009-09-23 19:04:09 +00:00
Evan Cheng
7714c8412d Fix PR4926. When target hook EmitInstrWithCustomInserter() insert new basic blocks and update CFG, it should also inform sdisel of the changes so the phi source operands will come from the right basic blocks.
llvm-svn: 82311
2009-09-19 09:51:03 +00:00
Evan Cheng
7cb9c456e5 Enhance EmitInstrWithCustomInserter() so target can specify CFG changes that sdisel will use to properly complete phi nodes.
Not functionality change yet.

llvm-svn: 82273
2009-09-18 21:02:19 +00:00
Bob Wilson
989568d935 Expand vector floating-point conversions not supported by NEON.
llvm-svn: 82074
2009-09-16 20:20:44 +00:00
Bob Wilson
8770c809c2 Expand some more vector operations not supported by Neon.
llvm-svn: 81969
2009-09-16 00:32:15 +00:00
Bob Wilson
c01a94dad0 Neon does not support vector divide or remainder. Expand them.
llvm-svn: 81966
2009-09-16 00:17:28 +00:00