- Aug 20, 2022
-
-
Martin Storsjö authored
Look for both kinds of slashes in include paths output from the compiler. Use "diff -w" to do a whitespace insensitive comparison, to ignore differences in line endings (the python script writes to stdout in text mode, with crlf newlines). Differential Revision: https://reviews.llvm.org/D129428
-
Philip Reames authored
-
Wei Yi Tee authored
Differential Revision: https://reviews.llvm.org/D132229
-
Rainer Orth authored
The `IR/AttributeTest.cpp` test fails to compile on Solaris: ``` /vol/llvm/src/llvm-project/local/mlir/unittests/IR/AttributeTest.cpp:223:36: error: no matching function for call to 'allocate' AttrT::get(type, "resource", UnmanagedAsmResourceBlob::allocate(data)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /vol/llvm/src/llvm-project/local/mlir/unittests/IR/AttributeTest.cpp:237:3: note: in instantiation of function template specialization 'checkNativeAccess<mlir::detail::DenseResourceElementsAttrBase<int8_t>, char>' requested here checkNativeAccess<AttrT, T>(builder.getContext(), llvm::makeArrayRef(data), ^ /vol/llvm/src/llvm-project/local/mlir/unittests/IR/AttributeTest.cpp:258:3: note: in instantiation of function template specialization 'checkNativeIntAccess<mlir::detail::DenseResourceElementsAttrBase<int8_t>, char>' requested here checkNativeIntAccess<DenseI8ResourceElementsAttr, int8_t>(builder, 8); ^ /vol/llvm/src/llvm-project/local/mlir/include/mlir/IR/AsmState.h:221:3: note: candidate template ignored: requirement '!std::is_same<char, char>::value' was not satisfied [with T = char] allocate(ArrayRef<T> data, bool dataIsMutable = false) { ^ /vol/llvm/src/llvm-project/local/mlir/include/mlir/IR/AsmState.h:214:26: note: candidate function not viable: requires at least 2 arguments, but 1 was provided static AsmResourceBlob allocate(ArrayRef<char> data, size_t align, ^ ``` Because `char` is `signed` by default on Solaris and `int8_t` is `char`. `std::is_same<int8_t, char>` is `true` unlike elsewhere, rejecting the one-arg `allocate` overload. Fixed by renaming the two overloads to avoid the ambiguity. Tested on `amd64-pc-solaris2.11` ,`sparcv9-sun-solaris2.11`, and `x86_64-pc-linux-gnu`. Differential Revision: https://reviews.llvm.org/D131148 -
Philip Reames authored
-
Aaron Ballman authored
We currently suggest that users not use an else clause after a return statement in a prior if branch. e.g., if (foo) return 1; else // Should remove this else clause return 10; however, this suggestion is incorrect for a constexpr if statement because one of the two branches will be a discarded statement and thus can impact template instantiation behavior. This updates the coding standard to make it clear that it's okay to have a return after an else in a constexpr if statement. I think this is an NFC change to the intent of the rule, which is why I've not started an RFC for the changes. Differential Revision: https://reviews.llvm.org/D132232
-
Nick Desaulniers authored
Test for a case we observed after the initial implementation of D129997 landed, in which case we observed a crash while building the ppc64le Linux kernel. In that case, we had one block with two exits, both to the same successor. Removing one of the exits corrupted the successor/predecessor lists. So when we have an INLINEASM_BR, check a few things for each indirect target: 1. that it exists. 2. that it is listed in our successors. 3. that its predecessor list contains the parent MBB of INLINEASM_BR. This would have caught the regression discovered after D129997 landed, after the pass that was problematic (early-tailduplication) rather than getting a stack trace in a later pass (regalloc) that doesn't understand the anomaly and crashes. Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D130290
-
Erich Keane authored
This reverts commit d483730d. This allegedly breaks a significant part of facebooks internal build. Reverting while we wait for them to provide a reproducer of this from @wlei.
-
Alex Bradbury authored
The hard float ABIs have a rule that if a flattened struct contains either a single fp value, or an int+fp, or fp+fp then it may be passed in a pair of registers (if sufficient GPRs+FPRs are available). detectFPCCEligibleStruct and the helper it calls, detectFPCCEligibleStructHelper examine the type of the argument/return value to determine if it complies with the requirements for this ABI rule. As reported in bug #57084, this logic produces incorrect results for C++ structs that inherit from other structs. This is because only the fields of the struct were examined, but enumerating RD->fields misses any fields in inherited C++ structs. This patch corrects that issue by adding appropriate logic to enumerate any included base structs. Differential Revision: https://reviews.llvm.org/D131677
-
Bill Wendling authored
Registers used for arguments are listed as "live-ins" into the starting basic block. This means we don't have to go through a potentially expensive search through all possible argument registers when we only care about used argument registers. Differential Revision: https://reviews.llvm.org/D132181
-
jeff authored
Certain address space dependent optimizations, like SeperateConstOffsetFromGEP, assume agreement between the address space of the recursive uses and the address space of the def. If this assumption is invalid, then optimizations may or may not be correct depending on properties of an address space for a given target, the address spaces of recursive uses, and the optimization being done. This patch infers the previous address space for flat_atomic ptr arguments. As a result, the address spaces of the uses in flat_atomic cases will agree with the address space in recursive defs. If this results in non-flat address space, then isel may infer a different intrinsic. For example, if the result is a flat_atomic using global address space, then it will be lowered to the corresponding global_atomic intrinsic. Change-Id: Ifcd981709dc2ea94d4acbcb84efe7176593ec8c7
-
Denis Antrushin authored
-
Michael Buch authored
This reverts commit ccb9d4d4. Reverts the associated tests
-
Simon Pilgrim authored
ymm instructions are double pumped on znver1 - noticed while trying to review size-latency costkinds numbers for D132216 Matches AMD 17h SOG / Agner / uops.info
-
Mats Petersson authored
Under some conditions, the defining op may be NULL, so accept that rahter than try to use it and crash! Adds test to prevent regression Fixes github issue #57201 Reviewed By: vzakhari Differential Revision: https://reviews.llvm.org/D132238
-
Chris Bieneman authored
When asserts are enabled a warning for implicit conversion from 64-bit to 32-bit integer occurs here.
-
Philip Reames authored
Add vector costs for ceil/floor/trunc/round. As can be seen in the tests, the prior default costs were a significant under estimate of the actual code generated. These costs are computed by simply generating code with the current backend, and then counting the number of instructions. I discount one vsetvli, and ignore the return. Differential Revision: https://reviews.llvm.org/D131967
-
Michael Buch authored
This reverts commit ccb9d4d4. https://reviews.llvm.org/D131758 Differential Revision: https://reviews.llvm.org/D132250
-
Saleem Abdulrasool authored
This does *NOT* change the emitted section flags in any way. This only impacts the internal classification of sections. Extend the section classification in LLVM for ELF targets. This has one important change: we now classify sections as text by default rather than readonly. This matches the behaviour for GAS better. Ensure that any section that has a writable attribute set is not treated as readonly. We also special case any section named `.debug_` which is reserved for DWARF as metadata. In the case none of the attributes are set (or because no attributes were provided), consult the section name for classification. We match the well known names and classify the section accordingly. Any remaining section is now classified as text. This change allows us to classify sections in the MC layer more precisely which is needed for subsequent changes for handling target specific behaviour. Differential Revision: https://reviews.llvm.org/D131270 Reviewed By: @echristo
-
Simon Pilgrim authored
-
Sanjay Patel authored
These may raise an error (set errno) as discussed in the post-commit comments for D127964, so we can't fold away the call and potentially alter that behavior.
-
Adrian Prantl authored
This reverts commit 7aadecae. I'm reverting this commit because it appears to break the green dragon incremental LLDB bot. https://reviews.llvm.org/D131758 See LLDB Incremental buildbot: https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/46215/execution/node/70/log/
-
Adrian Prantl authored
This reverts commit d38985a3. because I'm also reverting D131758.
-
Sanjay Patel authored
-
Adrian Prantl authored
The absolute value of 0x8000000000000000 does not fit into an int64_t and UBSan tells us that by crashing. rdar://98799670 Differential Revision: https://reviews.llvm.org/D132194
-
Craig Topper authored
Reviewed By: reames Differential Revision: https://reviews.llvm.org/D132197
-
isuckatcs authored
This patch adds a ProgramPointTag to the EpsilonPoint created before we replay a call without inlining. Differential Revision: https://reviews.llvm.org/D132246
-
Denis Fatkulin authored
Unresolved member expressions aren't indexed as references. Example code: ``` struct Foo { template <typename T> void bar(T t); }; template <typename T> void test(Foo F, T t) { F.bar(t); // Not indexed } ``` Reviewed By: hokein Differential Revision: https://reviews.llvm.org/D131091
-
- Aug 19, 2022
-
-
Craig Topper authored
Use it to the fix a bug in the fceil/ffloor lowerings. We were setting the passthru to IMPLICIT_DEF before and using a mask agnostic policy. This means where the incoming bits in the mask were 0 they could be anything in the outgoing mask. We want those bits in the outgoing mask to be 0. This means we need to pass the input mask as the passthru. This generates worse code because we are unable to allocate the v0 register to the output due to an earlyclobber constraint. We probably need a special TIED pseudoinstruction and probably custom isel since you can't use V0 twice in the input pattern. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D132058
-
Craig Topper authored
I have a couple data points that some microarchitectures prefer the immediate 0 over x0. Does anyone know of microarchitectures where the opposite is true? Unfortunately, this is different than the vncvt.x.x.w alias from the spec. Perhaps the alias was poorly chosen if x0 isn't as optimal as immediate 0 on all microarchitectures. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D132041
-
Alexey Bataev authored
SLP vectorizer tries to find the reductions starting the operands of the instructions with no-users/void returns/etc. But such operands can be postponable instructions, like Cmp, InsertElement or InsertValue. Such operands still must be postponed, vectorizer should not try to vectorize them immediately. Differential Revision: https://reviews.llvm.org/D131965
-
Guillaume Chatelet authored
Differential Revision: https://reviews.llvm.org/D132121
-
Christopher Bate authored
This change adds a new AffineDelinearizeIndexOp to the affine dialect. The operation accepts an index type as well as a basis (array of index values) representing how the index should be decomposed into a multi-index. The decomposition obeys a canonical semantic that treats the final basis element as "fastest varying" and the first basis element as "slowest varying". A naive lowering of the operation using a sequence of AffineApplyOps is given. RFC was discussed on discourse here: https://discourse.llvm.org/t/rfc-tensor-extracting-slices-from-tensor-collapse-shape/64034 Reviewed By: bondhugula, nicolasvasilache Differential Revision: https://reviews.llvm.org/D131997
-
Alexey Bataev authored
In many cases constant buildvector results in a vector load from a constant/data pool. Need to consider this cost too. Differential Revision: https://reviews.llvm.org/D126885
-
Guillaume Chatelet authored
This reverts commit 4d931b6e.
-
Wei Yi Tee authored
Differential Revision: https://reviews.llvm.org/D131891
-
Sam McCall authored
Previously we were calling glrRecover() ad-hoc at the end of input. Two main problems with this: - glrRecover() on two separate code paths is inelegant - We may have to recover several times in succession (e.g. to exit from nested scopes), so we need a loop at end-of-file Having an actual shift action for an EOF terminal allows us to handle both concerns in the main shift/recover/reduce loop. This revealed a recovery design bug where recovery could enter a loop by repeatedly choosing the same parent to identically recover from. Addressed this by allowing each node to be used as a recovery base once. Differential Revision: https://reviews.llvm.org/D130550
-
Guillaume Chatelet authored
Differential Revision: https://reviews.llvm.org/D132121
-
Muhammad Usman Shahid authored
The patch mainly focuses on the no warnings for -Wtautological-compare. It work fine for the positive numbers but doesn't for the negative numbers. This is because the warning explicitly checks for an IntegerLiteral AST node, but -1 is represented by a UnaryOperator with an IntegerLiteral sub-Expr. Fixes #42918 Differential Revision: https://reviews.llvm.org/D130510
-
Alexey Bataev authored
Added OperandValueKind OpdInfo parameter to getMemoryOpCost functions to better estimate cost with immediate values. Part of D126885.
-