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

100181 Commits

Author SHA1 Message Date
Oliver Stannard
d01574e188 ARM: r12 is callee-saved for interrupt handlers
For A- and R-class processors, r12 is not normally callee-saved, but is for
interrupt handlers. See AAPCS, 5.3.1.1, "Use of IP by the linker".

llvm-svn: 201089
2014-02-10 14:24:23 +00:00
Benjamin Kramer
4779ebf069 Make succ_iterator a real random access iterator and clean up a couple of users.
llvm-svn: 201088
2014-02-10 14:17:42 +00:00
Benjamin Kramer
6f5190be6c GlobalsModRef: Unify and clean up duplicated pointer analysis code.
llvm-svn: 201087
2014-02-10 14:17:30 +00:00
Tim Northover
f94bdee15e ARM: use LLVM IR to represent the vshrn operation
vshrn is just the combination of a right shift and a truncate (and the limits
on the immediate value actually mean the signedness of the shift doesn't
matter). Using that representation allows us to get rid of an ARM-specific
intrinsic, share more code with AArch64 and hopefully get better code out of
the mid-end optimisers.

llvm-svn: 201085
2014-02-10 14:04:07 +00:00
Robert Lougher
3ef707fb80 Test commit - added a new line to vec_shuf-insert.ll.
llvm-svn: 201083
2014-02-10 12:42:13 +00:00
Matheus Almeida
a37a49cc06 [mips][msa] Add DLSA instruction.
llvm-svn: 201081
2014-02-10 12:05:17 +00:00
Matheus Almeida
856616a320 [mips][msa] Update FileCheck prefix in preparation for
the addition of Mips64 tests.

No functional changes.

llvm-svn: 201080
2014-02-10 11:30:09 +00:00
NAKAMURA Takumi
465a2c73b8 [CMake] Add dependencies to gtest.
llvm-svn: 201079
2014-02-10 11:27:41 +00:00
Matheus Almeida
c2e8b799cf [mips][msa] Make LSA_DESC a parameterizable class.
This way it's possible to share the instruction's description for LSA and
DLSA (to be added).

No functional changes.

llvm-svn: 201078
2014-02-10 11:15:37 +00:00
NAKAMURA Takumi
ad172d26af [CMake] LLVMSupport should be responsible to provide system_libs.
llvm-svn: 201077
2014-02-10 10:52:19 +00:00
NAKAMURA Takumi
632763dd5b Fix LLVM install rules to not set permissions on include/
The CMake install(DIRECTORY) command documents that it sets permissions
on directories it is asked to install.  Since the <prefix>/include
directory may not be exclusive to the LLVM installation, we should not
ask CMake to manage permissions of that directory for us.  Instead, give
only our own include/llvm and include/llvm-c subdirectories to the
install(DIRECTORY) command.

Fixes PR4500. Patch by Brad King.

llvm-svn: 201075
2014-02-10 10:50:55 +00:00
NAKAMURA Takumi
f83fca5f7a [CMake] Introduce llvm_add_library().
- MODULE;SHARED;STATIC
      STATIC by default w/o BUILD_SHARED_LIBS.
      SHARED by default w/  BUILD_SHARED_LIBS.
  - OUTPUT_NAME name
      Corresponds to OUTPUT_NAME in target properties.
  - DEPENDS targets...
      Same semantics as add_dependencies().
  - LINK_COMPONENTS components...
      Same as the variable LLVM_LINK_COMPONENTS.
  - LINK_LIBS lib_targets...
      Same semantics as target_link_libraries().
  - ADDITIONAL_HEADERS (implemented in LLVMProcessSources)
      May specify header files for IDE generators.

I suggest llvm_add_library() may be used for inter-project add_library stuff
and also suggest add_***_library() may be used project-specific.

Please be patient that llvm_add_library might be ambiguous against add_llvm_library.

llvm-svn: 201072
2014-02-10 09:05:11 +00:00
Kostya Serebryany
668ea393ac [asan] support for FreeBSD, LLVM part. patch by Viktor Kutuzov
llvm-svn: 201067
2014-02-10 07:37:04 +00:00
Elena Demikhovsky
110d93ce93 AVX-512: Fixed extract_vector_elt for v16i1 and v8i1 vectors.
llvm-svn: 201066
2014-02-10 07:02:39 +00:00
Craig Topper
5f3cd9c3a9 Recommit r201059 and r201060 with hopefully a fix for its original failure.
Original commits messages:

