oota-llvm.git
10 years agoFix unused variable
Matt Arsenault [Mon, 24 Feb 2014 21:16:50 +0000 (21:16 +0000)]
Fix unused variable

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

10 years agoR600/SI - Add new CI arithmetic instructions.
Matt Arsenault [Mon, 24 Feb 2014 21:01:28 +0000 (21:01 +0000)]
R600/SI - Add new CI arithmetic instructions.

Does not yet include larger part required
to match v_mad_i64_i32 / v_mad_u64_u32.

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

10 years agoR600: Make check clearer.
Matt Arsenault [Mon, 24 Feb 2014 21:01:23 +0000 (21:01 +0000)]
R600: Make check clearer.

The check is clearer as southern islands or later,
rather than checking for later than northern islands.

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

10 years agoFix DOT4 missing from getTargetOpcodeName
Matt Arsenault [Mon, 24 Feb 2014 21:01:21 +0000 (21:01 +0000)]
Fix DOT4 missing from getTargetOpcodeName

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

10 years agoAdd missing const
Matt Arsenault [Mon, 24 Feb 2014 21:01:18 +0000 (21:01 +0000)]
Add missing const

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

10 years agoTrivial code simplification
Matt Arsenault [Mon, 24 Feb 2014 21:01:15 +0000 (21:01 +0000)]
Trivial code simplification

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

10 years agoSLPVectorizer: Try vectorizing 'splat' stores
Arnold Schwaighofer [Mon, 24 Feb 2014 19:52:29 +0000 (19:52 +0000)]
SLPVectorizer: Try vectorizing 'splat' stores

Vectorize sequential stores of a broadcasted value.
5% on eon.

radar://16124699

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

10 years ago[X86][SchedModel] Add missing scheduling model for SSE related instructions.
Quentin Colombet [Mon, 24 Feb 2014 19:33:51 +0000 (19:33 +0000)]
[X86][SchedModel] Add missing scheduling model for SSE related instructions.

The patch defines new or refines existing generic scheduling classes to match
the behavior of the SSE instructions.
It also maps those scheduling classes on the related SSE instructions.

<rdar://problem/15607571>

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

10 years agoAdd a dwarf number to the Y register.
Roman Divacky [Mon, 24 Feb 2014 18:41:31 +0000 (18:41 +0000)]
Add a dwarf number to the Y register.

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

10 years agoReplace the F_Binary flag with a F_Text one.
Rafael Espindola [Mon, 24 Feb 2014 18:20:12 +0000 (18:20 +0000)]
Replace the F_Binary flag with a F_Text one.

After this I will set the default back to F_None. The advantage is that
before this patch forgetting to set F_Binary would corrupt a file on windows.
Forgetting to set F_Text produces one that cannot be read in notepad, which
is a better failure mode :-)

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

10 years agoLTO: Add the loop vectorizer to the LTO pipeline.
Arnold Schwaighofer [Mon, 24 Feb 2014 18:19:31 +0000 (18:19 +0000)]
LTO: Add the loop vectorizer to the LTO pipeline.

During the LTO phase LICM will move loop invariant global variables out of loops
(informed by GlobalModRef). This makes more loops countable presenting
opportunity for the loop vectorizer.

Adding the loop vectorizer improves some TSVC benchmarks and twolf/ref dataset
(5%) on x86-64.

radar://15970632

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

10 years agoFix windows unittest I missed in the raw_fd_ostream constructor change.
Rafael Espindola [Mon, 24 Feb 2014 16:40:34 +0000 (16:40 +0000)]
Fix windows unittest I missed in the raw_fd_ostream constructor change.

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

10 years agoFor lcov tests, don't Xfail mips littl endian (mipsel-... and mip64el-...)
Reed Kotler [Mon, 24 Feb 2014 16:33:56 +0000 (16:33 +0000)]
For lcov tests, don't Xfail mips littl endian (mipsel-... and mip64el-...)
targets. Just big endian (mips-... and mips64-...)

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

10 years agoDon't make F_None the default.
Rafael Espindola [Mon, 24 Feb 2014 15:07:20 +0000 (15:07 +0000)]
Don't make F_None the default.

This will make it easier to switch the default to being binary files.

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

10 years ago[CMake] Remove dependency on non-existing profile_rt-shared. Patch by Brad King.
Alexey Samsonov [Mon, 24 Feb 2014 15:07:06 +0000 (15:07 +0000)]
[CMake] Remove dependency on non-existing profile_rt-shared. Patch by Brad King.

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

