- Oct 21, 2020
-
-
Wang, Pengfei authored
-
Alex Zinenko authored
Docstrings for `__str__` method in many classes was recycling the constant string defined for `Type`, without being types themselves. Use proper docstrings instead. Since they are succint, use string literals instead of top-level constants to avoid further mistakes. Differential Revision: https://reviews.llvm.org/D89780
-
Alex Zinenko authored
The pybind class typedef for concrete attribute classes was erroneously deriving all of them from PyAttribute instead of the provided base class. This has not been triggering any error because only one level of the hierarchy is currently exposed. Differential Revision: https://reviews.llvm.org/D89779
-
Alex Zinenko authored
Values are ubiquitous in the IR, in particular block argument and operation results are Values. Define Python classes for BlockArgument, OpResult and their common ancestor Value. Define pseudo-container classes for lists of block arguments and operation results, and use these containers to access the corresponding values in blocks and operations. Differential Revision: https://reviews.llvm.org/D89778
-
Craig Topper authored
Addresses post-commit feedback from D89837.
-
David Sherwood authored
We were previously relying upon the TypeSize comparison operators to obtain the maximum size of two types, however use of such operators is being deprecated in favour of making the caller aware that it could be dealing with scalable vector types. I have changed the code to assert that the two types have the same scalable property and thus we can simply take the maximum of the known minimum sizes instead. Differential Revision: https://reviews.llvm.org/D88563
-
David Sherwood authored
The EXPECT_XY comparison functions all rely upon using the existing TypeSize comparison operators, which we are deprecating in favour of isKnownXY. I've changed all such cases to compare either the known minimum size or the fixed size. Differential Revision: https://reviews.llvm.org/D89531
-
Martin Storsjö authored
Split the resolution check to a separate test, which is marked as unsupported on windows. On windows (both with MS STL and libstdc++), the file time has 100 ns resolution; the standard doesn't mandate a specific resolution. Differential Revision: https://reviews.llvm.org/D89535
-
Martin Storsjö authored
Revert "[InstCombine] Add or((icmp ult/ule (A + C1), C3), (icmp ult/ule (A + C2), C3)) uniform vector support" Also revert "[InstCombine] foldOrOfICmps - use m_Specific instead of explicit comparisons. NFCI." to make the primarily intended revert work. This reverts commits ce135497 and e372a5f8. This commit caused failed asserts e.g. like this: $ cat repro.cpp bool a(char b) { return b >= '0' && b <= '9' || (b | 32) >= 'a' && (b | 32) <= 'z'; $ clang++ -target x86_64-linux-gnu -c -O2 repro.cpp clang++: ../include/llvm/ADT/APInt.h:1151: bool llvm::APInt::operator==(const llvm::APInt&) const: Assertion `BitWidth == RHS.BitWidth && "Comparison requires equal bit widths"' failed.
-
Esme-Yi authored
-
Max Kazantsev authored
This reverts commit 80852a4f. Test is now broken because underlying required patch was also reverted SUDDENLY.
-
Max Kazantsev authored
When we need to prove implication of expressions of different type width, the default strategy is to widen everything to wider type and prove in this type. This does not interact well with AddRecs with negative steps and unsigned predicates: such AddRec will likely not have a `nuw` flag, and its `zext` to wider type will not be an AddRec. In contraty, `trunc` of an AddRec in some cases can easily be proved to be an `AddRec` too. This patch introduces an alternative way to handling implications of different type widths. If we can prove that wider type values actually fit in the narrow type, we truncate them and prove the implication in narrow type. Differential Revision: https://reviews.llvm.org/D89548 Reviewed By: fhahn
-
Craig Topper authored
[X86] Error on using h-registers with REX prefix in the assembler instead of leaving it to a fatal error in the encoder. Using a fatal error is bad for user experience. Reviewed By: pengfei Differential Revision: https://reviews.llvm.org/D89837
-
Fangrui Song authored
Revert D89381 "[SCEV] Recommit "Use nw flag and symbolic iteration count to sharpen ranges of AddRecs", attempt 2" This reverts commit a10a64e7. It broke polly/test/ScopInfo/NonAffine/non-affine-loop-condition-dependent-access_3.ll The difference suggests that this may be a serious issue.
-
Mircea Trofin authored
Differential Revision: https://reviews.llvm.org/D89815
-
Geoffrey Martin-Noble authored
This was introduced in https://reviews.llvm.org/D89774, but I don't think it should be necessary. Reviewed By: TaWeiTu, aeubanks Differential Revision: https://reviews.llvm.org/D89843
-
Carl Ritson authored
-
Fangrui Song authored
-
TaWeiTu authored
-
Fangrui Song authored
-
Cyndy Ishida authored
It appears for Swift there was confusing errors when trying to parse APINotes, when libAPINotes and libInterfaceStub are linked, they both export symbol `__ZN4llvm4yaml7yamlizeINS_12VersionTupleEEENSt3__19enable_ifIXsr16has_ScalarTraitsIT_EE5valueEvE4typeERNS0_2IOERS5_bRNS0_12EmptyContextE`, and discovered same symbol defined within llvm-ifs. This consolidates the boilerplate into YAMLTraits and defers the specific validation in reading the whole input. fixes: rdar://problem/70450563 Reviewed By: phosek, dblaikie Differential Revision: https://reviews.llvm.org/D89764
-
Duncan P. N. Exon Smith authored
As suggested in the review for https://reviews.llvm.org/D89430, simplify the logic for marking the buffer as invalid in the early return paths. Differential Revision: https://reviews.llvm.org/D89722
-
Jonas Devlieghere authored
The framework build will run dsymutil after LLDB.framework is installed.
-
Peter Steinfeld authored
When processing declarations in resolve-names.cpp, we were returning a symbol that had SubprogramName details to PushSubprogramScope(), which expects a symbol with Subprogram details. I adjusted the code and added a test. Differential Revision: https://reviews.llvm.org/D89829
-
Duncan P. N. Exon Smith authored
This changes `ContentCache::Buffer` to use `std::unique_ptr<MemoryBuffer>` instead of the `PointerIntPair`. It drops the (mostly unused) `DoNotFree` bit, instead creating a (new) non-owning `MemoryBuffer` instance when passed a `MemoryBufferRef`. Differential Revision: https://reviews.llvm.org/D67030
-
Hubert Tong authored
Comparing 32-bit `ptrdiff_t` against 32-bit `unsigned` results in `-Wsign-compare` warnings for both GCC and Clang. The warning for the cases in question appear to identify an issue where the `ptrdiff_t` value would be mutated via conversion to an unsigned type. The warning is resolved by using the usual arithmetic conversions to safely preserve the value of the `unsigned` operand while trying to convert to a signed type. Host platforms where `unsigned` has the same width as `unsigned long long` will need to make a different change, but using an explicit cast has disadvantages that can be avoided for now. Reviewed By: dantrushin Differential Revision: https://reviews.llvm.org/D89612
-
Richard Smith authored
when instantiating the enclosing class. We'll build new lambda closure types if and when we instantiate the default member initializer, and instantiating the closure type by itself can go wrong in cases where we fully-instantiate nested classes (in explicit instantiations of the enclosing class and when the enclosing class is a local class) -- we will instantiate the 'operator()' as a regular function rather than as a lambda call operator, so it doesn't get to use its captures, has the wrong 'this' type, etc.
-
Austin Kerbow authored
Passes that are run after the post-RA scheduler may insert instructions like waitcnt which eliminate the need for certain noops. After this patch the scheduler is still aware of possible latency from hazards but noops will not be inserted until the dedicated hazard recognizer pass is run. Depends on D89753. Reviewed By: foad Differential Revision: https://reviews.llvm.org/D89754
-
Austin Kerbow authored
If a target can encode multiple wait-states into a noop allow emitting such instructions directly. Reviewed By: rampitec, dmgreen Differential Revision: https://reviews.llvm.org/D89753
-
Richard Smith authored
Permitting non-standards-driven "do the best you can" constant-folding of array bounds is permitted solely as a GNU compatibility feature. We should not be doing it in any language mode that is attempting to be conforming. From https://reviews.llvm.org/D20090 it appears the intent here was to permit `__constant int` globals to be used in array bounds, but the change in that patch only added half of the functionality necessary to support that in the constant evaluator. This patch adds the other half of the functionality and turns off constant folding for array bounds in OpenCL. I couldn't find any spec justification for accepting the kinds of cases that D20090 accepts, so a reference to where in the OpenCL specification this is permitted would be useful. Note that this change also affects the code generation in one test: because after 'const int n = 0' we now treat 'n' as a constant expression with value 0, it's now a null pointer, so '(local int *)n' forms a null pointer rather than a zero pointer. Reviewed By: Anastasia Differential Revision: https://reviews.llvm.org/D89520
-
Sriraman Tallam authored
With -fbasicblock-sections=, let the front-end handle the case where the file doesnt exist. The driver only checks if the option syntax is right. Differential Revision: https://reviews.llvm.org/D89500
-
Duncan P. N. Exon Smith authored
Move a flag out of the `MemoryBuffer*` to unblock changing it to a `unique_ptr`. There are plenty of bits available in the bitfield below. Differential Revision: https://reviews.llvm.org/D89431
-
Michael Kruse authored
Recursively traversing the operand tree leads to an exponential blowup if instructions are used multiple times due to every path leading to an additional copy of the instructions after forwarding. This problem was marked as a TODO in the code and was reported as a bug in llvm.org/PR47340. Fix by caching already visited instructions and returning the cached version when already visited. Instead of calling forwardTree() twice, return a ForwardingAction structure that contains a lambda which will carry-out the forwarding when requested. The lambdas are executed in reverse-postorder to mimic the previous recursive calls unless there is a reuse. Fixes llvm.org/PR47340
-
Kostya Kortchinsky authored
Few changes wrt utilities: - split `Check` into a platform agnostic condition test and a platform specific termination, for which we introduce the function `die`. - add a platform agnostic `utilities.cpp` that gets the allocation alignment functions original in the platform specific file, as they are reusable by all platforms. Differential Revision: https://reviews.llvm.org/D89811
-
Tony authored
Change waitcnt insertion to check the memory operand tokens to see if flat memory operations access VMEM in the same way it does to check if accessing LDS. This avoids adding waitcnt for counters for address spaces that are not accessed. In addition, only generate the pessimistic waitcnt 0 if a flat memory operation appears to access both VMEM and LDS. This benefits flat memory operations that explicitly specify the address space as GLOBAL or LOCAL. Differential Revision: https://reviews.llvm.org/D89618
-
Craig Topper authored
Instead of handling before parsing, just fix it after parsing.
-
Craig Topper authored
[X86] Move 's{hr,ar,hl} , <op>' to 'shift <op>' optimization in the assembler into processInstruction. Instead of detecting the mnemonic and hacking the operands before parsing. Just fix it up after parsing. -
Louis Dionne authored
-
Duncan P. N. Exon Smith authored
Inline `Source::getBufferPointer` into its only remaining caller, `getBufferOrNone`. No functionality change. Differential Revision: https://reviews.llvm.org/D89430
-