- Nov 12, 2020
-
-
Alexandre Ganea authored
This is a follow-up for D70378 (Cover usage of LLD as a library). While debugging an intermittent failure on a bot, I recalled this scenario which causes the issue: 1.When executing lld/test/ELF/invalid/symtab-sh-info.s L45, we reach lld::elf::Obj-File::ObjFile() which goes straight into its base ELFFileBase(), then ELFFileBase::init(). 2.At that point fatal() is thrown in lld/ELF/InputFiles.cpp L381, leaving a half-initialized ObjFile instance. 3.We then end up in lld::exitLld() and since we are running with LLD_IN_TEST, we hapily restore the control flow to CrashRecoveryContext::RunSafely() then back in lld::safeLldMain(). 4.Before this patch, we called errorHandler().reset() just after, and this attempted to reset the associated SpecificAlloc<ObjFile<ELF64LE>>. That tried to free the half-initialized ObjFile instance, and more precisely its ObjFile::dwarf member. Sometimes that worked, sometimes it failed and was catched by the CrashRecoveryContext. This scenario was the reason we called errorHandler().reset() through a CrashRecoveryContext. But in some rare cases, the above repro somehow corrupted the heap, creating a stack overflow. When the CrashRecoveryContext's filter (that is, __except (ExceptionFilter(GetExceptionInformation()))) tried to handle the exception, it crashed again since the stack was exhausted -- and that took the whole application down. That is the issue seen on the bot. Locally it happens about 1 times out of 15. Now this situation can happen anywhere in LLD. Since catching stack overflows is not a reliable scenario ATM when using CrashRecoveryContext, we're now preventing further re-entrance when such failures occur, by signaling lld::SafeReturn::canRunAgain=false. When running with LLD_IN_TEST=2 (or above), only one iteration will be executed, instead of two. Differential Revision: https://reviews.llvm.org/D88348
-
Michał Górny authored
Add a test verifying that after the 'watchpoint' command, new values of x86 debug registers can be read back correctly. The primary purpose of this test is to catch broken DRn reading and help debugging it. Differential Revision: https://reviews.llvm.org/D91264
-
Michał Górny authored
Fix Debug Register offsets to be specified relatively to UserArea on FreeBSD/amd64 and FreeBSD/i386, and add them to UserArea on i386. This fixes overlapping GPRs and DRs in gdb-remote protocol, making it impossible to correctly get and set debug registers from the LLDB client. Differential Revision: https://reviews.llvm.org/D91254
-
Raphael Isemann authored
This reverts commit 856fd98a. The type formatters use inline namespaces to find the formatter that fits the type ABI, so they can't just ignore the inline namespaces. The failing tests should be fixed by da121fff .
-
Raphael Isemann authored
Commit 5f12f4ff made suppressing inline namespaces when printing typenames default to true. As we're using the inline namespaces in LLDB to construct internal type names (which need internal namespaces in them to, for example, differentiate libc++'s std::__1::string from the std::string from libstdc++), this broke most of the type formatting logic.
-
Hans Wennborg authored
For dllexported default constructors with default arguments, we export default constructor closures which pass in the default args. (See D8331 for a good explanation.) For templates, that means those default args must be instantiated even if the function isn't called. That is done by the InstantiateDefaultCtorDefaultArgs() function, but it wasn't done for explicit specializations, causing asserts (see bug). Differential revision: https://reviews.llvm.org/D91089
-
Jean-Michel Gorius authored
The tokens are already handled by the lexer. This revision exposes them through the parser interface. This revision also adds missing functions for question mark parsing and completes the list of valid punctuation tokens in the documentation. Differential Revision: https://reviews.llvm.org/D90907
-
Hans Wennborg authored
[dllexport] Avoid assert for explicitly defaulted methods in explicit instantiation definitions (PR47683) Clang was asserting due to attempting to codegen such methods twice. Differential revision: https://reviews.llvm.org/D90849
-
Alex Zinenko authored
Add an ODS-backed generator of default builders. This currently does not support operation with attribute arguments, for which the builder is just ignored. Attribute support will be introduced separately for builders and accessors. Default builders are always generated with the same number of result and operand groups as the ODS specification, i.e. one group per each operand or result. Optional elements accept None but cannot be omitted. Variadic groups accept iterable objects and cannot be replaced with a single object. For some operations, it is possible to infer the result type given the traits, but most traits rely on inline pieces of C++ that we cannot (yet) forward to Python bindings. Since the Ops where the inference is possible (having the `SameOperandAndResultTypes` trait or `TypeMatchesWith` without transform field) are a small minority, they also require the result type to make the builder syntax more consistent. Reviewed By: stellaraccident Differential Revision: https://reviews.llvm.org/D91190
-
Kazushi (Jam) Marukawa authored
Change the default type of v64 register class from v512i32 to v256f64. Add a regression test also. Reviewed By: simoll Differential Revision: https://reviews.llvm.org/D91301
-
Julian Gross authored
Added documentation about the bufferization features. Furthermore, the usage of pre- and post-processing is described. This also includes information about optimization functionalities. Differential Revision: https://reviews.llvm.org/D90675
-
Kadir Cetinkaya authored
-
David Sherwood authored
When passing SVE types as arguments to function calls we can run out of hardware SVE registers. This is normally fine, since we switch to an indirect mode where we pass a pointer to a SVE stack object in a GPR. However, if we switch over part-way through processing a SVE tuple then part of it will be in registers and the other part will be on the stack. I've fixed this by ensuring that: 1. When we don't have enough registers to allocate the whole block we mark any remaining SVE registers temporarily as allocated. 2. We temporarily remove the InConsecutiveRegs flags from the last tuple part argument and reinvoke the autogenerated calling convention handler. Doing this prevents the code from entering an infinite recursion and, in combination with 1), ensures we switch over to the Indirect mode. 3. After allocating a GPR register for the pointer to the tuple we then deallocate any SVE registers we marked as allocated in 1). We also set the InConsecutiveRegs flags back how they were before. 4. I've changed the AArch64ISelLowering LowerCALL and LowerFormalArguments functions to detect the start of a tuple, which involves allocating a single stack object and doing the correct numbers of legal loads and stores. Differential Revision: https://reviews.llvm.org/D90219
-
David Green authored
-
Marek Kurdej authored
This was implemented in 410b650e: "Implement P0340R3: Make 'underlying_type' SFINAE-friendly. Reviewed as https://reviews.llvm.org/D63574 llvm-svn: 364094"
-
MaheshRavishankar authored
This change does two main things 1) An operation might have multiple dependences to the same producer. Not tracking them correctly can result in incorrect code generation with fusion. To rectify this the dependence tracking needs to also have the operand number in the consumer. 2) Improve the logic used to find the fused loops making it easier to follow. The only constraint for fusion is that linalg ops (on buffers) have update semantics for the result. Fusion should be such that only one iteration of the fused loop (which is also a tiled loop) must touch only one (disjoint) tile of the output. This could be relaxed by allowing for recomputation that is the default when oeprands are tensors, or can be made legal with promotion of the fused view (in future). Differential Revision: https://reviews.llvm.org/D90579
-
Amara Emerson authored
-
Max Kazantsev authored
A piece of logic of `isLoopInvariantExitCondDuringFirstIterations` is actually a generalized predicate monotonicity check. This patch moves it into the corresponding method and generalizes it a bit. Differential Revision: https://reviews.llvm.org/D90395 Reviewed By: apilipenko
-
Chuanqi Xu authored
Test plan: check-llvm, check-clang Reviewers: lxfind, junparser Differential Revision: https://reviews.llvm.org/D91243
-
Aart Bik authored
Exposing the C versions of the methods of the sparse runtime support lib through header files will enable using the same methods in an MLIR program as well as a C++ program, which will simplify future benchmarking comparisons (e.g. comparing MLIR generated code with eigen for Matrix Market sparse matrices). Reviewed By: penpornk Differential Revision: https://reviews.llvm.org/D91316
-
Max Kazantsev authored
Sometimes the an instruction we are trying to widen is used by the IV (which means the instruction is the IV increment). Currently this may prevent its widening. We should ignore such user because it will be dead once the transform is done anyways. Differential Revision: https://reviews.llvm.org/D90920 Reviewed By: fhahn
-
Xun Li authored
In the existing logic, for a given alloca, as long as its pointer value is stored into another location, it's considered as escaped. This is a bit too conservative. Specifically, in non-optimized build mode, it's often to have patterns of code that first store an alloca somewhere and then load it right away. These used should be handled without conservatively marking them escaped. This patch tracks how the memory location where an alloca pointer is stored into is being used. As long as we only try to load from that location and nothing else, we can still consider the original alloca not escaping and keep it on the stack instead of putting it on the frame. Differential Revision: https://reviews.llvm.org/D91305
-
Max Kazantsev authored
InstCombine canonicalizes 'sub nuw' instructions to 'add' without the `nuw` flag. The typical case where we see it is decrementing induction variables. For them, IndVars fails to prove that it's legal to widen them, and inserts unprofitable `zext`'s. This patch adds recognition of such pattern using SCEV. Differential Revision: https://reviews.llvm.org/D89550 Reviewed By: fhahn, skatkov
-
Max Kazantsev authored
-
Richard Smith authored
right union member. Should fix the armv8 buildbot.
-
Qiu Chaofan authored
We have option -mabi=ieeelongdouble to set current long double to IEEEquad semantics. Like what GCC does, we need to define __LONG_DOUBLE_IEEE128__ macro in this case, and __LONG_DOUBLE_IBM128__ if using PPCDoubleDouble. Reviewed By: steven.zhang Differential Revision: https://reviews.llvm.org/D90208
-
Lang Hames authored
-
Richard Smith authored
improvements to Clang's type printing.
-
Aart Bik authored
This CL integrates the new sparse annotations (hereto merely added as fully transparent attributes) more tightly to the generic linalg op in order to add verification of the annotations' consistency as well as to make make other passes more aware of their presence (in the long run, rewriting rules must preserve the integrity of the annotations). Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D91224
-
Joseph Huber authored
Summary: This patch begins to add support for a set of scripts that can be used to get information from OpenMP programs to better describe problems and eventually show the data to the user in formatted output. Right now the only support is forformatting the register and memory usage reports from ptxas and nvlink. This is simply done as a wrapper around clang and clang++. Reviewers: jdoerfert DIfferential Revision: https://reviews.llvm.org/D91085
-
Joachim Protze authored
With 6213ed06 the master callback was renamed to masked. The multiplex tests must check for masked now.
-
peter klausler authored
The implementation of Messages with forward_list<> makes some nonstandard assumptions about the validity of iterators that don't hold up with MSVC's implementation. Use list<> instead. The measured performance is comparable. This change obviated a distinction between two member functions of Messages, and the uses of one have been replaced with calls to the other. Similar usage in CharBuffer was also replaced for consistency. Differential revision: https://reviews.llvm.org/D91210
-
Sam McCall authored
Non-mechanical changes: - Added FIXME to StringLiteral to cover multi-token string literals. - LiteralExpression::getLiteralToken() is gone. (It was never called) This is because we don't codegen methods in Alternatives It's conceptually suspect if we consider multi-token string literals, though. Differential Revision: https://reviews.llvm.org/D91277
-
Dave Lee authored
Following discussion in D91193, a change made in D88792 was not quite right. This restores the message argument, and switches from `expect` to `runCmd`. Differential Revision: https://reviews.llvm.org/D91206
-
Lang Hames authored
Bold and fixed-width do not appear to mix well.
-
Lang Hames authored
Fixes some formatting and wording, and adds a roadmap section.
-
Arnold Schwaighofer authored
We need to be able to call function pointers. Inline the dispatch function. Also inline the context projection function. Transfer debug locations from the suspend point to the inlined functions. Use the function argument index instead of the function argument in coro.id.async. This solves any spurious use issues. Coerce the arguments of the tail call function at a suspend point. The LLVM optimizer seems to drop casts leading to a vararg intrinsic. rdar://70097093 Differential Revision: https://reviews.llvm.org/D91098
-
Arthur Eubanks authored
Some targets may add required passes via TargetMachine::registerPassBuilderCallbacks(). We need to run those even under -O0. As an example, BPFTargetMachine adds BPFAbstractMemberAccessPass, a required pass. This also allows us to clean up BackendUtil.cpp (and out-of-tree Rust usage of the NPM) by allowing us to share added passes like coroutines and sanitizers between -O0 and other optimization levels. Since callbacks may end up not adding passes, we need to check if the pass managers are empty before adding them, so PassManager now has an isEmpty() function. For example, polly adds callbacks but doesn't always add passes in those callbacks, so this is necessary to keep -debug-pass-manager tests' output from changing depending on if polly is enabled or not. Tests are a continuation of those added in https://reviews.llvm.org/D89083. Reviewed By: asbirlea, Meinersbur Differential Revision: https://reviews.llvm.org/D89158
-
Richard Smith authored
except where they are necessary to disambiguate the target. This substantially improves diagnostics from the standard library, which are otherwise full of `::__1::` noise.
-