summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Rename more checks from misc- to bugprone-.Alexander Kornienko2018-02-2823-75/+87
| | | | | | | | | | | | | | | | Summary: clang-tidy/rename_check.py {misc,bugprone}-string-integer-assignment clang-tidy/rename_check.py {misc,bugprone}-string-literal-with-embedded-nul clang-tidy/rename_check.py {misc,bugprone}-suspicious-enum-usage clang-tidy/rename_check.py {misc,bugprone}-suspicious-missing-comma Reviewers: hokein, sammccall, aaron.ballman Subscribers: klimek, cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D43868 llvm-svn: 326384
* [libcxx] Fix last_write_time test for filesystems that don't support very ↵Volodymyr Sapsai2018-02-281-10/+32
| | | | | | | | | | | | | | | | | | | | | small times. APFS minimum supported file write time is -2^63 nanoseconds, which doesn't go as far as `file_time_type::min()` that is equal to -2^63 microseconds on macOS. This change doesn't affect filesystems that support `file_time_type` range only for in-memory file time representation but not for on-disk representation. Such filesystems are considered as `SupportsMinTime`. rdar://problem/35865151 Reviewers: EricWF, Hahnfeld Subscribers: jkorous-apple, mclow.lists, cfe-commits, christof Differential Revision: https://reviews.llvm.org/D42755 llvm-svn: 326383
* Use DenseMap::lookup() instead of find() and a hand-written null check.Rui Ueyama2018-02-282-8/+2
| | | | llvm-svn: 326382
* build: add the ability to create a symlink for dsymutilSaleem Abdulrasool2018-02-283-2/+14
| | | | | | | | | Add a `LLVM_INSTALL_CCTOOLS_SYMLINKS` to mirror `LLVM_INSTALL_BINUTILS_SYMLINKS`. For now, this allows us to create symlinks for `dsymutil` to `llvm-dsymutil`. This option is off by default, but the user can enable it. llvm-svn: 326381
* [X86] Regenerate cmpxchg testsSimon Pilgrim2018-02-283-23/+131
| | | | | | Add 64-bit cmpxchg8b tests llvm-svn: 326380
* [WebAssembly] Reduce code repetition. NFC.Rui Ueyama2018-02-283-21/+14
| | | | | | Differential Revision: https://reviews.llvm.org/D43910 llvm-svn: 326379
* Fix up the gtest targets for changes in the UnwindAssembly tests.Jim Ingham2018-02-281-20/+34
| | | | llvm-svn: 326378
* [InstCombine] simplify code for X * -1.0 --> -X; NFCSanjay Patel2018-02-282-9/+5
| | | | | | I've added random FMF to one of the tests to show those are propagated. llvm-svn: 326377
* [GlobalOpt] don't change CC of musttail calle(e|r)Jonas Devlieghere2018-02-282-1/+58
| | | | | | | | | | | | | | | When the function has musttail call - its cc is fixed to be equal to the cc of the musttail callee. In such case (and in the case of the musttail callee), GlobalOpt should not change the cc to fastcc as it will break the invariant. This fixes PR36546 Patch by: Fedor Indutny (indutny) Differential revision: https://reviews.llvm.org/D43859 llvm-svn: 326376
* [X86] Lower extract_element from k-registers by bitcasting from v16i1 to i16 ↵Craig Topper2018-02-285-41/+33
| | | | | | | | and extending/truncating. This is equivalent to what isel was doing anyway but by canonicalizing earlier we can remove some patterns. llvm-svn: 326375
* Add ability to collect memory limit.Han Ming Ong2018-02-286-6/+48
| | | | | | | | Reviewer: Jason Molenda <rdar://problem/37686560> llvm-svn: 326374
* [hwasan] update the asm snippet in the docs to match the current default ↵Kostya Serebryany2018-02-281-2/+0
| | | | | | behaviour llvm-svn: 326373
* [X86][AVX512] Improve support for signed saturation truncation storesSimon Pilgrim2018-02-282-9/+23
| | | | | | | | Matches what we already manage for unsigned saturation truncation stores Differential Revision: https://reviews.llvm.org/D43629 llvm-svn: 326372
* Make sure that clang-format doesn't reorder include files.Rui Ueyama2018-02-281-0/+2
| | | | | | | clang-format won't reorder include files if there is a blank line. Thanks to Nico for the tips. llvm-svn: 326371
* Attempt to fix cl-include.c on Windows.Nico Weber2018-02-281-2/+2
| | | | llvm-svn: 326370
* Adapt some tests to work with PPC64le architecturePavel Labath2018-02-284-4/+7
| | | | | | | | | | | | | | | Summary: Merge branch 'master' into adaptPPC64tests Reviewers: clayborg, alexandreyy, labath Reviewed By: clayborg, alexandreyy Subscribers: luporl, lbianc, alexandreyy, lldb-commits Differential Revision: https://reviews.llvm.org/D42917 Patch by Ana Julia Caetano <ana.caetano@eldorado.org.br>. llvm-svn: 326369
* [OpenMP] Extend NVPTX SPMD implementation of combined constructsCarlo Bertolli2018-02-2816-52/+476
| | | | | | | | Differential Revision: https://reviews.llvm.org/D43852 This patch extends the SPMD implementation to all target constructs and guards this implementation under a new flag. llvm-svn: 326368
* Revert "[lldb] Use vFlash commands when writing to target's flash memory ↵Pavel Labath2018-02-2813-505/+23
| | | | | | | | | | | | regions" This reverts commit r326261 as it introduces inconsistencies in the handling of load addresses for ObjectFileELF -- some parts of the class use physical addresses, and some use virtual. This has manifested itself as us not being able to set the load address of the vdso "module" on android. llvm-svn: 326367
* [Hexagon] Add -ffixed-r19 driver option and translate it to +reserved-r19Krzysztof Parzyszek2018-02-283-8/+24
| | | | llvm-svn: 326366
* [clangd] Try to fix failures on clang-x64-ninja-win7 build bot.Eric Liu2018-02-285-9/+9
| | | | llvm-svn: 326365
* [Hexagon] Implement target feature +reserved-r19Krzysztof Parzyszek2018-02-283-0/+8
| | | | llvm-svn: 326364
* Write some tests as linker scripts instead of assembly files.Rui Ueyama2018-02-286-83/+79
| | | | | | | | | | Some linker script test cases contain only a few lines of assembly and a long linker script. Such tests are easier to maintain if we write the main test file as a linkier script instead of assembly. Differential Revision: https://reviews.llvm.org/D43887 llvm-svn: 326363
* CodeGenObjCXX: handle inalloca appropriately for msgSend variantSaleem Abdulrasool2018-02-282-1/+20
| | | | | | | | | | | objc_msgSend_stret takes a hidden parameter for the returned structure's address for the construction. When the function signature is rewritten for the inalloca passing, the return type is no longer marked as indirect but rather inalloca stret. This enhances the test for the indirect return to check for that case as well. This fixes the incorrect return classification for Windows x86. llvm-svn: 326362
* [InstCombine] Split the FP constant code out of lookThroughFPExtensions and ↵Craig Topper2018-02-281-15/+20
| | | | | | | | | | | | | | use nullptr as a sentinel Currently this code's control flow very much assumes that there are no meaningful checks after determining that it's a ConstantFP. So whenever it wants to stop it just does "return V". But V is also the variable name it uses when it wants to return a new value. So 'return V' appears multiple times with different meanings. This patch just moves all the code into a helper function and returns nullptr when it wants to stop. I've split this from D43774 while I try to figure out how to best handle the vector case there. But this change by itself at least seemed like a readability improvement. Differential Revision: https://reviews.llvm.org/D43833 llvm-svn: 326361
* Attempt to build breakage caused by r326339.Rui Ueyama2018-02-281-1/+1
| | | | | | | clang-format automatically sorted the #include lines, but I believe Windows.h needs to be included before Dbghelp.h. llvm-svn: 326360
* Losen time contraint to accommodate system loadsLei Huang2018-02-281-1/+1
| | | | llvm-svn: 326359
* Fix llvm-config --system-libs output on FreeBSD and NetBSDDimitry Andric2018-02-281-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: For various reasons, CMake's detection mechanism for `backtrace()` returns an absolute path `/usr/lib/libexecinfo.so` on FreeBSD and NetBSD. Since `tools/llvm-config/CMakeLists.txt` only checks if system libraries start with `-`, this causes `llvm-config --system-libs` to produce the following incorrect output: ``` -lrt -l/usr/lib/libexecinfo.so -ltinfo -lpthread -lz -lm ``` Fix it by removing the path and the `lib` prefix, to make it look like a regular short library name, suitable for appending to a `-l` link flag. This also fixes the `Bindings/Go/go.test` test case, since that always died with "unable to find library -l/usr/lib/libexecinfo.so". Reviewers: chandlerc, emaste, joerg, krytarowski Reviewed By: krytarowski Subscribers: hans, bdrewery, mgorny, hintonda, llvm-commits Differential Revision: https://reviews.llvm.org/D42702 llvm-svn: 326358
* [clang-cl] Implement /XNico Weber2018-02-282-2/+15
| | | | | | | | | | | | /X makes cl stop looking in %INCLUDE%. Implement this for clang-cl. As it turns out, the return in ToolChains/MSVC.cpp, AddClangSystemIncludeArgs() for -nostdlibinc is already in the right place (but -nostdlibinc isn't exposed by clang-cl), so just alias /X to that. https://reviews.llvm.org/D43888 llvm-svn: 326357
* [WebAssembly] Remove unneeded --no-gc-sections flag from tests. NFC.Sam Clegg2018-02-282-2/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D43889 llvm-svn: 326356
* Fix gcc -Wreturn-type warnings after r326307.Nico Weber2018-02-281-0/+2
| | | | llvm-svn: 326355
* [Documentation] Split Clang-tidy changes in Release Notes into sections: new ↵Eugene Zelenko2018-02-283-31/+33
| | | | | | checks, new aliases, renamed checks; sort all of them alphabetically. Enforce 80 characters line length limit. Highlight C++ keywords. llvm-svn: 326354
* [AMDGPU] added writelane intrinsicTim Renouf2018-02-289-22/+155
| | | | | | | | | | | | | | | | | Summary: For use by LLPC SPV_AMD_shader_ballot extension. The v_writelane instruction was already implemented for use by SGPR spilling, but I had to add an extra dummy operand tied to the destination, to represent that all lanes except the selected one keep the old value of the destination register. .ll test changes were due to schedule changes caused by that new operand. Differential Revision: https://reviews.llvm.org/D42838 llvm-svn: 326353
* Fixed spelling mistake in comments of LLVM Analysis passesVedant Kumar2018-02-284-14/+14
| | | | | | | | Patch by Reshabh Sharma! Differential Revision: https://reviews.llvm.org/D43861 llvm-svn: 326352
* [profile] Test the exported symbol set for empty programsVedant Kumar2018-02-281-2/+14
| | | | | | | | Programs without any code in them should export the exact same set of symbols as programs with code, at least on Darwin. This is done to make text-based API verification possible for certain Darwin frameworks. llvm-svn: 326351
* [InstrProfiling] Emit the runtime hook when no counters are loweredVedant Kumar2018-02-285-23/+28
| | | | | | | | | | | | | | | | | | | | | | The API verification tool tapi has difficulty processing frameworks which enable code coverage, but which have no code. The profile lowering pass does not emit the runtime hook in this case because no counters are lowered. While the hook is not needed for program correctness (the profile runtime doesn't have to be linked in), it's needed to allow tapi to validate the exported symbol set of instrumented binaries. It was not possible to add a workaround in tapi for empty binaries due to an architectural issue: tapi generates its expected symbol set before it inspects a binary. Changing that model has a higher cost than simply forcing llvm to always emit the runtime hook. rdar://36076904 Differential Revision: https://reviews.llvm.org/D43794 llvm-svn: 326350
* [NVPTX] Removed always-true predicates in NVPTX.Artem Belevich2018-02-285-216/+132
| | | | | | | | | | | NVPTX stopped supporting GPUs older than sm_20 (Fermi) quite a while back. Removal of support of pre-Fermi GPUs made a lot of predicates in the NVPTX backend pointless as they can't ever be false any more. It's time to retire them. NFC intended. Differential Revision: https://reviews.llvm.org/D43843 llvm-svn: 326349
* Add "%" operator to the linker script.Rui Ueyama2018-02-282-1/+12
| | | | | | | | This patch improves compatibility with GNU linkers. Differential Revision: https://reviews.llvm.org/D43883 llvm-svn: 326348
* Inline a trivial function. NFC.Rui Ueyama2018-02-281-5/+1
| | | | llvm-svn: 326347
* [RISCV] Force enable int128 for compiling long double routinesMandeep Singh Grang2018-02-281-0/+6
| | | | | | | | | | | | | | | | | Summary: For RISCV32, we must force enable int128 for compiling long double routines using the flag -fforce-enable-int128. Related clang patch: https://reviews.llvm.org/D43105 Reviewers: asb, kito-cheng, apazos, compnerd, howard.hinnant Reviewed By: kito-cheng Subscribers: shiva0217, efriedma, mgorny, hintonda, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D43106 llvm-svn: 326346
* Fix use after free in PDB linker.Zachary Turner2018-02-281-2/+13
| | | | | | | | | | | | | | | | | | When merging in types from a type server PDB, we would use a pointer into the type server PDB's mapped file buffer directly to avoid copying data. However, we would close the type server PDB after we finished merging in its types, which would unmap all of its memory. This would lead to a use after free. We fix this by making a strong reference in the PDBLinker class to all referenced type server PDBs, thereby making it safe to hold pointers into its memory mapped contents. This fixes llvm.org/pr36455 Differential Revision: https://reviews.llvm.org/D43834 llvm-svn: 326345
* Simplify. NFC.Rafael Espindola2018-02-281-3/+3
| | | | llvm-svn: 326344
* [GlobalISel] Print/Parse FailedISel MachineFunction propertyRoman Tereshin2018-02-287-13/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | FailedISel MachineFunction property is part of the CodeGen pipeline state as much as every other property, notably, Legalized, RegBankSelected, and Selected. Let's make that part of the state also serializable / de-serializable, so if GlobalISel aborts on some of the functions of a large module, but not the others, it could be easily seen and the state of the pipeline could be maintained through llc's invocations with -stop-after / -start-after. To make MIR printable and generally to not to break it too much too soon, this patch also defers cleaning up the vreg -> LLT map until ResetMachineFunctionPass. To make MIR with FailedISel: true also machine verifiable, machine verifier is changed so it treats a MIR-module as non-regbankselected and non-selected if there is FailedISel property set. Reviewers: qcolombet, ab Reviewed By: dsanders Subscribers: javed.absar, rovka, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D42877 llvm-svn: 326343
* [CUDA] Include single GPU binary, NFCI.Jonas Hahnfeld2018-02-285-93/+87
| | | | | | | | | Binaries for multiple architectures are combined by fatbinary, so the current code was effectively not needed. Differential Revision: https://reviews.llvm.org/D43461 llvm-svn: 326342
* [TLS] use emulated TLS if the target supports only this modeChih-Hung Hsieh2018-02-2832-15/+133
| | | | | | | | | | | | | | | Emulated TLS is enabled by llc flag -emulated-tls, which is passed by clang driver. When llc is called explicitly or from other drivers like LTO, missing -emulated-tls flag would generate wrong TLS code for targets that supports only this mode. Now use useEmulatedTLS() instead of Options.EmulatedTLS to decide whether emulated TLS code should be generated. Unit tests are modified to run with and without the -emulated-tls flag. Differential Revision: https://reviews.llvm.org/D42999 llvm-svn: 326341
* [WebAssembly] Use toArrayRef. NFC.Rui Ueyama2018-02-281-6/+6
| | | | | | Differential Revision: https://reviews.llvm.org/D43855 llvm-svn: 326340
* Merge {COFF,ELF}/Strings.cpp to Common/Strings.cpp.Rui Ueyama2018-02-2822-210/+134
| | | | | | | | | This should resolve the issue that lld build fails in some hosts that uses case-insensitive file system. Differential Revision: https://reviews.llvm.org/D43788 llvm-svn: 326339
* [OMPT] Fix ompt_get_task_info() and add tests for itJoachim Protze2018-02-283-88/+182
| | | | | | | | | | | | | The thread_num parameter of ompt_get_task_info() was not being used previously, but need to be set. The print_task_type() function (form the task-types.c testcase) was merged into the print_ids() function (in callback.h). Testing of ompt_get_task_info() was added to the task-types.c testcase. It was not tested extensively previously. Differential Revision: https://reviews.llvm.org/D42472 llvm-svn: 326338
* [WebAssembly] Return a StringRef instead of std::string from ↵Rui Ueyama2018-02-282-8/+8
| | | | | | | | getSectionName(). NFC. Differential Revision: https://reviews.llvm.org/D43854 llvm-svn: 326337
* [WebAssembly] Improve WasmSignatureDenseMapInfo.Rui Ueyama2018-02-281-4/+3
| | | | | | | | | | | | | | Let X and Y be types. Previously, functions F(X, Y) and G(Y, X) had the same hash value because their hash values are computed as follows: hash(F) = hash(X) + hash(Y) hash(G) = hash(Y) + hash(X) This patch fixes the issue by using hash_combine. Differential Revision: https://reviews.llvm.org/D43856 llvm-svn: 326336
* [WebAssembly] Reorder symbol table to match MC orderNicholas Wilson2018-02-285-90/+90
| | | | | | | | | Update LLD test expectations for new symbol ordering introduced by Differential D43685. Differential Revision: https://reviews.llvm.org/D43875 llvm-svn: 326335
OpenPOWER on IntegriCloud