Add MRMXr/MRMXm form to X86 for use by instructions which treat the 'reg' field of modrm byte as a don't care value. Will allow for simplification of disassembler code.

Simplify a bunch of code by removing the need for the x86 disassembler table builder to know about extended opcodes. The modrm forms are sufficient to convey the information.

llvm-svn: 201065
2014-02-10 06:55:41 +00:00
Bob Wilson
3e54e44d03 Revert r201059 and r201060.
r201059 appears to cause a crash in a bootstrapped build of clang. Craig
isn't available to look at it right now, so I'm reverting it while he
investigates.

llvm-svn: 201064
2014-02-10 05:28:30 +00:00
NAKAMURA Takumi
5c9eb49c11 [CMake] LLVMProcessSources.cmake: Prune add_file_dependencies to ${TABLEGEN_OUTPUT}.
I am sure it'd not be required any more.
In trunk, all of tablegen's users depend on ${TABLEGEN_OUTPUT} as not file dependency but inter-target dependency.

llvm-svn: 201063
2014-02-10 03:24:28 +00:00
NAKAMURA Takumi
7345270868 [CMake] Re-apply r200765, "Get rid of llvm_config() to expand dependencies."
CMake's target_link_libraries() will manage dependencies with Brad's LLVMConfig improvements.

Configuration time may be reduced by a few seconds.

llvm-svn: 201062
2014-02-10 03:24:19 +00:00
Hao Liu
636db9c0e6 [AArch64]Implement the copy of two FPR8 registers by using FMOVss of two FPR32 registers in copyPhysReg.
llvm-svn: 201061
2014-02-10 03:16:22 +00:00
Craig Topper
4940698ac0 Simplify a bunch of code by removing the need for the x86 disassembler table builder to know about extended opcodes. The modrm forms are sufficient to convey the information.
llvm-svn: 201060
2014-02-10 01:58:12 +00:00
Craig Topper
c4ecc4bda5 Add MRMXr/MRMXm form to X86 for use by instructions which treat the 'reg' field of modrm byte as a don't care value. Will allow for simplification of disassembler code.
llvm-svn: 201059
2014-02-10 00:50:34 +00:00
Saleem Abdulrasool
360c5ac6fd MCParser: add a single token lookahead
Some of the more complex directive and macro handling for GAS compatibility
requires lookahead.  Add a single token lookahead in the MCAsmLexer.

llvm-svn: 201058
2014-02-09 23:29:24 +00:00
Bob Wilson
d7d93a1068 Remove shell comment in the middle of a single-line command.
You can't put a comment in the middle of a command like this. This is
invalid shell syntax and breaks the build.

llvm-svn: 201057
2014-02-09 22:36:31 +00:00
Benjamin Kramer
b8be18dbcc AsmParser: Simplify code with ArrayRef.
No functionality change.

llvm-svn: 201055
2014-02-09 17:13:11 +00:00
NAKAMURA Takumi
72e48a472b Whitespace.
llvm-svn: 201054
2014-02-09 16:38:31 +00:00
NAKAMURA Takumi
1aa7442231 Provide CMake package modules in install tree
Teach the Makefile build system to generate and install CMake modules
LLVMConfig.cmake and LLVMConfigVersion.cmake so that applications that
build with CMake can use 'find_package(LLVM)' even when LLVM is not
built with CMake.  These modules tell such applications about available
LLVM libraries and their dependencies.

Run llvm-config to generate the list of libraries and use the results of
llvm-build to generate the library dependencies.  Use sed to perform
substitutions in the LLVMConfig.cmake.in and LLVMConfigVersion.cmake.in
sources that our CMake build system uses.

Teach the Makefile build system to generate the LLVMExports.cmake file
with content similar to that produced by the CMake install(EXPORT)
command.  Extend llvm-build with an option to generate the library
dependencies fragment for this file.

Contributed by Brad King.

llvm-svn: 201053
2014-02-09 16:37:02 +00:00
NAKAMURA Takumi
c16e56a234 Add version, arch, system libs, and targets to Makefile.config
Teach autoconf/configure.ac to AC_SUBST several additional values in
Makefile.config to make them available to Makefile code.  These will
be useful to generate CMake package modules from the Makefile build.

