summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAge
* Add missing include.Benjamin Kramer2014-03-03
| | | | | | libstdc++ and libc++ pulled this in transitively so I didn't notice. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202753 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass to emit DWARF path discriminators.Diego Novillo2014-03-03
| | | | | | | | | | | | | | | | DWARF discriminators are used to distinguish multiple control flow paths on the same source location. When this happens, instructions across basic block boundaries will share the same debug location. This pass detects this situation and creates a new lexical scope to one of the two instructions. This lexical scope is a child scope of the original and contains a new discriminator value. This discriminator is then picked up from MCObjectStreamer::EmitDwarfLocDirective to be written on the object file. This fixes http://llvm.org/bugs/show_bug.cgi?id=18270. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202752 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Use std::tie to simplify compare operators.Benjamin Kramer2014-03-03
| | | | | | No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202751 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Remove the completely unnecessary requirement on SetVector'sChandler Carruth2014-03-03
| | | | | | | | | | | | remove_if that its predicate is adaptable. We don't actually need this, we can write a generic adapter for any predicate. This lets us remove some very wrong std::function usages. We should never be using std::function for predicates to algorithms. This incurs an *indirect* call overhead for every evaluation of the predicate, and makes it very hard to inline through. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202742 91177308-0d34-0410-b5e6-96231b3b80d8
* Add DWARF discriminator support to DILexicalBlocks.Diego Novillo2014-03-03
| | | | | | This adds support for emitting discriminators from DILexicalBlocks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202736 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-apply r202551, which introduced new PBQP solver.Lang Hames2014-03-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202735 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[C++11] Replace LLVM atomics with std::atomic."Benjamin Kramer2014-03-03
| | | | | | | Breaks the MSVC build. DataStream.cpp(44): error C2552: 'llvm::Statistic::Value' : non-aggregates cannot be initialized with initializer list git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202731 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replace LLVM atomics with std::atomic.Benjamin Kramer2014-03-03
| | | | | | | | | | | With C++11 we finally have a standardized way to specify atomic operations. Use them to replace the existing custom implemention. Sadly the translation is not entirely trivial as std::atomic allows more fine-grained control over the atomicity. I tried to preserve the old semantics as well as possible. Differential Revision: http://llvm-reviews.chandlerc.com/D2915 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202730 91177308-0d34-0410-b5e6-96231b3b80d8
* Add patch level to llvm version in CMake and AutoconfTom Stellard2014-03-03
| | | | | | | | | | The shared library generated by autoconf will now be called libLLVM-$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH)$(VERSION_SUFFIX).so and a symlink named libLLVM-$(VERSION_MAJOR).$(VERSION_MINOR)$(VERSION_SUFFIX).so will also be created in the install directory. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202720 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Add a basic block range view for RegionInfoTobias Grosser2014-03-03
| | | | | | This also switches the users in LLVM to ensure this functionality is tested. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202705 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] MSVC 2012 can't handle list-initialization that callsChandler Carruth2014-03-03
| | | | | | | | a constructor either. Just call the constructor directly. I'll look into making this work with aggregate initialization some other time (when I have someone with MSVC 2012 handy to test ideas). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202688 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Add two range adaptor views to User: operands andChandler Carruth2014-03-03
| | | | | | | | | | | | | | | | | | operand_values. The first provides a range view over operand Use objects, and the second provides a range view over the Value*s being used by those operands. The naming is "STL-style" rather than "LLVM-style" because we have historically named iterator methods STL-style, and range methods seem to have far more in common with their iterator counterparts than with "normal" APIs. Feel free to bikeshed on this one if you want, I'm happy to change these around if people feel strongly. I've switched code in SROA and LCG to exercise these mostly to ensure they work correctly -- we don't really have an easy way to unittest this and they're trivial. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202687 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Add an iterator_range class template. This is modeled on theChandler Carruth2014-03-03
| | | | | | | | | | | | | | | | | | | | proposed std::iterator_pair which was in committee suggested to move toward std::iterator_range. There isn't a formal paper yet, but there seems little disagreement within the committee at this point so it seems fine to provide our own version in the llvm namespace so we can easily build range adaptors for the numerous iterators in LLVM's interfaces. Note that I'm not really comfortable advocating a crazed range-based migration just yet. The range stuff is still in a great deal of flux in C++ and the committee hasn't entirely made up its mind (afaict) about how it will work. So I'm mostly trying to provide the minimal functionality needed to make writing easy and convenient range adaptors for range based for loops easy and convenient. ;] Subsequent patches will use this across the fundamental IR types, where there are iterator views. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202686 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Pass unique_ptr by value instead of &&.Ahmed Charles2014-03-03
| | | | | | Suggestion by Richard Smith. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202678 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unnecessary copy ctors.Benjamin Kramer2014-03-02
| | | | | | They didn't provide any value over the default ones but blocked move semantics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202664 91177308-0d34-0410-b5e6-96231b3b80d8
* Give APInt move semantics.Benjamin Kramer2014-03-02
| | | | | | | The interaction between defaulted operators and move elision isn't totally obvious, add a unit test so it doesn't break unintentionally. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202662 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replace llvm::tie with std::tie.Benjamin Kramer2014-03-02
| | | | | | The old implementation is no longer needed in C++11. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202644 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replace LLVM_STATIC_ASSERT with static_assert, we now haveChandler Carruth2014-03-02
| | | | | | access to it on all host toolchains. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202642 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replace llvm::next and llvm::prior with std::next and std::prev.Benjamin Kramer2014-03-02
| | | | | | Remove the old functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202636 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Clarify in the Compiler.h support macros and comments (andChandler Carruth2014-03-02
| | | | | | | assert it with an #error) that we require MSVC 2012; MSVC 2010 will no longer suffice. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202631 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Remove LLVM_FINAL and LLVM_OVERRIDE macros now that all their uses ↵Craig Topper2014-03-02
| | | | | | are gone. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202629 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch all uses of LLVM_OVERRIDE to just use 'override' directly.Craig Topper2014-03-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202621 91177308-0d34-0410-b5e6-96231b3b80d8
* Add back LLVM_FINAL macro. lld still needs it.Craig Topper2014-03-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202619 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch all uses of LLVM_FINAL to just use 'final', and remove the macro.Craig Topper2014-03-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202618 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Switch all uses of the llvm_move macro to use std::moveChandler Carruth2014-03-02
| | | | | | directly, and remove the macro. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202612 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Add support for OwningPtr<T> to be converted to and fromChandler Carruth2014-03-02
| | | | | | | | std::unique_ptr<T>. Patch by Ahmed Charles! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202609 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Expand and eliminate the LLVM_ENUM_INT_TYPE() macroAlp Toker2014-03-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202607 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Remove LLVM_HAS_CXX11_STDLIB now that it is just on.Chandler Carruth2014-03-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202587 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Remove LLVM_HAS_CXX11_TYPETRAITS now that it is a constant dueChandler Carruth2014-03-01
| | | | | | | | | to the build being C++11. There is clearly still plenty of simplification than can be done here by using standard type traits instead of rolling our own in many places. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202586 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Now that we're not using it, remove theChandler Carruth2014-03-01
| | | | | | LLVM_HAS_RVALUE_REFERENCES macro. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202585 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Remove the use of LLVM_HAS_RVALUE_REFERENCES from the rest ofChandler Carruth2014-03-01
| | | | | | the core LLVM libraries. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202582 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Remove the R-value reference #if usage from the ADT and SupportChandler Carruth2014-03-01
| | | | | | libraries. It is now always 1 in LLVM builds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202580 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Force the other C++11 standard library detection macros to beChandler Carruth2014-03-01
| | | | | | | on unconditionally. Continuing to break down the C++98 support, hopefully without breaking anything. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202579 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite a terrible comment about the machine model.Andrew Trick2014-03-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202576 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Turn off compiler-based detection of R-value references, relyingChandler Carruth2014-03-01
| | | | | | | | on the fact that we now build in C++11 mode with modern compilers. This should flush out any issues. If the build bots are happy with this, I'll GC all the code for coping without R-value references. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202574 91177308-0d34-0410-b5e6-96231b3b80d8
* Jumped the gun with r202551 and broke some bots that weren't yet C++11ified.Lang Hames2014-02-28
| | | | | | | | Reverting until the C++11 switch is complete. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202554 91177308-0d34-0410-b5e6-96231b3b80d8
* New PBQP solver, and updates to the PBQP graph.Lang Hames2014-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous PBQP solver was very robust but consumed a lot of memory, performed a lot of redundant computation, and contained some unnecessarily tight coupling that prevented experimentation with novel solution techniques. This new solver is an attempt to address these shortcomings. Important/interesting changes: 1) The domain-independent PBQP solver class, HeuristicSolverImpl, is gone. It is replaced by a register allocation specific solver, PBQP::RegAlloc::Solver (see RegAllocSolver.h). The optimal reduction rules and the backpropagation algorithm have been extracted into stand-alone functions (see ReductionRules.h), which can be used to build domain specific PBQP solvers. This provides many more opportunities for domain-specific knowledge to inform the PBQP solvers' decisions. In theory this should allow us to generate better solutions. In practice, we can at least test out ideas now. As a side benefit, I believe the new solver is more readable than the old one. 2) The solver type is now a template parameter of the PBQP graph. This allows the graph to notify the solver of any modifications made (e.g. by domain independent rules) without the overhead of a virtual call. It also allows the solver to supply policy information to the graph (see below). 3) Significantly reduced memory overhead. Memory management policy is now an explicit property of the PBQP graph (via the CostAllocator typedef on the graph's solver template argument). Because PBQP graphs for register allocation tend to contain many redundant instances of single values (E.g. the value representing an interference constraint between GPRs), the new RASolver class uses a uniquing scheme. This massively reduces memory consumption for large register allocation problems. For example, looking at the largest interference graph in each of the SPEC2006 benchmarks (the largest graph will always set the memory consumption high-water mark for PBQP), the average memory reduction for the PBQP costs was 400x. That's times, not percent. The highest was 1400x. Yikes. So - this is fixed. "PBQP: No longer feasting upon every last byte of your RAM". Minor details: - Fully C++11'd. Never copy-construct another vector/matrix! - Cute tricks with cost metadata: Metadata that is derived solely from cost matrices/vectors is attached directly to the cost instances themselves. That way if you unique the costs you never have to recompute the metadata. 400x less memory means 400x less cost metadata (re)computation. Special thanks to Arnaud de Grandmaison, who has been the source of much encouragement, and of many very useful test cases. This new solver forms the basis for future work, of which there's plenty to do. I will be adding TODO notes shortly. - Lang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202551 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a crasher where when we're attempting to replace a typeEric Christopher2014-02-28
| | | | | | | | | | during the finalization for CGDebugInfo in clang we would RAUW a type and it would result in a corrupted MDNode for an imported declaration. Testcase pending as reducing has been difficult. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202540 91177308-0d34-0410-b5e6-96231b3b80d8
* Drop libtool from llvm.Rafael Espindola2014-02-28
| | | | | | | We were only using it so find the shared library extension and nm. There are simpler ways to do those things :-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202524 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips] Implement NaCl sandboxing of indirect jumps:Sasa Stankovic2014-02-28
| | | | | | | | | | * Align targets of indirect jumps to instruction bundle boundaries (in MI layer). * Add masking instructions before indirect jumps (in MC layer). Differential Revision: http://llvm-reviews.chandlerc.com/D2847 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202479 91177308-0d34-0410-b5e6-96231b3b80d8
* Add 'remark' diagnostic type in LLVMTobias Grosser2014-02-28
| | | | | | | | | | | | A 'remark' is information that is not an error or a warning, but rather some additional information provided to the user. In contrast to a 'note' a 'remark' is an independent diagnostic, whereas a 'note' always depends on another diagnostic. A typical use case for remark nodes is information provided to the user, e.g. information provided by the vectorizer about loops that have been vectorized. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202474 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn static inline functions to inline, following Rafael's suggestionAlexey Samsonov2014-02-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202473 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that it is possible, use the mangler in IRObjectFile.Rafael Espindola2014-02-28
| | | | | | A really simple patch marks the end of a lot of yak shaving :-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202463 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename coff_pdata_x64 -> coff_runtime_function_x64.Rui Ueyama2014-02-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202460 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an OutPatFrag TableGen classHal Finkel2014-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately, it is currently impossible to use a PatFrag as part of an output pattern (the part of the pattern that has instructions in it) in TableGen. Looking at the current implementation, this was clearly intended to work (there is already code in place to expand patterns in the output DAG), but is currently broken by the baked-in type-checking assumption and the order in which the pattern fragments are processed (output pattern fragments need to be processed after the instruction definitions are processed). Fixing this is fairly simple, but requires some way of differentiating output patterns from the existing input patterns. The simplest way to handle this seems to be to create a subclass of PatFrag, and so that's what I've done here. As a simple example, this allows us to write: def crnot : OutPatFrag<(ops node:$in), (CRNOR $in, $in)>; def : Pat<(not i1:$in), (crnot $in)>; which captures the core use case: handling of repeated subexpressions inside of complicated output patterns. This will be used by an upcoming commit to the PowerPC backend. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202450 91177308-0d34-0410-b5e6-96231b3b80d8
* Object/COFF: Add a struct for the function table in .pdata.Rui Ueyama2014-02-27
| | | | | | | | This is the data structure listed on Microsoft PE/COFF Spec Revision 8.3, p. 80. The name of the struct is not mentioned in the Microsoft PE/COFF spec, so I made it up. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202438 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide a target override for the latest regalloc heuristic.Andrew Trick2014-02-27
| | | | | | | This is a temporary workaround for native arm linux builds: PR18996: Changing regalloc order breaks "lencod" on native arm linux builds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202433 91177308-0d34-0410-b5e6-96231b3b80d8
* Drive-by comment fix. This regalloc comment was not accurate.Andrew Trick2014-02-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202432 91177308-0d34-0410-b5e6-96231b3b80d8
* Add getter method to access Reloc::Model.Matheus Almeida2014-02-27
| | | | | | | | | | Some MC components like Target Streamers or Assembly Parsers may need to access the relocation model in order to expand some directives and/or assembly macros. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202418 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove MCPureStreamer.Rafael Espindola2014-02-27
| | | | | | | We moved MCJIT to use native object formats a long time ago and R600 now uses ELF, so it was dead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202408 91177308-0d34-0410-b5e6-96231b3b80d8