Commit Graph

70003 Commits

Author SHA1 Message Date
Bruno Cardoso Lopes
706d946cfe Add support for parsing dmb/dsb instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125055 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-07 22:09:15 +00:00
Devang Patel
480d1e3a67 Remove comment about an argument that was removed couple of years ago.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125054 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-07 21:58:52 +00:00
Bruno Cardoso Lopes
fafde7f0b7 Remove the MCR asm parser hack and start using the custom target specific asm
parsing of operands introduced in r125030. As a small note, besides using a more
generic approach we can also have more descriptive output when debugging
llvm-mc, example:

mcr  p7, #1, r5, c1, c1, #4

note: parsed instruction:
  ['mcr', <ARMCC::al>,
          <coprocessor number: 7>,
          1,
          <register 73>,
          <coprocessor register: 1>,
          <coprocessor register: 1>,
          4]



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125052 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-07 21:41:25 +00:00
Chris Lattner
eb59ca976c fix comment change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125047 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-07 20:03:14 +00:00
Bruno Cardoso Lopes
e7a54520b3 Implement support for custom target specific asm parsing of operands.
Motivation: Improve the parsing of not usual (different from registers or
immediates) operand forms.

This commit implements only the generic support. The ARM specific modifications
will come next.

A table like the one below is autogenerated for every instruction
containing a 'ParserMethod' in its AsmOperandClass

static const OperandMatchEntry OperandMatchTable[20] = {
 /* Mnemonic, Operand List Mask, Operand Class, Features */
 { "cdp", 29 /* 0, 2, 3, 4 */, MCK_Coproc, Feature_IsThumb|Feature_HasV6 },
 { "cdp", 58 /* 1, 3, 4, 5 */, MCK_Coproc, Feature_IsARM },

A matcher function very similar (but lot more naive) to
MatchInstructionImpl scans the table. After the mnemonic match, the
features are checked and if the "to be parsed" operand index is
present in the mask, there's a real match. Then, a switch like the one
below dispatch the parsing to the custom method provided in
'ParseMethod':

 case MCK_Coproc:
   return TryParseCoprocessorOperandName(Operands);




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125030 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-07 19:38:32 +00:00
David Greene
a5f2601e4d [AVX] Insert/extract subvector lowering support. This includes a
couple of utility functions that will be used in other places for more
AVX lowering.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125029 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-07 19:36:54 +00:00
Jason W Kim
c046d64f1b ARM/MC/ELF Lowercase .cpu attributes in .s, but make them uppercase in .o
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125025 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-07 19:07:11 +00:00
Evan Cheng
aa26102db4 Fix an obvious typo which caused an isel assertion. rdar://8964854.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125023 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-07 18:50:47 +00:00
Devang Patel
8c8d95d0c2 Reduce test case, smaller is better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125019 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-07 18:24:18 +00:00
Bob Wilson
1c3ef90cab Add codegen support for using post-increment NEON load/store instructions.
The vld1-lane, vld1-dup and vst1-lane instructions do not yet support using
post-increment versions, but all the rest of the NEON load/store instructions
should be handled now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125014 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-07 17:43:21 +00:00
Bob Wilson
7de6814405 Change VLD3/4 and VST3/4 for quad registers to not update the address register.
These operations are expanded to pairs of loads or stores, and the first one
uses the address register update to produce the address for the second one.
So far, the second load/store has also updated the address register, just
for convenience, since that output has never been used.  In anticipation of
actually supporting post-increment updates for these operations, this changes
the non-updating operations to use a non-updating load/store for the second
instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125013 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-07 17:43:15 +00:00
Bob Wilson
6eb08dd9bf Fix some NEON instruction itineraries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125012 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-07 17:43:12 +00:00
Bob Wilson
d3a076503b Fix a comment: addrmode6 no longer includes the optional writeback flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125011 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-07 17:43:09 +00:00
Bob Wilson
09989945e2 Remove inaccurate comments: so_imm and t2_so_imm operands are not encoded
until the instructions are emitted or printed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125010 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-07 17:43:06 +00:00
Bob Wilson
4e97e8ee57 Move code for OffsetCompare struct closer to where it is used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125009 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-07 17:43:03 +00:00
Chris Lattner
f067d584a8 implement .ll and .bc support for nsw/nuw on shl and exact on lshr/ashr.
Factor some code better.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125006 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-07 16:40:21 +00:00
Duncan Sands
163a84bbce Add an m_Div pattern for matching either a udiv or an sdiv and use it
to simplify the "(X/Y)*Y->X when the division is exact" transform.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125004 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-07 09:36:32 +00:00
Duncan Sands
1dbf0df996 Add IRBuilder methods for creating an exact udiv, like for exact sdiv.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125002 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-07 09:21:52 +00:00
Oscar Fuentes
cf9efa5966 Install only *.cmake files. Don't install .svn directory.
Fixes PR9159.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125001 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-07 02:22:23 +00:00
Jason W Kim
953a2a3dee Teach ARM/MC/ELF about gcc compatible reloc output to get past odd linkage
failures with relocations.

The code committed is a first cut at compatibility for emitted relocations in
ELF .o.

Why do this? because existing ARM tools like emitting relocs symbols as
explicit relocations, not as section-offset relocs.

Result is that with these changes,
1) relocs are now substantially identical what to gcc outputs.
2) larger apps (including many spec2k tests) compile, cross-link, and pass

