summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [SimpleLoopUnswitch] Add a test case exposing a bugSerguei Katkov2019-07-101-0/+25
| | | | | | | | | | | | | | | | | This test exposes a bug in SimpleLoopUnswitch that leads to a crash on assert(SuccessorsCount > 1 && "Cannot unswitch a condition without multiple distinct successors!"); when SimpleLoopUnswitch considers unswitching of a loop by a switch with one successor. Fix will be submitted soon. Patch Author: Daniil Suchkov. Reviewers: reames, asbirlea, skatkov Reviewed By: skatkov Subscribers: zzheng, llvm-commits Differential Revision: https://reviews.llvm.org/D64403 llvm-svn: 365600
* [Syntax] Add assertion to catch invalid tokens early. NFCIlya Biryukov2019-07-102-2/+7
| | | | | | To help with identifiying root cause of a crash we are seeing. llvm-svn: 365599
* [NFC][AArch64] Fix vector vqtb[lx][1-4]_s8 operandDiogo N. Sampaio2019-07-102-17/+17
| | | | | | | | | | | | | | | | | | Summary: Change the vqtb[lx][1-4]_s8 instrinsics to have the last argument as vector of unsigned valuse, not signed, accordingly to https://developer.arm.com/architectures/instruction-sets/simd-isas/neon/intrinsics Reviewers: LukeCheeseman, DavidSpickett Reviewed By: DavidSpickett Subscribers: DavidSpickett, javed.absar, kristof.beyls, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64243 llvm-svn: 365598
* Silence gcc warning by adding parentheses to condition [NFC]Mikael Holmen2019-07-101-3/+3
| | | | | | | | | | | | Without this gcc 7.4.0 complains with ../include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h:457:54: error: suggest parentheses around '&&' within '||' [-Werror=parentheses] isArtifactCast(TmpDef->getOpcode()) && ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ "Expecting copy or artifact cast here"); ~ llvm-svn: 365597
* [Coding style change] Rename variables so that they start with a lowercase ↵Rui Ueyama2019-07-1056-12292/+12292
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | letter This patch is mechanically generated by clang-llvm-rename tool that I wrote using Clang Refactoring Engine just for creating this patch. You can see the source code of the tool at https://reviews.llvm.org/D64123. There's no manual post-processing; you can generate the same patch by re-running the tool against lld's code base. Here is the main discussion thread to change the LLVM coding style: https://lists.llvm.org/pipermail/llvm-dev/2019-February/130083.html In the discussion thread, I proposed we use lld as a testbed for variable naming scheme change, and this patch does that. I chose to rename variables so that they are in camelCase, just because that is a minimal change to make variables to start with a lowercase letter. Note to downstream patch maintainers: if you are maintaining a downstream lld repo, just rebasing ahead of this commit would cause massive merge conflicts because this patch essentially changes every line in the lld subdirectory. But there's a remedy. clang-llvm-rename tool is a batch tool, so you can rename variables in your downstream repo with the tool. Given that, here is how to rebase your repo to a commit after the mass renaming: 1. rebase to the commit just before the mass variable renaming, 2. apply the tool to your downstream repo to mass-rename variables locally, and 3. rebase again to the head. Most changes made by the tool should be identical for a downstream repo and for the head, so at the step 3, almost all changes should be merged and disappear. I'd expect that there would be some lines that you need to merge by hand, but that shouldn't be too many. Differential Revision: https://reviews.llvm.org/D64121 llvm-svn: 365595
* Fix modular build issues caused by BitCodes.hKristina Brooks2019-07-101-6/+8
| | | | | | | | | | Consolidate llvm::BWH_* statics into an enum to fix module build issues. This fixes the LLVM_Bitcode module, getting rid of -Wmodules-ambiguous-internal-linkage. Differential Revision: https://reviews.llvm.org/D64469 llvm-svn: 365594
* Revert accidental change to fileAaron Smith2019-07-101-3/+0
| | | | llvm-svn: 365593
* Try again to move common functionality from ProcessWindows into ProcessDebuggerAaron Smith2019-07-106-455/+726
| | | | | | | This reverts commit ed499a36b67cf46cbf66052cfe374c80a595f1c1 and addresses a problem causing a Windows build bot to hang. llvm-svn: 365592
* [ubsan][test] Restore float-divide-by-zero testFangrui Song2019-07-101-0/+1
| | | | | | Removed by rCTE365307 to fix buildbots. It can be restored now because D64317/rC365587 brought back -fsanitize=float-divide-by-zero llvm-svn: 365591
* [analyzer] CastValueChecker: Remove a dump()Csaba Dabis2019-07-101-1/+0
| | | | | Summary: Fix a nit. llvm-svn: 365590
* [X86] Limit getTargetConstantFromNode to only work on NormalLoads not ↵Craig Topper2019-07-101-1/+1
| | | | | | | | | extending loads. This seems to fix a failure reported by Jordan Rupprecht, but we don't have a reduced test case yet. llvm-svn: 365589
* [Support] Move llvm::MemoryBuffer to sys::fs::file_tReid Kleckner2019-07-1018-122/+276
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: On Windows, Posix integer file descriptors are a compatibility layer over native file handles provided by the C runtime. There is a hard limit on the maximum number of file descriptors that a process can open, and the limit is 8192. LLD typically doesn't run into this limit because it opens input files, maps them into memory, and then immediately closes the file descriptor. This prevents it from running out of FDs. For various reasons, I'd like to open handles to every input file and keep them open during linking. That requires migrating MemoryBuffer over to taking open native file handles instead of integer FDs. Reviewers: aganea, Bigcheese Reviewed By: aganea Subscribers: smeenai, silvas, mehdi_amini, hiraditya, steven_wu, dexonsmith, dang, llvm-commits, zturner Tags: #llvm Differential Revision: https://reviews.llvm.org/D63453 llvm-svn: 365588
* [Driver] Add float-divide-by-zero back to supported sanitizers after ↵Fangrui Song2019-07-108-9/+33
| | | | | | | | | | | | | | | | | | D63793/rC365272 D63793 removed float-divide-by-zero from the "undefined" set but it failed to add it to getSupportedSanitizers(), thus the sanitizer is rejected by the driver: clang-9: error: unsupported option '-fsanitize=float-divide-by-zero' for target 'x86_64-unknown-linux-gnu' Also, add SanitizerMask::FloatDivideByZero to a few other masks to make -fsanitize-trap, -fsanitize-recover, -fsanitize-minimal-runtime and -fsanitize-coverage work. Reviewed By: rsmith, vitalybuka Differential Revision: https://reviews.llvm.org/D64317 llvm-svn: 365587
* AMDGPU/GlobalISel: Add support for wide loads >= 256-bitsTom Stellard2019-07-107-37/+767
| | | | | | | | | | | | | | | | | | Summary: This adds support for the most commonly used wide load types: <8xi32>, <16xi32>, <4xi64>, and <8xi64> Reviewers: arsenm Reviewed By: arsenm Subscribers: hiraditya, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, dstuttard, tpr, t-tye, volkan, Petar.Avramovic, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57399 llvm-svn: 365586
* [analyzer] CastValueChecker: Model castsCsaba Dabis2019-07-106-5/+354
| | | | | | | | | | | | | | | | | | | | | Summary: It models the LLVM casts: - `cast<>` - `dyn_cast<>` - `cast_or_null<>` - `dyn_cast_or_null<>` It has a very basic support without checking the `classof()` function. (It reapplies the reverted 'llvm-svn: 365582' patch with proper test file.) Reviewed By: NoQ Tags: #clang Differential Revision: https://reviews.llvm.org/D64374 llvm-svn: 365585
* Revert "[analyzer] CastValueChecker: Model casts"Csaba Dabis2019-07-096-349/+5
| | | | | | This reverts commit 27cf6664437efd640bb6db5594bafcce68fa2854. llvm-svn: 365584
* GlobalISel: Implement lower for G_FCOPYSIGNMatt Arsenault2019-07-095-179/+724
| | | | | | | | | In SelectionDAG AMDGPU treated these as legal, but this was mostly because the bitcasts required for FP types were painful. Theoretically the bitpattern should eventually match to bfi, so don't bother trying to get the patterns to import. llvm-svn: 365583
* [analyzer] CastValueChecker: Model castsCsaba Dabis2019-07-096-5/+349
| | | | | | | | | | | | | | | | | | | Summary: It models the LLVM casts: - `cast<>` - `dyn_cast<>` - `cast_or_null<>` - `dyn_cast_or_null<>` It has a very basic support without checking the `classof()` function. Reviewed By: NoQ Tags: #clang Differential Revision: https://reviews.llvm.org/D64374 llvm-svn: 365582
* Revert [clang] DirectoryWatcherReid Kleckner2019-07-0910-1252/+0
| | | | | | This reverts r365574 (git commit 31babea94a3ed38a140540f2252cf043dacec1f7) llvm-svn: 365581
* [Bitcode] Explicitly include Bitstream/BitCodes.h and BitstreamWriter.hFrancis Visoiu Mistrih2019-07-091-0/+2
| | | | | | This fixes a modules issue. llvm-svn: 365580
* [MS] Treat ignored explicit calling conventions as an explicit __cdeclReid Kleckner2019-07-092-4/+63
| | | | | | | | | | | | | | | The CCCR_Ignore action is only used for Microsoft calling conventions, mainly because MSVC does not warn when a calling convention would be ignored by the current target. This behavior is actually somewhat important, since windows.h uses WINAPI (which expands to __stdcall) widely. This distinction didn't matter much before the introduction of __vectorcall to x64 and the ability to make that the default calling convention with /Gv. Now, we can't just ignore __stdcall for x64, we have to treat it as an explicit __cdecl annotation. Fixes PR42531 llvm-svn: 365579
* [docs][Remarks] Add documentation for remarks in LLVMFrancis Visoiu Mistrih2019-07-093-14/+308
| | | | | | | | | | | | | | | This adds documentation that describes remarks in LLVM. It aims at explaining what remarks are, how to enable them, and what users can do with the different modes. It lists all the available flags in LLVM (excluding clang), and describes the expected YAML structure as well as the tools that support the YAML format today. Differential Revision: https://reviews.llvm.org/D64355 llvm-svn: 365578
* [X86] Don't form extloads in combineExtInVec unless the load extension is legal.Craig Topper2019-07-091-7/+9
| | | | | | | | | | This should prevent doing this on pre-sse4.1 targets or for 256 bit vectors without avx2. I don't know of a failure from this. Op legalization will probably take care of, but seemed better to be safe. llvm-svn: 365577
* [clangd] fix assert in test after r365531.Sam McCall2019-07-091-7/+12
| | | | | | Unverified because CMake/ninja seems to be broken... llvm-svn: 365576
* AMDGPU/GlobalISel: Fix legality for G_BUILD_VECTORMatt Arsenault2019-07-0920-199/+604
| | | | llvm-svn: 365575
* [clang] DirectoryWatcherJan Korous2019-07-0910-0/+1252
| | | | | | | | | | Asynchronously monitors specified directory for changes and passes notifications to provided callback. Dependency for index-while-building. Differential Revision: https://reviews.llvm.org/D58418 llvm-svn: 365574
* [AMDGPU] gfx908 v_pk_fmac_f16 supportStanislav Mekhanoshin2019-07-094-4/+102
| | | | | | Differential Revision: https://reviews.llvm.org/D64433 llvm-svn: 365573
* gn build: Merge r365536.Peter Collingbourne2019-07-091-0/+1
| | | | llvm-svn: 365572
* gn build: Merge r365532.Peter Collingbourne2019-07-091-1/+1
| | | | llvm-svn: 365571
* gn build: Merge r365541.Peter Collingbourne2019-07-092-0/+6
| | | | llvm-svn: 365570
* gn build: Merge r365531.Peter Collingbourne2019-07-091-0/+1
| | | | llvm-svn: 365569
* Add lldb type unit support to the release notesPavel Labath2019-07-091-0/+2
| | | | | | | | | | | | Reviewers: JDevlieghere, teemperor Subscribers: llvm-commits, lldb-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64366 llvm-svn: 365568
* [lldb] Quick Fix: IRExecutionUnit check pointer before access itAlex Langford2019-07-091-3/+3
| | | | | | | | | | | | Summary: Move checking pointer code block before accessing the pointer This caused lldb to crash when testing on Android Patch by Wanyi Ye! Differential Revision: https://reviews.llvm.org/D64434 llvm-svn: 365567
* GlobalISel: Combine unmerge of merge with intermediate castMatt Arsenault2019-07-094-14/+549
| | | | | | | This eliminates some illegal intermediate vectors when operations are scalarized. llvm-svn: 365566
* [Profile] Support raw/indexed profiles larger than 4GBVedant Kumar2019-07-092-2/+23
| | | | | | rdar://45955976 llvm-svn: 365565
* [llvm-objdump] Keep warning for --disassemble-functions in correct order.Yuanfang Chen2019-07-092-2/+16
| | | | | | | | | | | | | | relative to normal output when dumping archive files. prepare for PR35351. Reviewers: jhenderson, grimar, MaskRay, rupprecht Reviewed by: MaskRay, jhenderson Differential Revision: https://reviews.llvm.org/D64165 llvm-svn: 365564
* [AMDGPU] gfx908 mAI instructions, MC partStanislav Mekhanoshin2019-07-0924-18/+2782
| | | | | | Differential Revision: https://reviews.llvm.org/D64446 llvm-svn: 365563
* build: use multiple `install` rather than building up a listSaleem Abdulrasool2019-07-091-12/+20
| | | | | | | | Rather than building up a list to iterate over later, just create multiple install commands based on the configuration. This makes it easier to see what is getting installed and allows for the install handling to be centralised. NFC llvm-svn: 365562
* [lldb_test_suite] Fix lldb test suite targeting remote AndroidAlex Langford2019-07-093-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Fixed `Android.rules` for running test suite on remote android - the build configuration is not compatible with ndk structure, change it to link to static libc++ - generally clang should be able to use libc++ and will link against the right library, but some libc++ installations require the user manually link libc++abi. - add flag `-lc++abi` to fix the test binary build failure Added `skipIfTargetAndroid` `skipUnlessTargetAndroid` for better test support - the `skipIfPlatform` method will ask `lldbplatformutil.getPlatform()` for platform info which is actually the os type, and //Android// is not os type but environment - create this function to handle the android target condition **To Run Test on Remote Android** 1 start lldb-server on your devices 2 run lldb-dotest with following configuration: `./lldb-dotest --out-of-tree-debugserver --arch aarch64 --platform-name remote-android --platform-url connect://localhost:12345 --platform-working-dir /data/local/tmp/ --compiler your/ndk/clang` Reviewers: xiaobai, labath Reviewed By: labath Subscribers: labath, javed.absar, kristof.beyls, srhines, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64118 llvm-svn: 365561
* Reland "[TSan] Improve handling of stack pointer mangling in {set,long}jmp, ↵Julian Lettner2019-07-091-9/+51
| | | | | | | | | | | | | | | | | | pt.8" Fix compilation errors related to `SANITIZER_GO` `#ifdef`s. Refine longjmp key management. For Linux, re-implement key retrieval in C (instead of assembly). Removal of `InitializeGuardPtr` and a final round of cleanups will be done in the next commit. Reviewed By: dvyukov Differential Revision: https://reviews.llvm.org/D64092 > llvm-svn: 365513 llvm-svn: 365560
* [Docs] Replace SVN revisions with lldb versionsDave Lee2019-07-091-7/+6
| | | | | | | | | | | | | | Summary: Replaces references to svn commits with the lldb version number those commits first appeared in. Themotivation is to show that these features are no longer that new and can generally be adopted. Reviewers: JDevlieghere Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D61778 llvm-svn: 365559
* XFAIL clang/test/Headers/max_align.c on i686Andus Yu2019-07-091-1/+1
| | | | llvm-svn: 365558
* Use the Itanium C++ ABI for the pipe_builtin.cl testReid Kleckner2019-07-091-1/+3
| | | | | | | Certain OpenCL constructs cannot yet be mangled in the MS C++ ABI. Add a FIXME for it if anyone cares to implement it. llvm-svn: 365557
* De-templatize non-dependent VS macro logic, NFCReid Kleckner2019-07-098-90/+85
| | | | | | | These macro definitions don't depend on the template parameter, so they don't need to be part of the template. Move them to a .cpp file. llvm-svn: 365556
* [CXX] Exercise all paths through these tests.Paul Robinson2019-07-093-1/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D63894 llvm-svn: 365555
* [TSan] Refine longjmp key management on DarwinJulian Lettner2019-07-091-5/+6
| | | | | | NFC. llvm-svn: 365554
* [lld][WebAssembly] Report undefined symbols during scanRelocationsSam Clegg2019-07-097-51/+30
| | | | | | | | | | | | | | | | This puts handling of undefined symbols in a single location. Its also more in line with the ELF backend which only reports undefined symbols based on relocations. One side effect is that we no longer report undefined symbols that are only referenced in GC'd sections. This also fixes a crash reported in the emscripten toolchain: https://github.com/emscripten-core/emscripten/issues/8930. Differential Revision: https://reviews.llvm.org/D64280 llvm-svn: 365553
* [SLP] Optimize getSpillCost(); NFCINikita Popov2019-07-091-6/+10
| | | | | | | | | | | | For a given set of live values, the spill cost will always be the same for each call. Compute the cost once and multiply it by the number of calls. (I'm not sure this spill cost modeling makes sense if there are multiple calls, as the spill cost will likely be shared across calls in that case. But that's how it currently works.) llvm-svn: 365552
* hwasan: Improve precision of checks using short granule tags.Peter Collingbourne2019-07-0917-232/+457
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A short granule is a granule of size between 1 and `TG-1` bytes. The size of a short granule is stored at the location in shadow memory where the granule's tag is normally stored, while the granule's actual tag is stored in the last byte of the granule. This means that in order to verify that a pointer tag matches a memory tag, HWASAN must check for two possibilities: * the pointer tag is equal to the memory tag in shadow memory, or * the shadow memory tag is actually a short granule size, the value being loaded is in bounds of the granule and the pointer tag is equal to the last byte of the granule. Pointer tags between 1 to `TG-1` are possible and are as likely as any other tag. This means that these tags in memory have two interpretations: the full tag interpretation (where the pointer tag is between 1 and `TG-1` and the last byte of the granule is ordinary data) and the short tag interpretation (where the pointer tag is stored in the granule). When HWASAN detects an error near a memory tag between 1 and `TG-1`, it will show both the memory tag and the last byte of the granule. Currently, it is up to the user to disambiguate the two possibilities. Because this functionality obsoletes the right aligned heap feature of the HWASAN memory allocator (and because we can no longer easily test it), the feature is removed. Also update the documentation to cover both short granule tags and outlined checks. Differential Revision: https://reviews.llvm.org/D63908 llvm-svn: 365551
* [PoisonChecking] Flesh out complete todo list for full coveragePhilip Reames2019-07-091-8/+24
| | | | | Note: I don't actually plan to implement all of the cases at the moment, I'm just documenting them for completeness. There's a couple of cases left which are practically useful for me in debugging loop transforms, and I'll probably stop there for the moment. llvm-svn: 365550
OpenPOWER on IntegriCloud