10 years ago[asan] remove test that should have been removed in r202033
Kostya Serebryany [Mon, 24 Feb 2014 13:44:24 +0000 (13:44 +0000)]
[asan] remove test that should have been removed in r202033

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

10 years ago[asan] simplify the code that compute the shadow offset; get rid of two internal...
Kostya Serebryany [Mon, 24 Feb 2014 13:40:24 +0000 (13:40 +0000)]
[asan] simplify the code that compute the shadow offset; get rid of two internal flags that allowed to override it. The tests pass, but still this change might break asan on some platform not covered by tests. If you see this, please submit a fix with a test.

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

10 years agoAdd AArch64 big endian Target (aarch64_be)
Christian Pirker [Mon, 24 Feb 2014 11:34:50 +0000 (11:34 +0000)]
Add AArch64 big endian Target (aarch64_be)

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

10 years agoAVX-512: Fixed encoding of VPCMPEQ and VPCMPGT
Elena Demikhovsky [Mon, 24 Feb 2014 10:08:30 +0000 (10:08 +0000)]
AVX-512: Fixed encoding of VPCMPEQ and VPCMPGT

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

10 years agoShare a createUniqueEntity implementation between unix and windows.
Rafael Espindola [Mon, 24 Feb 2014 03:07:41 +0000 (03:07 +0000)]
Share a createUniqueEntity implementation between unix and windows.

The only extra bit of functionality that had to be exposed for this be be
implemented in Path.cpp is opening a file in rw mode.

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

10 years agoDelete dead code.
Rafael Espindola [Mon, 24 Feb 2014 01:07:38 +0000 (01:07 +0000)]
Delete dead code.

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

10 years agoAsm Parser: support .error directive
Saleem Abdulrasool [Sun, 23 Feb 2014 23:02:23 +0000 (23:02 +0000)]
Asm Parser: support .error directive

The .error directive is similar to .err in that it will halt assembly if it is
evaluated for assembly.  However, it permits a user supplied message to be
rendered.

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

10 years agoAsmParser: support .ifeqs directive
Saleem Abdulrasool [Sun, 23 Feb 2014 23:02:18 +0000 (23:02 +0000)]
AsmParser: support .ifeqs directive

The .ifeqs directive assembles the following code if the quoted string
parameters are equal.  The strings must be quoted using double quotes.

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

10 years agoSPARC: Implement TRAP lowering. Matches what GCC emits.
Benjamin Kramer [Sun, 23 Feb 2014 21:43:52 +0000 (21:43 +0000)]
SPARC: Implement TRAP lowering. Matches what GCC emits.

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

10 years agoARMAsmParser: whitespace
Saleem Abdulrasool [Sun, 23 Feb 2014 17:45:36 +0000 (17:45 +0000)]
ARMAsmParser: whitespace

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

10 years agoARM IAS: support .align without parameters
Saleem Abdulrasool [Sun, 23 Feb 2014 17:45:32 +0000 (17:45 +0000)]
ARM IAS: support .align without parameters

.align is handled specially on certain targets.  .align without any parameters
on ARM indicates a default alignment (4).  Handle the special case in the target
parser, but fall back to the generic parser for the normal version.

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

10 years agoMCAsmParser: support .ifne
Saleem Abdulrasool [Sun, 23 Feb 2014 15:53:41 +0000 (15:53 +0000)]
MCAsmParser: support .ifne

The .ifne directive assembles the following section of code if the argument
expression is non-zero.  Effectively, it is equivalent to if.

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

10 years agoMCAsmParser: handle space properly for .ifc/.ifnc
Saleem Abdulrasool [Sun, 23 Feb 2014 15:53:36 +0000 (15:53 +0000)]
MCAsmParser: handle space properly for .ifc/.ifnc

If the strings are not quoted, the first string stops at the first comma, and
the second string stops at the end of the line.  Strings which contain
whitespace should be quoted.  Unquoted space is to be discarded.

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

10 years agoMCAsmParser: add support for .err directive
Saleem Abdulrasool [Sun, 23 Feb 2014 15:53:30 +0000 (15:53 +0000)]
MCAsmParser: add support for .err directive

The .err directive produces an error whenever it is assembled.  This can be
useful for preventing assembly when an unexpected condition occurs.

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

10 years agoUse static instead of an anonymous namespace.
Rafael Espindola [Sun, 23 Feb 2014 15:16:03 +0000 (15:16 +0000)]
Use static instead of an anonymous namespace.

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

