- Feb 21, 2024
-
-
Mehdi Amini authored
-
Balaji V. Iyer authored
Added support to vectorized tensor.unpack. The unpack Op is split into a `vector.transfer_read`, `vector.transpose`, `vector.shape_cast` and a `vector.transfer_write`.
-
Peter Klausler authored
Four "issues" on GitHub report possible performance problems, likely detected by static analysis. None of them would ever make a measureable difference in compilation time, but I'm resolving them to clean up the open issues list. Fixes https://github.com/llvm/llvm-project/issues/79703, .../79705, .../79706, & .../79707.
-
Fangrui Song authored
https://reviews.llvm.org/D150510 places .lrodata before .rodata to minimize the number of permission transitions in the memory image. However, this layout is less ideal for -fno-pic code (which is still important). Small code model -fno-pic code has R_X86_64_32S relocations with a range of `[0,2**31)` (if we ignore the negative area). Placing `.lrodata` earlier exerts relocation pressure on such code. Non-x86 64-bit architectures generally have a similar `[0,2**31)` limitation if they don't use PC-relative relocations. If we place .lrodata later, we will need one extra PT_LOAD. Two layouts are appealing: * .bss/.lbss/.lrodata/.ldata (GNU ld) * .bss/.ldata/.lbss/.lrodata The GNU ld layout has the nice property that there is only one BSS (except .tbss/.relro_padding). Add -z lrodata-after-bss to support this layout. Since a read-only PT_LOAD segment (for large data sections) may appear after RW PT_LOAD segments. The placement of `_etext` has to be ...
-
Peter Klausler authored
An implied ENDFILE record, which truncates an external file, should be written to a sequential unit whenever the file is repositioned for a BACKSPACE or REWIND statement if a WRITE statement has executed since the last OPEN/BACKSPACE/REWIND. But the REC= and POS= positioning specifiers don't apply to sequential units (they're for direct and stream units, resp.), so don't truncate the file when they're used.
-
Sumanth Gundapaneni authored
The hook HexagonInstrInfo::isValidOffset() is updated to evaluate offsets of missed LD/ST vector instructions.
-
Peter Klausler authored
I implemented legacy "token pasting" via line continuation for call prefix& &MACRO& &suffix(1) in a recent patch; this patch addresses the related cases call prefix& &MACRO& &(1) and call & &MACRO& &suffix(1) Fixes the latest https://github.com/llvm/llvm-project/issues/79590. -
LLVM GN Syncbot authored
-
Andrzej Warzyński authored
Follow-up for #81422. My intention is to write an e2e test targetting SVE, but more work is needed. Sending this as an intermiedate step.
-
Nico Weber authored
-
Fangrui Song authored
errorOrWarn is more conventional for recoverable errors. This error message does not have to use `fatal`, and we try to remove such uses in parallel code paths.
-
Nick Desaulniers authored
Will be useful for implementing C23 stdbit.h's stdc_count_zeros and stdc_count_ones.
-
Slava Zakharin authored
Implemented few entry points for REAL(16) math in FortranF128Math static library. It is a thin wrapper around GNU libquadmath. Flang driver can always link it, and the dependencies will be brought in as needed. The final Fortran program/library that uses any of the entry points will depend on the underlying third-party library - this dependency has to be resolved somehow. I added FLANG_RUNTIME_F128_MATH_LIB CMake control so that the compiler driver and the runtime library can be built using the same third-party library: this way the linker knows which dependency to link in (under --as-needed). The compiler distribution should specify which third-party library is required for linking/running the apps that use REAL(16). The compiler package may provide a version of the third-party library or at least a stub library that can be used for linking, but the final program execution will still require the actual library.
-
Lucile Rose Nihlen authored
-
Caroline Tice authored
Fixes a type error in UniqueNoPred test, that is causing the ppc64le-lld-multistage-test buildbot to fail.
-
Peiming Liu authored
-
Alan Zhao authored
[LoopRotate][coroutines] Avoid hoisting addresses of thread-local variables outside loops in coroutines (#81937) Because loops in coroutines may have a co_await statement that reschedules the coroutine to another thread, we cannot cache addresses of thread-local variables obtained inside a loop by moving the computation of thoes addresses outside a loop. Since LLVM doesn't have a model for coroutine memory accesses, this patch fixes this bug by disabling this optimization for coroutines in the same way as https://reviews.llvm.org/D135550 and https://reviews.llvm.org/D151774.
-
Valery Pykhtin authored
-
Yuta Saito authored
In WebAssembly, we have `WASM_SYMBOL_NO_STRIP` symbol flag to mark the referenced content as retained. However, the flag is not enough to express retained data that is not referenced by any symbol. This patch adds a new segment flag`WASM_SEG_FLAG_RETAIN` to support "private" linkage data that is retained by llvm.used. This kind of data that is not referenced but must be retained is usually used with encapsulation symbols (__start/__stop). Swift runtime uses this technique and depends on the fact "all metadata sections in live objects are retained", which was not guaranteed with `--gc-sections` before this patch. This is a revised version of https://reviews.llvm.org/D126950 (has been reverted) based on @MaskRay's comments
-
Krystian Stasiowski authored
According to [expr.prim.id.qual] p3: > The _nested-name-specifier_ `::` nominates the global namespace. A _nested-name-specifier_ with a _computed-type-specifier_ nominates the type denoted by the _computed-type-specifier_, which shall be a class or enumeration type. **If a _nested-name-specifier_ `N` is declarative and has a _simple-template-id_ with a template argument list `A` that involves a template parameter, let `T` be the template nominated by `N` without `A`. `T` shall be a class template.** Meaning, the out-of-line definition of `A::f` in the following example is ill-formed: ``` template<typename T> struct A { void f(); }; template<typename T> using B = A<T>; template<typename T> void B<T>::f() { } // error: a declarative nested name specifier cannot name an alias template ``` This patch diagnoses such cases as an extension (in group `alias-template-in-declaration-name`). -
Lang Hames authored
The SectCreateMaterializationUnit creates a LinkGraph with a single named section containing a single named block whose content is given by a MemoryBuffer. It is intended to support emulation of ld64's -sectcreate option.
-
Joseph Huber authored
Summary: This cleans up the handling of hermetic test flags. Primarily done to simplify the GPU rework patch.
-
Jorge Gorbe Moya authored
-
Caroline Concatto authored
This reverts commit 3f0404aa. std::reverse is breaking some builds
-
Caroline Concatto authored
Patch 3f0404aa is breaking some debugs build so we cannot use the reverse here. This reverts commit 493f1010.
-
Krystian Stasiowski authored
[Clang][Sema] Convert warning for extraneous template parameter lists to an extension warning (#82277) We currently accept the following explicit specialization with a warning for the extraneous template parameter list: ``` template<typename T> void f(); template<> template<> void f<int>(); // warning: extraneous template parameter list in template specialization ``` This should really be an extension warning so we reject with `-pedantic-errors`. This patch converts the warning to an extension warning.
-
Simon Pilgrim authored
[InstCombine] foldFCmpIntToFPConst - simplify repeated calls to getBitWidth/getScalarSizeInBits. NFC. Noticed on #82241 - we don't need to use the IntegerType just for the scalar width, and we were calling it 3 times in different forms - we can just call Type::getScalarSizeInBits once and reuse.
-
James Robinson authored
This updates the signal handle thread coordinating to use a user signal bit on the SignalHandlerEvent to coordinate shutdown instead of closing the event handle. Closing the event handle is racy as the handle may be closed before the signal handler thread resolves the handle value in _zx_object_wait_many() and we would like to make this an explicit error. Using the user signal bit 1 instead and then closing the event object after the signal handler thread is joined cannot race as the wait will terminate whether the signal is raised before or after the wait begins.
-
Shoaib Meenai authored
When MergeFunctions creates new thunk functions, it needs to copy over the debug info format kind from the original function, otherwise we'll mix debug info formats and run into assertions. This was exposed by a downstream change that runs MergeFunctions before inlining, which caused assertions when inlining attempted to inline thunks created by merging, and the added test covers both scenarios where merging creates thunks.
-
Cyndy Ishida authored
This patch adds support for expected InstallAPI inputs. InstallAPI accepts a well defined filelist of headers and how those headers represent a single library. InstallAPI captures header files to determine linkable symbols to then compare against what was compiled in a binary dylib and generate TBD files.
-
John Harrison authored
[lldb-dap] Do not write over the existing error if launchCommands fail during debugger launch. (#82051) This fixes an issue where the error is lost if a command while executing `launchCommands` when launching the debugger. This should fix #82048
-
Orlando Cazalet-Hyams authored
bot failure: https://lab.llvm.org/buildbot/#/builders/19/builds/24831
-
Fangrui Song authored
(#79887) When the offset of a PT_INTERP segment equals the offset of a PT_LOAD segment, we consider that the parent of the PT_LOAD segment is the PT_INTERP segment. In `layoutSegments`, we place both segments to be after the current `Offset`, ignoring the PT_LOAD alignment. This scenario is possible with fixed section addresses, but doesn't happen with default linker layouts (.interp precedes other sections and is part of a PT_LOAD segment containing the ELF header and program headers). ``` % cat a.s .globl _start; _start: ret .rodata; .byte 0 .tdata; .balign 4096; .byte 0 % clang -fuse-ld=lld a.s -o a -nostdlib -no-pie -z separate-loadable-segments -Wl,-Ttext=0x201000,--section-start=.interp=0x202000,--section-start=.rodata=0x202020,-z,nognustack % llvm-objcopy a a2 % llvm-readelf -l a2 # incorrect offset(PT_LOAD) Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align PHDR 0x000040 0x0000000000200040 0x0000000000200040 0x0001c0 0x0001c0 R 0x8 INTERP 0x001001 0x0000000000202000 0x0000000000202000 0x00001c 0x00001c R 0x1 [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2] LOAD 0x000000 0x0000000000200000 0x0000000000200000 0x000200 0x000200 R 0x1000 LOAD 0x001000 0x0000000000201000 0x0000000000201000 0x000001 0x000001 R E 0x1000 //// incorrect offset LOAD 0x001001 0x0000000000202000 0x0000000000202000 0x000021 0x000021 R 0x1000 LOAD 0x002000 0x0000000000203000 0x0000000000203000 0x000001 0x001000 RW 0x1000 TLS 0x002000 0x0000000000203000 0x0000000000203000 0x000001 0x000001 R 0x1000 GNU_RELRO 0x002000 0x0000000000203000 0x0000000000203000 0x000001 0x001000 R 0x1000 ``` The same issue occurs for PT_TLS/PT_GNU_RELRO if we PT_TLS's alignment is smaller and we place the PT_LOAD after PT_TLS/PT_GNU_RELRO segments (not linker default, but possible with a `PHDRS` linker script command). Fix #79887: when two segments have the same offset, order the one with a larger alignment first. In the previous case, the PT_LOAD segment will go before the PT_INTERP segment. In case of equal alignments, it doesn't matter which segment is treated as the parent segment. -
Simon Pilgrim authored
When PSHUFB is used as a LUT (for CTPOP, BITREVERSE etc.), its the source operand that is constant and the index operand the variable. As long as the indices don't set the MSB (which zeros the output element), then the common known bits from the source operand can be used directly, even though the shuffle mask isn't constant. Further helps to improve CTPOP reduction codegen
-
Xing Xue authored
[OpenMP][AIX]Add assembly file containing microtasking routines and unnamed common block definitions (#81770) This patch adds assembly file `z_AIX_asm.S` that contains the 32- and 64-bit XCOFF version of microtasking routines and unnamed common block definitions. This code has been run through the libomp LIT tests and a user package successfully.
-
Aaron Ballman authored
C23 added the wb and uwb suffixes to generate a bit-precise integer value. These values can be larger than what is representable in intmax_t or uintmax_t. We were asserting that an enumerator constant could not have a value larger than unsigned long long but that's now a possibility. This patch turns the assertion into a "value too large" diagnostic. Note, we do not yet implement WG14 N3029 and so the behavior of this patch will cause the enumerator to be cast to unsigned long long, but this behavior may change in the future. GCC selects __uint128_t as the underlying type for such an enumeration and we may want to match that behavior in the future. This patch has several FIXME comments related to this and the release notes call out the possibility of a change in behavior in the future. Fixes https://github.com/llvm/llvm-project/issues/69352
-
Florian Hahn authored
Unify VPlan verifiers in verifyVPlanIsValid. This adds verification for various properties on blocks to the verifier used for VPlans generated by the inner loop vectorizer. It also adds def-use checks for the verifier used in the VPlan native path. This drops the separate flag to enable HCFG verification. Instead, all VPlans are verified once they have been created, if assertions are enabled. This also removes VPWidenPHIRecipe from VPHeaderPHIRecipe; it is used to model any phi node in the native path.
-
Noah Goldstein authored
Current we only support `C` as the remainder, but we can also limit with a constant numerator. Proofs: https://alive2.llvm.org/ce/z/QB95gU Closes #82303
-
Noah Goldstein authored
-