summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Move the *PassPrinter into their own module.Eli Bendersky2014-02-10
| | | | | | | | | | | | These are self-contained in functionality so it makes sense to separate them, as opt.cpp has grown quite big already. Following Eric's suggestions, if this code is ever deemed useful outside of tools/opt, it will make sense to move it to one of the LLVM libraries like IR. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201116 91177308-0d34-0410-b5e6-96231b3b80d8
* [Stackmaps] Cleanup code. No functional change intended.Juergen Ributzka2014-02-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201115 91177308-0d34-0410-b5e6-96231b3b80d8
* LTO API: add lto_module_create_from_memory_with_path.Manman Ren2014-02-10
| | | | | | | | | | | | | | This function adds an extra path argument to lto_module_create_from_memory. The path argument will be passed to makeBuffer to make sure the MemoryBuffer has a name and the created module has a module identifier. This is mainly for emitting warning messages from the linker. When we emit warning message on a module, we can use the module identifier. rdar://15985737 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201114 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark the methods in the Mangler const.Rafael Espindola2014-02-10
| | | | | | | | | A const ObjectFile needs to be able to provide its name. For an IRObjectFile, that means being able to call the mangler. Since each IRObjectFile can have a different mangling, it is natural for them to contain a Mangler which is therefore also const. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201113 91177308-0d34-0410-b5e6-96231b3b80d8
* cmake: Do not export targets when installing toolchain onlyReid Kleckner2014-02-10
| | | | | | Patch by Brad King! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201111 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an old FIXME. LDPO_PIE is available since 2.23, realeased 2012-10-22.Rafael Espindola2014-02-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201110 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the begin and end methods in ObjectFile to match the style guide.Rafael Espindola2014-02-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201108 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: Implement isTruncateFreeMatt Arsenault2014-02-10
| | | | | | | Truncation is just accessing a subregister for any multiple of the register size, so it's free. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201107 91177308-0d34-0410-b5e6-96231b3b80d8
* [LPM] A terribly simple fix to a terribly complex bug: PR18773.Chandler Carruth2014-02-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The crux of the issue is that LCSSA doesn't preserve stateful alias analyses. Before r200067, LICM didn't cause LCSSA to run in the LTO pass manager, where LICM runs essentially without any of the other loop passes. As a consequence the globalmodref-aa pass run before that loop pass manager was able to survive the loop pass manager and be used by DSE to eliminate stores in the function called from the loop body in Adobe-C++/loop_unroll (and similar patterns in other benchmarks). When LICM was taught to preserve LCSSA it had to require it as well. This caused it to be run in the loop pass manager and because it did not preserve AA, the stateful AA was lost. Most of LLVM's AA isn't stateful and so this didn't manifest in most cases. Also, in most cases LCSSA was already running, and so there was no interesting change. The real kicker is that LCSSA by its definition (injecting PHI nodes only) trivially preserves AA! All we need to do is mark it, and then everything goes back to working as intended. It probably was blocking some other weird cases of stateful AA but the only one I have is a 1000-line IR test case from loop_unroll, so I don't really have a good test case here. Hopefully this fixes the regressions on performance that have been seen since that revision. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201104 91177308-0d34-0410-b5e6-96231b3b80d8
* Copy the ThreadLocalMode in GlobalVariable::copyAttributesFromHans Wennborg2014-02-10
| | | | | | This fixes the oversight from r159077. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201098 91177308-0d34-0410-b5e6-96231b3b80d8
* R600/SI: Initialize M0 and emit S_WQM_B64 whenever DS instructions are usedTom Stellard2014-02-10
| | | | | | | | | | | DS instructions that access local memory can only uses addresses that are less than or equal to the value of M0. When M0 is uninitialized, then we experience undefined behavior. This patch also changes the behavior to emit S_WQM_B64 on pixel shaders no matter what kind of DS instruction is used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201097 91177308-0d34-0410-b5e6-96231b3b80d8
* R600/SI: Only use S_WQM_B64 in pixel shadersTom Stellard2014-02-10
| | | | | | | | This doesn't change any functionality, since we only have two shader types (compute and pixel) that use local memory. We're just changing the logic to match the documentation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201096 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some prototype code accidentally committed in r201043David Blaikie2014-02-10
| | | | | | Thanks to Chandler for the catch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201095 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM: use natural LLVM IR for vshll instructionsTim Northover2014-02-10
| | | | | | | | Similarly to the vshrn instructions, these are simple zext/sext + trunc operations. Using normal LLVM IR should allow for better code, and more sharing with the AArch64 backend. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201093 91177308-0d34-0410-b5e6-96231b3b80d8
* [AArch64] Handle aliases of conditional branches without b.pred form.Chad Rosier2014-02-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201091 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM: r12 is callee-saved for interrupt handlersOliver Stannard2014-02-10
| | | | | | | | | 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". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201089 91177308-0d34-0410-b5e6-96231b3b80d8
* Make succ_iterator a real random access iterator and clean up a couple of users.Benjamin Kramer2014-02-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201088 91177308-0d34-0410-b5e6-96231b3b80d8
* GlobalsModRef: Unify and clean up duplicated pointer analysis code.Benjamin Kramer2014-02-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201087 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM: use LLVM IR to represent the vshrn operationTim Northover2014-02-10
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201085 91177308-0d34-0410-b5e6-96231b3b80d8
* Test commit - added a new line to vec_shuf-insert.ll.Robert Lougher2014-02-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201083 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips][msa] Add DLSA instruction.Matheus Almeida2014-02-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201081 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips][msa] Update FileCheck prefix in preparation forMatheus Almeida2014-02-10
| | | | | | | | | the addition of Mips64 tests. No functional changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201080 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Add dependencies to gtest.NAKAMURA Takumi2014-02-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201079 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips][msa] Make LSA_DESC a parameterizable class.Matheus Almeida2014-02-10
| | | | | | | | | | This way it's possible to share the instruction's description for LSA and DLSA (to be added). No functional changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201078 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] LLVMSupport should be responsible to provide system_libs.NAKAMURA Takumi2014-02-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201077 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix LLVM install rules to not set permissions on include/NAKAMURA Takumi2014-02-10
| | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201075 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Introduce llvm_add_library().NAKAMURA Takumi2014-02-10
| | | | | | | | | | | | | | | | | | | | | | | - 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201072 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] support for FreeBSD, LLVM part. patch by Viktor KutuzovKostya Serebryany2014-02-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201067 91177308-0d34-0410-b5e6-96231b3b80d8
* AVX-512: Fixed extract_vector_elt for v16i1 and v8i1 vectors.Elena Demikhovsky2014-02-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201066 91177308-0d34-0410-b5e6-96231b3b80d8
* Recommit r201059 and r201060 with hopefully a fix for its original failure.Craig Topper2014-02-10
| | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201065 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r201059 and r201060.Bob Wilson2014-02-10
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201064 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] LLVMProcessSources.cmake: Prune add_file_dependencies to ↵NAKAMURA Takumi2014-02-10
| | | | | | | | | ${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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201063 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Re-apply r200765, "Get rid of llvm_config() to expand dependencies."NAKAMURA Takumi2014-02-10
| | | | | | | | CMake's target_link_libraries() will manage dependencies with Brad's LLVMConfig improvements. Configuration time may be reduced by a few seconds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201062 91177308-0d34-0410-b5e6-96231b3b80d8
* [AArch64]Implement the copy of two FPR8 registers by using FMOVss of two ↵Hao Liu2014-02-10
| | | | | | FPR32 registers in copyPhysReg. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201061 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify a bunch of code by removing the need for the x86 disassembler table ↵Craig Topper2014-02-10
| | | | | | builder to know about extended opcodes. The modrm forms are sufficient to convey the information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201060 91177308-0d34-0410-b5e6-96231b3b80d8
* Add MRMXr/MRMXm form to X86 for use by instructions which treat the 'reg' ↵Craig Topper2014-02-10
| | | | | | field of modrm byte as a don't care value. Will allow for simplification of disassembler code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201059 91177308-0d34-0410-b5e6-96231b3b80d8
* MCParser: add a single token lookaheadSaleem Abdulrasool2014-02-09
| | | | | | | Some of the more complex directive and macro handling for GAS compatibility requires lookahead. Add a single token lookahead in the MCAsmLexer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201058 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove shell comment in the middle of a single-line command.Bob Wilson2014-02-09
| | | | | | | You can't put a comment in the middle of a command like this. This is invalid shell syntax and breaks the build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201057 91177308-0d34-0410-b5e6-96231b3b80d8
* AsmParser: Simplify code with ArrayRef.Benjamin Kramer2014-02-09
| | | | | | No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201055 91177308-0d34-0410-b5e6-96231b3b80d8
* Whitespace.NAKAMURA Takumi2014-02-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201054 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide CMake package modules in install treeNAKAMURA Takumi2014-02-09
| | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201053 91177308-0d34-0410-b5e6-96231b3b80d8
* Add version, arch, system libs, and targets to Makefile.configNAKAMURA Takumi2014-02-09
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201052 91177308-0d34-0410-b5e6-96231b3b80d8
* Load exported lib and exe targets from LLVMConfigNAKAMURA Takumi2014-02-09
| | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201051 91177308-0d34-0410-b5e6-96231b3b80d8
* Export lib and exe build target names from build treeNAKAMURA Takumi2014-02-09
| | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201050 91177308-0d34-0410-b5e6-96231b3b80d8
* Export lib and exe build target names from install treeNAKAMURA Takumi2014-02-09
| | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201049 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide LLVMConfig in both build and install treeNAKAMURA Takumi2014-02-09
| | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201048 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach LLVMConfig to avoid modifying CMAKE_MODULE_PATHNAKAMURA Takumi2014-02-09
| | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201047 91177308-0d34-0410-b5e6-96231b3b80d8
* De-duplicate references to share/llvm/cmake pathNAKAMURA Takumi2014-02-09
| | | | | | | | | Use a LLVM_INSTALL_PACKAGE_DIR variable to hold the path and reference it where necessary. Contributed by Brad King. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201046 91177308-0d34-0410-b5e6-96231b3b80d8
* AsmParser: Parse (and ignore) nested .macro definitions.Benjamin Kramer2014-02-09
| | | | | | | | | This enables a slightly odd feature of gas. The macro is defined when the outermost macro is instantiated. PR18599 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201045 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a consistent argument order in TargetLoweringObjectFile.Rafael Espindola2014-02-09
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201044 91177308-0d34-0410-b5e6-96231b3b80d8