- Jul 16, 2021
-
-
Sander de Smalen authored
The original patch was: https://reviews.llvm.org/D105806 There were some issues with undeterministic behaviour of the sorting function, which led to scalable-call.ll passing and/or failing. This patch fixes the issue by numbering all instructions in the array first, and using that number as the order, which should provide a consistent ordering. This reverts commit a607f641.
-
Fraser Cormack authored
This patch teaches the compiler to identify a wider variety of `BUILD_VECTOR`s which form integer arithmetic sequences, and to lower them to `vid.v` with modifications for non-unit steps and non-zero addends. The sequences handled by this optimization must either be monotonically increasing or decreasing. Consecutive elements holding the same value indicate a fractional step which, while simple mathematically, becomes more complex to handle both in the realm of lossy integer division and in the presence of `undef`s. For example, a common "interleaving" shuffle index will be lowered by LLVM to both `<0,u,1,u,2,...>` and `<u,0,u,1,u,...>` `BUILD_VECTOR` nodes. Either of these would ideally be lowered to `vid.v` shifted right by 1. Detection of this sequence in presence of general `undef` values is more complicated, however: `<0,u,u,1,>` could match either `<0,0,0,1,>` or `<0,0,1,1,>` depending on later values in the sequence. Both are possible, so backtracking or multiple passes is inevitable. Sticking to monotonic sequences keeps the logic simpler as it can be done in one pass. Fractional steps will likely be a separate optimization in a future patch. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D104921
-
Uday Bondhugula authored
Remove duplicate and stale doc comment on affineParallelize. NFC.
-
Timm Bäder authored
Differential Revision: https://reviews.llvm.org/D106055
-
Vince Bridgers authored
This change addresses this assertion that occurs in a downstream compiler with a custom target. ```APInt.h:1151: bool llvm::APInt::operator==(const llvm::APInt &) const: Assertion `BitWidth == RHS.BitWidth && "Comparison requires equal bit widths"'``` No covering test case is susbmitted with this change since this crash cannot be reproduced using any upstream supported target. The test case that exposes this issue is as simple as: ```lang=c++ void test(int * p) { int * q = p-1; if (q) {} if (q) {} // crash (void)q; } ``` The custom target that exposes this problem supports two address spaces, 16-bit `char`s, and a `_Bool` type that maps to 16-bits. There are no upstream supported targets with similar attributes. The assertion appears to be happening as a result of evaluating the `SymIntExpr` `(reg_$0<int * p>) != 0U` in `VisitSymIntExpr` located in `SimpleSValBuilder.cpp`. The `LHS` is evaluated to `32b` and the `RHS` is evaluated to `16b`. This eventually leads to the assertion in `APInt.h`. While this change addresses the crash and passes LITs, two follow-ups are required: 1) The remainder of `getZeroWithPtrWidth()` and `getIntWithPtrWidth()` should be cleaned up following this model to prevent future confusion. 2) We're not sure why references are found along with the modified code path, that should not be the case. A more principled fix may be found after some further comprehension of why this is the case. Acks: Thanks to @steakhal and @martong for the discussions leading to this fix. Reviewed By: NoQ Differential Revision: https://reviews.llvm.org/D105974 -
Simon Giesecke authored
Differential Revision: https://reviews.llvm.org/D105982
-
Mehdi Amini authored
Use ManagedStatic and lazy initialization of cl::opt in libSupport to make it free of global initializer We can build it with -Werror=global-constructors now. This helps in situation where libSupport is embedded as a shared library, potential with dlopen/dlclose scenario, and when command-line parsing or other facilities may not be involved. Avoiding the implicit construction of these cl::opt can avoid double-registration issues and other kind of behavior. Reviewed By: lattner, jpienaar Differential Revision: https://reviews.llvm.org/D105959
-
Mehdi Amini authored
Revert "Use ManagedStatic and lazy initialization of cl::opt in libSupport to make it free of global initializer" This reverts commit af932173. Still some specific config broken in some way that requires more investigation.
-
Timm Bäder authored
This reverts commit 7c637260.
-
Timm Bäder authored
Differential Revision: https://reviews.llvm.org/D106055
-
Marcos Horro authored
Added information stored in PipelineOptions and the MCSubtargetInfo. Bug: https://bugs.llvm.org/show_bug.cgi?id=51041 Reviewed By: andreadb Differential Revision: https://reviews.llvm.org/D106077
-
Deep Majumder authored
This patch handles the `<<` operator defined for `std::unique_ptr` in the std namespace (ignores custom overloads of the operator). Differential Revision: https://reviews.llvm.org/D105421 -
Mehdi Amini authored
Use ManagedStatic and lazy initialization of cl::opt in libSupport to make it free of global initializer We can build it with -Werror=global-constructors now. This helps in situation where libSupport is embedded as a shared library, potential with dlopen/dlclose scenario, and when command-line parsing or other facilities may not be involved. Avoiding the implicit construction of these cl::opt can avoid double-registration issues and other kind of behavior. Reviewed By: lattner, jpienaar Differential Revision: https://reviews.llvm.org/D105959
-
Mehdi Amini authored
Fix mismatch between the provisioning of asyncExecutors and the actual thread count currently in the context (NFC) This fixes an assert in some deployment where the threadpool is customized.
-
Jonas Devlieghere authored
We've been requiring macOS 10.11 since 2018 so there's no point in keeping code for 10.10 around.
-
Petr Hosek authored
After we relocate counters, we no longer need to keep the original copy around so we can return the memory back to the operating system. Differential Revision: https://reviews.llvm.org/D104839
-
Serge Pavlov authored
-
Max Kazantsev authored
This patch addresses assertion failure in case when the only found formula for LSR is `1*reg => reg` which was supposed to be an impossible situation, however there is a test that shows it is possible. In this case, we can use scale register with scale of 1 as the missing base register. Reviewed By: huihuiz, reames Differential Revision: https://reviews.llvm.org/D105009
-
Deep Majumder authored
This patch handles all the comparision methods (defined via overloaded operators) on std::unique_ptr. These operators compare the underlying pointers, which is modelled by comparing the corresponding inner-pointer SVal. There is also a special case for comparing the same pointer. Differential Revision: https://reviews.llvm.org/D104616
-
Carl Ritson authored
When setting Allocatable on a generated register class check all superclasses and set Allocatable true if any superclass is allocatable. Without this change generated register classes based on an allocatable class may end up unallocatable due to the topological inheritance order. This change primarily effects AMDGPU backend; however, there are a few changes in MIPs GlobalISel register constraints as a result. Reviewed By: kparzysz Differential Revision: https://reviews.llvm.org/D105967
-
Vincent Lee authored
In D105866, we used an intermediate container to store a list of opcodes. Here, we use that data structure to help us perform optimization passes that would allow a more efficient encoding of bind opcodes. Currently, the functionality mirrors the optimization pass {1,2} done in ld64 for bind opcodes under optimization gate to prevent slight regressions. Reviewed By: int3, #lld-macho Differential Revision: https://reviews.llvm.org/D105867 -
Shilei Tian authored
A common use of `ChangeStatus` is as follows: ``` ChangeStatus Changed = ChangeStatus::UNCHANGED; Changed |= foo(); ``` where `foo` returns `ChangeStatus` as well. Currently `ChangeStatus` doesn't support compound assignment, we have to write as ``` Changed = Changed | foo(); ``` which is not that convenient. This patch add the support for compound assignment for `ChangeStatus`. Compound assignment is usually implemented as a member function, and binary arithmetic operator is therefore implemented using compound assignment. However, unlike regular C++ class, enum class doesn't support member functions. As a result, they can only be implemented in the way shown in the patch. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D106109
-
Mehdi Amini authored
Revert "Use ManagedStatic and lazy initialization of cl::opt in libSupport to make it free of global initializer" This reverts commit 42f588f3. Broke some buildbots
-
Mehdi Amini authored
Use ManagedStatic and lazy initialization of cl::opt in libSupport to make it free of global initializer We can build it with -Werror=global-constructors now. This helps in situation where libSupport is embedded as a shared library, potential with dlopen/dlclose scenario, and when command-line parsing or other facilities may not be involved. Avoiding the implicit construction of these cl::opt can avoid double-registration issues and other kind of behavior. Reviewed By: lattner, jpienaar Differential Revision: https://reviews.llvm.org/D105959
-
John Demme authored
In cases where an operation has an argument or result named 'property', the ODS-generated python fails on import because the `@property` resolves to the `property` operation argument instead of the builtin `@property` decorator. We should always use the fully qualified decorator name. Reviewed By: mikeurbach Differential Revision: https://reviews.llvm.org/D106106
-
LLVM GN Syncbot authored
-
Nico Weber authored
-
Shilei Tian authored
[NFC][OpenMP][Offloading] Replaced explicit parallel level computation with function `__kmpc_parallel_level` There are two places in current deviceRTLs where it computes parallel level explicitly, which is basically the functionality of `__kmpc_parallel_level`. Starting from D105787, we plan to introduce a series of function call folding based on information that can be deducted during compilation time. Computation of parallel level is the next target. This patch makes steps for the optimization. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D105955
-
Louis Dionne authored
This configuration is interesting because GCC has a different level of strictness for some C++ rules. In particular, it implements the older standards more stringently than Clang, which can help find places where we are non-conforming (especially in the test suite). Differential Revision: https://reviews.llvm.org/D105936
-
Ben Barham authored
It was possible to re-add a module to a shared in-memory module cache when search paths are changed. This can eventually cause a crash if the original module is referenced after this occurs. 1. Module A depends on B 2. B exists in two paths C and D 3. First run only has C on the search path, finds A and B and loads them 4. Second run adds D to the front of the search path. A is loaded and contains a reference to the already compiled module from C. But searching finds the module from D instead, causing a mismatch 5. B and the modules that depend on it are considered out of date and thus rebuilt 6. The recompiled module A is added to the in-memory cache, freeing the previously inserted one This can never occur from a regular clang process, but is very easy to do through the API - whether through the use of a shared case or just running multiple compilations from a single `CompilerInstance`. Update the compilation to return early if a module is already finalized so that the pre-condition in the in-memory module cache holds. Resolves rdar://78180255 Differential Revision: https://reviews.llvm.org/D105328 -
Daniel Rodríguez Troitiño authored
Use double pound at the start of the line to differentiate comments from statements for Lit or FileCheck. I will also use this small commit to check my commit access. Differential Revision: https://reviews.llvm.org/D106103
-
Weiwei Li authored
Add spv.GLSL.FMix opertaion. co-authered-by:
Alan Liu <alanliu.yf@gmail.com> Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D104153
-
Vincent Lee authored
We want to incorporate some of the optimization passes in bind opcodes from ld64. This revision makes no functional changes but to start storing opcodes in intermediate containers in preparation for implementing the optimization passes in a follow-up revision. Differential Revision: https://reviews.llvm.org/D105866
-
Kirill Stoimenov authored
The goal of this change is to test if I can commit changes. Reviewed By: kcc Differential Revision: https://reviews.llvm.org/D106101
-
Nico Weber authored
This reverts commit e33446ea. Doesn't build on mac, and causes other problems. See reports on https://reviews.llvm.org/D106046 and https://reviews.llvm.org/D106081 Also revert follow-up "tsan: strip top inlined internal frames" This reverts commit 7b302fc9.
-
Matt Arsenault authored
-
Matt Arsenault authored
-
Matt Arsenault authored
Since we're still building on top of the MVT based infrastructure, we need to track the pointer type/address space on the side so we can end up with the correct pointer LLTs when interpreting CCValAssigns.
-
Peter S. Housel authored
This change adds AllocateMemory and DeallocateMemory methods to the SBProcess API, so that clients can allocate and deallocate memory blocks within the process being debugged (for storing JIT-compiled code or other uses). (I am developing a debugger + REPL using the API; it will need to store JIT-compiled code within the target.) Reviewed By: clayborg, jingham Differential Revision: https://reviews.llvm.org/D105389
-
Vitaly Buka authored
-