Added reminder fixme to tests for future conversion to .s form.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124996 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-07 01:11:15 +00:00
Jason W Kim
f009a961ca Rework some .ARM.attribute work for improved gcc compatibility.
Unified EmitTextAttribute for both Asm and Obj emission (.cpu only)
Added necessary cortex-A8 related attrs for codegen compat tests.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124995 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-07 00:49:53 +00:00
Chris Lattner
c6ee9181a5 teach instsimplify to transform (X / Y) * Y to X
when the div is an exact udiv.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124994 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-06 22:05:31 +00:00
Chris Lattner
c35a44d3d7 rename test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124993 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-06 21:59:10 +00:00
Chris Lattner
35bda8914c enhance vmcore to know that udiv's can be exact, and add a trivial
instcombine xform to exercise this.

Nothing forms exact udivs yet though.  This is progress on PR8862



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124992 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-06 21:44:57 +00:00
Eric Christopher
bd75021465 Remove premature optimization that avoided calculating argument weights
if we weren't going to inline the function. The rest of the code using
this was removed.

Fixes PR9154.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124991 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-06 21:27:46 +00:00
Anders Carlsson
5d43ff4e7e Simplify test, as suggested by Chris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124990 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-06 20:22:49 +00:00
Anders Carlsson
9c93d48b6b Remove a virtual inheritance case that clang can devirtualize fully now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124989 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-06 20:16:49 +00:00
Anders Carlsson
6475d9434f When loading from a constant, fold inttoptr if the integer type and the resulting pointer type both have the same size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124987 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-06 20:11:56 +00:00
Oscar Fuentes
dd70cd8933 Don't define NDEBUG on MSVC_IDE and XCode builds. Fixes PR9155.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124985 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-06 19:07:06 +00:00
Nick Lewycky
39c33e3b63 Simplify away redundant test, and document what's going on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124977 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-06 05:04:00 +00:00
Nick Lewycky
d489332549 Remove specialized comparison of InlineAsm objects. They're uniqued on creation
now, and this wasn't comparing some of their relevant bits anyhow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124976 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-06 04:33:50 +00:00
Oscar Fuentes
5a858e3416 Moved more stuff to HandleLLVMOptions.cmake
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124968 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-05 19:08:42 +00:00
Anders Carlsson
479b4b9ef0 Fix another warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124961 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-05 18:33:43 +00:00
Anders Carlsson
15ec695e8a Fix a clang warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124960 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-05 18:19:35 +00:00
NAKAMURA Takumi
1f6832a858 Windows/DynamicLibrary.inc: Split explicit symbols into explicit_symbols.inc.
config.h.* have conditions whether each symbol is defined or not.
Autoconf and CMake may check symbols in libgcc.a for JIT on Mingw.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124950 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-05 15:11:53 +00:00
NAKAMURA Takumi
3f4be4fb86 Target/X86: Tweak allocating shadow area (aka home) on Win64. It must be enough for caller to allocate one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124949 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-05 15:11:32 +00:00
NAKAMURA Takumi
fb840c9117 lib/Target/X86/X86ISelLowering.cpp: Introduce a new variable "IsWin64". No functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124948 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-05 15:11:13 +00:00
NAKAMURA Takumi
9c7719e8b6 lib/Target/X86/X86JITInfo.cpp: Add Win64 stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124947 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-05 15:11:03 +00:00
NAKAMURA Takumi
2763538609 Target/X86: Fix whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124946 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-05 15:10:54 +00:00
NAKAMURA Takumi
0f0889e24b Windows/Program.inc: Quote arguments when dubious characters (used by cmd.exe or MSYS shell) are included to invoke CreateProcess(). Thanks to Danil Malyshev.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124945 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-05 08:53:12 +00:00
Bob Wilson
782b576749 Move a test that ended up in the wrong place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124933 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-05 04:15:50 +00:00
Andrew Trick
278ba1f9b6 Fix an anti-dep breaker corner case.
<rdar://problem/8959122> illegal register operands for UMULL instruction in cfrac nightly test
I'm stil working on a unit test, but the case is:
rx = movcc rx, r3
r2 = ldr
r2, r3 = umull r2, r2

