summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [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
* [clang-format] broken after lambda with return type template with boolean ↵Paul Hoad2019-03-052-0/+17
| | | | | | | | | | | | | | | | | | | | | literal Summary: A Lamdba with a return type template with a boolean literal (true,false) behaves differently to an integer literal https://bugs.llvm.org/show_bug.cgi?id=40910 Reviewers: klimek, djasper, JonasToth, alexfh, krasimir, jkorous Reviewed By: jkorous Subscribers: jkorous, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D58922 llvm-svn: 355450
* Revert logging addition to SBCompileUnit::GetNumLineEntries,Jason Molenda2019-03-051-6/+1
| | | | | | causing lldb-mi testsuite failures? llvm-svn: 355449
* [lit, windows] Disable stop-hook-threads on WindowsStella Stamenova2019-03-051-1/+2
| | | | | | This test is also no longer reliably failing or passing on Windows and it is hanging every few runs. llvm-svn: 355448
* [docs] Add some architectures into the list of supported ThreadSanitizer ↵Vitaly Buka2019-03-051-3/+3
| | | | | | | | | platforms Some platforms for which TSAN has build rules are omitted for the lack of known build bots. llvm-svn: 355445
* [WebAssembly] Simplify iterator navigations (NFC)Heejin Ahn2019-03-055-21/+15
| | | | | | | | | | | | | | | | | | | | Summary: - Replaces some uses of `MachineFunction::iterator(MBB)` with `MBB->getIterator()` and `MachineBasicBlock::iterator(MI)` with `MI->getIterator()`, which are simpler. - Replaces some uses of `std::prev` of `std::next` that takes a MachineFunction or MachineBasicBlock iterator with `getPrevNode` and `getNextNode`, which are also simpler. Reviewers: sbc100 Subscribers: dschuff, sunfish, jgravelle-google, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58913 llvm-svn: 355444
* [lldbsuite, windows] Skip the TestEvents tests on WindowsStella Stamenova2019-03-051-0/+3
| | | | | | These tests are flakey on Windows and recently they have started failing AND also hanging the whole suite when they fail. llvm-svn: 355443
* [docs] Update the list of ThreadSanitizer supported OSesVitaly Buka2019-03-051-1/+3
| | | | llvm-svn: 355442
* [Remarks][NFC] Rename RemarkParser to YAMLRemarkParserFrancis Visoiu Mistrih2019-03-051-19/+20
| | | | | | Rename it to reflect that it's parsing YAML remarks. llvm-svn: 355441
* [cmake] Add libRemarks to LLVM_DISTRIBUTION_COMPONENTSFrancis Visoiu Mistrih2019-03-051-0/+1
| | | | | | | Add this in the Apple-stage2.cmake to ship the remark tooling library with the compiler. llvm-svn: 355440
* [OptRemarks] Make OptRemarks more generic: rename OptRemarks to RemarksFrancis Visoiu Mistrih2019-03-0520-578/+579
| | | | | | | | | | | | | | | Getting rid of the name "optimization remarks" for anything that involves handling remarks on the client side. It's safer to do this now, before we get stuck with that name in all the APIs and public interfaces we decide to export to users in the future. This renames llvm/tools/opt-remarks to llvm/tools/remarks-shlib, and now generates `libRemarks.dylib` instead of `libOptRemarks.dylib`. Differential Revision: https://reviews.llvm.org/D58535 llvm-svn: 355439
* [WebAssembly] Test change after disabling MachineBlockPlacementHeejin Ahn2019-03-051-1/+1
| | | | | | | | | | | | | | | | Summary: We disabled MachineBlockPlacement pass in D58953, and this test result changes as the result of it. Reviewers: kripken Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58954 llvm-svn: 355438
* [WebAssembly] Disable MachineBlockPlacement passHeejin Ahn2019-03-057-432/+77
| | | | | | | | | | | | | | | | | Summary: This pass hurts code size for wasm and sometimes generates irreducible control flow. Context: https://github.com/emscripten-core/emscripten/pull/8233 Reviewers: kripken, dschuff Subscribers: sunfish, sbc100, jgravelle-google, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58953 llvm-svn: 355437
* [NFC][CodeGen][X86][AArch64] Add tests for C++ std::midpoint() pattern (PR40965)Roman Lebedev2019-03-055-0/+10752
| | | | | | | | | | | | | Tests only for integers, not floating point or pointers. The scalar 8-bit case uses branch instead of CMOV, because there is no no 8-bit CMOV. Vector tests are for consistency, since it can be vectorized. https://bugs.llvm.org/show_bug.cgi?id=40965 llvm-svn: 355436
* Add logging to SBCompileUnit::GetNumLineEntries.Jason Molenda2019-03-051-1/+6
| | | | llvm-svn: 355435
* [clang-format] Fix lambdas returning template specialization that contains ↵Jan Korous2019-03-052-0/+109
| | | | | | | | | | | | operator in parameter A template specialization of a template foo<int N> can contain integer constants and a whole bunch of operators - e. g. foo< 1 ? !0 : (3+1)%4 > Inspired by https://reviews.llvm.org/D58922 Differential Revision: https://reviews.llvm.org/D58934 llvm-svn: 355434
* Revert r355224 "[TableGen][SelectionDAG][X86] Add specific isel matchers for ↵Craig Topper2019-03-0512-137/+68
| | | | | | | | immAllZerosV/immAllOnesV. Remove bitcasts from X86 patterns that are no longer necessary." This caused the first matcher in the isel table for many targets to Opc_Scope instead of Opc_SwitchOpcode. This leads to a significant increase in isel match failures. llvm-svn: 355433
* [PGO] Clang part of change for context-sensitive PGO (part2)Rong Xu2019-03-055-0/+141
| | | | | | | | Part 2 of CSPGO change in Clang: Add test cases. Differential Revision: https://reviews.llvm.org/D54176 llvm-svn: 355432
* [Subtarget] Merge ProcSched and ProcDesc arrays in MCSubtargetInfo into a ↵Craig Topper2019-03-056-78/+23
| | | | | | | | | | | | single array. These arrays are both keyed by CPU name and go into the same tablegenerated file. Merge them so we only need to store keys once. This also removes a weird space saving quirk where we used the ProcDesc.size() to create to build an ArrayRef for ProcSched. Differential Revision: https://reviews.llvm.org/D58939 llvm-svn: 355431
* [X86] In X86DomainReassignment.cpp add enclosed registers to EnclosedEdgesGuozhi Wei2019-03-051-0/+1
| | | | | | | | | | The variable X86DomainReassignment::EnclosedEdges is used to store registers that have been enclosed in some closure, so those registers will be ignored when create new closures. But there is no registers has ever been put into this set, so a single register can be enclosed in multiple closures, it significantly increase compile time. This patch adds a register into EnclosedEdges when it is enclosed into a closure. Differential Revision: https://reviews.llvm.org/D58646 llvm-svn: 355430
* [Subtarget] Create a separate SubtargetSubtargetKV struct for ProcDesc to ↵Craig Topper2019-03-055-18/+37
| | | | | | | | | | | | remove fields from the stack tables that aren't needed for CPUs The description for CPUs was just the CPU name wrapped with "Select the " and " processor". We can just do that directly in the help printer instead of making a separate version in the binary for each CPU. Also remove the Value field that isn't needed and was always 0. Differential Revision: https://reviews.llvm.org/D58938 llvm-svn: 355429
* [Subtarget] Move SubtargetFeatureKV/SubtargetInfoKV from SubtargetFeature.h ↵Craig Topper2019-03-054-245/+224
| | | | | | | | | | | | | | | | to MCSubtargetInfo.h. Move all code that operates on ProcFeatures and ProcDesc arrays to MCSubtargetInfo. The SubtargetFeature class managed a list of features as strings. And it also had functions for setting bits in a FeatureBitset. The methods that operated on the Feature list as strings are used in other parts of the backend. But the parts that operate on FeatureBitset are very tightly coupled to MCSubtargetInfo and requires passing in the arrays that MCSubtargetInfo owns. And the same struct type is used for ProcFeatures and ProcDesc. This has led to MCSubtargetInfo having 2 arrays keyed by CPU name. One containing a mapping from a CPU name to its features. And one containing a mapping from CPU name to its scheduler model. I would like to make a single CPU array containing all CPU information and remove some unneeded fields the ProcDesc array currently has. But I don't want to make SubtargetFeatures.h have to know about the scheduler model type and have to forward declare or pull in the header file. Differential Revision: https://reviews.llvm.org/D58937 llvm-svn: 355428
* Reinstate libc++ patches now that the lldb formatter has been updated.Davide Italiano2019-03-056-281/+856
| | | | | | | | "[libc++] Fix <atomic> failures on GCC" "[libc++] Change memory_order to an enum class" "[libc++] decoupling Freestanding atomic<T> from libatomic.a" llvm-svn: 355427
* AMDGPU: Preserve undef flag when expanding SI_IFMatt Arsenault2019-03-052-10/+40
| | | | | | Fixes undefined value verifier error. llvm-svn: 355426
* [X86] Enable 8-bit SHL to convert to LEACraig Topper2019-03-054-9/+13
| | | | | | Differential Revision: https://reviews.llvm.org/D58870 llvm-svn: 355425
* [X86] Allow 8-bit INC/DEC to be converted to LEA.Craig Topper2019-03-054-18/+19
| | | | | | | | We already do this for 16/32/64 as well as 8-bit add with register/immediate. Might as well do it for 8-bit INC/DEC too. Differential Revision: https://reviews.llvm.org/D58869 llvm-svn: 355424
* [X86] Enable 8-bit OR with disjoint bits to convert to LEACraig Topper2019-03-0516-103/+146
| | | | | | | | We already support 8-bits adds in convertToThreeAddress. But we can also support 8-bit OR if the bits are disjoint. We already do this for 16/32/64. Differential Revision: https://reviews.llvm.org/D58863 llvm-svn: 355423
* [DataFormatters] Fix regression in libc++ std::atomic formatter caused by ↵Shafik Yaghmour2019-03-052-6/+64
| | | | | | | | https://reviews.llvm.org/D56913 rdar://problem/48568543 llvm-svn: 355422
* [CUDA][HIP][Sema] Fix template kernel with function as template parameterYaxun Liu2019-03-054-3/+16
| | | | | | | | | | | | | | | | | | | | If a kernel template has a function as its template parameter, a device function should be allowed as template argument since a kernel can call a device function. However, currently if the kernel template is instantiated in a host function, clang will emit an error message saying the device function is an invalid candidate for the template parameter. This happens because clang checks the reference to the device function during parsing the template arguments. At this point, the template is not instantiated yet. Clang incorrectly assumes the device function is called by the host function and emits the error message. This patch fixes the issue by disabling checking of device function during parsing template arguments and deferring the check to the instantion of the template. At that point, the template decl is already available, therefore the check can be done against the instantiated function template decl. Differential Revision: https://reviews.llvm.org/D56411 llvm-svn: 355421
OpenPOWER on IntegriCloud