- Jun 28, 2021
-
-
Kerry McLaughlin authored
Currently we will allow loops with a fixed width VF of 1 to vectorize if the -enable-strict-reductions flag is set. However, the loop vectorizer will not use ordered reductions if `VF.isScalar()` and the resulting vectorized loop will be out of order. This patch removes `VF.isVector()` when checking if ordered reductions should be used. Also, instead of converting the FAdds to reductions if the VF = 1, operands of the FAdds are changed such that the order is preserved. Reviewed By: david-arm Differential Revision: https://reviews.llvm.org/D104533
-
Florian Hahn authored
Sinking scalar operands into predicated-triangle regions may allow merging regions. This patch adds a VPlan-to-VPlan transform that tries to merge predicate-triangle regions after sinking. Reviewed By: Ayal Differential Revision: https://reviews.llvm.org/D100260
-
David Spickett authored
This test has always failed on 32 bit armv8 bots: https://lab.llvm.org/buildbot/#/builders/178/builds/42 Due to the output order of some symbols changing. I don't think this is an Arm specific issue so disabling on 32 bit while it's investigated.
-
Florian Mayer authored
Reviewed By: hctim, eugenis Differential Revision: https://reviews.llvm.org/D104787
-
Whisperity authored
-
LLVM GN Syncbot authored
-
Whisperity authored
[clang-tidy] Suppress reports to patternedly named parameters in 'bugprone-easily-swappable-parameters' While the original check's purpose is to identify potentially dangerous functions based on the parameter types (as identifier names do not mean anything when it comes to the language rules), unfortunately, such a plain interface check rule can be incredibly noisy. While the previous "filtering heuristic" is able to find many similar usages, there is an entire class of parameters that should not be warned about very easily mixed by that check: parameters that have a name and their name follows a pattern, e.g. `text1, text2, text3, ...`.` This patch implements a simple, but powerful rule, that allows us to detect such cases and ensure that no warnings are emitted for parameter sequences that follow a pattern, even if their types allow for them to be potentially mixed at a call site. Given a threshold `k`, warnings about two parameters are filtered from the result set if the names of the parameters are either prefixes or suffixes of each other, with at most k letters difference on the non-common end. (Assuming that the names themselves are at least `k` long.) - The above `text1, text2` is an example of this. (Live finding from Xerces.) - `LHS` and `RHS` are also fitting the bill here. (Live finding from... virtually any project.) - So does `Qmat, Tmat, Rmat`. (Live finding from I think OpenCV.) Reviewed By: aaron.ballman Differential Revision: http://reviews.llvm.org/D97297
-
Whisperity authored
[clang-tidy] Suppress reports to similarly used parameters in 'bugprone-easily-swappable-parameters' There are several types of functions and various reasons why some "swappable parameters" cannot be fixed with changing the parameters' types, etc. The most common example might be int `min(int a, int b)`... no matter what you do, the two parameters must remain the same type. The **filtering heuristic** implemented in this patch deals with trying to find such functions during the modelling and building of the swappable parameter range. If the parameter currently scrutinised matches either of the predicates below, it will be regarded as **not swappable** even if the type of the parameter matches. Reviewed By: aaron.ballman Differential Revision: http://reviews.llvm.org/D78652
-
Whisperity authored
[clang-tidy] Extend 'bugprone-easily-swappable-parameters' with mixability because of implicit conversions Adds a relaxation option ModelImplicitConversions which will make the check report for cases where parameters refer to types that are implicitly convertible to one another. Example: struct IntBox { IntBox(int); operator int(); }; void foo(int i, double d, IntBox ib) {} Implicit conversions are the last to model in the set of things that are reasons for the possibility of a function being called the wrong way which is not always immediately apparent when looking at the function (signature or call). Reviewed By: aaron.ballman, martong Differential Revision: http://reviews.llvm.org/D75041
-
Whisperity authored
[clang-tidy] Extend 'bugprone-easily-swappable-parameters' with optionally considering differently qualified types mixable Adds a relaxation option QualifiersMix which will make the check report for cases where parameters refer to the same type if they only differ in qualifiers. This makes cases, such as the following, not warned about by default, produce a warning. void* memcpy(void* dst, const void* src, unsigned size) {} However, unless people meticulously const their local variables, unfortunately, even such a function carry a potential swap: T* obj = new T; // Not const!!! void* buf = malloc(sizeof(T)); memcpy(obj, buf, sizeof(T)); // ^~~ ^~~ accidental swap here, even though the interface "specified" a const. Reviewed By: aaron.ballman Differential Revision: http://reviews.llvm.org/D96355
-
Whisperity authored
The base patch only deals with strict (canonical) type equality, which is merely a subset of all the dangerous function interfaces that we intend to find. In addition, in the base patch, canonical type equivalence is not diagnosed in a way that is immediately apparent to the user. This patch extends the check with two features: * Proper typedef diagnostics and explanations to the user. * "Reference bind power" matching. Case 2 is a necessary addition because in every case someone encounters a function `f(T t, const T& tr)`, any expression that might be passed to either can be passed to both. Thus, such adjacent parameter sequences should be matched. Reviewed By: aaron.ballman Differential Revision: http://reviews.llvm.org/D95736
-
Whisperity authored
Finds function definitions where parameters of convertible types follow each other directly, making call sites prone to calling the function with swapped (or badly ordered) arguments. Such constructs are usually the result of inefficient design and lack of exploitation of strong type capabilities that are possible in the language. This check finds and flags **function definitions** and **not** call sites! Reviewed By: aaron.ballman, alexfh Differential Revision: http://reviews.llvm.org/D69560
-
David Spickett authored
Our v7 Linux bots report the arch as "armv7l", not "armv7".
-
Tobias Gysi authored
After https://reviews.llvm.org/D104109, structured ops support scalar inputs. As a result, the capture mechanism meant to pass non-shaped parameters got redundant. The patch removes the capture semantics after the FillOp migrated to use scalar operands https://reviews.llvm.org/D104121. Differential Revision: https://reviews.llvm.org/D104785
-
David Green authored
This adds another small fold for extract of a vdup, between a i32 and a f32, converting to a BITCAST. This allows some extra folding to happen, simplifying the resulting code. Differential Revision: https://reviews.llvm.org/D104857
-
Igor Kudrin authored
The patch reuses the common code to print memory operand addresses as instruction comments. This helps to align the comments and enables using target-specific comment markers when `evaluateMemoryOperandAddress()` is implemented for them. Differential Revision: https://reviews.llvm.org/D104861
-
Igor Kudrin authored
This helps to avoid ambiguity when the address contains only digits 0..9. Differential Revision: https://reviews.llvm.org/D104909
-
Igor Kudrin authored
For now, the source variable locations are printed at about the same space as the comments for disassembled code, which can make some ranges for variables disappear if a line contains comments, for example: ┠─ bar = W1 0: add x0, x2, #2, lsl #12 // =8192┃ 4: add z31.d, z31.d, #65280 // =0xff00 8: nop ┻ The patch shifts the report a bit to allow printing comments up to approximately 16 characters without interferences. Differential Revision: https://reviews.llvm.org/D104700
-
Igor Kudrin authored
LLVM disassembler can generate comments for disassembled instructions. The patch enables printing these comments for 'llvm-objdump -d'. Differential Revision: https://reviews.llvm.org/D104699
-
Min-Yih Hsu authored
This reverts commit 8f43407a due to failure on its associated test.
-
Max Kazantsev authored
This reverts commit af03f7fb. Looks like the test is passing in some architectures. Reverting to green.
-
Max Kazantsev authored
-
Max Kazantsev authored
-
Max Kazantsev authored
We can exploit branches by `undef` condition. Frankly, the LangRef says that such branches are UB, so we can assume that all outgoing edges of such blocks are dead. However, from practical perspective, we know that this is not supported correctly in some other places. So we are being conservative about it. Branch by undef is treated in the following way: - If it is a loop-exiting branch, we always assume it exits the loop; - If not, we arbitrarily assume it takes `true` value. Differential Revision: https://reviews.llvm.org/D104689 Reviewed By: nikic
-
Jinsong Ji authored
Prototype ``` unsigned int __fetch_and_add (volatile unsigned int* addr, unsigned int val); unsigned long __fetch_and_addlp (volatile unsigned long* addr, unsigned long val); ``` Ref: https://www.ibm.com/docs/en/xl-c-and-cpp-linux/16.1.1?topic=functions-fetch Reviewed By: #powerpc, w2yehia, lkail Differential Revision: https://reviews.llvm.org/D104991
-
Muhammad Omair Javaid authored
cli-wrapper-mpxtable.cpp was emitting warnings from printfs of uint64_t on 32 bit arm build. This patch makes affected printfs in cli-wrapper-mpxtable.cpp portable accross targets variants.
-
Muhammad Omair Javaid authored
This test is again failing across multiple bots and passing on others there is no reliable way to enable it for some of the bots while disabling for the unsupported ones. Tagging it as unsupported across all types of Arm 32 bit cores.
-
Sushma Unnibhavi authored
Implementation of formal arguments lowering in the IRTranslator for the M68k backend Differential Revision: https://reviews.llvm.org/D104542
-
Muhammad Omair Javaid authored
This test has started passing consistently on 32bit arm where underlying core is reported as Armv7 or Thumbv7. However it still fails intermittently on 32bit AArch32 reported as Armv8l. https://lab.llvm.org/buildbot/#/builders/190/builds/20 https://lab.llvm.org/buildbot/#/builders/170/builds/41
-
- Jun 27, 2021
-
-
David Blaikie authored
-
David Blaikie authored
PR37255: DebugInfo: LTO with -g inlined into -gmlt combined with Split DWARF without CU cross-references A combination of features ^ that lead to a mismatch of expectations about how a subprogram definition DIE would be produced with/without a declaration when taking full -g debug info and inlining it into a -gmlt CU - specifically when using Split DWARF that doesn't support cross-CU references, so we have to put the -g debug info into the -gmlt CU, which gets confusing about which mode is respected. This patch comes down on respecting the CU the debug info is emitted into, rather than preserving the full debug info when it's emitted into the gmlt CU.
-
Craig Topper authored
We use (and (ctpop X), 1) to represent parity. The generated code for i32 parity on RV64 has more instructions than necessary which I hope to improve in a followup patch. Also add missing test for i64 ctpop.
-
Nathan Chancellor authored
After D104475 / D104658, building the Linux kernel with ThinLTO is broken: ld.lld: error: Unknown attribute kind (73) (Producer: 'LLVM13.0.0git' Reader: 'LLVM 13.0.0git') getAttrFromCode() has never handled this attribute so it is written during the ThinLTO phase but it cannot be handled during the linking phase. Add noprofile to getAttrFromCode() so that disassembly works properly. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D104995
-
Nikita Popov authored
Preserve address space when inserting i8* cast.
-
Nikita Popov authored
Preserve address space when generating the cast to i8*.
-
Craig Topper authored
Revert "[RISCV] Use zexti32/sexti32 in srliw/sraiw isel patterns to improve usage of those instructions." I thought this might help with another optimization I was thinking about, but I don't think it will. So it just wastes compile time calling computeKnownBits for no benefit. This reverts commit 81b2f959.
-
Nikita Popov authored
For the start shortening optimization, always use a i8 type for the GEP, as it is a raw offset calculation. Handling of non-i8* memset/memcpy arguments requires insertion of casts. These cases were previously miscompiled, as the offset calculation was performed on the wrong type.
-
Geoffrey Martin-Noble authored
Updates Bazel BUILD files for changes in https://github.com/llvm/llvm-project/commit/0813700de1 Differential Revision: https://reviews.llvm.org/D104990
-
Darwin Xu authored
This is a bug fix of https://bugs.llvm.org/show_bug.cgi?id=50116 Reviewed By: MyDeveloperDay Differential Revision: https://reviews.llvm.org/D104044
-
Nikita Popov authored
Apparently, it is legal to use memcpy/memset with pointer types other than i8*. Prior to 81fcdae6 this case was silently miscompiled, as the i8 offset calculation was performed on some other type. Now it would crash due to a type mismatch. Fix this by inserting an explicit bitcast to i8*.
-