summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [IR] Include target specific intrinsic headersHeejin Ahn2019-12-122-2/+2
| | | | After D71320, target-specific intrinsic headers should be included.
* [libomptarget] Move resource id functions into target specific code, ↵Jon Chesterfield2019-12-124-13/+15
| | | | | | | | | | | | | | | | implement for amdgcn Summary: [libomptarget] Move resource id functions into target specific code, implement for amdgcn Reviewers: jdoerfert, ABataev, grokos Reviewed By: jdoerfert Subscribers: jvesely, mgorny, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D71382
* Update line number after previous patch added an additional unsupportedEric Christopher2019-12-121-4/+4
| | | | and comment lines.
* [AArch64][SVE] Add integer arithmetic with immediate instructions.Danilo Carvalho Grael2019-12-125-9/+550
| | | | | | | | | | | | | | | | | | | | Summary: Add pattern matching for the following instructions: - add, sub, subr, sqadd, sqsub, uqadd, uqsub This patch required complex patterns to match the immediate with optinal left shift. I re-used the Select function from the other SVE repo to implement the complext pattern. I plan on doing another patch to also match constant vector of the same immediate. Reviewers: sdesmalen, huntergr, rengolin, efriedma, c-rhodes, mgudim, kmclaughlin Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, llvm-commits, amehsan Tags: #llvm Differential Revision: https://reviews.llvm.org/D71370
* [clangd] Heuristically resolve dependent method callsNathan Ridge2019-12-122-2/+131
| | | | | | | | | | | | | | | | Summary: The heuristic is to look in the definition of the primary template, which is what you want in the vast majority of cases. Fixes https://github.com/clangd/clangd/issues/141 Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71240
* [libc++] Tolerate NaN returning random distributions for nowEric Fiselier2019-12-121-2/+8
|
* [Attributor][FIX] Do treat byval arguments specialJohannes Doerfert2019-12-123-13/+117
| | | | | | | | | | | | | | When we reason about the pointer argument that is byval we actually reason about a local copy of the value passed at the call site. This was not the case before and we wrongly introduced attributes based on the surrounding function. AAMemoryBehaviorArgument, AAMemoryBehaviorCallSiteArgument and AANoCaptureCallSiteArgument are made aware of byval now. The code to skip "subsuming positions" for reasoning follows a common pattern and we should refactor it. A TODO was added. Discovered by @efriedma as part of D69748.
* [NFC][InstSimplify] Refactoring ThreadCmpOverSelect functionDenis Bakhvalov2019-12-121-44/+79
| | | | | | | Removed code duplication in ThreadCmpOverSelect and broke it into several smaller functions for reusing them. Differential Revision: https://reviews.llvm.org/D71158
* Revert "[DAGCombiner] fold shift-trunc-shift to shift-mask-trunc"Sanjay Patel2019-12-123-14/+4
| | | | | This reverts commit 8963332c3327daa652ba3e26d35f9109b6991985. There was a logic bug typo in this code, but it wasn't visible in the asm for the tests.
* [clang] [test] Disable the test exhausting stack on NetBSDMichał Górny2019-12-121-0/+3
| | | | | | | Disable the instantiation-depth-default.cpp test on NetBSD since it requires more stack space than we have by default on NetBSD. Differential Revision: https://reviews.llvm.org/D71419
* [sanitizers] Redirect stdout and stderr to TASK_LOGEric Christopher2019-12-121-1/+1
| | | | | | | | | | | | At some point cpplint.py became very noisy during a build spewing a few hundred lines of "Done processing..." even with SILENT=1 in cmake. This attempts to redirect the stdout of "Done processing" to the task log along with any errors. Tested by this with and without SILENT=1 to check things. Differential Revision: https://reviews.llvm.org/D71402 Reviewed By: eugenis
* [OPENMP50]Fix possible conflict when emitting an alias for the functionsAlexey Bataev2019-12-122-1/+50
| | | | | | | in declare variant. If the types of the fnction are not equal, but match, at the codegen thei may have different types. This may lead to compiler crash.
* [DAGCombiner] fold shift-trunc-shift to shift-mask-truncSanjay Patel2019-12-123-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fold is done in IR by instcombine, and we have a special form of it already here in DAGCombiner, but we want the more general transform too: https://rise4fun.com/Alive/3jZm Name: general Pre: (C1 + zext(C2) < 64) %s = lshr i64 %x, C1 %t = trunc i64 %s to i16 %r = lshr i16 %t, C2 => %s2 = lshr i64 %x, C1 + zext(C2) %a = and i64 %s2, zext((1 << (16 - C2)) - 1) %r = trunc %a to i16 Name: special Pre: C1 == 48 %s = lshr i64 %x, C1 %t = trunc i64 %s to i16 %r = lshr i16 %t, C2 => %s2 = lshr i64 %x, C1 + zext(C2) %r = trunc %s2 to i16 ...because D58017 exposes a regression without this fold.
* [libc++] Add check to ensure oss-fuzz properly targets libc++.Eric Fiselier2019-12-121-0/+4
|
* [LTO] Support for embedding bitcode section during LTOTeresa Johnson2019-12-128-120/+270
| | | | | | | | | | | | | | | | | | | Summary: This adds support for embedding bitcode in a binary during LTO. The libLTO gains supports the `-lto-embed-bitcode` flag. The option allows users of the LTO library to embed a bitcode section. For example, LLD can pass the option via `ld.lld -mllvm=-lto-embed-bitcode`. This feature allows doing something comparable to `clang -c -fembed-bitcode`, but on the (LTO) linker level. Having bitcode alongside native code has many use-cases. To give an example, the MacOS linker can create a `-bitcode_bundle` section containing bitcode. Also, having this feature built into LLVM is an alternative to 3rd party tools such as [[ https://github.com/travitch/whole-program-llvm | wllvm ]] or [[ https://github.com/SRI-CSL/gllvm | gllvm ]]. As with these tools, this feature simplifies creating "whole-program" llvm bitcode files, but in contrast to wllvm/gllvm it does not rely on a specific llvm frontend/driver. Patch by Josef Eisl <josef.eisl@oracle.com> Reviewers: #llvm, #clang, rsmith, pcc, alexshap, tejohnson Reviewed By: tejohnson Subscribers: tejohnson, mehdi_amini, inglorion, hiraditya, aheejin, steven_wu, dexonsmith, dang, cfe-commits, llvm-commits, #llvm, #clang Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D68213
* [OPENMP50]Improve checks for declare variant functions compatibility.Alexey Bataev2019-12-125-19/+69
| | | | | Added check for functions compatibility in C and removed restriction for functions with no prototypes in declare variant constrcut.
* [Target] Remove Target::GetScratchClangASTContextAlex Langford2019-12-1226-89/+138
| | | | | | | Target doesn't really need to know about ClangASTContext more than any other TypeSystem. We can create a method ClangASTContext::GetScratch for anything who needs a ClangASTContext specifically instead of just a generic TypeSystem.
* [AMDGPU] AMDGPUUsage clarify address space information and other typo and ↵Tony2019-12-121-435/+476
| | | | | | | | | | | | | | | | | | formatting fixes Summary: - Clarify AMDGPU address spaces. - Correct path to AMDGPU backend since now in the mono-repo. - Fix numerous text style and typo issues. - Correct reStructure text formatting warnings. - Made reStructure directive usage more consistent. - Add references for gfx10 ISA specification. Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, jfb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71392
* TypeCategory: Initialize m_enabled to falseVedant Kumar2019-12-121-1/+1
| | | | | | | | | The initialization was accidentally lost in https://reviews.llvm.org/D71310, causing a ubsan failure: /Users/buildslave/jenkins/workspace/lldb-cmake-sanitized/llvm-project/lldb/include/lldb/DataFormatters/TypeCategory.h:278:35: runtime error: load of value 190, which is not a valid value for type 'bool' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Users/buildslave/jenkins/workspace/lldb-cmake-sanitized/llvm-project/lldb/include/lldb/DataFormatters/TypeCategory.h:278:35 in http://lab.llvm.org:8080/green/view/LLDB/job/lldb-cmake-sanitized/621/consoleText
* Suppress -Wwarn-unused-variables when we don't know the constructorErich Keane2019-12-122-0/+21
| | | | | | | | | | | | | | This warning is supposed to be suppressed when the constructor/destructor are non-trivial, since it might be a RAII type. However, if the type has a trivial destructor and the constructor hasn't been resolved (since it is called with dependent arguments), we were still warning. This patch suppresses the warning if the type could possibly have a be a non-trivial constructor call. Note that this does not take the arity of the constructors into consideration, so it might suppress the warning in cases where it isn't possible to call a non-trivial constructor.
* Rename LoopInfo::isRotated() to LoopInfo::isRotatedForm().Kit Barton2019-12-123-20/+24
| | | | | | This patch renames the LoopInfo::isRotated() method to LoopInfo::isRotatedForm() to make it clear that the method checks whether the loop is in rotated form, not whether the loop has been rotated by the LoopRotation pass.
* [compiler-rt] libFuzzer: update -merge_control_file= help message.Max Moroz2019-12-121-1/+2
| | | | | | | | | | | | | | | | Summary: The motivation for this change is to have a distinguisher in libFuzzer that would let the runner know whether multistep merge is supported or not by a particular fuzz target binary. Otherwise, multistep merge fails to execute with older version of libFuzzer, and there is no way to verify that easily. Reviewers: kcc Subscribers: dberris, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D71423
* [PS4] Predefine the __SCE__ macro for the x86_64-scei-ps4 tripleWarren Ristow2019-12-122-0/+2
|
* Default to -fuse-init-arrayFangrui Song2019-12-1222-69/+61
| | | | | | | | | | | | | | | | | | | Very few ELF platforms still use .ctors/.dtors now. Linux (glibc: 1999-07), DragonFlyBSD, FreeBSD (2012-03) and Solaris have supported .init_array for many years. Some architectures like AArch64/RISC-V default to .init_array . GNU ld and gold can even convert .ctors to .init_array . It makes more sense to flip the CC1 default, and only uses -fno-use-init-array on platforms that don't support .init_array . For example, OpenBSD did not support DT_INIT_ARRAY before Aug 2016 (https://github.com/openbsd/src/commit/86fa57a2792c6374b0849dd7b818a11e676e60ba) I may miss some ELF platforms that still use .ctors, but their maintainers can easily diagnose such problems. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D71393
* [SystemZ] Implement the packed stack layoutJonas Paulsson2019-12-1211-298/+513
| | | | | | | | | Any llvm function with the "packed-stack" attribute will be compiled to use the packed stack layout which reuses unused parts of the incoming register save area. This is needed for building the Linux kernel. Review: Ulrich Weigand https://reviews.llvm.org/D70821
* [FormatEntity] Add mangled function name supportMed Ismail Bennani2019-12-125-0/+57
| | | | | | | | | | | | | | | | | | Summary: Add `function.mangled-name` key for FormatEntity to show the mangled function names in backtraces. rdar://54088244 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com> Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71237 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
* [DAGCombiner] improve readabilitySanjay Patel2019-12-121-11/+11
| | | | | | | | | | | This is not quite NFC because I changed the SDLoc to use the more standard 'N' (the starting node for the fold). This transform is a special-case of a more general fold that we do in IR, but it seems like the general fold is needed here too to avoid a potential regression seen in D58017. https://rise4fun.com/Alive/3jZm
* [lldb/Core] Add missing include (2/2)Jonas Devlieghere2019-12-121-0/+2
| | | | This got flagged by the debian buildbot.
* [lldb/Core] Add missing includeJonas Devlieghere2019-12-121-1/+1
| | | | This got flagged by the modules build.
* [AArch64][PowerPC] add tests for shift sandwich; NFCSanjay Patel2019-12-122-3/+33
|
* [lldb/Host] Use cmakedefine01 for LLDB_ENABLE_TERMIOSJonas Devlieghere2019-12-124-17/+17
| | | | | | | This renames LLDB_CONFIG_TERMIOS_SUPPORTED to LLDB_ENABLE_TERMIOS. It now also uses cmakedefine01 to keep things consistent with out other optional dependencies. But more importantly it won't silently fail when you forget to include Config.h.
* [lldb/Host] Use cmakedefine01 for LLDB_ENABLE_LIBXML2Jonas Devlieghere2019-12-123-32/+32
| | | | | | This keeps things consistent with out other optional dependencies. But more importantly it won't silently fail when you forget to include Config.h.
* [ELF] Add a comment to handleSectionGroup(). NFCFangrui Song2019-12-121-0/+2
| | | | | | | | Apply suggestion in https://reviews.llvm.org/D71157#1780834 Reviewed By: grimar, ruiu Differential Revision: https://reviews.llvm.org/D71388
* [lldb/CMake] Rename LLDB_DISABLE_LIBEDIT to LLDB_ENABLE_LIBEDITJonas Devlieghere2019-12-1212-39/+39
| | | | | | This matches the naming scheme used by LLVM. Differential revision: https://reviews.llvm.org/D71380
* [BasicAA] Use GEP as context for computeKnownBits in aliasGEP.Florian Hahn2019-12-122-1/+118
| | | | | | | | | | | | | In order to use assumptions, computeKnownBits needs a context instruction. We can use the GEP, if it is an instruction. We already pass the assumption cache, but it cannot be used without a context instruction. Reviewers: anemet, asbirlea, hfinkel, spatel Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D71264
* [lldb/CMake] Rename LLDB_DISABLE_CURSES to LLDB_ENABLE_CURSESJonas Devlieghere2019-12-127-22/+18
| | | | | | This matches the naming scheme used by LLVM. Differential revision: https://reviews.llvm.org/D71377
* [fuzzer] Add basic support for emscripten.Jonathan Metzman2019-12-126-7/+29
| | | | | | | | | | | | | | | | | | | | | | | Summary: Add basic support for emscripten. This enables libFuzzer to build (using build.sh) for emscripten and fuzz a target compiled with -fsanitize-coverage=inline-8bit-counters. Basic fuzzing and bug finding work with this commit. RSS limit and timeouts will not work because they depend on system functions that are not implemented/widely supported in emscripten. Reviewers: kcc, vitalybuka, hctim Reviewed By: hctim Subscribers: #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D71285
* [ASTImporter] Support functions with placeholder return types ...Gabor Marton2019-12-125-15/+274
| | | | | | | | | | | | | | | Summary: Support functions with placeholder return types even in cases when the type is declared in the body of the function. Example: auto f() { struct X{}; return X(); } Reviewers: balazske, a_sidorin, a.sidorin, shafik Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, teemperor, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70819
* [amdgpu] Fix `-Wenum-compare` warning. NFC.Michael Liao2019-12-121-6/+6
|
* [clang] Turn -fno-builtin flag into an IR AttributeGuillaume Chatelet2019-12-123-41/+45
| | | | | | | | | | | | | | Summary: This is a follow up on https://reviews.llvm.org/D61634#1742154 to turn the clang driver -fno-builtin flag into an IR attribute. I also investigated pushing the attribute earlier on (in Sema) but it looks like this patch is simple and will cover all function calls. Reviewers: aaron.ballman, courbet Subscribers: cfe-commits, tejohnson Tags: #clang Differential Revision: https://reviews.llvm.org/D71193
* [clang-tidy] Use early returns to make the code easier to read and ↵Alexander Kornienko2019-12-121-6/+5
| | | | potentially run faster
* Fix naming style. NFC.Alexander Kornienko2019-12-123-23/+23
|
* gn build: Merge 526244b187dLLVM GN Syncbot2019-12-121-0/+1
|
* [Matrix] Add first set of matrix intrinsics and initial lowering pass.Florian Hahn2019-12-1224-0/+2638
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first patch adding an initial set of matrix intrinsics and a corresponding lowering pass. This has been discussed on llvm-dev: http://lists.llvm.org/pipermail/llvm-dev/2019-October/136240.html The first patch introduces four new intrinsics (transpose, multiply, columnwise load and store) and a LowerMatrixIntrinsics pass, that lowers those intrinsics to vector operations. Matrixes are embedded in a 'flat' vector (e.g. a 4 x 4 float matrix embedded in a <16 x float> vector) and the intrinsics take the dimension information as parameters. Those parameters need to be ConstantInt. For the memory layout, we initially assume column-major, but in the RFC we also described how to extend the intrinsics to support row-major as well. For the initial lowering, we split the input of the intrinsics into a set of column vectors, transform those column vectors and concatenate the result columns to a flat result vector. This allows us to lower the intrinsics without any shape propagation, as mentioned in the RFC. In follow-up patches, we plan to submit the following improvements: * Shape propagation to eliminate the embedding/splitting for each intrinsic. * Fused & tiled lowering of multiply and other operations. * Optimization remarks highlighting matrix expressions and costs. * Generate loops for operations on large matrixes. * More general block processing for operation on large vectors, exploiting shape information. We would like to add dedicated transpose, columnwise load and store intrinsics, even though they are not strictly necessary. For example, we could instead emit a large shufflevector instruction instead of the transpose. But we expect that to (1) become unwieldy for larger matrixes (even for 16x16 matrixes, the resulting shufflevector masks would be huge), (2) risk instcombine making small changes, causing us to fail to detect the transpose, preventing better lowerings For the load/store, we are additionally planning on exploiting the intrinsics for better alias analysis. Reviewers: anemet, Gerolf, reames, hfinkel, andrew.w.kaylor, efriedma, rengolin Reviewed By: anemet Differential Revision: https://reviews.llvm.org/D70456
* [ARM][MVE] findVCMPToFoldIntoVPS. NFC.Sjoerd Meijer2019-12-122-30/+29
| | | | | | | This adds ReachingDefAnalysis (RDA) to the VPTBlock pass, so that we can reimplement findVCMPToFoldIntoVPS with just a few calls to RDA. Differential Revision: https://reviews.llvm.org/D71330
* [Alignment][NFC] Adding Align compatible methods to IntrinsicInst/IRBuilderGuillaume Chatelet2019-12-124-63/+130
| | | | | | | | | | | | | | | Summary: This is patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790 Reviewers: courbet Subscribers: hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D71420
* gn build: Merge 600d123c6ffLLVM GN Syncbot2019-12-121-0/+1
|
* [ARM][CMSE] Add CMSE header and builtinsMomchil Velikov2019-12-128-0/+409
| | | | | | | | | | | | This is patch C2 as mentioned in RFC http://lists.llvm.org/pipermail/cfe-dev/2019-March/061834.html This adds CMSE builtin functions, and introduces arm_cmse.h header which has useful macros, functions, and data types for end-users of CMSE. Patch by Javed Absar. Diferential Revision: https://reviews.llvm.org/D70817
* AMDGPU/SILoadStoreOptimizer: Simplify functionTom Stellard2019-12-121-62/+50
| | | | | | | | | | | | Reviewers: arsenm, nhaehnle Reviewed By: arsenm Subscribers: merge_guards_bot, kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71044
* [OpenMP][Test] Add check for aux-triple predefined macrosAlexey Bader2019-12-121-0/+5
| | | | | | | | | | | | | | Summary: Make sure that auxiliary target specific macros are defined in OpenMP mode. Reviewers: ABataev, jdoerfert Subscribers: guansong, ebevhan, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71413
OpenPOWER on IntegriCloud