Contributed by Brad King.

llvm-svn: 201052
2014-02-09 16:36:42 +00:00
NAKAMURA Takumi
e9cd033887 Load exported lib and exe targets from LLVMConfig
Teach each package configuration file to load the LLVMExports file for
its corresponding tree.  This will allow application CMake code to use
logical library and executable target names from LLVM as if they were in
our own build process (e.g. LLVMSupport).  CMake will have enough
information to propagate LLVM library link dependencies automatically
while configuring applications.

Contributed by Brad King.

llvm-svn: 201051
2014-02-09 16:36:28 +00:00
NAKAMURA Takumi
0cff33c584 Export lib and exe build target names from build tree
Record every logical target that we install with install(TARGETS) in a
global LLVM_EXPORTS property.  Then use the export(TARGETS) command to
provide a "LLVMExports.cmake" file that exports logical targets for
import into applications directly from our build tree.

The "LLVMExports.cmake" file is not meant for direct inclusion by
application code but should be included by "LLVMConfig.cmake" in a
future change.

Contributed by Brad King.

llvm-svn: 201050
2014-02-09 16:36:16 +00:00
NAKAMURA Takumi
4994e358f4 Export lib and exe build target names from install tree
Use the install(TARGETS) command EXPORT option for every library and
executable that we install with LLVM.  Then use the install(EXPORT)
command to provide a "LLVMExports.cmake" file that exports logical
targets for import into applications from our install tree.

The "LLVMExports.cmake" file is not meant for direct inclusion by
application code but should be included by "LLVMConfig.cmake" in a
future change.

Contributed by Brad King.

llvm-svn: 201049
2014-02-09 16:36:03 +00:00
NAKAMURA Takumi
fb1a5cc259 Provide LLVMConfig in both build and install tree
Create separate package configuration files "LLVMConfig.cmake" for the
LLVM build and install trees so that each can have information specific
to its tree.  Configure each with the corresponding include, lib, and
cmake directories.  Include the "LLVM-Config" API modules directly from
the configured cmake modules directory.

In the install tree, compute the installation prefix relative to the
file location.  In the build tree, provide information specific to the
build tree for use by tools like Clang that can build externally against
the LLVM build tree.  Prefix such values in "LLVM_BUILD_" and comment
them as such.

Contributed by Brad King.

llvm-svn: 201048
2014-02-09 16:35:51 +00:00
NAKAMURA Takumi
222fa8edb4 Teach LLVMConfig to avoid modifying CMAKE_MODULE_PATH
Do not modify this value on the application's behalf and just ensure API
modules are always available next to the LLVMConfig module.  This is
already the case in the install tree so use file(COPY) to make it so in
the build tree.  Include the LLVM-Config API module from next to the
LLVMConfig location.

Contributed by Brad King.

llvm-svn: 201047
2014-02-09 16:35:40 +00:00
NAKAMURA Takumi
239899d5e0 De-duplicate references to share/llvm/cmake path
Use a LLVM_INSTALL_PACKAGE_DIR variable to hold the path and reference
it where necessary.

Contributed by Brad King.

llvm-svn: 201046
2014-02-09 16:35:29 +00:00
Benjamin Kramer
dd9c671cdc AsmParser: Parse (and ignore) nested .macro definitions.
This enables a slightly odd feature of gas. The macro is defined when
the outermost macro is instantiated.

PR18599

llvm-svn: 201045
2014-02-09 16:22:00 +00:00
Rafael Espindola
8815574a16 Use a consistent argument order in TargetLoweringObjectFile.
These methods normally call each other and it is really annoying if the
arguments are in different order. The more common rule was that the arguments
specific to call are first (GV, Encoding, Suffix) and the auxiliary objects
(Mang, TM) come after. This patch changes the exceptions.

llvm-svn: 201044
2014-02-09 14:50:44 +00:00
David Blaikie
3070639d19 Fix formatting introduced in r200941
llvm-svn: 201043
2014-02-09 09:49:29 +00:00
Craig Topper
66d9ce27f7 Remove unnecessary include.
llvm-svn: 201041
2014-02-09 07:55:19 +00:00
Craig Topper
8585eaa0e4 Remove some unnecessary code. The conditions it was checking had already been ruled out by the caller.
llvm-svn: 201039
2014-02-09 07:13:41 +00:00
Saleem Abdulrasool
e05d1e5d25 tools: cast the right operand
Properly apply the fix intended by SVN r201032.

