summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert "[clang] - Simplify tools::SplitDebugName."Jonas Toth2018-11-275-9/+20
| | | | | | | | This reverts commit r347035 as it introduced assertion failures under certain conditions. More information can be found here: https://reviews.llvm.org/rL347035 llvm-svn: 347676
* [clangd] textDocument/SymbolInfo extensionJan Korous2018-11-2711-0/+504
| | | | | | | | | | New method returning symbol info for given source position. Differential Revision: https://reviews.llvm.org/D54799 rdar://problem/46050281 llvm-svn: 347675
* [clangd][NFC] Move SymbolID to a separate fileJan Korous2018-11-276-77/+126
| | | | | | | | Prerequisity for textDocument/SymbolInfo Differential Revision: https://reviews.llvm.org/D54799 llvm-svn: 347674
* Catch up with EvaluateAsInt() clang API change.Davide Italiano2018-11-271-6/+5
| | | | llvm-svn: 347673
* Implement P1085R2 - Should Span be Regular?. This consists entirely of deletionsMarshall Clow2018-11-278-996/+2
| | | | llvm-svn: 347672
* [clang-tidy] Ignore bool -> single bit bitfield conversion in ↵Malcolm Parsons2018-11-273-6/+26
| | | | | | | | | | | | | | | | readability-implicit-bool-conversion Summary: There is no ambiguity / information loss in this conversion Reviewers: alexfh, aaron.ballman, hokein Reviewed By: alexfh Subscribers: xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D54941 llvm-svn: 347671
* [Demangle] remove itaniumFindTypesInMangledNamePavel Labath2018-11-276-61/+0
| | | | | | | | | | | | | | | | Summary: This (very specialized) function was added to enable an LLDB use case. Now that a more generic interface (overriding of parser functions - D52992) is available, and LLDB has been converted to use that (D54074), the function is unused and can be removed. Reviewers: erik.pilkington, sgraenitz, rsmith Subscribers: mgorny, hiraditya, christof, libcxx-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D54893 llvm-svn: 347670
* [clangd] Put direct headers into srcs section.Kadir Cetinkaya2018-11-279-62/+148
| | | | | | | | | | | | | | | | | | | Summary: Currently, there's no way of knowing about header files using compilation database, since it doesn't contain header files as entries. Using this information, restoring from cache using compile commands becomes possible instead of doing directory traversal. Also, we can issue indexing actions for out-of-date headers even if source files depending on them haven't changed. Reviewers: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D54817 llvm-svn: 347669
* travis: Add cmake buildJan Vesely2018-11-271-1/+89
| | | | | | | Reviewer: Aaron Watry Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 347668
* Add cmake build systemJan Vesely2018-11-2710-0/+501
| | | | | | | | | | | | | | Add cmake support for CLC and ll asm language, the latter includes clang preprocessing stage. Add ctests to check for external function calls. v2: fix typos, style Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Acked-by: Aaron Watry <awatry@gmail.com> Tested-by: Aaron Watry <awatry@gmail.com> Acked-by: Vedran Miletić <vedran@miletic.net> llvm-svn: 347667
* r600: Remove empty OVERRIDES fileJan Vesely2018-11-271-0/+0
| | | | | | Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewer: Aaron Watry llvm-svn: 347666
* amdgcn: Consolidate atomic minmax helpersJan Vesely2018-11-2711-57/+4
| | | | | | | | Removes most overrides Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewer: Aaron Watry llvm-svn: 347665
* configure: Add target specific asm rule.Jan Vesely2018-11-271-1/+3
| | | | | | | | Run the file through target specific preprocessing stage. Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewer: Aaron Watry llvm-svn: 347664
* configure: provide llvm_as helper variableJan Vesely2018-11-271-2/+2
| | | | | | Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewer: Aaron Watry llvm-svn: 347663
* [llvm-mca] pass -dispatch-stats flag to a couple of tests. NFCAndrea Di Biagio2018-11-272-2/+202
| | | | | | | | | | | | | | | | This change is in preparation for a patch that fixes PR36666. llvm-mca currently doesn't know if a buffered processor resource describes a load or store queue. So, any dynamic dispatch stall caused by the lack of load/store queue entries is normally reported as a generic SCHEDULER stall. See for example the -dispatch-stats output from the two tests modified by this patch. In future, processor models will be able to tag processor resources that are used to describe load/store queues. That information would then be used by llvm-mca to correctly classify dynamic dispatch stalls caused by the lack of tokens in the LS. llvm-svn: 347662
* [x86] regenerate checks; NFCSanjay Patel2018-11-271-13/+14
| | | | llvm-svn: 347661
* Move time cast to SymbolFileDWARFDebugMapJonas Devlieghere2018-11-273-23/+12
| | | | | | | | | When trying to fix the bots we expected that the cast would be needed in different places. Ultimately it turned out only the SymbolFileDWARFDebugMap was affected so, as Pavel correctly notes, it makes more sense to do the cast just there instead of in teh FS. llvm-svn: 347660
* [AMDGPU] Disable DAG combine at -O0Stanislav Mekhanoshin2018-11-273-61/+20
| | | | | | Differential Revision: https://reviews.llvm.org/D54358 llvm-svn: 347659
* Derive builtin return type from its definitionMarco Antognini2018-11-274-32/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Prior to this patch, OpenCL code such as the following would attempt to create a BranchInst with a non-bool argument: if (enqueue_kernel(get_default_queue(), 0, nd, ^(void){})) /* ... */ This patch is a follow up on a similar issue with pipe builtin operations. See commit r280800 and https://bugs.llvm.org/show_bug.cgi?id=30219. This change, while being conservative on non-builtin functions, should set the type of expressions invoking builtins to the proper type, instead of defaulting to `bool` and requiring manual overrides in Sema::CheckBuiltinFunctionCall. In addition to tests for enqueue_kernel, the tests are extended to check other OpenCL builtins. Reviewers: Anastasia, spatel, rsmith Reviewed By: Anastasia Subscribers: kristina, cfe-commits, svenvh Differential Revision: https://reviews.llvm.org/D52879 llvm-svn: 347658
* Revert r347419 "Update call to EvaluateAsInt() to the new syntax."Hans Wennborg2018-11-273-23/+16
| | | | | | It's pre-requisite was reverted in r347656. llvm-svn: 347657
* Revert r347417 "Re-Reinstate 347294 with a fix for the failures."Hans Wennborg2018-11-2738-567/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This caused a miscompile in Chrome (see crbug.com/908372) that's illustrated by this small reduction: static bool f(int *a, int *b) { return !__builtin_constant_p(b - a) || (!(b - a)); } int arr[] = {1,2,3}; bool g() { return f(arr, arr + 3); } $ clang -O2 -S -emit-llvm a.cc -o - g() should return true, but after r347417 it became false for some reason. This also reverts the follow-up commits. r347417: > Re-Reinstate 347294 with a fix for the failures. > > Don't try to emit a scalar expression for a non-scalar argument to > __builtin_constant_p(). > > Third time's a charm! r347446: > The result of is.constant() is unsigned. r347480: > A __builtin_constant_p() returns 0 with a function type. r347512: > isEvaluatable() implies a constant context. > > Assume that we're in a constant context if we're asking if the expression can > be compiled into a constant initializer. This fixes the issue where a > __builtin_constant_p() in a compound literal was diagnosed as not being > constant, even though it's always possible to convert the builtin into a > constant. r347531: > A "constexpr" is evaluated in a constant context. Make sure this is reflected > if a __builtin_constant_p() is a part of a constexpr. llvm-svn: 347656
* [clangd] Prevent thread starvation in tests on loaded systems.Sam McCall2018-11-274-3/+20
| | | | | | | | | | | | | | Summary: Background index deliberately runs low-priority, but for tests this may stop them making progress. Reviewers: kadircet Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D54938 llvm-svn: 347655
* [libclang] Fix clang_Cursor_getNumArguments and clang_Cursor_getArgument for ↵Ivan Donchevskii2018-11-272-0/+13
| | | | | | | | | | | CXXConstructExpr Constructors have the same methods for arguments as call expressions. Let's provide a way to get their arguments the same way. Differential Revision: https://reviews.llvm.org/D54934 llvm-svn: 347654
* InstCombine: add comment explaining malloc deletion. NFC.Tim Northover2018-11-271-3/+10
| | | | | | | | I tried to change this, not quite realising the logic behind what we were doing. Hopefully this comment will help the next person to come along. llvm-svn: 347653
* [clang-tidy] Avoid inconsistent notes in readability-container-size-emptyAlexander Kornienko2018-11-272-2/+15
| | | | | | | | | When a warning is issued in a template instantiation, the check would previously use template arguments in a note, which would result in inconsistent or duplicate warnings (depending on how deduplication was done). This patch removes template arguments from the note. llvm-svn: 347652
* [clang-tidy] Minor fixes in a testAlexander Kornienko2018-11-271-8/+8
| | | | | | | Use CHECK-FIXES where it was intended instead of CHECK-MESSAGES. Fixed compiler warnings to pacify YouCompleteMe. llvm-svn: 347651
* [ELF] - Fix R_AARCH64_ADR_GOT_PAGE, R_AARCH64_LD64_GOT_LO12 handling against ↵George Rimar2018-11-274-4/+77
| | | | | | | | | | | | | | | | | | | | IFUNC symbols. This is https://bugs.llvm.org/show_bug.cgi?id=38074. The issue is that when calling a function, LLD generates a .got entry that points to the IFUNC resolver function when instead, it should use the PLT entries properly for handling the IFUNC. So we should create a got entry that points to PLT entry, which itself loads the value from .got.plt, relocated with R_*_IRELATIVE to make things work. Patch do that. Differential revision: https://reviews.llvm.org/D54314 llvm-svn: 347650
* [AArch64] Cortex-a53-843419 erratum should not apply to relaxed TLS.Peter Smith2018-11-272-4/+46
| | | | | | | | | | | | | | | | The changes to the instructions performed by TLS relaxation and the errata patching are performed with relocations. As these are applied so late the errata scanning won't see the changes in the section data made by the TLS relaxation. This can lead to a TLS relaxed sequence being patched when it doesn't need to be. The fix checks to see if there is a R_RELAX_TLS_IE_TO_LE instruction at the same address as the ADRP as this indicates the presence of a relaxation of a sequence that might get recognised as a patch. Differential Revision: https://reviews.llvm.org/D54854 llvm-svn: 347649
* [ASTImporter] Typedef import brings in the complete typeGabor Marton2018-11-272-2/+41
| | | | | | | | | | | | | | | | | | | | | Summary: When we already have an incomplete underlying type of a typedef in the "To" context, and the "From" context has the same typedef, but the underlying type is complete, then the imported type should be complete. Fixes an assertion in CTU analysis of Xerces: Assertion `DD && "queried property of class with no definition"' failed. This assert is happening in the analyzer engine, because that attempts to query an underlying type of a typedef, which happens to be incomplete. Reviewers: a_sidorin, a.sidorin Subscribers: rnkovacs, dkrupp, Szelethus, cfe-commits Differential Revision: https://reviews.llvm.org/D53693 llvm-svn: 347648
* [ELF] - Implement -z nodefaultlibGeorge Rimar2018-11-275-5/+13
| | | | | | | | | | | | | | | | | | | | This is https://bugs.llvm.org//show_bug.cgi?id=38978 Spec says that: "Objects may be built with the -z nodefaultlib option to suppress any search of the default locations at runtime. Use of this option implies that all the dependencies of an object can be located using its runpaths. Without this option, which is the most common case, no matter how you augment the runtime linker's library search path, its last element is always /usr/lib for 32-bit objects and /usr/lib/64 for 64-bit objects." The patch implements this option. Differential revision: https://reviews.llvm.org/D54577 llvm-svn: 347647
* [CMake] Add a missing case of TO_CMAKE_PATHMartin Storsjo2018-11-271-0/+1
| | | | | | This fixes building sanitizers for mingw natively. llvm-svn: 347646
* [COFF] Generate a codeview build id signature for MinGW even when not ↵Martin Storsjo2018-11-272-1/+42
| | | | | | | | | | | | | | | | | | creating a PDB GNU ld, which doesn't generate PDBs, can optionally generate a build id by passing the --build-id option. LLD's MinGW frontend knows about this option but ignores it, as I had falsely assumed that LLD already generated build IDs even in those cases. If debug info is requested and no PDB path is set, generate a build id signature as a hash of the binary itself. This allows associating a binary to a minidump, even if debug info isn't written in PDB form by the linker. Differential Revision: https://reviews.llvm.org/D54828 llvm-svn: 347645
* Add missing REQUIRES: assertsMax Kazantsev2018-11-271-0/+1
| | | | llvm-svn: 347644
* [X86] Add test cases for vector shifts of v2i32/v2i16/v4i16/v2i8/v4i8/v8i8 ↵Craig Topper2018-11-276-0/+13656
| | | | | | with promotion legalization and widening legalization. NFC llvm-svn: 347643
* [X86] Use getUnpackl/getUnpackh instead of directly creating UNPCKL/UNPCKH ↵Craig Topper2018-11-271-8/+8
| | | | | | nodes. llvm-svn: 347642
* [LoopSimplifyCFG] Turn on term folding after underlying bug fixedMax Kazantsev2018-11-271-1/+1
| | | | llvm-svn: 347641
* [LoopSimplifyCFG] Fix corner case with duplicating successorsMax Kazantsev2018-11-272-4/+25
| | | | | | | | | | | | It fixes a bug that doesn't update Phi inputs of the only live successor that is in the list of block's successors more than once. Thanks @uabelho for finding this. Differential Revision: https://reviews.llvm.org/D54849 Reviewed By: anna llvm-svn: 347640
* [gn build] Merge r347530 to gn.Nico Weber2018-11-271-0/+4
| | | | llvm-svn: 347639
* Move a file I forgot to move in r347636.Nico Weber2018-11-271-0/+0
| | | | llvm-svn: 347638
* Add support for the Dylan language to ClangASTContextBruce Mitchener2018-11-271-1/+3
| | | | | | | | | | | | | | | | | | | Summary: This change adds eLanguageTypeDylan to the set of languages supported by ClangASTContext. Debug info generated by the Open Dylan compiler's LLVM back-end was designed to be compatible with C debug info. Patch by Peter Housel. Reviewers: clayborg Reviewed By: clayborg Subscribers: brucem, lldb-commits, aprantl Differential Revision: https://reviews.llvm.org/D54886 llvm-svn: 347637
* [gn build] Create abi-breaking.h, config.h, llvm-config.h, and add a build ↵Nico Weber2018-11-2718-17/+770
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | file for llvm/lib/Support. The comments at the top of llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn and llvm/utils/gn/build/write_cmake_config.py should explain the main bits happening in this patch. The main parts here are that these headers are generated at build time, not gn time, and that currently they don't do any actual feature checks but just hardcode most things based on the current OS, which seems to work well enough. If this stops being enough, the feature checks should each be their own action writing the result to somewhere, and the config write step should depend on those checks (so that they can run in parallel and as part of the build) -- utils/llvm/gn/README.rst already has some more words on that in "Philosophy". (write_cmake_config.py is also going to be used to write clang's clang/include/clang/Config/config.h) This also adds a few files for linking to system libraries in a consistent way if needed in llvm/utils/gn/build/libs (and moves pthread to that model).0 I'm also adding llvm/utils/gn/secondary/llvm/lib/Target/targets.gni in this patch because $native_arch is needed for writing llvm-config.h -- the rest of it will be used later, when the build files for llvm/lib/Target get added. That file describes how to select which archs to build. As a demo, also add a build file for llvm-undname and make it the default build target (it depends on everything that can currently be built). Differential Revision: https://reviews.llvm.org/D54678 llvm-svn: 347636
* [clangd] NFC: Prefer `isa<>` to `dyn_cast<>` to do the checking.Henry Wong2018-11-271-2/+2
| | | | | | | | | | | | | | Summary: Prefer `isa<>` to `dyn_cast<>` when there only need a checking. Reviewers: ilya-biryukov, MaskRay Reviewed By: ilya-biryukov, MaskRay Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits, MTC Differential Revision: https://reviews.llvm.org/D54878 llvm-svn: 347635
* [docs] UBSan and ASan are supported on WindowsReid Kleckner2018-11-272-1/+11
| | | | | | | | Also fix a bullet list. Fixes PR39775 llvm-svn: 347633
* [X86] Prevent DAG combine from folding a bitcast from vXi1 to iX with a ↵Craig Topper2018-11-274-2121/+136
| | | | | | | | | | store on pre-AVX512 targets. If we fold the bitcast into the store we'll end up creating a truncating store to vXi1 that will get scalarized. Instead allow the bitcast to be turned into a movmsk. We probably need to do something if the store itself is a vXi1 type, but I'll leave that til a testcase appears. llvm-svn: 347632
* [X86] Add a bunch of test cases for storing a scalar bitcasted from a vXi1 type.Craig Topper2018-11-273-0/+2640
| | | | | | | | Currently a store combine will absorb the bitcast before our combine that turns bitcasts into movmsk gets a chance to run. This results in a store being created with a vXi1 type. Type legalization then promotes the input type and makes this a truncating store. Then we badly scalarize this store. Currently we avoid this on v8i1->i8 bitcasts due to an incompletely qualified(per the original intention) check in isLoadBitCastBeneficial. An easy fix is to disable this for all vXi1->iX bitcasts on pre-avx512 targets. We'll still generate terrible code if the IR explicitly contains a store of vXi1 without a bitcast. We could probably solve that by just turning all stores of vXi1 into (store (iX (bitcast))) as an early DAG combine. llvm-svn: 347631
* Revert r347627 "[MS] Push fewer DeclContexts for delayed template parsing"Reid Kleckner2018-11-272-24/+2
| | | | | | | | | | | It broke the Windows self-host: http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/1799/steps/stage%202%20build/logs/stdio I can build lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/MachinePostDominators.cpp.obj to repro. llvm-svn: 347630
* [analyzer][PlistMacroExpansion] Part 3.: Macro arguments are expandedKristof Umann2018-11-273-110/+4110
| | | | | | | | This part focuses on expanding macro arguments. Differential Revision: https://reviews.llvm.org/D52795 llvm-svn: 347629
* Revert "[clang][slh] add attribute for speculative load hardening"Zola Bridges2018-11-279-109/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | until I figure out why the build is failing or timing out *************************** Summary: The prior diff had to be reverted because there were two tests that failed. I updated the two tests in this diff clang/test/Misc/pragma-attribute-supported-attributes-list.test clang/test/SemaCXX/attr-speculative-load-hardening.cpp LLVM IR already has an attribute for speculative_load_hardening. Before this commit, when a user passed the -mspeculative-load-hardening flag to Clang, every function would have this attribute added to it. This Clang attribute will allow users to opt into SLH on a function by function basis. This can be applied to functions and Objective C methods. Reviewers: chandlerc, echristo, kristof.beyls, aaron.ballman Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D54915 This reverts commit a5b3c232d1e3613f23efbc3960f8e23ea70f2a79. (r347617) llvm-svn: 347628
* [MS] Push fewer DeclContexts for delayed template parsingReid Kleckner2018-11-272-2/+24
| | | | | | | | | | | | | Only push the outermost record as a DeclContext when parsing a function body. See the comments in Sema::getContainingDC about the way the parser pushes contexts. This is intended to match the behavior the parser normally displays where it parses all method bodies from all nested classes at the end of the outermost class, when all nested classes are complete. Fixes PR38460. llvm-svn: 347627
* [stack-safety] Update commentVitaly Buka2018-11-271-1/+1
| | | | llvm-svn: 347626
OpenPOWER on IntegriCloud