oota-llvm.git
11 years agoAdd Support For .bss Named Section Directive For Darwin Targets.
Rafael Espindola [Wed, 2 Oct 2013 14:09:29 +0000 (14:09 +0000)]
Add Support For .bss Named Section Directive For Darwin Targets.

Patch by Nicholas White.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191824 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoEnable building LTO on WIN32.
Rafael Espindola [Wed, 2 Oct 2013 14:04:38 +0000 (14:04 +0000)]
Enable building LTO on WIN32.

Enable building the LTO library (.lib and.dll) and llvm-lto.exe on Windows with
MSVC and Mingw as well as re-enabling the associated test.

Patch by Greg Bedwell!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191823 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAVX-512: fixed a bug in getLoadStoreRegOpcode() for AVX-512 target
Elena Demikhovsky [Wed, 2 Oct 2013 12:20:42 +0000 (12:20 +0000)]
AVX-512: fixed a bug in getLoadStoreRegOpcode() for AVX-512 target

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191818 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoProgram.h: Fix \Note into \note. [-Wdocumentation]
NAKAMURA Takumi [Wed, 2 Oct 2013 08:14:38 +0000 (08:14 +0000)]
Program.h: Fix \Note into \note. [-Wdocumentation]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191815 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[DebugInfo] Further simplify DWARFDebugAranges public interface
Alexey Samsonov [Wed, 2 Oct 2013 07:12:47 +0000 (07:12 +0000)]
[DebugInfo] Further simplify DWARFDebugAranges public interface

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191813 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAVX-512: Added TB prefix to all instructions without prefixes,
Elena Demikhovsky [Wed, 2 Oct 2013 06:39:07 +0000 (06:39 +0000)]
AVX-512: Added TB prefix to all instructions without prefixes,
otherwise encoding fails after the last change in X86MCCodeEmitter.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191812 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDisable libc++ building by default with CMake with MSVC -- some bots
Chandler Carruth [Wed, 2 Oct 2013 06:25:57 +0000 (06:25 +0000)]
Disable libc++ building by default with CMake with MSVC -- some bots
aren't yet happy with this config.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191811 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoThis threads SectionName through the allocateCodeSection/allocateDataSection APIs...
Filip Pizlo [Wed, 2 Oct 2013 00:59:25 +0000 (00:59 +0000)]
This threads SectionName through the allocateCodeSection/allocateDataSection APIs, both in C++ and C land.
It's useful for the memory managers that are allocating a section to know what the name of the section is.
At a minimum, this is useful for low-level debugging - it's customary for JITs to be able to tell you what
memory they allocated, and as part of any such dump, they should be able to tell you some meta-data about
what each allocation is for.  This allows clients that supply their own memory managers to do this.
Additionally, we also envision the SectionName being useful for passing meta-data from within LLVM to an LLVM
client.

This changes both the C and C++ APIs, and all of the clients of those APIs within LLVM.  I'm assuming that
it's safe to change the C++ API because that API is allowed to change.  I'm assuming that it's safe to change
the C API because we haven't shipped the API in a release yet (LLVM 3.3 doesn't include the MCJIT memory
management C API).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191804 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDebug Info: In DIBuilder, the derived-from field of a DW_TAG_pointer_type
Manman Ren [Tue, 1 Oct 2013 23:45:54 +0000 (23:45 +0000)]
Debug Info: In DIBuilder, the derived-from field of a DW_TAG_pointer_type
is updated to use DITypeRef.

Move isUnsignedDIType and getOriginalTypeSize from DebugInfo.h to be static
helper functions in DwarfCompileUnit. We already have a static helper function
"isTypeSigned" in DwarfCompileUnit, and a pointer to DwarfDebug is added to
resolve the derived-from field. All three functions need to go across link
for derived-from fields, so we need to get hold of a type identifier map.

A pointer to DwarfDebug is also added to DbgVariable in order to resolve the
derived-from field.

Debug info verifier is updated to check a derived-from field is a TypeRef.
Verifier will not go across link for derived-from fields, in debug info finder,
we go across the link to add derived-from fields to types.

Function getDICompositeType is only used by dragonegg and since dragonegg does
not generate identifier for types, we use an empty map to resolve the
derived-from field.

