Viktoriia Bakalova [Wed, 8 Mar 2023 12:34:15 +0000 (12:34 +0000)]
Revert "Re-land [clangd] Add support for missing includes analysis."
This reverts commit
85a5c17b66768353b7fff717904e42805bb6a547.
Viktoriia Bakalova [Wed, 8 Mar 2023 12:29:43 +0000 (12:29 +0000)]
Revert "Re-land [clangd] Add support for missing includes analysis."
This reverts commit
7bd56ddaeeb578331d3dfc0c4a2fe2727d0d1861.
Viktoriia Bakalova [Wed, 8 Mar 2023 12:27:17 +0000 (12:27 +0000)]
Revert "Revert "Re-land [clangd] Add support for missing includes analysis.""
This reverts commit
9814b4d07f614e83e7a244f74fc562f2b5cc9b15.
Viktoriia Bakalova [Wed, 8 Mar 2023 12:24:51 +0000 (12:24 +0000)]
Revert "Re-land [clangd] Add support for missing includes analysis."
This reverts commit
85a5c17b66768353b7fff717904e42805bb6a547.
Viktoriia Bakalova [Wed, 8 Mar 2023 10:58:43 +0000 (10:58 +0000)]
Re-land [clangd] Add support for missing includes analysis.
This reverts commit
2eb5ac99a76dbbf8ac68c538211fabeaa5ac0bfd.
Differential Revision: https://reviews.llvm.org/D145576
Mikhail R. Gadelha [Tue, 7 Mar 2023 12:53:34 +0000 (09:53 -0300)]
[libc] Small improvements to libc cmake
This patch includes:
1. Better error message when cmake finds incompatible triple
2. Added missing header dependencies libc/include/CMakeLists.txt as per
app.td
3. Removed unused $LLVM_LIBC_INCLUDE_DIRS cmake variable
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D145496
Carl Ritson [Wed, 8 Mar 2023 11:42:17 +0000 (20:42 +0900)]
Revert "[IRLinker] Fix mapping of declaration metadata"
This reverts commit
be0ef4b95d947a324aaf58373691723a0307822b.
Investigating use after free issue.
Valery Pykhtin [Thu, 27 Oct 2022 06:55:16 +0000 (08:55 +0200)]
[AMDGPU] Scheduler: fix RP calculation for a MBB with one successor
We reuse live registers after tracking one MBB as live-ins to the successor MBB
if the successor is only one but we don't check if the successor has other predecessors.
`A B`
` \ /`
` C`
A and B have one successor but C has live-ins defined by A and B and therefore should be
initialized using LIS.
This fixes 83 lit tests out if 420 with EXPENSIVE_CHECK enabled.
Reviewed By: rampitec
Differential Revision: https://reviews.llvm.org/D136918
Florian Hahn [Wed, 8 Mar 2023 11:07:14 +0000 (12:07 +0100)]
[STLExtras] Use std::get in less_first,less_second to support more types
Update less_first,less_second to use std::get to access the first and
second component. This extends support to any type implementing
std::get, like tuples.
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D145489
Viktoriia Bakalova [Wed, 8 Mar 2023 10:58:43 +0000 (10:58 +0000)]
Re-land [clangd] Add support for missing includes analysis.
This reverts commit
2eb5ac99a76dbbf8ac68c538211fabeaa5ac0bfd.
Alex Bradbury [Wed, 8 Mar 2023 10:48:01 +0000 (10:48 +0000)]
[docs] Document how frequently the staging buildmaster configuration is reconfigured
Differential Revision: https://reviews.llvm.org/D144465
Michael Buch [Wed, 8 Mar 2023 10:43:47 +0000 (10:43 +0000)]
[lldb][test][NFC] TestDataFormatterCpp.py: Remove redundant FIXME
This got fixed in D145241
Differential Revision: https://reviews.llvm.org/D145241
Florian Hahn [Wed, 8 Mar 2023 10:39:43 +0000 (11:39 +0100)]
[VPlan] Check if recipe is in ReplicateRegion for IfPredicateInstr (NFC)
Check if replicate recipe is in a replicate region when considering to
collect predicated instructions. This allows use IsPredicated for
recipes with a mask attached directly in D143865.
Reviewed By: Ayal
Differential Revision: https://reviews.llvm.org/D145322
Adrian Kuegel [Wed, 8 Mar 2023 09:39:21 +0000 (10:39 +0100)]
[mlir] Apply ClangTidyLegacy findings (NFC)
- 'override' is redundant since the function is already declared 'final'.
- 'virtual' is redundant since the function is already declared 'override'.
Simon Pilgrim [Wed, 8 Mar 2023 09:32:12 +0000 (09:32 +0000)]
[InstCombine] Regenerate sub-minmax.ll
Reduces the superfluous diffs in D145540
Stanislav Mekhanoshin [Tue, 7 Mar 2023 20:39:49 +0000 (12:39 -0800)]
[AMDGPU] Skip buffer_wbl2 before atomic fence acquire
Memory models for gfx90a and gfx940 do not require buffer_wbl2
before the fence for acquire ordering, but we do insert the full
release.
Fixes: SWDEV-386785
Differential Revision: https://reviews.llvm.org/D145524
Valentin Clement [Wed, 8 Mar 2023 08:50:51 +0000 (09:50 +0100)]
[flang] Align same_type_as result to other compilers
Unallocated unlimited polymorphic entities do not have a dynamic type set
and do not have declared type. The standard notes that the result is
processor dependent when one of the arguments of same_type_as is in this
case. Align the result to other compiler (gfortran, nvfortran).
Reviewed By: jeanPerier, PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D145384
Chuanqi Xu [Wed, 8 Mar 2023 08:40:19 +0000 (16:40 +0800)]
[NFC] [C++20] [Modules] Add a test for pr60085
Close https://github.com/llvm/llvm-project/issues/60085
When I look into pr60085, I finf the issue gone away now surprisingly.
Leave a test for this to prevent it happen again.
Andrzej Warzynski [Sun, 5 Mar 2023 12:23:17 +0000 (12:23 +0000)]
[mlir][linalg] Refine how contiguous loads are identified
Vectorization of `tensor.extract` using contiguous loads
(`vector.transfer_read`) was introduced in [1]. This patch updates and
refines the existing logic (so that more cases of contiguous can be
identified), as well as adds more tests.
Specifically, contiguous load operations are identified by making sure
that:
1. non-trailing indices for `tensor.extract` are loop invariant (so,
e.g., there are no "jumps" from one row to the other between
iterations),
2. the trailing index for `tensor.extract` increments by 1 with every
loop iteration (so that it's always adjacent elements that are
loaded).
This patch introduces:
* `isLoopInvariantIdx` for step 1., and
* `isContiguousLoadIdx` for step 2.
These new methods replace:
* `isContiguousLoadIdx`, and `isBasedOnIndexOp`.
Both approaches lead to similar end-result (none of the existing tests
required updating). However, with the updated approach, it's much easier
to treat the trailing and non-trailing indices separately and to add
more cases for which contiguous loads can be used.
[1] https://reviews.llvm.org/D141998
Differential Revision: https://reviews.llvm.org/D145385
Yeting Kuo [Tue, 21 Feb 2023 11:54:05 +0000 (19:54 +0800)]
[InstCombine][debuginfo] Update valueCoversEntireFragment for fixed size fragment and scalable value.
Update valueCoversEntireFragment to handle new case and add regression test.
Reviewed By: sdesmalen, aprantl
Differential Revision: https://reviews.llvm.org/D144472
Michael Platings [Mon, 6 Mar 2023 22:53:54 +0000 (22:53 +0000)]
Use LLVM_USE_SYMLINKS option in install_symlink
The change to potentially use symlinks on Windows was added in
https://reviews.llvm.org/D99170.
LLVM_USE_SYMLINKS was added more recently in
https://reviews.llvm.org/D135578 and allows specifying at configure time
whether or not symlinks should be created. The benefit of using this
option is it allows building the package on a symlink-capable Windows
machine with symlinks disabled so that the resulting package can be used
on a Windows machine that doesn't support symlinks.
Differential Revision: https://reviews.llvm.org/D145443
esmeyi [Wed, 8 Mar 2023 07:19:35 +0000 (02:19 -0500)]
[PowerPC] Check if the latch block is in the value list for the PHI before get the incoming value.
Summary: Fixes #60990. There is a crash reported during Running pass 'Prepare loop for ppc preferred instruction forms'. The crash occurs in 32bit PowerPC.
Reviewed By: shchenz
Differential Revision: https://reviews.llvm.org/D145350
Carl Ritson [Wed, 8 Mar 2023 06:28:53 +0000 (15:28 +0900)]
[IRLinker] Fix mapping of declaration metadata
Ensure metadata for declarations copied during materialization
is properly mapped if declarations do not become definitions.
Reviewed By: tejohnson
Differential Revision: https://reviews.llvm.org/D145318
Xiang1 Zhang [Wed, 8 Mar 2023 07:00:02 +0000 (15:00 +0800)]
[NFC] Remove dead code in ExtAddrMode::print checked by coverty tool
Mikael Holmen [Fri, 3 Mar 2023 13:20:26 +0000 (14:20 +0100)]
[ADCE] Preserve MemorySSA if only debug instructions are removed
As we've seen in
https://github.com/llvm/llvm-project/issues/58285
throwing away MemorySSA when only debug instructions are removed can lead
to different code when debug info is present or not present.
This is the second attempt at fixing the problem. The first one was
https://reviews.llvm.org/D145051
which was reverted due to a 15% compile time regression for tramp3d-v4
in NewPM-ReleaseLTO-g.
Differential Revision: https://reviews.llvm.org/D145478
Mikael Holmen [Wed, 8 Mar 2023 06:34:12 +0000 (07:34 +0100)]
Revert "[ADCE] Preserve MemorySSA if only debug instructions are removed"
This reverts commit
db7d8678bcdc440ffd0529f0d970cf10cbcbe984.
Mikael Holmen [Fri, 3 Mar 2023 13:20:26 +0000 (14:20 +0100)]
[ADCE] Preserve MemorySSA if only debug instructions are removed
As we've seen in
https://github.com/llvm/llvm-project/issues/58285
throwing away MemorySSA when only debug instructions are removed can lead
to different code when debug info is present or not present.
This is the second attempt at fixing the problem. The first one was
https://reviews.llvm.org/D145051
which was reverted due to a 15% compile time regression for tramp3d-v4
in NewPM-ReleaseLTO-g.
Vitaly Buka [Wed, 8 Mar 2023 06:26:07 +0000 (22:26 -0800)]
[fuzzer] Make sure we never delete Fuzzer
Wu, Yingcong [Wed, 8 Mar 2023 06:04:31 +0000 (22:04 -0800)]
Add test for Flags.data_flow_trace
`CollectDataFlow()` uses `Flags.collect_data_flow` and
`Flags.data_flow_trace` at the same time. But in the null check before
the invocation, only `Flags.collect_data_flow` is checked, and there is
no other method to make sure `Flags.data_flow_trace` is not null, so
adding a null check for `Flags.data_flow_trace`.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D145040
Wu, Yingcong [Wed, 8 Mar 2023 05:55:33 +0000 (21:55 -0800)]
Use the right printf format specifiers
Some printf format strings in libfuzzer are using the wrong specifizers, fix in this commit.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D145033
Bojun Seo [Wed, 8 Mar 2023 05:42:11 +0000 (21:42 -0800)]
[lsan] Initialize uptr value with number not boolean
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D145354
Dave MacLachlan [Wed, 8 Mar 2023 05:38:04 +0000 (21:38 -0800)]
[test] Remove fprintf argument after D144830
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D145461
Christopher Ferris [Wed, 8 Mar 2023 05:17:44 +0000 (05:17 +0000)]
[scudo] Do not instantiate Android svelte allocator.
The Android svelte allocator is not used, and will likely require
some configuration and experimentation to find a balanced config.
Leave the svelte config and size map so they can be used as the
basis for the future Android svelte config.
Reviewed By: Chia-hungDuan
Differential Revision: https://reviews.llvm.org/D145525
Argyrios Kyrtzidis [Tue, 7 Mar 2023 06:26:52 +0000 (22:26 -0800)]
[test/ARCMT/verify.m] Add lit test for `
5e035651fd3acbb2645abbe80cae332d90eac78a` commit
Differential Revision: https://reviews.llvm.org/D145473
Craig Topper [Wed, 8 Mar 2023 03:52:57 +0000 (19:52 -0800)]
[RISCV] Add test case for Zfa fli.s miscompile. NFC
The f32 matching code for fli was hacked to allow the f16 minimum value
to match for the fli.h instruction in the assembler. This was done
because the assembler parses the floating point literal for fli.h,
fli.s, and fli.d as a single precision value.
Unfortunately, this function is also used by CodeGen and causes
this value to be miscompiled for f32.
Jun Zhang [Wed, 8 Mar 2023 03:22:06 +0000 (11:22 +0800)]
Precommit tests for max(a,b) nsw/nuw - min(a,b) --> abs(a - b); NFC
Signed-off-by: Jun Zhang <jun@junz.org>
Nico Weber [Wed, 8 Mar 2023 03:14:11 +0000 (22:14 -0500)]
Revert "[clangd] Add support for missing includes analysis."
This reverts commit
38b9fb5a129db3e086610d53b534833273c5b4d0.
Breaks tests on Windows, see comments on https://reviews.llvm.org/D143496
Slava Zakharin [Wed, 8 Mar 2023 02:43:42 +0000 (18:43 -0800)]
[flang] Enable target rewrite for int args/rets of bind(c) functions.
BIND(C) subprograms must use the same target ABI as the C processor,
so 1/2-byte int args/rets must be rewritten to use signext attribute.
This change-set also sets fir.bindc_name for the math functions used
during lowering so that they can be fixed up as well (though, currently
none of them needs to be affected).
Differential Revision: https://reviews.llvm.org/D145537
Alina Sbirlea [Wed, 8 Mar 2023 01:08:36 +0000 (17:08 -0800)]
[lldb] Fix after __SVCount_t added for AArch64
Fix after
https://github.com/llvm/llvm-project/commit/
07158c54add927057690aa8c073d35d42eac7006
Differential Revision: https://reviews.llvm.org/D145533
Christudasan Devadasan [Wed, 1 Mar 2023 07:51:57 +0000 (13:21 +0530)]
[AMDGPU] Extend WorkGroupID* codegen for compute shaders
Currently, the codegen support for llvm.amdgcn.workgroup.id*
intrinsics are enabled only for compute kernels. In addition,
this patch enables their selection for compute shaders on
subtargets that have architected SGPRs.
Differential Revision: https://reviews.llvm.org/D145045
Konstantin Varlamov [Wed, 8 Mar 2023 01:51:42 +0000 (17:51 -0800)]
[libc++][ranges][NFC] Fix incorrect static asserts in `almost_satisfies_types.h`
Craig Topper [Wed, 8 Mar 2023 01:46:14 +0000 (17:46 -0800)]
[RISCV] Const correct some methods in RISCVOperand. NFC
Chen Zheng [Fri, 24 Feb 2023 08:16:50 +0000 (03:16 -0500)]
[DAGCombiner] don't use the pointer info for widen store
The merged store touches memory for other underlying objects, so mapping
the merged store to the first underlying object is not correct. For example
in https://github.com/llvm/llvm-project/issues/60744, the merged store is
not correctly analyzed as dependent with memory operations which are also
part of the merged store.
Fixes #60744
Reviewed By: foad
Differential Revision: https://reviews.llvm.org/D144711
Chen Zheng [Fri, 24 Feb 2023 09:24:19 +0000 (04:24 -0500)]
[DAGCombiner] add testcase for issue #60744; NFC
Alex MacLean [Wed, 8 Mar 2023 01:10:15 +0000 (17:10 -0800)]
[Inliner][NFC] Remove redundant nullptr check
Remove the null pointer check on Callee since it is guaranteed to pass by the check
at the top of the loop which continues if Callee is null. While this change is somewhat
trivial, for what it's worth this check triggers Coverity warnings because it implies that
Callee might be null at this point even though it is dereferenced in the preceding code.
Reviewed By: mtrofin
Differential Revision: https://reviews.llvm.org/D145463
Jie Fu [Wed, 8 Mar 2023 01:08:42 +0000 (09:08 +0800)]
[lldb] Add missing switch case for SveCount in TypeSystemClang::GetEncoding (NFC)
/data/llvm-project/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:4841:13: error: enumeration value 'SveCount' not handled in switch [-Werror,-Wswitch]
switch (llvm::cast<clang::BuiltinType>(qual_type)->getKind()) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Jez Ng [Fri, 3 Mar 2023 18:22:40 +0000 (10:22 -0800)]
[lld-macho][nfc] Convert more alignTo() to alignToPowerOf2()
Reviewed By: #lld-macho, smeenai
Differential Revision: https://reviews.llvm.org/D145261
Siva Chandra [Wed, 8 Mar 2023 00:46:08 +0000 (21:46 -0300)]
[libc] Add riscv64 syscall implementation.
All syscall wrapper functions which have unit tests have been enabled.
Reviewed By: kito-cheng
Differential Revision: https://reviews.llvm.org/D145452
Michael Jones [Sat, 4 Mar 2023 00:06:29 +0000 (16:06 -0800)]
[libc][docs] add link to join the discord
Previously we only linked to the channel within the discord.
Differential Revision: https://reviews.llvm.org/D145283
Mehdi Amini [Mon, 6 Mar 2023 17:09:51 +0000 (18:09 +0100)]
Make mlir-opt --show-dialects option print on a single line
Differential Revision: https://reviews.llvm.org/D145398
Jonas Devlieghere [Tue, 7 Mar 2023 23:59:30 +0000 (15:59 -0800)]
[lldb] Copy log files into diagnostic directory
This patch copies over log files to the diagnostic directory. The caveat
here is that this only works for logs that are redirected to a file. The
implementation piggybacks of the mapping kept by the debugger. The
advantage is that it's free until you generate the diagnostics, at which
point you only pay the price of copying over the file.
Differential revision: https://reviews.llvm.org/D135631
Craig Topper [Tue, 7 Mar 2023 23:33:50 +0000 (15:33 -0800)]
[RISCV] Don't accept '-min', '-inf' or '-nan' in RISCVAsmParser::parseFPImm.
We need to check for identifier before optionally parsing a minus sign.
Owen Pan [Tue, 7 Mar 2023 23:12:18 +0000 (15:12 -0800)]
[clang-format][NFC] Remove isCpp11AttributeSpecifier()
See https://reviews.llvm.org/D137486#3910570.
Michael Spencer [Tue, 7 Mar 2023 22:45:29 +0000 (14:45 -0800)]
[clang][DependencyScanner] Cache modulemap stat failures
Add `module.modulemap` as a file we cache stat failures for as there
are a lot of stats for this file.
Clang currently uses the files it should minimize as a proxy for files
it should cache stat failures for, but really we should cache stat
failures for all paths we don't expect to change during the build.
Unfortunately the VFS API does not know _why_ clang is trying to stat
a path, so we use the filename as a proxy.
Differential Revision: https://reviews.llvm.org/D145526
Daniel Thornburgh [Tue, 7 Mar 2023 00:02:29 +0000 (16:02 -0800)]
[Fuchsia] Add LLDB options to stage 1 cmake.
LLVM_ENABLE_PROJECTS is automatically forwarded from stage 1 builds to
stage 2 builds, so setting FUCHSIA_ENABLE_LLDB has no effect on
two-stage builds.
Instead, add FUCHSIA_ENABLE_LLDB to the stage one build as well.
This also disables curses and libedit by default for now in both stage1
and stage 2 builds; these should be opt-in.
Reviewed By: haowei
Differential Revision: https://reviews.llvm.org/D145449
Jez Ng [Tue, 7 Mar 2023 19:09:01 +0000 (11:09 -0800)]
[lld-macho] Warn on method name collisions from category definitions
This implements ld64's checks for duplicate method names in categories &
classes.
In addition, this sets us up for implementing Obj-C category merging.
This diff handles the most of the parsing work; what's left is rewriting
those category / class structures.
Numbers for chromium_framework:
base diff difference (95% CI)
sys_time 2.182 ยฑ 0.027 2.200 ยฑ 0.047 [ -0.2% .. +1.8%]
user_time 6.451 ยฑ 0.034 6.479 ยฑ 0.062 [ -0.0% .. +0.9%]
wall_time 6.841 ยฑ 0.048 6.885 ยฑ 0.105 [ -0.1% .. +1.4%]
samples 33 22
Fixes https://github.com/llvm/llvm-project/issues/54912.
Reviewed By: #lld-macho, thevinster, oontvoo
Differential Revision: https://reviews.llvm.org/D142916
Jeffrey Tan [Sat, 4 Feb 2023 01:09:09 +0000 (17:09 -0800)]
Add a new SBDebugger::SetDestroyCallback() API
Adding a new SBDebugger::SetDestroyCallback() API.
This API can be used by any client to query for statistics/metrics before
exiting debug sessions.
Differential Revision: https://reviews.llvm.org/D143520
Craig Topper [Tue, 7 Mar 2023 22:36:17 +0000 (14:36 -0800)]
[RISCV] Return MatchOperand_ParseFail instead of MatchOperand_NoMatch from parseFPImm.
MatchOperand_NoMatch will fall back to regular operand parsing.
Returning MatchOperand_ParseFail will prevent this.
We also printed our own error message which we should only do for
MatchOperand_ParseFail.
wren romano [Tue, 7 Mar 2023 20:26:20 +0000 (12:26 -0800)]
[mlir][sparse] Cleaning up code style for genCast
Reviewed By: aartbik
Differential Revision: https://reviews.llvm.org/D145432
Owen Pan [Tue, 7 Mar 2023 22:34:50 +0000 (14:34 -0800)]
[clang-format][NFC] Remove an obsolete case in parsing concepts
See https://reviews.llvm.org/D142412#4078127.
Han Zhu [Thu, 16 Feb 2023 23:19:50 +0000 (15:19 -0800)]
[SROA] Fix bug where RankVectorTypes is used in std::unique
`RankVectorTypes` is a not an equivalence relation so when it is used in
`std::unique`, the behavior is undefined. Create `RankVectorTypesEq` and use
that instead.
Chia-hung Duan [Sat, 4 Mar 2023 01:25:18 +0000 (01:25 +0000)]
[scudo] Simplify markFreeBlocks
With memory group, we always mark the free blocks from the same region.
Therefore, we don't need to calculate the offset from base and determine
the region index. Also improve the way we deal with the last block in
the region so that the loop body is simpler.
Reviewed By: cferris
Differential Revision: https://reviews.llvm.org/D143303
Peiming Liu [Tue, 7 Mar 2023 17:14:17 +0000 (17:14 +0000)]
[mlir][sparse] deduplicate non-unique coordinates when coiterating COO tensors
Reviewed By: aartbik
Differential Revision: https://reviews.llvm.org/D145518
David Green [Tue, 7 Mar 2023 21:24:16 +0000 (21:24 +0000)]
[AArch64] Prefer to fold dup into fmul/fma as opposed to ld1r
There is a fold to create LD1DUPpost from dup(load) that can be postinc. If the
dup is used by a "by element" operation such as fmul or fma then it can be
slightly better to fold the dup into the fmul instead, which produces slightly
fast code.
ld1r { v1.4s }, [x0], #4
fmul v0.4s, v1.4s, v0.4s
vs
ldr s1, [x0], #4
fmul v0.4s, v0.4s, v1.s[0]
This could also be done with integer operations such as smull/umull too, so
long as the load/dup gets correctly combined into the mul operation. Currently
this just operates on foating point types.
Differential Revision: https://reviews.llvm.org/D145184
Kazu Hirata [Tue, 7 Mar 2023 21:20:21 +0000 (13:20 -0800)]
[ControlHeightReduction] Freeze potentially poisonous conditions
This patch freezes potentially poisonous conditions in conditional
branches so that we do not "move up" conditional branches
"br i1 poison".
Differential Revision: https://reviews.llvm.org/D145008
Aaron Ballman [Tue, 7 Mar 2023 21:08:24 +0000 (16:08 -0500)]
Update the C status page for WG14 N2844
The proposal is about the behavior of the _Float16,
_Float32, and _Float64 types and whether they
undergo default argument promotions (they don't).
Clang doesn't yet support TS 18661 or the parts
that made it into C2x, so we don't implement this
paper.
Dave Lee [Sat, 18 Feb 2023 03:53:16 +0000 (19:53 -0800)]
Recommit "[lldb] Redefine p alias to dwim-print command"
Redefine the `p` alias to the `dwim-print` command instead of `expression`.
See https://reviews.llvm.org/D138315 for the introduction of `dwim-print`.
To summarize, `dwim-print` is, as the name suggests, a command for printing. How a value
gets printed, is decided by `dwim-print`. In some cases, `dwim-print` will print values
using the same means as `frame variable` (because it's generally more reliable and
faster that `expression` evaluation), and in other cases `dwim-print` uses the same code
path as `expression`.
This change has been tested in two different ways:
1. Re-aliasing `p` to `dwim-print`, as in this patch
2. Redefinining the `expression` command to `CommandObjectDWIMPrint`
Previously, many of the lldb's tests used `p`, and which meant a test run with `p`
aliases to `dwim-print` was a good way to test `dwim-print`. However most of those tests
were updated to use `expression` explicitly (in anticipation of this change). Now, the
best way to test `dwim-print` is the second approach:
```
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index
373c894f34f5..
9c943cd30c7c 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -539,7 +539,7 @@ void CommandInterpreter::LoadCommandDictionary() {
REGISTER_COMMAND_OBJECT("diagnostics", CommandObjectDiagnostics);
REGISTER_COMMAND_OBJECT("disassemble", CommandObjectDisassemble);
REGISTER_COMMAND_OBJECT("dwim-print", CommandObjectDWIMPrint);
- REGISTER_COMMAND_OBJECT("expression", CommandObjectExpression);
+ REGISTER_COMMAND_OBJECT("expression", CommandObjectDWIMPrint);
REGISTER_COMMAND_OBJECT("frame", CommandObjectMultiwordFrame);
REGISTER_COMMAND_OBJECT("gui", CommandObjectGUI);
REGISTER_COMMAND_OBJECT("help", CommandObjectHelp);
```
When the test suite is run with this change, there are two main categories of test
failures for specific to features that `dwim-print` intentionally doesn't support:
1. Top level expressions (`--top-level`/`-p`)
2. Multiline expressions
In cases where the behavior of `expression` is needed, users can use `expression` at
those times.
Differential Revision: https://reviews.llvm.org/D145189
Alexey Bataev [Mon, 20 Feb 2023 21:26:11 +0000 (13:26 -0800)]
[SLP]Initial support for reshuffling of non-starting buildvector/gather nodes.
Previously only the very first gather/buildvector node might be probed for reshuffling of other nodes.
But the compiler may do the same for other gather/buildvector nodes too, just need to check the
dependency and postpone the emission of the dependent nodes, if the origin nodes were not emitted yet.
Part of D110978
Differential Revision: https://reviews.llvm.org/D144958
Snehasish Kumar [Tue, 7 Mar 2023 19:34:57 +0000 (19:34 +0000)]
[memprof] Update the isRuntime symbolization check.
Update the isRuntime check to only match against known memprof filenames
where interceptors are defined. This avoid issues where the path does
not include the directory based on how the runtime was compiled. Also
update the unittest.
Reviewed By: tejohnson
Differential Revision: https://reviews.llvm.org/D145521
Mark de Wever [Tue, 7 Mar 2023 20:13:15 +0000 (21:13 +0100)]
[libc++] Fixes transitive includes.
Since the CI is broken, I didn't investigate why it happened. It just
fixes it.
Mitch Phillips [Tue, 7 Mar 2023 19:29:49 +0000 (11:29 -0800)]
Split getCompileUnitFor{Data,Code}Address.
Getting compile units for data addresses is much slower, as it often
requires a slow fallback path to walk every DWARF entry, as
data addresses don't fall into the compilation unit ranges.
Most lookups are code addresses, and don't need this logic. Split the
functionality out so that we restore the fast-path behaviour for the
code lookups.
More context at:
https://discourse.llvm.org/t/llvm-symbolizer-has-gotten-extremely-slow/67262
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D145009
James Y Knight [Wed, 8 Feb 2023 15:47:11 +0000 (10:47 -0500)]
[TableGen] Delete support for deprecated positional matching.
After the work in
a538d1f13a13 5351878ba196 372240dfe3d5, and
subsequently cleanup of all the in-tree targets, we can now delete the
support for positional operand matching!
This removes three options which could previously be set in a
Target's "InstrInfo" tablegen definition:
- useDeprecatedPositionallyEncodedOperands
- decodePositionallyEncodedOperands
- noNamedPositionallyEncodedOperands
(Also announced at https://discourse.llvm.org/t/tablegen-deleting-deprecated-positional-instruction-operand-matching-support/68524)
Differential Revision: https://reviews.llvm.org/D144210
Rahul Kayaith [Tue, 7 Feb 2023 21:07:50 +0000 (16:07 -0500)]
[mlir][python] Capture error diagnostics in exceptions
This updates most (all?) error-diagnostic-emitting python APIs to
capture error diagnostics and include them in the raised exception's
message:
```
>>> Operation.parse('"arith.addi"() : () -> ()'))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
mlir._mlir_libs.MLIRError: Unable to parse operation assembly:
error: "-":1:1: 'arith.addi' op requires one result
note: "-":1:1: see current operation: "arith.addi"() : () -> ()
```
The diagnostic information is available on the exception for users who
may want to customize the error message:
```
>>> try:
... Operation.parse('"arith.addi"() : () -> ()')
... except MLIRError as e:
... print(e.message)
... print(e.error_diagnostics)
... print(e.error_diagnostics[0].message)
...
Unable to parse operation assembly
[<mlir._mlir_libs._mlir.ir.DiagnosticInfo object at 0x7fed32bd6b70>]
'arith.addi' op requires one result
```
Error diagnostics captured in exceptions aren't propagated to diagnostic
handlers, to avoid double-reporting of errors. The context-level
`emit_error_diagnostics` option can be used to revert to the old
behaviour, causing error diagnostics to be reported to handlers instead
of as part of exceptions.
API changes:
- `Operation.verify` now raises an exception on verification failure,
instead of returning `false`
- The exception raised by the following methods has been changed to
`MLIRError`:
- `PassManager.run`
- `{Module,Operation,Type,Attribute}.parse`
- `{RankedTensorType,UnrankedTensorType}.get`
- `{MemRefType,UnrankedMemRefType}.get`
- `VectorType.get`
- `FloatAttr.get`
closes #60595
depends on D144804, D143830
Reviewed By: stellaraccident
Differential Revision: https://reviews.llvm.org/D143869
Michael Buch [Tue, 7 Mar 2023 15:59:33 +0000 (15:59 +0000)]
Reland "[lldb][TypeSystemClang] Use the CXXFunctionPointerSummaryProvider for member-function pointers"
With this patch member-function pointers are formatted using
`CXXFunctionPointerSummaryProvider`.
This turns,
```
(lldb) v pointer_to_member_func
(void (Foo::*)()) ::pointer_to_member_func = 0x00000000000000000000000100003f94
```
into
```
(lldb) v pointer_to_member_func
(void (Foo::*)()) ::pointer_to_member_func = 0x00000000000000000000000100003f94 (a.out`Foo::member_func() at main.cpp:3)
```
Differential Revision: https://reviews.llvm.org/D145242
Michael Buch [Tue, 7 Mar 2023 15:52:59 +0000 (15:52 +0000)]
Reland "[lldb][TypeSystemClang] Format pointers to member functions as eFormatHex"
Before this patch, LLDB used to format pointers to members, such as,
```
void (Foo::*pointer_to_member_func)() = &Foo::member_func;
```
as `eFormatBytes`. E.g.,
```
(lldb) v pointer_to_member_func
(void (Foo::*)()) $1 = 94 3f 00 00 01 00 00 00 00 00 00 00 00 00 00 00
```
This patch makes sure we format pointers to member functions the same
way we do regular function pointers.
After this patch we format member pointers as:
```
(lldb) v pointer_to_member_func
(void (Foo::*)()) ::pointer_to_member_func = 0x00000000000000000000000100003f94
```
Differential Revision: https://reviews.llvm.org/D145241
Alex Langford [Tue, 7 Mar 2023 00:04:35 +0000 (16:04 -0800)]
[lldb] Respect empty arguments in target.run-args
Currently empty arguments are not respected. They are silently dropped
in two places: (1) when extracting them from the target.run-args
setting and (2) when constructing the lldb-argdumper invocation.
(1) is actually a regression from a few years ago. We did not always
drop empty arguments. See
31d97a5c8ab78c619deada0cdb1fcf64021d25dd.
rdar://
106279228
Differential Revision: https://reviews.llvm.org/D145450
Dave Lee [Mon, 6 Mar 2023 23:06:25 +0000 (15:06 -0800)]
[lldb-vscode] Use `expression` command for completion
Change lldb-vscode to use the `expression` command for generating completions, instead
of the `p` alias.
Aliases are user overrideable, and even deletable, but the `expression` command is
unchangeable.
See D141539 where a similar replacement was done to tests.
Differential Revision: https://reviews.llvm.org/D145437
Andrew Gozillon [Tue, 7 Mar 2023 18:39:16 +0000 (12:39 -0600)]
[Flang][OpenMP][MLIR][Driver][bbc] Add -fopenmp-is-device flag to Flang -fc1 & the bbc tool, and omp.is_device attribute
Adds the -fopenmp-is-device flag to bbc and Flang's -fc1 (but not flang-new) and in addition adds an omp.is_device attribute onto the module when fopenmp is passed, this is a boolean attribute that is set to false or true dependent on if fopenmp-is-device is specified alongside the fopenmp flag on the commandline when invoking flang or bbc.
Reviewers:
awarzynski
kiranchandramohan
Differential Revision: https://reviews.llvm.org/D144864
Piotr Zegar [Tue, 7 Mar 2023 18:39:45 +0000 (18:39 +0000)]
[clang-tidy][NFC] Fix link in RelaseNotes
Fangrui Song [Tue, 7 Mar 2023 18:37:04 +0000 (10:37 -0800)]
[ELF][RISCV] Make .sdata and .sbss closer
GNU ld's internal linker scripts for RISC-V place .sdata and .sbss close.
This makes GP relaxation more profitable.
While here, when .sbss is present, set `__bss_start` to the start of
.sbss instead of .bss, to match GNU ld.
Note: GNU ld's internal linker scripts have symbol assignments and input
section descriptions which are not relevant for modern systems. We only
add things that make sense.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D145118
Mark de Wever [Sun, 29 Jan 2023 15:40:02 +0000 (16:40 +0100)]
[libc++] Addresses LWG3358
LWG3358 ยง[span.cons] is mistaken that to_address can throw
Since last - first has to throw tests are added to make sure this always
happens.
Depends on D142808
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D142843
Mark de Wever [Fri, 17 Feb 2023 18:57:58 +0000 (19:57 +0100)]
[libc++][format] Addresses LWG3839.
LWG3839 range_formatter's set_separator, set_brackets, and
underlying functions should be noexcept
Adds tests for:
template<ranges::input_range R, class charT>
struct range-default-formatter<range_format::sequence, R, charT>
These were missing, the format functions tests for the sequences
are already present.
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D144286
Siva Chandra Reddy [Tue, 7 Mar 2023 04:52:58 +0000 (20:52 -0800)]
[libc] Add a note about using assertions in the libc runtime code.
Reviewed By: lntue
Differential Revision: https://reviews.llvm.org/D145466
Siva Chandra Reddy [Tue, 7 Mar 2023 06:24:10 +0000 (06:24 +0000)]
[libc] Add fenv functions to arm32 baremetal config.
Also, an "arm" subfolder for baremetal config has been added.
Reviewed By: lntue
Differential Revision: https://reviews.llvm.org/D145476
Mark de Wever [Fri, 17 Feb 2023 17:55:48 +0000 (18:55 +0100)]
[libc++][format] Addresses LWG3881.
LWG3881 Incorrect formatting of container adapters backed by std::string
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D144277
Siva Chandra Reddy [Tue, 7 Mar 2023 07:44:26 +0000 (07:44 +0000)]
[libc] Move math.h and fenv.h macro definitions to llvm-libc-macros.
Reviewed By: lntue
Differential Revision: https://reviews.llvm.org/D145475
John Brawn [Tue, 7 Mar 2023 18:02:15 +0000 (18:02 +0000)]
Use explicit target in clang/test/Preprocessor/directives_asm.S
This prevents the test from failing when the default target doesn't
support the .warning directive.
Mark de Wever [Fri, 3 Mar 2023 18:41:36 +0000 (19:41 +0100)]
[libc++] Fixes basic_string operator& hijacking.
Avoids using operator& in basic_string since an evil char-like type can
hijack this operator. Added some more evil operators, this found a place
where equality was compared directly and not via the traits.
This adds a helper test string. This is now only used in a few tests,
but the intention is to use this in more tests for basic_string.
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D145257
Mark de Wever [Sat, 4 Mar 2023 19:00:42 +0000 (20:00 +0100)]
[libc++][format] Fixes invalid usage of m type.
The m type in a range formatter may only be used when a pair or a tuple
with two elements is used. This was not correctly validated as reported
in llvm.org/PR60995.
Reviewed By: ldionne, #libc
Differential Revision: https://reviews.llvm.org/D145309
Mark de Wever [Sat, 5 Nov 2022 17:33:25 +0000 (18:33 +0100)]
[libc++][format] Fix floating point formatting.
Fixes llvm.org/PR58714 reported by @jwakely and a similar issue
reported privately by @vitaut.
Reviewed By: ldionne, #libc
Differential Revision: https://reviews.llvm.org/D145306
Alex Brachet [Tue, 7 Mar 2023 17:49:22 +0000 (17:49 +0000)]
[libc] Fix integer conversion error in test
Uday Bondhugula [Tue, 7 Mar 2023 02:41:58 +0000 (08:11 +0530)]
[MLIR] Fix affine analysis check for ops with no common block
Fix affine analysis check for ops with no common block in their affine
scope. Clean up some out of date comments and naming.
Fixes: https://github.com/llvm/llvm-project/issues/59444
Differential Revision: https://reviews.llvm.org/D145460
Justin Cady [Mon, 6 Mar 2023 14:35:39 +0000 (09:35 -0500)]
[ELF] Add REVERSE input section description keyword
The `REVERSE` keyword is described here:
https://sourceware.org/bugzilla/show_bug.cgi?id=27565
It complements `SORT` by allowing the order of input sections to be reversed.
This is particularly useful for order-dependent sections such as .init_array,
where `REVERSE` can be used to either detect static initialization order fiasco
issues or as a mechanism to maintain .ctors element order while transitioning to
the modern .init_array. Such a transition is described here:
https://discourse.llvm.org/t/is-it-possible-to-manually-specify-init-array-order/68649
Differential Revision: https://reviews.llvm.org/D145381
Ethan Luis McDonough [Tue, 7 Mar 2023 17:38:50 +0000 (11:38 -0600)]
[flang] Lower complex part
Implements HLFIR lowering for %im and %re.
Reviewed By: jeanPerier
Differential Revision: https://reviews.llvm.org/D145005
Craig Topper [Tue, 7 Mar 2023 16:59:48 +0000 (08:59 -0800)]
[RISCV] Teach performCombineVMergeAndVOps to combine unmasked TU vpmerge with a masked MU TA op.
We can form a MU TU operation and remove the merge if they use the
same merge value.
My primary interest was a case involving VP intrinsics from our downstream,
but it requires another optimization that isn't in upstream yet. So I've used
RVV intrinsics to get the desired instructions.
Co-authored-by: Nitin John Raj <nitin.raj@sifive.com>
Reviewed By: fakepaper56
Differential Revision: https://reviews.llvm.org/D145272
Mariya Podchishchaeva [Tue, 7 Mar 2023 16:33:57 +0000 (11:33 -0500)]
[clang] Treat function parameter scope as an immediate function context
This results in expressions that appear in default function argument not
being checked for being actual constant expressions.
This aligns clang's behavior with the standard and fixes one of the
examples from https://wg21.link/P1073R3.
Reviewed By: shafik, cor3ntin
Differential Revision: https://reviews.llvm.org/D145251
Saleem Abdulrasool [Tue, 28 Feb 2023 22:21:08 +0000 (14:21 -0800)]
Driver: introduce GNU spellings to control MSVC paths
Add a set of `-Xmicrosoft` flags to control the Windows SDK and VisualC
tools directories. This allows control over the selection of the SDK
and tools when using the GNU driver.
Differential Revision: https://reviews.llvm.org/D145007
Reviewed By: mstorjo
Mariya Podchishchaeva [Tue, 7 Mar 2023 16:17:12 +0000 (11:17 -0500)]
[clang] Update test according to P1937
https://wg21.link/p1937 proposes that in unevaluated contexts, consteval
functions should not be immediately evaluated.
Clang implemented p1937 a while ago, its behavior is correct and the
test needs an update.
Reviewed By: aaron.ballman, shafik
Differential Revision: https://reviews.llvm.org/D145362
Nikolas Klauser [Sat, 4 Mar 2023 00:39:27 +0000 (01:39 +0100)]
[libc++] Fix ranges::binary_search() returning true for cases where the element is not in the range
Fixes #61160
Reviewed By: ldionne, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D145287
John Brawn [Wed, 1 Mar 2023 14:53:23 +0000 (14:53 +0000)]
[Lex] Use line markers in preprocessed assembly predefines file
GNU line marker directives are not recognised when preprocessing
assembly files, meaning they can't be used in the predefines file
meaning macros defined on the command line are reported as being
built-in.
Change this to permit line markers but only in the predefines file,
so we can correctly report command line macros as coming from the
command line.
Differential Revision: https://reviews.llvm.org/D145397