summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm-objcopy] - Fix incorrect CompressedSection creation.George Rimar2019-03-061-1/+2
| | | | | | | | | | We should create CompressedSection only if the section has SHF_COMPRESSED flag or it's name starts from '.zdebug'. Currently, we create it if section's data starts from ZLIB signature. Differential revision: https://reviews.llvm.org/D59018 llvm-svn: 355501
* [LLD][ELF] - Convert common-symbol-alignment.s test to yaml.George Rimar2019-03-064-12/+36
| | | | | | This removes 2 precompiled binaries from the inputs. llvm-svn: 355500
* [PR40778] Add addr space conversion when binding reference to a temporary.Anastasia Stulova2019-03-063-4/+36
| | | | | | | | | | | | This change fixes temporary materialization to happen in the right (default) address space when binding to it a reference of different type. It adds address space conversion afterwards to match the addr space of a reference. Differential Revision: https://reviews.llvm.org/D58634 llvm-svn: 355499
* [llvm-mca][X86] Add ADC/SBB with zero test casesSimon Pilgrim2019-03-0611-11/+803
| | | | | | Some targets have fast-path handling for these patterns that we should model. llvm-svn: 355498
* [LLD][ELF] - Remove unused invalid input object. NFC.George Rimar2019-03-061-0/+0
| | | | | | | | It was introduced by me in 2016: r290335, but the test did contain the YAML from start, I think it was committed by mistake. llvm-svn: 355497
* [X86][NFC] Autogenerate check lines in cmovcmov.ll testRoman Lebedev2019-03-061-186/+293
| | | | | | Investigating 8-bit cmov promotion, this test comes up. llvm-svn: 355496
* [DAGCombiner] Enable SMULO/UMULO vector combine support (PR40442)Simon Pilgrim2019-03-062-37/+23
| | | | | | Differential Revision: https://reviews.llvm.org/D58968 llvm-svn: 355495
* [X86][SSE] VSELECT(XOR(Cond,-1), LHS, RHS) --> VSELECT(Cond, RHS, LHS)Simon Pilgrim2019-03-066-93/+68
| | | | | | | | | | As noticed on D58965 DAGCombiner::visitSELECT has something similar, so we should be able to move this to DAGCombiner and support VSELECT as well at some point. Differential Revision: https://reviews.llvm.org/D58974 llvm-svn: 355494
* [clangd] Add Source to clangd::Diagnostic.Haojian Wu2019-03-064-1/+34
| | | | | | | | | | | | | | | Summary: clangd embedder can distinguish diagnostics from clang or clang-tidy. Reviewers: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58600 llvm-svn: 355493
* Inline asm constraints: allow ICE-like pointers for the "n" constraint (PR40890)Hans Wennborg2019-03-067-12/+86
| | | | | | | | | | | | Apparently GCC allows this, and there's code relying on it (see bug). The idea is to allow expression that would have been allowed if they were cast to int. So I based the code on how such a cast would be done (the CK_PointerToIntegral case in IntExprEvaluator::VisitCastExpr()). Differential Revision: https://reviews.llvm.org/D58821 llvm-svn: 355491
* [CodeGen] Omit range checks from jump tables when lowering switches with ↵Ayonam Ray2019-03-065-92/+136
| | | | | | | | | | | | | | | | | unreachable default During the lowering of a switch that would result in the generation of a jump table, a range check is performed before indexing into the jump table, for the switch value being outside the jump table range and a conditional branch is inserted to jump to the default block. In case the default block is unreachable, this conditional jump can be omitted. This patch implements omitting this conditional branch for unreachable defaults. Differential Revision: https://reviews.llvm.org/D52002 Reviewers: Hans Wennborg, Eli Freidman, Roman Lebedev llvm-svn: 355490
* clang-cl: Parse /Qspectre and a few other missing options (PR40964)Hans Wennborg2019-03-062-0/+10
| | | | llvm-svn: 355489
* Always compare C++ typeinfo (based on libstdc++ implementation).Martin Liska2019-03-062-3/+4
| | | | | | Differential Revision: https://reviews.llvm.org/D58028 llvm-svn: 355488
* Reversing the commit of revision 355483 since it is giving a regression on a ↵Ayonam Ray2019-03-065-135/+92
| | | | | | newly added test. llvm-svn: 355487
* [clang][OpenMP] Revert "OMPFlushClause is synthetic, no such clause exists"Roman Lebedev2019-03-0611-15/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This reverts rL352390 / D57280. As discussed in https://reviews.llvm.org/D57112#inline-506781, 'flush' clause does not exist in the OpenMP spec, it can not be specified, and `OMPFlushClause` class is just a helper class. Now, here's the caveat. I have read @ABataev's > Well, I think it would be good to filter out OMPC_flush somehow > because there is no such clause actually, it is a pseudo clause > for better handling of the flush directive. as if that clause is pseudo clause that only exists for the sole purpose of simplifying the parser. As in, it never reaches AST. I did not however try to verify that. Too bad, i was wrong. It absolutely *does* reach AST. Therefore my understanding/justification for the change was flawed, which makes the patch a regression which **must** be reverted. @gribozavr has brought that up again in https://reviews.llvm.org/D57112#inline-521238 > > ... > Sorry to be late for this discussion, but I don't think this conclusion > follows. ASTMatchers are supposed to match the AST as it is. > Even if OMPC_flush is synthetic, it exists in the AST, and users might > want to match it. I think users would find anything else (trying to filter > out AST nodes that are not in the source code) to be surprising. For example, > there's a matcher materializeTemporaryExpr even though this AST node is a > Clang invention and is not a part of the C++ spec. > > Matching only constructs that appear in the source code is not feasible with > ASTMatchers, because they are based on Clang's AST that exposes tons of semantic > information, and its design is dictated by the structure of the semantic information. > See "RFC: Tree-based refactorings with Clang" in cfe-dev for a library that will > focus on representing source code as faithfully as possible. > > Not to even mention that this code is in ASTTypeTraits, a general library for > handling AST nodes, not specifically for AST Matchers... Reviewers: gribozavr, ABataev, rjmccall, aaron.ballman Reviewed By: gribozavr, ABataev Subscribers: dylanmckay, guansong, arphaman, jdoerfert, cfe-commits, gribozavr, ABataev Tags: #clang, #openmp Differential Revision: https://reviews.llvm.org/D58979 llvm-svn: 355486
* [X86] Enable the add with 128 -> sub with -128 encoding trick with ↵Craig Topper2019-03-063-3/+165
| | | | | | | | | | X86ISD::ADD when the carry flag isn't used. This allows us to use an 8-bit sign extended immediate instead of a 16 or 32 bit immediate. Also do similar for 0x80000000 with 64-bit adds to avoid having to use a movabsq. llvm-svn: 355485
* [X86] Suppress load folding for add/sub with 128 immediate.Craig Topper2019-03-063-14/+20
| | | | | | 128 won't fit in a sign extended 8-bit immediate, but we can negate it to -128 and use the other operation. This results in a shorter encoding since the move would have used 16 or 32 bits for the immediate. llvm-svn: 355484
* [CodeGen] Omit range checks from jump tables when lowering switches with ↵Ayonam Ray2019-03-065-92/+135
| | | | | | | | | | | | | | | | | unreachable default During the lowering of a switch that would result in the generation of a jump table, a range check is performed before indexing into the jump table, for the switch value being outside the jump table range and a conditional branch is inserted to jump to the default block. In case the default block is unreachable, this conditional jump can be omitted. This patch implements omitting this conditional branch for unreachable defaults. Differential Revision: https://reviews.llvm.org/D52002 Reviewers: Hans Wennborg, Eli Freidman, Roman Lebedev llvm-svn: 355483
* Fix slashes in path references in -Rmodule-import test from r355477Duncan P. N. Exon Smith2019-03-061-17/+17
| | | | | | | Fixup for r355477 to fix the Windows bot: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/16217 llvm-svn: 355482
* Eradicate all the ptrdiff_ts in span left over from applying P1227. A couple ↵Marshall Clow2019-03-0612-67/+66
| | | | | | of other minor cleanups. NFC llvm-svn: 355481
* gn build: Merge r355439.Peter Collingbourne2019-03-065-15/+15
| | | | llvm-svn: 355480
* ELF: De-template OutputSection::finalize() and MipsGotSection::build(). NFCI.Peter Collingbourne2019-03-065-20/+8
| | | | | | Differential Revision: https://reviews.llvm.org/D58810 llvm-svn: 355479
* ELF: Extract a non-ELFT base class for VersionNeedSection.Peter Collingbourne2019-03-064-42/+35
| | | | | | | | | | | We're going to need a separate VersionNeedSection for each partition, and the partition data structure won't be templated. With this the VersionTableSection class no longer needs ELFT, so detemplate it. Differential Revision: https://reviews.llvm.org/D58808 llvm-svn: 355478
* Modules: Add -Rmodule-importDuncan P. N. Exon Smith2019-03-0610-4/+67
| | | | | | | | | | | | | | | | | | Add a remark for importing modules. Depending on whether this is a direct import (into the TU being built by this compiler instance) or transitive import (into an already-imported module), the diagnostic has two forms: importing module 'Foo' from 'path/to/Foo.pcm' importing module 'Foo' into 'Bar' from 'path/to/Foo.pcm' Also drop a redundant FileCheck invocation in Rmodule-build.m that was using -Reverything, since the notes from -Rmodule-import were confusing it. https://reviews.llvm.org/D58891 llvm-svn: 355477
* Change the scanning algorithm in ↵Jason Molenda2019-03-062-27/+41
| | | | | | | | | | | | | | | | | | | | | | | DynamicLoaderDarwinKernel::SearchForKernelNearPC. Currently when lldb might be doing a kernel debug session, it scans through memory by taking the current pc value and looking for a kernel at megabyte boundaries, up to 32MB behind $pc. This adjusts the algorithm to scan back at every 16k page boundary and to stop scanning as soon as we hit a memory read error. The addition of stopping at a memory read error saves us from tons of unnecessary packet traffic on generic targets where lldb might look for a kernel binary. I've been trying to think of how to construct a test for this; it's a bit tricky. A gdb-remote protocol test with the contents of a fake tiny kernel mach-o binary would satisify part of it, but this kernel path also directly calls over to dsymForUUID or DebugSymbols framework lookups to find the kernel binary as well. I'll keep thinking about this one, but it's so intertangled with these two external systems that it may be hard to do. <rdar://problem/48578197> llvm-svn: 355476
* [NFC] Declare the member data of class PostGenericScheduler as "protected" ↵QingShan Zhang2019-03-061-0/+1
| | | | | | | | | | | instead of "private" Some target might try to subclass the PostGenericScheduler to custom the scheduling strategy. We need to declare the member data of PostGenericScheduler as "protected", which acts the same as "GenericScheduler". Differential Revision: https://reviews.llvm.org/D58949 llvm-svn: 355475
* [X86] Remove periods from the end of SubtargetFeature descriptions since the ↵Craig Topper2019-03-061-7/+7
| | | | | | | | help printer adds a period. Most features don't have periods already, but some did. When there is a period it causes llc -mattr=+help to print 2 periods. llvm-svn: 355474
* Re-commit logging for SBCompileUnit::GetNumLineEntries.Jason Molenda2019-03-061-1/+7
| | | | llvm-svn: 355473
* [WebAssembly] Remove trailing whitespaces in tests (NFC)Heejin Ahn2019-03-0614-40/+40
| | | | | | | | | | | | Reviewers: sbc100 Subscribers: dschuff, jgravelle-google, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58955 llvm-svn: 355472
* [ExpressionParser] Fix ComputeClangResourceDirectory for windowsAlex Langford2019-03-061-1/+4
| | | | | | | | The function signature of ComputeClangResourceDirectory for windows wasn't updated when the others changed, causing the windows build to fail. This should fix that. llvm-svn: 355471
* [Reproducers] Enable replay from SBRepro.Jonas Devlieghere2019-03-066-15/+5
| | | | | | | | | Now that the LLDB instrumentation macros are in place, we should use that to test reproducer replay. Differential revision: https://reviews.llvm.org/D58565 llvm-svn: 355470
* [Reproducers] Don't intercept SBDebugger::SetInputFileHandleJonas Devlieghere2019-03-061-3/+1
| | | | | | | With the reproducer logic in place for the command interpreter we no longer need to make SBDebugger::SetInputFileHandle a no-op. llvm-svn: 355469
* [BinaryFormat] Add DT_USED tag into dynamic section.Xing GUO2019-03-062-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This tag is documented in https://docs.oracle.com/cd/E19253-01/817-1984/chapter6-42444/index.html Though I could not find some docs that describe it in detail, I found some code snippets. 1. ``` /* * Look up the string in the string table and get its offset. If * this succeeds, then it is possible that there is a DT_NEEDED * dynamic entry that references it. */ have_string = elfedit_sec_findstr(argstate->str.sec, strpad_elt.dn_dyn.d_un.d_val, arg, &str_offset) != 0; if (have_string) { dyn = argstate->dynamic.data; for (ndx = 0; ndx < numdyn; dyn++, ndx++) { if (((dyn->d_tag == DT_NEEDED) || (dyn->d_tag == DT_USED)) && (dyn->d_un.d_val == str_offset)) goto done; } } ``` https://github.com/kofemann/opensolaris/blob/80192cd83bf665e708269dae856f9145f7190f74/usr/src/cmd/sgs/elfedit/modules/common/syminfo.c#L512 2. ``` case DT_USED: case DT_INIT_ARRAY: case DT_FINI_ARRAY: if (do_dynamic) { if (entry->d_tag == DT_USED && VALID_DYNAMIC_NAME (entry->d_un.d_val)) { char *name = GET_DYNAMIC_NAME (entry->d_un.d_val); if (*name) { printf (_("Not needed object: [%s]\n"), name); break; } } print_vma (entry->d_un.d_val, PREFIX_HEX); putchar ('\n'); } break; ``` http://web.mit.edu/freebsd/head/contrib/binutils/binutils/readelf.c 3. ``` #define DT_USED 0x7ffffffe /* ignored - same as needed */ ``` https://github.com/switchbrew/switch-tools/blob/master/src/elf_common.h Reviewers: jhenderson, grimar Reviewed By: jhenderson, grimar Subscribers: emaste, krytarowski, fedor.sergeev, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58762 llvm-svn: 355468
* gn build: Add 32-bit Linux support.Peter Collingbourne2019-03-063-2/+12
| | | | | | Differential Revision: https://reviews.llvm.org/D58839 llvm-svn: 355467
* Replace debug-only assert with a plain old assert.Adrian Prantl2019-03-061-7/+5
| | | | llvm-svn: 355466
* [Reproducers] Undef LLDB_REPRO_INSTR_TRACEJonas Devlieghere2019-03-061-1/+1
| | | | | | Forgot to undef this before landing. llvm-svn: 355465
* [Reproducers] Fix warnings without assertsJonas Devlieghere2019-03-061-0/+1
| | | | | | Make sure the variable is used when asserts are compiled out. llvm-svn: 355464
* [ExpressionParser] Test GetClangResourceDirAlex Langford2019-03-064-41/+77
| | | | | | | | | | | | | Summary: I'm doing this because I plan on implementing `ComputeClangResourceDirectory` on windows so that `GetClangResourceDir` will work. Additionally, I made test_paths make sure that the directory member of the returned FileSpec is not none. This will fail on windows since `ComputeClangResourceDirectory` isn't implemented yet. Differential Revision: https://reviews.llvm.org/D58748 llvm-svn: 355463
* [Fixed Point Arithmetic] Fixed Point and Integer ConversionsLeonard Chan2019-03-0617-223/+576
| | | | | | | | | This patch includes the necessary code for converting between a fixed point type and integer. This also includes constant expression evaluation for conversions with these types. Differential Revision: https://reviews.llvm.org/D56900 llvm-svn: 355462
* Revert "[AtomicExpand] Allow libcall expansion for non-zero address spaces" ↵Mitch Phillips2019-03-062-44/+2
| | | | | | for buildbot failures. llvm-svn: 355461
* [ARM] Sink zext/sext operands for add and sub to enable vsubl generation.Florian Hahn2019-03-063-0/+277
| | | | | | | | | | | | | | | This uses the infrastructure added in rL353152 to sink zext and sexts to sub/add users, to enable vsubl/vaddl generation when NEON is available. See https://bugs.llvm.org/show_bug.cgi?id=40025. Reviewers: SjoerdMeijer, t.p.northover, samparker, efriedma Reviewed By: samparker Differential Revision: https://reviews.llvm.org/D58063 llvm-svn: 355460
* [Reproducers] Add SBReproducer macrosJonas Devlieghere2019-03-0666-983/+8842
| | | | | | | | | | This patch adds the SBReproducer macros needed to capture and reply the corresponding calls. This patch was generated by running the lldb-instr tool on the API source files. Differential revision: https://reviews.llvm.org/D57475 llvm-svn: 355459
* [SBAPI] Don't check IsValid in constructorJonas Devlieghere2019-03-0621-150/+138
| | | | | | | | | | | | | | | | | | | | | | | When running the test suite with the instrumentation macros, I noticed two lldb-mi tests regressed. The issue was the copy constructor of SBLineEntry. Without the macros the returned value would be elided, but with the macros the copy constructor was called. The latter using ::IsValid to determine whether the underlying opaque pointer should be set. This is likely a remnant of when ::IsValid would only check the validity of the smart pointer. In SBLineEntry however, it actually forwards to LineEntry::IsValid(). So what happened here was that because of the macros the copy constructor was called. The opaque pointer was valid but the LineEntry didn't consider itself valid. So the copied-to object ended up default initialized. This patch replaces all checks for IsValid in copy (assignment) constructors with checks for the opaque pointer itself. Differential revision: https://reviews.llvm.org/D58946 llvm-svn: 355458
* Remove tautological #ifdefs (NFC)Adrian Prantl2019-03-051-8/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D58838 llvm-svn: 355457
* [DWARFFormValue] Don't consider DW_FORM_data4/8 to be section offsets.Jonas Devlieghere2019-03-053-7/+657
| | | | | | | | | | | | | | | | | | | | | | | | | | | When dumping ToT clan's debug info with dwarfdump, we were seeing an error saying that that the location list overflows the debug_loc section. After reducing the testcase we figured out that we were interpreting the DW_FORM_data4 as a section offset. In DWARF3 DW_FORM_data4 and DW_FORM_data8 served also as a section offset. Until now we didn't check check for the DWARF version, because some producers (read old versions of clang) were still emitting this. The relevant code/comment was added in 2013, and I believe it's now reasonable to start checking the version. The FormValue class is a little bit of a mess because it cashes the DWARF unit and context when it extracted the value itself. Several methods of the class rely on it being present, or return an Optional for the code path that needs it. At the same time the FormValue class also used in places where there's no DWARF unit. For this patch I went with the least invasive change: checking the version from the CU when it's available. If it's not (because the form value was created from a value directly) we default to the old behavior. Differential revision: https://reviews.llvm.org/D58698 llvm-svn: 355456
* [opt] Report if the provided architecture is invalid.Florian Hahn2019-03-051-0/+5
| | | | | | | | | | | | | | Partly addresses PR15026. There are a few tests that passed in invalid architectures, which are fixed in: rL355349 and D58931 Reviewers: echristo, efriedma, rengolin, atrick Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D58933 llvm-svn: 355455
* Revert r355432 for buildbot failures in ppc64be-linux and s390x-linuxRong Xu2019-03-055-141/+0
| | | | llvm-svn: 355454
* [AtomicExpand] Allow libcall expansion for non-zero address spacesPhilip Reames2019-03-052-2/+44
| | | | | | | | Be consistent about how we treat atomics in non-zero address spaces. If we get to the backend, we tend to lower them as if in address space 0. Do the same if we need to insert a libcall instead. Differential Revision: https://reviews.llvm.org/D58760 llvm-svn: 355453
* [X86][NFC] Add proper test for promotion of i8 cmov's of trunc'sRoman Lebedev2019-03-051-0/+271
| | | | | | | There was no proper test for that code in X86TargetLowering::LowerSELECT(). Noticed accidentally while trying to modify the last branch in that function. llvm-svn: 355452
* [libc++] Only add dylib-related features when using the system's libc++Louis Dionne2019-03-051-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, when testing trunk libc++ on an older system, lit will think that the dylib features are disabled. Ideally, we'd have a notion of running the tests with/without a deployment target (or, equivalently, a deployment target representing trunk where everything is as recent as can be). Since we always have a deployment target right now (which defaults to the current system), we only enable those features when we're going to also be testing with the system libc++. We also need to disable the availability markup when we are not running a system library flavor, because availability markup does not make sense when building against the trunk libc++ (which has everything regardless of what the current system is). This is a re-application of r353319, which had been reverted due to CI breakage. This time around, I made sure it didn't break our internal CI before submitting. This is also a partial undoing of r348296, in spirit at least. However, with this patch, availability markup is enabled based on whether we're using a system library or not, whereas previously one could enable it or disable it arbitrarily. This was confusing as it led to testing configurations that don't make sense (such as testing a system library without availability markup, or trunk testing with availability markup). llvm-svn: 355451
OpenPOWER on IntegriCloud