- Feb 02, 2024
-
-
Emma Pilkington authored
Admittedly, its a bit ugly to pass the ABIVersion through onSymbolStart but I'm not sure what a better place for it would be.
-
Amir Ayupov authored
-
Anatoly Trosinenko authored
Add AEK_PAUTH to ARMV8_3A in TargetParser and let it propagate to ARMV8R, as it aligns with GCC defaults. After adding AEK_PAUTH, several tests from TargetParserTest.cpp crashed when trying to format an error message, thus update a format string in AssertSameExtensionFlags to account for bitmask being pre-formatted as std::string. The CHECK-PAUTH* lines in aarch64-target-features.c are updated to account for the fact that FEAT_PAUTH support and pac-ret can be enabled independently and all four combinations are possible.
-
Krystian Stasiowski authored
According to [temp.pre] p5: > In a template-declaration, explicit specialization, or explicit instantiation the init-declarator-list in the declaration shall contain at most one declarator. A member-declaration that is a template-declaration or explicit-specialization contains a declaration, even though it declares a member. This means it _will_ contain an init-declarator-list (not a member-declarator-list), so [temp.pre] p5 applies. This diagnoses declarations such as: ``` struct A { template<typename T> static const int x = 0, f(); // error: a template declaration can only declare a single entity template<typename T> static const int g(), y = 0; // error: a template declaration can only declare a single entity }; ``` The diagnostic messages are the same as those of the equivalent namespace scope declarations. Note: since we currently do not diagnose declarations with multiple abbreviated function template declarators at namespace scope e.g., `void f(auto), g(auto);`, so this patch does not add diagnostics for the equivalent member declarations. This patch also refactors `ParseSingleDeclarationAfterTemplate` (now named `ParseDeclarationAfterTemplate`) to call `ParseDeclGroup` and return the resultant `DeclGroup`. -
Ilya Biryukov authored
Fixes #80284. Calling `getASTRecordLayout` on invalid types may crash and results of `__datasizeof` on invalid types can be arbitrary, so just use whatever `sizeof` returns.
-
Simon Pilgrim authored
[X86] X86FixupVectorConstants.cpp - refactor constant search loop to take array of sorted candidates Pulled out of #79815 - refactors the internal FixupConstant logic to just accept an array of vzload/broadcast candidates that are pre-sorted in ascending constant pool size
-
- Feb 01, 2024
-
-
Philip Reames authored
-
Ivan Butygin authored
Properly handle fusion of loops with reductions: * Check there are no first loop results users between loops * Create new loop op with merged reduction init values * Update `scf.reduce` op to contain reductions from both loops * Update loops users with new loop results
-
Yaxun (Sam) Liu authored
Skip checking HIP version file under parent directory for /usr/local since /usr will be checked after /usr/local. Fixes: https://github.com/llvm/llvm-project/issues/78344
-
Amir Ayupov authored
Report two extra metrics: - # of stale functions with matching block count, - # of stale blocks with matching instruction count.
-
Nikita Popov authored
For integers larger than 64-bit, this would zero-extend a -1 value, instead of sign-extending it. Fixes https://github.com/llvm/llvm-project/issues/80289.
-
Nikita Popov authored
-
Jie Fu authored
llvm-project/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1648:15: error: unused variable 'InstDisp' [-Werror,-Wunused-variable] ptrdiff_t InstDisp = TLSVarAddress + Offset - Delta; ^ llvm-project/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:7624:19: error: unused variable 'TPReg' [-Werror,-Wunused-variable] RegisterSDNode *TPReg = dyn_cast<RegisterSDNode>(TPRegNode.getNode()); ^ llvm-project/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:7625:23: error: unused variable 'Subtarget' [-Werror,-Wunused-variable] const PPCSubtarget &Subtarget = ^ -
Amy Kwan authored
This patch utilizes the -maix-small-local-exec-tls option to produce a faster, non-TOC-based access sequence for the local-exec TLS model. Specifically, for when the offsets from the TLS variable are non-zero. In particular, this patch produces either a single: - addi/la with a displacement off of R13 plus a non-zero offset for when an address is calculated, or - load or store off of R13 plus a non-zero offset for when an address is calculated and used for further access where R13 is the thread pointer, respectively. In order to produce a single addi or load/store off of the thread pointer with a non-zero offset, this patch also adds the necessary support in the assembly printer when printing these instructions. Specifically: - The non-zero offset is added to the TLS variable address when the address of the TLS variable + it's offset is less than 32KB. - Otherwise, when the address of the TLS variable + its offset is greater than 32KB, the non-zero offset (and a multiple of 64KB) is subtracted from the TLS address. This handling in the assembly printer is necessary to ensure that the TLS address + the non-zero offset is between [-32768, 32768), so that the total displacement can fit within the addi/load/store instructions. This patch is meant to be a follow-up to 3f46e545 (where the optimization occurs for when the offset is zero).
-
Alexey Bataev authored
-
Quentin Dian authored
Per #80143, we can remove the extra line break when there is no instruction.
-
Hsiangkai Wang authored
When checking the load indices of the second loop coincide with the store indices of the first loop, it only considers the index values are the same or not. However, there are some cases the index values defined by other operators. In these cases, it will treat them as different even the results of defining operators are the same. We already check if the iteration space is the same in isFusionLegal(). When checking operands of defining operators, we only need to consider the operands come from the same induction variables. If so, we know the results of defining operators are the same.
-
David Green authored
As per the Cortex-A510 software optimization guide, the latency of a fcsel should be 3 not 4. It would previously get the latency from WriteF.
-
Sander de Smalen authored
Since https://github.com/ARM-software/acle/pull/276 the ACLE defines attributes to better describe the use of a given SME state. Previously the attributes merely described the possibility of it being 'shared' or 'preserved', whereas the new attributes have more semantics and also describe how the data flows through the program. For ZT0 we already had to add new LLVM IR attributes: * aarch64_new_zt0 * aarch64_in_zt0 * aarch64_out_zt0 * aarch64_inout_zt0 * aarch64_preserves_zt0 We have now done the same for ZA, such that we add: * aarch64_new_za (previously `aarch64_pstate_za_new`) * aarch64_in_za (more specific variation of `aarch64_pstate_za_shared`) * aarch64_out_za (more specific variation of `aarch64_pstate_za_shared`) * aarch64_inout_za (more specific variation of `aarch64_pstate_za_shared`) * aarch64_preserves_za (previously `aarch64_pstate_za_shared, aarch64_pstate_za_preserved`) This explicitly removes 'pstate' from the name, because with SME2 and the new ACLE attributes there is a difference between "sharing ZA" (sharing the ZA matrix register with the caller) and "sharing PSTATE.ZA" (sharing either the ZA or ZT0 register, both part of PSTATE.ZA with the caller).
-
Joseph Huber authored
Summary: The old `s_memtime` instruction was supported until the GFX10 architecture. Although this instruction has a higher latency than the new shader counter, it's much more usable as a processor clock as it is a full 64-bit counter. The new shader counter is only a 20-bit counter, which makes it difficult to use as a standard cycle counter as it will overflow in a few milliseconds. This patch suggests preferring `s_memtime` for this instrinsic if it is still available.
-
Alexandre Ganea authored
This fixes: https://github.com/llvm/llvm-project/issues/80117
-
Wang Pengcheng authored
Split out from #78417. Reviewers: topperc, asb, kito-cheng Reviewed By: asb Pull Request: https://github.com/llvm/llvm-project/pull/79248
-
Nikita Popov authored
-
Simon Pilgrim authored
-
Hristo Hristov authored
Implements P2652R2 <https://wg21.link/P2652R2>: - https://eel.is/c++draft/allocator.requirements.general - https://eel.is/c++draft/memory.syn - https://eel.is/c++draft/allocator.traits.general - https://eel.is/c++draft/allocator.traits.members - https://eel.is/c++draft/diff.cpp20.concepts - https://eel.is/c++draft/diff.cpp20.utilities --------- Co-authored-by:
Zingam <zingam@outlook.com>
-
Florian Hahn authored
We are replacing with a wider increment. If both OrigInc and IsomorphicInc are NUW/NSW, then we can preserve them on the wider increment; the narrower IsomorphicInc would wrap before the wider OrigInc, so the replacement won't make IsomorphicInc's uses more poisonous. PR: https://github.com/llvm/llvm-project/pull/79512
-
Jay Foad authored
-
David Spickett authored
When the markdown link renders the line gets a lot shorter.
-
Orlando Cazalet-Hyams authored
According to its doc-comment `isImplicit` is meant to return true if the expression is an implicit location description (describes an object or part of an object which has no location by computing the value from available program state). There's a brief entry for `DW_OP_LLVM_tag_offset` in the LangRef and there's some info in the original commit fb9ce100. From what I can tell it doesn't look like `DW_OP_LLVM_tag_offset` affects whether or not the location is implicit; the opcode doesn't get included in the final location description but instead is added as an attribute to the variable. This was tripping an assertion in the latest application of the fix to #76545, #78606, where an expression containing a `DW_OP_LLVM_tag_offset` is split into a fragment (i.e., describe a part of the whole variable).
-
Lucas Duarte Prates authored
This updates clang's target defines to include the ACLE changes covering the FEAT_PAuth_LR architecture extension. The changes include: * The new `__ARM_FEATURE_PAUTH_LR` feature macro, which is set to 1 when FEAT_PAuth_LR is available in the target. * A new bit field for the existing `__ARM_FEATURE_PAC_DEFAULT` macro, indicating the use of PC as a diversifier for Pointer Authentication (from -mbranch-protection=pac-ret+pc). The approved changes to the ACLE spec can be found here: https://github.com/ARM-software/acle/pull/292
-
Tom Eccles authored
The verifiers are currently very strict: requiring intrinsic operations to be used only in cases where the Fortran standard permits the intrinsic to be used. There have now been a lot of cases where these verifiers have caused bugs in corner cases. In a recent ticket, @jeanPerier pointed out that it could be useful for future optimizations if somewhat invalid uses of these operations could be allowed in dead code. See this comment: https://github.com/llvm/llvm-project/issues/79995#issuecomment-1918118234 In response to all of this, I have decided to relax the intrinsic operation verifiers. The intention is now to only disallow operation uses that are likely to crash the compiler. Other checks are still available under `-strict-intrinsic-verifier`. The disadvantage of this approach is that IR can now represent intrinsic invocations which are incorrect. The lowering and implementation of these intrinsic functions is unlikely to do the right thing in all of these cases, and as they should mostly be impossible to generate using normal Fortran code, these edge cases will see very little testing, before some new optimization causes them to become more common. Fixes #79995
-
Benjamin Kramer authored
-
Aiden Grossman authored
This patch replaces --num-repetitions with --min-instructions to make it more clear that the value refers to the minimum number of instructions in the final assembled snippet rather than the number of repetitions of the snippet. This patch also refactors some llvm-exegesis internal variable names to reflect the name change. Fixes #76890.
-
Benjamin Kramer authored
This is a mess and needs to be cleaned up some day.
-
Benjamin Kramer authored
These two are intertwined enough so it doesn't really make sense to have it standalone and hack around it by putting headers into both.
-
Benjamin Kramer authored
-
Marius Brehler authored
This adds a `func`, `call` and `return` operation to the EmitC dialect, closely related to the corresponding operations of the Func dialect. In contrast to the operations of the Func dialect, the EmitC operations do not support multiple results. The `emitc.func` op features a `specifiers` argument that for example allows, with corresponding support in the emitter, to emit `inline static` functions. Furthermore, this adds patterns and a pass to convert the Func dialect to EmitC. A `func.func` op that is `private` is converted to `emitc.func` with a `"static"` specifier.
-
Wei Wang authored
Don't search for unnecessary libs when linking the shared lib. This allows the test to run in chroot environment.
-
jeanPerier authored
Derived type translation is proving expensive in modern fortran apps with many big derived types with dozens of components and parents. Extending the cache that prevent recursion is proving to have little cost on apps with small derived types and significant gain (can divide compile time by 2) on modern fortran apps. It is legal since the cache lifetime is less than the MLIRContext lifetime that owns the cached mlir::Type. Doing so also exposed that the current caching was incorrect, the type symbol is the same for kind parametrized derived types regardless of the kind parameters. Instances with different kinds should lower to different MLIR types. See added test. Using the type scopes fixes the problem.
-
Matthias Springer authored
The greedy pattern rewrite driver has multiple "expensive checks" to detect invalid rewrite pattern API usage. As part of these checks, it computes fingerprints for every op that is in scope, and compares the fingerprints before and after an attempted pattern application. Until now, each computed fingerprint took into account all nested operations. That is quite expensive because it walks the entire IR subtree. It is also redundant in the expensive checks because we already compute a fingerprint for every op. This commit significantly improves the running time of the "expensive checks" in the greedy pattern rewrite driver.
-