10 years agoAVX-512: Fixed encoding of VPTESTMQ
Elena Demikhovsky [Sun, 23 Feb 2014 14:28:35 +0000 (14:28 +0000)]
AVX-512: Fixed encoding of VPTESTMQ

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

10 years agoSimplify remove, create_directory and create_directories.
Rafael Espindola [Sun, 23 Feb 2014 13:56:14 +0000 (13:56 +0000)]
Simplify remove, create_directory and create_directories.

Before this patch they would take an boolean argument to say if the path
already existed. This was redundant with the returned error_code which is able
to represent that. This allowed for callers to incorrectly check only the
existed flag instead of first checking the error code.

Instead, pass in a boolean flag to say if the previous (non-)existence should be
an error or not.

Callers of the of the old simple versions are not affected. They still ignore
the previous (non-)existence as they did before.

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

10 years agoUse simpler form of llvm::sys::fs::remove.
Rafael Espindola [Sun, 23 Feb 2014 13:37:37 +0000 (13:37 +0000)]
Use simpler form of llvm::sys::fs::remove.

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

10 years agoLocalStackSlotAllocation: Turn one-iteration loop into if.
Benjamin Kramer [Sun, 23 Feb 2014 13:34:21 +0000 (13:34 +0000)]
LocalStackSlotAllocation: Turn one-iteration loop into if.

No functionality change.

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

10 years agoTableGen.cmake: Functionalize and reformat.
NAKAMURA Takumi [Sun, 23 Feb 2014 12:54:15 +0000 (12:54 +0000)]
TableGen.cmake: Functionalize and reformat.

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

10 years agoSimplify linking to system libraries
NAKAMURA Takumi [Sun, 23 Feb 2014 06:27:04 +0000 (06:27 +0000)]
Simplify linking to system libraries

The LLVMSupport library implementation consolidates all dependencies on
system libraries.  Move the logic gathering system libraries out of
'cmake/modules/LLVM-Config.cmake' and into 'lib/Support/CMakeLists.txt'.
Use the target_link_libraries() command there to tell CMake about the
link dependencies of the LLVMSupport implementation.  CMake will
automatically propagate this to all targets that link LLVMSupport
directly or indirectly.

We still need to build knowledge of system library dependencies into
'llvm-config'.  Store the list of libraries needed in a property on
LLVMSupport and teach 'tools/llvm-config/CMakeLists.txt' to retrieve it
from there.

Drop all calls to 'link_system_libs' and 'get_system_libs' from our
CMake code.  Replace their implementations with a warning that explains
the calls are no longer necessary.  Also drop from 'LLVMConfig.cmake'
the HAVE_* and related variables that were published there only to allow
'get_system_libs' to run outside our build process.

Contributed by Brad King.

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

10 years agoARM IAS: support .short and .hword
Saleem Abdulrasool [Sun, 23 Feb 2014 06:22:09 +0000 (06:22 +0000)]
ARM IAS: support .short and .hword

This adds support for the .short and its alias .hword for adding literal values
into the object file.  This is similar to the .word directive, however, rather
than inserting a value of 4 bytes, adds a 2-byte value.

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

10 years ago[python-bindings] Remove some cruft that snuck in.
Michael Gottesman [Sun, 23 Feb 2014 04:43:26 +0000 (04:43 +0000)]
[python-bindings] Remove some cruft that snuck in.

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

10 years agoMake test more resilient against scheduling decisions.
Benjamin Kramer [Sat, 22 Feb 2014 20:14:02 +0000 (20:14 +0000)]
Make test more resilient against scheduling decisions.

Should bring the atom buildbots back to life.

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

10 years agoFix typo
Manman Ren [Sat, 22 Feb 2014 19:31:28 +0000 (19:31 +0000)]
Fix typo

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

10 years agoMC: Support COFF string tables larger than 10MB
Nico Rieck [Sat, 22 Feb 2014 16:12:20 +0000 (16:12 +0000)]
MC: Support COFF string tables larger than 10MB

Offsets past the range of single-slash encoding are encoded as base64,
padded to 6 characters, and prefixed with two slashes. This encoding is
undocumented but used by MSVC.

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

10 years agoDon't inline get[S|U]LEB128Size() until they are proved to be hot.
Logan Chien [Sat, 22 Feb 2014 15:39:39 +0000 (15:39 +0000)]
Don't inline get[S|U]LEB128Size() until they are proved to be hot.

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