When printing a derived-from field, we use DITypeRef::getName to either return
the type identifier or getName of the DIType.

A paired commit at clang is required due to changes to DIBuilder.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191800 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[llvm-c][Disassembler] Add an option to reproduce in disassembled output the
Quentin Colombet [Tue, 1 Oct 2013 22:14:56 +0000 (22:14 +0000)]
[llvm-c][Disassembler] Add an option to reproduce in disassembled output the
comments issued with verbose assembly.
E.g., on a vector shuffle operation, disassembled output are:
* Without the option:
vpshufd $-0x79, (%rsp), %xmm0

* With the option:
vpshufd $-0x79, (%rsp), %xmm0   ## xmm0 = mem[3,1,0,2]

This part of <rdar://problem/14687488>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191799 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove triple from type unique testing cases.
Manman Ren [Tue, 1 Oct 2013 20:27:56 +0000 (20:27 +0000)]
Remove triple from type unique testing cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191794 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoTry to fix native-arm bot
Manman Ren [Tue, 1 Oct 2013 20:23:12 +0000 (20:23 +0000)]
Try to fix native-arm bot

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191793 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDebug Info: remove duplication of DIEs when a DIE is part of the type system
Manman Ren [Tue, 1 Oct 2013 19:52:23 +0000 (19:52 +0000)]
Debug Info: remove duplication of DIEs when a DIE is part of the type system
and it is shared across CUs.

We add a few maps in DwarfDebug to map MDNodes for the type system to the
corresponding DIEs: MDTypeNodeToDieMap, MDSPNodeToDieMap, and
MDStaticMemberNodeToDieMap. These DIEs can be shared across CUs, that is why we
keep the maps in DwarfDebug instead of CompileUnit.

Sometimes, when we try to add an attribute to a DIE, the DIE is not yet added
to its owner yet, so we don't know whether we should use ref_addr or ref4.
We create a worklist that will be processed during finalization to add
attributes with the correct form (ref_addr or ref4).

We add addDIEEntry to DwarfDebug to be a wrapper around DIE->addValue. It checks
whether we know the correct form, if not, we update the worklist
(DIEEntryWorklist).

A testing case is added to show that we only create a single DIE for a type
MDNode and we use ref_addr to refer to the type DIE.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191792 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600: add a pass that merges clauses.
Vincent Lejeune [Tue, 1 Oct 2013 19:32:58 +0000 (19:32 +0000)]
R600: add a pass that merges clauses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191790 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600: Put PRED_X instruction in its own clause
Vincent Lejeune [Tue, 1 Oct 2013 19:32:49 +0000 (19:32 +0000)]
R600: Put PRED_X instruction in its own clause

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191789 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600: Enable -verify-machineinstrs in some tests.
Vincent Lejeune [Tue, 1 Oct 2013 19:32:38 +0000 (19:32 +0000)]
R600: Enable -verify-machineinstrs in some tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191788 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[MC] When MCInstPrint::printAnnotation uses a comment stream, it has to ensure
Quentin Colombet [Tue, 1 Oct 2013 19:21:24 +0000 (19:21 +0000)]
[MC] When MCInstPrint::printAnnotation uses a comment stream, it has to ensure
that each comment ends with a newline to match the definition in the header
file.

This is part of <rdar://problem/14687488>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191787 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDon't merge tiny functions.
Matt Arsenault [Tue, 1 Oct 2013 18:05:30 +0000 (18:05 +0000)]
Don't merge tiny functions.

It's silly to merge functions like these:

define void @foo(i32 %x) {
  ret void
}

define void @bar(i32 %x) {
  ret void
}

to get

define void @bar(i32) {
  tail call void @foo(i32 %0)
  ret void
}

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191786 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoReverts commit r190808 and r190556.
Rafael Espindola [Tue, 1 Oct 2013 17:40:47 +0000 (17:40 +0000)]
Reverts commit r190808 and r190556.

The use of these features in clang has been reverted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191785 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd test case for PR16785.
Preston Gurd [Tue, 1 Oct 2013 17:02:48 +0000 (17:02 +0000)]
Add test case for PR16785.

