summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* 80-column fixups.Eric Christopher2014-03-071-6/+8
| | | | llvm-svn: 203190
* DebugInfo: Emit DW_TAG_subprogram's DW_AT_high_pc as an offset from the low_pcDavid Blaikie2014-03-073-1/+12
| | | | | | | This removes a relocation from each subprogram, reducing link times, etc. llvm-svn: 203187
* Remove shouldEmitUsedDirectiveFor.Rafael Espindola2014-03-062-19/+1
| | | | | | Clang now uses llvm.compiler.used for these cases. llvm-svn: 203174
* [X86] Teach the DAGCombiner how to fold a OR of two shufflevector nodes.Andrea Di Biagio2014-03-061-0/+54
| | | | | | | | | | | | | | | | | | | | | | This patch teaches the DAGCombiner how to fold a binary OR between two shufflevector into a single shuffle vector when possible. The rules are: 1. fold (or (shuf A, V_0, MA), (shuf B, V_0, MB)) -> (shuf A, B, Mask1) 2. fold (or (shuf A, V_0, MA), (shuf B, V_0, MB)) -> (shuf B, A, Mask2) The DAGCombiner can take advantage of the fact that OR is commutative and compute two possible shuffle masks (Mask1 and Mask2) for the resulting shuffle node. Before folding a dag according to either rule 1 or 2, DAGCombiner verifies that the resulting shuffle mask is legal for the target. DAGCombiner would firstly try to fold according to 1.; If not possible then it will try to fold according to 2. If both Mask1 and Mask2 are illegal then we conservatively don't fold the OR instruction. llvm-svn: 203156
* Constify a few things with DotDebugLocEntry.Eric Christopher2014-03-062-4/+4
| | | | llvm-svn: 203150
* Move DIEEntry handling inside the main switch statement.Eric Christopher2014-03-061-10/+6
| | | | | | No functional change. llvm-svn: 203142
* R600: Fix extloads from i8 / i16 to i64.Matt Arsenault2014-03-061-0/+15
| | | | | | | This appears to only be working for global loads. Private and local break for other reasons. llvm-svn: 203135
* Micro optimization: this code only needs to look at eh labels.Rafael Espindola2014-03-061-1/+1
| | | | llvm-svn: 203127
* Replace OwningPtr<T> with std::unique_ptr<T>.Ahmed Charles2014-03-0611-37/+27
| | | | | | | | | | This compiles with no changes to clang/lld/lldb with MSVC and includes overloads to various functions which are used by those projects and llvm which have OwningPtr's as parameters. This should allow out of tree projects some time to move. There are also no changes to libs/Target, which should help out of tree targets have time to move, if necessary. llvm-svn: 203083
* DebugInfo: Tag units as having been indexed in GNU pubnames by using a ↵David Blaikie2014-03-061-7/+1
| | | | | | | | | | DW_AT_GNU_pubnames of DW_FORM_flag(_present) rather than sec_offsets to the pubnames/types sections This is consistent with GDB ToT and reduces the number of relocations in (type and compile) units, substantially reducing relocations and debug size in fission + type units builds. llvm-svn: 203082
* DebugInfo: Shrink pubnames/pubtypes in the presence of type units by only ↵David Blaikie2014-03-062-10/+10
| | | | | | emitting pub sections for compile units llvm-svn: 203057
* Add some helpful comments on DIEValue types that we expect to hash.Eric Christopher2014-03-061-1/+4
| | | | llvm-svn: 203055
* [Layering] Move DebugInfo.h into the IR library where its implementationChandler Carruth2014-03-0618-18/+18
| | | | | | already lives. llvm-svn: 203046
* Rewrite the attribute hashing algorithm to use the type of the valueEric Christopher2014-03-061-32/+36
| | | | | | | | pointed to by the attribute, rather than the form as a first step to determining how to hash the values. No functional change intended. llvm-svn: 203044
* [Layering] Move DIBuilder.h into the IR library where its implementationChandler Carruth2014-03-063-3/+3
| | | | | | already lives. llvm-svn: 203038
* Remove the last of the special case code for emitting attributes.Eric Christopher2014-03-063-39/+26
| | | | | | | | This works by moving the existing code into the DIEValue hierarchy and using the DwarfDebug pointer off of the AsmPrinter to access any global information we need. llvm-svn: 203033
* constify a few accessors.Eric Christopher2014-03-061-3/+3
| | | | llvm-svn: 203032
* Remove special case in the DIEValue printing since it only existedEric Christopher2014-03-061-9/+5
| | | | | | for verbose asm. llvm-svn: 203031
* Add a DIELocList class to handle pointers into the location list.Eric Christopher2014-03-056-14/+81
| | | | | | | | This enables us to figure out where in the debug_loc section our locations are so that we can eventually hash them. It also helps remove some special case code in emission. No functional change. llvm-svn: 203018
* Always print the implicit .text at the start of an asm file.Rafael Espindola2014-03-051-1/+1
| | | | | | | | | | | | | | | | | Before llvm-mc would print it, but llc was assuming that it would produce another section changing directive before one was needed. That assumption is false with inline asm. Fixes PR19049. Another option would be to always create the section, but in the asm printer avoid printing sections changes during initialization. That would work, but * We do use the fact that llvm-mc prints it in testing. The tests can be changed if needed. * A quick poll on IRC suggest that most developers prefer the implicit .text to be printed. llvm-svn: 203001
* [Layering] Move DebugLoc.h into the IR library. The implementationChandler Carruth2014-03-054-4/+4
| | | | | | | | | | | already lived there and it is where it belongs -- this is the in-memory debug location representation. This is just cleanup -- Modules can actually cope with this, but that doesn't make it right. After chatting with folks that have out-of-tree stuff, going ahead and moving the rest of the headers seems preferable. llvm-svn: 202960
* [C++11] Replace OwningPtr::take() with OwningPtr::release().Ahmed Charles2014-03-052-5/+5
| | | | llvm-svn: 202957
* Make stackmap machineinstrs clobber the scratch regs too.Andrew Trick2014-03-051-4/+10
| | | | | | | | | | | | | Patchpoints already did this. Doing it for stackmaps is a convenience for the runtime in the event that it needs to scratch register to patch or perform a runtime call thunk. Unlike patchpoints, we just assume the AnyRegCC calling convention. This is the only language and target independent calling convention specific to stackmaps so makes sense. Although the calling convention is not currently used to select the scratch registers. llvm-svn: 202943
* Fix unused variable in FunctionLoweringInfo.cppHans Wennborg2014-03-051-1/+1
| | | | llvm-svn: 202932
* Check for dynamic allocas and inline asm that clobbers sp before buildingHans Wennborg2014-03-053-9/+45
| | | | | | | | | | | | | | | | | | | selection dag (PR19012) In X86SelectionDagInfo::EmitTargetCodeForMemcpy we check with MachineFrameInfo to make sure that ESI isn't used as a base pointer register before we choose to emit rep movs (which clobbers esi). The problem is that MachineFrameInfo wouldn't know about dynamic allocas or inline asm that clobbers the stack pointer until SelectionDAGBuilder has encountered them. This patch fixes the problem by checking for such things when building the FunctionLoweringInfo. Differential Revision: http://llvm-reviews.chandlerc.com/D2954 llvm-svn: 202930
* Make the DIEValue constructor even more explicit.Eric Christopher2014-03-051-6/+6
| | | | llvm-svn: 202926
* Use a bool for whether or not an abbreviation has children rather thanEric Christopher2014-03-053-16/+17
| | | | | | | using a full uint16_t with the flag value... which happens to be 0 or 1. Update the class for bool values and rename functions slightly. llvm-svn: 202921
* Use dwarf::Attribute instead of a bare uint16_t.Eric Christopher2014-03-052-2/+2
| | | | llvm-svn: 202920
* Expand slightly on comment.Eric Christopher2014-03-051-1/+2
| | | | llvm-svn: 202919
* Unindent namespace.Eric Christopher2014-03-051-414/+436
| | | | llvm-svn: 202918
* [DAGCombiner] Factor out distributeTruncateThroughAndAdam Nemet2014-03-041-47/+42
| | | | | | | | | Currently this code is duplicated across visitSHL, visitSRA and visitSRL. The plan is to add rotates as clients to this new function. There is no functional change intended here. llvm-svn: 202908
* [Modules] Move the LeakDetector header into the IR library where theChandler Carruth2014-03-041-1/+1
| | | | | | | | | | | source file had already been moved. Also move the unittest into the IR unittest library. This may seem an odd thing to put in the IR library but we only really use this with instructions and it needs the LLVM context to work, so it is intrinsically tied to the IR library. llvm-svn: 202842
* [Modules] Move CFG.h to the IR library as it defines graph traits overChandler Carruth2014-03-041-1/+1
| | | | | | IR types. llvm-svn: 202827
* [Modules] Move ValueMap to the IR library. While this class does notChandler Carruth2014-03-041-1/+1
| | | | | | | | | | | | directly care about the Value class (it is templated so that the key can be any arbitrary Value subclass), it is in fact concretely tied to the Value class through the ValueHandle's CallbackVH interface which relies on the key type being some Value subclass to establish the value handle chain. Ironically, the unittest is already in the right library. llvm-svn: 202824
* [Modules] Move ValueHandle into the IR library where Value itself lives.Chandler Carruth2014-03-042-2/+2
| | | | | | | | | | | Move the test for this class into the IR unittests as well. This uncovers that ValueMap too is in the IR library. Ironically, the unittest for ValueMap is useless in the Support library (honestly, so was the ValueHandle test) and so it already lives in the IR unittests. Mmmm, tasty layering. llvm-svn: 202821
* [Modules] Move the LLVM IR pattern match header into the IR library, itChandler Carruth2014-03-041-1/+1
| | | | | | obviously is coupled to the IR. llvm-svn: 202818
* [Modules] Move CallSite into the IR library where it belogs. It isChandler Carruth2014-03-045-5/+5
| | | | | | | abstracting between a CallInst and an InvokeInst, both of which are IR concepts. llvm-svn: 202816
* [Modules] Move GetElementPtrTypeIterator into the IR library. As itsChandler Carruth2014-03-041-1/+1
| | | | | | | | | name might indicate, it is an iterator over the types in an instruction in the IR.... You see where this is going. Another step of modularizing the support library. llvm-svn: 202815
* [cleanup] Re-sort all the includes with utils/sort_includes.py.Chandler Carruth2014-03-047-8/+8
| | | | llvm-svn: 202811
* [C++11] Use std::tie to simplify compare operators.Benjamin Kramer2014-03-031-3/+2
| | | | | | No functionality change. llvm-svn: 202751
* Add DWARF discriminator support to DILexicalBlocks.Diego Novillo2014-03-031-1/+4
| | | | | | This adds support for emitting discriminators from DILexicalBlocks. llvm-svn: 202736
* Re-apply r202551, which introduced new PBQP solver.Lang Hames2014-03-031-38/+38
| | | | llvm-svn: 202735
* [C++11] Replace llvm::tie with std::tie.Benjamin Kramer2014-03-0213-58/+58
| | | | | | The old implementation is no longer needed in C++11. llvm-svn: 202644
* [C++11] Replace llvm::next and llvm::prior with std::next and std::prev.Benjamin Kramer2014-03-0248-179/+177
| | | | | | Remove the old functions. llvm-svn: 202636
* Switch all uses of LLVM_OVERRIDE to just use 'override' directly.Craig Topper2014-03-023-50/+50
| | | | llvm-svn: 202621
* Switch all uses of LLVM_FINAL to just use 'final', and remove the macro.Craig Topper2014-03-021-1/+1
| | | | llvm-svn: 202618
* [C++11] Switch all uses of the llvm_move macro to use std::moveChandler Carruth2014-03-021-3/+3
| | | | | | directly, and remove the macro. llvm-svn: 202612
* [C++11] Expand and eliminate the LLVM_ENUM_INT_TYPE() macroAlp Toker2014-03-022-2/+2
| | | | llvm-svn: 202607
* Make helper function static.Benjamin Kramer2014-03-011-2/+1
| | | | llvm-svn: 202596
* Now that we have C++11, turn simple functors into lambdas and remove a ton ↵Benjamin Kramer2014-03-014-65/+26
| | | | | | | | of boilerplate. No intended functionality change. llvm-svn: 202588
OpenPOWER on IntegriCloud