- Dec 16, 2022
-
-
Sjoerd Meijer authored
Opaque ptr types have a size in bits of 0. The legalised type is an i64 or vector of i64s, which do have a size. Because of this difference in size, target hook getMemoryOpCost modelled stores of ptr types as extending/truncating load/stores. Now we just check for opaque ptr types and return the legalised cost. This makes stores of pointers cheaper, and as a result we now SLP vectorise the changed test case. Differential Revision: https://reviews.llvm.org/D140193
-
Lorenzo Chelini authored
Use op separator to improve code navigation. Reviewed By: hanchung Differential Revision: https://reviews.llvm.org/D139917
-
Sjoerd Meijer authored
-
HanSheng Zhang authored
When promoting a phi in a catchswitch block to memory, we cannot insert load/store instruction in that block, and need to insert them inside all successors instead. Fixes https://github.com/llvm/llvm-project/issues/59185. Differential Revision: https://reviews.llvm.org/D138641
-
Nikita Popov authored
Currently InstCombine folds using the `return replaceInstUsesWith(V, Builder.CreateFoo())` pattern do not preserve the original name of the instruction. To preserve the name, you either have to use something like `return FooInst::Create(...)` which is usually less nice, or go out of the way to preserve the name with takeName(). We often don't do that. This patch instead preserves the name in replaceInstUsesWith() when replacing a named instruction with an unnamed instruction. To be conservative, I also added a zero-use check, which is a proxy for the case where the instruction was just created, rather than an existing one reused. Possibly we could drop that part. As InstCombine tests are robust against renames this does not cause any test diffs, so I regenerated a random test to show the effects. Differential Revision: https://reviews.llvm.org/D140192
-
Nemanja Ivanovic authored
The combiner for BUILD_VECTOR that merges consecutive loads into a wide load had two issues: - It didn't check that the input loads all have the same input chain - It didn't update nodes that are chained to the original loads to be chained to the new load This caused issues with bootstrap when 3c4d2a03 was committed. This patch fixes the issue so it can unblock this commit. Differential revision: https://reviews.llvm.org/D140046
-
Nikita Popov authored
Add an operands() method on SCEV, which forwards to the operands() method of individual SCEV expressions.
-
Archibald Elliott authored
This change: - Modifies the ACLE code to allow the new SLC value (3) for the prefetch target. - Introduces a new intrinsic, @llvm.aarch64.prefetch which matches the PRFM family instructions much more closely, and can represent all values for the PRFM immediate. The target-independent @llvm.prefetch intrinsic does not have enough information for us to be able to lower to it from the ACLE intrinsics correctly. - Lowers the acle calls to the new intrinsic on aarch64 (the ARM lowering is unchanged). - Implements code generation for the new intrinsic in both SelectionDAG and GlobalISel. We specifically choose to continue to support lowering the target-independent @llvm.prefetch intrinsic so that other frontends can continue to use it. Differential Revision: https://reviews.llvm.org/D139443
-
Dani Ferreira Franco Moura authored
Reviewed By: krasimir Differential Revision: https://reviews.llvm.org/D140211
-
Archibald Elliott authored
This feature adds upstream support for FEAT_RASv2 and FEAT_PFAR. Both are system-register-only, but FEAT_RAS is behind the command-line extension "+ras", so FEAT_RASv2 is behind "+rasv2". This patch includes support for ID_AA64MMFR4_EL1. This is an ID system register so it is not behind any feature flags. Differential Revision: https://reviews.llvm.org/D139936
-
Michael Buch authored
The `clang::TypePrinter` has recently been changed to suppress defaulted integral template parameters in D139986. Differential Revision: https://reviews.llvm.org/D139986
-
Nikita Popov authored
Use a consistent type for the operands() methods of different SCEV types. Also make the API consistent by only providing operands(), rather than also providin op_begin() and op_end() for some of them.
-
serge-sans-paille authored
And sneak in a small storage optimization of OptTable::PrefixChars
-
Backl1ght authored
Reviewed By: HazardyKnusperkeks, MyDeveloperDay Differential Revision: https://reviews.llvm.org/D140105
-
Nikita Popov authored
-
Nikita Popov authored
-
Joseph Huber authored
Summary: We use the dynamic HSA file to forward declare needed definitions from the HSA runtime if not present at build time. These definitions were not included so using them caused problems on systems without it if used. Just add them.
-
Nikita Popov authored
-
Guillaume Chatelet authored
Differential Revision: https://reviews.llvm.org/D139110
-
Jean Perier authored
Lower procedure ref to user defined elemental procedure when: - there are no arguments that may be dynamically optional - for functions, the result has no length parameters - the reference can be unordered - there are not character by value arguments This uses the recently added hlfir.elemental operation and tools. The "core" of the argument preparation is shared between elemental and non elemental calls (genUserCalls is code moved without any functional changes) Differential Revision: https://reviews.llvm.org/D140118
-
Nikita Popov authored
-
Michael Buch authored
After this patch, in the following snippet: ``` template <typename T> Foo {}; template <template <typename T> class CT = Foo> Bar {}; Bar<> b; ``` The debug-info entry for the `CT` template parameter will have a `DW_AT_default_value (true)` attached to it. Differential Revision: https://reviews.llvm.org/D139989 -
Michael Buch authored
This is in preparation for Clang to emit `DW_AT_default_value` for defaulted template template parameters. Differential Revision: https://reviews.llvm.org/D139989
-
Michael Buch authored
DWARFv5 added support for labelling template parameters with DW_AT_default_value to indicate whether the particular instantiation defaulted parameter. The current implementation only supports a limited set of possible cases. Namely for non-value-dependent integral template parameters and simple type template parameters. Useful cases that don't work are: 1. Type template parameters with defaults that are themselves templates. E.g., ``` template<typename T1, typename T2 = Foo<T1>> class C1; template<typename T = Foo<int>> class C2; etc. ``` 2. Template template parameters `clang::isSubstitutedDefaultArgument` already implement the required logic to determine whether a template argument is defaulted. This patch re-uses this logic for DWARF CodeGen. Differential Revision: https://reviews.llvm.org/D139988
-
Michael Buch authored
This patch handles default integral non-type template parameters. After this patch the clang TypePrinter will omit default integral template arguments when the `PrintingPolicy::SuppressDefaultTemplateArgs` option is specified and sets us up to be able to re-use `clang::isSubstitutedDefaultArgument` from the DWARF CodeGen component. Differential Revision: https://reviews.llvm.org/D139986
-
Michael Buch authored
**Summary** A use-case has come up in DWARF CodeGen where we want to determine whether a particular template argument matches the default template parameter declaration. Re-using this TypePrinter component there allows us to avoid duplicating most of this code and immediately allows us to cover a wider range of use-cases than the DWARF CodeGen does today.
-
Nikita Popov authored
And regenerate test checks.
-
Jay Foad authored
-
Alex Richardson authored
ASTContext was holding onto a pointer to the Clang->LLVM address space map which is stored inside TargetInfo. Instead of doing this, we can forward to TargetInfo instead. This change will allow us to eventually remove getTargetAddressSpace() from ASTContext and only have this information in TargetInfo. Reviewed By: rjmccall Differential Revision: https://reviews.llvm.org/D138316
-
Krasimir Georgiev authored
No functional changes intended.
-
Dani Ferreira Franco Moura authored
This change will allow users to call getNullability() without providing an ASTContext. Reviewed By: gribozavr2 Differential Revision: https://reviews.llvm.org/D140104
-
Nikita Popov authored
-
Nikita Popov authored
-
Nikita Popov authored
-
Nikita Popov authored
-
David Spickett authored
This used %zu to print a uint64_t type. z is for size_t so on 32 bit we tried to treat it as a 32 bit number. Use PRIu64 instead to print as 64 bit everywhere.
-
Nikita Popov authored
-
Nikita Popov authored
-
Nikita Popov authored
-
Nikita Popov authored
-