summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAge
* Add a new subtarget hook for whether or not we'd like to enableEric Christopher2014-06-19
| | | | | | | | | the atomic load linked expander pass to run for a particular subtarget. This requires a check of the subtarget and so save the TargetMachine rather than only TargetLoweringInfo and update all callers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211314 91177308-0d34-0410-b5e6-96231b3b80d8
* Include Threading.h instead of forward declaring a function.Zachary Turner2014-06-19
| | | | | | | | Previously this led to a circular header dependency, but a recent change has since removed this dependency, so the correct fix is to simply include the header rather than forward declare. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211311 91177308-0d34-0410-b5e6-96231b3b80d8
* Add StringMap::insert(pair) consistent with the standard associative ↵David Blaikie2014-06-19
| | | | | | | | container concept. Patch by Agustín Bergé. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211309 91177308-0d34-0410-b5e6-96231b3b80d8
* Support: Add llvm::sys::fs::copy_fileJustin Bogner2014-06-19
| | | | | | A function to copy one file's contents to another. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211302 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove circular header reference in Threading.h/Mutex.hDavid Blaikie2014-06-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211290 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix build on non-Windows platforms.Zachary Turner2014-06-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211288 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove support for LLVM runtime multi-threading.Zachary Turner2014-06-19
| | | | | | | | | | | | | After a number of previous small iterations, the functions llvm_start_multithreaded() and llvm_stop_multithreaded() have been reduced essentially to no-ops. This change removes them entirely. Reviewed by: rnk, dblaikie Differential Revision: http://reviews.llvm.org/D4216 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211287 91177308-0d34-0410-b5e6-96231b3b80d8
* [ValueTracking] Extend range metadata to call/invokeJingyue Wu2014-06-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: With this patch, range metadata can be added to call/invoke including IntrinsicInst. Previously, it could only be added to load. Rename computeKnownBitsLoad to computeKnownBitsFromRangeMetadata because range metadata is not only used by load. Update the language reference to reflect this change. Test Plan: Add several tests in range-2.ll to confirm the verifier is happy with having range metadata on call/invoke. Add two tests in AddOverFlow.ll to confirm annotating range metadata to call/invoke can benefit InstCombine. Reviewers: meheff, nlewycky, reames, hfinkel, eliben Reviewed By: eliben Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D4187 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211281 91177308-0d34-0410-b5e6-96231b3b80d8
* Kill the LLVM global lock.Zachary Turner2014-06-19
| | | | | | | | | | | | | | This patch removes the LLVM global lock, and updates all existing users of the global lock to use their own mutex. None of the existing users of the global lock were protecting code that was mutually exclusive with any of the other users of the global lock, so its purpose was not being met. Reviewed by: rnk Differential Revision: http://reviews.llvm.org/D4142 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211277 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit DWARF info for all code section in an assembly fileOliver Stannard2014-06-19
| | | | | | | | | | Currently, when using llvm as an assembler, DWARF debug information is only generated for the .text section. This patch modifies this so that DWARF info is emitted for all executable sections. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211273 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit DWARF3 call frame information when DWARF3+ debug info is requestedOliver Stannard2014-06-19
| | | | | | | | | | | | | | | | | | Currently, llvm always emits a DWARF CIE with a version of 1, even when emitting DWARF 3 or 4, which both support CIE version 3. This patch makes it emit the newer CIE version when we are emitting DWARF 3 or 4. This will not reduce compatibility, as we already emit other DWARF3/4 features, and is worth doing as the DWARF3 spec removed some ambiguities in the interpretation of call frame information. It also fixes a minor bug where the "return address" field of the CIE was encoded as a ULEB128, which is only valid when the CIE version is 3. There are no test changes for this, because (as far as I can tell) none of the platforms that we test have a return address register with a DWARF register number >127. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211272 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove OwningPtr.h and associated testsAlp Toker2014-06-19
| | | | | | llvm::OwningPtr is superseded by std::unique_ptr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211259 91177308-0d34-0410-b5e6-96231b3b80d8
* Move -dwarf-version to an MC level command line option so it'sEric Christopher2014-06-19
| | | | | | | used by all of the MC level tools and codegen. Fix up all uses in the compiler to use this and set it on the context accordingly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211257 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert some assert(0) to llvm_unreachable or fold an 'if' condition into ↵Craig Topper2014-06-19
| | | | | | the assert. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211254 91177308-0d34-0410-b5e6-96231b3b80d8
* R600/SI: Add intrinsics for various math instructions.Matt Arsenault2014-06-19
| | | | | | | | These will be used for custom lowering and for library implementations of various math functions, so it's useful to expose these as builtins. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211247 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix breakage from r211244 by using LLVM_EXPLICIT to avoid using explicit ↵David Blaikie2014-06-19
| | | | | | operators under MSVC where they're not supported. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211246 91177308-0d34-0410-b5e6-96231b3b80d8
* PR10140 - StringPool's PooledStringPtr has non-const operator== causing bad ↵Nikola Smiljanic2014-06-19
| | | | | | | | OR-result. Mark conversion operator explicit and const qualify comparison operators. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211244 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a symbols() range and use a range loop.Rafael Espindola2014-06-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211222 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace Execution Engine's mutex with std::recursive_mutex.Zachary Turner2014-06-18
| | | | | | | | | | | | | This change has a bit of a trickle down effect due to the fact that there are a number of derived implementations of ExecutionEngine, and that the mutex is not tightly encapsulated so is used by other classes directly. Reviewed by: rnk Differential Revision: http://reviews.llvm.org/D4196 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211214 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove BitcodeReader::setBufferOwned.Rafael Espindola2014-06-18
| | | | | | | | | | We do have use cases for the bitcode reader owning the buffer or not, but we always know which one we have when we construct it. It might be possible to simplify this further, but this is a step in the right direction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211205 91177308-0d34-0410-b5e6-96231b3b80d8
* Update to the latest registered ELF e_machine names and values.Rafael Espindola2014-06-18
| | | | | | Patch by John Wolf! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211202 91177308-0d34-0410-b5e6-96231b3b80d8
* ProfileData: Fix copy-paste type in RawInstrProfReaderJustin Bogner2014-06-18
| | | | | | | | These deleted definitions had the wrong types. Patch by Alex L! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211199 91177308-0d34-0410-b5e6-96231b3b80d8
* [ARM] [MC] Refactor the constant pool classesWeiming Zhao2014-06-18
| | | | | | | | | | | | | ARMTargetStreamer implements ConstantPool and AssmeblerConstantPools to keep track of assembler-generated constant pools that are used for ldr-pseudo. When implementing ldr-pseudo for AArch64, these two classes can be reused. So this patch factors them out from ARM target to the general MC lib. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211198 91177308-0d34-0410-b5e6-96231b3b80d8
* ADT: correct typo in commentEd Maste2014-06-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211196 91177308-0d34-0410-b5e6-96231b3b80d8
* Support LE in RelocVisitor::visitELF_PPC64_*Ulrich Weigand2014-06-18
| | | | | | | | | | Since we now support both LE and BE PPC64 variants, use of getAddend64BE is no longer correct. Use the generic getELFRelocationAddend instead, as was already done for Mips. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211170 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Random Number Generator (llvm)"JF Bastien2014-06-18
| | | | | | | | This reverts commit cccba093090d127e0b6d17473b14c264c14c5259. It causes build breakage. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211146 91177308-0d34-0410-b5e6-96231b3b80d8
* Random Number Generator (llvm)JF Bastien2014-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Provides an abstraction for a random number generator (RNG) that produces a stream of pseudo-random numbers. The current implementation uses C++11 facilities and is therefore not cryptographically secure. The RNG is salted with the text of the current command line invocation. In addition, a user may specify a seed (reproducible builds). In clang, the seed can be set via -frandom-seed=X In the back end, the seed can be set via -rng-seed=X This is the llvm part of the patch. clang part: D3391 Reviewers: ahomescu, rinon, nicholas, jfb Reviewed By: jfb Subscribers: jfb, perl Differential Revision: http://reviews.llvm.org/D3390 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211145 91177308-0d34-0410-b5e6-96231b3b80d8
* Move SetTheory from utils/TableGen into lib/TableGen so Clang can use it.James Molloy2014-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211100 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an overload for SourceMgr::PrintMessage that takes an existing diagnostic.Jordan Rose2014-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211087 91177308-0d34-0410-b5e6-96231b3b80d8
* Modernize doc comments for SourceMgr.Jordan Rose2014-06-17
| | | | | | No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211086 91177308-0d34-0410-b5e6-96231b3b80d8
* Expose ValueMap's mutex type as a typedef instead of a sys::Mutex.Zachary Turner2014-06-17
| | | | | | | | This enables static polymorphism of the mutex type, which is necessary in order to replace the standard mutex implementation with a different type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211080 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r211066, 211067, 211068, 211069, 211070.Zachary Turner2014-06-16
| | | | | | | These were committed accidentally from the wrong branch before having a review sign-off. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211072 91177308-0d34-0410-b5e6-96231b3b80d8
* Kill the LLVM global lock.Zachary Turner2014-06-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211069 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some code churn.Zachary Turner2014-06-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211068 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some more code out into a separate CL.Zachary Turner2014-06-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211067 91177308-0d34-0410-b5e6-96231b3b80d8
* Users of the llvm global mutex must now acquire it manually.Zachary Turner2014-06-16
| | | | | | This allows the mutex to be acquired in a guarded, RAII fashion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211066 91177308-0d34-0410-b5e6-96231b3b80d8
* AArch64: Add backend intrinsic for rbit.Jim Grosbach2014-06-16
| | | | | | | | | Define an intrinsic for the frontend to use and pattern match it to the RBIT instruction. rdar://9283021 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211058 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM: intrinsic support for rbit.Jim Grosbach2014-06-16
| | | | | | | | | We already have an ARMISD node. Create an intrinsic to map to it so we can add support for the frontend __rbit() intrinsic. rdar://9283021 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211057 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up some unnecessary mutex guards.Zachary Turner2014-06-16
| | | | | | | | | | | | | | | These were being used as unreferenced parameters to enforce that the methods must not be called without holding a mutex, but all of the methods in question were internal, and the methods were only exposed through an interface whose entire purpose was to serialize access to these structures, so expecting the methods to be accessed under a mutex is reasonable enough. Reviewed by: blaikie Differential Revision: http://reviews.llvm.org/D4162 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211054 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert the Archive API to use ErrorOr.Rafael Espindola2014-06-16
| | | | | | | | | Now that we have c++11, even things like ErrorOr<std::unique_ptr<...>> are easy to use. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211033 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/ConvertUTF: implement U+FFFD insertion according to the recommendationDmitri Gribenko2014-06-16
| | | | | | | | | | given in the Unicode spec That is, replace every maximal subpart of an ill-formed subsequence with one U+FFFD. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211015 91177308-0d34-0410-b5e6-96231b3b80d8
* Add specialization of FoldingSetTrait for std::pair.Manuel Klimek2014-06-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210990 91177308-0d34-0410-b5e6-96231b3b80d8
* Using llvm::sys::swapByteOrder() for the common case of byte-swapping a ↵Artyom Skrobov2014-06-14
| | | | | | value in place git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210978 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding llvm::sys::swapByteOrder() for the common use-case of byte-swapping a ↵Artyom Skrobov2014-06-14
| | | | | | value in place git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210976 91177308-0d34-0410-b5e6-96231b3b80d8
* Renaming SwapByteOrder() to getSwappedBytes()Artyom Skrobov2014-06-14
| | | | | | | | The next commit will add swapByteOrder(), acting in-place git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210973 91177308-0d34-0410-b5e6-96231b3b80d8
* Move GlobalMerge from Transform to CodeGen.Jiangning Liu2014-06-13
| | | | | | | | | | | This patch is to move GlobalMerge pass from Transform/Scalar to CodeGen, because GlobalMerge depends on TargetMachine. In the mean time, the macro INITIALIZE_TM_PASS is also moved to CodeGen/Passes.h. With this fix we can avoid making libScalarOpts depend on libCodeGen. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210951 91177308-0d34-0410-b5e6-96231b3b80d8
* The hazard recognizer only needs a subtarget, not a target machineEric Christopher2014-06-13
| | | | | | so make it take one. Fix up all users accordingly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210948 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the error-handling functions thread-safe.Zachary Turner2014-06-13
| | | | | | | | | | | | | Prior to this change, error handling functions must be installed and removed only inside of an llvm_[start/stop]_multithreading pair. This change allows error handling functions to be installed any time, and from any thread. Reviewed by: chandlerc Differential Revision: http://reviews.llvm.org/D4140 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210937 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove top-level Clang -fsanitize= flags for optional ASan features.Alexey Samsonov2014-06-13
| | | | | | | | | | | | | | Init-order and use-after-return modes can currently be enabled by runtime flags. use-after-scope mode is not really working at the moment. The only problem I see is that users won't be able to disable extra instrumentation for init-order and use-after-scope by a top-level Clang flag. But this instrumentation was implicitly enabled for quite a while and we didn't hear from users hurt by it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210924 91177308-0d34-0410-b5e6-96231b3b80d8
* Finishing touch for the std::error_code transition.Rafael Espindola2014-06-13
| | | | | | | | | | | While std::error_code itself seems to work OK in all platforms, there are few annoying differences with regards to the std::errc enumeration. This patch adds a simple llvm enumeration, which will hopefully avoid build breakages in other platforms and surprises as we get more uses of std::error_code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210920 91177308-0d34-0410-b5e6-96231b3b80d8