- Jan 06, 2023
-
-
Josh Stone authored
These new debug values get inserted after the place where the spill happens, which means they won't be reached by the reverse traversal of basic block instructions. This would crash or fail assertions if they contained any virtual registers to be replaced. We can manually handle the new debug values right away to resolve this. Fixes https://github.com/llvm/llvm-project/issues/59172 Reviewed By: StephenTozer Differential Revision: https://reviews.llvm.org/D139590
-
Akira Hatanaka authored
in C++ base or member initializers Differential Revision: https://reviews.llvm.org/D127442
-
Akira Hatanaka authored
struct property is set using dot notation Make sure the destructor is called if needed. Differential Revision: https://reviews.llvm.org/D136639
-
Xiaodong Liu authored
The CACOP instruction is mainly used for cache initialization and cache-consistency maintenance. Depends on D140872 Reviewed By: SixWeining Differential Revision: https://reviews.llvm.org/D140527
-
Jie Fu authored
This patch fixes build failure due to -Wsign-compare in sparse2SparseRewrite(...) after https://reviews.llvm.org/D140871. ``` llvm-project/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp:842:32: error: comparison of integers of different signs: 'uint64_t' (aka 'unsigned long') and 'int64_t' (aka 'long') [-Werror,-Wsign-compare] for (uint64_t i = 0; i < rank; i++) { ~ ^ ~~~~ 1 error generated. ``` Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D141104
-
Emilia Dreamer authored
If a function with a `requires` clause as a constraint has a decltype return type, such as `decltype(auto)`, the decltype was seen to be part of the constraint clause, rather than as part of the function declaration, causing it to be placed on the wrong line. This patch disallows decltype to be a part of these clauses Fixes https://github.com/llvm/llvm-project/issues/59578 Depends on D140339 Reviewed By: HazardyKnusperkeks, owenpan, MyDeveloperDay Differential Revision: https://reviews.llvm.org/D140312
-
Emilia Dreamer authored
Previously, clang-format relied on a special method to parse concept definitions, `UnwrappedLineParser::parseConcept()`, which deferred to `UnwrappedLineParser::parseConstraintExpression()`. This is problematic, because the C++ grammar treats concepts and requires clauses differently, causing issues such as https://github.com/llvm/llvm-project/issues/55898 and https://github.com/llvm/llvm-project/issues/58130. This patch removes `parseConcept`, letting the formatter parse concept definitions as more like what they actually are, fancy bool definitions. NOTE that because of this, some long concept definitions change in their formatting, as can be seen in the changed tests. This is because of a change in split penalties, caused by a change in MightBeFunctionDecl on the concept definition line, which was previously `true` but with this patch is now `false`. One might argue that `false` is a more "correct" value for concept definitions, but I'd be fine with setting it to `true` again to maintain compatibility with previous versions. Fixes https://github.com/llvm/llvm-project/issues/58130 Depends on D140330 Reviewed By: HazardyKnusperkeks, owenpan, MyDeveloperDay Differential Revision: https://reviews.llvm.org/D140339
-
Emilia Dreamer authored
This brings the noexcept qualifier more visually in line with the other keyword qualifiers, such as "final" and "override". Originally reported as https://github.com/llvm/llvm-project/issues/44542, it was closed as "working by design" and reinforcing tests were added as part of a218706c. The exact spacing depended on the `PointerAlignment` option, where the default value of `Right` would leave no space. This patch seeks to change this behaviour, regardless of the configured `PointerAlignment` option (matching the previous behaviour of the `Left` option). Closes https://github.com/llvm/llvm-project/issues/59729 Reviewed By: HazardyKnusperkeks, owenpan, MyDeveloperDay Differential Revision: https://reviews.llvm.org/D140767
-
Brad Smith authored
-
Chen Zheng authored
Dynamic tls access model will be lowered to MI which clobbers CTR in the loop in ISEL(ADDItlsgdLADDR) and post-isel CTR loop pass will revert the loop to a normal compare + branch form. So no need to add this clobber check in hardware loop insertion pass now. Reviewed By: nemanjai Differential revision: https://reviews.llvm.org/D140367
-
Brad Smith authored
Fuchsia already implements AddClangSystemIncludeArgs(). So it looks like we just have to switch over to using it. Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D141073
-
Chen Zheng authored
Passes before hardware loop insertion change the loop to a form which is not a hardware loop candidate (return early before checking the ctr clobbers). And the PHI in the loop exit block is also optimized away. This breaks the previous test point when the case was committed. Fixing this by running this case just before hardware loop insertion pass. Reviewed By: nemanjai Differential revision: https://reviews.llvm.org/D140366
-
Xiaodong Liu authored
There are a few intrinsics or instructions on LoongArch that are only appropriate for loongarch32 target. So the feature "32bit" is added to implement it. Reviewed By: SixWeining Differential Revision: https://reviews.llvm.org/D140872
-
Brad Smith authored
Define __GCC_HAVE_SYNC_COMPARE_AND_SWAP macros Reviewed By: SixWeining, MaskRay Differential Revision: https://reviews.llvm.org/D141070
-
Jakub Kuderski authored
We need this because WGSL does not support extended multiplication ops. Fixes: https://github.com/llvm/llvm-project/issues/59563 Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D141096
-
Yitzhak Mandelbaum authored
This reverts commit 5e8f597c. It caused msan and ubsan breakages.
-
Craig Topper authored
The instruction name is x.f with the destination type first. The template name was intended as "convert F to X". So the F comes first.
-
Kirill Stoimenov authored
It is only used in the LSAN specific part. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D140109
-
Jeffrey Byrnes authored
-
Murali Vijayaraghavan authored
Differential Revision: https://reviews.llvm.org/D141097
-
bixia1 authored
Add codegen pattern for sparse_tensor.indices_buffer. Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D140871
-
Jakub Kuderski authored
Fix an off-by-one error in extended umul extension for WebGPU. Revert to the long multiplication algorithm originally added to wide integer emulation, which was deleted in D139776. It is much easier to see why it is correct. Add runtime tests based on the mlir-vulkan-runner. These run both with and without umul extension. Issue: https://github.com/llvm/llvm-project/issues/59563 Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D141085
-
Owen Pan authored
Closes #38042. Differential Revision: https://reviews.llvm.org/D141035
-
Murali Vijayaraghavan authored
Differential Revision: https://reviews.llvm.org/D140188
-
Keno Fischer authored
This teaches LVI (and thus CVP) to extract range information from branches whose condition is negated using (`xor %c, true`). On the implementation side, we switch the cache to additionally track whether we're looking for the inverted value or not and otherwise using the existing support for computing inverted conditions. I think the biggest question here is why this negation shows up here at all. After all, it should always be possible for some other pass to fold such a negation into a branch, comparison or some other logical operation. Indeed, instcombine does just that. However, these negations can be otherwise fairly persistent, e.g. instsimplify is not able to exchange branch conditions from negations. In addition, jumpthreading, which sits at the same point in default pass pipeline also handles this pattern, which adds further evidence that we might expect these negations to not have been canonicalized away yet at this point in the pass pipeline. In the particular case I was looking at there was a bit of a circular dependency where flags computed by cvp were needed by instcombine, and incstombine's folding of the negation was needed for cvp. Adding a second instombine pass would have worked of course, but instcombine can be somewhat expensive, so it appeared desirable to not require it to have run before cvp (as is the case in the default pass pipeline). Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D140933
-
Fangrui Song authored
In C mode, if e1 has __attribute__((noreturn)) but e2 doesn't, `(c ? e1 : e2)` is incorrectly noreturn and Clang codegen produces `unreachable` which may lead to miscompiles (see [1] `gawk/support/dfa.c`). This problem has been known since 8c6b56f3 (2010) or earlier. Fix this by making the result type noreturn only if both e1 and e2 are noreturn, matching GCC. `_Noreturn` and `[[noreturn]]` do not have the aforementioned problem. Fix https://github.com/llvm/llvm-project/issues/59792 [1] Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D140868
-
Peter Rong authored
This rewrite fixes https://github.com/llvm/llvm-project/issues/59316. Previously LowerSwitch uses int64_t, which will crash on case branches using integers with more than 64 bits. Using APInt fixes this problem. This patch also includes a test Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D140747
-
Aaron Ballman authored
This was added to the static matchers in 125ccd37, but the dynamic matcher was missed. This adds the dynamic matcher to the list.
-
Zibi Sarbinowski authored
[Support] Do not run test on z/OS A part of the unit test CommandLineTest/BadResponseFile, added in the commit fd3d7a9f need to be disable for z/OS as it was already done for AIX platform. Reviewed By: fanbo-meng Differential Revision: https://reviews.llvm.org/D141084
-
Joshua Cranmer authored
Reviewed By: nikic, hctim Differential Revision: https://reviews.llvm.org/D141083
-
Yitzhak Mandelbaum authored
Previously, the model for structs modeled all fields in a struct when `createValue` was called for that type. This patch adds a prepass on the function under analysis to discover the fields referenced in the scope and then limits modeling to only those fields. This reduces wasted memory usage (modeling unused fields) which can be important for programss that use large structs. Note: This patch obviates the need for https://reviews.llvm.org/D123032. Differential Revision: https://reviews.llvm.org/D140694
-
Adrian Prantl authored
lldb::LanguageType is used as a parameter in SBExpressionOptions::SetLanguage(), which actually makes this type API too. Commit 6eaedbb5 added a `: uint16_t` to it, which broke binary compatibility for the SBAPI. This patch reverts to the original enum. I tried moving the entire enum into include/API, but that created a cyclic module dependency between API and Utility. To keep things simple, this just reverts to the original code and adds a warning. rdar://103415402 Differential Revision: https://reviews.llvm.org/D141087
-
Matt Arsenault authored
This was only used for checking if is_shared/is_private were legal, which we're not bothering to do anymore. This is apparently visible to more than the target attribute (which seems to silently ignore unrecognized features), so this has the potential to break something (i.e. see the OpenMP test change)
-
Xiang Li authored
Change clang::annotate into clang::annotate_type. The example will get error like error: 'annotate' attribute cannot be applied to types int* [[clang::annotate("category1", "foo", 1)]] f(int[[clang::annotate("category2")]] *); Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D139935 -
Vang Thao authored
Amdgpu kernel with function attribute "uniform-work-group-size"="true" requires uniform work group size (i.e. each dimension of global size is a multiple of corresponding dimension of work group size). hipExtModuleLaunchKernel allows to launch HIP kernel with non-uniform workgroup size, which makes it necessary for runtime to check and enforce uniform workgroup size if kernel requires it. To let runtime be able to enforce that, this metadata is needed to indicate that the kernel requires uniform workgroup size. Reviewed By: kzhuravl, arsenm Differential Revision: https://reviews.llvm.org/D141012
-
Fangrui Song authored
MC and lld/ELF defaults were flipped in 2016. For Clang: CMake ENABLE_X86_RELAX_RELOCATIONS defaults to on in 2020. It makes sense for the TargetOptions default to be true now. R_X86_64_GOTPCRELX/R_X86_64_REX_GOTPCRELX require GNU ld newer than 2015-10 (subsumed by the current requirement of -fbinutils-version=). This should fix `rustc -Z plt=no` PIC relocatable files with GNU ld. (See https://github.com/rust-lang/rust/pull/106380)
-
Owen Pan authored
Account for an r_brace that precedes an "else if" statement when calculating whether the line might fit on one line if the r_brace is removed. Fixes #59778. Differential Revision: https://reviews.llvm.org/D140835
-
Saleem Abdulrasool authored
clang would improperly disallow GNU attributes before C++ standard attributes when a declaration had a linkage specifier. Handle this similarly to the previous case of invalid parsing. We now better match the parsing rules from GCC. Differential Revision: https://reviews.llvm.org/D140507 Reviewed By: aaron.ballman
-
Alexander Timofeev authored
Since the divergence-driven ISel was fully enabled we have more VGPRs available. MachineScheduler trying to take advantage of that bumps up the occupancy sacrificing the hiding of memory access latency. This really spoils the initially good schedule. A new metric that reflects the latency hiding quality of the schedule has been created to make it to balance between occupancy and latency. The metric is based on the latency model which computes the bubble to working cycles ratio. Then we use this ratio to decide if the higher occupancy schedule is profitable as follows: Profit = NewOccupancy/OldOccupancy * OldMetric/NewMetric Reviewed By: rampitec Differential Revision: https://reviews.llvm.org/D139710 -
ziqingluo-90 authored
[Fix]"[-Wunsafe-buffer-usage] Add a new `forEachDescendant` matcher that skips callable declarations" The original patch in commit b2ac5fd7 causes compilation errors which can be reproduced by the `-fdelayed-template-parsing` flag. This commit fixes the problem. Related differential revision: https://reviews.llvm.org/D138329
-