Thanks for Dimitry Andric, Rafael Espindola, and Benjamin Kramer
for providing and progressively reducing the test case!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191782 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[DebugInfo] Simplify and speedup .debug_aranges parsing
Alexey Samsonov [Tue, 1 Oct 2013 16:52:46 +0000 (16:52 +0000)]
[DebugInfo] Simplify and speedup .debug_aranges parsing

Parsing .debug_aranges section now takes O(nlogn) operations instead
of O(n^2), where "n" is the number of address ranges. With this change,
the time required to symbolize an address from a random large
Clang-generated binary drops from 165 seconds to 1.5 seconds.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191781 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFixing MCJIT multiple module linking for OSX
Andrew Kaylor [Tue, 1 Oct 2013 16:42:50 +0000 (16:42 +0000)]
Fixing MCJIT multiple module linking for OSX

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191780 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[DebugInfo] Further simplify DWARFDebugAranges. No functionality change.
Alexey Samsonov [Tue, 1 Oct 2013 16:25:14 +0000 (16:25 +0000)]
[DebugInfo] Further simplify DWARFDebugAranges. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191779 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[DebugInfo] Remove unused functions from DWARFDebugAranges and fix code style.
Alexey Samsonov [Tue, 1 Oct 2013 15:48:10 +0000 (15:48 +0000)]
[DebugInfo] Remove unused functions from DWARFDebugAranges and fix code style.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191778 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[SystemZ] Add comparisons of high words and memory
Richard Sandiford [Tue, 1 Oct 2013 15:00:44 +0000 (15:00 +0000)]
[SystemZ] Add comparisons of high words and memory

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191777 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[SystemZ] Add comparisons of large immediates using high words
Richard Sandiford [Tue, 1 Oct 2013 14:56:23 +0000 (14:56 +0000)]
[SystemZ] Add comparisons of large immediates using high words

There are no corresponding patterns for small immediates because they would
prevent the use of fused compare-and-branch instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191775 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[SystemZ] Add immediate addition involving high words
Richard Sandiford [Tue, 1 Oct 2013 14:53:46 +0000 (14:53 +0000)]
[SystemZ] Add immediate addition involving high words

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191774 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[SystemZ] Extend test-under-mask support to high GR32s
Richard Sandiford [Tue, 1 Oct 2013 14:41:52 +0000 (14:41 +0000)]
[SystemZ] Extend test-under-mask support to high GR32s

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191773 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[SystemZ] Extend 32-bit RISBG optimizations to high words
Richard Sandiford [Tue, 1 Oct 2013 14:36:20 +0000 (14:36 +0000)]
[SystemZ] Extend 32-bit RISBG optimizations to high words

This involves using RISB[LH]G, whereas the equivalent z10 optimization
uses RISBG.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191770 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[SystemZ] Extend pseudo conditional 8- and 16-bit stores to high words
Richard Sandiford [Tue, 1 Oct 2013 14:33:55 +0000 (14:33 +0000)]
[SystemZ] Extend pseudo conditional 8- and 16-bit stores to high words

As the comment says, we always want to use STOC for 32-bit stores.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191767 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoARM: support interrupt attribute
Tim Northover [Tue, 1 Oct 2013 14:33:28 +0000 (14:33 +0000)]
ARM: support interrupt attribute

This function-attribute modifies the callee-saved register list and function
epilogue (specifically the return instruction) so that a routine is suitable
for use as an interrupt-handler of the specified type without disrupting
user-mode applications.

rdar://problem/14207019

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191766 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[SystemZ] Add test missing from r191764.
Richard Sandiford [Tue, 1 Oct 2013 14:31:50 +0000 (14:31 +0000)]
[SystemZ] Add test missing from r191764.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191765 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[SystemZ] Optimize 32-bit FPR<->GPR moves for z196 and above
Richard Sandiford [Tue, 1 Oct 2013 14:31:11 +0000 (14:31 +0000)]
[SystemZ] Optimize 32-bit FPR<->GPR moves for z196 and above

Floats are stored in the high 32 bits of an FPR, and the only GPR<->FPR
transfers are full-register transfers.  This patch optimizes GPR<->FPR
float transfers when the high word of a GPR is directly accessible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191764 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd non-blocking Wait() for launched processes
Tareq A. Siraj [Tue, 1 Oct 2013 14:28:18 +0000 (14:28 +0000)]
Add non-blocking Wait() for launched processes

