Commit Graph

15459 Commits

Author SHA1 Message Date
Owen Anderson
9ccaf53ada Don't use PassInfo* as a type identifier for passes. Instead, use the address of the static
ID member as the sole unique type identifier.  Clean up APIs related to this change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110396 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05 23:42:04 +00:00
Dan Gohman
7365c091f9 Remove IntrWriteMem, as it's the default. Rename IntrWriteArgMem
to IntrReadWriteArgMem, as it's for reading as well as writing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110395 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05 23:36:21 +00:00
Bruno Cardoso Lopes
ac09835a22 Support very basic (doesn't include ABI support in the front-end, varags, ...) 256-bit argument passing and return for AVX
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110394 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05 23:35:51 +00:00
Eric Christopher
505656c6a2 Handle the memory barrier pseudo that goes to nothing for the JIT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110371 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05 20:04:36 +00:00
Eric Christopher
da93b2cb8f Set hasSideEffects on the 64-bit no-sse memory barrier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110369 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05 19:54:59 +00:00
Jim Grosbach
e3ede5e2e4 For local variables in functions with a frame pointer, use FP as a base
register for local access when it's closer to the stack slot being refererenced
than the stack pointer. Make sure to take into account any argument frame
SP adjustments that are in affect at the time.

rdar://8256090


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110366 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05 19:27:37 +00:00
Bob Wilson
751aaf8ac5 Fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110363 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05 19:00:21 +00:00
Bob Wilson
a1d410d512 Add an ARM RSCrr instruction for disassembly only.
Partial fix for PR7792.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110361 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05 18:59:36 +00:00
Eric Christopher
280f96c508 Be a little bit more specific about target for the memory barrier
instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110360 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05 18:36:20 +00:00
Eric Christopher
c34ea3770e Handle the pseudo in MCInstLower.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110359 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05 18:34:30 +00:00
Bob Wilson
cff7178844 Add an ARM RSBrr instruction for disassembly only.
Partial fix for PR7792.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110358 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05 18:23:43 +00:00
Chandler Carruth
a7da3ac14a Silence a GCC warning about && and || without explicit parentheses. This
preserves the existing behavior, as it seems a concious choice to allow RS to
be null and BigStack marked true.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110307 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05 03:04:21 +00:00
Bob Wilson
1d9125a6ff ARM "rrx" shift operands do not have an immediate. PR7790.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110292 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05 00:34:42 +00:00
Eric Christopher
b6729dc0ef Make x86-64 membarriers work without sse and clean up some of the
uses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110274 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-04 23:03:04 +00:00
Jim Grosbach
abf7bdffd6 and back in. false alarm on the tests from another unrelated local change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110269 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-04 22:46:09 +00:00
Eli Friedman
7752442bfa PR7814: Truncates cannot be ignored for signed comparisons.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110268 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-04 22:40:58 +00:00
Devang Patel
59135f49e1 Implement target specific getDebugValueLocation().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110267 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-04 22:39:39 +00:00
Jim Grosbach
87c0175cce oops. revert for a moment to clean up tests first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110259 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-04 22:12:43 +00:00
Jim Grosbach
936ed5424c Reserve a stack slot if the function adjusts the stack but doesn't
simplify the call frame pseudo instructions. In that situation, the
calculations for estimating the stack size will be way off, leading to
not having an emergency spill slot when we need one. It should be possible
to be more precise about tracking the adjustment values, but not really
necessary for correctness. Upcoming cleanups for PEI in general will
render that moot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110258 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-04 22:10:15 +00:00
Devang Patel
40e0bad331 Implement target specific getDebugValueLocation().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110256 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-04 22:07:50 +00:00
Torok Edwin
0e3a1a8f8f Use indirect calls in PowerPC JIT.
See PR5201. There is no way to know if direct calls will be within the allowed
range for BL. Hence emit all calls as indirect when in JIT mode.
Without this long-running applications will fail to JIT on PowerPC with a
relocation failure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110246 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-04 20:47:44 +00:00
Dale Johannesen
a54db0c485 Remove switch for disabling ARM tail calls. They
seem to be working correctly.  No functional change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110226 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-04 18:07:17 +00:00
Devang Patel
5c1d941f00 Add DEBUG message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110224 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-04 18:06:05 +00:00
Benjamin Kramer
56d23947ca Enable COFF writer on mingw32 and cygwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110200 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-04 15:32:40 +00:00
Kalle Raiskila
bc2697cca0 Make SPU backend handle insertelement and
store for "half vectors"


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110198 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-04 13:59:48 +00:00
Benjamin Kramer
c575283675 Print an error message when someone tries -integrated-as on an unsupported target.
- The COFF backend doesn't support MingW/Cygwin at the moment, it'll report an
  error, but it's still much better than random assertions from the MachO backend.
- We want to make ELF the default eventually, it's what the majority of targets use.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110197 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-04 13:16:30 +00:00
Gabor Greif
ac27ec0f5b by Alexander Herz:
"The CWriter::GetValueName() method does not check if a value as an alias 
and emits the alias name which will never be defined in the output .c 
file (so the output file fails to compile). This can happen if you have 
multiple inheritance with several destructors defined by clang (...D0Ev, 
...D1Ev, ...D2Ev)."

-- applied with minor tweaks. Thanks!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110194 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-04 10:00:52 +00:00
Bob Wilson
67b453b0d1 Combine NEON VABD (absolute difference) intrinsics with ADDs to make VABA
(absolute difference with accumulate) intrinsics.  Radar 8228576.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110170 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-04 00:12:08 +00:00
Chris Lattner
656f6800b2 fix a win64 encoding problem, patch by Cameron Esfahani!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110164 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-03 22:49:22 +00:00
Nate Begeman
d1fb583128 Add support for getting & setting the FPSCR application register on ARM when VFP is enabled.
Add support for using the FPSCR in conjunction with the vcvtr instruction, for controlling fp to int rounding.
Add support for the FLT_ROUNDS_ node now that the FPSCR is exposed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110152 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-03 21:31:55 +00:00
Oscar Fuentes
efb59d28c5 CMake: Change somme target library names:
XCore->XCoreGen
PIC16->PIC16CodeGen

After updating your working copy, the first build will fail because it
is using the old library dependencies. Start the build again and it
will work fine.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110127 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-03 17:40:31 +00:00
Kalle Raiskila
e1c9159f63 More SPU v2f32 stuff added: insertelement and shuffle.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110038 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-02 11:22:10 +00:00
Kalle Raiskila
c9fda996fc Add preliminary v2f32 support for SPU. Like with v2i32, we just
duplicate the instructions and operate on half vectors. 

Also reorder code in SPUInstrInfo.td for better coherency.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110037 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-02 10:25:47 +00:00
Kalle Raiskila
82fe467ca5 Add preliminary v2i32 support for SPU backend. As there are no
such registers in SPU, this support boils down to "emulating" 
them by duplicating instructions on the general purpose registers. 

This adds the most basic operations on v2i32: passing parameters,
addition, subtraction, multiplication and a few others.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110035 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-02 08:54:39 +00:00
Eli Friedman
e3837014d6 PR7781: Fix incorrect shifting in PPCTargetLowering::LowerBUILD_VECTOR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109998 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-02 00:18:19 +00:00
Eli Friedman
348e02600e PR7774: Fix undefined shifts in Alpha backend. As a bonus, this actually
improves the generated code in some cases.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109985 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-01 21:13:28 +00:00
Daniel Dunbar
425f634917 Silence some -Asserts uninitialized variable warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109956 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-31 21:08:54 +00:00
Michael J. Spencer
0cd1ee2308 MC: Remove HasAbsolutizedSet from WindowsX86AsmBackend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109949 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-31 07:21:44 +00:00
Bob Wilson
d4d188e502 Move newlines before inline jumptables from the asm strings in .td files to
the jtblock_operand print methods.  This avoids extra newlines in the
disassembler's output.  PR7757.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109948 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-31 06:28:10 +00:00
Michael J. Spencer
e2195d8b35 Add relax all support to the COFF object streamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109947 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-31 06:22:29 +00:00
Bob Wilson
98e1479575 Add support for disassembling VMVN (immediate) instructions. PR7747.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109946 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-31 05:57:44 +00:00
Evan Cheng
a2c519bd0b Add -disable-shifter-op to disable isel of shifter ops. On Cortex-a9 the shifts cost extra instructions so it might be better to emit them separately to take advantage of dual-issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109934 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-30 23:33:54 +00:00
Bob Wilson
70a4e3c532 Add a check in the ARM disassembler for NEON instructions that would
reference registers past the end of the NEON register file, and report them
as invalid instead of asserting when trying to print them.  PR7746.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109933 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-30 23:27:59 +00:00
Dale Johannesen
38cb1381b5 PPC doesn't supported VLA with large alignment. This was
formerly rejected by the FE, so asserted in the BE; now the FE only
warns, so we treat it as a legitimate fatal error in PPC BE.
This means the test for the feature won't pass, so it's xfail'd.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109892 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-30 21:09:48 +00:00
Bob Wilson
63db594559 Add the __TEXT,__StaticInit section to the list of sections emitted at the
beginning on ARM Darwin assembly files so that it won't be placed after
debug sections.  Radar 8252813.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109879 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-30 19:55:47 +00:00
Bruno Cardoso Lopes
98f985607b Support all 128-bit AVX vector intrinsics. Most part of them I already
declared during the addition of the assembler support, the additional
changes are:
- Add missing intrinsics
- Move all SSE conversion instructions in X86InstInfo64.td to the SSE.td file.
- Duplicate some patterns to AVX mode.
- Step into PCMPEST/PCMPIST custom inserter and add AVX versions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109878 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-30 19:54:33 +00:00
Bruno Cardoso Lopes
5b7dab83e9 Fix typo!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109877 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-30 19:41:24 +00:00
Jim Grosbach
6ccfc507dc Many Thumb2 instructions can reference the full ARM register set (i.e.,
have 4 bits per register in the operand encoding), but have undefined
behavior when the operand value is 13 or 15 (SP and PC, respectively).
The trivial coalescer in linear scan sometimes will merge a copy from
SP into a subsequent instruction which uses the copy, and if that
instruction cannot legally reference SP, we get bad code such as:
  mls r0,r9,r0,sp
instead of:
  mov r2, sp
  mls r0, r9, r0, r2

This patch adds a new register class for use by Thumb2 that excludes
the problematic registers (SP and PC) and is used instead of GPR
for those operands which cannot legally reference PC or SP. The
trivial coalescer explicitly requires that the register class
of the destination for the COPY instruction contain the source
register for the COPY to be considered for coalescing. This prevents
errant instructions like that above.

PR7499




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109842 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-30 02:41:01 +00:00
Nate Begeman
0e0a20eb38 Add builtins for ssat/usat, similar to RealView's __ssat and __usat intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109813 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 22:48:09 +00:00
Bob Wilson
3d5792a5aa Refactor ARM-specific DAG combining in preparation for adding some more
transformations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109800 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 20:34:14 +00:00