- Feb 03, 2022
-
-
Andrew Litteken authored
Created to fix: https://github.com/llvm/llvm-project/issues/53537 Some intrinsics functions are considered commutative since they are performing operations like addition or multiplication. Some of these have extra parameters to provide extra information that are not part of the operation itself and are not commutative. This makes sure that if an instruction that is an intrinsic takes the non commutative path to handle this case. Reviewer: paquette Closes Issue #53537 Differential Revision: https://reviews.llvm.org/D118807
-
Matt Arsenault authored
This was using the ugly tablegenerated register enum names, which are really hideous for register tuples on AMDGPU. Use the prettier names which are recognized by the asm parser.
-
Matt Arsenault authored
Warn on inline assembly clobbering reserved registers. It should also warn on at least some reserved register defs, but that isn't happening right now. If you have a def and re-use of a register we reserve, the register coalescer will eliminate the intermediate virtual register. When the reserved reg def is introduced later by the backend, it will end up clobbering the value the register coalescer assumed was live through the range. There is also isInlineAsmReadOnlyReg, although I don't understand what the distinction really is. It's called in SelectionDAGBuilder, long before the set of reserved registers is frozen so I'm not sure how that can possibly work reliably. Unfortunately this is also using the ugly tablegenerated names for the registers.
-
Alex Lorenz authored
The lexer can attempt to lex a _Pragma and crash with an out of bounds string access when it's lexing a _Pragma whose string token is an invalid buffer, e.g. when a module header file from which the macro expansion for that token was deleted from the file system. Differential Revision: https://reviews.llvm.org/D116052
-
Peter Klausler authored
When a scope uses an explicit IMPORT statement to import a symbol from the scope's host, it should not emit a bogus error message later if that symbol is used in a specification construct. The code that checks for imports being hidden by local declarations was not allowing for the presence of host association (or USE) indirection symbols in the local scope. Fix by using GetUltimate() before checking for the hidden symbol. Differential Revision: https://reviews.llvm.org/D118747
-
Jean Perier authored
CMPLX was always rewritten as a complex constructor, but the second operand of a complex constructor cannot be dynamically absent (i.e., a disassociated pointer, an unallocated allocatable or an absent OPTIONAL dummy argument), while the second argument of CMPLX can be dynamically absent. To avoid having to generate branches in complex constructor lowering when Y is a pointer, keep the distinction between CMPLX and a complex constructor when Y is a pointer, an allocatable, or an OPTIONAL entity. Differential Revision: https://reviews.llvm.org/D118784
-
Peter Klausler authored
When constructing the representation for a component reference to an inherited component, expression semantics make the parent component references explicit in the DataRef; e.g., base%component becomes base%parent%grandparent%component if component was inheritance-associated through two levels. But expression semantics was inserting references to the symbol table entries for the intermediate types, not the symbols for the parent components in the extended types. (We didn't notice the distinction until recently because both symbols have the same name; this only affects lowering.) Find and use the right symbols. Differential Revision: https://reviews.llvm.org/D118746
-
Arthur O'Dwyer authored
The Standard name for this exposition-only concept is _can-reference_. Differential Revision: https://reviews.llvm.org/D118726
-
Alexey Bataev authored
Added support for alternate ops vectorization of the cmp instructions. It allows to vectorize either cmp instructions with same/swapped predicate but different (swapped) operands kinds or cmp instructions with different predicates and compatible operands kinds. Differential Revision: https://reviews.llvm.org/D115955
-
Michał Górny authored
Differential Revision: https://reviews.llvm.org/D118473
-
Masoud Ataei authored
-
Chia-hung Duan authored
This CL supports adding dependency between traits verifiers and the dependency will be checked statically. Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D115135
-
Rainer Orth authored
While investigating the failures of `symbolize_pc.cpp` and `symbolize_pc_inline.cpp` on SPARC (both Solaris and Linux), I noticed that `__builtin_extract_return_addr` is a no-op in `clang` on all targets, while `gcc` has non-default implementations for arm, mips, s390, and sparc. This patch provides the SPARC implementation. For background see `SparcISelLowering.cpp` (`SparcTargetLowering::LowerReturn_32`), the SPARC psABI p.3-12, `%i7` and p.3-16/17, and SCD 2.4.1, p.3P-10, `%i7` and p.3P-15. Tested (after enabling the `sanitizer_common` tests on SPARC) on `sparcv9-sun-solaris2.11`. Differential Revision: https://reviews.llvm.org/D91607
-
Craig Topper authored
This adds or reuses ISD opcodes for vadd.wv, vaddu.wv, vadd.vv, vaddu.vv and a similar set for sub. I've included support for narrowing scalar splats that have known sign/zero bits similar to what was done for MUL_VL. The conversion to vwadd.vv proceeds in two phases. First we'll form a vwadd.wv by narrowing one of the operands. Then we'll visit the vwadd.wv to try to narrow the other operand. This turned out to be simpler than catching all the cases in one step. The forming of of vwadd.wv can happen for either operand for add, but only the right hand side for sub since sub isn't commutable. An interesting quirk is that ADD_VL and VZEXT_VL/VSEXT_VL are formed during vector op legalization, but VMV_V_X_VL isn't usually formed until op legalization when BUILD_VECTORS are handled. This leads to VWADD_W_VL forming in one DAG combine round, and then a later DAG combine round sees the VMV_V_X_VL and needs to commute the operands to get the splat in position. This alone necessitated a VWADD_W_VL combine function which made forming vwadd.vv in two stages an easy choice. I've left out trying hard to form vwadd.wx instructions for now. It would only save an extend in the scalar domain which isn't as interesting. Might need to review the test coverage a bit. Most of the vwadd.wv instructions are coming from vXi64 tests on rv64. The tests were copy pasted from the existing multiply tests. Reviewed By: rogfer01 Differential Revision: https://reviews.llvm.org/D117954
-
Sam Parker authored
-
Valentin Clement authored
Change the signature of `genExprAddr`, `genExprValue` to return a `fir::ExtendedValue` instead of a simple `mlir::Value` This patch is a preparation for more lowering to be upstream. It supports D118786 and D118787. This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D118785
-
Louis Dionne authored
-
Peter Klausler authored
NAMELIST I/O was inconsistent in its choice of which set of I/O modes to set the "inNamelist" flag. The wrong choice was in the set of modes that are part of the persistent state of an I/O connection; the right place is the set of modes that are reinitialized at the beginning of each I/O statement so that they can be modified by READ/WRITE control list specifiers and FORMAT control edit descriptors. Fix. Differential Revision: https://reviews.llvm.org/D118745
-
Jay Foad authored
This allows us to set the noclobber flag on (the MMO of) a load instruction instead of on the pointer. This fixes a bug where noclobber was being applied to all loads from the same pointer, even if some of them were clobbered. Differential Revision: https://reviews.llvm.org/D118775
-
Arthur O'Dwyer authored
-
Adrian Prantl authored
-
Simon Pilgrim authored
Now that VS2017 support has been dropped (D114639), the LLVM_HAS_RVALUE_REFERENCE_THIS define is always true and the LLVM_LVALUE_FUNCTION define is always enabled for ref-qualifiers. This patch proposes we remove the defines and use the qualifiers directly. Differential Revision: https://reviews.llvm.org/D118609
-
Alexandros Lamprineas authored
This is a fix for a use-after-free found by the address sanitizer when compiling GCC: https://github.com/llvm/llvm-project/issues/52821 The Function Specialization pass may remove instructions, cached inside the PredicateBase class, which are later being dereferenced from the SCCPInstVisitor class. To prevent the dangling references I am lazily deleting the dead instructions after the Solver has run. Differential Revision: https://reviews.llvm.org/D118591
-
Alex Lorenz authored
[clang][macho] add clang frontend support for emitting macho files with two build version load commands This patch extends clang frontend to add metadata that can be used to emit macho files with two build version load commands. It utilizes "darwin.target_variant.triple" and "darwin.target_variant.SDK Version" metadata names for that. MachO uses two build version load commands to represent an object file / binary that is targeting both the macOS target, and the Mac Catalyst target. At runtime, a dynamic library that supports both targets can be loaded from either a native macOS or a Mac Catalyst app on a macOS system. We want to add support to this to upstream to LLVM to be able to build compiler-rt for both targets, to finish the complete support for the Mac Catalyst platform, which is right now targetable by upstream clang, but the compiler-rt bits aren't supported because of the lack of this multiple build version support. Differential Revision: https://reviews.llvm.org/D115415
-
Simon Pilgrim authored
-
Arthur O'Dwyer authored
-
LLVM GN Syncbot authored
-
Nikita Popov authored
These were using 1-space indentation.
-
Arthur O'Dwyer authored
-
Arthur O'Dwyer authored
[libc++] [NFC] s/_LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)/!defined(_LIBCPP_HAS_NO_CONCEPTS)/ Per Discord discussion, we're normalizing on a simple `!defined(_LIBCPP_HAS_NO_CONCEPTS)` so that we can do a big search-and-replace for `!defined(_LIBCPP_HAS_NO_CONCEPTS)` back into `_LIBCPP_STD_VER > 17` when we're ready to abandon support for concept-syntax-less compilers. Differential Revision: https://reviews.llvm.org/D118748
-
Jeremy Morse authored
Gaps in the basic block number range (from blocks being deleted or folded) get block-value-tables allocated but never ejected, leading to a memory leak, currently tripping up the asan buildbots. Fix this up by manually freeing that memory. As suggested elsewhere, if these things were owned by a unique_ptr then cleanup would happen automagically. D118774 should eliminate the need for this dance.
-
- Feb 02, 2022
-
-
Florian Hahn authored
-
Masoud Ataei authored
This patch introduces the conversions from math function calls to MASS library calls. To resolves calls generated with these conversions, one need to link libxlopt.a library. This patch is tested on PowerPC Linux and AIX. Differential: https://reviews.llvm.org/D101759 Reviewer: bmahjour
-
Louis Dionne authored
There is no reason for the parts of std::span that don't depend on ranges to be disabled when ranges aren't provided. Also, to make sure the "no-experimental-stuff" configuration is tested, add a CI job for it. Differential Revision: https://reviews.llvm.org/D118740
-
Simon Pilgrim authored
The pointer is dereferenced immediately, so assert the cast is correct instead of returning nullptr
-
Simon Pilgrim authored
-
Mircea Trofin authored
-
Mircea Trofin authored
Added a flag to make configurable the number of interferences after which we 'bail out' and treat a set of intervals as un-evictable. Also using it on the ML side, as it turns out to be a good control for compile-time. With this configurable, we can do a bit of trial and error and see if bumping it has any effect on heuristic/policy quality. Differential Revision: https://reviews.llvm.org/D118707
-
Sylvestre Ledru authored
Reviewed By: serge-sans-paille Differential Revision: https://reviews.llvm.org/D60380
-
Jeremy Morse authored
This is a follow-up to D117877: variable assignments of DBG_VALUE $noreg, or DBG_INSTR_REFs where no value can be found, are represented by a DbgValue object with Kind "Undef", explicitly meaning "there is no value". In D117877 I added a special-case to some assignment accounting faster, without considering this scenario. It causes variables to be given the value ValueIDNum::EmptyValue, which then ends up being a DenseMap key. The DenseMap asserts, because EmptyValue is the tombstone key. Fix this by handling the assign-undef scenario in the special case, to match what happens in the general case: the variable has no value if it's only ever assigned $noreg / undef. Differential Revision: https://reviews.llvm.org/D118715
-