- New ProcessInfo class to encapsulate information about child processes.
- Generalized the Wait() to support non-blocking wait on child processes.
- ExecuteNoWait() now returns a ProcessInfo object with information about
  the launched child. Users will be able to use this object to
  perform non-blocking wait.
- ExecuteNoWait() now accepts an ExecutionFailed param that tells if execution
  failed or not.

These changes will allow users to implement basic process parallel
tools.

Differential Revision: http://llvm-reviews.chandlerc.com/D1728

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191763 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[SystemZ] Allow integer AND involving high words
Richard Sandiford [Tue, 1 Oct 2013 14:20:41 +0000 (14:20 +0000)]
[SystemZ] Allow integer AND involving high words

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191762 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[SystemZ] Allow integer XOR involving high words
Richard Sandiford [Tue, 1 Oct 2013 14:08:44 +0000 (14:08 +0000)]
[SystemZ] Allow integer XOR involving high words

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191759 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove several unused variables.
Rafael Espindola [Tue, 1 Oct 2013 13:32:03 +0000 (13:32 +0000)]
Remove several unused variables.

Patch by Alp Toker.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191757 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[SystemZ] Allow integer OR involving high words
Richard Sandiford [Tue, 1 Oct 2013 13:22:41 +0000 (13:22 +0000)]
[SystemZ] Allow integer OR involving high words

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191755 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[SystemZ] Allow integer insertions with a high-word destination
Richard Sandiford [Tue, 1 Oct 2013 13:18:56 +0000 (13:18 +0000)]
[SystemZ] Allow integer insertions with a high-word destination

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191753 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix a typo in the documentation. Thanks to Diana Vasile for the patch
Sylvestre Ledru [Tue, 1 Oct 2013 13:17:09 +0000 (13:17 +0000)]
Fix a typo in the documentation. Thanks to Diana Vasile for the patch

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191752 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[SystemZ] Allow selects with a high-word destination
Richard Sandiford [Tue, 1 Oct 2013 13:10:16 +0000 (13:10 +0000)]
[SystemZ] Allow selects with a high-word destination

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191751 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[SystemZ] Add patterns to load a constant into a high word (IIHF)
Richard Sandiford [Tue, 1 Oct 2013 13:02:28 +0000 (13:02 +0000)]
[SystemZ] Add patterns to load a constant into a high word (IIHF)

Similar to low words, we can use the shorter LLIHL and LLIHH if it turns
out that the other half of the GR64 isn't live.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191750 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[ARM] Remove an unused function from the disassembler.
Joey Gouly [Tue, 1 Oct 2013 13:01:10 +0000 (13:01 +0000)]
[ARM] Remove an unused function from the disassembler.

Pointed out by Joerg.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191749 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoTest commit. Updated comment.
Matheus Almeida [Tue, 1 Oct 2013 12:53:00 +0000 (12:53 +0000)]
Test commit. Updated comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191748 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[SystemZ] Add register zero extensions involving at least one high word
Richard Sandiford [Tue, 1 Oct 2013 12:49:07 +0000 (12:49 +0000)]
[SystemZ] Add register zero extensions involving at least one high word

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191746 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove empty directory.
Joerg Sonnenberger [Tue, 1 Oct 2013 12:42:48 +0000 (12:42 +0000)]
Remove empty directory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191745 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[ARM] Introduce the 'sevl' instruction in ARMv8.
Joey Gouly [Tue, 1 Oct 2013 12:39:11 +0000 (12:39 +0000)]
[ARM] Introduce the 'sevl' instruction in ARMv8.

This also removes the restriction on the immediate field of the 'hint'
instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191744 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[SystemZ] Add truncating high-word stores (STCH and STHH)
Richard Sandiford [Tue, 1 Oct 2013 12:22:49 +0000 (12:22 +0000)]
[SystemZ] Add truncating high-word stores (STCH and STHH)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191743 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[SystemZ] Add zero-extending high-word loads (LLCH and LLHH)
Richard Sandiford [Tue, 1 Oct 2013 12:19:08 +0000 (12:19 +0000)]
[SystemZ] Add zero-extending high-word loads (LLCH and LLHH)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191742 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSCEVExpander: Fix a regression I introduced by to eagerly adding RAII objects.
Benjamin Kramer [Tue, 1 Oct 2013 12:17:11 +0000 (12:17 +0000)]
SCEVExpander: Fix a regression I introduced by to eagerly adding RAII objects.