10 years agoMove get[S|U]LEB128Size() to LEB128.h.
Logan Chien [Sat, 22 Feb 2014 14:00:39 +0000 (14:00 +0000)]
Move get[S|U]LEB128Size() to LEB128.h.

This commit moves getSLEB128Size() and getULEB128Size() from
MCAsmInfo to LEB128.h and removes some copy-and-paste code.

Besides, this commit also adds some unit tests for the LEB128
functions.

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

10 years agoRevert "Revert "Use relative rpath so that the installation and build dirs are reloca...
Rafael Espindola [Sat, 22 Feb 2014 13:29:31 +0000 (13:29 +0000)]
Revert "Revert "Use relative rpath so that the installation and build dirs are relocatable.""

This reverts commit r201934.

Polly has been fixed to work with this.

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

10 years agoRevert "Use relative rpath so that the installation and build dirs are relocatable."
Rafael Espindola [Sat, 22 Feb 2014 12:36:28 +0000 (12:36 +0000)]
Revert "Use relative rpath so that the installation and build dirs are relocatable."

This reverts commit r201921.

This should bring the polly bots back. I will try to build it locally to
understand how cmake was setting the rpath of LLVMPolly.so.

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

10 years agoAdd const to some member functions of SuccIterator.
Logan Chien [Sat, 22 Feb 2014 09:06:55 +0000 (09:06 +0000)]
Add const to some member functions of SuccIterator.

The operator+() and operator-() do not change the member
variables of SuccIterator.  This CL will qualify the *this*
pointer with const.

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

10 years agoPrune debug message in AddLLVM.cmake.
NAKAMURA Takumi [Sat, 22 Feb 2014 07:31:10 +0000 (07:31 +0000)]
Prune debug message in AddLLVM.cmake.

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

10 years agollvm/test/CodeGen/X86/shift-pcmp.ll: Tweak to appease FileCheck. "CHECK-LABEL" doesn...
NAKAMURA Takumi [Sat, 22 Feb 2014 07:27:04 +0000 (07:27 +0000)]
llvm/test/CodeGen/X86/shift-pcmp.ll: Tweak to appease FileCheck. "CHECK-LABEL" doesn't identify labels magically and CHECK-LABEL behaves free from other contexts.

For targeting pecoff, ".def foo" appears before ".short 32".

          .def    foo;
  ...
  .LCPI0_0:
          .short  32
  foo:

CHECK-LABEL seeks not from ".short 32" but from the top of the input.

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

10 years agoInclude <cctype> for isdigit().
Logan Chien [Sat, 22 Feb 2014 06:34:10 +0000 (06:34 +0000)]
Include <cctype> for isdigit().

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

10 years ago[python-bindings] Added OpCode like support for all enumerations with unittests.
Michael Gottesman [Sat, 22 Feb 2014 05:39:35 +0000 (05:39 +0000)]
[python-bindings] Added OpCode like support for all enumerations with unittests.

Also fixed some trailing whitespace issues.

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

10 years ago[CodeGenPrepare] Fix the check of the legality of an instruction.
Quentin Colombet [Sat, 22 Feb 2014 01:06:41 +0000 (01:06 +0000)]
[CodeGenPrepare] Fix the check of the legality of an instruction.
The API expects an ISD opcode, not an IR opcode.
Fixes a regression for R600.

Related to <rdar://problem/15519855>.

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

10 years agoUse relative rpath so that the installation and build dirs are relocatable.
Rafael Espindola [Sat, 22 Feb 2014 00:54:14 +0000 (00:54 +0000)]
Use relative rpath so that the installation and build dirs are relocatable.

This works by asking cmake to use the "install rpath", but setting that rpath
to be relative.

Thanks a lot to Brad King for the help with CMake!

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

10 years agoSwitch the LLVM error reporting on the new diagnostic system.
Quentin Colombet [Sat, 22 Feb 2014 00:34:11 +0000 (00:34 +0000)]
Switch the LLVM error reporting on the new diagnostic system.
The LLVM diagnostic are now wired-up in clang (since r200931),
thus the user experience will not be impacted by this change
anymore.

Related to <rdar://problem/15886697>

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

10 years ago[CodeGenPrepare] Move CodeGenPrepare into lib/CodeGen.
Quentin Colombet [Sat, 22 Feb 2014 00:07:45 +0000 (00:07 +0000)]
[CodeGenPrepare] Move CodeGenPrepare into lib/CodeGen.

CodeGenPrepare uses extensively TargetLowering which is part of libLLVMCodeGen.
This is a layer violation which would introduce eventually a dependence on
CodeGen in ScalarOpts.

