- Jul 02, 2021
-
-
Jez Ng authored
This makes NonLazyPointerSectionBase's style more in line with the rest of the classes in its file.
-
Jez Ng authored
`__cfstring` is a special literal section, so instead of breaking it up at symbol boundaries, we break it up at fixed-width boundaries (since each literal is the same size). Symbols can only occur at one of those boundaries, so this is strictly more powerful than `.subsections_via_symbols`. With that in place, we then run the section through ICF. This change is about perf-neutral when linking chromium_framework. Reviewed By: #lld-macho, gkm Differential Revision: https://reviews.llvm.org/D105045
-
Jez Ng authored
This is a pretty big refactoring diff, so here are the motivations: Previously, ICF ran after scanRelocations(), where we emitting bind/rebase opcodes etc. So we had a bunch of redundant leftovers after ICF. Having ICF run before Writer seems like a better design, and is what LLD-ELF does, so this diff refactors it accordingly. However, ICF had two dependencies on things occurring in Writer: 1) it needs literals to be deduplicated beforehand and 2) it needs to know which functions have unwind info, which was being handled by `UnwindInfoSection::prepareRelocations()`. In order to do literal deduplication earlier, we need to add literal input sections to their corresponding output sections. So instead of putting all input sections into the big `inputSections` vector, and then filtering them by type later on, I've changed things so that literal sections get added directly to their output sections during the 'gather' phase. Likewise for compact unwind sections -- they get added directly to the UnwindInfoSection now. This latter change is not strictly necessary, but makes it easier for ICF to determine which functions have unwind info. Adding literal sections directly to their output sections means that we can no longer determine `inputOrder` from iterating over `inputSections`. Instead, we store that order explicitly on InputSection. Bloating the size of InputSection for this purpose would be unfortunate -- but LLD-ELF has already solved this problem: it reuses `outSecOff` to store this order value. One downside of this refactor is that we now make an additional pass over the unwind info relocations to figure out which functions have unwind info, since want to know that before `processRelocations()`. I've made sure to run that extra loop only if ICF is enabled, so there should be no overhead in non-optimizing runs of the linker. The upside of all this is that the `inputSections` vector now contains only ConcatInputSections that are destined for ConcatOutputSections, so we can clean up a bunch of code that just existed to filter out other elements from that vector. I will test for the lack of redundant binds/rebases in the upcoming cfstring deduplication diff. While binds/rebases can also happen in the regular `.text` section, they're more common in `.data` sections, so it seems more natural to test it that way. This change is perf-neutral when linking chromium_framework. Reviewed By: oontvoo Differential Revision: https://reviews.llvm.org/D105044
-
Matthias Springer authored
Differential Revision: https://reviews.llvm.org/D105256
-
Rob Suderman authored
There were some missing bazel dependencies for the Tosa dialect. Added these deps. Reviewed By: GMNGeoffrey Differential Revision: https://reviews.llvm.org/D105326
-
Rob Suderman authored
Tosa's PassDetail.h may be used in non-TOSA transforms. Include TosaDialect to avoid transient dependency. Differential Revision: https://reviews.llvm.org/D105324
-
Matt Arsenault authored
-
-
Rob Suderman authored
Includes were missing in the PassDetails.h that cause downstream failures on TOSA passes. Differential Revision: https://reviews.llvm.org/D105323
-
Jessica Paquette authored
In `IRTranslator::translateGetElementPtr`, when we run into a vector gep with some scalar operands, we try to normalize those operands using `buildSplatVector`. This is fine except for when the getelementptr has a <1 x N> type. In that case it is treated as a scalar. If we run into one of these then every call to ``` // With VectorWidth = 1 LLT::fixed_vector(VectorWidth, PtrTy) ``` will assert. Here's an example (equivalent to the added testcase): https://godbolt.org/z/hGsTnMYdW To get around this, this patch adds a variable, `WantSplatVector`, which is true when our vector type ought to actually be represented using a vector. When it's false, we'll translate as a scalar. This checks if `VectorWidth > 1`. This fixes this bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=35496 Differential Revision: https://reviews.llvm.org/D105316
-
Rob Suderman authored
Added InferReturnTypeComponents for NAry operations, reshape, and reverse. With the additional tosa-infer-shapes pass, we can infer/propagate shapes across a set of TOSA operations. Current version does not modify the FuncOp type by inserting an unrealized conversion cast prior to any new non-matchin returns. Differential Revision: https://reviews.llvm.org/D105312
-
Eli Friedman authored
Target-independent code only knows how to spill to the stack; instead, use AArch64ISD::REINTERPRET_CAST. Differential Revision: https://reviews.llvm.org/D104573
-
LLVM GN Syncbot authored
-
Petr Hosek authored
We need the compiler generated variable to override the weak symbol of the same name inside the profile runtime, but using LinkOnceODRLinkage results in weak symbol being emitted which leads to an issue where the linker might choose either of the weak symbols potentially disabling the runtime counter relocation. This change replaces the use of weak definition inside the runtime with an external weak reference to address the issue. We also place the compiler generated symbol inside a COMDAT group so dead definition can be garbage collected by the linker. Differential Revision: https://reviews.llvm.org/D105176
-
Jon Roelofs authored
Differential revision: https://reviews.llvm.org/D105290
-
Mehdi Amini authored
The context can be created with threading disabled, to avoid creating a thread pool that may be destroyed when injecting another one later. Differential Revision: https://reviews.llvm.org/D105302
-
Arthur O'Dwyer authored
This was the only thing preventing any one of our detail headers from compiling on its own.
-
Hansang Bae authored
This patch includes the following changes to address a few issues when using hidden helper task. - Assertion is triggered when there are inadvertent calls to hidden helper functions on non-Linux OS - Added deinit code in __kmp_internal_end_library function to fix random shutdown crashes - Moved task data access into the lock-guarded region in __kmp_push_task Differential Revision: https://reviews.llvm.org/D105308
-
zoecarver authored
Differential Revision: https://reviews.llvm.org/D105304
-
Sanjay Patel authored
This is the cause of the miscompile in: https://llvm.org/PR50944 The problem has likely existed for some time, but it was made visible with: 5af8bacc ( D104661 ) handleOtherCmpSelSimplifications() assumed it can convert select of constants to bool logic ops, but that does not work with poison. We had a very similar construct in InstCombine, so the fix here mimics the fix there. The bug is in instsimplify, but I'm not sure how to reproduce it outside of instcombine. The reason this is visible in instcombine is because we have a hack (FIXME) to bypass simplification of a select when it has an icmp user: https://github.com/llvm/llvm-project/blob/955f12589940634acc6c9901e8b25534808f691c/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp#L2632 So we get to an unusual case where we are trying to simplify an instruction that has an operand that would have already simplified if we had processed it in normal order. Differential Revision: https://reviews.llvm.org/D105298
-
Sanjay Patel authored
-
Caitlyn Cano authored
A README file with procedure for building/testing LLVM libc on Windows has also been added. Reviewed By: sivachandra, aeubanks Differential Revision: https://reviews.llvm.org/D105231
-
Daniel Rodríguez Troitiño authored
`llvm-strip` does not support `-l`. Apple's `strip` supports `-l`, but it is not documented, and the latest code doesn't seem to do anything meaningful. From the old source code drops it seems that `-l` was added around version 795 of cctools and removed before 898. The code around the flag usage in 795 talks about problems with kext and forcing the execution of `ld -r`, which seems a behaviour that is not enforceable in latest versions of cctools. The `-l` flag was added in https://reviews.llvm.org/D15133 without a lot of explanation. Since the flag is not active, removing it should not modify the behaviour for most people (except if someone is trying to compile LLVM with a really old version of `strip`). Additionally, break the invocation into two different flags, since `llvm-strip` doesn't at the moment support grouped flags, and other `strip` implementations should work the same no matter if grouped or not. Test Plan: Using `strip` from Xcode 12.5 in Big Sur to strip the same binary (a simple Hello World), using both `-Sxl` and `-Sx` produces exactly the same binary. Repeating the same process with `clang` results also in the same binary. Reviewed By: smeenai Differential Revision: https://reviews.llvm.org/D105243
-
Daniel Rodríguez Troitiño authored
GNU and Apple `strip` implementations seems to support grouped options. Enable the support for grouped options introduced in https://reviews.llvm.org/D83639 for `llvm-strip` invocations. Includes test that checks that both the grouped and non grouped invocations produces the same result. Reviewed By: alexander-shaposhnikov, MaskRay Differential Revision: https://reviews.llvm.org/D105249
-
David Green authored
D104868 removed an (incorrect) fold for distributing BFI instructions in a chain, combining them into a single instruction. BFIs like that are hard to test, as the patterns are often destroyed before they become BFIs. But it can come up in places, with chains of BFIs that can be combined. This patch adds a replacement, which reassociates BFI instructions with non-overlapping insertion masks so that low bits are inserted first. This can end up sorting the nodes so that adjacent inserts are next to one another, allowing the existing folds to combine into a single BFI. Differential Revision: https://reviews.llvm.org/D105096
-
Vitaly Buka authored
If we get here from reallocate, BlockEnd is tagged. Then we will storeTag(UntaggedEnd) into the header of the next chunk. Luckily header tag is 0 so unpatched code still works. Reviewed By: pcc Differential Revision: https://reviews.llvm.org/D105261
-
Vassil Vassilev authored
Now we can do things like: clang-repl "int i = 1;" "int j = 2;". Differential revision: https://reviews.llvm.org/D104898
-
Valentin Churavy authored
At C bindings and an example for LLJIT with lazy reexports Differential Revision: https://reviews.llvm.org/D104672
-
Joel E. Denny authored
The new documentation entry gives an example use case from libomptarget. Reviewed By: yln, jhenderson, davezarzycki Differential Revision: https://reviews.llvm.org/D105208
-
Ahmed Taei authored
This op performs matrix-matrix-transpose multiplication of 4-d inputs as the following: ``` C[m1, n1, m0, n0] = sum_{k1, k0}(A[m1, k1, m0, k0] * B[n1, k1, n0, k0]) ``` Reviewed By: Benoit Differential Revision: https://reviews.llvm.org/D105244 -
William S. Moses authored
Affine scalar replacement (and other affine passes, though not fixed here) don't properly handle operations with nested regions. This patch fixes the pass and two affine utilities to function properly given a non-affine internal region This patch prevents the pass from throwing an internal compiler error when running on the added test case. Differential Revision: https://reviews.llvm.org/D105058
-
Vitaly Buka authored
MTE Cache.store passes MAP_NOACCESS here. Reviewed By: pcc, cryptoad Differential Revision: https://reviews.llvm.org/D105266
-
Leonard Grey authored
Everything (including test) modified from ELF/COFF. Using the same syntax (--lto-O3, etc) as ELF. Differential Revision: https://reviews.llvm.org/D105223
-
Vitaly Buka authored
-
Tobias Gysi authored
Synchronizing multiple custom targets requires not only target but also file dependencies. Building Linalg involves running yaml-gen followed by tablegen. Currently, these custom targets are only synchronized using a target dependency resulting in issues in specific incremental build setups (https://llvm.discourse.group/t/missing-build-cmake-tblgen-dependency/3727/10). This patch introduces a novel LLVM_TARGET_DEPENDS variable to the TableGen.cmake file to provide a way to specify file dependencies. Additionally, it adapts the Linalg CMakeLists.txt to introduce the necessary file dependency between yaml-gen and tablegen. Differential Revision: https://reviews.llvm.org/D105272
-
Nico Weber authored
-
Nikita Popov authored
In this case the pointer type is part of the mangled name, so we can allow on opaque pointer outside --force-opaque-pointers mode as well.
-
Scott Linder authored
Address mistakenly comparing the pointer values of two C-style strings rather than comparing their contents in the unit tests for makeVisitor, added in 6d6f35eb
-
Louis Dionne authored
Now that Lit supports regular expressions inside XFAIL & friends, it is much easier to write Lit annotations based on the triple. Differential Revision: https://reviews.llvm.org/D104747
-
jasonliu authored
Summary: If we are on c++03 mode for some reason, and __builtin_va_copy is available, then use it instead of error out on not having va_copy in 03 mode. Reviewed by: ldionne Differential Revision: https://reviews.llvm.org/D100336
-