summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [RISCV] Constant materialisation for RV64IAlex Bradbury2018-11-162-8/+232
| | | | | | | | | | | | | | | | | | | | | | | This commit introduces support for materialising 64-bit constants for RV64I, making use of the RISCVMatInt::generateInstSeq helper in order to share logic for immediate materialisation with the MC layer (where it's used for the li pseudoinstruction). test/CodeGen/RISCV/imm.ll is updated to test RV64, and gains new 64-bit constant tests. It would be preferable if anyext constant returns were sign rather than zero extended (see PR39092). This patch simply adds an explicit signext to the returns in imm.ll. Further optimisations for constant materialisation are possible, most notably for mask-like values which can be generated my loading -1 and shifting right. A future patch will standardise on the C++ codepath for immediate selection on RV32 as well as RV64, and then add further such optimisations to RISCVMatInt::generateInstSeq in order to benefit both RV32 and RV64 for codegen and li expansion. Differential Revision: https://reviews.llvm.org/D52962 llvm-svn: 347042
* [MSP430] Add support for .refsym directiveAnton Korobeynikov2018-11-162-0/+27
| | | | | | | | | | | | | | | Introduces support for '.refsym' assembler directive. From GCC docs (for MSP430): '.refsym' - This directive instructs assembler to add an undefined reference to the symbol following the directive. No relocation is created for this symbol; it will exist purely for pulling in object files from archives. Patch by Kristina Bessonova! Differential Revision: https://reviews.llvm.org/D54618 llvm-svn: 347041
* [MSP430] Add more tests for ABI and calling conventionAnton Korobeynikov2018-11-165-2/+222
| | | | | | | | Patch by Kristina Bessonova! Differential Revision: https://reviews.llvm.org/D54582 llvm-svn: 347040
* [clangd] Fix a compiler warning and test crashes caused in rL347038.Haojian Wu2018-11-162-1/+3
| | | | llvm-svn: 347039
* Introduce shard storage to auto-index.Kadir Cetinkaya2018-11-165-25/+275
| | | | | | | | | | | | Reviewers: sammccall, ioeric Reviewed By: sammccall Subscribers: llvm-commits, mgorny, Eugene.Zelenko, ilya-biryukov, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D54269 llvm-svn: 347038
* [DAGCombine] Fix non-deterministic debug outputSam Parker2018-11-161-4/+4
| | | | | | | | | | | PR37970 reported non-deterministic debug output, this was caused by iterating through a set and not a a vector. bugzilla: https://bugs.llvm.org/show_bug.cgi?id=37970 Differential Revision: https://reviews.llvm.org/D54570 llvm-svn: 347037
* [clangd] Initial clang-tidy diagnostics support.Sam McCall2018-11-164-4/+125
| | | | | | | | | | | | | | | | | | | | | Summary: This runs checks over a restricted subset of the TU: - preprocessor callbacks just receive the truncated PP events that occur when a preamble is used. - ASTMatchers run only over the top-level decls in the main-file This patch just turns on one simple check (bugprone-sizeof-expression) with no configuration. Configuration is complex enough to warrant a separate patch This depends on a patch allowing traversal to be restricted to a scope. Reviewers: hokein Subscribers: srhines, mgorny, ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D54204 llvm-svn: 347036
* [clang] - Simplify tools::SplitDebugName.George Rimar2018-11-165-20/+9
| | | | | | | | | | | | | This should be NFC change. SplitDebugName recently started to accept the `Output` that can be used to simplify the logic a bit, also it seems that code in SplitDebugName that uses OPT_fdebug_compilation_dir is simply dead. Differential revision: https://reviews.llvm.org/D54576 llvm-svn: 347035
* [LegalizeVectorTypes] Teach WidenVecRes_Convert to turn ANY_EXTEND into ↵Craig Topper2018-11-161-0/+2
| | | | | | | | ANY_EXTEND_VECTOR_INREG when the input and output types need to be widened to the same width. If we don't do it here, DAGCombine will just end up creating it from the scalar any_extend+build_vector so might as well save a step. llvm-svn: 347034
* [ThinLTO] Internalize readonly globalsEugene Leviant2018-11-1646-92/+865
| | | | | | | | An attempt to recommit r346584 after failure on OSX build bot. Fixed cache key computation in ThinLTOCodeGenerator and added test case llvm-svn: 347033
* [X86] Add custom type legalization for v2i8/v4i8/v8i8 mul under ↵Craig Topper2018-11-162-155/+56
| | | | | | | | -x86-experimental-vector-widening. By early promoting the multiply to use an i16 element type we can avoid op legalization emit a second multiply for the 8 upper elements of the v16i8 type we would otherwise get. llvm-svn: 347032
* [X86] Add some test cases for vector multiplies on vectors shorter than 128 ↵Craig Topper2018-11-161-0/+265
| | | | | | bits with -x86-experimental-vector-widening-legalization. llvm-svn: 347031
* [ELF][MIPS] Use MIPS R6 `sigrie` as a trap instructionSimon Atanasyan2018-11-166-125/+83
| | | | | | | | | | | | | | | Current value using as a trap instruction (0xefefefef) is not a good choice for MIPS because it's a valid MIPS instruction `swc3 $15,-4113(ra)`. This patch replaces 0xefefefef by 0x04170001. For all MIPS ISA revisions before R6, this value is just invalid instruction. Starting from MIPS R6 it's a valid instruction `sigrie 1` which signals a Reserved Instruction exception. mips-traps.s test case is added to test trap encoding. Other test cases are modified to remove redundant checking. Differential revision: https://reviews.llvm.org/D54154 llvm-svn: 347029
* AMDGPU: Fix analyzeBranch failing with pseudoterminatorsMatt Arsenault2018-11-164-3/+54
| | | | | | | | | If a block had one of the _term instructions used for gluing exec modifying instructions to the end of the block, analyzeBranch would fail, preventing the verifier from catching a broken successor list. llvm-svn: 347027
* [CMake] Support cross-compiling with Fuchsia toolchain buildPetr Hosek2018-11-161-1/+32
| | | | | | | | | | When second stage is being cross-compiled for a different platform we need to build enough of first stage runtimes to get a working compiler. Differential Revision: https://reviews.llvm.org/D54463 llvm-svn: 347026
* [CMake] Support cross-compiling with multi-stage buildsPetr Hosek2018-11-162-4/+58
| | | | | | | | | | | | | | | | | | | | When using multi-stage builds, we would like support cross-compilation. Example is 2-stage build when the first stage is compiled for host while the second stage is compiled for the target. Normally, the second stage would be also used for compiling runtimes, but that's not possible when cross-compiling, so we use the first stage compiler instead. However, we still want to use the second stage paths. To do so, we set the -resource-dir of the first stage compiler to point to the resource directory of the second stage. We also need compiler tools that support the target architecture. These tools are not guaranteed to be present on the host, but in case of multi-stage build, we can build these tools in the first stage. Differential Revision: https://reviews.llvm.org/D54461 llvm-svn: 347025
* [compiler-rt] Use exact spelling when building for default targetPetr Hosek2018-11-161-1/+4
| | | | | | | | | | | When building for default target only, use exact target spelling when deriving the name for the per-target runtime directory. This is necessary for AArch32 where the CMake build by default rewrites the architecture which leads to unexpected results. Differential Revision: https://reviews.llvm.org/D54612 llvm-svn: 347022
* [CMake] Use the correct spelling for armv7 in Fuchsia's toolchainPetr Hosek2018-11-161-1/+1
| | | | | | | | We need to explicitly specify the architecture version. Differential Revision: https://reviews.llvm.org/D54613 llvm-svn: 347021
* Don't use uniform initialization syntax.Zachary Turner2018-11-163-11/+21
| | | | llvm-svn: 347020
* [Clang][Sema]Choose a better candidate in overload function call if there is ↵Zi Xuan Wu2018-11-163-4/+129
| | | | | | | | | | | | | | | | | | | | | | a compatible vector conversion instead of ambiguous call error There are 2 function variations with vector type parameter. When we call them with argument of different vector type we would prefer to choose the variation with implicit argument conversion of compatible vector type instead of incompatible vector type. For example, typedef float __v4sf __attribute__((__vector_size__(16))); void f(vector float); void f(vector signed int); int main { __v4sf a; f(a); } Here, we'd like to choose f(vector float) but not report an ambiguous call error. Differential revision: https://reviews.llvm.org/D53417 llvm-svn: 347019
* [NativePDB] Rewrite the PdbSymUid to use our own custom namespacing scheme.Zachary Turner2018-11-1614-411/+436
| | | | | | | | | | | | | | | | | | | | | | | Originally we created our 64-bit UID scheme by using the first byte as sort of a "tag" to represent what kind of symbol this was, and we re-used the PDB_SymType enumeration for this. For native pdb support, this is not really the right abstraction layer, because what we really want is something that tells us *how* to find the symbol. This means, specifically, is in the globals stream / public stream / module stream / TPI stream / etc, and for whichever one it is in, where is it within that stream? A good example of why the old namespacing scheme was insufficient is that it is more or less impossible to create a uid for a field list member of a class/struction/union/enum that tells you how to locate the original record. With this new scheme, the first byte is no longer a PDB_SymType enum but a new enum created specifically to identify where in the PDB this record lives. This gives us much better flexibility in what kinds of symbols the uids can identify. llvm-svn: 347018
* [VFS] Update unittest to fix Windows buildbot.Volodymyr Sapsai2018-11-161-6/+6
| | | | | | | | | Buildbot http://lab.llvm.org:8011/builders/clang-x64-windows-msvc is failing because it doesn't like paths in VFS, make them more Windows-friendly. Follow up to r347009. llvm-svn: 347016
* Revert r347014 "[X86] Add some test cases for vector multiplies on vectors ↵Craig Topper2018-11-161-265/+0
| | | | | | | | shorter than 128 bits with -x86-experimental-vector-widening-legalization." Apparently I failed to update this after turnign sign extend to any extend. llvm-svn: 347015
* [X86] Add some test cases for vector multiplies on vectors shorter than 128 ↵Craig Topper2018-11-161-0/+265
| | | | | | bits with -x86-experimental-vector-widening-legalization. llvm-svn: 347014
* Added missing whitespace in the link.Artem Belevich2018-11-161-1/+1
| | | | llvm-svn: 347013
* [VFS] Implement `RedirectingFileSystem::getRealPath`.Volodymyr Sapsai2018-11-161-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | It fixes the case when Objective-C framework is added as a subframework through a symlink. When parent framework infers a module map and fails to detect a symlink, it would add a subframework as a submodule. And when we parse module map for the subframework, we would encounter an error like > error: umbrella for module 'WithSubframework.Foo' already covers this directory By implementing `getRealPath` "an egregious but useful hack" in `ModuleMap::inferFrameworkModule` works as expected. LLVM commit is r347009. rdar://problem/45821279 Reviewers: bruno, benlangmuir, erik.pilkington Reviewed By: bruno Subscribers: hiraditya, dexonsmith, JDevlieghere, cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D54245 llvm-svn: 347012
* [X86] Use ANY_EXTEND instead of SIGN_EXTEND in the AVX2 and later path for ↵Craig Topper2018-11-167-549/+429
| | | | | | | | | | legalizing vXi8 multiply. We aren't going to use the upper bits of the multiply result that the extend would effect. So we don't need a specific type of extend. This makes some reduction test cases shorter because we were previously trying to sign_extend a truncate which we can't eliminate. llvm-svn: 347011
* [X86] Update a couple comments to remove a mention of a sign extending that ↵Craig Topper2018-11-161-3/+3
| | | | | | no longer happens. NFC llvm-svn: 347010
* [VFS] Implement `RedirectingFileSystem::getRealPath`.Volodymyr Sapsai2018-11-162-4/+75
| | | | | | | | | | | | | | | | | | | | | | | | | It fixes the case when Objective-C framework is added as a subframework through a symlink. When parent framework infers a module map and fails to detect a symlink, it would add a subframework as a submodule. And when we parse module map for the subframework, we would encounter an error like > error: umbrella for module 'WithSubframework.Foo' already covers this directory By implementing `getRealPath` "an egregious but useful hack" in `ModuleMap::inferFrameworkModule` works as expected. rdar://problem/45821279 Reviewers: bruno, benlangmuir, erik.pilkington Reviewed By: bruno Subscribers: hiraditya, dexonsmith, JDevlieghere, cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D54245 llvm-svn: 347009
* [AMDGPU] Add FixupVectorISel pass, currently Supports SREGs in GLOBAL LD/STRon Lieberman2018-11-1623-131/+894
| | | | | | | | | Add a pass to fixup various vector ISel issues. Currently we handle converting GLOBAL_{LOAD|STORE}_* and GLOBAL_Atomic_* instructions into their _SADDR variants. This involves feeding the sreg into the saddr field of the new instruction. llvm-svn: 347008
* [CUDA] updated CompileCudaWithLLVM.rstArtem Belevich2018-11-161-20/+21
| | | | | | Differential Revision: https://reviews.llvm.org/D54608 llvm-svn: 347007
* [analyzer] ConversionChecker: handle floating pointKristof Umann2018-11-162-11/+75
| | | | | | | | | | | | | | | | | Extend the alpha.core.Conversion checker to handle implicit converions where a too large integer value is converted to a floating point type. Each floating point type has a range where it can exactly represent all integers; we emit a warning when the integer value is above this range. Although it is possible to exactly represent some integers which are outside of this range (those that are divisible by a large enough power of 2); we still report cast involving those, because their usage may lead to bugs. (For example, if 1<<24 is stored in a float variable x, then x==x+1 holds.) Patch by: Donát Nagy! Differential Revision: https://reviews.llvm.org/D52730 llvm-svn: 347006
* [WebAssembly] Change type of wake count to unsigned intHeejin Ahn2018-11-162-2/+2
| | | | | | | | | | | | | | | | Summary: We discussed this at the Nov 12th CG meeting, and decided to use the unsigned semantics for the wake count. Corresponding spec change: https://github.com/WebAssembly/threads/pull/110 Reviewers: sbc100 Subscribers: dschuff, jgravelle-google, sunfish, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D54572 llvm-svn: 347005
* Re-apply r346985: [ADT] Drop llvm::Optional clang-specific optimization for ↵Tom Stellard2018-11-162-26/+0
| | | | | | | | | trivially copyable types Remove a test case that was added with the optimization we are now removing. llvm-svn: 347004
* [WebAssembly] Split BBs after throw instructionsHeejin Ahn2018-11-165-26/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: `throw` instruction is a terminator in wasm, but BBs were not splitted after `throw` instructions, causing machine instruction verifier to fail. This patch - Splits BBs after `throw` instructions in WasmEHPrepare and adding an unreachable instruction after `throw`, which will be deleted in LateEHPrepare pass - Refactors WasmEHPrepare into two member functions - Changes the semantics of `eraseBBsAndChildren` in LateEHPrepare pass to match that of WasmEHPrepare pass, which is newly added. Now `eraseBBsAndChildren` does not delete BBs with remaining predecessors. - Fixes style nits, making static function names conform to clang-tidy - Re-enables the test temporarily disabled by rL346840 && rL346845 Reviewers: dschuff Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D54571 llvm-svn: 347003
* [AMDGPU] NFC Test commitRon Lieberman2018-11-161-1/+1
| | | | llvm-svn: 347002
* AMDHSA: More code object v3 fixes:Konstantin Zhuravlyov2018-11-157-20/+21
| | | | | | | | - Make sure IsaInfo::hasCodeObjectV3 returns true only for AMDHSA - Update assembler metadata tests to use v2 by default llvm-svn: 347001
* [clang-tidy] Fix reference to -[NSError init] in AvoidNSErrorInitCheck.hStephane Moore2018-11-151-1/+1
| | | | llvm-svn: 347000
* Fix compilation failure in unit tests on Windows.Zachary Turner2018-11-151-0/+5
| | | | llvm-svn: 346999
* Remove myself as owner of clang-query.Peter Collingbourne2018-11-151-4/+0
| | | | | | | | | I haven't been involved with the project for years, so it's probably best for someone else to be the code owner. Differential Revision: https://reviews.llvm.org/D54453 llvm-svn: 346998
* [CMake] Explicitly list Linux targets for Fuchsia toolchainPetr Hosek2018-11-151-31/+31
| | | | | | | | | Not all Linux targets use the ${arch}-linux-gnu spelling, so instead specify the list of Linux explicitly. Differential Revision: https://reviews.llvm.org/D54598 llvm-svn: 346997
* Fix parens warning in assert in ASTMatchFinderErich Keane2018-11-151-7/+7
| | | | | Change-Id: Ie34f9c6846b98fba87449e73299519fc2346bac1 llvm-svn: 346996
* [X86] Remove ANY_EXTEND special case from canReduceVMulWidthCraig Topper2018-11-151-18/+2
| | | | | | | | | | Removing this code doesn't affect any lit tests so it doesn't appear to be tested anymore. I assume it was when it was added, but I guess something else changed? Code coverage report also says its unused. I mostly didn't like that it seemed to count the sign bits as if it was a sign_extend, but then set isPositive as if it was a zero_extend. It feels like we should have picked one interpretation? Differential Revision: https://reviews.llvm.org/D54596 llvm-svn: 346995
* Implement basic DidAttach and DidLaunch for DynamicLoaderWindowsDYLDNathan Lanza2018-11-157-4/+147
| | | | | | | | | | | | | | | Summary: This commit implements basic DidAttach and DidLaunch for the windows DynamicLoader plugin which allow us to load shared libraries from the inferior. Reviewers: sas, zturner Reviewed By: zturner Differential Revision: https://reviews.llvm.org/D54544 llvm-svn: 346994
* Force SHELL to be cmd.exe on Windows for the test suiteNathan Lanza2018-11-151-0/+11
| | | | | | | | | | | | | | | | Summary: Windows make will search for other shells and choose those over cmd if available (e.g. C:\cygdrive\bin\sh.exe). This shell has numerous issues with path handling (/ vs \\ vs \ and C:). So default to using cmd.exe which is known to work. Reviewers: zturner, sas, xiaobai Reviewed By: zturner Differential Revision: https://reviews.llvm.org/D54510 llvm-svn: 346993
* [AMDGPU] Update code object metadata format documentationScott Linder2018-11-151-34/+519
| | | | | | | | | | | | | | | * Add amdhsa prefix to names to allow other tools to use the metadata without collision. * Make names consistent. * Simplify structure. * Change note record ID. * Switch from YAML to MsgPack format. * Document metadata assembler directive. Patch By: t-tye (Tony Tye) Differential Revision: https://reviews.llvm.org/D53445 llvm-svn: 346992
* A unit test file moved.Jason Molenda2018-11-151-4/+4
| | | | llvm-svn: 346991
* Revert "[ADT] Drop llvm::Optional clang-specific optmization for trivially ↵Tom Stellard2018-11-151-0/+18
| | | | | | | | | | copyable types" This reverts commit r346985. It looks like one of the unittests also needs to be updated, reverting while I investigate. llvm-svn: 346990
* Disable filesystem benchmark when libstdc++ doesn't support itEric Fiselier2018-11-151-3/+18
| | | | llvm-svn: 346989
* Add a check whether or not a str is utf8 prior to emplacingNathan Lanza2018-11-154-40/+65
| | | | | | | | | | | | | | | | | | | Summary: Highlighing junk data on VSCode can send a query for evaluate which fails. In particular cases on Windows, this the error message can end up as a c-string of [-35,-35,-35,-35,...]. Attempting to emplace this as the error message causes an assert failure. Prior to emplacing the error message, confirm that it is valid UTF8 to eliminate errors such as mentione above. Reviewers: xiaobai, clayborg Reviewed By: clayborg Differential Revision: https://reviews.llvm.org/D53008 llvm-svn: 346988
OpenPOWER on IntegriCloud