Move CodeGenPrepare into libLLVMCodeGen to avoid that.

Follow-up of <rdar://problem/15519855>

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

10 years ago[DAGCombiner] PCMP* sets its result to all ones or zeros so we can AND with the
Quentin Colombet [Fri, 21 Feb 2014 23:42:41 +0000 (23:42 +0000)]
[DAGCombiner] PCMP* sets its result to all ones or zeros so we can AND with the
shifted mask rather than masking and shifting separately.

The patch adds this transformation to the DAGCombiner:

  (shl (and (setcc:i8v16 ...) N01C) N1C) -> (and (setcc:i8v16 ...) N01C<<N1C)

<rdar://problem/16054492>

Patch by Adam Nemet <anemet@apple.com>

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

10 years ago[Stackmaps] Move the target-independent frame index elimination for stackmaps and...
Juergen Ributzka [Fri, 21 Feb 2014 23:29:32 +0000 (23:29 +0000)]
[Stackmaps] Move the target-independent frame index elimination for stackmaps and patchpoints into target-specific code.

The lowering of the frame index for stackmaps and patchpoints requires some
target-specific magic and should therefore be handled in the target-specific
eliminateFrameIndex method.

This is related to <rdar://problem/16106219>

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

10 years agoShankar kindly pointed out that I wasn't following the coding convention properly...
Aaron Ballman [Fri, 21 Feb 2014 20:46:48 +0000 (20:46 +0000)]
Shankar kindly pointed out that I wasn't following the coding convention properly, so moving raw_ostream.h above system_error.h.

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

10 years agoFixing the MSVC build by including a file.
Aaron Ballman [Fri, 21 Feb 2014 20:42:18 +0000 (20:42 +0000)]
Fixing the MSVC build by including a file.

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

10 years agollvm-objdump/COFF: LoadConfiguration does not exist in object file.
Rui Ueyama [Fri, 21 Feb 2014 20:27:15 +0000 (20:27 +0000)]
llvm-objdump/COFF: LoadConfiguration does not exist in object file.

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

10 years agoAdd missing include.
Rafael Espindola [Fri, 21 Feb 2014 20:21:55 +0000 (20:21 +0000)]
Add missing include.

Should fix the bots.

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

10 years agoAdd a SymbolicFile interface between Binary and ObjectFile.
Rafael Espindola [Fri, 21 Feb 2014 20:10:59 +0000 (20:10 +0000)]
Add a SymbolicFile interface between Binary and ObjectFile.

This interface allows IRObjectFile to be implemented without having dummy
methods for all section and segment related methods.

Both llvm-ar and llvm-nm are changed to use it. Unfortunately the mangler is
still not plugged in since it requires some refactoring to make a Module hold
a DataLayout.

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

10 years agoDebugInfo: Remove the empty macinfo section.
David Blaikie [Fri, 21 Feb 2014 19:13:09 +0000 (19:13 +0000)]
DebugInfo: Remove the empty macinfo section.

We were just emitting a label for this section for no real reason - this
caused us to emit the section even though we never put anything in it.

Not bothering with a test (though not adamantly anti-test) because it
seems somewhat arbitrary to test for the absence of this section anymore
than the absence of any other section.

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

10 years agoRename a few more DataLayout variables from TD to DL.
Rafael Espindola [Fri, 21 Feb 2014 18:34:28 +0000 (18:34 +0000)]
Rename a few more DataLayout variables from TD to DL.

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

10 years agoadd -da-delinearize runs and checks to MIV testcases
Sebastian Pop [Fri, 21 Feb 2014 18:15:18 +0000 (18:15 +0000)]
add -da-delinearize runs and checks to MIV testcases

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

10 years agofix a corner case in delinearization
Sebastian Pop [Fri, 21 Feb 2014 18:15:15 +0000 (18:15 +0000)]
fix a corner case in delinearization

handle special cases Step==1, Step==-1, GCD==1, and GCD==-1

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

10 years agonormalize the last delinearized dimension
Sebastian Pop [Fri, 21 Feb 2014 18:15:11 +0000 (18:15 +0000)]
normalize the last delinearized dimension

in the dependence test, we used to discard some information that the
delinearization provides: the size of the innermost dimension of an array,
i.e., the size of scalars stored in the array, and the remainder of the
delinearization that provides the offset from which the array reads start,
i.e., the base address of the array.

