- Feb 18, 2020
-
-
Miloš Stojanović authored
Followup to D74085. Replace the use of `report_fatal_error()` with returning the error to `llvm-exegesis.cpp` and handling it there. Differential Revision: https://reviews.llvm.org/D74325
-
Brian Gesiak authored
Summary: I noticed a small regression in a toy project of mine after applying D73835, in which instruction names weren't being set properly. In the example test case included with this patch, `llvm::IRBuilderBase::CreateAdd` returns an `llvm::Value *` that is then passed as an argument to `llvm::IRBuilderBase::Insert`. The overloaded function that is selected for that call then ignores the `Name` parameter that is given. This patch addresses that issue. Reviewers: nikic, Meinersbur, nhaehnle, fhahn, thakis, teemperor Reviewed By: nikic, fhahn Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D74754
-
James Clarke authored
Summary: Backends should fold the subtraction into the comparison, but not all seem to. Moreover, on targets where pointers are not integers, such as CHERI, an integer subtraction is not appropriate. Instead we should just compare the two pointers directly, as this should work everywhere and potentially generate more efficient code. Reviewers: bogner, lebedev.ri, efriedma, t.p.northover, uweigand, sunfish Reviewed By: lebedev.ri Subscribers: dschuff, sbc100, arichardson, jgravelle-google, hiraditya, aheejin, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D74454
-
Cristian Adam authored
MSVC_DIA_SDK_DIR variable will point to a path which contains spaces, and without quotes it will fail to configure the project.
-
Raphael Isemann authored
[lldb] Fix another instance where we pass a nullptr as TypeSourceInfo to NonTypeTemplateParmDecl::Create Summary: Follow up to an issue pointed out in the review of D73808. We shouldn't just pass in a nullptr TypeSourceInfo in case Clang decided to access it. Reviewers: shafik, vsk Reviewed By: shafik, vsk Subscribers: kristof.beyls, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D73946
-
Tatyana Krasnukha authored
[lldb][test] Remove expected failure decorator from test_copy_from_dummy_target (TestScriptedResolver) This test case doesn't check that breakpoint's locations are resolved, and it passes on Windows too.
-
Florian Hahn authored
-
Georgii Rymar authored
There was a short discussion about this: https://reviews.llvm.org/D73484#inline-676942 To summarize: It is a bit unclear to me why the `DT_SYMENT` tag exist. LLD has the code that does: "addInt(DT_SYMENT, sizeof(Elf_Sym));" and I guess other linkers has the same logic. It is unclear why it can be possible to have other values rather than values of a size of platform symbol. Seems it is not possible, and atm for me it looks that this tag should not be used. This patch starts reporting the warning when the value it contains differs from a symbol size for a 32/64 bit platform for safety. It keeps the rest of the logic we have unchanged. Before this patch we did not handle the tag at all. Differential review: https://reviews.llvm.org/D74479
-
serge-sans-paille authored
Fix for dd230142, in case ld.lld is not available.
-
Djordje Todorovic authored
This is needed for the debug entry values feature. Differential Revision: https://reviews.llvm.org/D74702
-
Tatyana Krasnukha authored
Rename search-filter's CopyForBreakpoint to CreateCopy, since they don't do anything with breakpoints.
-
Tatyana Krasnukha authored
Pass TargetSP to filters' CreateFromStructuredData, don't let them guess whether target object is managed by a shared_ptr. Make Breakpoint sure that m_target.shared_from_this() is safe by passing TargetSP to all its static Create*** member-functions. This should be enough, since Breakpoint's constructors are private/protected and never called directly (except by Target itself).
-
Tatyana Krasnukha authored
Some implementations (BreakpointResolverScripted) try calling the breakpoint's shared_from_this(), that makes LLDB crash.
-
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
-