- Mar 04, 2024
-
-
Alexey Bataev authored
Created using spr 1.3.5 [skip ci]
-
Alexey Bataev authored
-
Tuan Chuong Goh authored
Legalize smaller/larger than legal vectors with i8 and i16 element sizes. Vectors with elements smaller than i8 will get widened to i8 elements.
-
Matt Arsenault authored
-
Pranav Bhandarkar authored
This patch is a minor formatting fix in the OpenMP ops documentation wherein the examples section in ``omp.private`` was breaking out into a top level list item.
-
Guillaume Chatelet authored
Umbrella bug #83182
-
NagyDonat authored
The class `CallDescription` is used to define patterns that are used for matching `CallEvent`s. For example, a `CallDescription{{"std", "find_if"}, 3}` matches a call to `std::find_if` with 3 arguments. However, these patterns are somewhat fuzzy, so this pattern could also match something like `std::__1::find_if` (with an additional namespace layer), or, unfortunately, a `CallDescription` for the well-known function `free()` can match a C++ method named `free()`: https://github.com/llvm/llvm-project/issues/81597 To prevent this kind of ambiguity this commit introduces the enum `CallDescription::Mode` which can limit the pattern matching to non-method function calls (or method calls etc.). After this NFC change, one or more follow-up commits will apply the right pattern matching modes in the ~30 checkers that use `CallDescription`s. Note that `CallDescription` previously had a `Flags` field which had only two supported values: - `CDF_None` was the default "match anything" mode, - `CDF_MaybeBuiltin` was a "match only C library functions and accept some inexact matches" mode. This commit preserves `CDF_MaybeBuiltin` under the more descriptive name `CallDescription::Mode::CLibrary` (or `CDM::CLibrary`). Instead of this "Flags" model I'm switching to a plain enumeration becasue I don't think that there is a natural usecase to combine the different matching modes. (Except for the default "match anything" mode, which is currently kept for compatibility, but will be phased out in the follow-up commits.) -
Balázs Kéri authored
[clang][analyzer] Change value of checker option in unix.StdCLibraryFunctions (second try). (#80457) Default value of checker option `ModelPOSIX` is changed to `true`. Documentation is updated. This is a re-apply of commit 7af4e8bc that was reverted because a test failure (this is fixed now).
-
Krystian Stasiowski authored
Reapply "[Clang][Sema] Diagnose function/variable templates that shadow their own template parameters (#78274)" (#79683) Reapplies #78274 with the addition of a default-error warning (`strict-primary-template-shadow`) that is issued for instances of shadowing which were previously accepted prior to this patch. I couldn't find an established convention for naming diagnostics related to compatibility with previous versions of clang, so I just used the prefix `ext_compat_`.
-
Stephen Tozer authored
`DPLabel`, the RemoveDI version of `llvm.dbg.label`, was landed recently at the same time the RemoveDIs IR printing and verifier patches were landing. The patches were updated to not miscompile, but did not have full-featured and correct support for DPLabel built in; this patch makes the remaining set of changes to enable DPLabel support.
-
Mirko Brkušanin authored
Iterator MI can advance in insertWait() but we need original instruction to set temporal hint. Just move it before handling volatile.
-
Guillaume Chatelet authored
-
Jeremy Morse authored
This is due to the {I,F}CmpInst constructor being normalised to take a pointer to a block rather than a reference (unlike any other Instruction). -
Shilei Tian authored
-
cor3ntin authored
Github links in release notes are often invalid rST, clutter the release notes and are annoying to write. This introduces a sphynx plugin that rewrites `#GH<NUMBER>` to a link to the corresponding issue.
-
Jeremy Morse authored
I'd reverted this in 6c7805d5 after a bad stage. Original commit messsage follows: [NFC][RemoveDIs] Bulk update utilities to insert with iterators As part of the RemoveDIs project we need LLVM to insert instructions using iterators wherever possible, so that the iterators can carry a bit of debug-info. This commit implements some of that by updating the contents of llvm/lib/Transforms/Utils to always use iterator-versions of instruction constructors. There are two general flavours of update: * Almost all call-sites just call getIterator on an instruction * Several make use of an existing iterator (scenarios where the code is actually significant for debug-info) The underlying logic is that any call to getFirstInsertionPt or similar APIs that identify the start of a block need to have that iterator passed directly to the insertion function, without being converted to a bare Instruction pointer along the way. I've also switched DemotePHIToStack to take an optional iterator: it needs to take an iterator, and having a no-insert-location behaviour appears to be important. The constructors for ICmpInst and FCmpInst have been updated too. They're the only instructions that take block _references_ rather than pointers for certain calls, and a future patch is going to make use of default-null block insertion locations. All of this should be NFC.
-
Qiu Chaofan authored
These builtins are already there in Clang, however current codegen may produce suboptimal results due to their complex behavior. Implement them as intrinsics to ensure expected instructions are emitted.
-
Sirraide authored
[Clang] [Sema] Do not crash on dependent or invalid record decls when `-fdump-record-layouts-complete` is passed (#83688) We no longer try to compute and dump the layout of types in cases where that isn’t possible. This fixes #83684 and #83671.
-
Timm Bäder authored
... when the pointer is an unknown size array.
-
cor3ntin authored
The man pages do not depend on the doc present in markdown files, so they can be built without myst_parser. Doing so might allow llvm distributions to have less development dependencies. As we do not have the ennvironment to test these configuration, this capability is provided on a best-effort basis. This restores a capability accidentally lost in #65664.
-
James Westwood authored
When code for M class architecture was compiled with AAPCS and PAC enabled, the frame pointer, r11, was not pushed to the stack adjacent to the link register. Due to PAC being enabled, r12 was placed between r11 and lr. This patch fixes this by adding an extra case to the already existing code that splits the GPR push in two when R11 is the frame pointer and certain paremeters are met. The differential revision for this previous change can be found here: https://reviews.llvm.org/D125649. This now ensures that r11 and lr are pushed in a separate push instruction to the other GPRs when PAC and AAPCS are enabled, meaning the frame pointer and link register are now pushed onto the stack adjacent to each other.
-
Vyacheslav Levytskyy authored
This PR is to add support for the SPIR-V extension SPV_INTEL_bfloat16_conversion (https://github.com/KhronosGroup/SPIRV-Registry/blob/main/extensions/INTEL/SPV_INTEL_bfloat16_conversion.asciidoc) and OpenCL extension cl_intel_bfloat16_conversions (https://registry.khronos.org/OpenCL/extensions/intel/cl_intel_bfloat16_conversions.html).
-
Niwin Anto authored
When induction variable are used outside the loop body, tail folding by masking mis-compiles, because for users outside of the loop the final value of the induction is computed separately from the vector loop. Fixes https://github.com/llvm/llvm-project/issues/76069 Fixes https://github.com/llvm/llvm-project/issues/51677
-
Kareem Ergawy authored
Extends current support for delayed privatization during translation to LLVM IR. This adds support for one-block `firstprivate` `omp.private` ops.
-
Vyacheslav Levytskyy authored
This PR is to add explicit support for SPV_KHR_float_controls (https://github.com/KhronosGroup/SPIRV-Registry/blob/main/extensions/KHR/SPV_KHR_float_controls.asciidoc). This extension is included into SPIR-V after version 1.4, but in case of lower versions it is to be included explicitly and OpExtension must be present in the module with `OpExtension "SPV_KHR_float_controls"`. This PR fixes this issue and fixes the test case test/CodeGen/SPIRV/exec_mode_float_control_khr.ll to account for a version lower than 1.4.
-
Vyacheslav Levytskyy authored
This PR is to fix a way how SPIR-V Backend describes legality of OpBitcast instruction and how it is validated on a step of instruction selection. Instead of checking a size of virtual registers (that makes no sense due to lack of guarantee of direct relations between size of virtual register and bit width associated with the type size), this PR allows to legalize OpBitcast without size check and postpones validation to the instruction selection step. As an example, let's consider the next example that was copied as is from a bigger test suite: ``` %355:id(s16) = G_BITCAST %301:id(s32) %303:id(s16) = ASSIGN_TYPE %355:id(s16), %349:type(s32) %644:fid(s32) = G_FMUL %645:fid, %646:fid %301:id(s32) = ASSIGN_TYPE %644:fid(s32), %40:type(s32) ``` Without the PR this leads to a crash with complains to an illegal bitcast, because %355 is s16 and %301 is s32. However, we must check not virtual registers in this case, but types of %355 and %301, i.e., %349:type(s32) and %40:type(s32), which are perfectly well compatible in a sense of OpBitcast in this case. In a test case that is a part of this PR OpBitcast is legal, being applied for `OpTypeInt 16` and `OpTypeFloat 16`, but would not be legalized without this PR due to virtual registers defined as having size 16 and 32.
-
Vyacheslav Levytskyy authored
This PR is to add vector reduction instructions according to https://llvm.org/docs/GlobalISel/GenericOpcode.html#vector-reduction-operations and widen in such a way a range of successful supported conversions, covering new cases of vector reduction instructions which IRTranslator is unable to resolve. By legalizing vector reduction instructions we introduce a new instruction patterns that should be addressed, including patterns that are delegated to pre-legalize step. To address this problem, a new pass is added that is to bring newly generated instructions after legalization to an aspect required by instruction selection. Expected overheads for existing cases is minimal, because a new pass is working only with newly introduced instructions, otherwise it's just a additional code traverse without any actions.
-
Nikita Popov authored
-
Mirko Brkušanin authored
-
Guillaume Chatelet authored
Umbrella bug #83182
-
Dani authored
sign-return-address and similar module attributes should be propagated to the function level before got merged because module flags may contradict and this information is not recoverable. Generated code will match with the normal linking flow. Refactored version of (#80640). Run the attribute copy only during IRMove.
-
NagyDonat authored
This comment-only change fixes a typo, clarifies some comments and includes some thoughts about the difficulties in resolving a certain FIXME.
-
Ingo Müller authored
This macro is obsolete since the landing of #82486 but was forgotten to be removed from the BUILD files.
-
Matthias Springer authored
The dialect conversion uses a `SingleEraseRewriter` to ensure that an op/block is not erased twice. This can happen during the "commit" phase when an unresolved materialization is inserted into a block and the enclosing op is erased by the user. In that case, the unresolved materialization should not be erased a second time later in the "commit" phase. This problem cannot happen during "rollback", so ops/block can be erased directly without using the rewriter. With this change, the `SingleEraseRewriter` is used only during "commit"/"cleanup". At that point, the dialect conversion is guaranteed to succeed and no rollback can happen. Therefore, it is not necessary to store the number of erased IR objects (because we will never "reset" the rewriter to previous a previous state).
-
sinan authored
Add R_AARCH64_JUMP26 implementation for createRelocation, which could significantly reduce the number of failed scan-refs cases if we perform bolt on a selective range of functions.
-
Matthias Springer authored
When a block signature is converted during dialect conversion, a `BlockTypeConversionRewrite` object is stored in the stack of rewrites. Such an object represents multiple steps: - Splitting the old block, i.e., creating a new block and moving all operations over. - Rewriting block arguments. - Erasing the old block. We have dedicated `IRRewrite` objects that represent "creating a block", "moving an op" and "erasing a block". This commit reuses those rewrite objects, so that there is less work to do in `BlockTypeConversionRewrite::rollback` and `BlockTypeConversionRewrite::commit`/`cleanup`. Note: This change is in preparation of adding listener support to the dialect conversion. The less work is done in a `commit` function, the fewer notifications will have to be sent.
-
Balázs Kéri authored
Revert "[clang][analyzer] Change default value of checker option in unix.StdCLibraryFunctions. (#80457)" This reverts commit 7af4e8bc.
-
Jacques Pienaar authored
gcc7 fix didn't work (but unfortunately didn't get a notification and forgot to check), this should hopefully address the ambiguous overload. I can't repro locally/trying to create docker image for testing.
-
Balázs Kéri authored
Default value of checker option `ModelPOSIX` is changed to `true`. Documentation is updated.
-