- Mar 25, 2021
-
-
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
-
Petr Hosek authored
This reverts commit 72728e12 which broke libcxxabi tests under the runtimes build.
-
Martin Storsjö authored
This safeguards against cases if some of the env vars contain chars that are problematic for shells, e.g. if called with --env "X=Y;Z". (In cases of cross testing for windows, the PATH variable can end up specified with semicolon separators - even if specifying a PATH when cross testing in such differing environments might not make sense or do anything - but this makes ssh.py not break on such a variable.) Differential Revision: https://reviews.llvm.org/D99242
-
Martin Storsjö authored
Don't run the 'tar' tool in a cleared environment with only the LANG variable set, just set LANG on top of the existing environment. If the 'tar' tool is an MSYS based tool, running it in a Windows Container hangs if all environment variables are cleared - in particular, the USERPROFILE variable needs to be kept intact. This is the same issue fixed as was fixed in other places in 9de63b2e, but contrary to running the actual tests, running with an as-cleared-as-possible environment here is less important. Differential Revision: https://reviews.llvm.org/D99304
-
Craig Topper authored
-
Yolanda Chen authored
Add lld CSPGO (Contex-Sensitive PGO) options for COFF target. Reference the ELF options from https://reviews.llvm.org/D56675 Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D98763
-
Christopher Di Bella authored
The test wasn't previously testing this concept, but its base. Differential Revision: https://reviews.llvm.org/D99306
-
Chuanqi Xu authored
Summary: Add -fno-split-stack and rename CC1 option from `-split-stacks` to `-fsplit-stack`. Test Plan: check-all Differential Revision: https://reviews.llvm.org/D99245
-
Amara Emerson authored
This may occur when swifterror codegen in the translator generates these, but we shouldn't try to handle them since they should have regclasses anyway. rdar://75784009 Differential Revision: https://reviews.llvm.org/D99287
-
Serge Pavlov authored
Differential Revision: https://reviews.llvm.org/D98929
-
Craig Topper authored
This implements various idioms using ctlz/cttz like Log2, Log2_Ceil, findFirstSetBit, etc. Some of these demonstrate that we fail to use clzw because the idiom breaks the isel patterns we use. The isel pattern we use is (add (cttz (and X, 0xffffffff)), -32). Some of the idioms cause the constant on the add to be different.
-
Mehdi Amini authored
Define a `NoTerminator` traits that allows operations with a single block region to not provide a terminator In particular for Graph Regions, the terminator needs is just a historical artifact of the generalization of MLIR from CFG region. Operations like Module don't need a terminator, and before Module migrated to be an operation with region there wasn't any needed. To validate the feature, the ModuleOp is migrated to use this trait and the ModuleTerminator operation is deleted. This patch is likely to break clients, if you're in this case: - you may iterate on a ModuleOp with `getBody()->without_terminator()`, the solution is simple: just remove the ->without_terminator! - you created a builder with `Builder::atBlockTerminator(module_body)`, just use `Builder::atBlockEnd(module_body)` instead. - you were handling ModuleTerminator: it isn't needed anymore. - for generic code, a `Block::mayNotHaveTerminator()` may be used. Differential Revision: https://reviews.llvm.org/D98468
-
Craig Topper authored
We already created a DebugLoc at the top of the function. We can just use that one.
-
Fred Riss authored
The objc_debug_isa_class_mask magic value that the objc runtime vends is now initialized using a static initializer instead of a constant value. The runtime plugin itself will be initialized before the value is computed and as a result, the cache will get the wrong value. Making the creation of the NonPointerIsaCache fully lazy fixes this.
-
Jonas Devlieghere authored
-
Fangrui Song authored
-