To avoid losing this data in the rest of the data dependence analysis, the fix
is to multiply the access function in the last delinearized dimension by its
size, effectively making the size of the last dimension to always be in bytes,
and then add the remainder of delinearization to the last subscript,
effectively making the last subscript start at the base address of the array.

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

10 years agofail delinearization when the size of subscripts differs
Sebastian Pop [Fri, 21 Feb 2014 18:15:07 +0000 (18:15 +0000)]
fail delinearization when the size of subscripts differs

Because the delinearization is not a global analysis pass, it will compute the
delinearization independently of knowledge about the way the delinearization
happened for other data accesses to the same array: the dependence analysis will
only trigger the delinearization on a tuple of access functions, and thus
delinearization may compute different subscripts sizes for a same array.  When
that happens the safest is to discard the delinearized information.

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

10 years agoRemove dead declaration
Sylvestre Ledru [Fri, 21 Feb 2014 17:58:12 +0000 (17:58 +0000)]
Remove dead declaration

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

10 years ago[CMake] llvm-c/lto.h should be installed if libLTO.a is built.
NAKAMURA Takumi [Fri, 21 Feb 2014 14:57:09 +0000 (14:57 +0000)]
[CMake] llvm-c/lto.h should be installed if libLTO.a is built.

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

10 years ago[CMake] libLTO: Use (SHARED|STATIC) to build both shared LTO and LTO_static.
NAKAMURA Takumi [Fri, 21 Feb 2014 14:17:43 +0000 (14:17 +0000)]
[CMake] libLTO: Use (SHARED|STATIC) to build both shared LTO and LTO_static.

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

10 years ago[CMake] llvm_add_library: Add dependencies also to objlibs as workaround of CMake...
NAKAMURA Takumi [Fri, 21 Feb 2014 14:17:29 +0000 (14:17 +0000)]
[CMake] llvm_add_library: Add dependencies also to objlibs as workaround of CMake issue 14747.

http://www.cmake.org/Bug/view.php?id=14747

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

10 years ago[CMake] Introduce "llvm_add_library(SHARED STATIC)" to build both shared lib and...
NAKAMURA Takumi [Fri, 21 Feb 2014 14:17:17 +0000 (14:17 +0000)]
[CMake] Introduce "llvm_add_library(SHARED STATIC)" to build both shared lib and static lib simulataneously.

  llvm_add_library(foo SHARED STATIC
    DEPENDS <dependent targets...>
    LINK_LIBS <required libraries...>
    )

It generates both foo (foo.so) and foo_static(foo.a) and both of them depend on DEPENDS and LINK_LIBS.
Then, also obj.foo is generated. obj.foo depends on DEPENDS, but doesn't depend on LINK_LIBS.

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

10 years agoTeach LLVM-Config to use logical target names (2/2)
NAKAMURA Takumi [Fri, 21 Feb 2014 14:17:07 +0000 (14:17 +0000)]
Teach LLVM-Config to use logical target names (2/2)

The module still needs to collect the list of all available libraries
in order to satisfy the 'all' component.  Provide this in the package
configuration file, 'LLVMConfig.cmake', as a LLVM_AVAILABLE_LIBS
variable.  (A variable is scoped better than a global property.)
Since this won't be set for our own build, fall back to looking up the
LLVM_LIBS property to get the value when it is not set.

Contributed by Brad King.

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

10 years agoTeach LLVM-Config to use logical target names (1/2)
NAKAMURA Takumi [Fri, 21 Feb 2014 14:16:52 +0000 (14:16 +0000)]
Teach LLVM-Config to use logical target names (1/2)

LLVM library names are now available as logical CMake targets both
to our own build and to application CMake code.  Replace use of
'list(FIND)' with a simple 'if(TARGET)' to determine whether a
library is available.

Contributed by Brad King.

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

10 years ago[AArch64] Add register constraints to avoid generating STLXR and STXR with unpredicta...
Kevin Qin [Fri, 21 Feb 2014 07:45:48 +0000 (07:45 +0000)]
[AArch64] Add register constraints to avoid generating STLXR and STXR with unpredictable behavior.

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

10 years agoThis test was failing on non-X86-64 platforms because stackmaps only work on X86-64.
Filip Pizlo [Fri, 21 Feb 2014 03:17:31 +0000 (03:17 +0000)]
This test was failing on non-X86-64 platforms because stackmaps only work on X86-64.

Disable it on non-X86-64 platforms and add a comment.

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

10 years agoMake DisableIntegratedAS a TargetOption.
Rafael Espindola [Fri, 21 Feb 2014 03:13:54 +0000 (03:13 +0000)]
Make DisableIntegratedAS a TargetOption.