PR17425.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191741 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[SystemZ] Add sign-extending high-word loads (LBH and LHH)
Richard Sandiford [Tue, 1 Oct 2013 12:11:47 +0000 (12:11 +0000)]
[SystemZ] Add sign-extending high-word loads (LBH and LHH)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191740 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[SystemZ] Use upper words of GR64s for codegen
Richard Sandiford [Tue, 1 Oct 2013 11:26:28 +0000 (11:26 +0000)]
[SystemZ] Use upper words of GR64s for codegen

This just adds the basics necessary for allocating the upper words to
virtual registers (move, load and store).  The move support is parameterised
in a way that makes it easy to handle zero extensions, but the associated
zero-extend patterns are added by a later patch.

The easiest way of testing this seemed to be add a new "h" register
constraint for high words.  I don't expect the constraint to be useful
in real inline asms, but it should work, so I didn't try to hide it
behind an option.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191739 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[SystemZ] Reapply: Add definitions of LFH and STFH
Richard Sandiford [Tue, 1 Oct 2013 10:31:04 +0000 (10:31 +0000)]
[SystemZ] Reapply: Add definitions of LFH and STFH

Originally committed as r191661, but reverted because it changed the matching
order of comparisons on some hosts.  That should have been fixed by r191735.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191738 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[mips][msa] Added support for matching mod_[us] from normal IR (i.e. not intrinsics)
Daniel Sanders [Tue, 1 Oct 2013 10:22:35 +0000 (10:22 +0000)]
[mips][msa] Added support for matching mod_[us] from normal IR (i.e. not intrinsics)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191737 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix pattern sort in DAGISelEmitter.cpp
Richard Sandiford [Tue, 1 Oct 2013 09:49:01 +0000 (09:49 +0000)]
Fix pattern sort in DAGISelEmitter.cpp

The old code skipped one of the sorting criteria if either pattern had
no types.  This could lead to cycles of the form X < Y, Y < Z, Z < X.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191735 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoThis patch adds aliases for Mips sub instruction with immediate operands. Correspondi...
Vladimir Medic [Tue, 1 Oct 2013 09:48:56 +0000 (09:48 +0000)]
This patch adds aliases for Mips sub instruction with immediate operands. Corresponding test cases are added.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191734 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAVX-512: Added X86vzmovl patterns
Elena Demikhovsky [Tue, 1 Oct 2013 08:38:02 +0000 (08:38 +0000)]
AVX-512: Added X86vzmovl patterns

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191733 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove 0 as a valid encoding for the m-mmmm field.
Craig Topper [Tue, 1 Oct 2013 07:10:28 +0000 (07:10 +0000)]
Remove 0 as a valid encoding for the m-mmmm field.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191732 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove unneeded fields from disassembler internal instruction format.
Craig Topper [Tue, 1 Oct 2013 06:56:57 +0000 (06:56 +0000)]
Remove unneeded fields from disassembler internal instruction format.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191731 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoBEXTR should be defined to take same type for bother operands.
Craig Topper [Tue, 1 Oct 2013 03:48:26 +0000 (03:48 +0000)]
BEXTR should be defined to take same type for bother operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191728 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSelectionDAG: Clarify comments from r191600
Tom Stellard [Tue, 1 Oct 2013 02:09:00 +0000 (02:09 +0000)]
SelectionDAG: Clarify comments from r191600

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191724 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoTests for MCJIT multiple module support
Andrew Kaylor [Tue, 1 Oct 2013 01:48:36 +0000 (01:48 +0000)]
Tests for MCJIT multiple module support

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191723 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdding multiple module support for MCJIT.
Andrew Kaylor [Tue, 1 Oct 2013 01:47:35 +0000 (01:47 +0000)]
Adding multiple module support for MCJIT.

Tests to follow.

