533889 Commits

Author SHA1 Message Date
Matt Arsenault
1004fae222 flang: Try to update test for oclc_daz_opt removal
Try to fix bot failure after 028429ac452acde227ae0bfafbfe8579c127e1ea
2025-04-13 10:01:49 +02:00
Fangrui Song
ca5b3a0f51 [MC] Remove SetUsed on isUndefined and getFragment
Due to the known limitations of .set reassignment (see
https://sourceware.org/PR288), we use diagnostics to reject patterns
that could lead to errors (ae7ac010594f693fdf7b3ab879e196428d961e75 2009-06)).

This code gets refined multiple times, see:

* 9b4a824217f1fe23f83045afe7521acb791bc2d0 (2010-05) `IsUsedInExpr`
* 46c79ef1132607aead144dfda0f26aa8b065214f (2010-11) renamed `IsUsedInExpr` to `IsUsed`

The related `SetUsed` bit seems unnecessary nowadays.
2025-04-13 00:53:29 -07:00
Pavel Labath
1c5ce2d74f Reapply "[lldb] ProcessGdbRemote header gardning"
This reverts commit 68ab45f0533f3bbfc1c96bddd53de7e769180219, reapplying
2fd860c1f559c0b0be66cc000e38270a04d0a1a3. The only change is keeping
"lldb/Host/Config.h", which I believe was the cause of the failures.
2025-04-13 09:52:30 +02:00
Matt Arsenault
028429ac45
clang/AMDGPU: Stop looking for oclc_daz_opt_* control libraries (#134805)
These have been empty since July 2023
2025-04-13 09:48:21 +02:00
A. Jiang
5c45e239e8
[libc++][test][NFC] Remove unused inclusions of <iostream> (#134776)
Some test files for flat container adaptors redundantly include
`<iostream>` and, surprisingly, `<cstddef>`. This patch removes the
redundant inclusions.

Inclusions of `<vector>` is also removed since a sane implementation is
expected to make instantiation of `flat_(multi)map<K, V>` or
`flat_(multi)set<K>` valid when only `<flat_map>` or `<flat_set>` is
included.
2025-04-13 15:17:58 +08:00
Christian Sigg
12a7155ee2 [mlir][bazel] Port mlir-translate bits of acf964b95f54. 2025-04-13 09:13:17 +02:00
Thurston Dang
d6e2aee9b1
Revert "[tosa]: canonicalize dynamic size of tosa.slice to static output shape" (#135525)
Reverts llvm/llvm-project#135429 due buildbot breakage:
https://lab.llvm.org/buildbot/#/builders/169/builds/10405

Based on the ASan output, I think after the replaceOp on line 775, it's
no longer valid to do getSize() on sliceOp:
```
   775      rewriter.replaceOp(sliceOp, newSliceOp.getResult());
   776
   777      // Remove const_shape size op when it no longer has use point.
   778      Operation *sizeConstShape = sliceOp.getSize().getDefiningOp();
```
2025-04-13 00:07:28 -07:00
Pavel Labath
f4fba20726
[lldb] Remove vestigial remnants of reproducers (#135361)
Not touching the SB API.
2025-04-13 08:55:24 +02:00
Kazu Hirata
7940b0546b [BOLT] Fix warning
This patch fixes:

  bolt/lib/Core/BinaryContext.cpp:582:8: error: unused variable
  'printEntryDiagnostics' [-Werror,-Wunused-variable]

  bolt/lib/Core/BinaryContext.cpp:842:10: error: unused variable
  'isSibling' [-Werror,-Wunused-variable]
2025-04-12 23:35:49 -07:00
Fangrui Song
6196379baf [PowerPC] Fix -Wunused-variable 2025-04-12 23:24:47 -07:00
Fangrui Song
19730e37ec ELFObjectWriter: Make .reloc test generic
Move `Fixup.getKind() >= FirstLiteralRelocationKind` from target hooks
to ELFObjectWriter::recordRelocation.

Currently, getRelocType cannot be skipped for LoongArch due to #135519
2025-04-12 23:02:24 -07:00
Fangrui Song
734660b6dd ELFObjectWriter: Simplify STT_SECTION adjustment 2025-04-12 21:34:57 -07:00
Congcong Cai
06814834a6
[clang-tidy] treat unsigned char and signed char as char type by default in bugprone-unintended-char-ostream-output (#134870)
Add `AllowedTypes` options to support custom defined char like type.
treat `unsigned char` and `signed char` as char like type by default.
The allowed types only effect when the var decl or explicit cast to this
non-canonical type names.

Fixed: #133425
2025-04-13 12:09:50 +08:00
Congcong Cai
302bc41410
[clang-tidy] matchesAnyListedTypeName support non canonical types (#134869) 2025-04-13 12:06:48 +08:00
Fangrui Song
3ff634dee8 Revert "ELFObjectWriter: Disable STT_SECTION adjustment for .reloc"
This reverts commit 1c5961c0481b9c7421d38e3141d3c5a1e6084234.
Inadvertently pushed.
2025-04-12 21:02:27 -07:00
Fangrui Song
1c5961c048 ELFObjectWriter: Disable STT_SECTION adjustment for .reloc
to match GNU Assembler. This generalizes the SHT_LLVM_CALL_GRAPH_PROFILE
(which uses BFD_RELOC_NONE https://reviews.llvm.org/D104080) special case.
2025-04-12 21:00:25 -07:00
Fangrui Song
329a675006 ELFObjectWriter: Simplify STT_SECTION adjustment. NFC 2025-04-12 20:54:05 -07:00
A. Jiang
3e7be494f8
[libc++][test] Test nasty_string in C++20 (#135338)
It seems that we can only rely on C++20 features and make `nasty_string`
also tested for MSVC STL.
2025-04-13 11:23:13 +08:00
Fangrui Song
39662922e1 MCObjectStreamer: Refine absoluteSymbolDiff condition
The function is called to test the fast path - when Lo/Hi are within the
same fragment. This is unsafe - Lo/Hi at the begin and end of a
relaxable fragment should not evaluate to a constant. However, we don't
have tests that exercise the code path.

Nevertheless, make the check safer and remove the now unnecessary
isRISCV check (from https://reviews.llvm.org/D103539).
2025-04-12 19:02:07 -07:00
Jakub Kuderski
b0acbbee88
[mlir][vector] Fix deprecation warning for .isa. NFC. (#135512)
This was introduced in: https://github.com/llvm/llvm-project/pull/135371
2025-04-12 21:49:40 -04:00
A. Jiang
cfa322fa9a
[libc++][NFC] Reuse __bit_log2 for sort (#135303)
The `__log2i` function template in `<algorithm/sort.h>` is basically
equivalent to `__bit_log2` in `<__bit/bit_log2.h>`. It seems better to
avoid duplication.
2025-04-13 09:45:18 +08:00
Sayan Saha
60b1d44d70
[tosa]: canonicalize dynamic size of tosa.slice to static output shape (#135429)
Addresses https://github.com/llvm/llvm-project/issues/135389
2025-04-12 18:24:07 -04:00
Shilei Tian
b0fede358f
[ThinLTO] Don't convert functions to declarations if force-import-all is enabled (#134541)
On one hand, we intend to force import all functions when the option is
enabled.
On the other hand, we currently drop definitions of some functions and
convert
them to declarations, which contradicts this intent.

With this PR, functions will no longer be converted to declarations when
`force-import-all` is enabled.
2025-04-12 18:22:22 -04:00
Owen Pan
5f744cc630
[clang-format] Wrap and indent lambda braces in GNU style (#135479)
Fix #133135
2025-04-12 15:06:21 -07:00
Owen Pan
09c8cfe219
[clang-format][NFC] Add isJava() and isTextProto() in FormatStyle (#135466)
Also remove redundant name qualifiers format::, FormatStyle::, and
LanguageKind::.
2025-04-12 15:04:29 -07:00
Jan Patrick Lehr
bbc5d205d4
[MLIR] Fix build after #131492 (#135502)
After #131492 is appears that linking MLIRAritDialect was missing.
2025-04-12 23:22:42 +02:00
Maksim Levental
d903f6b672 [mlir][SMT] fix MLIRExportSMTLIB by linking MLIRArithDialect 2025-04-12 17:08:57 -04:00
Sam Elliott
f0dc236d33
[RISCV][NFC] Correct c_lui_imm (#135448)
The MCOperandPredicate seems to allow symbols as well as immediates, but
the parser/matcher does not due to `isCLUIImm`. This brings both in line
with each other, and should prevent trying to compress a `lui` with a
symbol, which cannot be emitted as a `c.lui` as there are no relocations
for this as `R_RISCV_RVC_LUI` is deprecated/removed.
2025-04-12 22:57:29 +02:00
Min Hsu
75dea80085 [mailmap] Consolidate all my email addresses 2025-04-12 13:48:02 -07:00
Maksim Levental
acf964b95f
[mlir][SMT] add export smtlib (#131492)
This PR adds the `ExportSMTLIB` translation/egress pass for `SMT`
dialect.
2025-04-12 16:39:16 -04:00
Nikolas Klauser
5bdad0555e
[libc++][NFC] Remove a few aliases in __tree (#134392)
These aliases aren't required anymore, since we've taken an ABI break
unconditionally which these were used to avoid.
2025-04-12 22:39:01 +02:00
Florian Hahn
4fa3b2a184
[VPlan] Use TypeAnalysis instead of underlying instr in VPPredInst (NFC)
Removes another unnecessary use of the underlying instructions during
VPlan execution.
2025-04-12 20:54:27 +01:00
Florian Hahn
995fd47944
[LAA] Make sure MaxVF for Store-Load forward safe dep distances is pow2.
MaxVF computed in couldPreventStoreLoadFowrard may not be a power of 2,
as CommonStride may not be a power-of-2.

This can cause crashes after 78777a20. Use bit_floor to make sure it is
a suitable power-of-2.

Fixes https://github.com/llvm/llvm-project/issues/134696.
2025-04-12 20:05:37 +01:00
Paul Kirth
b71123f127
[clang-doc] Pre-commit tests for static members and functions (#135456)
Issue #59813 mentions that static members are not included in
the documentation generated by clang-doc. This patch adds
some basic testing for that property, with the current incorrect
behavior. Follow up patches will address the missing documentation.
2025-04-12 10:54:27 -07:00
Matheus Izvekov
761787d425
Reland: [clang] Improved canonicalization for template specialization types (#135414)
This relands https://github.com/llvm/llvm-project/pull/135119, after
fixing crashes seen in LLDB CI reported here:
https://github.com/llvm/llvm-project/pull/135119#issuecomment-2794910840

Fixes https://github.com/llvm/llvm-project/pull/135119

This changes the TemplateArgument representation to hold a flag
indicating whether a tempalte argument of expression type is supposed to
be canonical or not.

This gets one step closer to solving
https://github.com/llvm/llvm-project/issues/92292

This still doesn't try to unique as-written TSTs. While this would
increase the amount of memory savings and make code dealing with the AST
more well-behaved, profiling template argument lists is still too
expensive for this to be worthwhile, at least for now.

This also fixes the context creation of TSTs, so that they don't in some
cases get incorrectly flagged as sugar over their own canonical form.
This is captured in the test expectation change of some AST dumps.

This fixes some places which were unnecessarily canonicalizing these
TSTs.
2025-04-12 14:26:30 -03:00
Craig Topper
009971a0d3
[TableGen] Accurately calculate where the source variable ops start in PseudoLoweringEmitter::emitLoweringEmitter. (#135465)
The code was using the number of source operands plus one. The plus one
seems to be an ARM specific value accounting for one of the source
operands having 2 sub operands. No other target in tree uses
PseudoLowering with variadic instructions so this worked.

This patch replaces it with a proper count of the number of sub operands
of all operands. While there I update the loop to use MIOperandNo so we
don't need to count up the sub operands as we go.
2025-04-12 10:00:56 -07:00
Matt Arsenault
b233d79623
R600: Expand is_fpclass (#135234) 2025-04-12 18:49:12 +02:00
Maksim Levental
c6a892e0ed
[mlir][SMT] restore custom builder for forall/exists (#135470)
This reverts commit 54e70ac7650f1c22f687937d1a082e4152f97b22 which
itself fixed an [asan
leak](https://lab.llvm.org/buildbot/#/builders/55/builds/9761) from the
original upstreaming commit. The leak was due to op allocations not
being `free`ed.

~~The necessary change was to explicitly `->destroy()` the ops at the
end of the tests. I believe this is because the rewriter used in the
tests doesn't actually insert them into a module and so without an
explicit `->destroy()` no bookkeeping process is able to take care of
them.~~

The necessary change was to use `OwningOpRef` which calls `op->erase()`
in its [own
destructor](89cfae41ec/mlir/include/mlir/IR/OwningOpRef.h (L39)).
2025-04-12 12:32:40 -04:00
Philip Reames
33e5305c59 [RISCV] Further explain vfmerge.vfm/vmerge.vxm varuat coverage 2025-04-12 07:38:31 -07:00
Jon Roelofs
e838b8b7e7
[Matrix] Fix a miscompile due to an incorrect double-transpose fold (#135397)
Transposes are only inverses of each other when they have matching
shapes.

rdar://145592582
2025-04-12 07:31:13 -07:00
Mark de Wever
d39d24cec1 [libc++][doc] Updates the release notes.
Copies the not-yet-implemented items planned for removal from the
LLVM-20 to the LLVM-21 release notes. This allows to better keep track
of the status of the next release.
2025-04-12 15:26:48 +02:00
Mark de Wever
6de15379f4
[NFC][libc++][test] Minor updates to generated header version test. (#134543)
Adjusting the existing script to match the new output makes it easy to
review the new script works correctly.

This adjusts the tests to match the changes in the new tests, Notably
- removes the synopsis uses 2 spaces indent in `# if`

It does not implement the conditional include part. This would be quite
some effort and these diffs are easy to review manually.

Note there are no tests for the changes; the existing script will be
phased out when the next generators are complete.
2025-04-12 14:20:01 +02:00
Jacek Caban
2b270df2e7
[Object][COFF] Avoid underscore prefix for forwarding exports (#135433)
Fixes #132411.
2025-04-12 13:24:45 +02:00
Andreas Jonson
4dd80b73b0 [SimplifyCFG] test for trunc condition (NFC) 2025-04-12 12:25:40 +02:00
Yingwei Zheng
8b40a09bf5
[Clang][CodeGen][UBSan] Remove redundant EmitCheckValue calls. NFCI (#135141)
`EmitCheckValue` is called inside `EmitCheck`:

b122956390/clang/lib/CodeGen/CGExpr.cpp (L3739)
The outside calls are redundant because
`EmitCheckValue(EmitCheckValue(V))` always returns `EmitCheckValue(V)`.

Required by https://github.com/llvm/llvm-project/pull/135135.
2025-04-12 15:35:45 +08:00
Yingwei Zheng
76e07d8ba5
[LibCall] Infer nocallback for libcalls (#135173)
This patch adds `nocallback` attributes for string/math libcalls. It
allows FuncAttributor to infer `norecurse` more precisely and encourages
more aggressive global optimization.
2025-04-12 15:11:54 +08:00
Aiden Grossman
339f58de16 [Github] Add llvm-symbolizer to CI container
This is needed for symbolizing some test failures. It is under 8MB, so there is
very little cost to adding it.
2025-04-12 05:22:13 +00:00
Fangrui Song
b864405c9b MCAsmInfo: Remove unused UseParensForDollarSignNames
Follow-up to 3acccf042ab8a7b7e663bb2b2fac328d9bf65b38
2025-04-11 22:09:24 -07:00
donald chen
7a6a79551d
[NFC][equivalenceClass] Refactor coding style in EquivalenceClasses.h. (#135467) 2025-04-12 13:08:50 +08:00
Brad Smith
d49063b496
[compiler-rt][sanitizer][NFC] update endif markers for Haiku (#135475) 2025-04-12 00:49:23 -04:00