This replaces the old NoIntegratedAssembler with at TargetOption. This is
more flexible and will be used to forward clang's -no-integrated-as option.

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

10 years agoOne last pass of DataLayout variable renaming.
Rafael Espindola [Fri, 21 Feb 2014 02:01:42 +0000 (02:01 +0000)]
One last pass of DataLayout variable renaming.

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

10 years agoRename a few more DataLayout variables.
Rafael Espindola [Fri, 21 Feb 2014 01:53:35 +0000 (01:53 +0000)]
Rename a few more DataLayout variables.

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

10 years agoRename many DataLayout variables from TD to DL.
Rafael Espindola [Fri, 21 Feb 2014 00:06:31 +0000 (00:06 +0000)]
Rename many DataLayout variables from TD to DL.

I am really sorry for the noise, but the current state where some parts of the
code use TD (from the old name: TargetData) and other parts use DL makes it
hard to write a patch that changes where those variables come from and how
they are passed along.

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

10 years agoStackmaps are used for OSR exits, which is a custom kind of unwinding. Hence, they
Filip Pizlo [Thu, 20 Feb 2014 23:57:31 +0000 (23:57 +0000)]
Stackmaps are used for OSR exits, which is a custom kind of unwinding. Hence, they
should not be marked nounwind.

Marking them nounwind caused crashes in the WebKit FTL JIT, because if we enable
sufficient optimizations, LLVM starts eliding compact_unwind sections (or any unwind
data for that matter), making deoptimization via stackmaps impossible.

This changes the stackmap intrinsic to be may-throw, adds a test for exactly the
sympton that WebKit saw, and fixes TableGen to handle un-attributed intrinsics.

Thanks to atrick and philipreames for reviewing this.

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

10 years agoMake sure that value handle users see the transformation of an indirect call to a...
Nick Lewycky [Thu, 20 Feb 2014 23:00:15 +0000 (23:00 +0000)]
Make sure that value handle users see the transformation of an indirect call to a direct call. This is important for the CallGraph iteration. Patch by Björn Steinbrink!

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

10 years agoSet the SuppressWarnings option on tool level and propagate to the library.
Eli Bendersky [Thu, 20 Feb 2014 22:19:24 +0000 (22:19 +0000)]
Set the SuppressWarnings option on tool level and propagate to the library.

The SuppressWarnings flag, unfortunately, isn't very useful for custom tools
that want to use the LLVM module linker. So I'm changing it to a parameter of
the Linker, and the flag itself moves to the llvm-link tool.

For the time being as SuppressWarnings is pretty much the only "option" it
seems reasonable to propagate it to Linker objects. If we end up with more
options in the future, some sort of "struct collecting options" may be a
better idea.

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

10 years agocstdint is a C++11 header, LLVM provides its own version of it.
Benjamin Kramer [Thu, 20 Feb 2014 21:05:21 +0000 (21:05 +0000)]
cstdint is a C++11 header, LLVM provides its own version of it.

Some versions of libstdc++ forbid using cstdint in C++98 mode.

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

10 years ago[Support] Correctly handle zero length inputs to UTF conversion functions on Windows.
Michael J. Spencer [Thu, 20 Feb 2014 20:46:23 +0000 (20:46 +0000)]
[Support] Correctly handle zero length inputs to UTF conversion functions on Windows.

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

10 years agotest_debuginfo.pl: Make failures easier to debug by printing the debugger
Adrian Prantl [Thu, 20 Feb 2014 19:55:44 +0000 (19:55 +0000)]
test_debuginfo.pl: Make failures easier to debug by printing the debugger
output.

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

10 years agoFix build breakage.
Rui Ueyama [Thu, 20 Feb 2014 19:32:00 +0000 (19:32 +0000)]
Fix build breakage.

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

10 years agoObject/COFF: Fix possible truncation bug.
Rui Ueyama [Thu, 20 Feb 2014 19:14:56 +0000 (19:14 +0000)]
Object/COFF: Fix possible truncation bug.

VA can be 64 bit, as the image base can be larger than 4GB, so we need to
handle 64 bit VAs properly.

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

10 years agoRemove unnecessary copy of array_lengthof.
Benjamin Kramer [Thu, 20 Feb 2014 17:36:31 +0000 (17:36 +0000)]
Remove unnecessary copy of array_lengthof.

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