PIC with small code model and  EH frame handling will not work with multiple modules.  There are also some rough edges to be smoothed out for remote target support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191722 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd the DW_AT_GNU_ranges_base attribute if we've emitted any ranges
Eric Christopher [Tue, 1 Oct 2013 00:43:36 +0000 (00:43 +0000)]
Add the DW_AT_GNU_ranges_base attribute if we've emitted any ranges
into the debug_ranges section.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191721 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUpdate comments.
Eric Christopher [Tue, 1 Oct 2013 00:43:31 +0000 (00:43 +0000)]
Update comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191720 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix code duplication
Matt Arsenault [Tue, 1 Oct 2013 00:01:14 +0000 (00:01 +0000)]
Fix code duplication

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191716 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoForgot to add a break statement.
Preston Gurd [Mon, 30 Sep 2013 23:51:22 +0000 (23:51 +0000)]
Forgot to add a break statement.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191715 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUse CHECK-LABEL
Matt Arsenault [Mon, 30 Sep 2013 23:31:55 +0000 (23:31 +0000)]
Use CHECK-LABEL

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191713 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoReuse variable
Matt Arsenault [Mon, 30 Sep 2013 23:31:50 +0000 (23:31 +0000)]
Reuse variable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191712 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoThe X86FixupLEAs pass for Intel Atom must not call convertToThreeAddress
Preston Gurd [Mon, 30 Sep 2013 23:18:42 +0000 (23:18 +0000)]
The X86FixupLEAs pass for Intel Atom must not call convertToThreeAddress
on ADD16rr opcodes, if src1 != src, since that would cause
convertToThreeAddress to try to create a virtual register. This is not
permitted after register allocation, which is when the X86FixupLEAs pass
runs.

This patch fixes PR16785.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191711 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoThe DW_AT_GNU_pubnames/pubtypes attributes are actually form
Eric Christopher [Mon, 30 Sep 2013 23:14:16 +0000 (23:14 +0000)]
The DW_AT_GNU_pubnames/pubtypes attributes are actually form
SEC_OFFSET from the beginning of the section so go ahead and emit
a label at the beginning of each one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191710 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd llvm-readobj to the list of programs to find in the freshly built
Eric Christopher [Mon, 30 Sep 2013 21:55:01 +0000 (21:55 +0000)]
Add llvm-readobj to the list of programs to find in the freshly built
toolchain.

Patch by Richard Pennington.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191706 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix getOrInsertGlobal dropping the address space.
Matt Arsenault [Mon, 30 Sep 2013 21:23:03 +0000 (21:23 +0000)]
Fix getOrInsertGlobal dropping the address space.

Currently it will insert an illegal bitcast.
Arguably, the address space argument should be
added for the creation case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191702 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUse right address space size in InstCombineCompares
Matt Arsenault [Mon, 30 Sep 2013 21:11:01 +0000 (21:11 +0000)]
Use right address space size in InstCombineCompares

The test's output doesn't change, but this ensures
this is actually hit with a different address space.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191701 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoConstant fold ptrtoint + compare with address spaces
Matt Arsenault [Mon, 30 Sep 2013 21:06:18 +0000 (21:06 +0000)]
Constant fold ptrtoint + compare with address spaces

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191699 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDebug Info: constify and rename from generateRef to getRef.
Manman Ren [Mon, 30 Sep 2013 19:42:10 +0000 (19:42 +0000)]
Debug Info: constify and rename from generateRef to getRef.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191696 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agollvm-c: use typedef for function pointers
Anders Waldenborg [Mon, 30 Sep 2013 19:11:32 +0000 (19:11 +0000)]
llvm-c: use typedef for function pointers

This makes it consistent with other function pointers used in llvm-c

Differential Revision: http://llvm-reviews.chandlerc.com/D1712

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191693 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[ARM] Fix Thumb(-2) diagnostic tests.
Tilmann Scheller [Mon, 30 Sep 2013 18:50:51 +0000 (18:50 +0000)]
[ARM] Fix Thumb(-2) diagnostic tests.

Changing the diagnostic message for out of range branch targets in 191686 broke the tests.

