summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Optimize concat_vectors(X, undef) -> scalar_to_vector(X).Nadav Rotem2013-10-251-1/+28
| | | | | | | This optimization is not SSE specific so I am moving it to DAGco. The new scalar_to_vector dag node exposed a missing pattern in the AArch64 target that I needed to add. llvm-svn: 193393
* MCStreamer: Reimplement the virtual EmitRawText as a protected member, ↵David Blaikie2013-10-241-1/+1
| | | | | | | | | | EmitRawTextImpl, to avoid string literal ambiguities Also improve the implementation of EmitRawText(Twine) so it doesn't bother using the SmallString buffer if the Twine is a simple StringRef anyway. llvm-svn: 193378
* DWARF emission: Remove unnecessary/redundant DIE reference codeDavid Blaikie2013-10-241-7/+0
| | | | | | The default case at the end of the switch handles this just fine. llvm-svn: 193374
* Fix name of variable in comment.Eric Christopher2013-10-241-1/+1
| | | | llvm-svn: 193373
* Grammar.Eric Christopher2013-10-241-1/+1
| | | | llvm-svn: 193372
* Update misleading comment.Eric Christopher2013-10-241-2/+3
| | | | llvm-svn: 193371
* DIEHash: Const correct and use references where non-null/non-rebound.David Blaikie2013-10-243-49/+49
| | | | llvm-svn: 193363
* DIEHash: Do not use shallow type hashing for unnamed typesDavid Blaikie2013-10-241-4/+6
| | | | llvm-svn: 193361
* DIEHash: Refactor ref attribute hashing into smaller functionsDavid Blaikie2013-10-243-68/+98
| | | | llvm-svn: 193360
* Remove unused debug-only member variable.David Blaikie2013-10-241-4/+0
| | | | | | | This may've been used at some point but the 'print' member function grew an Indent parameter that entirely shadows this parameter. llvm-svn: 193358
* Debug Info: code clean up.Manman Ren2013-10-232-31/+23
| | | | | | | | | | | Since we never insert DIE for DITemplateTypeParameter to a map, there is no need to call getDIE in getOrCreateTemplateTypeParameterDIE. It is also renamed to constructTemplateTypeParameterDIE to match with other construct functions in CompileUnit. Same applies to getOrCreateTemplateValueParameterDIE. llvm-svn: 193287
* Debug Info: code clean up.Manman Ren2013-10-232-5/+5
| | | | | | | Rename createMemberDIE to constructMemberDIE to match other construct functions in CompileUnit. llvm-svn: 193286
* Debug Info: code clean up.Manman Ren2013-10-232-18/+12
| | | | | | | Remove the unneeded return values from createMemberDIE, constructEnumTypeDIE, getOrCreateTemplateTypeParameterDIE, and getOrCreateTemplateValueParameterDIE. llvm-svn: 193285
* Debug Info: code clean up.Manman Ren2013-10-232-18/+18
| | | | | | | | | Unifying the argument ordering of private construct functions in CompileUnit to follow constructTypeDIE(DIE &, DIBasicType), constructTypeDIE(DIE &, DIDerivedType), constructTypeDIE(DIE &, DICompositeType), constructSubrangeDIE and constructArrayTypeDIE. llvm-svn: 193284
* Remove {} from one-line block.Manman Ren2013-10-231-2/+1
| | | | llvm-svn: 193276
* Reduce casting and use a fully covered switch.Rafael Espindola2013-10-231-9/+14
| | | | llvm-svn: 193272
* SelectionDAG: Pass along the original argument/element type in ISD::InputArgTom Stellard2013-10-232-6/+9
| | | | | | | | | | | | | | | | For some targets, it is useful to be able to look at the original type of an argument without having to dig through the original IR. This also fixes a bug in SelectionDAGBuilder where InputArg.PartOffset was not taking into account the offset of structure elements. Patch by: Justin Holewinski Tom Stellard: - Changed the type of ArgVT to EVT, so it can store non-simple types like v3i32. llvm-svn: 193214
* Debug Info: code clean up.Manman Ren2013-10-221-7/+1
| | | | | | | | | | | Remove unnecessary creation of LexicalScope in collectDeadVariables. The created LexicialScope was only used to get isAbstractScope, which should be false from the creation: "new LexicalScope(NULL, DIDescriptor(SP), NULL, false);". We can also remove a DenseMap that holds the created LexicalScopes. llvm-svn: 193196
* DIEHashing: Provide an assert for unreachable functionality regarding friends.David Blaikie2013-10-221-0/+3
| | | | | | | | | | | | | Since (as of r190716) Clang no longer emits debug info for C++ friend declarations (and it seems GCC never has/does, which was the motivation for the Clang change), there's no actual reachable case for implementing the part of DWARF 4, Section 7.27 part 5 that pertains to friends. Leave an assert here so that if/when we do have a client producing friends and using type units, we can fill in the gap and add appropriate (unit and feature) tests. llvm-svn: 193193
* DWARF type hashing: pointers to membersDavid Blaikie2013-10-221-11/+14
| | | | | | | | | Includes a test case/FIXME demonstrating a bug/limitation in pointer to member hashing. To be honest I'm not sure why we don't just always use summary hashing for referenced types... but perhaps I'm missing something. llvm-svn: 193175
* Using FoldingSet in SelectionDAG::getVTList.Wan Xiaofei2013-10-221-59/+64
| | | | | | | | | | VTList has a long life cycle through the module and getVTList is frequently called. In current getVTList, sequential search over a std::vector is used, this is inefficient in big module. This patch use FoldingSet to implement hashing mechanism when searching. Reviewer: Nadav Rotem Test : Pass unit tests & LNT test suite llvm-svn: 193150
* Formatting/whitespace.Eric Christopher2013-10-221-4/+4
| | | | llvm-svn: 193135
* DWARF Type Hashing: Include reference and rvalue reference type in the ↵David Blaikie2013-10-211-1/+3
| | | | | | | | declarable summary hashing path More support for 7.25 Part 5. llvm-svn: 193129
* DWARF type hashing: begin implementing Step 5, summary hashing in declarable ↵David Blaikie2013-10-212-7/+39
| | | | | | | | | contexts There are several other tag types that need similar handling but to ensure test coverage they'll be coming incrementally. llvm-svn: 193126
* Remove unused TargetLowering field.Matt Arsenault2013-10-211-1/+0
| | | | llvm-svn: 193113
* Fix CodeGen for different size address space GEPsMatt Arsenault2013-10-212-8/+6
| | | | llvm-svn: 193111
* Reuse variableMatt Arsenault2013-10-211-1/+1
| | | | llvm-svn: 193107
* Fix the build in DIE.cpp with MSVC 2010Reid Kleckner2013-10-211-3/+5
| | | | llvm-svn: 193106
* DWARF type hashing: Handle multiple (including recursive) references to the ↵David Blaikie2013-10-212-8/+21
| | | | | | | | | | same type This uses a map, keeping the type DIE numbering separate from the DIEs themselves - alternatively we could do things the way GCC does if we want to add an integer to the DIE type to record the numbering there. llvm-svn: 193105
* Fix up some old review feedback.Eric Christopher2013-10-211-2/+3
| | | | llvm-svn: 193095
* DebugInfo: Put each kind of constant (form, attribute, tag, etc) into its ↵David Blaikie2013-10-215-185/+208
| | | | | | | | | | | own enum for ease of use. This allows various variables to be more self-documenting and easier to debug by being of specific types without overlapping enum values. Precommit review by Eric Christopher. llvm-svn: 193091
* DebugInfo: Hash DW_FORM_GNU_str_index as a string.David Blaikie2013-10-211-1/+3
| | | | | | | | | | Found while adding type safety to the various DWARF enumerations (form, attribute, tag, etc) that caused Clang to warn on an incompletely covered switch. Converting the comment to a default/unreachable uncovered this case of an unsupported form encoding. Seems we were skipping fission strings entirely. llvm-svn: 193089
* Emit prefix data after debug and EH directives.Peter Collingbourne2013-10-201-4/+4
| | | | | | | | | This ensures that the prefix data is treated as part of the function for the purpose of debug info. This provides a better debugging experience, among other things by allowing a debug info client to correctly look up a function in debug info given a function pointer. llvm-svn: 193042
* Remove unused variable.Benjamin Kramer2013-10-191-2/+1
| | | | llvm-svn: 193038
* Reformat.Eric Christopher2013-10-191-80/+73
| | | | llvm-svn: 193024
* Fix up a few minor performance problems spotted in code review.Eric Christopher2013-10-191-7/+6
| | | | llvm-svn: 193023
* Debug Info: add a newly-created DIE to a parent in the same function.Manman Ren2013-10-182-24/+29
| | | | | | | | | | With this commit, all DIEs created in CompileUnit will be added to parents inside the same function. Also make getOrCreateTemplateType|Value functions private. No functionality change. llvm-svn: 193002
* Debug Info: simplify code a bit.Manman Ren2013-10-181-1/+1
| | | | llvm-svn: 193001
* Revert the rest of r192749 to bring back the buildbot. These twoEric Christopher2013-10-181-2/+4
| | | | | | error messages should not be able to occur at the same time. llvm-svn: 192985
* [PATCH] Fix PR17168 (DAG scheduler inserts DBG_VALUE before PHI with fast-isel)Bill Schmidt2013-10-181-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | PR17168 describes a test case that fails when compiling for debug with fast-isel. Investigation showed that the test was failing because a DBG_VALUE machine instruction was placed prior to a PHI. For this problem to occur requires the following: * Compile for debug * Compile with fast-isel * In a block B, fast-isel must partially succeed before punting to DAG-isel * B must start with a PHI * The first unhandled node in the DAG must not generate a machine instruction * A debug value with an order less than that of that first node exists When all of these circumstances apply, the existing test that an instruction was not inserted won't fire. Currently it tests whether the block is empty, or whether the last instruction generated is a phi. When fast-isel has partially succeeded, the last instruction generated will not be a phi. Instead, we need to check whether the current insert position is immediately following a phi. This patch adds that check, and adds the test case from the PR as a regression test. llvm-svn: 192976
* CodeGen: Emit a libcall if the target doesn't support 16-byte wide atomicsDavid Majnemer2013-10-183-0/+24
| | | | | | | | | | There are targets that support i128 sized scalars but cannot emit instructions that modify them directly. The proper thing to do is to emit a libcall. This fixes PR17481. llvm-svn: 192957
* Temporarily revert r192749 as it is causing problems for LTO andEric Christopher2013-10-181-2/+8
| | | | | | requires a more in depth change to the IR structure. llvm-svn: 192938
* DIEHash: Add more things (and remove one character) from the COLLECT_ATTR macroDavid Blaikie2013-10-171-149/+53
| | | | | | | Makes the uses more terse and requires that they use a semicolon at the end that helps editors indent proceeding lines correctly. llvm-svn: 192925
* DIEHash: Support for simple (non-recursive, non-reused) type referencesDavid Blaikie2013-10-172-6/+32
| | | | llvm-svn: 192924
* Replace sra with srl if a single sign bit is requiredRichard Sandiford2013-10-171-3/+14
| | | | | | E.g. (and (sra (i32 x) 31) 2) -> (and (srl (i32 x) 30) 2). llvm-svn: 192884
* Fix edge condition in DAGCombiner to improve codegen of shift sequences.Andrea Di Biagio2013-10-171-0/+1
| | | | | | | | | | | | When canonicalizing dags according to the rule (shl (zext (shr X, c1) ), c1) ==> (zext (shl (shr X, c1), c1)) remember to add the new shl dag to the DAGCombiner worklist of nodes. If we don't explicitly add it to the worklist of nodes to visit, we may not trigger later on the rule that folds the shift left + logical shift right into a AND instruction with bitmask. llvm-svn: 192883
* According to the dwarf standard pubnames and pubtypes for languagesEric Christopher2013-10-173-9/+58
| | | | | | | | | | | like C++ should be the fully qualified names for the type. Add a routine that does a language specific context walk to build up the qualified name and use it when we add types/names to the tables. Expand the gnu pubnames testcase as it's the most complex to make sure that qualified types are also being added. llvm-svn: 192865
* [projects/test-suite] White space and long line fixes.Jack Carter2013-10-171-15/+21
| | | | | | No functionality changes. llvm-svn: 192863
* Add the subprogram DIEs to the context they're created with onlyEric Christopher2013-10-171-3/+6
| | | | | | | if they're a declaration, otherwise they're owned by the compile unit. llvm-svn: 192861
* DIEHash: Include the type's context in the type hash.David Blaikie2013-10-171-0/+3
| | | | llvm-svn: 192856
OpenPOWER on IntegriCloud