10 years agoAArch64: __va_list.__stack must be 8-byte aligned
Oliver Stannard [Thu, 20 Feb 2014 17:19:26 +0000 (17:19 +0000)]
AArch64: __va_list.__stack must be 8-byte aligned

The va_start macro for AArch64 must set va_list.__stack to the address
following the last named argument on the stack, rounded up to an alignment
of 8 bytes.

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

10 years ago[AArch64] Add support for TargetTransformInfo Analysis.
Chad Rosier [Thu, 20 Feb 2014 16:00:08 +0000 (16:00 +0000)]
[AArch64] Add support for TargetTransformInfo Analysis.

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

10 years ago[mips] Make it impossible to have UnknownABI in CodeGen and Integrated Assembler.
Daniel Sanders [Thu, 20 Feb 2014 14:58:19 +0000 (14:58 +0000)]
[mips] Make it impossible to have UnknownABI in CodeGen and Integrated Assembler.

Summary:
This removes the need to coerce UnknownABI to the default ABI (O32 for
MIPS32, N64 for MIPS64 [*]) in both MipsSubtarget and MipsAsmParser.

Clang has been updated to disable both possible default ABI's before enabling
the ABI it intends to use.

[*] N64 being the default for MIPS64 is not actually correct.
    However N32 is not fully implemented/tested yet.

Depends on: D2830

Reviewers: jacksprat, matheusalmeida

Reviewed By: matheusalmeida

Differential Revision: http://llvm-reviews.chandlerc.com/D2832
Differential Revision: http://llvm-reviews.chandlerc.com/D2846

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

10 years ago[CMake] Move intrinsics_gen to lib/Target out of add_public_tablegen_target.
NAKAMURA Takumi [Thu, 20 Feb 2014 13:42:30 +0000 (13:42 +0000)]
[CMake] Move intrinsics_gen to lib/Target out of add_public_tablegen_target.

add_public_tablegen_target is used somewhere.

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

10 years ago[CMake] intrinsics_gen: Use add_public_tablegen_target().
NAKAMURA Takumi [Thu, 20 Feb 2014 13:42:16 +0000 (13:42 +0000)]
[CMake] intrinsics_gen: Use add_public_tablegen_target().

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

10 years agoAsmParser: Disable Darwin-style macro argument expansion on non-darwin targets.
Benjamin Kramer [Thu, 20 Feb 2014 13:36:32 +0000 (13:36 +0000)]
AsmParser: Disable Darwin-style macro argument expansion on non-darwin targets.

There is code in the wild that relies on $0 not being expanded.

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

10 years ago[mips] Make mips64 the default CPU for the mips64 architecture
Daniel Sanders [Thu, 20 Feb 2014 13:13:33 +0000 (13:13 +0000)]
[mips] Make mips64 the default CPU for the mips64 architecture

Summary:
This is consistent with the integrated assembler.
All mips64 codegen tests previously passed -mcpu. Removed -mcpu from
blez_bgez.ll and const-mult.ll to cover the default case.

Ideally, the two implementations of selectMipsCPU() will be merged but it's
proven difficult to find a home for the function that doesn't cause link errors.
For now, we'll hoist the common functionality into a function and mark it with
FIXME's.

Reviewers: jacksprat, matheusalmeida

Reviewed By: matheusalmeida

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

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

10 years agoUnconditionally include msan_interface.h when building with MSan.
Evgeniy Stepanov [Thu, 20 Feb 2014 11:37:03 +0000 (11:37 +0000)]
Unconditionally include msan_interface.h when building with MSan.

Any version of Clang that does not provide this header is way too old to
bootstrap with MSan.

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

10 years agoAdded release note about making all inline assembly parsed (even for assembly
Daniel Sanders [Thu, 20 Feb 2014 09:24:15 +0000 (09:24 +0000)]
Added release note about making all inline assembly parsed (even for assembly
output) when the integrated assembler is enabled.

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

10 years agoCOFFObjectFile.cpp: Appease msvc in r201760.
NAKAMURA Takumi [Thu, 20 Feb 2014 09:16:23 +0000 (09:16 +0000)]
COFFObjectFile.cpp: Appease msvc in r201760.

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

10 years ago[x86] Switch PAUSE instruction to use XS prefix instead of HasREPPrefix. Remove HasRE...
Craig Topper [Thu, 20 Feb 2014 07:59:43 +0000 (07:59 +0000)]
[x86] Switch PAUSE instruction to use XS prefix instead of HasREPPrefix. Remove HasREPPrefix support from disassembler table generator since its now only used by CodeGenOnly instructions.

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