The diagnostic message for out of range branch targets was changed to be more consistent with the other diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191691 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoTBAA: update tbaa format from scalar format to struct-path aware format.
Manman Ren [Mon, 30 Sep 2013 18:17:55 +0000 (18:17 +0000)]
TBAA: update tbaa format from scalar format to struct-path aware format.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191690 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoTBAA: remove !tbaa from testing cases when they are not needed.
Manman Ren [Mon, 30 Sep 2013 18:17:35 +0000 (18:17 +0000)]
TBAA: remove !tbaa from testing cases when they are not needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191689 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[mips][msa] Direct Object Emission for I8 instructions.
Jack Carter [Mon, 30 Sep 2013 18:05:18 +0000 (18:05 +0000)]
[mips][msa] Direct Object Emission for I8 instructions.

This patch adds Direct Object Emission support for I8 instructions: andi.b, bmnzi.b, bmzi.b, bseli.b, nori.b, ori.b, shf.{b,h,w} and xori.b.

Patch by Matheus Almeida

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191688 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[mips][msa] Direct Object Emission for I5 instructions.
Jack Carter [Mon, 30 Sep 2013 17:58:07 +0000 (17:58 +0000)]
[mips][msa] Direct Object Emission for I5 instructions.

This patch adds Direct Object Emission support for I5 instructions: addvi.{b,h,w,d}, ceqi.{b,h,w,d}, clei_s.{b,h,w,d}, clei_u.{b,h,w,d}, clti_s.{b,h,w,d}, clti_u.{b,h,w,d}, maxi_s.{b,h,w,d}, maxi_u.{b,h,w,d}, mini_s.{b,h,w,d}, mini_u.{b,h,w,d}, subvi.{b,h,w,d}.

Patch by Matheus Almeida

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191687 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[ARM] Clean up ARMAsmParser::validateInstruction().
Tilmann Scheller [Mon, 30 Sep 2013 17:57:30 +0000 (17:57 +0000)]
[ARM] Clean up ARMAsmParser::validateInstruction().

Fix some LLVM Coding Standards violations.

No changes in functionality.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191686 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[mips][msa] Direct Object Emission for 2R instructions.
Jack Carter [Mon, 30 Sep 2013 17:52:33 +0000 (17:52 +0000)]
[mips][msa] Direct Object Emission for 2R instructions.

This patch adds Direct Object Emission support for 2R instructions: nloc.{b,h,w}, nlzc.{b,h,w}, pcnt.{b,w,d}.

Patch by Matheus Almeida

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191685 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[PATCH 1/4] [mips][msa] Source register of FILL instructions is GPR
Jack Carter [Mon, 30 Sep 2013 17:43:04 +0000 (17:43 +0000)]
[PATCH 1/4] [mips][msa] Source register of FILL instructions is GPR
 and not an MSA register

Patch by Matheus Almeida

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191684 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[ARM] Use FileCheck instead of grep for ARM LDRD negative tests.
Tilmann Scheller [Mon, 30 Sep 2013 17:31:26 +0000 (17:31 +0000)]
[ARM] Use FileCheck instead of grep for ARM LDRD negative tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191683 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMove command line options to the users of libLTO. Fixes --enable-shared build.
Rafael Espindola [Mon, 30 Sep 2013 16:39:19 +0000 (16:39 +0000)]
Move command line options to the users of libLTO. Fixes --enable-shared build.

Patch by Richard Sandiford.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191680 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRevert "Enable building LTO on WIN32."
Rafael Espindola [Mon, 30 Sep 2013 16:32:51 +0000 (16:32 +0000)]
Revert "Enable building LTO on WIN32."

This reverts commit r191670.

It was causing build failures on the msvc bots:

http://bb.pgr.jp/builders/ninja-clang-i686-msc17-R/builds/5166/steps/compile/logs/stdio

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191679 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[ARM] Assembler: ARM LDRD with writeback requires the base register to be different...
Tilmann Scheller [Mon, 30 Sep 2013 16:11:48 +0000 (16:11 +0000)]
[ARM] Assembler: ARM LDRD with writeback requires the base register to be different from the destination registers.

See ARM ARM A8.8.72.

Violating this constraint results in unpredictable behavior.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191678 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSwift model: Fix uop description on some writes
Arnold Schwaighofer [Mon, 30 Sep 2013 15:56:34 +0000 (15:56 +0000)]
Swift model: Fix uop description on some writes

