summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove unnecessary test for Darwin and update testcase to be a little lessAdrian Prantl2014-03-071-1/+1
| | | | | | | horrible/fragile. rdar://problem/16264854 llvm-svn: 203309
* Add a virtual destructor to quiet a warning.Eric Christopher2014-03-071-0/+2
| | | | llvm-svn: 203307
* Actually add the header file.Eric Christopher2014-03-071-0/+69
| | | | llvm-svn: 203305
* Two part patch:Eric Christopher2014-03-073-102/+104
| | | | | | | | | | | | | | | First: refactor out the emission of entries into the .debug_loc section into its own routine. Second: add a new class ByteStreamer that can be used to either emit using an AsmPrinter or hash using DIEHash the series of bytes that would be emitted. Use this in all of the location emission routines for the .debug_loc section. No functional change intended outside of a few additional comments in verbose assembly. llvm-svn: 203304
* Add include guards and make public a few routines that add valuesEric Christopher2014-03-071-1/+11
| | | | | | to the hash. llvm-svn: 203303
* Revert "Remove unnecessary check for Darwin. rdar://problem/16264854"Adrian Prantl2014-03-071-1/+1
| | | | | | This breaks linux buildbots. Go figure. llvm-svn: 203300
* Remove unnecessary check for Darwin. rdar://problem/16264854Adrian Prantl2014-03-071-1/+1
| | | | llvm-svn: 203297
* DebugInfo: Use DW_FORM_data4 for DW_AT_high_pc in inlined functionsDavid Blaikie2014-03-071-2/+1
| | | | | | Suggested by Adrian Prantl in code review for r203187. llvm-svn: 203296
* [C++11] Convert sort predicates into lambdas.Benjamin Kramer2014-03-073-28/+9
| | | | | | No functionality change. llvm-svn: 203288
* Fix up formatting.Eric Christopher2014-03-071-9/+8
| | | | llvm-svn: 203286
* [C++11] DwarfDebug: Turn single-use functors into lambdas.Benjamin Kramer2014-03-071-25/+16
| | | | | | No functionality change. llvm-svn: 203276
* [C++11] DwarfDebug: Use range-based for loops.Benjamin Kramer2014-03-071-245/+116
| | | | | | It has a lot of them with complex types. C++11 really shines here. llvm-svn: 203270
* DebugInfo: Refactor high_pc/low_pc construction into reusable functionDavid Blaikie2014-03-072-6/+13
| | | | | | | For incoming improvements to inlined functions and lexical blocks suggested by Adrian Prantl in review of r203187. llvm-svn: 203263
* DebugInfo: Restrict DW_AT_high_pc encoding as data4 offset to DWARF 4 as per ↵David Blaikie2014-03-071-1/+1
| | | | | | | | spec Code review feedback to r203187 from Oliver Stannard. Thanks! llvm-svn: 203256
* CodeGenPrep: sink extends of illegal types into use block.Tim Northover2014-03-071-34/+58
| | | | | | | | | This helps the instruction selector to lower an i64 * i64 -> i128 multiplication into a single instruction on targets which support it. Patch by Manuel Jacob. llvm-svn: 203230
* Remove unused method.Craig Topper2014-03-071-2/+0
| | | | llvm-svn: 203221
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-0750-177/+178
| | | | | | class. llvm-svn: 203220
* MC: Remove superfluous section attribute flag definitionsDavid Majnemer2014-03-071-9/+9
| | | | | | | | | | | | | | | | | | | Summary: llvm/MC/MCSectionMachO.h and llvm/Support/MachO.h both had the same definitions for the section flags. Instead, grab the definitions out of support. No functionality change. Reviewers: grosbach, Bigcheese, rafael Reviewed By: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2998 llvm-svn: 203211
* Replace PROLOG_LABEL with a new CFI_INSTRUCTION.Rafael Espindola2014-03-078-27/+26
| | | | | | | | | | | | | | | | | | | | | | | The old system was fairly convoluted: * A temporary label was created. * A single PROLOG_LABEL was created with it. * A few MCCFIInstructions were created with the same label. The semantics were that the cfi instructions were mapped to the PROLOG_LABEL via the temporary label. The output position was that of the PROLOG_LABEL. The temporary label itself was used only for doing the mapping. The new CFI_INSTRUCTION has a 1:1 mapping to MCCFIInstructions and points to one by holding an index into the CFI instructions of this function. I did consider removing MMI.getFrameInstructions completelly and having CFI_INSTRUCTION own a MCCFIInstruction, but MCCFIInstructions have non trivial constructors and destructors and are somewhat big, so the this setup is probably better. The net result is that we don't create temporary labels that are never used. llvm-svn: 203204
* DebugInfo: Limit r203187 to non-darwin as lldb can't handle this yetDavid Blaikie2014-03-071-2/+5
| | | | llvm-svn: 203192
* Move some dwarf emission routines to AsmPrinterDwarf.cpp.Eric Christopher2014-03-072-156/+157
| | | | llvm-svn: 203191
* 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
OpenPOWER on IntegriCloud