llvm-svn: 201036
2014-02-09 03:13:07 +00:00
Sean Silva
be66b96ad6 [docs] [tblgen] clarify that code fragments are just string literals
Fun fact: looking at the TableGen code (around TGParser.cpp:1166), the
only difference in handling is that adjacent regular string literals are
concatenated in the parser.

llvm-svn: 201035
2014-02-09 02:54:26 +00:00
Sean Silva
aeed213757 [docs] [tblgen] There is no "code" type.
Code fragments are just fancy string literals.

llvm-svn: 201034
2014-02-09 02:54:15 +00:00
Sean Silva
9209adbc63 [docs] TableGen easter egg: Multiline string literals
They're called code fragments, but they are really multiline string
literals. Just spotted this usage in a patch by Aaron using "code
fragments" for holding documentation text. I remember someone bemoaning
the lack of multiline string literals in TableGen, so I'm explicitly
documenting that code fragments are multiline string literals.

Let it be known that any use case needing multiline string literals in
TableGen (such as descriptions of options, or whatnot) can use use
code fragments (instead of C-style string concatenation or exceedingly
long lines). E.g.

    class Bar<int n>;
    class Baz<int n>;
    class Doc<string desc> {
        string Desc = desc;
    }
    def Foo : Bar<1>, Baz<3>, Doc<[{
    This Foo is a Bar, and also a Baz. It can take 3 values:
        * Qux
        * Quux
        * Quuux
    }]>;

llvm-svn: 201033
2014-02-09 02:43:50 +00:00
Saleem Abdulrasool
8b7368c793 tools: explicitly cast to avoid a warning
llvm-svn: 201032
2014-02-09 01:12:21 +00:00
Saleem Abdulrasool
cf3459a929 tools: handle out-of-line personality 0 decoding
In some cases it is possible to have a personality 0 unwinding opcodes in the
extab (such as when .handlerdata is used in the assembly).  Simply decode the 3
opcodes for that case.

llvm-svn: 201030
2014-02-08 23:17:08 +00:00
Saleem Abdulrasool
832f6bfd62 ARM: change attribute tests to use parsed form
This makes the tests more readable by using the -arm-attributes decoding support
in llvm-readobj since that is now available.  Change the invocation commands to
be similar to other test and use a more precise triple (the tests only require
ARM EABI support).

llvm-svn: 201029
2014-02-08 23:17:02 +00:00
Arnold Schwaighofer
0bd2bb3092 LoopVectorizer: Keep track of conditional store basic blocks
Before conditional store vectorization/unrolling we had only one
vectorized/unrolled basic block. After adding support for conditional store
vectorization this will not only be one block but multiple basic blocks. The
last block would have the back-edge. I updated the code to use a vector of basic
blocks instead of a single basic block and fixed the users to use the last entry
in this vector. But, I forgot to add the basic blocks to this vector!

Fixes PR18724.

llvm-svn: 201028
2014-02-08 20:41:13 +00:00
Rafael Espindola
8d47aa1e4e Pass the Mangler by reference.
It is never null and it is not used in casts, so there is no reason to use a
pointer. This matches how we pass TM.

llvm-svn: 201025
2014-02-08 14:53:28 +00:00
Rafael Espindola
1d50d1310d Add LLVM_OVERRIDE to a few declarations.
llvm-svn: 201022
2014-02-08 06:07:27 +00:00
Juergen Ributzka
a44e3756e3 [Constant Hoisting] Fix insertion point for constant materialization.
The bitcast instruction during constant materialization was not placed correcly
in the presence of phi nodes. This commit fixes the insertion point to be in the
idom instead.

This fixes PR18768

llvm-svn: 201009
2014-02-08 00:20:49 +00:00
Juergen Ributzka
5435f3e6f6 [Constant Hoisting] Don't update the use list while traversing it - DOH!
This fix first traverses the whole use list of the constant expression and
keeps track of the instructions that need to be updated. Then perform the
fixup afterwards.

llvm-svn: 201008
2014-02-08 00:20:45 +00:00