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
-
-
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
-
Nathan James authored
Both the mpi-type-mismatch and mpi-buffer-deref check make use of a static MPIFunctionClassifier object. This causes issue as the classifier is initialized with the first ASTContext that produces a match. If the check is enabled on multiple translation units in a single clang-tidy process, this classifier won't be reinitialized for each TU. I'm not an expert in the MPIFunctionClassifier but I'd imagine this is a source of UB. It is suspected that this bug may result in the crash caused here: https://bugs.llvm.org/show_bug.cgi?id=48985. However even if not the case, this should still be addressed. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D98275
-
Sven van Haastregt authored
-
Jamie Schmeiser authored
Summary: The colour characters currently added to the output of -print-changed=diff and -print-changed=diff-quiet cause difficulties when capturing the output and examining it in an editor. Change the function to not have the colour characters and add 2 new choices (-print-changed=cdiff and -print-changed=cdiff-quiet) to retain the existing functionality of adding the colour characters. Author: Jamie Schmeiser <schmeise@ca.ibm.com> Reviewed By: aeubanks (Arthur Eubanks) yrouban (Yevgeny Rouban) Differential Revision: https://reviews.llvm.org/D97398
-
Arthur O'Dwyer authored
This refactor is not only a good idea, but is in fact required by the standard, in the sense that <array> is mandated to include <compare>. So <compare> shouldn't have a circular dependency on <array>! Differential Revision: https://reviews.llvm.org/D99307
-
Arthur O'Dwyer authored
This completes the implementation of P1032's changes to <iterator>, <string_view>, <tuple>, and <utility> in C++20. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1032r1.html Drive-by fix a couple of unintended rvalues in "*iterators*/*.fail.cpp". Differential Revision: https://reviews.llvm.org/D96385
-
Kerry McLaughlin authored
D95598 added a cost model for broadcast shuffle, which should enable loops such as the following to vectorize, where the load of b[42] is invariant and can be done using a scalar load + splat: for (int i=0; i<n; ++i) a[i] = b[i] + b[42]; This patch adds tests to verify that we can vectorize such loops. Reviewed By: joechrisellis Differential Revision: https://reviews.llvm.org/D98506
-
Matt Morehouse authored
Userspace page aliasing allows us to use middle pointer bits for tags without untagging them before syscalls or accesses. This should enable easier experimentation with HWASan on x86_64 platforms. Currently stack, global, and secondary heap tagging are unsupported. Only primary heap allocations get tagged. Note that aliasing mode will not work properly in the presence of fork(), since heap memory will be shared between the parent and child processes. This mode is non-ideal; we expect Intel LAM to enable full HWASan support on x86_64 in the future. Reviewed By: vitalybuka, eugenis Differential Revision: https://reviews.llvm.org/D98875
-
Abhina Sreeskantharajan authored
In future patches I will be setting the IsText parameter frequently so I will refactor the args to be in the following order. I have removed the FileSize parameter because it is never used. ``` static ErrorOr<std::unique_ptr<MemoryBuffer>> getFile(const Twine &Filename, bool IsText = false, bool RequiresNullTerminator = true, bool IsVolatile = false); static ErrorOr<std::unique_ptr<MemoryBuffer>> getFileOrSTDIN(const Twine &Filename, bool IsText = false, bool RequiresNullTerminator = true); static ErrorOr<std::unique_ptr<MB>> getFileAux(const Twine &Filename, uint64_t MapSize, uint64_t Offset, bool IsText, bool RequiresNullTerminator, bool IsVolatile); static ErrorOr<std::unique_ptr<WritableMemoryBuffer>> getFile(const Twine &Filename, bool IsVolatile = false); ``` Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D99182
-
Alexander Lanin authored
Replaces Token based approach to identify EndLoc of Stmt with AST traversal. This also improves handling of macros. Fixes Bugs 22785, 25970 and 35754.
-
Abhina Sreeskantharajan authored
This patch sets the OF_Text flag correctly for the csv file. Reviewed By: anirudhp Differential Revision: https://reviews.llvm.org/D99285
-
Alexey Bataev authored
We do not need to scan further if the upper end or lower end of the basic block is reached already and the instruction is not found. It means that the instruction is definitely in the lower part of basic block or in the upper block relatively. This should improve compile time for the very big basic blocks. Differential Revision: https://reviews.llvm.org/D99266
-
Djordje Todorovic authored
In order to test the preservation of the original Debug Info metadata in your projects, a front end option could be very useful, since users usually report that a concrete entity (e.g. variable x, or function fn2()) is missing debug info. The [0] is an example of running the utility on GDB Project. This depends on: D82546 and D82545. Differential Revision: https://reviews.llvm.org/D82547
-
Simon Pilgrim authored
-
Simon Pilgrim authored
I'm intending to add additional coverage based off computeKnownBits/ComputeNumSignBits as suggested by PR45897
-
Fraser Cormack authored
This patch adds a small optimization for vector shuffle lowering, detecting shuffles which can be re-expressed as vector selects. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D99270
-
Nemanja Ivanovic authored
Before we unified the names of the builtins across all the compilers, there were a number of synonyms between them. There is code out there that uses XL naming for some of these loads and stores. This just adds those names.
-
Sameer Sahasrabuddhe authored
Unswitching a loop on a non-trivial divergent branch is expensive since it serializes the execution of both version of the loop. But identifying a divergent branch needs divergence analysis, which is a function level analysis. The legacy pass manager handles this dependency by isolating such a loop transform and rerunning the required function analyses. This functionality is currently missing in the new pass manager, and there is no safe way for the SimpleLoopUnswitch pass to depend on DivergenceAnalysis. So we conservatively assume that all non-trivial branches are divergent if the target has divergence. Reviewed By: tra Differential Revision: https://reviews.llvm.org/D98958
-
Fraser Cormack authored
-
Fraser Cormack authored
This patch adds further optimization techniques to RVV BUILD_VECTOR lowering. It teaches the compiler to find splats of larger vector element types "hidden" in smaller ones. For example, a v4i8 build_vector (0x1, 0x2, 0x1, 0x2) could be splat as v2i16 0x0201. This is generally more optimal than the dominant-element BUILD_VECTORs and so takes priority. This optimization is currently limited to all-constant-or-undef BUILD_VECTORs as those were found to be the most common. There's no reason this couldn't be extended to other BUILD_VECTORs, but the additional bit-manipulation instructions may require more sophisticated heuristics. There are some cases where the materialization of the larger constant takes more scalar instructions than it does to build the vector with vector instructions. We could add heuristics to try and catch this. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D99195
-
Simon Pilgrim authored
Until AVX512 we don't have any vector truncation instructions, and always lower using shuffles instead. combineVectorTruncation performs this earlier than lowering as it makes it easier to use any sign/zero-extended bits in the truncated bits with PACKSS/PACKUS to perform the shuffle. We currently don't attempt to use combineVectorTruncation on AVX2 targets as in the past 256-bit PACKSS/PACKUS tended to cause 128-bit lane shuffle regressions - but these should now be all resolved with combineHorizOpWithShuffle and in all cases we now reduce the amount of cross-lane shuffling and variable shuffle mask usage. Differential Revision: https://reviews.llvm.org/D96609
-
Simon Pilgrim authored
LowerVSETCC calls splitIntVSETCC after canonicalizing certain patterns, in particular (X & CPow2 != 0) -> (X & CPow2 == CPow2). Unfortunately if we're splitting for AVX1/non-AVX512BW cases, we lose these canonicalizations as we call the split with the original SetCC node, and when the split nodes are later lowered in LowerVSETCC the patterns are lost behind extract_subvector etc. But if we pass the canonicalized operands for splitting we retain the optimizations. Differential Revision: https://reviews.llvm.org/D99256
-
Krasimir Georgiev authored
Commit https://github.com/llvm/llvm-project/commit/f7f9f94b2e2b4c714bac9036f6b73a3df42daaff changed the indent of ObjC method arguments from +4 to +2, if the method occurs after a block statement. I believe this was unintentional and there was insufficient ObjC test coverage to catch this. Example: `clang-format -style=google test.mm` before: ``` void aaaaaaaaaaaaaaaaaaaaa(int c) { if (c) { f(); } [dddddddddddddddddddddddddddddddddddddddddddddddddddddddd eeeeeeeeeeeeeeeeeeeeeeeeeeeee:^(fffffffffffffff gggggggg) { f(SSSSS, c); }]; } ``` after: ``` void aaaaaaaaaaaaaaaaaaaaa(int c) { if (c) { f(); } [dddddddddddddddddddddddddddddddddddddddddddddddddddddddd eeeeeeeeeeeeeeeeeeeeeeeeeeeee:^(fffffffffffffff gggggggg) { f(SSSSS, c); }]; } ``` Differential Revision: https://reviews.llvm.org/D99063
-
Raphael Isemann authored
This currently fails when we get the module for `[vdso]` which doesn't have any parsing event associated with it as it's just created from memory.
-
Kiran Chandramohan authored
Pass the context while creating the Patternslist.
-
Vladislav Vinogradov authored
Compose multiple AffineMaps into single map before strides extraction. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D99166
-
Jean Perier authored
In case an operation in a global initializer region refers to another global variable defined afterwards in the module of itself, translation to LLVM IR was currently crashing because it could not find the LLVM IR global when going through the initializer block. To solve this problem, split global conversion to LLVM IR into two passes. A first pass that creates LLVM IR global variables, and a second one that converts the initializer, if any, and adds it to the llvm global. Differential Revision: https://reviews.llvm.org/D99246
-