- Feb 18, 2020
-
-
Kerry McLaughlin authored
Summary: Implements the following intrinsics: - llvm.aarch64.sve.[s|u]mullb_lane - llvm.aarch64.sve.[s|u]mullt_lane - llvm.aarch64.sve.sqdmullb_lane - llvm.aarch64.sve.sqdmullt_lane - llvm.aarch64.sve.[s|u]addwb - llvm.aarch64.sve.[s|u]addwt - llvm.aarch64.sve.[s|u]shllb - llvm.aarch64.sve.[s|u]shllt - llvm.aarch64.sve.[s|u]subwb - llvm.aarch64.sve.[s|u]subwt Reviewers: sdesmalen, dancgr, efriedma, c-rhodes, rengolin Reviewed By: sdesmalen Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, cameron.mcinally, cfe-commits, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D73903
-
Raphael Isemann authored
Since f9568a95 this function takes a CompilerDeclContext reference instead of a pointer. It overlooked this function when I fixed the compilation for FindTypes.
-
serge-sans-paille authored
Differential Revision: https://reviews.llvm.org/D74704
-
Mikhail Maltsev authored
Summary: This is a follow-up patch addressing post-commit comments in https://reviews.llvm.org/D74044: * Add more Clang driver tests (-march=armv8.1m.main and -march=armv8.1m.main+mve.fp) * Clang-format a chunk in ARMAsmParser.cpp * Add a missing copyright header to ARMInstrCDE.td Reviewers: SjoerdMeijer, simon_tatham, dmgreen Reviewed By: SjoerdMeijer Subscribers: kristof.beyls, hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D74732
-
Raphael Isemann authored
Summary: Currently the data formatter is treating `std::atomic` variables as transparent wrappers around their underlying value type. This causes that when printing `std::atomic<A *>`, the data formatter will forward all requests for the children of the atomic variable to the `A *` pointer type which will then return the respective members of `A`. If `A` in turn has a member that contains the original atomic variable, this causes LLDB to infinitely recurse when printing an object with such a `std::atomic` pointer member. We could implement a workaround similar to whatever we do for pointer values but this patch just implements the `std::atomic` formatter in the same way as we already implement other formatters (e.g. smart pointers or `std::optional`) that just model the contents of the as a child "Value". This way LLDB knows when it actually prints a pointer and can just use its normal workaround if "Value" is a recursive pointer. Fixes rdar://59189235 Reviewers: JDevlieghere, jingham, shafik Reviewed By: shafik Subscribers: shafik, christof, jfb, abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D74310
-
Pavel Labath authored
Summary: In dwp files a constant (from the debug_cu_index section) needs to be added to each reference into the debug_str_offsets section. I've tried to implement this to roughly match the llvm flow: I've changed the DWARFormValue to stop resolving the indirect string references directly -- instead, it calls into DWARFUnit, which resolves this for it (similar to how it already resolves indirect range and location list references). I've also done a small refactor of the string offset base computation code in DWARFUnit in order to make it easier to access the debug_cu_index base offset. Reviewers: JDevlieghere, aprantl, clayborg Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D74723
-
Sven van Haastregt authored
Add the Arm dot product builtin functions from the OpenCL extension available at https://www.khronos.org/registry/OpenCL/extensions/arm/cl_arm_integer_dot_product.txt Patch by Pierre Gondois and Sven van Haastregt.
-
Raphael Isemann authored
Since f9568a95 this function takes a CompilerDeclContext reference instead of a pointer.
-
Pavel Labath authored
This function is equivalent to GetAddress, but getAddress is also present on the llvm version of the data extractor.
-
Simon Tatham authored
Summary: These are in some sense the inverse of vmovl[bt]q: they take a vector of n wide elements and truncate each to half its width. So they only write half a vector's worth of output data, and therefore they also take an 'inactive' parameter to provide the other half of the data in the output vector. So vmovnb overwrites the even lanes of 'inactive' with the narrowed values from the main input, and vmovnt overwrites the odd lanes. LLVM had existing codegen which generates these MVE instructions in response to IR that takes two vectors of wide elements, or two vectors of narrow ones. But in this case, we have one vector of each. So my clang codegen strategy is to narrow the input vector of wide elements by simply reinterpreting it as the output type, and then we have two narrow vectors and can represent the operation as a vector shuffle that interleaves lanes from both of them. Even so, not all the cases I needed ended up being selected as a single MVE instruction, so I've added a couple more patterns that spot combinations of the 'MVEvmovn' and 'ARMvrev32' SDNodes which can be generated as a VMOVN instruction with operands swapped. This commit adds the unpredicated forms only. Reviewers: dmgreen, miyuki, MarkMurrayARM, ostannard Reviewed By: dmgreen Subscribers: kristof.beyls, hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D74337
-
Simon Tatham authored
Summary: These intrinsics take a vector of 2n elements, and return a vector of n wider elements obtained by sign- or zero-extending every other element of the input vector. They're represented in IR as a shufflevector that extracts the odd or even elements of the input, followed by a sext or zext. Existing LLVM codegen already matches this pattern and generates the VMOVLB instruction (which widens the even-index input lanes). But no existing isel rule was generating VMOVLT, so I've added some. However, the new rules currently only work in little-endian MVE, because the pattern they expect from isel lowering includes a bitconvert which doesn't have the right semantics in big-endian. The output of one existing codegen test is improved by those new rules. This commit adds the unpredicated forms only. Reviewers: dmgreen, miyuki, MarkMurrayARM, ostannard Reviewed By: dmgreen Subscribers: kristof.beyls, hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D74336
-
Simon Tatham authored
Summary: When we start putting instances of `ARMVectorRegCast` in complex isel patterns, it will be awkward that they're often turned into the more standard `bitconvert` in little-endian mode. We'd rather not have to write separate isel patterns for the two endiannesses, matching different but equivalent cast operations. This change aims to fix that awkwardness in advance, by turning the Tablegen record `ARMVectorRegCast` from a simple `SDNode` instance into a `PatFrags` that can match either kind of cast – with a predicate that prevents it matching a bitconvert in the big-endian case, where bitconvert isn't semantically identical. No existing code generation should be affected by this change, but it will enable the patterns introduced by D74336 to work in both endiannesses. Reviewers: dmgreen Reviewed By: dmgreen Subscribers: kristof.beyls, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D74716
-
Simon Tatham authored
Summary: vclzq maps nicely to the existing target-independent @llvm.ctlz IR intrinsic. But vclsq ('count leading sign bits') has no corresponding target-independent intrinsic, so I've made up @llvm.arm.mve.vcls. This commit adds the unpredicated forms only. Reviewers: dmgreen, miyuki, MarkMurrayARM, ostannard Reviewed By: miyuki Subscribers: kristof.beyls, hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D74335 -
Simon Tatham authored
Summary: These intrinsics just reorder the lanes of a vector, so the natural IR representation is as a shufflevector operation. Existing LLVM codegen already recognizes those particular shufflevectors and generates the MVE VREV instruction. This commit adds the unpredicated forms only. Reviewers: dmgreen, miyuki, MarkMurrayARM, ostannard Reviewed By: dmgreen Subscribers: kristof.beyls, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D74334
-
Simon Tatham authored
Summary: This adds the unpredicated forms of six different MVE intrinsics which all round a vector of floating-point numbers to integer values, leaving them still in FP format, differing only in rounding mode and exception settings. Five of them map to existing target-independent intrinsics in LLVM IR, such as @llvm.trunc and @llvm.rint. The sixth, mapping to the `vrintn` instruction, is done by inventing a target-specific intrinsic. (`vrintn` behaves the same as `vrintx` in terms of the output value: the side effects on the FPSCR flags are the only difference between the two. But ACLE specifies separate user-callable intrinsics for the two, so the side effects matter enough to make sure we generate the right one of the two instructions in each case.) Reviewers: dmgreen, miyuki, MarkMurrayARM, ostannard Reviewed By: miyuki Subscribers: kristof.beyls, hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D74333
-
Simon Tatham authored
Summary: This adds the unpredicated versions of the family of vcvtq intrinsics that convert between a vector of floats and a vector of the same size of integer. These are represented in IR using the standard fptosi, fptoui, sitofp and uitofp operations, which existing LLVM codegen already handles. Reviewers: dmgreen, miyuki, MarkMurrayARM, ostannard Reviewed By: MarkMurrayARM Subscribers: kristof.beyls, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D74332
-
Simon Tatham authored
Summary: This commit adds the unpredicated intrinsics for the unary operations vabsq (absolute value), vnegq (arithmetic negation), vmvnq (bitwise complement), vqabsq and vqnegq (saturating versions of abs and neg for signed integers, in the sense that they give INT_MAX if an input lane is INT_MIN). This is done entirely in clang: all of these operations have existing isel patterns and existing tests for them on the LLVM side, so I've just made clang emit the same IR that those patterns already match. Reviewers: dmgreen, miyuki, MarkMurrayARM, ostannard Reviewed By: MarkMurrayARM Subscribers: kristof.beyls, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D74331
-
Raphael Isemann authored
This should be just the enum type but that's a larger refactoring, so document that this is not just an integer until we can make this just the type of the enum.
-
Pavel Labath authored
Having m_data_sp mutable sounds like a very bad idea. Fortunately, nothing relies on this possibility.
-
Raphael Isemann authored
-
Daniel Kiss authored
Summary: Generate PAC protected plt only when "-z pac-plt" is passed to the linker. GNU toolchain generates when it is explicitly requested[1]. When pac-plt is requested then set the GNU_PROPERTY_AARCH64_FEATURE_1_PAC note even when not all function compiled with PAC but issue a warning. Harmonizing the warning style for BTI/PAC/IBT. Generate BTI protected PLT if case of "-z force-bti". [1] https://www.sourceware.org/ml/binutils/2019-03/msg00021.html Reviewers: peter.smith, espindola, MaskRay, grimar Reviewed By: peter.smith, MaskRay Subscribers: tatyana-krasnukha, emaste, arichardson, kristof.beyls, MaskRay, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D74537
-
Raphael Isemann authored
-
Florian Hahn authored
The original code allowed creating the != checks in unpredictable order, causing http://lab.llvm.org:8011/builders/clang-cmake-x86_64-sde-avx512-linux/builds/34014 to fail.
-
Florian Hahn authored
This patch adds a simplification if an OR weakens the overflow condition for umul.with.overflow by treating any non-zero result as overflow. In that case, we overflow if both umul.with.overflow operands are != 0, as in that case the result can only be 0, iff the multiplication overflows. Code like this is generated by code using __builtin_mul_overflow with negative integer constants, e.g. bool test(unsigned long long v, unsigned long long *res) { return __builtin_mul_overflow(v, -4775807LL, res); } ``` ---------------------------------------- Name: D74141 %res = umul_overflow {i8, i1} %a, %b %mul = extractvalue {i8, i1} %res, 0 %overflow = extractvalue {i8, i1} %res, 1 %cmp = icmp ne %mul, 0 %ret = or i1 %overflow, %cmp ret i1 %ret => %t0 = icmp ne i8 %a, 0 %t1 = icmp ne i8 %b, 0 %ret = and i1 %t0, %t1 ret i1 %ret %res = umul_overflow {i8, i1} %a, %b %mul = extractvalue {i8, i1} %res, 0 %cmp = icmp ne %mul, 0 %overflow = extractvalue {i8, i1} %res, 1 Done: 1 Optimization is correct! ``` Reviewers: nikic, lebedev.ri, spatel, Bigcheese, dexonsmith, aemerson Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D74141 -
Raphael Isemann authored
-
Raphael Isemann authored
Summary: All of our lookup APIs either use `CompilerDeclContext &` or `CompilerDeclContext *` semi-randomly it seems. This leads to us constantly converting between those two types (and doing nullptr checks when going from pointer to reference). It also leads to the confusing situation where we have two possible ways to express that we don't have a CompilerDeclContex: either a nullptr or an invalid CompilerDeclContext (aka a default constructed CompilerDeclContext). This moves all APIs to use references and gets rid of all the nullptr checks and conversions. Reviewers: labath, mib, shafik Reviewed By: labath, shafik Subscribers: shafik, arphaman, abidh, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D74607
-
Gokturk Yuksek authored
The CheckAtomic module performs two tests to determine if passing '-latomic' to the linker is required: one for 64-bit atomics, and another for non-64-bit atomics. Include the missing check for 64-bit atomics. Reviewers: beanz, compnerd Reviewed By: beanz, compnerd Tags: #llvm Differential Revision: https://reviews.llvm.org/D69444
-
Florian Hahn authored
Precommit tests for D74141.
-
Jonas Devlieghere authored
This got messed up when updating the header guard. Remove the `pragma once` and use a header guard instead.
-
Raphael Isemann authored
Summary: When importing the main FileID the ASTImporter currently gives it no include location. This means that any SourceLocations produced for this FileID look to Clang as if they are coming from the main FileID (as the main FileID has no include location). Clang seems to expect that there is only one main FileID in one translation unit (which makes sense during normal compilation), so this behavior leads to several problems when producing diagnostics, one being that when calling `SourceManager::isBeforeInTranslationUnit` on two SourceLocations that come from two different ASTContext instances, Clang fails to sort the SourceLocations as the include chains of the FileIDs don't end up in a single FileID. This causes that Clang crashes with "Unsortable locations found" in this function. This patch gives any imported main FileIDs the main FileID of the To ASTContext as its include location. This allows Clang to sort all imported SourceLocations as now all include chains point to the main FileID of the To ASTContext. The exact include location is currently set to the start of the To main file (just because that should always be a valid SourceLocation). Reviewers: martong, a_sidorin, a.sidorin, shafik, balazske Reviewed By: martong, a_sidorin, shafik Subscribers: balazske, rnkovacs, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D74542
-
Alexey Lapshin authored
Summary: This patch is follow-up for D74481. It adds comments to WithColor::defaultErrorHandler() and WithColor::defaultWarningHandler(). Reviewers: jhenderson, dblaikie, JDevlieghere Reviewed By: JDevlieghere Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D74742
-
Jonas Devlieghere authored
LLDB has a few different styles of header guards and they're not very consistent because things get moved around or copy/pasted. This patch unifies the header guards across LLDB and converts everything to match LLVM's style. Differential revision: https://reviews.llvm.org/D74743
-
Jonas Devlieghere authored
Use = default instead of empty constructor and destructor bodies in the API layer.
-
Artem Dergachev authored
This reverts commit a807a068. Buildbot failures :)
-
Craig Topper authored
[X86] Move avx512 code that forces zeros to the false side of vselects above a check for legal types. This helps this transform occur earlier so we can fold the not with setcc. If we delay it until after type legalization we might have introduced instructions to widen the mask if the vselect was widened. This can prevent the not from making it to the setcc. We could of course add more DAG combines to handle that, but moving this earlier is easier.
-
Artem Dergachev authored
This is useful for performing custom build system integration that works by appending '--analyze --analyzer-output html' to all clang build commands. For such users there is now still a way to have the fancy index.html file in the output. Differential Revision: https://reviews.llvm.org/D74467
-
Artem Dergachev authored
In the path-sensitive vfork() checker that keeps a list of operations allowed after a successful vfork(), unforget to include execve() in the list. Patch by Jan Včelák! Differential Revision: https://reviews.llvm.org/D73629
-
Brian Gesiak authored
This reverts https://reviews.llvm.org/rG7125d66f9969605d886b5286780101a45b5bed67 and https://reviews.llvm.org/rG00fec8004aca6588d8d695a2c3827c3754c380a0 due to buildbot failures: http://lab.llvm.org:8011/builders/clang-cmake-x86_64-sde-avx512-linux/builds/34004 Previous revert 11053a1c missed newly added files, this commit removes those as well.
-
Jonas Devlieghere authored
Add missing initialize and terminate calls for DynamicLoaderHexagonDYLD and ObjectFileJIT.
-
Jonas Devlieghere authored
Only build the Python Operating System Plugin when LLDB_ENABLE_PYTHON is set to true.
-