- Sep 03, 2020
-
-
Arthur Eubanks authored
Should not be with the pass, but alongside all the other C bindings. Reviewed By: sroland Differential Revision: https://reviews.llvm.org/D87041
-
Alex Richardson authored
Before: x = (foo *[[clang::attr]]) * v; After: x = (foo *[[clang::attr]])*v; Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D86721
-
peter klausler authored
These are owned by an instance of a new class AllCookedSources. This removes the need for a Scope to own a string containing a module's cooked source stream, and will enable errors to be emitted when parsing module files in the future. Differential Revision: https://reviews.llvm.org/D86891
-
Dmitry Preobrazhensky authored
Summary of changes: - Changed parser to eliminate generation of excessive error messages; - Corrected lit tests to match all expected error messages; - Corrected lit tests to guard against unwanted extra messages (added option "--implicit-check-not=error:"); - Added missing checks and fixed some typos in tests. See bug 46907: https://bugs.llvm.org/show_bug.cgi?id=46907 Reviewers: arsenm, rampitec Differential Revision: https://reviews.llvm.org/D86940
-
peter klausler authored
The DumpSymbolsSources() routine ordered its output by the addresses of the names of the symbols, and was susceptible to variation across environments. Fixed by using a multimap using the values of the names. Differential Revision: https://reviews.llvm.org/D87035
-
Louis Dionne authored
That definition is known to be potentially incorrect, and we don't support GCC in C++03 mode anyway.
-
hyd-dev authored
D56913 introduced the _LIBCPP_FREESTANDING macro and guarded its definition by: #ifndef __STDC_HOSTED__ # define _LIBCPP_FREESTANDING #endif However, __STDC_HOSTED__ is defined as 0 in freestanding implementations instead of undefined, which means that _LIBCPP_FREESTANDING would never get defined. This patch corrects the above as: #if __STDC_HOSTED__ == 0 # define _LIBCPP_FREESTANDING #endif Differential Revision: https://reviews.llvm.org/D86055
-
Louis Dionne authored
This commit re-applies 99f3b231, which was reverted in 81424257 because it broke the modules build. The modules failure was a circular dependency between the Darwin module and __config. Specifically, the issue was that if <__config> includes a system header, the std_config module depends on the Darwin module. However, the Darwin module already depends on the std_config header because some of its headers include libc++ headers like <ctype.h> (they mean to include the C <ctype.h>, but libc++ headers are first in the header search path). This is fixed by moving the workaround to <ctime> only. https://llvm.org/PR47208 rdar://68157284
-
Erik Pilkington authored
This effectively disables r340386 on Darwin, and provides a command line flag to opt into/out of this behaviour. This change is needed to compile certain Apple headers correctly. rdar://47688592 Differential revision: https://reviews.llvm.org/D86881
-
Erik Pilkington authored
This assert doesn't really make sense for functions in general, since they start life as declarations, and there isn't really any reason to require them to be defined before attributes are applied to them. rdar://67895846
-
Eric Astor authored
Add support for line continuations (the "backslash operator") in MASM by modifying the Parser's Lex method. Reviewed By: thakis Differential Revision: https://reviews.llvm.org/D83347
-
- Sep 02, 2020
-
-
Simon Pilgrim authored
If the PSHUFBs have no other uses, then we can force the unselected elements to zero to OR them instead, avoiding both an extra mask load and a costly variable blend. Eventually we should try to bring this into shuffle combining, once we can more easily convert between shuffles + select patterns.
-
Ehsan Toosi authored
In this PR, the users of BufferPlacement can configure BufferAssginmentTypeConverter. These new configurations would give the user more freedom in the process of converting function signature, and return and call operation conversions. These are the new features: - Accepting callback functions for decomposing types (i.e. 1 to N type conversion such as unpacking tuple types). - Defining ResultConversionKind for specifying whether a function result with a certain type should be appended to the function arguments list or should be kept as function result. (Usage: converter.setResultConversionKind<MemRefType>(AppendToArgumentList)) - Accepting callback functions for composing or decomposing values (i.e. N to 1 and 1 to N value conversion). Differential Revision: https://reviews.llvm.org/D85133 -
Jordan Rupprecht authored
The /proc/<pid>/status parsing is missing a few cases: - Idle - Parked - Dead If we encounter an unknown proc state, this leads to an msan warning. In reality, we only check that the state != Zombie, so it doesn't really matter that we handle all cases, but handle them anyway (current list: [1]). Also explicitly set it to unknown if we encounter an unknown state. There will still be an msan warning if the proc entry has no `State:` line, but that should not happen. Use a StringSwitch to make the handling of proc states a little more compact. [1] https://github.com/torvalds/linux/blob/master/fs/proc/array.c Reviewed By: labath Differential Revision: https://reviews.llvm.org/D86818
-
Congzhe Cao authored
[IPSCCP] Fix a bug that the "returned" attribute is not cleared when function is optimized to return undef In IPSCCP when a function is optimized to return undef, it should clear the returned attribute for all its input arguments and its corresponding call sites. The bug is exposed when the value of an input argument of the function is assigned to a physical register and because of the argument having a returned attribute, the value of this physical register will continue to be used as the function return value right after the call instruction returns, even if the value that this register holds may be clobbered during the function call. This potentially results in incorrect values being used afterwards. Reviewed By: jdoerfert, fhahn Differential Revision: https://reviews.llvm.org/D84220
-
Qiu Chaofan authored
-
Med Ismail Bennani authored
This patch adds the ability to use a custom interpreter with the `platform shell` command. If the user set the `-s|--shell` option with the path to a binary, lldb passes it down to the platform's `RunShellProcess` method and set it as the shell to use in `ProcessLaunchInfo to run commands. Note that not all the Platforms support running shell commands with custom interpreters (i.e. RemoteGDBServer is only expected to use the default shell). This patch also makes some refactoring and cleanups, like swapping CString for StringRef when possible and updating `SBPlatformShellCommand` with new methods and a new constructor. rdar://67759256 Differential Revision: https://reviews.llvm.org/D86667 Signed-off-by:
Med Ismail Bennani <medismail.bennani@gmail.com>
-
Anna Thomas authored
After computing dependence, we check if it is safe to hoist by identifying if it clobbers any liveIns in the sibling block (NullSucc). This check is moved to its own function which will be used in the soon-to-be modified dependence checking algorithm for implicit null checks pass. Tests-Run: lit tests on X86/implicit-*
-
Anna Thomas authored
Separated out some checks in isSuitableMemoryOp and added comments explaining why some of those checks are done. Tests-Run:X86 implicit null checks tests.
-
Louis Dionne authored
This will be needed in order to test constexpr std::vector.
-
David Stenberg authored
When marking a global variable constant, and simplifying users using CleanupConstantGlobalUsers(), the pass could incorrectly return false if there were still some uses left, and no further optimizations was done. This was caught using the check introduced by D80916. This fixes PR46749. Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D85837
-
Jakub Lichman authored
Added 128 byte alignment to alloc ops created in VectorToSCF pass. 128b alignment was already introduced to this pass but not to all alloc ops. This commit changes that by adding 128b alignment to the remaining ops. The point of specifying alignment is to prevent possible memory alignment errors on weakly tested architectures. Differential Revision: https://reviews.llvm.org/D86454
-
Venkataramanan Kumar authored
These transforms will now be performed irrespective of the number of uses for the expression "1.0/sqrt(X)": 1.0/sqrt(X) * X => X/sqrt(X) X * 1.0/sqrt(X) => X/sqrt(X) We already handle more general cases, and we are intentionally not creating extra (and likely expensive) fdiv ops in IR. This pattern is the exception to the rule because we always expect the Backend to reduce X/sqrt(X) to sqrt(X), if it has the necessary (reassoc) fast-math-flags. Ref: DagCombiner optimizes the X/sqrt(X) to sqrt(X). Differential Revision: https://reviews.llvm.org/D86726
-
Sanjay Patel authored
This is an enhancement to D81766 to allow loading the minimum target vector type into an IR vector with a different number of elements. In one of the motivating tests from PR16739, SLP creates <2 x float> load ops mixed with <4 x float> insert ops, so we want to handle that pattern in addition to potential oversized vectors created by the vectorizers. For now, we are assuming the insert/extract subvector with undef is free because there is no exact corresponding TTI modeling for that. Differential Revision: https://reviews.llvm.org/D86160
-
Daniel Grumberg authored
Once the new option parsing system is committed, this will allow to generate a check to ensure that correct command line generation happens Differential Revision: https://reviews.llvm.org/D86290
-
Max Kazantsev authored
-
Ehsan Toosi authored
In this PR, the users of BufferPlacement can configure BufferAssginmentTypeConverter. These new configurations would give the user more freedom in the process of converting function signature, and return and call operation conversions. These are the new features: - Accepting callback functions for decomposing types (i.e. 1 to N type conversion such as unpacking tuple types). - Defining ResultConversionKind for specifying whether a function result with a certain type should be appended to the function arguments list or should be kept as function result. (Usage: converter.setResultConversionKind<MemRefType>(AppendToArgumentList)) - Accepting callback functions for composing or decomposing values (i.e. N to 1 and 1 to N value conversion). Differential Revision: https://reviews.llvm.org/D85133 -
Paul Walker authored
When lowering fixed length vector operations for SVE the subvector operations are used extensively to marshall data between scalable and fixed-length vectors. This means that sequences like: extract_subvec(binop(insert_subvec(a), insert_subvec(b))) are very common. DAGCombine only checks if the resulting binop is legal or can be custom lowered when undoing such sequences. When it's custom lowering that is introducing them the result is an infinite legalise->combine->legalise loop. This patch extends the isOperationLegalOr... functions to include a "LegalOnly" parameter to restrict the check to legal operations only. Although isOperationLegal could be used it's common for the affected code paths to be visited pre and post legalisation, so the extra parameter keeps the code tidy. Differential Revision: https://reviews.llvm.org/D86450
-
Jay Foad authored
The addend in a REL32 reloc needs to be adjusted to account for the offset from the PC value returned by the s_getpc instruction to the point where the reloc is applied. This was being done correctly for (GOTPC)REL32_LO but not for (GOTPC)REL32_HI. This will only make a difference if the target symbol happens to get loaded almost exactly a multiple of 4G away from the relocated instructions. Differential Revision: https://reviews.llvm.org/D86938
-
Sander de Smalen authored
Unwinders may only preserve the lower 64bits of Neon and SVE registers, as only the registers in the base ABI are guaranteed to be preserved over the exception edge. The caller will need to preserve additional registers for when the call throws an exception and the unwinder has tried to recover state. For e.g. svint32_t bar(svint32_t); svint32_t foo(svint32_t x, bool *err) { try { bar(x); } catch (...) { *err = true; } return x; } `z0` needs to be spilled before the call to `bar(x)` and reloaded before returning from foo, as the exception handler may have clobbered z0. Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D84737 -
Igor Kudrin authored
As stated in section 6.1.1.2, DWARFv5, p. 142, | The last entry for each name is followed by a zero byte that | terminates the list. There may be gaps between the lists. The patch changes emitting a 4-byte zero value to a 1-byte one, which effectively removes the gap between entry lists, and thus saves approximately 3 bytes per name; the calculation is not exact because the total size of the table is aligned to 4. Differential Revision: https://reviews.llvm.org/D86927
-
Igor Kudrin authored
The member is not in use; the unit length for the table is emitted as a difference between two labels. Moreover, the type of the member might be misleading, because for DWARF64 the field should be 64 bit long. Differential Revision: https://reviews.llvm.org/D86912
-
Martin Storsjö authored
-
Benjamin Kramer authored
Otherwise we'll silently miscompile things. Differential Revision: https://reviews.llvm.org/D86951
-
Simon Pilgrim authored
This patch uses partial DemandedElts masks to further simplify target shuffle chains and finally starts making target shuffle combining part of SimplifyDemandedBits/SimplifyDemandedVectorElts. We already manage this for Depth == 0 cases, where combineX86ShuffleChain would early-out if the shuffle combined to the same op, but the patch generalizes this by manipulating the depth handling of combineX86ShufflesRecursively - calling with a new Depth = 0 and reducing the maximum shuffle combine depth accordingly. Differential Revision: https://reviews.llvm.org/D66004
-
Raphael Isemann authored
This reverts commit 99f3b231. It breaks libcxx/modules/stds_include.sh.cpp on macOS as the new include to sys/cdefs.h causes a dependency from __config to the Darwin module (which already has a dependency on __config). This cyclic dependency breaks compiling the std module which breaks compiling pretty much every program with ToT libc++ and enabled modules. I'll revert for now to get the bots green again. Sorry for the inconvenience.
-
Shinji Okumura authored
This patch makes it possible for AAUB to use information from AANoUndef. This is the next patch of D86983 Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D86984
-
Shinji Okumura authored
When the associated value is undef, we immediately forced to indicate a pessimistic fixpoint so far. This patch changes the initialization to check the attribute given in IR at first and to indicate an optimistic fixpoint when it is given. This change will enable us to catch , for example, the following case in AAUB. ``` call void @foo(i32 noundef undef) ``` Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D86983
-
ZHANG Hongbin authored
Based on the PyType and PyConcreteType classes, this patch implements the bindings of Complex Type, Vector Type and Tuple Type subclasses. For the convenience of type checking, this patch defines a `mlirTypeIsAIntegerOrFloat` function to check whether the given type is an integer or float type. These three subclasses in this patch have similar binding strategy: - The function pointer `isaFunction` points to `mlirTypeIsA***`. - The `mlir***TypeGet` C API is bound with the `get_***` method in the python side. - The Complex Type and Vector Type check whether the given type is an integer or float type. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D86785
-