summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [clangd][vscode] Update vscode lsp dependencies to pickup the new changes in ↵Haojian Wu2019-09-261-3/+3
| | | | | | | | | | | | | | | | LSP v3.15.0. Summary: This would enable the newly-added semantic selection feature in vscode. Reviewers: usaxena95 Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67964 llvm-svn: 372970
* [clangd][vscode] Turn on the semantic highlighting by default.Haojian Wu2019-09-261-1/+1
| | | | | | | | | | | | | | | | Summary: We have turned on the flag manually and used it for a while, and don't see any major issues, let's enable it by default. Reviewers: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68077 llvm-svn: 372969
* [llvm-exegesis][NFC] Remove dead code.Clement Courbet2019-09-262-10/+0
| | | | | | | | | | | | | | Summary: `hasAliasingImplicitRegistersThrough()` is no longer used. Reviewers: gchatelet Subscribers: tschuett, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68078 llvm-svn: 372968
* [Testing] unbreak after r372963David Zarzycki2019-09-261-0/+1
| | | | llvm-svn: 372967
* MetadataLoader lazyLoadOneMetadata - silence static analyzer ↵Simon Pilgrim2019-09-261-1/+1
| | | | | | | | dyn_cast<MDNode> null dereference warning. NFCI. The static analyzer is warning about a potential null dereference, but we should be able to use cast<MDNode> directly and if not assert will fire for us. llvm-svn: 372966
* [lldb][modern-type-lookup] Add test for using the ClangModulesDeclVendorRaphael Isemann2019-09-263-0/+36
| | | | llvm-svn: 372965
* Remove local shadow constant. NFCI.Simon Pilgrim2019-09-261-2/+0
| | | | | | ValueTracking.cpp already has a local static MaxDepth = 6 constant - this one seems to have been missed when rL124183 landed. llvm-svn: 372964
* [libcxx] Do not implicitly #include assert.hDavid Zarzycki2019-09-268-4/+178
| | | | | | | | | Users should only get the assert() macros if they explicitly include them. Found after switching from the GNU C++ stdlib to the LLVM C++ stdlib. llvm-svn: 372963
* [ValueTracking] Silence static analyzer dyn_cast<Operator> null dereference ↵Simon Pilgrim2019-09-261-225/+228
| | | | | | | | warnings. NFCI. The static analyzer is warning about a potential null dereferences, but since the pointer is only used in a switch statement for Operator::getOpcode() (with an empty default) then its easiest just to wrap this in a null test as the dyn_cast might return null here. llvm-svn: 372962
* Don't stop execution in batch mode when process stops with SIGINT or SIGSTOPTatyana Krasnukha2019-09-266-70/+91
| | | | | | | | Summary: Usually, SIGINT and SIGSTOP don't imply a crash, e.g. SIGSTOP is sent on process launch and attach on some platforms. Differential Revision: https://reviews.llvm.org/D67776 llvm-svn: 372961
* MemorySanitizer - silence static analyzer dyn_cast<> null dereference ↵Simon Pilgrim2019-09-261-3/+3
| | | | | | | | warnings. NFCI. The static analyzer is warning about a potential null dereferences, but we should be able to use cast<> directly and if not assert will fire for us. llvm-svn: 372960
* PGOMemOPSizeOpt - silence static analyzer dyn_cast<MemIntrinsic> null ↵Simon Pilgrim2019-09-261-2/+2
| | | | | | | | dereference warning. NFCI. The static analyzer is warning about a potential null dereference, but we should be able to use cast<MemIntrinsic> directly and if not assert will fire for us. llvm-svn: 372959
* [BPF] Remove unused variables. NFCI.Simon Pilgrim2019-09-261-5/+1
| | | | | | Fixes a dyn_cast<> null dereference warning. llvm-svn: 372958
* [MIPS GlobalISel] Lower aggregate structure return argumentsPetar Avramovic2019-09-264-25/+288
| | | | | | | | | | | | | | Implement aggregate structure split to simpler types in splitToValueTypes. splitToValueTypes is used for return values. According to MipsABIInfo from clang/lib/CodeGen/TargetInfo.cpp, aggregate structure arguments for O32 always get simplified and thus will remain unsupported by the MIPS GlobalISel for the time being. For O32, aggregate structures can be encountered only for complex number returns e.g. 'complex float' or 'complex double' from <complex.h>. Differential Revision: https://reviews.llvm.org/D67963 llvm-svn: 372957
* HexagonAsmParser::ParseDirectiveFalign - silence static analyzer ↵Simon Pilgrim2019-09-261-1/+1
| | | | | | | | dyn_cast<MCConstantExpr> null dereference warning. NFCI. The static analyzer is warning about a potential null dereference, but we should be able to use cast<MCConstantExpr> directly and if not assert will fire for us. llvm-svn: 372956
* [SLPVectorizer][X86] Add SSE common check prefix to let us merge SSE2+SLM checksSimon Pilgrim2019-09-262-150/+4
| | | | llvm-svn: 372955
* [CostModel][X86] Fix SLM <2 x i64> icmp costsSimon Pilgrim2019-09-269-87/+358
| | | | | | | | SLM is 2 x slower for <2 x i64> comparison ops than other vector types, we should account for this like we do for SLM <2 x i64> add/sub/mul costs. This should remove some of the SLM codegen diffs in D43582 llvm-svn: 372954
* [clang-tidy] Make llvm-header-guard work on llvm git monorepoHaojian Wu2019-09-262-0/+16
| | | | | | | | | | | | | | Reviewers: gribozavr Reviewed By: gribozavr Subscribers: xazax.hun, ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68026 llvm-svn: 372953
* SystemInitializer: Use Targets.def to selectively initialize ABI pluginsPavel Labath2019-09-264-122/+68
| | | | | | | | | | | This avoids having to define additional macros in the cmake file, and and also makes the logic in the cpp files more compact. It is also easily extendible to other plugin types (instruction emulation?) that should only be initialized if the corresponding llvm target is built. Thanks to Ilya Birukov for pointing me to this file. llvm-svn: 372952
* [mips] Relax jalr/jr instructions using R_MIPS_JALR relocationSimon Atanasyan2019-09-262-9/+65
| | | | | | | | | | | The R_MIPS_JALR relocation denotes jalr/jr instructions in position independent code. Both these instructions take a target's address from the $25 register. If offset to the target symbol fits into the 18-bits, it's more efficient to replace jalr/jr by bal/b instructions. Differential Revision: https://reviews.llvm.org/D68057 llvm-svn: 372951
* [SystemZ] Recognize mnop-mcount in backendJonas Paulsson2019-09-264-0/+48
| | | | | | | | | | With -pg -mfentry -mnop-mcount, a nop is emitted instead of the call to fentry. Review: Ulrich Weigand https://reviews.llvm.org/D67765 llvm-svn: 372950
* [Testing] Workaround libcxx bug when OS is "none"David Zarzycki2019-09-262-16/+16
| | | | | | | | | | | | If clang is configured to use libcxx as the default C++ standard library, then using "none" for the OS in the target triple will cause libcxx to #error needlessly. Passing -nostdinc++ is a workaround for these tests. See also: https://reviews.llvm.org/D68075 Please note: this workaround will probably exist for a few years until the installed version of libcxx is updated. llvm-svn: 372949
* [clangd] Add a helper for extracting nonlocal decls in a FunctionDeclKadir Cetinkaya2019-09-263-1/+103
| | | | | | | | | | | | | | | | | | | Summary: To be used by define-inline code action to determine whether the function/method body will still be valid in another context. Traverses clang-ast to find all decl nodes under the function decl and stores the non-local ones. Reviewers: hokein Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67748 llvm-svn: 372948
* [X86] Remove isCodeGenOnly from (V)ROUND.*_Int and put it on the non _Int ↵Craig Topper2019-09-261-6/+6
| | | | | | | | | | | | | | | | | | form instead. This matches what's done for VRNDSCALE and most other instructions. This mainly determines which instruction will be preferred by disassembler and assembly parser. The printing and encoding information is the same. We prefer the _Int form since it uses the VR128 class due to intrinsic interface. For some of EVEX features like embedded rounding, we only select from intrinsics today. So there is only a VR128 version. So making the VR128 version the preferred is overally consistent. llvm-svn: 372947
* [lldb][NFC] Use AppendEmptyArgument in CompletionRequest constructorRaphael Isemann2019-09-261-7/+3
| | | | | | | | We now have a utility function for this purpose. (Also fixing the typo in the related comment while I'm at it.) llvm-svn: 372946
* [analyzer] A speculative attempt to avoid gcc-7 crashes caused by r372942.Artem Dergachev2019-09-261-2/+5
| | | | llvm-svn: 372945
* [SortIncludesTest] Add SortPriority fields to fix ↵Mikael Holmen2019-09-261-2/+2
| | | | | | -Wmissing-field-initializers after D64695/r372919 llvm-svn: 372944
* [IfConversion] Disallow TBB == FBB for valid trianglesMikael Holmen2019-09-262-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously the case EBB | \_ | | | TBB | / FBB was treated as a valid triangle also when TBB and FBB was the same basic block. This could then lead to an invalid CFG when we removed the edge from EBB to TBB, since that meant we would also remove the edge from EBB to FBB. Since TBB == FBB is quite a degenerated case of a triangle, we now don't treat it as a valid triangle anymore, and thus we will avoid the trouble with updating the CFG. Reviewers: efriedma, dmgreen, kparzysz Reviewed By: efriedma Subscribers: bjope, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67832 llvm-svn: 372943
* [analyzer] Avoid small vectors of non-default-constructibles.Artem Dergachev2019-09-262-2/+2
| | | | | | Unconfuses certain compilers. llvm-svn: 372942
* [X86] Mark the EVEX encoded PSADBW instructions as commutable to enable load ↵Craig Topper2019-09-263-0/+43
| | | | | | | | folding of the other operand. The SSE and VEX versions are already correct. llvm-svn: 372941
* [ConstantFolding] Use FoldBitCast correctlyKeno Fischer2019-09-261-2/+20
| | | | | | | | | | | | | Previously we might attempt to use a BitCast to turn bits into vectors of pointers, but that requires an inttoptr cast to be legal. Add an assertion to detect the formation of illegal bitcast attempts early (in the tests, we often constant-fold away the result before getting to this assertion check), while being careful to still handle the early-return conditions without adding extra complexity in the result. Patch by Jameson Nash <jameson@juliacomputing.com>. Differential Revision: https://reviews.llvm.org/D65057 llvm-svn: 372940
* [clang-format] Add SortPriority fields to fix -Wmissing-field-initializers ↵Fangrui Song2019-09-262-6/+8
| | | | | | after D64695/r372919 llvm-svn: 372939
* Improve C API support for atomicrmw and cmpxchg.Nick Lewycky2019-09-264-22/+125
| | | | | | | | | | | | | | atomicrmw and cmpxchg have a volatile flag, so allow them to be get and set with LLVM{Get,Set}Volatile. atomicrmw and fence have orderings, so allow them to be get and set with LLVM{Get,Set}Ordering. Add missing LLVMAtomicRMWBinOpFAdd and LLVMAtomicRMWBinOpFSub enum constants. AtomicCmpXchg also has a weak flag, add a getter/setter for that too. Add a getter/setter for the binary-op of an atomicrmw. atomicrmw and cmpxchg have a volatile flag, so allow it to be set/get with LLVMGetVolatile and LLVMSetVolatile. Add missing LLVMAtomicRMWBinOpFAdd and LLVMAtomicRMWBinOpFSub enum constants. AtomicCmpXchg also has a weak flag, add a getter/setter for that too. Add a getter/setter for the binary-op of an atomicrmw. Add LLVMIsA## for CatchSwitchInst, CallBrInst and FenceInst, as well as AtomicCmpXchgInst and AtomicRMWInst. Update llvm-c-test to include atomicrmw and fence, and to copy volatile for the four applicable instructions. Differential Revision: https://reviews.llvm.org/D67132 llvm-svn: 372938
* [libFuzzer] [NFC] Fix grammar error with "it's"Mitch Phillips2019-09-262-2/+2
| | | | llvm-svn: 372937
* [libTooling] Add `run` combinator to Stencils.Yitzhak Mandelbaum2019-09-263-0/+45
| | | | | | | | | | | | | | | | Summary: This revision adds `run`, a StencilPart that runs a user-defined function that computes a result over `MatchFinder::MatchResult`. Reviewers: gribozavr Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67969 llvm-svn: 372936
* [TargetLowering] Make allowsMemoryAccess methode virtual.Thomas Raoux2019-09-269-32/+67
| | | | | | | | | | | Rename old function to explicitly show that it cares only about alignment. The new allowsMemoryAccess call the function related to alignment by default and can be overridden by target to inform whether the memory access is legal or not. Differential Revision: https://reviews.llvm.org/D67121 llvm-svn: 372935
* [MC][WebAssembly] Error on data symbols in the text section.Sam Clegg2019-09-252-1/+16
| | | | | | | | | Previously we had an assert but this can actually occur in valid user code so we need to handle this in release builds too. Differential Revision: https://reviews.llvm.org/D67997 llvm-svn: 372934
* [X86] Use VR512_0_15RegClass intead of VR512RegClass in X86VZeroUpper.Craig Topper2019-09-251-4/+2
| | | | | | | | | | | | | | This pass is only concerned with ZMM0-15 and YMM0-15. For YMM we use VR256 which only contains YMM0-15, but for ZMM we were using VR512 which contains ZMM0-31. Using VR512_0_15 is more correct. Given that the ABI and register allocator will use registers in order, its unlikely that register from 16-31 would be used without also using 0-15. So this probably doesn't functionally matter. llvm-svn: 372933
* [MemorySSA] Avoid adding Phis in the presence of unreachable blocks.Alina Sbirlea2019-09-257-77/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: If a block has all incoming values with the same MemoryAccess (ignoring incoming values from unreachable blocks), then use that incoming MemoryAccess and do not create a Phi in the first place. Revert IDF work-around added in rL372673; it should not be required unless the Def inserted is the first in its block. The patch also cleans up a series of tests, added during the many iterations on insertDef. The patch also fixes PR43438. The same issue that occurs in insertDef with "adding phis, hence the IDF of Phis is needed", can also occur in fixupDefs: the `getPreviousRecursive` call only adds Phis walking on the predecessor edges, which means there may be the case of a Phi added walking the CFG "backwards" which triggers the needs for an additional Phi in successor blocks. Such Phis are added during fixupDefs only in the presence of unreachable blocks. Hence this highlights the need to avoid adding Phis in blocks with unreachable predecessors in the first place. Reviewers: george.burgess.iv Subscribers: Prazek, sanjoy.google, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67995 llvm-svn: 372932
* [InstCombine] foldUnsignedUnderflowCheck(): one last pattern with 'sub' ↵Roman Lebedev2019-09-252-8/+14
| | | | | | | | (PR43251) https://rise4fun.com/Alive/0j9 llvm-svn: 372930
* [NFC][InstCombine] Tests for 'base u<= offset && (base - offset) != 0' ↵Roman Lebedev2019-09-251-0/+33
| | | | | | pattern (PR43251) llvm-svn: 372929
* [InstSimplify] Handle more 'A </>/>=/<= B &&/|| (A - B) !=/== 0' patterns ↵Roman Lebedev2019-09-253-28/+22
| | | | | | | | | | | (PR43251) https://rise4fun.com/Alive/sl9s https://rise4fun.com/Alive/2plN https://bugs.llvm.org/show_bug.cgi?id=43251 llvm-svn: 372928
* [NFC][InstSimplify] More exaustive test coverage for 'A </>/>=/<= B &&/|| (A ↵Roman Lebedev2019-09-251-68/+245
| | | | | | - B) !=/== 0' pattern (PR43251) llvm-svn: 372927
* Simplify -fms-compatibility include lookup logic, NFCReid Kleckner2019-09-252-11/+12
| | | | | | | | | | | This include search logic has an extra parameter to deal with Windows includes with backslashes, which get normalized to forward slashes on non-Windows under -fms-compatibility. Hoist the conditional operator out of LookupHeaderIncludeOrImport and pass the result in instead of repeating the ?: expression everywhere. llvm-svn: 372926
* Fix memory leak in DeclTest.Evgeniy Stepanov2019-09-251-1/+2
| | | | | | | | | | | | Fixes a leak introduced in r372903, detected on the ASan bot. http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/35430/steps/check-clang%20asan/logs/stdio Direct leak of 192 byte(s) in 1 object(s) allocated from: #0 0x561d88 in operator new(unsigned long) /b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/asan/asan_new_delete.cc:105 #1 0x1a48779 in clang::ItaniumMangleContext::create(clang::ASTContext&, clang::DiagnosticsEngine&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ItaniumMangle.cpp:5134:10 #2 0xdff000 in Decl_AsmLabelAttr_Test::TestBody() /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/unittests/AST/DeclTest.cpp:97:23 llvm-svn: 372925
* [LICM] Don't verify domtree/loopinfo unless EXPENSIVE_CHECKS is enabled.Eli Friedman2019-09-251-1/+1
| | | | | | | | | For large functions, verifying the whole function after each loop takes non-linear time. Differential Revision: https://reviews.llvm.org/D67571 llvm-svn: 372924
* [Verifier] add invariant check for callbrNick Desaulniers2019-09-254-17/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The list of indirect labels should ALWAYS have their blockaddresses as argument operands to the callbr (but not necessarily the other way around). Add an invariant that checks this. The verifier catches a bad test case that was added recently in r368478. I think that was a simple mistake, and the test was made less strict in regards to the precise addresses (as those weren't specifically the point of the test). This invariant will be used to find a reported bug. Link: https://www.spinics.net/lists/arm-kernel/msg753473.html Link: https://github.com/ClangBuiltLinux/linux/issues/649 Reviewers: craig.topper, void, chandlerc Reviewed By: void Subscribers: ychen, lebedev.ri, javed.absar, kristof.beyls, hiraditya, llvm-commits, srhines Tags: #llvm Differential Revision: https://reviews.llvm.org/D67196 llvm-svn: 372923
* [libcxxabi] Fix arm build failer with libgccAdhemerval Zanella2019-09-252-2/+12
| | | | | | | | | | | | | | | | | | | | Both arm32 armv7/armv8 bots which do not use compiler-rt are failing to a linking issue: [100%] Built target cxxabi_static CMakeFiles/cxxabi_shared.dir/cxa_demangle.cpp.o: In function `(anonymous namespace)::itanium_demangle::OutputStream::writeUnsigned(unsigned long long, bool)': /home/buildslave/buildslave/libcxx-libcxxabi-libunwind-armv7-linux-noexceptions/llvm/projects/libcxxabi/src/demangle/Utility.h:55: undefined reference to `__aeabi_uldivmod' /home/buildslave/buildslave/libcxx-libcxxabi-libunwind-armv7-linux-noexceptions/llvm/projects/libcxxabi/src/demangle/Utility.h:56: undefined reference to `__aeabi_uldivmod' clang-6.0: error: linker command failed with exit code 1 (use -v to see invocation) It seems after r371273 OutputStream is used more extensively and is pulling OutputStream::writeUnsigned (which thus requires unsigned integer module). The straightfoward fix is to explicit link against libgcc if compiler-rt is not used. llvm-svn: 372921
* [Dwarf] Fix switch cases that take an dw_tag_t.Jonas Devlieghere2019-09-253-0/+10
| | | | | | Now that dw_tag_t is an enum, a default case is required. llvm-svn: 372920
* [clang-format] Modified SortIncludes and IncludeCategories to priority for ↵Paul Hoad2019-09-257-4/+108
| | | | | | | | | | | | | | | | | | | | | | | | | sorting #includes within the Group Category. Summary: This new Style rule is made as a part of adding support for NetBSD KNF in clang-format. NetBSD have it's own priority of includes which should be followed while formatting NetBSD code. This style sorts the Cpp Includes according to the priorities of NetBSD, as mentioned in the [Style Guide](http://cvsweb.netbsd.org/bsdweb.cgi/src/share/misc/style?rev=HEAD&content-type=text/x-cvsweb-markup) The working of this Style rule shown below: **Configuration:** This revision introduces a new field under IncludeCategories named `SortPriority` which defines the priority of ordering the `#includes` and the `Priority` will define the categories for grouping the `#include blocks`. Reviewers: cfe-commits, mgorny, christos, MyDeveloperDay Reviewed By: MyDeveloperDay Subscribers: lebedev.ri, rdwampler, christos, mgorny, krytarowski Patch By: Manikishan Tags: #clang, #clang-format Differential Revision: https://reviews.llvm.org/D64695 llvm-svn: 372919
OpenPOWER on IntegriCloud