summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix r346747 and r346796Diana Picus2018-11-142-0/+2
| | | | | | | Require x86 for the tests in order to fix non-x86 bots. This seems to be the case for all other tests in that directory. llvm-svn: 346842
* Suppress a "-Wliteral-conversion" compiler warning.Haojian Wu2018-11-141-1/+1
| | | | | error: implicit conversion from 'double' to 'uint64_t' (aka 'unsigned long') changes value from -0 to 0 [-Werror,-Wliteral-conversion] llvm-svn: 346841
* [WebAssembly] Temporarily disable event-section.llHeejin Ahn2018-11-141-0/+1
| | | | | | | | This test is failing in builds with LLVM_ENABLE_EXPENSIVE_CHECKS after rL346825 not because of the patch but due to a pre-existing codegen problem. Marking this as XFAIL temporarily until the bug is fixed. llvm-svn: 346840
* Fix the "make_unique is ambiguous" compiler error.Haojian Wu2018-11-142-4/+4
| | | | llvm-svn: 346839
* [OpenCL] Fix invalid address space generation for clk_event_tAlexey Sotkin2018-11-142-2/+11
| | | | | | | | | | | | | | | | | | Summary: Addrspace(32) was generated when putting 0 in clk_event_t * event_ret parameter for enqueue_kernel function. Patch by Viktoria Maksimova Reviewers: Anastasia, yaxunl, AlexeySotkin Reviewed By: Anastasia, AlexeySotkin Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D53809 llvm-svn: 346838
* [Clang] - Add '-gsplit-dwarf[=split,=single]' version for '-gsplit-dwarf' ↵George Rimar2018-11-1415-26/+130
| | | | | | | | | | | | | | | | | | | | option. The DWARF5 specification says(Appendix F.1): "The sections that do not require relocation, however, can be written to the relocatable object (.o) file but ignored by the linker or they can be written to a separate DWARF object (.dwo) file that need not be accessed by the linker." The first part describes a single file split DWARF feature and there is no way to trigger this behavior atm. Fortunately, no many changes are required to keep *.dwo sections in a .o, the patch does that. Differential revision: https://reviews.llvm.org/D52296 llvm-svn: 346837
* [clangd] Improve code completion for ObjC methodsSam McCall2018-11-143-11/+164
| | | | | | | | | | | | | | | | | | | | | Summary: Previously code completion did not work well for Objective-C methods which contained multiple arguments as clangd did not expect to see multiple typed-text chunks when handling code completion. Note that even with this change, we do not consider selector fragments from previous arguments to be part of the signature (although we could in the future). Reviewers: sammccall Reviewed By: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, jfb, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53934 llvm-svn: 346836
* [clang-tidy] Avoid C arrays checkRoman Lebedev2018-11-1413-0/+297
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: [[ https://bugs.llvm.org/show_bug.cgi?id=39224 | PR39224 ]] As discussed, we can't always do the transform automatically due to that array-to-pointer decay of C array. In order to detect whether we can do said transform, we'd need to be able to see all usages of said array, which is, i would say, rather impossible if e.g. it is in the header. Thus right now no fixit exists. Exceptions: `extern "C"` code. References: * [[ https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es27-use-stdarray-or-stack_array-for-arrays-on-the-stack | CPPCG ES.27: Use std::array or stack_array for arrays on the stack ]] * [[ https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#slcon1-prefer-using-stl-array-or-vector-instead-of-a-c-array | CPPCG SL.con.1: Prefer using STL array or vector instead of a C array ]] * HICPP `4.1.1 Ensure that a function argument does not undergo an array-to-pointer conversion` * MISRA `5-2-12 An identifier with array type passed as a function argument shall not decay to a pointer` Reviewers: aaron.ballman, JonasToth, alexfh, hokein, xazax.hun Reviewed By: JonasToth Subscribers: Eugene.Zelenko, mgorny, rnkovacs, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D53771 llvm-svn: 346835
* [X86] Add -x86-experimental-vector-widening command lines to pmulh.llCraig Topper2018-11-141-43/+83
| | | | | | I've only added sse2 and sse4.1 variants as I'm only interested in the two v4i16 tests and I don't expect that to different with AVX other than a v prefix. llvm-svn: 346834
* Correctly instantiate `iterator_adaptor_base` when defining `pointer_iterator`David Blaikie2018-11-142-2/+33
| | | | | | | | | | | | | | | | The definition of `pointer_iterator` omits what should be a `iterator_traits::<>::iterator_category` parameter from `iterator_adaptor_base`. As a result, iterators based on `pointer_iterator` always have defaulted value types and the wrong iterator category. The definition of `pointee_iterator` just a few lines above does this correctly. This resolves [[ https://bugs.llvm.org/show_bug.cgi?id=39617 | bug 39617 ]]. Patch by Dylan MacKenzie! Reviewers: dblaikie Differential Revision: https://reviews.llvm.org/D54377 llvm-svn: 346833
* [HIP] Fix device only compilationYaxun Liu2018-11-142-10/+20
| | | | | | | | Fix a bug causing host code being compiled when --cude-device-only is set. Differential Revision: https://reviews.llvm.org/D54496 llvm-svn: 346828
* [CMake] Include clang-apply-replacements in Fuchsia toolchainPetr Hosek2018-11-141-0/+1
| | | | | | | | This is needed for run-clang-tidy.py. Differential Revision: https://reviews.llvm.org/D54505 llvm-svn: 346827
* [libcxx] [test] Strip trailing whitespace. NFC.Stephan T. Lavavej2018-11-14164-539/+538
| | | | llvm-svn: 346826
* [WebAssembly] Add support for the event sectionHeejin Ahn2018-11-1434-116/+708
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This adds support for the 'event section' specified in the exception handling proposal. (This was named 'exception section' first, but later renamed to 'event section' to take possibilities of other kinds of events into consideration. But currently we only store exception info in this section.) The event section is added between the global section and the export section. This is for ease of validation per request of the V8 team. This patch: - Creates the event symbol type, which is a weak symbol - Makes 'throw' instruction take the event symbol '__cpp_exception' - Adds relocation support for events - Adds WasmObjectWriter / WasmObjectFile (Reader) support - Adds obj2yaml / yaml2obj support - Adds '.eventtype' printing support Reviewers: dschuff, sbc100, aardappel Subscribers: jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D54096 llvm-svn: 346825
* [PowerPC] Enhance the selection(ISD::VSELECT) of vector typeZi Xuan Wu2018-11-145-20/+133
| | | | | | | | | | To make ISD::VSELECT available(legal) so long as there are altivec instruction, otherwise it's default behavior is expanding, which is legalized at type-legalization phase. Use xxsel to match vselect if vsx is open, or use vsel. Differential Revision: https://reviews.llvm.org/D49531 llvm-svn: 346824
* Revert r346810 "Preserve loop metadata when splitting exit blocks"Reid Kleckner2018-11-142-80/+0
| | | | | | | It broke the Windows self-host: http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/1457 llvm-svn: 346823
* [HeaderSearch] loadSubdirectoryModuleMaps should respect -working-directoryAlex Lorenz2018-11-144-1/+22
| | | | | | | | | | | Include search paths can be relative paths. The loadSubdirectoryModuleMaps function should account for that and respect the -working-directory parameter given to Clang. rdar://46045849 Differential Revision: https://reviews.llvm.org/D54503 llvm-svn: 346822
* [CodeGen] Fix forward scan in MachineBasicBlock::computeRegisterLiveness.Eli Friedman2018-11-142-15/+45
| | | | | | | | | | The scan was incorrectly skipping the first instruction, so a register could appear to be dead when it was actually live. This eventually leads to a machine verifier failure and miscompile in arm-ldst-opt. Differential Revision: https://reviews.llvm.org/D54491 llvm-svn: 346821
* [CMake] Passthrough CFLAGS when checking the compiler-rt pathPetr Hosek2018-11-144-0/+12
| | | | | | | | | | This is needed when cross-compiling for a different target since CFLAGS may contain additional flags like -resource-dir which change the location in which compiler-rt builtins are found. Differential Revision: https://reviews.llvm.org/D54371 llvm-svn: 346820
* Complete reverting r346191Tatyana Krasnukha2018-11-140-0/+0
| | | | llvm-svn: 346819
* Complete reverting r346191Tatyana Krasnukha2018-11-130-0/+0
| | | | llvm-svn: 346818
* [PDB] Simplify symbol handling code, NFCReid Kleckner2018-11-131-25/+22
| | | | | | | | | | | | | | | | | - Make mergeSymbolRecords a method of PDBLinker to reduce the number of parameters it needs. - Remove a stale FIXME comment about error handling. We already drop unknown symbol records, log them, and continue. - Update a comment about why we're copying the symbol record. We do it to realign the record. We can already mutate the symbol record memory, it's memory allocated by relocateDebugChunk. - Avoid the extra `CVSymbol NewSym` variable. We can mutate Sym in place, which is best, since we're mutating the underlying record anyway. llvm-svn: 346817
* [MachineOutliner][NFC] Use flags set in all candidates to check for callsJessica Paquette2018-11-131-6/+11
| | | | | | | | | | | If we keep track of if the ContainsCalls bit is set in the MBB flags for each candidate, then we have a better chance of not checking the candidate for calls at all. This saves quite a few checks in some CTMark tests (~200 in Bullet, for example.) llvm-svn: 346816
* Make dsymutil more robust when parsing load commands.Adrian Prantl2018-11-133-15/+20
| | | | | | rdar://problem/45883463 llvm-svn: 346815
* [InstCombine] fold funnel shift amount based on demanded bitsSanjay Patel2018-11-132-14/+24
| | | | | | | | | | | | | | The shift amount of a funnel shift is modulo the scalar bitwidth: http://llvm.org/docs/LangRef.html#llvm-fshl-intrinsic ...so we can use demanded bits analysis on that operand to simplify it when we have a power-of-2 bitwidth. This is another step towards canonicalizing {shift/shift/or} to the intrinsics in IR. Differential Revision: https://reviews.llvm.org/D54478 llvm-svn: 346814
* Make the ExpandTilde unit test expect "\" (not "/") on Win32Matthew Voss2018-11-131-0/+6
| | | | llvm-svn: 346813
* Fix a bug in the parsing of the LC_BUILD_VERSION Mach-O load command.Adrian Prantl2018-11-133-17/+228
| | | | | | | | | LC_BUILD_VERSION records are of variable length. The original code would use uninitialized memory when the size of a record was exactly 24. rdar://problem/46032185 llvm-svn: 346812
* Add cxx-benchmark-unittests targetEric Fiselier2018-11-133-22/+78
| | | | | | | | | | | | | This patch adds the cxx-benchmark-unittests target so we can start getting test coverage on the benchmarks, including building with sanitizers. Because we're only looking for test-coverage, the benchmarks run for the shortest time possible, and in parallel. The target is excluded from all by default. It only builds and runs the libcxx configurations of the benchmarks, and not any versions built against the systems native standard library. llvm-svn: 346811
* Preserve loop metadata when splitting exit blocksCraig Topper2018-11-132-0/+80
| | | | | | | | | | LoopUtils.cpp contains a utility that splits an loop exit block, so that the new block contains only edges coming from the loop. In the case of nested loops, the exit path for the inner loop might also be the back-edge of the outer loop. The new block which is inserted on this path, is now a latch for the outer loop, and it needs to hold the loop metadata for the outer loop. (The test case gives a more concrete view of the situation.) Patch by Chang Lin (clin1) Differential Revision: https://reviews.llvm.org/D53876 llvm-svn: 346810
* [MachineOutliner][NFC] Use MBB flags to avoid call checks in getOutliningInfoJessica Paquette2018-11-133-25/+39
| | | | | | | | | | | | | We already determine a bunch of information about an MBB in getMachineOutlinerMBBFlags. We can reuse that information to avoid calculating things that must be false/true. The first thing we can easily check is if an outlined sequence could ever contain calls. There's no reason to walk over the outlined range, checking for calls, if we already know that there are no calls in the block containing the sequence. llvm-svn: 346809
* Fix "use of" uninitialized memory in benchmark.Eric Fiselier2018-11-131-1/+1
| | | | | | | An argument to DoNotOptimize was not fully initialized, which caused msan to complain. llvm-svn: 346808
* [InstCombine] canonicalize rotate patterns with cmp/selectSanjay Patel2018-11-132-37/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cmp+branch variant of this pattern is shown in: https://bugs.llvm.org/show_bug.cgi?id=34924 ...and as discussed there, we probably can't transform that without a rotate intrinsic. We do have that now via funnel shift, but we're not quite ready to canonicalize IR to that form yet. The case with 'select' should already be transformed though, so that's this patch. The sequence with negation followed by masking is what we use in the backend and partly in clang (though that part should be updated). https://rise4fun.com/Alive/TplC %cmp = icmp eq i32 %shamt, 0 %sub = sub i32 32, %shamt %shr = lshr i32 %x, %shamt %shl = shl i32 %x, %sub %or = or i32 %shr, %shl %r = select i1 %cmp, i32 %x, i32 %or => %neg = sub i32 0, %shamt %masked = and i32 %shamt, 31 %maskedneg = and i32 %neg, 31 %shl2 = lshr i32 %x, %masked %shr2 = shl i32 %x, %maskedneg %r = or i32 %shl2, %shr2 llvm-svn: 346807
* OpenCL: Don't warn on v printf modifierMatt Arsenault2018-11-135-0/+53
| | | | | | | | | | | This avoids spurious warnings, but could use a lot of work. For example the number of vector elements is not verified, and the passed value type is not checked. Fixes bug 39486 llvm-svn: 346806
* Mark #2184 as complete; the tests are fine. (I thought that they were wrong ↵Marshall Clow2018-11-131-1/+1
| | | | | | before) llvm-svn: 346805
* [lsan] [FIXUP] Fixup for http://reviews.llvm.org/D54484George Karpenkov2018-11-131-1/+1
| | | | | | | | After the change, the tests started failing, as skipped sections can be equal in size to kMaxSegName. Changing `<` to `<=` to address the off-by-one problem. llvm-svn: 346804
* [MachineOutliner][NFC] Exit getOutliningType if there are < 2 candidatesJessica Paquette2018-11-132-4/+5
| | | | | | | Since we never outline anything with fewer than 2 occurrences, there's no reason to compute cost model information if there's less than that. llvm-svn: 346803
* [Driver] Support g++ headers in include/g++David Greene2018-11-136-0/+15
| | | | | | | | | | ray's gcc installation puts C++ headers in PREFIX/include/g++ without indicating a gcc version at all. Typically this is because the version is encoded somewhere in PREFIX. Differential Revision: https://reviews.llvm.org/D53770 llvm-svn: 346802
* [AST] Revert r346793 and r346781Bruno Ricci2018-11-133-115/+102
| | | | | | This somehow breaks the msan bots. Revert while I figure it out. llvm-svn: 346801
* [AMDGPU] combine extractelement into several selectsStanislav Mekhanoshin2018-11-1310-51/+432
| | | | | | | | | | An extractelement with non-constant index will be lowered either to scratch or movrel loop in most cases. This patch converts such instruction into a set of selects if vector size is not too big. Differential Revision: https://reviews.llvm.org/D54351 llvm-svn: 346800
* [NFC] Mark LWG3128 and LWG3132 as requiring no workLouis Dionne2018-11-131-2/+2
| | | | | | | Those LWG issues were adopted in San Diego and require no work on our side. llvm-svn: 346799
* [MemorySSA] Create query after checking if instruction is a fence.Alina Sbirlea2018-11-131-2/+3
| | | | | | | The alternative is checking if I is a fence in the Query constructor, so as to not attempt to get a non-existent MemoryLocation. llvm-svn: 346798
* [AsmPrinter] Fix DebugInfo/X86/gnu-public-names.ll after rL346790Fangrui Song2018-11-131-1/+1
| | | | llvm-svn: 346797
* [ELF] Add a better test for the multi-CU .gdb_index bug that D54361 fixedFangrui Song2018-11-133-2/+82
| | | | | | | | gdb-index-multiple-cu-2.s puts the symbol in question to another object file %t1.o, so that its CuIndex is affected by the number of CUs in %t.o Also change `Kind:` in a comment to `Attributes:` as a follow-up of D54480 and D54481 llvm-svn: 346796
* Fixed DAGTypeLegalizer::SplitVecOp_EXTRACT_VECTOR_ELT i1 handlingStanislav Mekhanoshin2018-11-132-0/+37
| | | | | | | | | Legalizer used to request an ext load from i8 to i1 when promoting vector element type to i8. Fixed. Differential Revision: https://reviews.llvm.org/D54440 llvm-svn: 346795
* [ELF] Rename NameTypeEntry to NameAttrEntry and its field "Type" to ↵Fangrui Song2018-11-132-12/+12
| | | | | | | | | | | | | | | | | | | CuIndexAndAttrs Summary: NameTypeEntry::Type is a bit-packed value of CU index+attributes (https://sourceware.org/gdb//onlinedocs/gdb/Index-Section-Format.html), which is named cu_index_and_attrs in a local variable in gdb/dwarf2read.c:dw2_symtab_iter_next The new name CuIndexAndAttrs is more meaningful. Reviewers: ruiu, dblaikie, espindola Reviewed By: dblaikie Subscribers: emaste, aprantl, arichardson, JDevlieghere, arphaman, llvm-commits Differential Revision: https://reviews.llvm.org/D54481 llvm-svn: 346794
* [AST][NFC] Order the bit-field classes of Stmt like in StmtNodes.tdBruno Ricci2018-11-131-63/+80
| | | | | | | | | | | | Reorder the bit-field classes and the members of the anonymous union so that they both match the order in StmtNodes.td. There is already a fair amount of them, and this is not going to improve. Therefore lets try to keep some order here. Strictly NFC. llvm-svn: 346793
* [lsan] [NFC] Change ARRAY_SIZE to internal_strnlenGeorge Karpenkov2018-11-131-1/+3
| | | | | | | | | | | Calling ARRAY_SIZE on a char* will not actually compute it's size, but just the pointer size. A new Clang warning enabled by default warns about this. Replaced the call with internal_strnlen. Differential Revision: https://reviews.llvm.org/D54484 llvm-svn: 346792
* [MS Demangler] Print public:, protected:, private: if set in FunctionClass ↵Nico Weber2018-11-139-31/+42
| | | | | | | | | | | | or a variable's StorageClass. undname prints them, and the information is in the decorated name, so we probably shouldn't lose it when undecorating. I spot-checked a few of the funnier-looking outputs, and undname has the same output. Differential Revision: https://reviews.llvm.org/D54396 llvm-svn: 346791
* [AsmPrinter] Rename a comment of .debug_gnu_pubnames entryFangrui Song2018-11-132-3/+3
| | | | | | | | | | | | | | | | | | | | Summary: The comment refers to the field as "Kind:". However, in gdb, https://sourceware.org/gdb//onlinedocs/gdb/Index-Section-Format.html names it "attributes", gdb/dwarf2read.c:dw2_symtab_iter_next refers to the whole value as "cu_index_and_attrs" Change it to `Attributes:` for consistency. Reviewers: dblaikie Reviewed By: dblaikie Subscribers: aprantl, JDevlieghere, arphaman, llvm-commits Differential Revision: https://reviews.llvm.org/D54480 llvm-svn: 346790
* DebugInfo: Add a driver flag for DWARF debug_ranges base address specifier use.David Blaikie2018-11-137-1/+31
| | | | | | | | | | | | | | | Summary: This saves a lot of relocations in optimized object files (at the cost of some cost/increase in linked executable bytes), but gold's 32 bit gdb-index support has a bug ( https://sourceware.org/bugzilla/show_bug.cgi?id=21894 ) so we can't switch to this unconditionally. (& even if it weren't for that bug, one might argue that some users would want to optimize in one direction or the other - prioritizing object size or linked executable size) Differential Revision: https://reviews.llvm.org/D54243 llvm-svn: 346789
OpenPOWER on IntegriCloud