- May 13, 2021
-
-
Sam Clegg authored
This fixes a bug with string merging with string symbols that contain NULLs, as is the case in the `merge-string.s` test. The bug only showed when we run with `--relocatable` and then try read the resulting object back in. In this case we would end up with string symbols that extend past the end of the segment in which they live. The problem comes from the fact that sections which are flagged as string mergable assume that all strings are NULL terminated. The merging algorithm will drop trailing chars that follow a NULL since they are essentially unreachable. However, the "size" attribute (in the symbol table) of such a truncated symbol is not updated resulting a symbol size that can overlap the end of the segment. I verified that this can happen in ELF too given the right conditions and the its harmless enough. In practice Strings that contain embedded null should not be part of a mergable section. Differential Revision: https://reviews.llvm.org/D102281
-
Sam Clegg authored
Previously the linker was relying solely on the name of the segment to imply TLS. Differential Revision: https://reviews.llvm.org/D102202
-
Heejin Ahn authored
We explicitly made it error out in D101403, out of a good intention that the error message will make people less confusing. Turns out, we weren't failing all cases of wasm EH + SjLj; only a few cases were failing and our client was able to get around by fixing source code, but now we made it fail for all cases, even the cases that previously succeeded fail, which we didn't intend. This reverts that change. Reviewed By: tlively Differential Revision: https://reviews.llvm.org/D102364
-
Craig Topper authored
The VSEW encoding isn't a useful value to pass around. It's better to use SEW or log2(SEW) directly. The only real ugliness is that the vsetvli IR intrinsics use the VSEW encoding, but it's easy enough to decode that when the intrinsic is processed.
-
Richard Smith authored
Fix bad mangling of <data-member-prefix> for a closure in the initializer of a variable at global namespace scope. This implements the direction proposed in https://github.com/itanium-cxx-abi/cxx-abi/pull/126. Differential Revision: https://reviews.llvm.org/D101968
-
River Riddle authored
[mlir-lsp-server][NFC] Add newline between Protocol JSON serialization methods and class definitions.
-
River Riddle authored
This allows for diagnostics emitted during parsing/verification to be surfaced to the user by the language client, as opposed to just being emitted to the logs like they are now. Differential Revision: https://reviews.llvm.org/D102293
-
Shoaib Meenai authored
Flang's CMake modules directory was being added to the CMake module path twice, and AddFlang was being included after the first addition. Remove the unnecessary first addition and move the AddFlang include down to the second one. This way, it occurs after LLVM's CMake modules have been included for a standalone build, so it can make use of those modules.
-
Erich Keane authored
It doesn't really make sense to emit language specific diagnostics in a discarded statement, and suppressing these diagnostics results in a programming pattern that many users will feel is quite useful. Basically, this makes sure we only emit errors from the 'true' side of a 'constexpr if'. It does this by making the ExprEvaluatorBase type have an opt-in option as to whether it should visit discarded cases. Differential Revision: https://reviews.llvm.org/D102251
-
Suraj Sudhir authored
Removes the identityn operator from TOSA MLIR definition. Removes TosaToLinAlg mappings Reviewed By: rsuderman Differential Revision: https://reviews.llvm.org/D102329
-
Fangrui Song authored
-
Martin Storsjö authored
Since c579a5b1 we don't traverse .eh_frame when doing GC. But the exception handling personality function needs to be included, and is only referenced from within .eh_frame. Differential Revision: https://reviews.llvm.org/D102138
-
Martin Storsjö authored
Don't use stat and lstat on Windows; lstat is missing, stat only provides the modification times with second granularity (and does the wrong thing regarding symlinks). Instead do a minimal reimplementation using the native windows APIs. Differential Revision: https://reviews.llvm.org/D101731
-
Shoaib Meenai authored
Not sure how my local testing didn't trigger this path. Should fix https://lab.llvm.org/buildbot/#/builders/132/builds/5494
-
Mark de Wever authored
Both `<type_traits>` and `<charconv>` implemented this function with different names and a slightly different behavior. This removes the version in `<charconv>` and improves the version in `<typetraits>`. - The code can be used again in C++11. - The original claimed C++14 support, but `[[nodiscard]]` is not available in C++14. - Adds `_LIBCPP_INLINE_VISIBILITY`. Reviewed By: zoecarver, #libc, Quuxplusone Differential Revision: https://reviews.llvm.org/D102332
-
Nikita Popov authored
If a logical and/or is used, we need to be careful not to propagate a potential poison value from the RHS by inserting a freeze instruction. Otherwise it works the same way as bitwise and/or. This is intended to address the regression reported at https://reviews.llvm.org/D101191#2751002. Differential Revision: https://reviews.llvm.org/D102279
-
Pratyush Das authored
Non-comprehensive list of cases: * Dumping template arguments; * Corresponding parameter contains a deduced type; * Template arguments are for a DeclRefExpr that hadMultipleCandidates() Type information is added in the form of prefixes (u8, u, U, L), suffixes (U, L, UL, LL, ULL) or explicit casts to printed integral template argument, if MSVC codeview mode is disabled. Differential revision: https://reviews.llvm.org/D77598
-
Nico Weber authored
This reverts commit dfc1e31d. See discussion on https://reviews.llvm.org/D98798
-
Stephen Concannon authored
Within clang-tidy's NarrowingConversionsCheck. * Allow opt-out of some common occurring patterns, such as: - Implicit casts between types of equivalent bit widths. - Implicit casts occurring from the return of a ::size() method. - Implicit casts on size_type and difference_type. * Allow opt-in of errors within template instantiations. This will help projects adopt these guidelines iteratively. Developed in conjunction with Yitzhak Mandelbaum (ymandel). Patch by Stephen Concannon! Differential Revision: https://reviews.llvm.org/D99543
-
Florian Hahn authored
-
Florian Hahn authored
-
Stelios Ioannou authored
The loop flattening pass requires loops to be in simplified form. If the loops are not in simplified form, the pass cannot operate. This patch simplifies all loops before flattening. As a result, all loops will be simplified regardless of whether anything ends up being flattened. This change was inspired by observing a certain loop that was not flatten because the loops were not in simplified form. This loop is added as a test to verify that it is now flattened. Differential Revision: https://reviews.llvm.org/D102249 Change-Id: I45bcabe70fb99b0d89f0effafc82eb9e0585ec30
-
Shoaib Meenai authored
LLVM's build system contains support for configuring a distribution, but it can often be useful to be able to configure multiple distributions (e.g. if you want separate distributions for the tools and the libraries). Add this support to the build system, along with documentation and usage examples. Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D89177
-
Rob Suderman authored
Rank-0 case causes a graph during linalg reshape operation. Differential Revision: https://reviews.llvm.org/D102282
-
Benjamin Kramer authored
That's a cyclic dependency. NFC.
-
Valentin Clement authored
This patch begins to translate acc.enter_data operation to call to tgt runtime call. It currently only translate create/copyin operands of memref type. This acts as a basis to add support for FIR types in the Flang/OpenACC support. It follows more or less a similar path than clang with `omp target enter data map` directives. This patch is taking a different approach than D100678 and perform a translation to LLVM IR and make use of the OpenMPIRBuilder instead of doing a conversion to the LLVMIR dialect. OpenACC support in Flang will rely on the current OpenMP runtime where 1:1 lowering can be applied. Some extension will be added where features are not available yet. Big part of this code will be shared for other standalone data operations in the OpenACC dialect such as acc.exit_data and acc.update. It is likely that parts of the lowering can also be shared later with the ops for standalone data directives in the OpenMP dialect when they are introduced. This is an initial translation and it probably needs more work. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D101504
-
Roman Lebedev authored
Otherwise we'll have issues with forward definition of GlobalDecl. Split off from https://reviews.llvm.org/D100388
-
Roman Lebedev authored
It does the same thing. Split off from https://reviews.llvm.org/D100388
-
Fangrui Song authored
-
Fangrui Song authored
llvm-dev message: https://lists.llvm.org/pipermail/llvm-dev/2021-May/150465.html In an ELF shared object, a default visibility defined symbol is preemptible by default. This creates some missed optimization opportunities. -fno-semantic-interposition can optimize -fPIC: * in Clang: avoid GOT/PLT cost for variable access/function calls to external linkage definition in the same TU * in GCC: enable interprocedural optimizations (including inlining) and avoid PLT See https://gist.github.com/MaskRay/2d4dfcfc897341163f734afb59f689c6 for more information. -Bsymbolic-functions is more aggressive than -fvisibility-inlines-hidden (present since 2012) as it applies to all function definitions. It can * avoid PLT for cross-TU function calls && reduce dynamic symbol lookup * reduce dynamic symbol lookup for taking function addresses and optimize out GOT/TOC on x86-64/ppc64 With both options, the libLLVM.so and libclang-cpp.so performance should be closer to PIE binary linking against `libLLVM*.a` and `libclang*.a` (In a -DLLVM_TARGETS_TO_BUILD=X86 build, the number of JUMP_SLOT decreases from 12716 to 1628, and the number of GLOB_DAT decreases from 1918 to 1313 The built clang with `-DLLVM_LINK_LLVM_DYLIB=on -DCLANG_LINK_CLANG_DYLIB=on` is significantly faster. See the Linux kernel build result https://bugs.archlinux.org/task/70697 ) Some implication: Interposing a subset of functions is no longer supported. (This is fragile anyway and cannot really be supported. For Mach-O we don't use `ld -interpose`, so interposition is not supported on Mach-O at all.) Compiling a program which takes the address of any LLVM function with `{gcc,clang} -fno-pic` and expects the address to equal to the address taken from libLLVM.so or libclang-cpp.so is unsupported. I am fairly confident that llvm-project shouldn't have different behaviors depending on such pointer equality (as we've been using -fvisibility-inlines-hidden which applies to inline functions for a long time), but if we accidentally do, users should be aware that they should not make assumption on pointer equality in `-fno-pic` mode. Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D102090
-
Inho Seo authored
The current static checker for linalg does not work on the decreasing index cases well. So, this is to Update the current static bound checker for linalg to cover decreasing index cases. Reviewed By: hanchung Differential Revision: https://reviews.llvm.org/D102302
-
Simon Pilgrim authored
On AVX1 targets we can handle v4i64 logical shifts by 32 bits as a pair of v8f32 shuffles with zero. I was hoping to put this in LowerScalarImmediateShift, but performing that early causes regressions where other instructions were respliting the subvectors.
-
Aart Bik authored
Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D102285
-
Amara Emerson authored
This caused performance regressions vs SDAG on SingleSource/Benchmarks/Adobe-C++
-
Greg McGary authored
Extend the range of calls beyond an architecture's limited branch range by first calling a thunk, which loads the far address into a scratch register (x16 on ARM64) and branches through it. Other ports (COFF, ELF) use multiple passes with successively-refined guesses regarding the expansion of text-space imposed by thunk-space overhead. This MachO algorithm places thunks during MergedOutputSection::finalize() in a single pass using exact thunk-space overheads. Thunks are kept in a separate vector to avoid the overhead of inserting into the `inputs` vector of `MergedOutputSection`. FIXME: * arm64-stubs.s test is broken * add thunk tests * Handle thunks to DylibSymbol in MergedOutputSection::finalize() Differential Revision: https://reviews.llvm.org/D100818
-
Jon Chesterfield authored
[libomptarget][amdgpu][nfc] Expand errorcheck macros These macros expand to continue, which is confusing, or exit, which is incompatible with continuing execution on offloading fail. Expanding the macros in place makes the code look untidy but the control flow obvious and amenable to improving. In particular, exit becomes easier to eliminate. Reviewed By: pdhaliwal Differential Revision: https://reviews.llvm.org/D102230
-
Abhina Sreeskantharajan authored
On z/OS, umask() returns an int because mode_t is type int, however it is being compared to an unsigned int. This patch fixes the following warning we see when compiling Path.cpp. ``` comparison of integers of different signs: 'const int' and 'const unsigned int' ``` Reviewed By: muiez Differential Revision: https://reviews.llvm.org/D102326
-
Malcolm Parsons authored
string_view isn't experimental anymore. This check has always handled both forms. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D102313
-
Fabian Schuiki authored
This factors out the pass timing code into a separate `TimingManager` that can be plugged into the `PassManager` from the outside. Users are able to provide their own implementation of this manager, and use it to time additional code paths outside of the pass manager. Also allows for multiple `PassManager`s to run and contribute to a single timing report. More specifically, moves most of the existing infrastructure in `Pass/PassTiming.cpp` into a new `Support/Timing.cpp` file and adds a public interface in `Support/Timing.h`. The `PassTiming` instrumentation becomes a wrapper around the new timing infrastructure which adapts the instrumentation callbacks to the new timers. Reviewed By: rriddle, lattner Differential Revision: https://reviews.llvm.org/D100647
-
- May 12, 2021
-
-
Victor Huang authored
-