- Sep 28, 2020
-
-
Simon Pilgrim authored
Fixes minor bug in D88402 where we were using the original shift constant (with undefs) instead of one with the splat values (re)splatted to all elements.
-
Sam Parker authored
Create a DCE function that accepts an instruction.
-
Jay Foad authored
-
Georgii Rymar authored
This is a part of https://bugs.llvm.org/show_bug.cgi?id=47581. We have the following computation: ``` (1) uint64_t Location = Address & 0x7fffffff; (2) if (Location & 0x04000000) (3) Location |= (uint64_t) ~0x7fffffff; (4) return Location + Place; ``` At line 2 there is a mistype. The constant should be `0x40000000`, not `0x04000000`, because the intention here is to sign extend the `Location`, which is the 31 bit signed value. Differential revision: https://reviews.llvm.org/D88407
-
Alexander Kornienko authored
This adds a pair of overloads for create(MainFile)?IncludeInsertion methods that use the presence of the <> in the file name to control whether the #include directive will use angle brackets or quotes. Motivating examples: https://reviews.llvm.org/D82089#inline-789412 and https://github.com/llvm/llvm-project/blob/master/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp#L433 The overloads with the IsAngled parameter can be removed after the users are updated. Update usages of createIncludeInsertion. Update (almost all) usages of createMainFileIncludeInsertion. Reviewed By: hokein Differential Revision: https://reviews.llvm.org/D85666
-
Haojian Wu authored
The "no member" diagnostic is likely bogus. Reviewed By: sammccall, #libc Differential Revision: https://reviews.llvm.org/D86765
-
Sjoerd Meijer authored
We have been running tests/benchmarks downstream with tail-predication enabled for some time now and this behaves as expected: we are not aware of any correctness issues, and this performs better across the board than with tail-predication disabled. Time to flip the switch! Differential Revision: https://reviews.llvm.org/D88093
-
Simon Pilgrim authored
An extension to D87452, we can safely permit undefs in the uniform/splat detection https://alive2.llvm.org/ce/z/nT-ptN Differential Revision: https://reviews.llvm.org/D88402
-
Florian Hahn authored
Similar to collecting information from branches guarding a loop, we can also collect information from assumes dominating the loop header. Fixes PR47247. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D87854
-
Daniel Kiss authored
Flags of the module derived exclusively from the compiler flag `-mbranch-protection`. The note is generated based on the module flags accordingly. After this change in case of compile unit without function won't have the .note.gnu.property if the compiler flag is not present [1]. [1] https://bugs.llvm.org/show_bug.cgi?id=46480 Reviewed By: chill Differential Revision: https://reviews.llvm.org/D80791
-
Simon Pilgrim authored
A while ago, we converted isShuffleEquivalent/isTargetShuffleEquivalent to both use IsElementEquivalent internally. This allows us to make the shuffle args optional like isTargetShuffleEquivalent and update foldShuffleOfHorizOp to use isShuffleEquivalent (which it should as its using a ISD::VECTOR_SHUFFLE mask).
-
Simon Pilgrim authored
Add an additional isUndefOrEqual variant that matches an entire mask, not just a single value.
-
LLVM GN Syncbot authored
-
Tadeo Kondrak authored
Add a tweak that populates an empty switch statement of an enumeration type with all of the enumerators of that type. Before: ``` enum Color { RED, GREEN, BLUE }; void f(Color color) { switch (color) {} } ``` After: ``` enum Color { RED, GREEN, BLUE }; void f(Color color) { switch (color) { case RED: case GREEN: case BLUE: break; } } ``` Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D88383 -
Raphael Isemann authored
Using llvm::None and `contains` instead of `find`.
-
Qiu Chaofan authored
According to POWER ISA, floating point instructions altering exception bits in FPSCR should be 'may raise FP exception'. (excluding those read or write the whole FPSCR directly, like mffs/mtfsf) We need to model FPSCR well in future patches to handle the special case properly. Instructions added mayRaiseFPException: - fre(s)/frsqrte(s) - fmadd(s)/fmsub(s)/fnmadd(s)/fnmsub(s) - xscmpoqp/xscmpuqp/xscmpeqdp/xscmpgedp/xscmpgtdp - xscvdphp/xscvhpdp/xvcvhpsp/xvcvsphp/xsrqpxp - xsmaxcdp/xsincdp/xsmaxjdp/xsminjdp Instructions removed mayRaiseFPException: - xstdivdp/xvtdiv(d|s)p/xstsqrtdp/xvtsqrt(d|s)p - xsabsdp/xsnabsdp/xvabs(d|s)p/xvnabs(d|s)p - xsnegdp/xscpsgndp/xvneg(d|s)p/xvcpsgn(d|s)p - xvcvsxwdp/xvcvuxwdp - xscvdpspn/xscvspdpn Reviewed By: steven.zhang Differential Revision: https://reviews.llvm.org/D87738
-
Jay Foad authored
Differential Revision: https://reviews.llvm.org/D88246
-
Jay Foad authored
This tends to increase code size but more importantly it reduces vgpr usage, and could avoid costly readfirstlanes if the result needs to be in an sgpr. Differential Revision: https://reviews.llvm.org/D88245
-
Jay Foad authored
This is in preparation for making the GCN patterns divergence-aware. NFC. Differential Revision: https://reviews.llvm.org/D88244
-
Simon Pilgrim authored
-
Georgii Rymar authored
This adds the support for SHT_ARM_EXIDX sections to obj2yaml/yaml2obj tools. SHT_ARM_EXIDX is a ARM specific index table filled with entries. Each entry consists of two 4-bytes values (words). (https://developer.arm.com/documentation/ihi0038/c/?lang=en#index-table-entries) Differential revision: https://reviews.llvm.org/D88228
-
Raphael Isemann authored
With the recent patches to the ASTImporter that improve template type importing (D87444), most of the import-std-module tests can now finally import the type of the STL container they are testing. This patch removes most of the casts that were added to simplify types to something the ASTImporter can import (for example, std::vector<int>::size_type was casted to `size_t` until now). Also adds the missing tests that require referencing the container type (for example simply printing the whole container) as here we couldn't use a casting workaround. The only casts that remain are in the forward_list tests that reference the iterator and the stack test. Both tests are still failing to import the respective container type correctly (or crash while trying to import).
-
Georgii Rymar authored
Currently we are always recognizing the `SHT_MIPS_ABIFLAGS` section, even on non-MIPS targets. The problem of doing this is briefly discussed in D88228 which does the same for `SHT_ARM_EXIDX`: "The problem is that `SHT_ARM_EXIDX` shares the value with `SHT_X86_64_UNWIND (0x70000001U)`. We might have other machine specific conflicts, e.g. `SHT_ARM_ATTRIBUTES` vs `SHT_MSP430_ATTRIBUTES` vs `SHT_RISCV_ATTRIBUTES (0x70000003U)`." I think we should only recognize target specific sections when the machine type matches. I.e. `SHT_MIPS_*` should be recognized only on `MIPS`, `SHT_ARM_*` only on `ARM` etc. This patch stops recognizing `SHT_MIPS_ABIFLAGS` on `non-MIPS` targets. Note: I had to update `ScalarEnumerationTraits<ELFYAML::MIPS_ISA>::enumeration`, because otherwise test crashes, calling `llvm_unreachable`. Differential revision: https://reviews.llvm.org/D88294
-
Benjamin Kramer authored
-
Sjoerd Meijer authored
This is a reimplementation of the overflow checks for the elementcount, i.e. the 2nd argument of intrinsic get.active.lane.mask. The element count is lowered in each iteration of the tail-predicated loop, and we must prove that this expression doesn't overflow. Many thanks to Eli Friedman and Sam Parker for all their help with this work. Differential Revision: https://reviews.llvm.org/D88086
-
David Green authored
9d9a11c7 added this check for predicatable instructions between the D/WLSTP and the loop's start, but it was missing the last instruction in the block. Change it to use some iterators instead. Differential Revision: https://reviews.llvm.org/D88354
-
Raphael Isemann authored
Usually when we enter a SWIG wrapper function from Python, SWIG automatically adds a `Py_BEGIN_ALLOW_THREADS`/`Py_END_ALLOW_THREADS` around the call to the SB API C++ function. This will ensure that Python's GIL is released when we enter LLDB and locked again when we return to the wrapper code. D51569 changed this behaviour but only for the generated `__str__` wrappers. The added `nothreadallow` disables the injection of the GIL release/re-acquire code and the GIL is now kept locked when entering LLDB and is expected to be still locked when returning from the LLDB implementation. The main reason for that was that back when D51569 landed the wrapper itself created a Python string. These days it just creates a std::string and SWIG itself takes care of getting the GIL and creating the Python string from the std::string, so that workaround isn't necessary anymore. This patch just removes `nothreadallow` so that our `__str__` functions now behave like all other wrapper functions in that they release the GIL when calling into the SB API implementation. The motivation here is actually to work around another potential bug in LLDB. When one calls into the LLDB SB API while holding the GIL and that call causes LLDB to interpret some Python script via `ScriptInterpreterPython`, then the GIL will be unlocked when the control flow returns from the SB API. In the case of the `__str__` wrapper this would cause that the next call to a Python function requiring the GIL would fail (as SWIG will not try to reacquire the GIL as it isn't aware that LLDB removed it). The reason for this unexpected GIL release seems to be a workaround for recent Python versions: ``` // The only case we should go further and acquire the GIL: it is unlocked. if (PyGILState_Check()) return; ``` The early-exit here causes `InitializePythonRAII::m_was_already_initialized` to be always false and that causes that `InitializePythonRAII`'s destructor always directly unlocks the GIL via `PyEval_SaveThread`. I'm investigating how to properly fix this bug in a follow up patch, but for now this straightforward patch seems to be enough to unblock my other patches (and it also has the benefit of removing this workaround). The test for this is just a simple test for `std::deque` which has a synthetic child provider implemented as a Python script. Inspecting the deque object will cause `expect_expr` to create a string error message by calling `str(deque_object)`. Printing the ValueObject causes the Python script for the synthetic children to execute which then triggers the bug described above where the GIL ends up being unlocked. Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D88302 -
Chuanqi Xu authored
bug 45566 shows the process of building coroutine frame won't consider that the lifetimes of different local variables are not overlapped, which means the compiler could generates smaller frame. This patch calculate the lifetime range of each alloca by StackLifetime class. Then the patch build non-overlapped sets for allocas whose lifetime ranges are not overlapped. We use the largest type in a non-overlapped set as the field type in the frame. In insertSpills process, if we find the type of field is not the same with the alloca, we cast the pointer to the field type to the pointer to the alloca type. Since the lifetime range of alloca in one non-overlapped set is not overlapped with each other, it should be ok to reuse the storage space in the frame. Test plan: check-llvm, check-clang, cppcoro, folly Reviewers: junparser, lxfind, modocache Differential Revision: https://reviews.llvm.org/D87596
-
David Sherwood authored
After some recent upstream discussion we decided that it was best to avoid having the / operator for both ElementCount and TypeSize, since this could give the impression that these classes can be used in the same way as basic integer integer types. However, division for scalable types is a bit odd because we are only dividing the minimum quantity by a value, as opposed to something like: (MinSize * Vscale) / SomeValue This is why when performing division it's important the caller first establishes whether the operation makes sense, perhaps by calling isKnownMultipleOf() prior to division. The caller must now explictly call divideCoefficientBy() on the class to perform the operation. Differential Revision: https://reviews.llvm.org/D87700
-
Kai Luo authored
-
Arthur Eubanks authored
This reverts commit 506b6170. This still causes link errors, see https://crbug.com/1130780.
-
Max Kazantsev authored
-
Richard Smith authored
For C++20 P0732R2; unused so far. Will be used and tested by a follow-on commit.
-
Richard Smith authored
References to different declarations of the same entity aren't different values, so shouldn't have different representations. Recommit of e6393ee8 with fixed handling for weak declarations. We now look for attributes on the most recent declaration when determining whether a declaration is weak. (Second recommit with further fixes for mishandling of weak declarations. Our behavior here is fundamentally unsound -- see PR47663 -- but this approach attempts to not make things worse.)
-
Valentin Clement authored
Add operands to represent if and deviceptr. Default clause is represented with an attribute. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D88331
-
Valentin Clement authored
This patch remove the printer/parser for the acc.data operation since its syntax fits nicely with the assembly format. It reduces the maintenance for this op. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D88330
-
Valentin Clement authored
This patch remove the detach and delete operands. Those operands represent the detach and delete clauses that will appear in another operation acc.exit_data Reviewed By: kiranktp, kiranchandramohan Differential Revision: https://reviews.llvm.org/D88326
-
Dávid Bolvanský authored
strcat: destination and source shall not overlap. (http://www.cplusplus.com/reference/cstring/strcat/) stpcpy: The strings may not overlap, and the destination string dest must be large enough to receive the copy. (https://man7.org/linux/man-pages/man3/stpcpy.3.html) Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D88335
-
Joseph Huber authored
Summary: Adding a missing directory needed for generating Sphinx documentation without errors. Directory current contains a placeholder image just to populate the directory.
-
Nikita Popov authored
These are no longer necessary since D69686.
-