summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [clangd] Bump vscode-clangd v0.0.16Haojian Wu2019-07-242-345/+376
| | | | | | | | CHANGELOG: - detect C++ language based on some well-known file paths - upgrade the lsp-client and lsp-server dependencies llvm-svn: 366877
* [Format] Make it easy to add new format::FormatStyle::LanguageStandard. NFCIFangrui Song2019-07-242-6/+6
| | | | | | | | | | | | | | Preparatory change for D65043. We current use `!=LS_Cpp03` to enable language standards 11,14,17, and 2a. `>=LS_Cpp11` is better if we decide to add new LanguageStandard in the future. Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D65183 llvm-svn: 366876
* [clangd] Update a stale comment, NFC.Haojian Wu2019-07-241-1/+1
| | | | llvm-svn: 366875
* [Remark] Suppress the "-Wreturn-type" compiler warning, NFCHaojian Wu2019-07-241-0/+2
| | | | llvm-svn: 366874
* [clangd] Implement "prepareRename"Haojian Wu2019-07-248-15/+98
| | | | | | | | | | | | | | | | | | Summary: - "prepareRename" request is added in LSP v3.12.0 - also update the vscode-client dependency to pick-up the rename bug fix[1] [1]: https://github.com/microsoft/vscode-languageserver-node/issues/447 Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63126 llvm-svn: 366873
* Revert "FileCheck [8/12]: Define numeric var from expr"Thomas Preud'homme2019-07-247-475/+251
| | | | | | This reverts commit 1b05977538d9487aa845ee2f3bec8b89c63c4f29. llvm-svn: 366872
* Revert "[FileCheck]] Canonicalize caret location testing"Thomas Preud'homme2019-07-245-81/+80
| | | | | | This reverts commit ba4e8d791342219c072a5c8de8a3f41fbb53c6be. llvm-svn: 366871
* Revert "[FileCheck] Use ASSERT for fatal unit tests"Thomas Preud'homme2019-07-241-45/+43
| | | | | | This reverts commit fb596735fe9c1ea22afb1727cbbba449bd6334c2. llvm-svn: 366870
* [Clangd] Fixed ExtractVariable for certain types of ExprsShaurya Gupta2019-07-242-57/+148
| | | | | | | | | | | | | | | | | | Summary: - Modified ExtractVariable for extraction of MemberExpr, DeclRefExpr and Assignment Expr - Removed extraction from label statements. - Fixed unittests Reviewers: sammccall, kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64717 llvm-svn: 366869
* [RISCV] Implement benchmark::cycleclock::NowRoger Ferrer Ibanez2019-07-244-0/+38
| | | | | | | | | This is a cherrypick of D64237 onto llvm/utils/benchmark and libcxx/utils/google-benchmark. Differential Revision: https://reviews.llvm.org/D65142 llvm-svn: 366868
* [PowerPC][NFC] use opcode instead of MachineInstr for instrHasImmForm().Chen Zheng2019-07-242-9/+14
| | | | llvm-svn: 366867
* [AArch64] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds after ↵Fangrui Song2019-07-241-0/+1
| | | | | | r366857 llvm-svn: 366866
* [SafeStack] Insert the deref before remaining elementsPetr Hosek2019-07-242-7/+7
| | | | | | | | | | | This is a follow up to D64971. While we need to insert the deref after the offset, it needs to come before the remaining elements in the original expression since the deref needs to happen before the LLVM fragment if present. Differential Revision: https://reviews.llvm.org/D65172 llvm-svn: 366865
* [Remarks] String tables should be move-onlyFrancis Visoiu Mistrih2019-07-237-29/+55
| | | | | | | | Copying them is expensive. This allows the tables to be moved around at lower cost, and allows a remarks::StringTable to be constructed from a remarks::ParsedStringTable. llvm-svn: 366864
* [lldb] Fix enum value descriptionJonas Devlieghere2019-07-231-1/+1
| | | | llvm-svn: 366863
* [FileCheck] Use ASSERT for fatal unit testsThomas Preud'homme2019-07-231-43/+45
| | | | | | | | | | | | | | | | | | Summary: A number of EXPECT statements in FileCheck's unit tests are dependent from results of other values being tested. This commit changes those earlier test to use ASSERT instead of EXPECT to avoid cascade errors when they are all related to the same issue. Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya Tags: #llvm Differential Revision: https://reviews.llvm.org/D64921 llvm-svn: 366862
* [FileCheck]] Canonicalize caret location testingThomas Preud'homme2019-07-235-80/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Testing of caret location in diagnostic message is currently made with CHECK directive with the following general format: CHECK: {{^ \^$}} James Henderson suggested the following would be more readable: CHECK: {{^}} ^{{$}} and when whole lines can be matched (as is the case for command-line testing where error messages do not include path): CHECK: ^ using the option --match-full-lines. This commit implements these 2 changes on all existing caret position tests. It also aligns the caret to the character it is trying to match in the above line. Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya Tags: #llvm Differential Revision: https://reviews.llvm.org/D64923 llvm-svn: 366861
* FileCheck [8/12]: Define numeric var from exprThomas Preud'homme2019-07-237-251/+475
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch is part of a patch series to add support for FileCheck numeric expressions. This specific patch lift the restriction for a numeric expression to either be a variable definition or a numeric expression to try to match. This commit allows a numeric variable to be set to the result of the evaluation of a numeric expression after it has been matched successfully. When it happens, the variable is allowed to be used on the same line since its value is known at match time. It also makes use of this possibility to reuse the parsing code to parse a command-line definition by crafting a mirror string of the -D option with the equal sign replaced by a colon sign, e.g. for option '-D#NUMVAL=10' it creates the string '-D#NUMVAL=10 (parsed as [[#NUMVAL:10]])' where the numeric expression is parsed to define NUMVAL. This result in a few tests needing updating for the location diagnostics on top of the tests for the new feature. It also enables empty numeric expression which match any number without defining a variable. This is done here rather than in commit #5 of the patch series because it requires to dissociate automatic regex insertion in RegExStr from variable definition which would make commit #5 even bigger than it already is. Copyright: - Linaro (changes up to diff 183612 of revision D55940) - GraphCore (changes in later versions of revision D55940 and in new revision created off D55940) Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield Tags: #llvm Differential Revision: https://reviews.llvm.org/D60388 llvm-svn: 366860
* [DWARF] Use 32-bit format specifier for offsetJonas Devlieghere2019-07-231-7/+7
| | | | | | This should fix PR42730. llvm-svn: 366859
* [lldb][test_suite] Update tests with unexpected pass on Android aarch64Alex Langford2019-07-2314-18/+37
| | | | | | | | | | Summary: update some test decorates that can actually pass on andriod aarch64 Patch by Wanyi Ye <kusmour@gmail.com> Differential Revision: https://reviews.llvm.org/D64767 llvm-svn: 366858
* [AArch64][GlobalISel] Add support for s128 loads, stores, extracts, truncs.Amara Emerson2019-07-2312-279/+218
| | | | | | | | | | | | We need to be able to load and store s128 for memcpy inlining, where we want to generate Q register mem ops. Making these legal also requires that we add some support in other instructions. Regbankselect should also know about these since they have no GPR register class that can hold them, so need special handling to live on the FPR bank. Differential Revision: https://reviews.llvm.org/D65166 llvm-svn: 366857
* Fix "control reaches end of non-void function" warning. NFCI.Simon Pilgrim2019-07-231-0/+1
| | | | llvm-svn: 366856
* [docs] Clarify where the indirect UB due to write-write races comes fromEli Friedman2019-07-231-2/+4
| | | | | | | | This is based on https://bugs.llvm.org/show_bug.cgi?id=42435#c3. Patch by Ralf Jung. llvm-svn: 366855
* [GlobalISel][AArch64] Save a copy on G_SELECT by fixing condition to GPRJessica Paquette2019-07-233-17/+10
| | | | | | | | The condition can never be fed by FPRs, so it should always be on a GPR. Differential Revision: https://reviews.llvm.org/D65157 llvm-svn: 366854
* [ExpressionParser] Handle llvm::Expected resultJonas Devlieghere2019-07-231-2/+10
| | | | | | | | | | This fixes the unchecked-error assertion at runtime. Expected<T> must be checked before access or destruction. Expected<T> value was in success state. (Note: Expected<T> values in success mode must still be checked prior to being destroyed). llvm-svn: 366853
* [ExpressionParser] Fix formatting and whitespace (NFC)Jonas Devlieghere2019-07-231-32/+32
| | | | | | Fix formatting and whitespace before making changes to this file. llvm-svn: 366852
* [ARM] Add opt-bisect support to ARMParallelDSP.Eli Friedman2019-07-231-0/+3
| | | | llvm-svn: 366851
* [lldb] Fix occasional hangs of VSCode testcasesJan Kratochvil2019-07-231-7/+1
| | | | | | | | | | | | | | | | | | | | | | On slower machines the vscode testcases were sometimes hanging: 1910 ? Sl 0:00 | \_ /usr/bin/python .../llvm/tools/lldb/test/dotest.py ... -p TestVSCode_setBreakpoints.py 2649 ? Sl 0:00 | \_ .../build/bin/lldb-vscode 2690 ? S 0:00 | \_ .../build/bin/lldb-server gdbserver --fd=9 --native-regs --setsid 2708 ? t 0:00 | \_ .../build/lldb-test-build.noindex/tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.test_functionality/a.out A reproducer of the racy bug for send_recv(): # self.send_packet(command) #+ import time #+ time.sleep(1) # done = False I guess `request_continue` was probably originally intended to be synchronous but then it isn't and this code has been leftover there. Differential revision: https://reviews.llvm.org/D65163 llvm-svn: 366850
* [Remarks] Introduce a new format: yaml-strtabFrancis Visoiu Mistrih2019-07-2314-51/+134
| | | | | | | | | This exposes better support to use a string table with a format through an actual new remark::Format, called yaml-strtab. This can now be used with -fsave-optimization-record=yaml-strtab. llvm-svn: 366849
* Revert "Revert "Add ReadCStringFromMemory for faster string reads""Antonio Afonso2019-07-235-7/+136
| | | | | | This reverts commit 9c10b620c0619611dfe062216459431955ac4801. llvm-svn: 366848
* Revert "Revert "Implement xfer:libraries-svr4:read packet""Antonio Afonso2019-07-2316-5/+366
| | | | | | This reverts commit 08c38f77c5fb4d3735ec215032fed8ee6730b3db. llvm-svn: 366847
* [Remarks][NFC] Move the YAML serializer to its own headerFrancis Visoiu Mistrih2019-07-235-25/+50
| | | | llvm-svn: 366842
* [PowerPC] Remove redundant load immediate instructionsYi-Hong Lyu2019-07-233-0/+506
| | | | | | | | | | | | | | | | | | | Currently PowerPC backend emits code like this: r3 = li 0 std r3, 264(r1) r3 = li 0 std r3, 272(r1) This patch fixes that and other cases where a register already contains a value that is loaded so we will get: r3 = li 0 std r3, 264(r1) std r3, 272(r1) Differential Revision: https://reviews.llvm.org/D64220 llvm-svn: 366840
* gn build: Merge r366832Nico Weber2019-07-231-0/+1
| | | | llvm-svn: 366837
* ld.lld: Demangle symbols from archives in diagnosticsNico Weber2019-07-238-29/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | This ports r366573 from COFF to ELF. There are now to toString(Archive::Symbol), one doing MSVC demangling in COFF and one doing Itanium demangling in ELF, so rename these two to toCOFFString() and to toELFString() to not get a duplicate symbol. Nothing ever passes a raw Archive::Symbol to CHECK(), so these not being part of the normal toString() machinery seems ok. There are two code paths in the ELF linker that emits this type of diagnostic: 1. The "normal" one in InputFiles.cpp. This is covered by the tweaked test. 2. An additional one that's only used for libcalls if there's at least one bitcode in the link, and if the libcall symbol is lazy, and lazily loaded from an archive (i.e. not from a lazy .o file). (This code path was added in r339301.) Since all libcall names so far are C symbols and never mangled, the change there is not observable and hence not covered by tests. Differential Revision: https://reviews.llvm.org/D65095 llvm-svn: 366836
* [X86] In lowerVectorShuffle, instead of creating a new node to canonicalize ↵Craig Topper2019-07-236-38/+38
| | | | | | | | | | | | | | | | the shuffle mask by commuting, just commute the mask and swap V1/V2. LegalizeDAG tries to legal the DAG by legalizing nodes before their operands. If we create a new node, we end up legalizing it after its operands. This prevents some of the optimizations that can be done when the operand is a build_vector since the build_vector will have been legalized to something else. Differential Revision: https://reviews.llvm.org/D65132 llvm-svn: 366835
* [libFuzzer] Fix __sanitizer_print_memory_profile return type in ExtFunctions.defMax Moroz2019-07-231-1/+1
| | | | | | | | | | | | | | | | | | Summary: Looks like a typo, as that function actually returns void and is used as such in libFuzzer code as well. Reviewers: kcc, Dor1s Reviewed By: Dor1s Subscribers: delcypher, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D65160 llvm-svn: 366834
* [utils] Remove sync-source (with SVN)Jonas Devlieghere2019-07-237-646/+0
| | | | llvm-svn: 366833
* [Remarks] Add unit tests for YAML serializationFrancis Visoiu Mistrih2019-07-233-3/+90
| | | | | | Add tests for both the string table and non string table case. llvm-svn: 366832
* clang-format: Fix namespace end comments for namespaces with attributes and ↵Nico Weber2019-07-234-5/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | macros. Fixes PR39247. While here, also make C++20 `namespace A::inline B::inline C` nested inline namespaced definitions work. Before: #define DEPRECATE_WOOF [[deprecated("meow")]] namespace DEPRECATE_WOOF woof { void f() {} } // namespace DEPRECATE_WOOFwoof namespace [[deprecated("meow")]] woof { void f() {} } // namespace [[deprecated("meow")]]woof namespace woof::inline bark { void f() {} } // namespace woof::inlinebark Now: #define DEPRECATE_WOOF [[deprecated("meow")]] namespace DEPRECATE_WOOF woof { void f() {} } // namespace woof namespace [[deprecated("meow")]] woof { void f() {} } // namespace woof namespace woof::inline bark { void f() {} } // namespace woof::inline bark (In addition to the fixed namespace end comments, also note the correct indent of the namespace contents.) Differential Revision: https://reviews.llvm.org/D65125 llvm-svn: 366831
* [Utils] Add back utils directoryJonas Devlieghere2019-07-2345-0/+6808
| | | | | | | Due to a bug my earlier commit removed the whole utils directory: https://reviews.llvm.org/D65123 llvm-svn: 366830
* [IndVars] Fix a subtle bug in optimizeLoopExitsPhilip Reames2019-07-232-2/+49
| | | | | | | | | | The original code failed to account for the fact that one exit can have a pointer exit count without all of them having pointer exit counts. This could cause two separate bugs: 1) We might exit the loop early, and leave optimizations undone. This is what triggered the assertion failure in the reported test case. 2) We might optimize one exit, then exit without indicating a change. This could result in an analysis invalidaton bug if no other transform is done by the rest of indvars. Note that the pointer exit counts are a really fragile concept. They show up only when we have a pointer IV w/o a datalayout to provide their size. It's really questionable to me whether the complexity implied is worth it. llvm-svn: 366829
* Improve clang-format-diff help outputNico Weber2019-07-231-8/+4
| | | | | | | | | The description in clang-format-diff.py is more useful than the one in `clang-format-diff -h`, so use the same description in both places. Differential Revision: https://reviews.llvm.org/D64998 llvm-svn: 366828
* [Utils] Remove legacy scriptsJonas Devlieghere2019-07-2347-6978/+0
| | | | | | | As pointed out by Nathan in D65155, these scrips don't seem to serve any real need anymore. llvm-svn: 366827
* [IR][Verifier] Allow IntToPtrInst to be !dereferenceableRyan Taylor2019-07-236-20/+116
| | | | | | | | | | | | | | | | | Summary: Allow IntToPtrInst to carry !dereferenceable metadata tag. This is valid since !dereferenceable can be only be applied to pointer type values. Change-Id: If8a6e3c616f073d51eaff52ab74535c29ed497b4 Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64954 llvm-svn: 366826
* [RISCV][NFC] Correct RUN in rvi-pseudos-invalid.sSam Elliott2019-07-231-1/+1
| | | | | | This test should test both riscv32 and riscv64. llvm-svn: 366825
* [Logging] Fix format stringsJonas Devlieghere2019-07-232-18/+16
| | | | | | | Change format strings to use the `{}` syntax instead of the printf syntax when using LLDB_LOG. llvm-svn: 366824
* [clang][NFCI] Fix random typosJan Korous2019-07-233-3/+3
| | | | llvm-svn: 366823
* [compiler-rt][builtins] Provide __clear_cache for SPARCRainer Orth2019-07-231-0/+10
| | | | | | | | | | | | | | | While working on https://reviews.llvm.org/D40900, two tests were failing since __clear_cache aborted. While libgcc's __clear_cache is just empty, this only happens because gcc (in gcc/config/sparc/sparc.c (sparc32_initialize_trampoline, sparc64_initialize_trampoline)) emits flush insns directly. The following patch mimics that. Tested on sparcv9-sun-solaris2.11. Differential Revision: https://reviews.llvm.org/D64496 llvm-svn: 366822
* [CMake] Add -z defs on SolarisRainer Orth2019-07-231-1/+1
| | | | | | | | | | Like other ELF targets, shared objects should be linked with -z defs on Solaris. Tested on x86_64-pc-solaris2.11 and sparcv9-sun-solaris2.11. Differential Revision: https://reviews.llvm.org/D64484 llvm-svn: 366821
OpenPOWER on IntegriCloud