summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [NFC] Use clearer naming for local variablesJF Bastien2019-04-103-25/+25
| | | | llvm-svn: 358145
* [AArch64][GlobalISel] Make <2 x p0> = G_BUILD_VECTOR legal.Amara Emerson2019-04-103-144/+51
| | | | | | The existing isel support already works for p0 once the legalizer accepts it. llvm-svn: 358144
* [AArch64][GlobalISel] Add legalizer support for <8 x s16> and <16 x s8> G_ADD.Amara Emerson2019-04-103-1/+108
| | | | llvm-svn: 358143
* [AArch64][GlobalISel] Scalarize vector SDIV.Amara Emerson2019-04-103-5/+36
| | | | llvm-svn: 358142
* [X86] Add SSE1 command line to atomic-fp.ll and atomic-non-integer.ll. NFCCraig Topper2019-04-102-203/+505
| | | | llvm-svn: 358141
* [X86] Autogenerate complete checks. NFCCraig Topper2019-04-101-130/+824
| | | | llvm-svn: 358140
* [X86] Teach foldMaskedShiftToScaledMask to look through an any_extend from ↵Craig Topper2019-04-102-26/+46
| | | | | | | | | | | | | | i32 to i64 between the and & shl foldMaskedShiftToScaledMask tries to reorder and & shl to enable the shl to fold into an LEA. But if there is an any_extend between them it doesn't work. This patch modifies the code to look through any_extend from i32 to i64 when the and mask only uses bits that weren't from the extended part. This will prevent a regression from D60358 caused by 64-bit SHL being narrowed to 32-bits when their upper bits aren't demanded. Differential Revision: https://reviews.llvm.org/D60532 llvm-svn: 358139
* [X86] Make _Int instructions the preferred instructon for the assembly ↵Craig Topper2019-04-108-159/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | parser and disassembly parser to remove inconsistencies between VEX and EVEX. Many of our instructions have both a _Int form used by intrinsics and a form used by other IR constructs. In the EVEX space the _Int versions usually cover all the capabilities include broadcasting and rounding. While the other version only covers simple register/register or register/load forms. For this reason in EVEX, the non intrinsic form is usually marked isCodeGenOnly=1. In the VEX encoding space we were less consistent, but usually the _Int version was the isCodeGenOnly version. This commit makes the VEX instructions match the EVEX instructions. This was done by manually studying the AsmMatcher table so its possible I missed some cases, but we should be closer now. I'm thinking about using the isCodeGenOnly bit to simplify the EVEX2VEX tablegen code that disambiguates the _Int and non _Int versions. Currently it checks register class sizes and Record the memory operands come from. I have some other changes I was looking into for D59266 that may break the memory check. I had to make a few scheduler hacks to keep the _Int versions from being treated differently than the non _Int version. Differential Revision: https://reviews.llvm.org/D60441 llvm-svn: 358138
* Fix undefined behavior in DWARFASTParser::ParseChildArrayInfo()Adrian Prantl2019-04-102-3/+5
| | | | | | | PR40827: https://bugs.llvm.org/show_bug.cgi?id=40827 <rdar://problem/48729057> llvm-svn: 358137
* Fix a test, NFCErik Pilkington2019-04-102-38/+12
| | | | | | | This test was duplicated, and the last declaration had some syntax errors since the invalid attribute caused the @implementation to be skipped by the parser. llvm-svn: 358136
* [NFC] Remove ASCII lines from commentsJonas Devlieghere2019-04-10889-10287/+0
| | | | | | | | | | | | | | | | | | | | | | | A lot of comments in LLDB are surrounded by an ASCII line to delimit the begging and end of the comment. Its use is not really consistent across the code base, sometimes the lines are longer, sometimes they are shorter and sometimes they are omitted. Furthermore, it looks kind of weird with the 80 column limit, where the comment actually extends past the line, but not by much. Furthermore, when /// is used for Doxygen comments, it looks particularly odd. And when // is used, it incorrectly gives the impression that it's actually a Doxygen comment. I assume these lines were added to improve distinguishing between comments and code. However, given that todays editors and IDEs do a great job at highlighting comments, I think it's worth to drop this for the sake of consistency. The alternative is fixing all the inconsistencies, which would create a lot more churn. Differential revision: https://reviews.llvm.org/D60508 llvm-svn: 358135
* Check i < FD->getNumParams() before queryingDmitri Gribenko2019-04-103-1/+25
| | | | | | | | | | | | | | | | | | | | | | Summary: As was already stated in a previous comment, the parameter isn't necessarily referring to one of the DeclContext's parameter. We should check the index is within the range to avoid out-of-boundary access. Reviewers: gribozavr, rsmith, lebedev.ri Reviewed By: gribozavr, rsmith Subscribers: lebedev.ri, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60055 Patch by Violet. llvm-svn: 358134
* [clang][ASTContext] Try to exit early before loading serialized comments ↵Jan Korous2019-04-101-18/+22
| | | | | | | | | | from AST files Loading external comments is expensive. This change probably doesn't apply to common cases but is almost for free and would save some work in case none of the declaration needs external comments to be loaded. Differential Revision: https://reviews.llvm.org/D60493 llvm-svn: 358133
* Add IRGen APIs to fetch ctor/dtor helper functions for non-trivial structs.John McCall2019-04-102-0/+144
| | | | | | Patch by Tony Allevato! llvm-svn: 358132
* [pstl] Move to single underscore-capital for macros and include guardsLouis Dionne2019-04-1063-495/+495
| | | | | | | | | | | | | | Summary: Per the LLVM convention. Reviewers: rodgert Subscribers: jkorous, dexonsmith, jdoerfert, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D60521 llvm-svn: 358131
* [pstl] Fix incorrect forward declaration of __pattern_unique_copyLouis Dionne2019-04-101-3/+5
| | | | | | | The forward declaration didn't take an execution policy, but the definition does. llvm-svn: 358130
* [pstl] Add missing forward declarations for equalLouis Dionne2019-04-101-5/+25
| | | | | | | We added the 4-iterator variants of std::equal in r357613, but we forgot to add the corresponding forward declarations. llvm-svn: 358129
* [ARM] Add an extra test for constant hoist. NFCDavid Green2019-04-101-0/+175
| | | | llvm-svn: 358128
* clangd-fuzzer: repair the buildSaleem Abdulrasool2019-04-101-1/+2
| | | | | | The inclusion of private headers of clangd percolates into the fuzzer. llvm-svn: 358127
* [OPENMP]Improve detection of number of teams, threads in targetAlexey Bataev2019-04-1016-307/+440
| | | | | | | | | | regions. Added more complex analysis for number of teams and number of threads in the target regions, also merged related common code between CGOpenMPRuntime and CGOpenMPRuntimeNVPTX classes. llvm-svn: 358126
* Fix for different build configurations.John McCall2019-04-101-2/+2
| | | | llvm-svn: 358125
* [X86] Add test case for LEA formation regression seen with D60358. NFCCraig Topper2019-04-101-0/+19
| | | | | | | | | If we have an (add X, (and (aext (shl Y, C1)), C2)), we can pull the shift through and+aext to fold into an LEA with the. Assuming C1 is small enough and C2 masks off all of the extend bits. This pattern showed up in D60358. And we need to handle it to prevent a regression. llvm-svn: 358124
* [X86] Replace some if statements in isel address matching that should never ↵Craig Topper2019-04-101-8/+10
| | | | | | | | | | | | | | be true with asserts. And move them earlier before we looked through operands that don't change size. NFC These ifs were ensuring we don't have to handle types larger than 64 bits probably because we use getZExtValue in several places below them. None of the callers of this code pass types larger than 64-bits so we can just assert instead of branching in release code. I've also moved them earlier since we're just looking through operations that don't effect bit width. This is prep work for some refactoring I plan to do to the (and (shl)) handling code. llvm-svn: 358123
* [X86AsmPrinter] refactor to limit use of Modifier. NFCNick Desaulniers2019-04-101-47/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The Modifier memory operands is used in 2 cases of memory references (H & P ExtraCodes). Rather than pass around the likely nullptr Modifier, refactor the handling of the Modifier out from printOperand(). The refactorings in this patch: - Don't forward declare printOperand, move its definition up. - The diff makes it look like there's a change to printPCRelImm (narrator: there's not). - Create printModifiedOperand() - Move logic for Modifier to there from printOperand - Use printModifiedOperand in 3 call sites that actually create Modifiers. - Remove now unused Modifier parameter from printOperand - Remove default parameter from printLeaMemReference as it only has 1 call site that explicitly passes a parameter. - Remove default parameter from printMemReference, make call lone call site explicitly pass nullptr. - Drop Modifier parameter from printIntelMemReference, as Intel style memory references don't support the Modifiers in question. This will allow future changes to printOperand() to make it a pure virtual method on the base AsmPrinter class, allowing for more generic handling of some architecture generic constraints. X86AsmPrinter was the only derived class of AsmPrinter to have additional parameters on its printOperand function. Reviewers: craig.topper, echristo Reviewed By: echristo Subscribers: hiraditya, llvm-commits, srhines Tags: #llvm Differential Revision: https://reviews.llvm.org/D60526 llvm-svn: 358122
* Fix header inclusion order failuresLouis Dionne2019-04-1011-0/+153
| | | | | | | | | | | | Summary: See https://bugs.llvm.org/show_bug.cgi?id=41432 Subscribers: libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D60525 llvm-svn: 358121
* [llvm] Non-functional change: declared a local variable as const.Ali Tamur2019-04-101-1/+1
| | | | llvm-svn: 358120
* [PDB Docs] Start documenting CodeView Type Records.Zachary Turner2019-04-101-3/+260
| | | | | | | | This puts the general layout of the document in place and fully describes 1 simple type record. Followups will fill out more pieces. llvm-svn: 358119
* [X86] X86ScheduleBdVer2: use !listsplat operator to cleanup loadres calculationRoman Lebedev2019-04-101-4/+7
| | | | | | | | | | | | | The problem is that one can't concatenate an empty list (implied all-ones) with non-empty list here. The result will be the non-empty list, and it won't match the length of the ExePorts list. The problems begin when LoadRes != 1 here, which is the case in PdWriteResYMMPair, and more importantly i think it will be the case for PdWriteResExPair. llvm-svn: 358118
* [TableGen] Introduce !listsplat 'binary' operatorRoman Lebedev2019-04-109-5/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: ``` ``!listsplat(a, size)`` A list value that contains the value ``a`` ``size`` times. Example: ``!listsplat(0, 2)`` results in ``[0, 0]``. ``` I plan to use this in X86ScheduleBdVer2.td for LoadRes handling. This is a little bit controversial because unlike every other binary operator the types aren't identical. Reviewers: stoklund, javed.absar, nhaehnle, craig.topper Reviewed By: javed.absar Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60367 llvm-svn: 358117
* [kate] Add '!mul' operator that was introduced in D58775Roman Lebedev2019-04-101-0/+1
| | | | llvm-svn: 358116
* Fix an off-by-one mistake in IRGen's copy-constructionJohn McCall2019-04-102-1/+15
| | | | | | | | special cases in the presence of zero-length arrays. Patch by Joran Bigalet! llvm-svn: 358115
* [ARM] Add an extra constant hoisting test. NFCDavid Green2019-04-101-0/+75
| | | | | | | | This adds a simple extra test for constant hoisting to show it's usefulness with constant addresses like those seen in memory mapped registers in embedded systems. llvm-svn: 358114
* Revert rL357745: [SelectionDAG] Compute known bits of CopyFromRegDavid Green2019-04-108-42/+27
| | | | | | | | | | Certain optimisations from ConstantHoisting and CGP rely on Selection DAG not seeing through to the constant in other blocks. Revert this patch while we come up with a better way to handle that. I will try to follow this up with some better tests. llvm-svn: 358113
* llvm-undname: Fix another crash-on-invalidNico Weber2019-04-102-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | This fixes a regression from https://reviews.llvm.org/D60354. We used to SymbolNode *Symbol = demangleEncodedSymbol(MangledName, QN); if (Symbol) { Symbol->Name = QN; } but changed that to SymbolNode *Symbol = demangleEncodedSymbol(MangledName, QN); if (Error) return nullptr; Symbol->Name = QN; and one branch somewhere returned a nullptr without setting Error. Looking at the code changed in r340083 and r340710 that branch looks like a remnant from an earlier attempt to demangle RTTI descriptors that has since been rewritten -- so just remove this branch. It shouldn't change behavior for correctly mangled symbols. llvm-svn: 358112
* GlobalISel: Move computeValueLLTsMatt Arsenault2019-04-103-30/+43
| | | | | | | | | Call lowering should use this directly instead of going through the EVT version, but more work is needed to deal with this (mostly the passing of the IR type pointer instead of the relevant properties in ArgInfo). llvm-svn: 358111
* GlobalISel: Fix invoke lowering creating invalid type registersMatt Arsenault2019-04-102-3/+7
| | | | | | | Unlike the call handling, this wasn't checking for void results and creating a register with the invalid LLT llvm-svn: 358110
* GlobalISel: Support legalizing G_CONSTANT with irregular breakdownMatt Arsenault2019-04-103-33/+49
| | | | llvm-svn: 358109
* [AArch64] Teach getTestBitOperand to look through ANY_EXTENDSCraig Topper2019-04-102-5/+16
| | | | | | | | This patch teach getTestBitOperand to look through ANY_EXTENDs when the extended bits aren't used. The test case changed here is based what D60358 did to test16 in tbz-tbnz.ll. So this patch will avoid that regression. Differential Revision: https://reviews.llvm.org/D60482 llvm-svn: 358108
* build: add binary dir to the unittestsSaleem Abdulrasool2019-04-101-0/+3
| | | | | | | Missed part of the change to make clangd build on Darwin. Fixes the build after SVN r358103. llvm-svn: 358107
* [libc++abi] Create a macro for the 32 bit guard setting on ARM platformsLouis Dionne2019-04-103-11/+15
| | | | | | | | | | | | | | | | Summary: The goal is to use a descriptive name for this feature, instead of just using __arm__. Reviewers: EricWF Subscribers: javed.absar, kristof.beyls, christof, jkorous, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D60520 llvm-svn: 358106
* GlobalISel: Handle odd breakdowns for bit opsMatt Arsenault2019-04-105-40/+181
| | | | llvm-svn: 358105
* Don't emit an unreachable return block.John McCall2019-04-104-10/+39
| | | | | | Patch by Brad Moody. llvm-svn: 358104
* clangd: fix the build with XPCSaleem Abdulrasool2019-04-101-0/+1
| | | | | | | | | | | `Transport.h` does not include `Features.inc`. However, since it is used in a subdirectory, it cannot directly include the header as it is not available. Include `Features.inc` in `ClangdLSPServer.h` prior to the inclusion of `Transport.h` which will provide the interfaces in `ClangdMain.cpp` where the symbol `newXPCTransport` will not be defined due to it being preprocessed away since the configuration is not passed along to the initial inclusion. llvm-svn: 358103
* add FIXME: as per echristoNick Desaulniers2019-04-101-0/+2
| | | | llvm-svn: 358102
* [AsmPrinter] refactor to remove remove AsmVariant. NFCNick Desaulniers2019-04-1027-180/+103
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: The InlineAsm::AsmDialect is only required for X86; no architecture makes use of it and as such it gets passed around between arch-specific and general code while being unused for all architectures but X86. Since the AsmDialect is queried from a MachineInstr, which we also pass around, remove the additional AsmDialect parameter and query for it deep in the X86AsmPrinter only when needed/as late as possible. This refactor should help later planned refactors to AsmPrinter, as this difference in the X86AsmPrinter makes it harder to make AsmPrinter more generic. Reviewers: craig.topper Subscribers: jholewinski, arsenm, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, nhaehnle, javed.absar, sbc100, jgravelle-google, eraman, hiraditya, aheejin, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, llvm-commits, peter.smith, srhines Tags: #llvm Differential Revision: https://reviews.llvm.org/D60488 llvm-svn: 358101
* [InstCombine] Handle ssubo always overflowNikita Popov2019-04-102-5/+6
| | | | | | | | | Following D60483 and D60497, this adds support for AlwaysOverflows handling for ssubo. This is the last case we can handle right now. Differential Revision: https://reviews.llvm.org/D60518 llvm-svn: 358100
* [InstCombine] ssubo X, C -> saddo X, -CNikita Popov2019-04-102-25/+41
| | | | | | | | | | | | ssubo X, C is equivalent to saddo X, -C. Make the transformation in InstCombine and allow the logic implemented for saddo to fold prior usages of add nsw or sub nsw with constants. Patch by Dan Robertson. Differential Revision: https://reviews.llvm.org/D60061 llvm-svn: 358099
* [clangd] Fix non-indexing of builtin functions like printf when the TU is CSam McCall2019-04-102-6/+14
| | | | llvm-svn: 358098
* Improve compile-time performance in computeKnownBitsFromAssume.Sander de Smalen2019-04-101-217/+214
| | | | | | | | | | | | | | This patch changes the order of pattern matching by first testing a compare instruction's predicate, before doing the pattern match for the whole expression tree. Patch by Paul Walker. Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D60504 llvm-svn: 358097
* [X86][AVX] getTargetConstantBitsFromNode - extract bits from ↵Simon Pilgrim2019-04-102-71/+60
| | | | | | X86ISD::SUBV_BROADCAST llvm-svn: 358096
OpenPOWER on IntegriCloud