summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update how we create our MCSymbolizer to keep working correctlyJason Molenda2014-05-171-1/+5
| | | | | | | | on arm64 binaries after the llvm r206063 changes. Patch written by Jim Ingham and Lang Hames. <rdar://problem/16935671> llvm-svn: 209051
* [DWARF parser] Teach DIContext to fetch short (non-linkage) function names ↵Alexey Samsonov2014-05-177-24/+40
| | | | | | | | | | for a given address. Change --functions option in llvm-symbolizer tool to accept values "none", "short" or "linkage". Update the tests and docs accordingly. llvm-svn: 209050
* Add support for combining GEPs across PHI nodesLouis Gerbarg2014-05-162-0/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently LLVM will generally merge GEPs. This allows backends to use more complex addressing modes. In some cases this is not happening because there is PHI inbetween the two GEPs: GEP1--\ |-->PHI1-->GEP3 GEP2--/ This patch checks to see if GEP1 and GEP2 are similiar enough that they can be cloned (GEP12) in GEP3's BB, allowing GEP->GEP merging (GEP123): GEP1--\ --\ --\ |-->PHI1-->GEP3 ==> |-->PHI2->GEP12->GEP3 == > |-->PHI2->GEP123 GEP2--/ --/ --/ This also breaks certain use chains that are preventing GEP->GEP merges that the the existing instcombine would merge otherwise. Tests included. rdar://15547484 llvm-svn: 209049
* Use a sized enum for MachineOperandType. No functionality changePete Cooper2014-05-162-3/+3
| | | | llvm-svn: 209048
* Add missed file from r209046.Richard Smith2014-05-161-0/+5
| | | | llvm-svn: 209047
* If a declaration is loaded, and then a module import adds a redeclaration, thenRichard Smith2014-05-1627-309/+681
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ensure that querying the first declaration for its most recent declaration checks for redeclarations from the imported module. This works as follows: * The 'most recent' pointer on a canonical declaration grows a pointer to the external AST source and a generation number (space- and time-optimized for the case where there is no external source). * Each time the 'most recent' pointer is queried, if it has an external source, we check whether it's up to date, and update it if not. * The ancillary data stored on the canonical declaration is allocated lazily to avoid filling it in for declarations that end up being non-canonical. We'll still perform a redundant (ASTContext) allocation if someone asks for the most recent declaration from a decl before setPreviousDecl is called, but such cases are probably all bugs, and are now easy to find. Some finessing is still in order here -- in particular, we use a very general mechanism for handling the DefinitionData pointer on CXXRecordData, and a more targeted approach would be more compact. Also, the MayHaveOutOfDateDef mechanism should now be expunged, since it was addressing only a corner of the full problem space here. That's not covered by this patch. Early performance benchmarks show that this makes no measurable difference to Clang performance without modules enabled (and fixes a major correctness issue with modules enabled). I'll revert if a full performance comparison shows any problems. llvm-svn: 209046
* Added tests for the cost of lowering VSELECT instructions.Filipe Cabecinhas2014-05-161-0/+126
| | | | llvm-svn: 209045
* Implemented special cases for PerformVSELECTCombine.Filipe Cabecinhas2014-05-162-5/+67
| | | | | | | | | | vselects with constant masks, after legalization, will get turned into specialized shuffle_vectors so they can be matched to blend+imm instructions. Fixed some tests. llvm-svn: 209044
* Lower vselects into X86ISD::BLENDI when appropriate.Filipe Cabecinhas2014-05-166-19/+128
| | | | | | | | | | | | | | | | LowerVSELECT will, if possible, generate a X86ISD::BLENDI DAG node if the condition is constant and we can emit that instruction, given the subtarget. This is not enough for all cases. An additional SELECTCombine optimization will be committed. Fixed tests that were expecting variable blends but where a blend+imm can be generated. Added test where we can't emit blend+immediate. Added avx2 blend+imm tests. llvm-svn: 209043
* Implemented LowerVSELECT to custom lower some instructions.Filipe Cabecinhas2014-05-162-16/+46
| | | | | | | | No functionality change intended. The types that previously were set to lower as Expand or Legal are doing the same thing with this lowering function. llvm-svn: 209042
* Delete getAliasedGlobal.Rafael Espindola2014-05-1617-31/+19
| | | | llvm-svn: 209040
* DebugInfo: Assert rather than conditionalizing when a CU's subprogram list ↵David Blaikie2014-05-161-2/+2
| | | | | | contains declarations. llvm-svn: 209039
* Use getAliasee instead of getAliasedGlobal.Rafael Espindola2014-05-161-2/+2
| | | | | | No functionality change. llvm-svn: 209038
* DebugInfo: Handle emitting constants of C++ unicode character type.David Blaikie2014-05-162-23/+37
| | | | | | | | Patch by Stephan Tolksdorf! (with some test case stuff by me) Differential Revision: http://reviews.llvm.org/D3810 llvm-svn: 209037
* Fix the copy constructor and assignement operator for the ↵Greg Clayton2014-05-161-2/+4
| | | | | | lldb_private::Value class to "do the right thing". llvm-svn: 209036
* R600/SI: Refactor the VOP3_32 tablegen classTom Stellard2014-05-166-34/+112
| | | | | | | | This will allow us to use a single MachineInstr to represent instructions which behave the same but have different encodings on some subtargets. llvm-svn: 209028
* R600/SI: Add a PredicateControl class for managing TableGen predicatesTom Stellard2014-05-163-28/+22
| | | | | | This was inspired by the PredicateControl class in the MIPS backend. llvm-svn: 209027
* R600/SI: Move tablegen patterns away from instruction defsTom Stellard2014-05-161-30/+31
| | | | llvm-svn: 209026
* R600/SI: Remove unused instructionTom Stellard2014-05-161-7/+0
| | | | llvm-svn: 209025
* R600/SI: Promote f32 SELECT to i32Tom Stellard2014-05-163-7/+4
| | | | llvm-svn: 209024
* R600/SI: Remove duplicate patternTom Stellard2014-05-161-5/+0
| | | | llvm-svn: 209023
* Missed a ! in the if statement when these were being set and the optionsEric Christopher2014-05-161-1/+1
| | | | | | | | | are inverted in clang and llvm. I'll attempt to get a testcase for this that doesn't involve compiling to .s, but it's unlikely. llvm-svn: 209017
* Refactored RegisterInfoInterface into its own header.Todd Fiala2014-05-1618-37/+59
| | | | | | | | | Also moved it into the lldb_private namespace. The llgs branch is making use of this interface and its use is not strictly limited to POSIX. llvm-svn: 209016
* Add comdat key field to llvm.global_ctors and llvm.global_dtorsReid Kleckner2014-05-1616-69/+289
| | | | | | | | | | | | | | This allows us to put dynamic initializers for weak data into the same comdat group as the data being initialized. This is necessary for MSVC ABI compatibility. Once we have comdats for guard variables, we can use the combination to help GlobalOpt fire more often for weak data with guarded initialization on other platforms. Reviewers: nlewycky Differential Revision: http://reviews.llvm.org/D3499 llvm-svn: 209015
* [TSan] Improve support for running TSan test suite with GCC-TSan.Alexey Samsonov2014-05-161-3/+7
| | | | | | Test results with GCC-4.9.0: 78 expected passes, 74 unexpected failures. llvm-svn: 209014
* Exclude several ASan tests from test suite if we're using GCCAlexey Samsonov2014-05-166-1/+17
| | | | llvm-svn: 209013
* Fix a warning in builds without asserts.Rafael Espindola2014-05-161-2/+1
| | | | llvm-svn: 209012
* Fix from: Scott Knight(knightsc@gmail.com):Jim Ingham2014-05-161-14/+9
| | | | | | | Use a map rather than a vector to store the objects managed by the shared cluster since mostly want this for random lookup, so the map is much faster. llvm-svn: 209010
* DebugInfo: Add an assert regarding the subprogram in the subprogram map ↵David Blaikie2014-05-161-0/+1
| | | | | | | | | | matching the abstract subprogram. I'm not sure this is how it'll be going forward (I'd rather prefer the definition to be in the main SP mapping, for various reasons) but this helps me understand how it is today. llvm-svn: 209009
* Update for llvm api change.Rafael Espindola2014-05-1611-58/+71
| | | | | | | | | | Now that llvm cannot represent alias cycles, we have to diagnose erros just before trying to close the cycle. This degrades the errors a bit. The real solution is what it was before: if we want to provide good errors for these cases, we have to be able to find a clang level decl given a mangled name and produce the error from Sema. llvm-svn: 209008
* Fix most of PR10367.Rafael Espindola2014-05-1641-156/+308
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the design of GlobalAlias so that it doesn't take a ConstantExpr anymore. It now points directly to a GlobalObject, but its type is independent of the aliasee type. To avoid changing all alias related tests in this patches, I kept the common syntax @foo = alias i32* @bar to mean the same as now. The cases that used to use cast now use the more general syntax @foo = alias i16, i32* @bar. Note that GlobalAlias now behaves a bit more like GlobalVariable. We know that its type is always a pointer, so we omit the '*'. For the bitcode, a nice surprise is that we were writing both identical types already, so the format change is minimal. Auto upgrade is handled by looking through the casts and no new fields are needed for now. New bitcode will simply have different types for Alias and Aliasee. One last interesting point in the patch is that replaceAllUsesWith becomes smart enough to avoid putting a ConstantExpr in the aliasee. This seems better than checking and updating every caller. A followup patch will delete getAliasedGlobal now that it is redundant. Another patch will add support for an explicit offset. llvm-svn: 209007
* [ASTMatchers] Move the 'isImplicit' matcher from CXXConstructorDecl to Decl.Joey Gouly2014-05-162-6/+9
| | | | llvm-svn: 209006
* Merge a couple of copy-and-pasted functionsAlp Toker2014-05-162-59/+31
| | | | | | No change in functionality. llvm-svn: 209005
* DebugInfo: Assume the CU's Subprogram list only contains definitions.David Blaikie2014-05-165-8/+5
| | | | | | | | | | | DIBuilder maintains this invariant and the current DwarfDebug code could end up doing weird things if it contained declarations (such as putting the definition DIE inside a CU that contained the declaration - this doesn't seem like a good idea, so rather than adding logic to handle this case we'll just ban in for now & cross that bridge if we come to it later). llvm-svn: 209004
* [CMake] Don't build libcxx_tsan with compilers other than ClangAlexey Samsonov2014-05-162-2/+4
| | | | llvm-svn: 209003
* Rename SourceManager::createFileIDForMemBuffer()Alp Toker2014-05-168-13/+12
| | | | | | | | It makes more sense to just overload createFileID(). Gardening only. llvm-svn: 209002
* [ARM64] Increases the Sched Model accuracy for Cortex-A53.Chad Rosier2014-05-168-53/+249
| | | | | | | Patch by Dave Estes <cestes@codeaurora.org> http://reviews.llvm.org/D3769 llvm-svn: 209001
* InstSimplify: Improve handling of ashr/lshrDavid Majnemer2014-05-162-1/+61
| | | | | | | | | | | | | | Summary: Analyze the range of values produced by ashr/lshr cst, %V when it is being used in an icmp. Reviewers: nicholas Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D3774 llvm-svn: 209000
* InstSimplify: Optimize using dividend in sdivDavid Majnemer2014-05-162-0/+13
| | | | | | | | | | | | | | | Summary: The dividend in an sdiv tells us the largest and smallest possible results. Use this fact to optimize comparisons against an sdiv with a constant dividend. Reviewers: nicholas Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D3795 llvm-svn: 208999
* [ARM64] Fix wrong comment in load/store optimization pass.Tilmann Scheller2014-05-161-1/+1
| | | | | | | | | | | | | | | | ldr x1, [x0, #64] add x0, x0, #64 -> ldr x1, [x0], #64 is not a valid transformation, the correct transformation (and what the code actually does) is: ldr x1, [x0, #64] add x0, x0, #64 -> ldr x1, [x0, #64]! llvm-svn: 208998
* DwarfDebug: Refactor AT_ranges/AT_high_pc+AT_low_pc emission into helper ↵David Blaikie2014-05-162-39/+19
| | | | | | function. llvm-svn: 208997
* [yaml2obj][ELF] Add an optional `Size` field to the YAML section declaration.Simon Atanasyan2014-05-166-2/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now the only method to configure ELF section's content and size is to assign a hexadecimal string to the `Content` field. Unfortunately this way is completely useless when you need to declare a really large section. To solve this problem this patch adds one more optional field `Size` to the `RawContentSection` structure. When yaml2obj generates an ELF file it uses the following algorithm: 1. If both `Content` and `Size` fields are missed create an empty section. 2. If only `Content` field is missed take section length from the `Size` field and fill the section by zero. 3. If only `Size` field is missed create a section using data from the `Content` field. 4. If both `Content` and `Size` fields are provided validate that the `Size` value is not less than size of `Content` data. Than take section length from the `Size`, fill beginning of the section by `Content` and the rest by zero. Examples -------- * Create a section 0x10000 bytes long filled by zero Name: .data Type: SHT_PROGBITS Flags: [ SHF_ALLOC ] Size: 0x10000 * Create a section 0x10000 bytes long starting from 'CA' 'FE' 'BA' 'BE' Name: .data Type: SHT_PROGBITS Flags: [ SHF_ALLOC ] Content: CAFEBABE Size: 0x10000 The patch reviewed by Michael Spencer. llvm-svn: 208995
* Re-enable inline memcpy expansion for Thumb1.James Molloy2014-05-164-11/+65
| | | | | | Patch by Moritz Roth! llvm-svn: 208994
* Small dyn_cast and auto cleanup.Rafael Espindola2014-05-161-3/+3
| | | | llvm-svn: 208993
* Fix the Load/Store optimization pass to work with Thumb1.James Molloy2014-05-165-41/+286
| | | | | | Patch by Moritz Roth! llvm-svn: 208992
* Enable the Load/Store optimization pass for Thumb1 but make it return ↵James Molloy2014-05-162-8/+14
| | | | | | | | immediately for now. Patch by Moritz Roth! llvm-svn: 208991
* Fix a few comment typos and style issues.James Molloy2014-05-161-16/+17
| | | | | | Patch by Moritz Roth! llvm-svn: 208990
* [ASan/Win] Refactor __interception::OverrideFunction a bit, allow the ↵Timur Iskhodzhanov2014-05-161-49/+72
| | | | | | | | orig_old_func parameter to be zero Reviewed at http://reviews.llvm.org/D3798 llvm-svn: 208989
* Tooling: use stderr, not stdout for missing command line messagesAlp Toker2014-05-161-2/+2
| | | | | | Matches other tooling output that use stderr. llvm-svn: 208988
* [mips][mips64r6] Add SELEQZ and SELNEZ instructionsZoran Jovanovic2014-05-163-2/+19
| | | | | | Differential Revision: http://reviews.llvm.org/D3743 llvm-svn: 208987
OpenPOWER on IntegriCloud