Those writes really need two/three uops.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191677 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoBoundsChecking: Fix refacto.
Benjamin Kramer [Mon, 30 Sep 2013 15:52:50 +0000 (15:52 +0000)]
BoundsChecking: Fix refacto.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191676 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoConvert manual insert point restores to the new RAII object.
Benjamin Kramer [Mon, 30 Sep 2013 15:40:17 +0000 (15:40 +0000)]
Convert manual insert point restores to the new RAII object.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191675 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoInstCombine: Replace manual fast math flag copying with the new IRBuilder RAII helper.
Benjamin Kramer [Mon, 30 Sep 2013 15:39:59 +0000 (15:39 +0000)]
InstCombine: Replace manual fast math flag copying with the new IRBuilder RAII helper.

Defines away the issue where cast<Instruction> would fail because constant
folding happened. Also slightly cleaner.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191674 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoIRBuilder: Add RAII objects to reset insertion points or fast math flags.
Benjamin Kramer [Mon, 30 Sep 2013 15:39:48 +0000 (15:39 +0000)]
IRBuilder: Add RAII objects to reset insertion points or fast math flags.

Inspired by the object from the SLPVectorizer. This found a minor bug in the
debug loc restoration in the vectorizer where the location of a following
instruction was attached instead of the location from the original instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191673 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoIRBuilder: Move fast math flags to IRBuilderBase.
Benjamin Kramer [Mon, 30 Sep 2013 15:39:27 +0000 (15:39 +0000)]
IRBuilder: Move fast math flags to IRBuilderBase.

They don't depend on the templated stuff.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191672 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoIfConverter: Use TargetSchedule for instruction latencies
Arnold Schwaighofer [Mon, 30 Sep 2013 15:28:56 +0000 (15:28 +0000)]
IfConverter: Use TargetSchedule for instruction latencies

For targets that have instruction itineraries this means no change. Targets
that move over to the new schedule model will use be able the new schedule
module for instruction latencies in the if-converter (the logic is such that if
there is no itineary we will use the new sched model for the latencies).

Before, we queried "TTI->getInstructionLatency()" for the instruction latency
and the extra prediction cost. Now, we query the TargetSchedule abstraction for
the instruction latency and TargetInstrInfo for the extra predictation cost. The
TargetSchedule abstraction will internally call "TTI->getInstructionLatency" if
an itinerary exists, otherwise it will use the new schedule model.

ATTENTION: Out of tree targets!

(I will also send out an email later to LLVMDev)

This means, if your target implements

 unsigned getInstrLatency(const InstrItineraryData *ItinData,
                          const MachineInstr *MI,
                          unsigned *PredCost);

and returns a value for "PredCost", you now also need to implement

 unsigned getPredictationCost(const MachineInstr *MI);

(if your target uses the IfConversion.cpp pass)

radar://15077010

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191671 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoEnable building LTO on WIN32.
Rafael Espindola [Mon, 30 Sep 2013 15:28:14 +0000 (15:28 +0000)]
Enable building LTO on WIN32.

Enable building the LTO library (.lib and.dll) and llvm-lto.exe on Windows with
MSVC and Mingw as well as re-enabling the associated test.

Patch by Greg Bedwell!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191670 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix a bug in InstCombine where it attempted to cast a Value* to an Instruction*
Joey Gouly [Mon, 30 Sep 2013 14:18:35 +0000 (14:18 +0000)]
Fix a bug in InstCombine where it attempted to cast a Value* to an Instruction*
when it was actually a Constant*.

There are quite a few other casts to Instruction that might have the same problem,
but this is the only one I have a test case for.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191668 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[ARM] Assembler: Add more negative tests for ARM LDRD.
Tilmann Scheller [Mon, 30 Sep 2013 13:04:22 +0000 (13:04 +0000)]
[ARM] Assembler: Add more negative tests for ARM LDRD.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191664 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[SystemZ] Revert r191661: Add definitions of LFH and STFH
Richard Sandiford [Mon, 30 Sep 2013 12:01:35 +0000 (12:01 +0000)]
[SystemZ] Revert r191661: Add definitions of LFH and STFH

For some reason, adding definitions for these load and store
instructions changed whether some of the build bots matched
comparisons as signed or unsigned.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191663 91177308-0d34-0410-b5e6-96231b3b80d8