- Apr 14, 2022
-
-
Amir Ayupov authored
Align with an upstream change D120305 to make PIE the default on linux-gnu. Add `-no-pie` to tests that require it. Reviewed By: maksfb, yota9 Differential Revision: https://reviews.llvm.org/D123329
-
Corentin Jabot authored
-
Florian Hahn authored
This reverts commit 4bf3b7dc. This might be causing another buildbot failure.
-
Maksim Panchenko authored
BOLT expects PC-relative relocations in data sections to reference code and the relocated data to form a jump table. However, there are cases where PC-relative addressing is used for data-to-data references (e.g. clang-15 can generate such code). BOLT should recognize and ignore such relocations. Otherwise, they will be considered relocations not claimed by any jump table and cause a failure in the strict mode. Reviewed By: yota9, Amir Differential Revision: https://reviews.llvm.org/D123650
-
Amir Ayupov authored
Address ThreadSanitizer warning Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D121338
-
Erich Keane authored
-
Corentin Jabot authored
Implement P2036R3. Captured variables by copy (explicitely or not), are deduced correctly at the point we know whether the lambda is mutable, and ill-formed before that. Up until now, the entire lambda declaration up to the start of the body would be parsed in the parent scope, such that capture would not be available to look up. The scoping is changed to have an outer lambda scope, followed by the lambda prototype and body. The lambda scope is necessary because there may be a template scope between the start of the lambda (to which we want to attach the captured variable) and the prototype scope. We also need to introduce a declaration context to attach the captured variable to (and several parts of clang assume captures are handled from the call operator context), before we know the type of the call operator. The order of operations is as follow: * Parse the init capture in the lambda's parent scope * Introduce a lambda scope * Create the lambda class and call operator * Add the init captures to the call operator context and the lambda scope. But the variables are not capured yet (because we don't know their type). Instead, explicit captures are stored in a temporary map that conserves the order of capture (for the purpose of having a stable order in the ast dumps). * A flag is set on LambdaScopeInfo to indicate that we have not yet injected the captures. * The parameters are parsed (in the parent context, as lambda mangling recurses in the parent context, we couldn't mangle a lambda that is attached to the context of a lambda whose type is not yet known). * The lambda qualifiers are parsed, at this point We can switch (for the second time) inside the lambda context, unset the flag indicating that we have not parsed the lambda qualifiers, record the lambda is mutable and capture the explicit variables. * We can parse the rest of the lambda type, transform the lambda and call operator's types and also transform the call operator to a template function decl where necessary. At this point, both captures and parameters can be injected in the body's scope. When trying to capture an implicit variable, if we are before the qualifiers of a lambda, we need to remember that the variables are still in the parent's context (rather than in the call operator's). Reviewed By: aaron.ballman, #clang-language-wg, ChuanqiXu Differential Revision: https://reviews.llvm.org/D119136
-
Mogball authored
StrEnumAttr has been deprecated in favour of EnumAttr, a solution based on AttrDef (https://reviews.llvm.org/D115181). This patch removes StrEnumAttr, along with all the custom ODS logic required to handle it. See https://discourse.llvm.org/t/psa-stop-using-strenumattr-do-use-enumattr/5710 on how to transition to EnumAttr. In short, ``` // Before def MyEnumAttr : StrEnumAttr<"MyEnum", "", [ StrEnumAttrCase<"A">, StrEnumAttrCase<"B"> ]>; // After (pick an integer enum of your choice) def MyEnum : I32EnumAttr<"MyEnum", "", [ I32EnumAttrCase<"A", 0>, I32EnumAttrCase<"B", 1> ]> { // Don't generate a C++ class! We want to use the AttrDef let genSpecializedAttr = 0; } // Define the AttrDef def MyEnum : EnumAttr<MyDialect, MyEnum, "my_enum">; ``` Reviewed By: rriddle, jpienaar Differential Revision: https://reviews.llvm.org/D120834
-
Aleksandr Platonov authored
Currently, clang crashes with i386 target on the following code: ``` void f() { f + 0xdead000000000000UL; } ``` This problem is similar to the problem fixed in D104424, but that fix can't handle function pointer case, because `getTypeSizeInCharsIfKnown()` says that size is known and equal to 0 for function type. This patch prevents bounds checking for function pointer, thus fixes the crash. Fixes https://github.com/llvm/llvm-project/issues/50463 Reviewed By: erichkeane Differential Revision: https://reviews.llvm.org/D122748 -
Erich Keane authored
Currently we emit an error in just about every case of conditionals with a 'non simple' branch if treated as an LValue. This patch adds support for the special case where this is an 'ignored' lvalue, which permits the side effects from happening. It also splits up the emit for conditional LValue in a way that should be usable to handle simple assignment expressions in similar situations. Differential Revision: https://reviews.llvm.org/D123680
-
Jacques Pienaar authored
-
Xing Xue authored
NFC - revert identation changes in AddressSpace.hpp from the previous commit Differential Revision: https://reviews.llvm.org/D100132
-
serge-sans-paille authored
This reverts commit e810d558. The commit was not taken into account the fact that strduped string could be modified. Checking if such modification happens would make the function very costly, without a test case in mind it's not worth the effort.
-
David Green authored
[AArch64] Add new shuffles tests, and regenerate aarch64-wide-shuffle.ll and neon-wide-splat.ll. NFC
-
Jacques Pienaar authored
Not sure why this is overlapping, need to repro locally, but just rename to something more explicit instead.
-
chenglin.bi authored
Baseline tests for D122968 (issue #54649).
-
Evgeny Mandrikov authored
This was already fixed in https://github.com/llvm/llvm-project/commit/2ccf0b76bcaf0895e04f14e3ff53c59dd96f9f0f but then regressed in https://github.com/llvm/llvm-project/commit/79a1f3e7c6d338b953b4dfe8cd7cb13ba60fe4e7 Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D123589
-
Jacques Pienaar authored
Enable specifying additional include directories to search. This is consistent with what one can do with clangd (although there it is more general compilation options) and Python LSP. We would in general expect these to be provided by compilation database equivalent. Differential Revision: https://reviews.llvm.org/D123474
-
Anna Thomas authored
Updated LowerGuardIntrinsic and LowerWidenableCondition to check for users of the respective intrinsic, instead of checking for guards and widenable conditions by traversing the entire function. This is an NFC. Should save some compile time.
-
Chris Bieneman authored
This just adds a trivial CMake cache file (which will grow over time) to handle the common build configuration for the HLSL compiler.
-
Momchil Velikov authored
The AArch64LoadStoreOptimnizer pass may merge a register increment/decrement with a following memory operation. In doing so, it may break CFI by moving a stack pointer adjustment past the CFI instruction that described *that* adjustment. This patch fixes this issue by moving said CFI instruction after the merged instruction, where the SP increment/decrement actually takes place. Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D114547
-
- Apr 13, 2022
-
-
Nathan Sidwell authored
The rust demangler has some odd buffer handling code, which will copy the demangled string into the provided buffer, if it will fit. Otherwise it uses the allocated buffer it made. But the length of the incoming buffer will have come from a previous call, which was the length of the demangled string -- not the buffer size. And of course, we're unconditionally allocating a temporary buffer in the first place. So we don't actually get buffer reuse, and we get a memcpy in somecases. However, nothing in LLVM ever passes in a non-null pointer. Neither does anything pass in a status pointer that is then made use of. The only exercise these have is in the test suite. So let's just make the rust demangler have the same API as the dlang demangler. Reviewed By: tmiasko Differential Revision: https://reviews.llvm.org/D123420
-
Jay Foad authored
This is just for consistency. The fields are never actually used so it is NFC.
-
Xing Xue authored
Summary: This is an add-on patch to address comments. - Replace #elif in file <assembly.h> with #else as suggested; - Reversed the indentation changes in the main patch. Differential Revision: https://reviews.llvm.org/D100132
-
Florian Hahn authored
This reverts the revert commit 1ddc7196. This version of the patch sets the initial available value to poison, which resolves an issue with the SSAUpdater breaking LCSSA form.
-
LLVM GN Syncbot authored
-
Xing Xue authored
Summary: This patch contains the implementation of the unwinder for IBM AIX. AIX does not support the eh_frame section. Instead, the traceback table located at the end of each function provides the information for stack unwinding and EH. In this patch macro _LIBUNWIND_SUPPORT_TBTAB_UNWIND is used to guard code for AIX traceback table based unwinding. Function getInfoFromTBTable() and stepWithTBTable() are added to get the EH information from the traceback table and to step up the stack respectively. There are two kinds of LSDA information for EH on AIX, the state table and the range table. The state table is used by the previous version of the IBM XL compiler, i.e., xlC and xlclang++. The DWARF based range table is used by AIX clang++. The traceback table has flags to differentiate these cases. For the range table, relative addresses are calculated using a base of DW_EH_PE_datarel, which is the TOC base of the module where the function of the current frame belongs. Two personality routines are employed to handle these two different LSDAs, __xlcxx_personality_v0() for the state table and __xlcxx_personality_v1() for the range table. Since the traceback table does not have the information of the personality for the state table approach, its personality __xlcxx_personality_v0() is dynamically resolved as the handler for the state table. For the range table, the locations of the LSDA and its associated personality routine are found in the traceback table. Assembly code for 32- and 64-bit PowerPC in UnwindRegistersRestore.S and UnwindRegistersSave.S are modified so that it can be consumed by the GNU flavor assembler and the AIX assembler. The restoration of vector registers does not check VRSAVE on AIX because VRSAVE is not used in the AIX ABI. Reviewed by: MaskRay, compnerd, cebowleratibm, sfertile, libunwind Differential Revision: https://reviews.llvm.org/D100132
-
Yaxun (Sam) Liu authored
For -fgpu-rdc, a host function may call an external kernel which is defined in an archive of bitcode. Since this external kernel is only referenced in host function, the device bitcode does not contain reference to this external kernel, then the linker will not try to resolve this external kernel in the archive. To fix this issue, host-used external kernels and device variables are tracked. A global array containing pointers to these external kernels and variables is emitted which serves as an artificial references to the external kernels and variables used by host. Reviewed by: Artem Belevich Differential Revision: https://reviews.llvm.org/D123441
-
Nikita Popov authored
C11 specifies memchr() as follows: > The memchr function locates the first occurrence of c (converted > to an unsigned char) in the initial n characters (each interpreted > as unsigned char) of the object pointed to by s. The implementation > shall behave as if it reads the characters sequentially and stops > as soon as a matching character is found. In particular, it is well-defined to specify a memchr size larger than the underlying object, as long as the character is found before the end of the object. Differential Revision: https://reviews.llvm.org/D123665
-
Marek Kurdej authored
Fixes https://github.com/llvm/llvm-project/issues/54536. Reviewed By: HazardyKnusperkeks, owenpan Differential Revision: https://reviews.llvm.org/D122468
-
Tobias Hieta authored
-
Tobias Hieta authored
Mostly for compatibility reasons with link.exe this flag makes sure we don't write a implib - not even when /implib is also passed, that's how link.exe works. Differential Revision: https://reviews.llvm.org/D123591
-
chenglin.bi authored
Baseline tests for D122485 (issue #39957)
-
chenglin.bi authored
This reverts commit e2d77a16.
-
PeixinQiao authored
This patch supports lowering parse-tree to MLIR of ordered threads directive following Section 2.19.9 of the OpenMP 5.1 standard. This is part of the upstreaming effort from the fir-dev branch in [1]. [1] https://github.com/flang-compiler/f18-llvm-project Reviewed By: shraiysh Differential Revision: https://reviews.llvm.org/D123590
-
PeixinQiao authored
This patch supports the following checks for ORDERED construct: ``` [5.1] 2.19.9 ORDERED Construct The worksharing-loop or worksharing-loop SIMD region to which an ordered region corresponding to an ordered construct without a depend clause binds must have an ordered clause without the parameter specified on the corresponding worksharing-loop or worksharing-loop SIMD directive. The worksharing-loop region to which an ordered region that corresponds to an ordered construct with any depend clauses binds must have an ordered clause with the parameter specified on the corresponding worksharing-loop directive. An ordered construct with the depend clause specified must be closely nested inside a worksharing-loop (or parallel worksharing-loop) construct. An ordered region that corresponds to an ordered construct with the simd clause specified must be closely nested inside a simd or worksharing-loop SIMD region. ``` Reviewed By: kiranchandramohan, shraiysh, NimishMishra Differential Revision: https://reviews.llvm.org/D113399
-
Marius Brehler authored
-
Louis Dionne authored
-
LLVM GN Syncbot authored
-
Louis Dionne authored
-