The anti-dep breaker should not convert this into an illegal instruction:
r2, r2 = umull


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124932 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-05 02:58:46 +00:00
Eric Christopher
a818d031d5 Fix cut and paste error spotted by Jakob.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124930 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-05 02:48:47 +00:00
Jakob Stoklund Olesen
fe3f99f95c Be more strict about the first/last interference-free use.
If the interference overlaps the instruction, we cannot separate it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124918 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-05 01:06:39 +00:00
Jakob Stoklund Olesen
de71095a1a Add assertions to verify that the new interval is clear of the interference.
If these inequalities don't hold, we are creating a live range split that won't
allocate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124917 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-05 01:06:36 +00:00
Eric Christopher
4e8af6db18 Rewrite how the indirect call bonus is handled. This now works by:
a) Making it a per call site bonus for functions that we can move from
indirect to direct calls.
b) Reduces the bonus from 500 to 100 per call site.
c) Subtracts the size of the possible newly inlineable call from the
bonus to only add a bonus if we can inline a small function to devirtualize
it.

Also changes the bonus from a positive that's subtracted to a negative
that's added.

Fixes the remainder of rdar://8546196 by reducing the object file size
after inlining by 84%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124916 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-05 00:49:15 +00:00
David Greene
66c357dbc4 [AVX] Revert 124910 until clients are ready.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124912 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-05 00:24:41 +00:00
David Greene
ffc5533e7c [AVX] Add some utilities to insert and extract 128-bit subvectors.
This allows us to easily support 256-bit operations that don't have
native 256-bit support.  This applies to integer operations, certain
types of shuffles and various othher things.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124910 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-04 23:29:33 +00:00
Daniel Dunbar
5c228a945f MC/AsmMatcher: Sink ConvertToMCInst into the TargetAsmParser instance, which
implicitly allows custom conversions to be member functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124908 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-04 23:17:40 +00:00
Jakob Stoklund Olesen
45e53975f8 Apparently, it is possible for a block with a landing pad successor to have no calls.
In that case we simply ignore the landing pad and split live ranges before the
first terminator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124907 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-04 23:11:13 +00:00