summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAge
* [FastISel][X86] Add MachineMemOperand to load/store instructions.Juergen Ributzka2014-06-12
| | | | | | | | This commit adds MachineMemOperands to load and store instructions. This allows the peephole optimizer to fold load instructions. Unfortunatelly the peephole optimizer currently doesn't run at -O0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210858 91177308-0d34-0410-b5e6-96231b3b80d8
* [modules] The LLVM C API does not require C++!Richard Smith2014-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210842 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use 'using std::error_code' in include/llvm.Rafael Espindola2014-06-12
| | | | | | This should make sure that most new uses use the std prefix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210835 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove system_error.h.Rafael Espindola2014-06-12
| | | | | | | This is a minimal change to remove the header. I will remove the occurrences of "using std::error_code" in a followup patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210803 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove pimpl class from PassRegistry.Zachary Turner2014-06-12
| | | | | | | | | | | | | | | | | | | Since removeRegistrationListener is no longer called during static destruction, we can get rid of the pimpl in PassRegistry. This should clean up the code somewhat, increase clarity, and also allows us to put the Lock as a member of the class, instead of as a ManagedStatic. As part of this change, the PassInfo class is moved from PassSupport.h to its own file, to eliminate the otherwise circular header dependency between PassRegistry.h and PassSupport.h Reviewed by: rnk, dblaikie Differential Revision: http://reviews.llvm.org/D4107 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210793 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace llvm::error_code with std::error_code.Rafael Espindola2014-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210783 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't import make_error_code into the llvm namespace.Rafael Espindola2014-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210772 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid in-class initializer from r210747Alp Toker2014-06-12
| | | | | | Turns out MSVC doesn't like this. Sorry for the noise! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210749 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid anonymous namespace in header from r210747Alp Toker2014-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210748 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid redundant allocations in the linker optimisation hintAlp Toker2014-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210747 91177308-0d34-0410-b5e6-96231b3b80d8
* [FastISel] Add support for the stackmap intrinsic.Juergen Ributzka2014-06-12
| | | | | | This implements target-independent FastISel lowering for the stackmap intrinsic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210742 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't put generic_category in the llvm namespace.Rafael Espindola2014-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210737 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't import error_category into the llvm namespace.Rafael Espindola2014-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210733 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't import error_condition into the llvm namespace.Rafael Espindola2014-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210731 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some low hanging fruit from system_error.hRafael Espindola2014-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210728 91177308-0d34-0410-b5e6-96231b3b80d8
* Try to fix the mingw build.Rafael Espindola2014-06-12
| | | | | | | * MingW needs mapWindowsError. * MingW is missing some entries in std::errc, but we don't use them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210725 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not register and de-register PassRegistrationListeners duringZachary Turner2014-06-12
| | | | | | | | | | | | | | | | | construction and destruction. PassRegistrationListener is intended for use as a generic listener. In some cases, PassRegistrationListener-derived classes were being created, and automatically registered and de-registered in static constructors and destructors. Since ManagedStatics are destroyed prior to program shutdown, this leads to errors where an attempt is made to access a ManagedStatic that has already been destroyed. Reviewed by: rnk, dblaikie Differential Revision: http://reviews.llvm.org/D4106 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210724 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement get_magic with generic tools and inline it.Rafael Espindola2014-06-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210716 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused has_magic.Rafael Espindola2014-06-11
| | | | | | | This will allow inlining get_magic, which should in turn fix one of the mingw build problems after the switch to std::error_code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210712 91177308-0d34-0410-b5e6-96231b3b80d8
* Use std::error_code instead of llvm::error_code.Rafael Espindola2014-06-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea of this patch is to turn llvm/Support/system_error.h into a transitional header that just brings in the erorr_code api to the llvm namespace. I will remove it shortly afterwards. The cases where the general idea needed some tweaking: * std::errc is a namespace in msvc, so we cannot use "using std::errc". I could add an #ifdef, but there were not that many uses, so I just added std:: to them in this patch. * Template specialization had to be moved to the std namespace in this patch set already. * The msvc implementation of default_error_condition doesn't seem to provide the same transformations as we need. Not too surprising since the standard doesn't actually say what "equivalent" means. I fixed the problem by keeping our old mapping and using it at error_code construction time. Despite these shortcomings I think this is still a good thing. Some reasons: * The different implementations of system_error might improve over time. * It removes 925 lines of code from llvm already. * It removes 6313 bytes from the text segment of the clang binary when it is built with gcc and 2816 bytes when building with clang and libstdc++. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210687 91177308-0d34-0410-b5e6-96231b3b80d8
* Add AVX512 masked leadz instrinsic support.Cameron McInally2014-06-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210652 91177308-0d34-0410-b5e6-96231b3b80d8
* Create macro INITIALIZE_TM_PASS.Jiangning Liu2014-06-11
| | | | | | | | | Pass initialization requires to initialize TargetMachine for back-end specific passes. This commit creates a new macro INITIALIZE_TM_PASS to simplify this kind of initialization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210641 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert StringMapEntry::Create to use StringRef instead of start/end ↵Craig Topper2014-06-11
| | | | | | pointers. Simpliies all in tree call sites. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210638 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: add enumeration of WinEH data encodingSaleem Abdulrasool2014-06-11
| | | | | | | | | | | | | | | Most Windows platforms use auxiliary data for unwinding. This information is stored in the .pdata section. The encoding format for the data differs between architectures and Windows variants. Windows MIPS and Alpha use identical formats; Alpha64 is the same with different widths. Windows x86_64 and Itanium share the representation. All Windows CE entries are identical irrespective of the architecture. ARMv7 (Windows [NT] on ARM) has its own format. This enumeration will become the differentiator once the windows EH emission infrastructure is generalised, allowing us to emit the necessary unwinding information for Windows on ARM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210634 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: clang-format MCAsmInfoSaleem Abdulrasool2014-06-11
| | | | | | | Apply clang-format over the header. Reformat the docs to current LLVM style. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210633 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove windows_error.Rafael Espindola2014-06-11
| | | | | | | | | | MSVC doesn't seem to provide any is_error_code_enum enumeration for the windows errors. Fortunately very few places in llvm have to handle raw windows errors, so we can just construct the corresponding error_code directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210631 91177308-0d34-0410-b5e6-96231b3b80d8
* There is no posix_category in std, use generic_category.Rafael Espindola2014-06-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210630 91177308-0d34-0410-b5e6-96231b3b80d8
* CodeGen: refactor DwarfExceptionSaleem Abdulrasool2014-06-11
| | | | | | | | | | | | DwarfException served as a base class for exception handling directive emission. However, this is also used by other exception models (e.g. Win64EH). Rename this class to EHStreamer and split it out of DwarfException.h. NFC. Use the opportunity to fix up some of the documentation comments to match current LLVM style. Also rename some functions to conform better with current LLVM coding style. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210622 91177308-0d34-0410-b5e6-96231b3b80d8
* [FastISel][X86] Extend support for {s|u}{add|sub|mul}.with.overflow intrinsics.Juergen Ributzka2014-06-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210610 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Remove support for runtime multi-threading."Zachary Turner2014-06-10
| | | | | | This reverts revision r210600. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210603 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove support for runtime multi-threading.Zachary Turner2014-06-10
| | | | | | | | | | | | | | | | | | | | | This patch removes the functions llvm_start_multithreaded() and llvm_stop_multithreaded(), and changes llvm_is_multithreaded() to return a constant value based on the value of the compile-time definition LLVM_ENABLE_THREADS. Previously, it was possible to have compile-time support for threads on, and runtime support for threads off, in which case certain mutexes were not allocated or ever acquired. Now, if the build is created with threads enabled, mutexes are always acquired. A test before/after patch of compiling a very large TU showed no noticeable performance impact of this change. Reviewers: rnk Differential Revision: http://reviews.llvm.org/D4076 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210600 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark a few functions noexcept.Rafael Espindola2014-06-10
| | | | | | This reduces the difference between std::error_code and llvm::error_code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210591 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a LLVM_NOEXCEPT to Compiler.h.Rafael Espindola2014-06-10
| | | | | | This will be needed for the switch to std::error_code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210581 91177308-0d34-0410-b5e6-96231b3b80d8
* Have isInTailCallPosition take the DAG so that we can use theEric Christopher2014-06-10
| | | | | | | version of TargetLowering/Machine from there on the way to avoiding TargetMachine in TargetLowering. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210579 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typos.Eric Christopher2014-06-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210571 91177308-0d34-0410-b5e6-96231b3b80d8
* Use an enum class now that they are available.Rafael Espindola2014-06-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210566 91177308-0d34-0410-b5e6-96231b3b80d8
* [X86] AVX512: Add vmovntdqaAdam Nemet2014-06-10
| | | | | | Along with the corresponding intrinsic and tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210543 91177308-0d34-0410-b5e6-96231b3b80d8
* Condition codes AL and NV are invalid in the aliases that useArtyom Skrobov2014-06-10
| | | | | | | | | | | | | | | | inverted condition codes (CINC, CINV, CNEG, CSET, and CSETM). Matching aliases based on "immediate classes", when disassembling, wasn't previously supported, hence adding MCOperandPredicate into class Operand, and implementing the support for it in AsmWriterEmitter. The parsing for those aliases was already custom, so just adding the missing condition into AArch64AsmParser::parseCondCode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210528 91177308-0d34-0410-b5e6-96231b3b80d8
* Reorder Value and User fields to save 8 bytes of padding on 64-bitReid Kleckner2014-06-09
| | | | | | | | Reviewered by: rafael Differential Revision: http://reviews.llvm.org/D4073 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210501 91177308-0d34-0410-b5e6-96231b3b80d8
* SmallVector: support resize(N) with move-only typesDavid Blaikie2014-06-09
| | | | | | | | | | | | | | | Unfortunately there's no way to elegantly do this with pre-canned algorithms. Using a generating iterator doesn't work because you default construct for each element, then move construct into the actual slot (bad for copy but non-movable types, and a little unneeded overhead even in the move-only case), so just write it out manually. This solution isn't exception safe (if one of the element's ctors calls we don't fall back, destroy the constructed elements, and throw on - which std::uninitialized_fill does do) but SmallVector (and LLVM) isn't exception safe anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210495 91177308-0d34-0410-b5e6-96231b3b80d8
* Fold FEnv.h into the implementationAlp Toker2014-06-09
| | | | | | | | | | | | | | | | | | Support headers shouldn't use config.h definitions, and they should never be undefined like this. ConstantFolding.cpp was the only user of this facility and already includes config.h for other math features, so it makes sense to move the checks there at point of use. (The implicit config.h was also quite dangerous -- removing the FEnv.h include would have silently disabled math constant folding without causing any tests to fail. Need to investigate -Wundef once the cleanup is done.) This eliminates the last config.h include from LLVM headers, paving the way for more consistent configuration checks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210483 91177308-0d34-0410-b5e6-96231b3b80d8
* [DAG] Expose NoSignedWrap, NoUnsignedWrap and Exact flags to SelectionDAG.Andrea Di Biagio2014-06-09
| | | | | | | | | | | | | | | This patch modifies SelectionDAGBuilder to construct SDNodes with associated NoSignedWrap, NoUnsignedWrap and Exact flags coming from IR BinaryOperator instructions. Added a new SDNode type called 'BinaryWithFlagsSDNode' to allow accessing nsw/nuw/exact flags during codegen. Patch by Marcello Maggioni. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210467 91177308-0d34-0410-b5e6-96231b3b80d8
* Escape "@function" with \verbatim. [-Wdocumentation]NAKAMURA Takumi2014-06-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210443 91177308-0d34-0410-b5e6-96231b3b80d8
* SmallVector: More movable improvements - don't copy elements to make space ↵David Blaikie2014-06-08
| | | | | | | | when inserting repeated elements. Also split and improve tests a bit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210433 91177308-0d34-0410-b5e6-96231b3b80d8
* SmallVector: Move, don't copy, elements to make space for an insertion.David Blaikie2014-06-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210432 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some more moving-from-moved-from objects issues in SmallVectorDavid Blaikie2014-06-08
| | | | | | | | (& because it makes it easier to test, this also improves correctness/performance slightly by moving the last element in an insert operation, rather than copying it) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210429 91177308-0d34-0410-b5e6-96231b3b80d8
* AsmMatchers: Use unique_ptr to manage ownership of MCParsedAsmOperandDavid Blaikie2014-06-08
| | | | | | | | | | | | I saw at least a memory leak or two from inspection (on probably untested error paths) and r206991, which was the original inspiration for this change. I ran this idea by Jim Grosbach a few weeks ago & he was OK with it. Since it's a basically mechanical patch that seemed sufficient - usual post-commit review, revert, etc, as needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210427 91177308-0d34-0410-b5e6-96231b3b80d8
* Ensure SmallVector::insert doesn't overwrite the last element in the range ↵David Blaikie2014-06-08
| | | | | | | | | | | | | | with the already-moved-from value This would cause the last element in a range to be in a moved-from state after an insert at a non-end position, losing that value entirely in the process. Side note: move_backward is subtle. It copies [A, B) to C-1 and down. (the fact that it decrements both the second and third iterators before the first movement is the subtle part... kind of surprising, anyway) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210426 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove redundant typedef from MCAsmParserSemaCallbackAlp Toker2014-06-08
| | | | | | The last use has been removed in clang r210418. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210419 91177308-0d34-0410-b5e6-96231b3b80d8
* Make InlineAsmIdentifierInfo forward-declarableAlp Toker2014-06-08
| | | | | | This helps localize header inclusion in the frontend. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210417 91177308-0d34-0410-b5e6-96231b3b80d8