- Sep 16, 2022
-
-
Johannes Reifferscheid authored
Currently, there's an optimization that claims dimensions of size 1 are always contiguous. This is not necessarily the case for subviews. ``` Input: [ [ [0, 1], [2, 3] ], [ [4, 5] [6, 7] ] ] Subview: [ [ [0, 1], ], [ [4, 5] ] ] ``` The old logic treats this subview as contiguous, when it is not. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D134026 -
Florian Hahn authored
Extra tests for D133491.
-
Matheus Izvekov authored
After upgrading the type deduction machinery to retain type sugar in D110216, we were left with a situation where there is no general well behaved mechanism in Clang to unify the type sugar of multiple deductions of the same type parameter. So we ended up making an arbitrary choice: keep the sugar of the first deduction, ignore subsequent ones. In general, we already had this problem, but in a smaller scale. The result of the conditional operator and many other binary ops could benefit from such a mechanism. This patch implements such a type sugar unification mechanism. The basics: This patch introduces a `getCommonSugaredType(QualType X, QualType Y)` method to ASTContext which implements this functionality, and uses it for unifying the results of type deduction and return type deduction. This will return the most derived type sugar which occurs in both X and Y. Example: Suppose we have these types: ``` using Animal = int; using Cat = Animal; using Dog = Animal; using Tom = Cat; using Spike = Dog; using Tyke = Dog; ``` For `X = Tom, Y = Spike`, this will result in `Animal`. For `X = Spike, Y = Tyke`, this will result in `Dog`. How it works: We take two types, X and Y, which we wish to unify as input. These types must have the same (qualified or unqualified) canonical type. We dive down fast through top-level type sugar nodes, to the underlying canonical node. If these canonical nodes differ, we build a common one out of the two, unifying any sugar they had. Note that this might involve a recursive call to unify any children of those. We then return that canonical node, handling any qualifiers. If they don't differ, we walk up the list of sugar type nodes we dived through, finding the last identical pair, and returning that as the result, again handling qualifiers. Note that this patch will not unify sugar nodes if they are not identical already. We will simply strip off top-level sugar nodes that differ between X and Y. This sugar node unification will instead be implemented in a subsequent patch. This patch also implements a few users of this mechanism: * Template argument deduction. * Auto deduction, for functions returning auto / decltype(auto), with special handling for initializer_list as well. Further users will be implemented in a subsequent patch. Signed-off-by:
Matheus Izvekov <mizvekov@gmail.com> Differential Revision: https://reviews.llvm.org/D111283
-
Florian Hahn authored
On AArch64, doing the zero-extend separately first can be lowered more efficiently using tbl, building on D120571. https://alive2.llvm.org/ce/z/8Je595 Depends on D120571 Reviewed By: t.p.northover Differential Revision: https://reviews.llvm.org/D133494
-
Alex Zinenko authored
Bufferization already makes the assumption that buffers pass function boundaries in the strided form and uses the corresponding affine map layouts. Switch it to use the recently introduced strided layout instead to avoid unnecessary casts when bufferizing further operations to the memref dialect counterparts that now largely rely on the strided layout attribute. Depends On D133947 Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D133951
-
Alex Zinenko authored
The three following ops in the memref dialect: transpose, expand_shape, collapse_shape, have been originally designed to operate on memrefs with strided layouts but had to go through the affine map representation as the type did not support anything else. Make these ops produce memref values with StridedLayoutAttr instead now that it is available. Depends On D133938 Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D133947
-
Alex Zinenko authored
Memref subview operation has been initially designed to work on memrefs with strided layouts only and has never supported anything else. Port it to use the recently added StridedLayoutAttr instead of extracting the strided from implicitly from affine maps. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D133938
-
Nikita Popov authored
The libc++.so linker script generation uses the IMPORTED_LIBNAME target property on libcxx-abi-shared. However, libcxx-abi-shared is not an interface library and as such cannot have an IMPORTED_LIBNAME target property. Convert libcxx-abi-shared into an imported interface library and use IMPORTED_LIBNAME in place of IMPORTED_LOCATION. This makes linker script generation work correctly with system-libcxxabi. I believe this fixes the issue that D131037 was intended to fix. Differential Revision: https://reviews.llvm.org/D133566
-
Dmitry Makogon authored
InstCombine could sink instruction to NCD of its users.
-
jacquesguan authored
This patch adds constant folder for SinOp by using sin/sinf of libm. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D133915
-
Zequan Wu authored
This fixes a crash that mistaken global ctor/dtor as funciton methods. Differential Revision: https://reviews.llvm.org/D133446
-
Lang Hames authored
-
Vitaly Buka authored
-
Fangrui Song authored
As it was disabled due to unsupported feature "clang-driver" before.
-
Dave Lee authored
-
jacquesguan authored
-
jacquesguan authored
-
Fangrui Song authored
%T is a deprecated lit feature. It refers to the parent directory. When two tests in test/Driver refer to the same `%T/foo`, they are racy with each other. %t includes the test name and is safe for use. Reviewed By: tra Differential Revision: https://reviews.llvm.org/D133998
-
Jez Ng authored
This is similar to the `-alias` CLI option, but it gives finer-grained control in that it allows the aliased symbols to be treated as private externs. While working on this, I realized that our `-alias` handling did not cover the cases where the aliased symbol is a common or dylib symbol, nor the case where we have an undefined that gets treated specially and converted to a defined later on. My N_INDR handling neglects this too for now; I've added checks and TODO messages for these. `N_INDR` symbols cropped up as part of our attempt to link swift-stdlib. Reviewed By: #lld-macho, thakis, thevinster Differential Revision: https://reviews.llvm.org/D133825
-
Lang Hames authored
Compiles and moves the original C code for main to Inputs/dlopen-dlclose-x2.S, where it can be shared with other testcases that want a dlopen-dlclose-dlopen-dlclose sequence. The assembly containging the initializers to be tested is moved into the test file.
-
Lang Hames authored
Unlike ExecutorAddr, there's limited value to having a distinct type for ExecutorAddrDiff, and it's occasionally awkward to work with. The corresponding LLVM type (llvm::orc::ExecutorAddrDiff) was already made a type-alias in 9e2cfb06.
-
Gulfem Savrun Yeniceri authored
This is a reland of https://reviews.llvm.org/D122336. Original patch caused a problem in collecting coverage in Fuchsia because it was returning early without putting unused function names into __llvm_prf_names section. This patch fixes that issue. The original commit message is as the following: CoverageMappingModuleGen generates a coverage mapping record even for unused functions with internal linkage, e.g. static int foo() { return 100; } Clang frontend eliminates such functions, but InstrProfiling pass still emits runtime hook since there is a coverage record. Fuchsia uses runtime counter relocation, and pulling in profile runtime for unused functions causes a linker error: undefined hidden symbol: __llvm_profile_counter_bias. Since https://reviews.llvm.org/D98061, we do not hook profile runtime for the binaries that none of its translation units have been instrumented in Fuchsia. This patch extends that for the instrumented binaries that consist of only unused functions. Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D122336
-
Brad Smith authored
-
Yuta Mukai authored
The method of counting resource consumption is modified to be based on "Cycles" value when DFA is not used. The calculation of ResMII is modified to total "Cycles" and divide it by the number of units for each resource. Previously, ResMII was excessive because it was assumed that resources were consumed for the cycles of "Latency" value. The method of resource reservation is modified similarly. When a value of "Cycles" is larger than 1, the resource is considered to be consumed by 1 for cycles of its length from the scheduled cycle. To realize this, ResourceManager maintains a resource table for all slots. Previously, resource consumption was always 1 for 1 cycle regardless of the value of "Cycles" or "Latency". In addition, the number of micro operations per cycle is modified to be constrained by "IssueWidth". To disable the constraint, --pipeliner-force-issue-width=100 can be used. For the case of using DFA, the scheduling results are unchanged. Reviewed By: dpenry Differential Revision: https://reviews.llvm.org/D133572
-
Colin Cross authored
Getting the default module cache path calls llvm::sys::path::cache_directory, which calls home_directory, which checks the HOME environment variable before falling back to getpwuid. When compiling against musl libc, which does not support NSS, and running on a machine that doesn't have the current user in /etc/passwd due to NSS, no home directory can be found. Set the HOME environment variable in the tests to avoid depending on getpwuid. Reviewed By: pirama, srhines Differential Revision: https://reviews.llvm.org/D132984
-
Navid Emamdoost authored
Reviewed By: kcc, vitalybuka, MaskRay Differential Revision: https://reviews.llvm.org/D133157
-
Jeffrey Byrnes authored
-
Colin Cross authored
The mbstate_t field in std::fpos is an opaque type provied by libc, and musl's implementation does not match the one used by glibc. Change StdFposPrinter to verify its assumptions about the layout of mbstate_t, and leave out the state printing if it doesn't match. Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D132983
-
Aart Bik authored
Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D133971
-
David Green authored
-
rdar://99981102Roy Sundahl authored
These four tests are failing on tvOS devices (not simulators) so XFAIL them for now for CI and investigate further. rdar://99981102 Differential Revision: https://reviews.llvm.org/D133963
-
Amy Huang authored
This is a followup to reviews.llvm.org/D133457.
-
Philip Reames authored
Differential Revision: https://reviews.llvm.org/D133957
-
Philip Reames authored
These should only be immediate values or GPR registers. Differential Revision: https://reviews.llvm.org/D133953
-
Alexander Timofeev authored
This patch contains changes necessary to carry physical condition register (SCC) dependencies through the SDNode scheduler. It adds the edge in the SDNodeScheduler dependency graph instead of inserting the SCC copy between each definition and use. This approach lets the scheduler place instructions in an optimal way placing the copy only when the dependency cannot be resolved. Reviewed By: rampitec Differential Revision: https://reviews.llvm.org/D133593
-
Vitaly Buka authored
-
Erich Keane authored
While investigating something else, I discovered that a prototypeless function with 'overloadable' was having the attribute left on the declaration, which caused 'ambiguous' call errors later on. This lead to some confusion. This patch removes the 'overloadable' attribute from the declaration and leaves it as prototypeless, instead of trying to make it variadic.
-
Joseph Huber authored
This patch changes the CMake to instead embed the already generated LLVM-IR bitcode library into an object file to create the static library. This is different from the previous method which generated them separately. This will make the build faster and allow us to perform the same internalization into a single library we do with the bitcode library. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D133952
-
Hanhan Wang authored
Custom attributes can be set on the operation. It prevents them to be removed when doing named ops conversion. Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D133892
-
Florian Hahn authored
-