summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert "[DAGCombiner] Ensure we use the correct CC result type in visitSDIV"Haojian Wu2018-06-283-39/+11
| | | | | | | | This reverts commit r335821. This crashes the webassembly test, run "ninja check-llvm-codegen-webassembly" to reproduce. llvm-svn: 335871
* [llvm-mca][x86] Add FMA4 resource testsSimon Pilgrim2018-06-281-0/+349
| | | | | | We should be ensuring we have (near) complete test coverage of instructions, at least for the generic model. llvm-svn: 335870
* [llvm-mca][x86] Add 3dnow! resource testsSimon Pilgrim2018-06-281-0/+208
| | | | | | We should be ensuring we have (near) complete test coverage of instructions, at least for the generic model. llvm-svn: 335869
* [AMDGPU] Early expansion of 32 bit udiv/uremStanislav Mekhanoshin2018-06-284-132/+2747
| | | | | | | | | | | | This allows hoisting of a common code, for instance if denominator is loop invariant. Current change is expansion only, adding licm to the target pass list going to be a separate patch. Given this patch changes to codegen are minor as the expansion is similar to that on DAG. DAG expansion still must remain for R600. Differential Revision: https://reviews.llvm.org/D48586 llvm-svn: 335868
* [llvm-mca] Use a WriteRef to describe register writes in class RegisterFile.Andrea Di Biagio2018-06-286-50/+103
| | | | | | | | | | | This patch introduces a new class named WriteRef. A WriteRef is used by the RegisterFile to keep track of register definitions. Internally it wraps a WriteState, as well as the source index of the defining instruction. This patch allows the tool to propagate additional information to support future analysis on data dependencies. llvm-svn: 335867
* [AMDGPU] Overload llvm.amdgcn.fmad.ftz to support f16Stanislav Mekhanoshin2018-06-284-16/+136
| | | | | | Differential Revision: https://reviews.llvm.org/D48677 llvm-svn: 335866
* Correct the test modified in rL335777.Haojian Wu2018-06-281-1/+1
| | | | llvm-svn: 335865
* lld-link: align sections to 16 bytes if referenced from the gfids tableBob Haarman2018-06-283-0/+101
| | | | | | | | | | | | | | | | | | | Summary: Control flow guard works best when targets it checks are 16-byte aligned. Microsoft's link.exe helps ensure this by aligning code from sections that are referenced from the gfids table to 16 bytes when linking with -guard:cf, even if the original section specifies a smaller alignment. This change implements that behavior in lld-link. See https://crbug.com/857012 for more details. Reviewers: ruiu, hans, thakis, zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D48690 llvm-svn: 335864
* [clang-tidy] misc-unused-parameters - retain old behavior under StrictModeAlexander Kornienko2018-06-285-15/+107
| | | | | | | | | | | | | | Summary: This addresses https://bugs.llvm.org/show_bug.cgi?id=37467. Reviewers: klimek, ilya-biryukov, lebedev.ri, aaron.ballman Reviewed By: lebedev.ri, aaron.ballman Subscribers: aaron.ballman, lebedev.ri, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D46951 llvm-svn: 335863
* [PhiValues] Adjust unit test to invalidate instructions before deleting themJohn Brawn2018-06-281-1/+1
| | | | | | This should fix a sanitizer buildbot failure. llvm-svn: 335862
* [DEBUG_INFO, NVPTX] Add test for .debug_loc section, NFC.Alexey Bataev2018-06-281-0/+506
| | | | llvm-svn: 335861
* [dsymutil] Use UnitListTy consistently (NFC)Jonas Devlieghere2018-06-282-18/+15
| | | | | | | Use the UnitListTy typedef consistently throughout the Dwarf linker and pass it by const reference where possible. llvm-svn: 335860
* Skip core file tests on build configurations lacking necessary componentsPavel Labath2018-06-283-0/+33
| | | | | | | | | | | | | | | | | | | Summary: To successfully open a core file, we need to have LLVM built with support for the relevant target. Right now, if one does not have the appropriate targets configured, the tests will fail. This patch uses the GetBuildConfiguration SB API to inform the test (and anyone else who cares) about the list of supported LLVM targets. The test then uses this information to approriately skip the tests. Reviewers: clayborg, jingham Subscribers: martong, lldb-commits Differential Revision: https://reviews.llvm.org/D48641 llvm-svn: 335859
* Fix test that was failing on Windows due to too many backslashesFilipe Cabecinhas2018-06-281-1/+1
| | | | llvm-svn: 335858
* Add a PhiValuesAnalysis pass to calculate the underlying values of phisJohn Brawn2018-06-2812-0/+1056
| | | | | | | | | | | | This pass is being added in order to make the information available to BasicAA, which can't do caching of this information itself, but possibly this information may be useful for other passes. Incorporates code based on Daniel Berlin's implementation of Tarjan's algorithm. Differential Revision: https://reviews.llvm.org/D47893 llvm-svn: 335857
* OpenBSD driver needs ld.lld in sanitizer contextDavid Carlier2018-06-281-1/+3
| | | | | | | | | | | | | Base GNU ld is pretty ancient and does not support --dynamic-list flag. For conveniency, we can it automatically when compile with ubsan sanitizer flag. Reviewers: dberris Reviewed by: dberris Differential Revision: https://reviews.llvm.org/D48574 llvm-svn: 335856
* [ELF] - EhFrame.cpp: add test case to check "CIE is too small" error message.George Rimar2018-06-281-0/+15
| | | | | | | | | The following line of code was untested: https://github.com/llvm-mirror/lld/blob/master/ELF/EhFrame.cpp#L94 Patch adds a test case. llvm-svn: 335855
* Fix unittest build with GCC older than 5.Benjamin Kramer2018-06-281-1/+1
| | | | | | | | Old GCCs have an annoying bug where RVO disables the automatic conversion to base for unique_ptr. Add a pessimizing std::move as a workaround. llvm-svn: 335854
* [ODRHash] Do not rely on Type* when computing the hash.Vassil Vassilev2018-06-288-10/+46
| | | | | | | | | | | | | | | | | ODRHash aims to provide Cross-TU stable hashing. Making clang::Type pointer part of the hash connects (remotely) the ODRHash with the TU-specific ::Profile hasher. r332281 exposed the issue by changing the way the ASTContext different elaborated types if there is an owning tag. In that case, ODRHash stores two different types in its TypeMap which yields false ODR violation in modules. The current state of implementation shouldn't need the TypeMap concept anymore. Rip it out. Differential Revision: https://reviews.llvm.org/D48524 llvm-svn: 335853
* [ELF] - EhFrame.cpp: add test case to cover "corrupted CIE" error message.George Rimar2018-06-281-0/+30
| | | | | | | This is to test the following line that was uncovered by LLD test cases yet: https://github.com/llvm-mirror/lld/blob/master/ELF/EhFrame.cpp#L149 llvm-svn: 335852
* Revert "Add support for generating a call graph profile from Branch ↵Benjamin Kramer2018-06-2813-329/+7
| | | | | | | | Frequency Info." This reverts commits r335794 and r335797. Breaks ThinLTO+FDO selfhost. llvm-svn: 335851
* [ARM] Parallel DSP PassSjoerd Meijer2018-06-2818-1/+1301
| | | | | | | | | | | | | | | | | Armv6 introduced instructions to perform 32-bit SIMD operations. The purpose of this pass is to do some straightforward IR pattern matching to create ACLE DSP intrinsics, which map on these 32-bit SIMD operations. Currently, only the SMLAD instruction gets recognised. This instruction performs two multiplications with 16-bit operands, and stores the result in an accumulator. We will follow this up with patches to recognise SMLAD in more cases, and also to generate other DSP instructions (like e.g. SADD16). Patch by: Sam Parker and Sjoerd Meijer Differential Revision: https://reviews.llvm.org/D48128 llvm-svn: 335850
* [ELF] - EhFrame.cpp: add test case to cover "DW_EH_PE_aligned encoding is ↵George Rimar2018-06-281-0/+30
| | | | | | | | | not supported" error. It is https://github.com/llvm-mirror/lld/blob/master/ELF/EhFrame.cpp#L144, and we had no test case to cover it. llvm-svn: 335849
* Fix warning on MSVC by using size_t arithmetic instead of casting after the ↵Filipe Cabecinhas2018-06-281-1/+1
| | | | | | fact. NFC llvm-svn: 335848
* [ELF] - EhFrame.cpp: add test case to check "unknown FDE encoding".George Rimar2018-06-281-0/+31
| | | | | | | It's https://github.com/llvm-mirror/lld/blob/master/ELF/EhFrame.cpp#L147 line, which was untested before this patch. llvm-svn: 335847
* Remove explicit type from an initializer list. NFC.Alexander Kornienko2018-06-281-2/+2
| | | | llvm-svn: 335846
* Fix formatting. NFC.Alexander Kornienko2018-06-281-5/+4
| | | | llvm-svn: 335845
* Revert "ADT: Move ArrayRef comparison operators into the class"Pavel Labath2018-06-282-14/+16
| | | | | | This reverts commit r335839, because it breaks the MSVC build. llvm-svn: 335844
* The :option: syntax was generating Sphinx build warnings; switched to double ↵Aaron Ballman2018-06-281-3/+2
| | | | | | backticks to silence the warning; NFC. llvm-svn: 335843
* Correct the code highlighting marker to be Objective-C rather than C++ which ↵Aaron Ballman2018-06-281-1/+1
| | | | | | fixes a Sphinx build warning; NFC. llvm-svn: 335842
* Fix the indentation in this documentation to remove a Sphinx warning; NFC.Aaron Ballman2018-06-281-5/+4
| | | | llvm-svn: 335841
* [ELF] - EhFrame: add test case to cover uncovered branch of the code.George Rimar2018-06-281-0/+28
| | | | | | | | | | This test case adds test for the line that was uncovered previously: https://github.com/llvm-mirror/lld/blob/master/ELF/EhFrame.cpp#L175 it errors out, but we now can test that we have expected flow, which is different for CIE of version 1 and CIE of version 3. llvm-svn: 335840
* ADT: Move ArrayRef comparison operators into the classPavel Labath2018-06-282-16/+14
| | | | | | | | | | | | | | Summary: This allows the implicit ArrayRef conversions to kick in when e.g. comparing ArrayRef to a SmallVector. Reviewers: zturner, dblaikie Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D48632 llvm-svn: 335839
* [ELF] - Cover "unknown .eh_frame augmentation string" error.George Rimar2018-06-281-0/+28
| | | | | | | | | It was https://github.com/llvm-mirror/lld/blob/master/ELF/EhFrame.cpp#L195 and we did not cover it with test. Patch fixes it. llvm-svn: 335838
* [llvm-mca] Refactor method RegisterFile::collectWrites(). NFCIAndrea Di Biagio2018-06-281-7/+13
| | | | | | | | | | | | Rather than calling std::find in a loop, just sort the vector and remove duplicate entries at the end of the function. Also, move the debug print at the end of the function, and query the MCRegisterInfo to print register names rather than physreg IDs. No functional change intended. llvm-svn: 335837
* [clangd] Fix a data race in TUSchedulerIlya Biryukov2018-06-281-5/+5
| | | | | | | | | | By recomputing CompilerInvocation instead of copying it. The problem was caused by the fact that copies of CompilerInvocation store references to the shared state (DiagnosticOptions) when copied, causing data races when two different copies are destroyed from different threads. llvm-svn: 335836
* [Analyzer] Iterator Checker - Part 2: Increment, decrement operators and ↵Adam Balogh2018-06-284-34/+578
| | | | | | | | | | | | | ahead-of-begin checks Add handling of the begin() funcion of containers to the iterator checkers, together with the pre- and postfix ++ and -- operators of the iterators. This makes possible the checking of iterators dereferenced ahead of the begin of the container. Differential Revision: https://reviews.llvm.org/D32642 llvm-svn: 335835
* [DebugInfo] Follow-up commit to improve consistency. NFCJonas Devlieghere2018-06-282-127/+117
| | | | | | Follow-up commit for r335757 to address some inconsistencies. llvm-svn: 335834
* [ELF] - Add test case to cover "corrupted CIE (failed to read LEB128)" error.George Rimar2018-06-281-0/+21
| | | | | | | | | It is the following line: https://github.com/llvm-mirror/lld/blob/master/ELF/EhFrame.cpp#L120 We did not cover it yet. llvm-svn: 335833
* Comment change to verify commit rights. NFC.Jesper Antonsson2018-06-281-1/+1
| | | | | | | | | | Summary: Just a silly one-character correction. Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D48709 llvm-svn: 335832
* s/TablesChecked/TableChecked/ after r335823Hans Wennborg2018-06-282-2/+2
| | | | llvm-svn: 335831
* AMDGPU: Remove MFI::ABIArgOffsetMatt Arsenault2018-06-287-33/+22
| | | | | | | | | | | | | | We have too many mechanisms for tracking the various offsets used for kernel arguments, so remove one. There's still a lot of confusion with these because there are two different "implicit" argument areas located at the beginning and end of the kernarg segment. Additionally, the offset was determined based on the memory size of the split element types. This would break in a future commit where v3i32 is decomposed into separate i32 pieces. llvm-svn: 335830
* AMDGPU: Error on calls from graphics shadersMatt Arsenault2018-06-282-0/+14
| | | | | | | | In principle nothing should stop these from working, but work is necessary to create an ABI for dealing with the stack related registers. llvm-svn: 335829
* AMDGPU: Fix AMDGPUCodeGenPrepare using uninitialized AMDGPUAS structMatt Arsenault2018-06-281-1/+2
| | | | | | Not sure how this wasn't noticed before. llvm-svn: 335828
* AMDGPU: Fix assert on aggregate type kernel argumentsMatt Arsenault2018-06-282-2/+175
| | | | | | | | | | Just fix the crash for now by not doing the optimization since figuring out how to properly convert the bits for an arbitrary struct is a pain. Also fix a crash when there is only an empty struct argument. llvm-svn: 335827
* [ELF] - Removed trailing whitespace. NFC.George Rimar2018-06-281-1/+0
| | | | llvm-svn: 335826
* [ELF] - Add test case to cover "corrupted CIE (failed to read string)"George Rimar2018-06-281-0/+23
| | | | | | It was uncovered by our test cases. llvm-svn: 335824
* Unify sorted asserts to use the existing atomic patternBenjamin Kramer2018-06-283-9/+10
| | | | | | | These are all benign races and only visible in !NDEBUG. tsan complains about it, but a simple atomic bool is sufficient to make it happy. llvm-svn: 335823
* Retrieve a function PDB symbol correctly from nested blocksPavel Labath2018-06-284-57/+107
| | | | | | | | | | | | | | | | | | | Summary: This patch fixes a problem with retrieving a function symbol by an address in a nested block. In the current implementation of ResolveSymbolContext function it retrieves a symbol with PDB_SymType::None and then checks if found symbol's tag equals to PDB_SymType::Function. So, if nested block's symbol was found, ResolveSymbolContext does not resolve a function. Reviewers: asmith, labath, zturner Reviewed By: asmith, labath Differential Revision: https://reviews.llvm.org/D47939 Patch by Aleksandr Urakov <aleksandr.urakov@jetbrains.com> llvm-svn: 335822
* [DAGCombiner] Ensure we use the correct CC result type in visitSDIVSimon Pilgrim2018-06-283-11/+39
| | | | | | | | We could get away with it for constant folded cases, but not for rL335719. Thanks to Krzysztof Parzyszek for noticing. llvm-svn: 335821
OpenPOWER on IntegriCloud