This project is mirrored from https://github.com/llvm/llvm-project.git.
Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer or owner.
Last successful update .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer or owner.
Last successful update .
- Mar 26, 2021
-
-
Matt Morehouse authored
Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D98892
-
Craig Topper authored
[RISCV] Reorder checks in RISCVTTIImpl::getGatherScatterOpCost to avoid calling getMinRVVVectorSizeInBits() when V extension is not enabled. getMinRVVVectorSizeInBits() asserts if the V extension isn't enabled. So check that gather/scatter is legal first since it already contains a check for V extension being enabled. It also already checks getMinRVVVectorSizeInBits for fixed length vectors so we don't need a check in getGatherScatterOpCost.
-
Andrew Savonichev authored
Instructions that have more uops than the processor's IssueWidth are issued in multiple cycles. The patch fixes PR49712. Differential Revision: https://reviews.llvm.org/D99339
-
Xun Li authored
When emitting a function body there needs to be a instr profiling counter emitted. Otherwise instr profiling won't work for this function. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D98135
-
Richard Smith authored
Previously we created an implicit cast of the wrong kind, which we'd later fail to constant-evaluate, resulting in deduction failure.
-
Vy Nguyen authored
This reverts commit 77b4230e. New change: Fixed tests on windows Differential Revision: https://reviews.llvm.org/D99210
-
Xun Li authored
tl;dr Correct implementation of Corouintes requires having lifetime intrinsics available. Coroutine functions are functions that can be suspended and resumed latter. To do so, data that need to stay alive after suspension must be put on the heap (i.e. the coroutine frame). The optimizer is responsible for analyzing each AllocaInst and figure out whether it should be put on the stack or the frame. In most cases, for data that we are unable to accurately analyze lifetime, we can just conservatively put them on the heap. Unfortunately, there exists a few cases where certain data MUST be put on the stack, not on the heap. Without lifetime intrinsics, we are unable to correctly analyze those data's lifetime. To dig into more details, there exists cases where at certain code points, the current coroutine frame may have already been destroyed. Hence no frame access would be allowed beyond that point. The following is a common code pattern called "Symmetric Transfer" in coroutine: ``` auto tmp = await_suspend(); __builtin_coro_resume(tmp.address()); return; ``` In the above code example, `await_suspend()` returns a new coroutine handle, which we will obtain the address and then resume that coroutine. This essentially "transfered" from the current coroutine to a different coroutine. During the call to `await_suspend()`, the current coroutine may be destroyed, which should be fine because we are not accessing any data afterwards. However when LLVM is emitting IR for the above code, it needs to emit an AllocaInst for `tmp`. It will then call the `address` function on tmp. `address` function is a member function of coroutine, and there is no way for the LLVM optimizer to know that it does not capture the `tmp` pointer. So when the optimizer looks at it, it has to conservatively assume that `tmp` may escape and hence put it on the heap. Furthermore, in some cases `address` call would be inlined, which will generate a bunch of store/load instructions that move the `tmp` pointer around. Those stores will also make the compiler to think that `tmp` might escape. To summarize, it's really difficult for the mid-end to figure out that the `tmp` data is short-lived. I made some attempt in D98638, but it appears to be way too complex and is basically doing the same thing as inserting lifetime intrinsics in coroutines. Also, for reference, we already force emitting lifetime intrinsics in O0 for AlwaysInliner: https://github.com/llvm/llvm-project/blob/main/llvm/lib/Passes/PassBuilder.cpp#L1893 Differential Revision: https://reviews.llvm.org/D99227
-
Nico Weber authored
This reverts commit ef69aa96. Makes clang assert in PGO builds, see repro tgz in https://bugs.chromium.org/p/chromium/issues/detail?id=1192783#c6
-
Leonard Chan authored
These contain clang driver changes for supporting HWASan on Fuchsia. This includes hwasan multilibs and the dylib path change. Differential Revision: https://reviews.llvm.org/D99361
-
Roman Lebedev authored
This *only* changes the cases where we *really* don't care about the iteration order of the underlying contained, namely when we will use the values from it to form DTU updates.
-
Nikita Popov authored
Rather than special-casing assume in BasicAA getModRefBehavior(), do this one level higher, in the attribute handling of CallBase. For assumes with operand bundles, the inaccessiblememonly attribute applies regardless of operand bundles.
-
Sanjay Patel authored
The full checks demonstrate a problem that comes up in: https://llvm.org/PR49610
-
peter klausler authored
The standard interoperability routine CFI_establish() does not accept a zero-length CHARACTER type. Since these can be valid results of intrinsic function references, work around the design of CFI_establish() in the wrapper routine that calls it. Differential Revision: https://reviews.llvm.org/D99296
-
Markus Böck authored
The function utilizes Windows' SearchPathW function, which as I found out today, may also return directories. After looking at the Unix implementation of the file I found that it contains a check whether the found path is also executable. While fixing the Windows implementation, I also learned that sys::fs::access returns successfully when querying whether directories are executable, which the Unix version does not. This patch makes both of these functions equivalent to their Unix implementation and insures that any path returned by sys::findProgramByName on Windows may only be executable, just like the Unix implementation. The equivalent additions I have made to the Windows implementation, in the Unix implementation are here: sys::findProgramByName: https://github.com/llvm/llvm-project/blob/39ecfe614350fa5db7b8f13f81212f8e3831a390/llvm/lib/Support/Unix/Program.inc#L90 sys::fs::access: https://github.com/llvm/llvm-project/blob/c2a84771bb63947695ea50b89160c02b36fb634d/llvm/lib/Support/Unix/Path.inc#L608 I encountered this issue when running the LLVM testsuite. Commands of the form not test ... would fail to correctly execute test.exe, which is part of GnuWin32, as it actually tried to execute a folder called test, which happened to be in a directory on my PATH. Differential Revision: https://reviews.llvm.org/D99357
-
Mircea Trofin authored
-
Yaxun (Sam) Liu authored
Add builtin function __builtin_get_device_side_mangled_name to get device side manged name for functions and global variables, which can be used to get symbol address of kernels or variables by mangled name in dynamically loaded bundled code objects at run time. Reviewed by: Artem Belevich Differential Revision: https://reviews.llvm.org/D99301
-
Stanislav Mekhanoshin authored
Differential Revision: https://reviews.llvm.org/D99366
-
Vy Nguyen authored
Differential Revision: https://reviews.llvm.org/D99365
-
Andrzej Warzynski authored
-
Krzysztof Parzyszek authored
-
Jez Ng authored
Code and test are largely identical to the LLD-ELF equivalents. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D99312
-
Jez Ng authored
I added just enough to allow us to see a top-level breakdown of time taken. This is the result of loading the time-trace output into `chrome:://tracing`: https://gist.githubusercontent.com/int3/236c723cbb4b6fa3b2d340bb6395c797/raw/ef5e8234f3fdf609bf93b50f54f4e0d9bd439403/tracing.png Reviewed By: oontvoo Differential Revision: https://reviews.llvm.org/D99311
-
Jez Ng authored
-
Lang Hames authored
This commented-out code was accidentally left in during the transition from MachO-specific to generic x86-64 edge kinds (ecf6466f).
-
Mehdi Amini authored
The `mayNotHaveTerminator` was initially on Block but moved to the verifier before landing and wasn't removed from its original place where it is unused.
-
Shoaib Meenai authored
This code was written back when LLVM's minimum required CMake version was 2.8.8, and I assume ExternalProject_Add_Step didn't take this option at that point. It does now though, so we should just use the option. Setting the _EP_* property is entirely equivalent (and is in fact how these commands behave internally), but that also feels like an internal implementation detail we shouldn't be relying on. Reviewed By: beanz Differential Revision: https://reviews.llvm.org/D99322
-
Shoaib Meenai authored
We want installs to be executed even if binaries haven't changed, e.g. so that we can install to multiple places. This is consistent with how non-multi-stage install targets (e.g. the regular install-distribution target) behave. Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D99321
-
Tim Keith authored
On macos, `size_t` is `unsigned long` while `size_t - int64_t` is `unsigned long long` so std::min requires an explicit type to compile. Differential Revision: https://reviews.llvm.org/D99340
-
Utkarsh Saxena authored
`expandedTokens(SourceRange)` used to do a binary search to get the expanded tokens belonging to a source range. Each binary search uses `isBeforeInTranslationUnit` to order two source locations. This is inherently very slow. By profiling clangd we found out that users like clangd::SelectionTree spend 95% of time in `isBeforeInTranslationUnit`. Also it is worth noting that users of `expandedTokens(SourceRange)` majorly use ranges provided by AST to query this funciton. The ranges provided by AST are token ranges (starting at the beginning of a token and ending at the beginning of another token). Therefore we can avoid the binary search in majority of the cases by maintaining an index of ExpandedToken by their SourceLocations. We still do binary search for ranges which are not token ranges but such instances are quite low. Performance: `~/build/bin/clangd --check=clang/lib/Serialization/ASTReader.cpp` Before: Took 2:10s to complete. Now: Took 1:13s to complete. Differential Revision: https://reviews.llvm.org/D99086
-
Jean Perier authored
Folding of LOGICAL intrinsic procedure was missing in the front-end causing crash when using it in parameter expressions. Simply fold LOGICAL calls to evaluate::Convert<T>. Differential Revision: https://reviews.llvm.org/D99346
-
Kadir Cetinkaya authored
Clangd was storing reference to a possibly-dead string in compiled config. This patch fixes the issue by copying suppression strings from fragments into compiled Config. Fixes https://github.com/clangd/clangd/issues/724. Differential Revision: https://reviews.llvm.org/D99326
-
Gabor Marton authored
Currently, we infer 0 if the divisible of the modulo op is 0: int a = x < 0; // a can be 0 int b = a % y; // b is either 1 % sym or 0 However, we don't when the op is / : int a = x < 0; // a can be 0 int b = a / y; // b is either 1 / sym or 0 / sym This commit fixes the discrepancy. Differential Revision: https://reviews.llvm.org/D99343
-
Marek Kurdej authored
This patch changes the variant even in pre-C++2b. It should not break anything, only allow use cases that didn't work previously. Notes: `__as_variant` is used in `__visitation::__variant::__visit_alt`, but I haven't used it in `__visitation::__variant::__visit_alt_at`. That's because it is used only in `__visit_value_at`, which in turn is always used on variant specializations (that's in comparison operators). * https://wg21.link/P2162 Reviewed By: ldionne, #libc, Quuxplusone Differential Revision: https://reviews.llvm.org/D97394
-
Alexander Belyaev authored
Folds away TiledLoopOp output tensors when the following conditions are met: * result of `linalg.tiled_loop` has no uses * output tensor is the argument of `linalg.yield` Example: ``` %0 = linalg.tiled_loop ... outs (%out, %out_buf:tensor<...>, memref<...>) { ... linalg.yield %out : tensor ... } ``` Becomes ``` linalg.tiled_loop ... outs (%out_buf:memref<...>) { ... linalg.yield } ``` Differential Revision: https://reviews.llvm.org/D99333
-
Arnamoy Bhattacharyya authored
Reviewed By: awarzynski Differential Revision: https://reviews.llvm.org/D97119
-
Uday Bondhugula authored
This reverts commit 361b7d12 by Chris Lattner <clattner@nondot.org> dated Fri Mar 19 21:22:15 2021 -0700. The change to the greedy rewriter driver picking a different order was made without adequate analysis of the trade-offs and experimentation. A change like this has far reaching consequences on transformation pipelines, and a major impact upstream and downstream. For eg., one can’t be sure that it doesn’t slow down a large number of cases by small amounts or create other issues. More discussion here: https://llvm.discourse.group/t/speeding-up-canonicalize/3015/25 Reverting this so that improvements to the traversal order can be made on a clean slate, in bigger steps, and higher bar. Differential Revision: https://reviews.llvm.org/D99329
-
David Green authored
If a WhileLoopStartLR is reverted due to calls in the preheader, we may still be able to instead create a DoLoopStart, preserving the low overhead loop. This adds code for that, only reverting the WhileLoopStartR to a Br/Cmp, leaving the rest of the low overhead loop in place. Differential Revision: https://reviews.llvm.org/D98413
-
Craig Topper authored
We look for this pattern frequently in isel patterns so its a good idea to try to preserve it. This also let's us remove our special isel handling for srliw and use a direct pattern match of (srl (and X, 0xffffffff), C) since no bits will be removed from the and mask. Differential Revision: https://reviews.llvm.org/D99042
-
- Mar 25, 2021
-
-
Abhina Sreeskantharajan authored
There was a new getFileOrSTDIN call added recently which was not included in my patch. https://reviews.llvm.org/D99110 I reordered the args to match the new order. Reviewed By: tunz Differential Revision: https://reviews.llvm.org/D99349
-
Yevgeny Rouban authored
The SCEV commit b46c085d [NFCI] SCEVExpander: emit intrinsics for integral {u,s}{min,max} SCEV expressions seems to reveal a new crash in SLPVectorizer. SLP crashes expecting a SelectInst as an externally used value but umin() call is found. The patch relaxes the assumption to make the IR flag propagation safe. Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D99328
-