- Apr 02, 2022
-
-
Richard authored
[buildbot issues fixed] This check performs basic analysis of macros and replaces them with an anonymous unscoped enum. Using an unscoped anonymous enum ensures that everywhere the macro token was used previously, the enumerator name may be safely used. Potential macros for replacement must meet the following constraints: - Macros must expand only to integral literal tokens. The unary operators plus, minus and tilde are recognized to allow for positive, negative and bitwise negated integers. - Macros must be defined on sequential source file lines, or with only comment lines in between macro definitions. - Macros must all be defined in the same source file. - Macros must not be defined within a conditional compilation block. - Macros must not be defined adjacent to other preprocessor directives. - Macros must not be used in preprocessor conditions Each cluster of macros meeting the above constraints is presumed to be a set of values suitable for replacement by an anonymous enum. From there, a developer can give the anonymous enum a name and continue refactoring to a scoped enum if desired. Comments on the same line as a macro definition or between subsequent macro definitions are preserved in the output. No formatting is assumed in the provided replacements. The check cppcoreguidelines-macro-to-enum is an alias for this check. Fixes #27408 Differential Revision: https://reviews.llvm.org/D117522
-
Adrian Prantl authored
I found this function somewhat hard to read and removed a few entirely redundant checks and converted it to early exits. Differential Revision: https://reviews.llvm.org/D122912
-
Jean Perier authored
Previously, some semantic checks that are checking if an entity is an allocatable were relying on the expression being a designator whose last symbol has the allocatable attribute. This is wrong since this was considering substrings and array sections of allocatables as being allocatable. This is wrong (see NOTE 2 in Fortran 2018 section 9.5.3.1). Add evaluate::IsAllocatableDesignator to correctly test this. Also add some semantic tests for ALLOCATED to test the newly added helper. Note that ifort and nag are rejecting coindexed-named-object in ALLOCATED (`allocated(coarray_scalar_alloc[2])`). I think it is wrong given allocated argument is intent(in) as per 16.2.1 point 3. So 15.5.2.6 point 4 regarding allocatable dummy is not violated (If the actual argument is a coindexed object, the dummy argument shall have the INTENT (IN) attribute.) and I think this is valid. gfortran accepts it. The need for this helper was exposed in https://reviews.llvm.org/D122779. Differential Revision: https://reviews.llvm.org/D122899 Co-authored-by:
Peixin-Qiao <qiaopeixin@huawei.com>
-
Craig Topper authored
If we expand (uaddo X, 1) we previously expanded the overflow calculation as (X + 1) <u X. This potentially increases the live range of X and can prevent X+1 from reusing the register that previously held X. Since we're adding 1, overflow only occurs if X was UINT_MAX in which case (X+1) would be 0. So this patch adds a special case to expand the overflow calculation to (X+1) == 0. This seems to help with uaddo intrinsics that get introduced by CodeGenPrepare after LSR. Alternatively, we could block the uaddo transform in CodeGenPrepare for this case. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D122933
-
Erich Keane authored
We expect that `extern "C"` static functions to be usable in things like inline assembly, as well as ifuncs: See the bug report here: https://github.com/llvm/llvm-project/issues/54549 However, we were diagnosing this as 'not defined', because the ifunc's attempt to look up its resolver would generate a declared IR function. Additionally, as background, the way we allow these static extern "C" functions to work in inline assembly is by making an alias with the C mangling in MOST situations to the version we emit with internal-linkage/mangling. The problem here was multi-fold: First- We generated the alias after the ifunc was checked, so the function by that name didn't exist yet. Second, the ifunc's generation caused a symbol to exist under the name of the alias already (the declared function above), which suppressed the alias generation. This patch fixes all of this by moving the checking of ifuncs/CFE aliases until AFTER we have generated the extern-C alias. Then, it does a 'fixup' around the GlobalIFunc to make sure we correct the reference. Differential Revision: https://reviews.llvm.org/D122608
-
Craig Topper authored
The overflow calculation can be optimized to check if the add result is 0.
-
Erich Keane authored
-
Erich Keane authored
-
Lei Zhang authored
For such cases, the transpose op can be elided. Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D122903
-
Erich Keane authored
As reported in https://github.com/llvm/llvm-project/issues/54588 and discussed in https://github.com/itanium-cxx-abi/cxx-abi/issues/139 We are supposed to do a DFS, pre-order, decl-order search for a name for the union in this case. Prevoiusly we crashed because the IdentiferInfo pointer was nullptr, so this makes sure we have a name in the cases described by the ABI. I added an llvm-unreachable to cover an unexpected case at the end of the new function with information/reference to the ABI in case we come up with some way to get back to here. Differential Revision: https://reviews.llvm.org/D122820
-
-
wren romano authored
Prior to this change there were a number of places where the allocation and deallocation of SparseTensorCOO objects were not cleanly paired, leading to inconsistencies regarding whether each function released its tensor/coo arguments or not, as well as making it easy to run afoul of memory leaks, use-after-free, or double-free errors. This change cleans up the codegen vs runtime boundary to resolve those issues. Now, the only time the runtime library frees an object is either (a) because it's a function explicitly designed to do so, or (b) because the allocated object is entirely local to the function and would be a memory leak if not released. Thus, now the codegen takes complete responsibility for releasing any objects it caused to be allocated. Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D122435
-
Sanjay Patel authored
These are copied from x86 ( 1074bdfb ) to provide more coverage for a potential generic combine.
-
Sanjay Patel authored
Issue #54558
-
Zequan Wu authored
-
Yitzhak Mandelbaum authored
This patch extends the join logic for environments to explicitly handle boolean values. It creates the disjunction of both source values, guarded by the respective flow conditions from each input environment. This change allows the framework to reason about boolean correlations across multiple branches (and subsequent joins). Differential Revision: https://reviews.llvm.org/D122838
-
Yitzhak Mandelbaum authored
Adds logical interpretation of built-in equality operators, `==` and `!=`.s Differential Revision: https://reviews.llvm.org/D122830
-
Zequan Wu authored
This creates inline functions decls in the TUs where the funcitons are inlined and local variable decls inside those functions. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D121967
-
Simon Pilgrim authored
Pulled out of D122754
-
Petr Hosek authored
This reverts commit d6623d72 since it broke the build on Mac.
-
Simon Pilgrim authored
Allows us to fold XOR(X, MIN_SIGNED_VALUE) == ADD(X, MIN_SIGNED_VALUE) into LEA patterns As mentioned on PR52267. Differential Revision: https://reviews.llvm.org/D122815
-
Alisamar Husain authored
Storing timestamps (TSCs) in a more efficient map at the decoded thread level to speed up TSC lookup, as well as reduce the amount of memory used by each decoded instruction. Also introduced TSC range which keeps the current timestamp valid for all subsequent instructions until the next timestamp is emitted. Differential Revision: https://reviews.llvm.org/D122603
-
Lei Zhang authored
For such cases we cannot generate extract_strided_slice ops. Reviewed By: ThomasRaoux Differential Revision: https://reviews.llvm.org/D122902
-
Lei Zhang authored
This follows the logic: https://git.musl-libc.org/cgit/musl/tree/src/math/copysignf.c Reviewed By: ThomasRaoux Differential Revision: https://reviews.llvm.org/D122910
-
- Apr 01, 2022
-
-
Simon Pilgrim authored
As noticed on PR39174, if we're extracting a single non-constant bit index, then try to use BT+SETCC instead to avoid messing around moving the shift amount to the ECX register, using slow x86 shift ops etc. Recommitted with a fix to ensure we zext/trunc the SETCC result to the original type. Differential Revision: https://reviews.llvm.org/D122891
-
Dmitry Vyukov authored
Will be used in future changes. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D122905
-
Dmitry Vyukov authored
Currently LoadedModule provides max_executable_address. Replace it with just max_address. It's only used for printing for human inspection and since modules are non-overlapping, max_address is as good as max_executable_address for matching addresses/PCs against modules (I assume it's used for that). On the hand, max_address is more general and can used to match e.g. data addresses. I want to use it for that purpose in future changes. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D122906
-
zhijian authored
Summary: when run "llvm-ar cr" on AIX OS , it created a gnu archive, it is not desirable in aix OS. instead of creating a gnu archive, the patch will print a unsupport message for llvm-ar big archive write operation in AIX OS. after implement the big archive operation, I will revert the XFAIL: AIX " and "--format=gnu" test cases in the patch. Reviewer : James Henderson, Jinsong Ji Differential Revision: https://reviews.llvm.org/D122746
-
Florian Hahn authored
This reverts commit 14e3650f. The issue causing the revert were fixed independently in a08c90a4 and 14e5f978.
-
Simon Pilgrim authored
Investigating a sanitizer-windows buildbot breakage
-
Simon Pilgrim authored
[X86] lowerShuffleAsRepeatedMaskAndLanePermute - allow 64-bit sublane shuffling on AVX512BW v64i8 shuffles We were only performing this on 256-bit vectors on AVX2 targets Noticed while triaging Issue #54658
-
Simon Pilgrim authored
-
Simon Pilgrim authored
As noticed on PR39174, if we're extracting a single non-constant bit index, then try to use BT+SETCC instead to avoid messing around moving the shift amount to the ECX register, using slow x86 shift ops etc. Differential Revision: https://reviews.llvm.org/D122891
-
Yitzhak Mandelbaum authored
Currently, the framework does not track derived class access to base fields. This patch adds that support and a corresponding test. Differential Revision: https://reviews.llvm.org/D122273
-
Martin Sebor authored
Taken from D122686.
-
Aaron Ballman authored
-
Nikita Popov authored
-
Florian Hahn authored
This was exposed by 14e3650f. The recommit of 14e3650f will hit the problematic code path requiring the workaround. test case that crashes without the workaround.
-
Joseph Huber authored
Summary: Currently there is no option to configure the number of thin-backend threads to use when performing thin-lto on the device, but we should default to use all the threads rather than just one. In the future we should use the same arguments that gold / lld use and parse it here.
-
Matthias Springer authored
Differential Revision: https://reviews.llvm.org/D122901
-