526806 Commits

Author SHA1 Message Date
Brad Smith
55632404bd
[benchmark] Sync a few commits from upstream to help with CPU count (#126410)
Try to use the _SC_NPROCESSORS_ONLN sysconf elsewhere
(cherry picked from commit edb1e76d8cb080a396c7c992e5d4023e1a777bd1)

Replace usage of deprecated sysctl on macOS
(cherry picked from commit faaa266d33ff203e28b31dd31be9f90c29f28d04)

Retrieve the number of online CPUs on OpenBSD and NetBSD
(cherry picked from commit 41e81b1ca4bbb41d234f2d0f2c56591db78ebb83)

Update error message now that /proc/cpuinfo is no longer in use
(cherry picked from commit c35af58b61daa111c93924e0e7b65022871fadac)

Fix runtime crash when parsing /proc/cpuinfo fails
(cherry picked from commit 39be87d3004ff9ff4cdf736651af80c3d15e2497)

another reversal of something that breaks on wasm
(cherry picked from commit 44507bc91ff9a23ad8ad4120cfc6b0d9bd27e2ca)
2025-02-10 00:06:25 -05:00
Mikołaj Piróg
161cfc6f39
[AVX10.2] Fix wrong intrinsic names after rename (#126390)
In my previous PR (#123656) to update the names of AVX10.2 intrinsics
and mnemonics, I have erroneously deleted `_ph` from few intrinsics.
This PR corrects this.
2025-02-10 12:48:02 +08:00
Shilei Tian
967973512b
[AMDGPU] Don't unify divergent exit nodes with musttail calls (#126395)
Fixes SWDEV-512254.
2025-02-09 21:48:24 -05:00
Elvis Wang
2e3729bf40
[LV] Prevent query the computeCost() when VF=1 in emitInvalidCostRemarks(). (#117288)
We should only query the computeCost() when the VF is vector.
2025-02-10 08:40:28 +08:00
Jonathan Thackray
560cea61ab
[NFC][AArch64] move AArch64 non auto-generated tests to static file (#126312)
Move AArch64 non auto-generated test code into a static file, since the
script `./llvm/test/CodeGen/AArch64/Atomics/generate-tests.py` will overwrite
these tests when re-run. (Test code was originally added in change
465bc5e729fd755880b9a288de42a37ad1206301)
2025-02-10 00:03:05 +00:00
Craig Topper
04e5ea5237 [TableGen] Remove recursive walk of linked list from ContractNodes. NFC
After f9250401ef120a4605ad67bb43d3b25500900498, this function is
tail recursive so it was straightforward to convert this to iteratively
walk the linkd list.
2025-02-09 14:23:34 -08:00
Kazu Hirata
af6c6992cf
[TableGen] Avoid repeated hash lookups (NFC) (#126433) 2025-02-09 13:35:58 -08:00
Kazu Hirata
df25511f0e
[Coroutines] Avoid repeated hash lookups (NFC) (#126432) 2025-02-09 13:35:12 -08:00
Kazu Hirata
d1af9ca9fd
[AsmPrinter] Avoid repeated map lookups (NFC) (#126431) 2025-02-09 13:34:47 -08:00
Kazu Hirata
aa066e36f8
[AMDGPU] Avoid repeated hash lookups (NFC) (#126430) 2025-02-09 13:34:28 -08:00
Kazu Hirata
b48b422c08
[Serialization] Avoid repeated hash lookups (NFC) (#126429) 2025-02-09 13:33:46 -08:00
Kazu Hirata
f6f052625e
[Sema] Avoid repeated hash lookups (NFC) (#126428) 2025-02-09 13:33:03 -08:00
Kazu Hirata
3ce96b9ee9
[Analysis] Avoid repeated hash lookups (NFC) (#126402) 2025-02-09 13:32:37 -08:00
Alexander Richardson
d2047242e6
[CSKY] Default to unsigned char
This matches the ABI document found at
https://github.com/c-sky/csky-doc/blob/master/C-SKY_V2_CPU_Applications_Binary_Interface_Standards_Manual.pdf

Partially addresses https://github.com/llvm/llvm-project/issues/115957

Reviewed By: zixuan-wu

Pull Request: https://github.com/llvm/llvm-project/pull/115961
2025-02-09 12:18:52 -08:00
Hassnaa Hamdi
e9a20f77ee
Reland "[LV]: Teach LV to recursively (de)interleave." (#125094)
This patch relands the changes from "[LV]: Teach LV to recursively
(de)interleave.#122989"
    Reason for revert:
- The patch exposed an assert in the vectorizer related to VF difference
between
legacy cost model and VPlan-based cost model because of uncalculated
cost for
VPInstruction which is created by VPlanTransforms as a replacement to
'or disjoint'
       instruction.
VPlanTransforms do that instructions change when there are memory
interleaving and
predicated blocks, but that change didn't cause problems because at most
cases the cost
      difference between legacy/new models is not noticeable.
    - Issue is fixed by #125434

Original patch: https://github.com/llvm/llvm-project/pull/89018
Reviewed-by: paulwalker-arm, Mel-Chen
2025-02-09 19:21:54 +00:00
Jonas Devlieghere
4722200773
[lldb] Merge TestSBCommandReturnObject tests
In #125132, Michael pointed out that there are now two tests with the
same name:

./lldb/test/API/api/command-return-object/TestSBCommandReturnObject.py
./lldb/test/API/python_api/commandreturnobject/TestSBCommandReturnObject.py
2025-02-09 11:16:59 -08:00
Andreas Jonson
3d140004c7 [ValueTracking] Test for not in dominating condition. (NFC) 2025-02-09 18:16:51 +01:00
Simon Pilgrim
4972722f90
[X86] lowerV4F64Shuffle - prefer lowerShuffleAsDecomposedShuffleMerge if we're blending inplace/splatable shuffle inputs on AVX2 targets (#126420)
More aggressively use broadcast instructions where possible

Fixes #50315
2025-02-09 17:11:18 +00:00
Kazu Hirata
87ae9547ea
[TableGen] Avoid repeated hash lookups (NFC) (#126405) 2025-02-09 08:56:17 -08:00
Kazu Hirata
db348c8e8b
[Passes] Avoid repeated hash lookups (NFC) (#126404) 2025-02-09 08:55:55 -08:00
Kazu Hirata
c741cf1617
[CodeGen] Avoid repeated hash lookups (NFC) (#126403) 2025-02-09 08:55:43 -08:00
Kazu Hirata
6444ed5365
[AST] Avoid repeated hash lookups (NFC) (#126400) 2025-02-09 08:55:31 -08:00
Joseph Huber
ed9107f2d7
[OpenMP] Replace use of target address space with <gpuintrin.h> local (#126119)
Summary:
This definition is more portable since it defines the correct value for
the target. I got rid of the helper mostly because I think it's easy
enough to use now that it's a type and being explicit about what's
`undef` or `poison` is good.
2025-02-09 10:25:25 -06:00
Simon Pilgrim
70906f0514 [LV][X86] Regenerate interleaved load/store costs. NFC.
update_analyze_test_checks has improved the checks since these were last updated.

Reduce noise diffs in future patches.
2025-02-09 15:02:41 +00:00
Mark de Wever
cb1b51f4ff [libc++][doc] Updates format status. 2025-02-09 15:11:13 +01:00
Mark de Wever
8a4707bf1d [NFC][libc++] Fixes minor issues in the synopsis. 2025-02-09 15:08:30 +01:00
Andrzej Warzynski
b1a267e1b9 [mlir][vector] Remove references to non-existing patterns (nfc)
Delete references to:
  * `VectorLoadToMemrefLoadLowering`,
  * `VectorStoreToMemrefStoreLowering`.

These patters were removed in #121454.
2025-02-09 13:54:11 +00:00
Joseph Huber
a32efd8edc [Clang] Disable failing offload test on darwin
Summary:
We don't support offloading on Darwin. This fails because there's some
handling missing somewhere else that likely won't ever be added.
2025-02-09 07:32:50 -06:00
Ritanya-B-Bharadwaj
4c470d0c93
This commit fixes the build failure due to OMP_TRAIT_PROPERTY macro r… (#126222)
…edefinition - https://github.com/llvm/llvm-project/issues/126043
2025-02-09 18:33:03 +05:30
Andreas Jonson
09a500b3db [ValueTracking] more test of trunc to i1 as condition in dominating condition. (NFC) 2025-02-09 13:57:41 +01:00
Florian Hahn
32c4493d5f
[VPlan] Add incoming values for all predecessor to ResumePHI (NFCI).
Follow-up as discussed when using VPInstruction::ResumePhi for all resume
values (#112147). This patch explicitly adds incoming values for each
predecessor in VPlan. This simplifies codegen and allows transformations
adjusting the predecessors of blocks with

NFC modulo incoming block order in phis.
2025-02-09 11:20:20 +00:00
Andreas Jonson
5ecc86bbca [ValueTracking] test trunc to i1 as condition in dominating condition. (NFC) 2025-02-09 10:35:14 +01:00
Abhishek Kaushik
7b348f9bfd
[MIR][NFC] Use std::move to avoid copying (#125930) 2025-02-09 13:51:34 +05:30
Owen Pan
8d373ceaec
[clang-format] Handle C-style cast of member function pointer type (#126340)
Fixes #125012.
2025-02-08 23:22:33 -08:00
Kazu Hirata
66c31f5d02
[AMDGPU] Avoid repeated hash lookups (NFC) (#126401)
This patch just cleans up the "if" condition.  Further cleanups are
left to subsequent patches.
2025-02-08 23:17:06 -08:00
Michael Park
59cbe2ff59
[C++20][Modules][Serialization] Add an additional test case for #120277. (#126349)
4b35dd57b8
was shipped to address https://github.com/llvm/llvm-project/issues/120277 .

It was thought to be a regression in 19.x according to this comment:
https://github.com/llvm/llvm-project/issues/120277#issuecomment-2558991129

This is a test case that fails even in 17.x but nevertheless is also
fixed by: 4b35dd57b8
2025-02-08 22:29:23 -08:00
Jonas Devlieghere
7c60725fcf
Revert "Remove dependence on <ciso646>" (#126399)
Reverts llvm/llvm-project#73273
2025-02-08 20:22:15 -08:00
Michael Kenzel
c89735d289
Remove dependence on <ciso646> (#73273)
C++23 removed `<ciso646>` from the standard library. The header is used
in two places: Once in order to pull in standard library macros. Since
this file also includes `<optional>`, that use of `<ciso646>` is
technically redundant, but should probably be left in in case a future
change ever removes the include of `<optional>`. A second use of
`<ciso646>` appears to have been introduced in
da650094b187ee3c8017d74f63c885663faca1d8, but seems unnecessary (the
file doesn't seem to use anything from that header, and it seems to
build just fine on MSVC here without it). The new `<version>` header
should be supported by all supported implementations. This change
replaces uses of `<ciso646>` with the `<version>` header, or removes
them entirely where unnecessary.
2025-02-08 18:48:01 -08:00
Fangrui Song
10ed0e4065 [ELF] Reorder target-specific error messaes 2025-02-08 16:36:46 -08:00
Min-Yih Hsu
c40877d095
[RISCV] Attach an implicit source operand on vector copies (#126155)
Somtimes when we're breaking up a large vector copy into several smaller
ones, not every single smaller source registers are initialized at the
time when the original COPY happens, and the verifier will not be
pleased when seeing the smaller copies reading from an undef register.
This patch is a workaround for the said issue by attaching an implicit
read of the source operand on the newly generated copies.

This is tested by llvm/test/CodeGen/RISCV/rvv/vector-interleave.ll which
would have crashed the compiler without this fix when
LLVM_EXPENSIVE_CHECK is enabled. Original context:
https://github.com/llvm/llvm-project/pull/124825#issuecomment-2639097531

---------

Co-authored-by: Craig Topper <craig.topper@sifive.com>
2025-02-08 16:25:27 -08:00
Craig Topper
4aa71f0d4c [TableGen] Fix an unused variable warning. NFC 2025-02-08 16:03:44 -08:00
Craig Topper
f9250401ef [TableGen] Move formation of MoveSiblingMatcher earlier in ContractNodes. NFC
ContractNodes recursively walks forward through a linked list. During
this recursion, Matchers are combined into other Matchers.

Previously the formation of MoveSiblingMatcher was after the
recursive call so it occurred as we were unwinding. If a
MoveSiblingMatcher was formed, we would recursively walk forward
to the end of the linked list again which isn't efficient.

To make this more efficient, move the formation of MoveSiblingMatcher
to the forward pass. Add additional rules to unfold MoveSiblingMatcher
if it would be more efficient to use CheckChildType, CheckChildInteger,
CheckChildSame, etc.

As an added benefit, this makes the function tail recursive which
the compiler can better optimize.
2025-02-08 15:58:12 -08:00
Jason Molenda
fec6d168bb
[lldb] Upstream a few remaining Triple::XROS patches (#126335)
Recognize the visionOS Triple::OSType::XROS os type. Some of these have
already been landed on main, but I reviewed the downstream sources and
there were a few that still needed to be landed upstream.
2025-02-08 15:50:52 -08:00
Wael Yehia
8e61aae4a8
[profile] Add a clang option -fprofile-continuous that enables continuous instrumentation profiling mode (#124353)
In Continuous instrumentation profiling mode, profile or coverage data
collected via compiler instrumentation is continuously synced to the
profile file. This feature has existed for a while, and is documented
here:

https://clang.llvm.org/docs/SourceBasedCodeCoverage.html#running-the-instrumented-program
This PR creates a user facing option to enable the feature.

---------

Co-authored-by: Wael Yehia <wyehia@ca.ibm.com>
2025-02-08 17:25:07 -05:00
YongKang Zhu
1e0a489671
[BOLT] Resolve symlink for library lookup (#126386) 2025-02-08 14:02:46 -08:00
Kazu Hirata
cf5947be13
[TableGen] Avoid repeated map lookups (NFC) (#126381) 2025-02-08 11:36:35 -08:00
Kazu Hirata
7628fcf3d4
[CrossTU] Avoid repeated hash lookups (NFC) (#126380) 2025-02-08 11:36:05 -08:00
Kazu Hirata
2fee5ef235
[ByteCode] Avoid repeated hash lookups (NFC) (#126379) 2025-02-08 11:35:45 -08:00
Kazu Hirata
451007173a
[Analysis] Avoid repeated hash lookups (NFC) (#126378) 2025-02-08 11:35:17 -08:00
David Green
ca9c0486cc [ARM] Silence "enumerated and non-enumerated type in conditional expression" warning. NFC
Fixes #125543
2025-02-08 19:32:14 +00:00