Commit Graph

516869 Commits

Author SHA1 Message Date
Kazu Hirata
890c4bece2 [memprof] Use SmallVector for InlinedCallStack (NFC) (#114599)
We can stay within 8 inlined elements more than 99% of the time while
building a large application.
2024-11-01 19:52:11 -07:00
Mirko
4d3c427f33 [CodeGen] Use first EHLabel as a stop gate for live range shrinking (#114195)
This fixes issue #114194

The issue happens during the `LiveRangeShrink` pass, which runs early,
before phi elimination. LandingPads, which are lowered to EHLabels, need
to be the first non phi instruction in an EHPad. In case of a phi node
being in front of the EHLabel and a use being after the EHLabel, we
hoist the use in front of the label.

This results in a portion of the landingpad missing due to being hoisted
in front of the label.
2024-11-01 19:13:18 -07:00
Owen Pan
6ca816f88d [clang-format] Fix a regression in parsing switch in macro call (#114506)
Fixes #114408.
2024-11-01 18:47:50 -07:00
LLVM GN Syncbot
a6fc677f10 [gn build] Port ef2a104c94 2024-11-02 01:30:09 +00:00
LLVM GN Syncbot
9adf50c179 [gn build] Port c72a751dab 2024-11-02 01:30:09 +00:00
LLVM GN Syncbot
cecb3c4ad7 [gn build] Port 7ec26b23f2 2024-11-02 01:30:08 +00:00
Nico Weber
decf88d3e9 [gn] port eeee5a44bb (clang-sycl-linker)
Also port follow-up 0d499f9043.
2024-11-01 21:28:48 -04:00
Timm Bäder
c2a892f49a Revert "[clang][bytecode] Implement bitcasts to floating-point values (#114485)"
This reverts commit c752efbdcc.

This broke bots:
 - https://lab.llvm.org/buildbot/#/builders/13/builds/3268
 - https://lab.llvm.org/buildbot/#/builders/42/builds/1718
2024-11-02 01:54:38 +01:00
Hubert Tong
0812cde3bf NFC: Make isPPC64 const and use member initializer 2024-11-01 20:41:25 -04:00
Lang Hames
df78e6b872 [JITLink] Don't return errors from pointer and jump stub creators.
Creation of pointers and jump stubs always succeeds for all existing JITLink
backends, and I haven't been able to think of a scenario where it would fail.
(Pointer / stub *fixup* may fail due to range errors, but that will happen
later and the APIs already account for it).
2024-11-02 11:36:53 +11:00
Jonas Devlieghere
c8209943fa [lldb] Improve locking in PathMappingLists (NFC) (#114576)
In [D148380](https://reviews.llvm.org/D148380), Alex added locking to
PathMappingLists. The current implementation runs the callback under the
lock, which I don't believe is necessary. As far as I can tell, no users
of the callback are relying on the list not having been modified until
the callback is handled.

This patch implements my suggestion to unlock the mutex before the
callback. I also switched to a non-recursive mutex as I don't believe
the recursive property is needed. To make the class fully thread safe, I
did have to introduce another mutex to protect the callback members.

The motivation for this change is #114507. Specifically,
Target::SetExecutableModule calls Target::GetOrCreateModule, which
potentially performs path remapping, which in turns has a callback to
Target::SetExecutableModule.
2024-11-01 16:38:14 -07:00
Alex MacLean
8ff60c4d47 [NVPTX] Add support for nvvm.flo.[us] intrinsics (#114489)
Add support for '`llvm.nvvm.flo.[su].*`' intrinsics which correspond to
a PTX `bfind` instruction.
See [PTX ISA 9.7.1.16. Integer Arithmetic Instructions: bfind]
(https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#integer-arithmetic-instructions-bfind)

The '`llvm.nvvm.flo.u`' family of intrinsics identifies the bit position
of the leading one, returning either it's offset from the most or least
significant bit.

The '`llvm.nvvm.flo.s`' family of intrinsics identifies the bit position
of the leading non-sign bit, returning either it's offset from the most
or least significant bit.
2024-11-01 16:35:43 -07:00
Sam Clegg
9a450a0096 [lld][WebAssembly] Implement various thinlto flags (#114327)
The changes in this PR (both in the code and the tests) are largely
copied directly from the ELF linker.

Partial fix for #79604.
2024-11-01 16:34:06 -07:00
Vitaly Buka
80b9f07436 [VPlan] Suppress leak in test (#114624)
Probably needs a better fix. #114623
2024-11-01 16:26:59 -07:00
Nick Desaulniers
89560cd612 [libc] disable failing include tests (#114619)
These are failing to link for some buildbots. It's not immediately clear
why,
disable these and add a todo to investigate.

Link: #111403
Link: #114566
Link: #114618
2024-11-01 15:32:48 -07:00
vporpo
083369fd99 [SandboxVec][Legality] Per opcode checks (#114145)
This patch adds more opcode-specific legality checks.
2024-11-01 15:04:03 -07:00
Nick Desaulniers
acd04c2e18 [libc][cmake] disable include tests in overlay mode (#114566)
This avoids -Wmacro-redefinition diagnostics observed when building the
libc_include_tests ninja target.

For example, the signbit_test will attempt to include BOTH our math-macros.h
(via math-function-macros.h), and the system's math.h (via hdr/math_macros.h).

While it's nice that we can get some coverage of the headers we will provide to
end users of fullbuilds in CI of overlay builds, it's not worth chasing each
individual conflict and disabling some include tests as conflicts arise.

Disable the include tests unless `-DLLVM_LIBC_FULL_BUILD=ON` is specified.
2024-11-01 15:01:11 -07:00
Thurston Dang
e549ec529c [msan] Add handleIntrinsicByApplyingToShadow; support NEON tbl/tbx (#114490)
This adds a general function that handles intrinsics by applying the
intrinsic to the shadows, and applies it to the specific case of Arm
NEON TBL/TBX intrinsics.

This also updates the tests from
https://github.com/llvm/llvm-project/pull/114462
2024-11-01 14:58:45 -07:00
Walter Erquinigo
c1df376b0c [LLDB] Finish implementing support for DW_FORM_data16 (#113508)
This FORM already has support within LLDB to be parsed as a 16-byte
BLOCK, and all that is left to properly support it in the DWARFParser is
to add it to some enums.

With this, I can debug programs that use libstdc++.so.6.0.33 built with
GCC.
2024-11-01 17:33:08 -04:00
Ivan Butygin
f54cdc5d6e [mlir] IntegerRangeAnalysis: add support for vector type (#112292)
Treat integer range for vector type as union of ranges of individual
elements. With this semantics, most arith ops on vectors will work out
of the box, the only special handling needed for constants and vector
elements manipulation ops.

The end goal of these changes is to be able to optimize vectorized index
calculations.
2024-11-01 23:58:16 +03:00
Florian Hahn
17bad1a9da [LV] Bail out on header phis in shouldConsiderInvariant.
This fixes an infinite recursion in rare cases.

Fixes https://github.com/llvm/llvm-project/issues/113794.
2024-11-01 20:51:25 +00:00
Oleksandr T.
21895a84cf [libc] rename LLVM_LIBC_SRC___SUPPORT_UINT_H to LLVM_LIBC_SRC___SUPPORT_BIG_INT_H for consistent naming (#114592)
Fixes #114572
2024-11-01 13:48:39 -07:00
Dave Lee
2bd21b26e2 [lldb] Improve command status when dwim-print has no result (#114478)
When an expression produces no result, set `dwim-print` status to 
`eReturnStatusSuccessFinishNoResult`.
2024-11-01 13:39:14 -07:00
Alex MacLean
57183b6fe1 [NVPTX] Add support for stacksave, stackrestore intrinsics (#114484)
Add support for the '`@llvm.stacksave`' and '`@llvm.stackrestore`'
intrinsics to NVPTX. These are implemented with the `stacksave` and
`stackrestore` PTX instructions respectively.

See [PTX ISA 9.7.17. Stack Manipulation Instructions]
(https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#stack-manipulation-instructions).
2024-11-01 13:26:28 -07:00
Krystian Stasiowski
b24650e814 Reapply "[Clang][Sema] Always use latest redeclaration of primary template" (#114569)
This patch reapplies #114258, fixing an infinite recursion bug in
`ASTImporter` that occurs when importing the primary template of a class
template specialization when the latest redeclaration of that template
is a friend declaration in the primary template.
2024-11-01 16:15:33 -04:00
Valentin Clement
308c00749d [flang][cuda][NFC] Fix format 2024-11-01 12:42:06 -07:00
Valentin Clement (バレンタイン クレメン)
32473864cb [flang][cuda] Data transfer with descriptor (#114598)
Reopen PR #114302 as it was automatically closed. 

Review in #114302
2024-11-01 12:35:48 -07:00
Louis Dionne
1a187674a1 [libc++] Use proper functions instead of macros in bsd_locale_defaults.h (#113759)
We were using macros instead of functions, leading to the inability to
properly qualify calls to those symbols inside <locale>. This is also a
step towards making the locale API modules-correct.
2024-11-01 15:16:09 -04:00
Henrich Lauko
cd340a4957 [mlir][Ptr] Fix license url typo (#114555) 2024-11-01 20:10:04 +01:00
Han-Kuan Chen
a795a18bba [SLP][REVEC] VF should be scaled when ScalarTy is FixedVectorType. (#114551) 2024-11-02 03:03:52 +08:00
Shilei Tian
5445edb5d6 [PassBuilder] Replace bool LTOPreLink with ThinOrFullLTOPhase Phase (#114564)
This will allow more fine-grained control in the future.
2024-11-01 14:56:35 -04:00
Louis Dionne
339c788fd0 [libc++] Add missing include 2024-11-01 14:40:31 -04:00
lntue
88a0a318e8 [libc] Use relative inclusion for public headers. (#114324)
We are finalizing the header inclusion policy, and for our public
headers in the `libc/include` folder, they must use relative path in
`"..."` when including each other.

This PR does the cleanup making sure that all the public header
inclusions in `libc/include` folder use relative paths.

---------

Co-authored-by: Nick Desaulniers <nickdesaulniers@users.noreply.github.com>
2024-11-01 14:33:30 -04:00
Valentin Clement (バレンタイン クレメン)
7792dbe29a Reland '[flang][runtime] Allow different memmov function in assign' (#114587)
Reland #114301
2024-11-01 11:26:39 -07:00
Zequan Wu
0cfcd387f9 [lldb][NativePDB] Parse global variables. (#114303)
This doesn't parse S_CONSTANT case yet, because I found that the global
variable `std::strong_ordering::equal` is a S_CONSTANT and has type of
LF_STRUCTURE which is not currently handled when creating dwarf
expression for the variable. Left a TODO for it to finish later.

This makes `lldb/test/Shell/SymbolFile/PDB/ast-restore.test` and
`lldb/test/Shell/SymbolFile/PDB/calling-conventions-x86.test` pass on
windows with native pdb plugin only.
2024-11-01 14:15:54 -04:00
Simon Pilgrim
8634e358eb [AArch64][ARM] Avoid some APFloat copies in tablegen patterns. NFC. (#114416)
Either the N->getValueAPF() was being unused or we were failing to make use of it returning a const APFloat&
2024-11-01 18:14:59 +00:00
Alex Langford
c3782f67da [lldb] Disable automatically opening editor for TestSessionSave (#114469) 2024-11-01 11:12:29 -07:00
Jonas Devlieghere
16a6c10bd4 [lldb] Fix warning: comparison of integers of different signs 2024-11-01 11:06:18 -07:00
Jonas Devlieghere
f33b5b7937 [lldb] INSTANTIATE_TEST_CASE_P -> INSTANTIATE_TEST_SUITE_P
INSTANTIATE_TEST_CASE_P is deprecated in favor of
INSTANTIATE_TEST_SUITE_P.
2024-11-01 11:03:19 -07:00
Razvan Lupusoru
c0a1597029 [mlir][acc] Consistency between acc.loop and acc compute ops (#114549)
- GangPrivate and GangFirstPrivate renamed to just Private and
Firstprivate respectively. This is makes compute ops consistent with the
loop op (and also with the acc spec wording for the clause).
- Added getBody to all compute ops
- Verifier for firstprivate ops / recipes is enabled
2024-11-01 10:53:51 -07:00
Valentin Clement (バレンタイン クレメン)
c5a254cdd7 Revert "[flang][runtime][NFC] Allow different memmove function in assign" (#114581)
Reverts llvm/llvm-project#114301
2024-11-01 10:40:10 -07:00
Lang Hames
f04aaf9482 [ORC][ELF] Process .init_array sections in priority order.
Fixes compiler-rt/test/orc/TestCases/Linux/x86-64/priority-static-initializer.S
testcase after 244ea40625. This testcase had been succeeding because the
definition order of the .init_array sections in the testcase matched their
priorities, but began failing once 244ea40625 removed that guarantee. The
proper fix is to visit the .init_array sections according to their priority
order, regardless of how they're defined in the file.

This fixes the single-file testcase, but I think that ELFNixPlatform will need
to be extended to make priorities work correctly across file boundaries.
2024-11-01 10:35:49 -07:00
Lang Hames
841227a5d9 Re-apply "Revert "[JITLink] Use MapVector to stabilize iteration.."" with fixes.
This re-applies 244ea40625, which was reverted in 0019d06185 while I
investigated a bot failure. The fix for the failure will be committed as a
follow-up.
2024-11-01 10:35:49 -07:00
Valentin Clement (バレンタイン クレメン)
b278fe3297 [flang][runtime][NFC] Allow different memmove function in assign (#114301)
- Add a parameter to the `Assign` function to be able to use a different
`memmove` function. This is preparatory work to be able to use the
`Assign` function between host and device data.
- Expose the `Assign` function so it can be used from different files. 

- The new `memmoveFct` is not used in `BlankPadCharacterAssignment` yet
since it is not clear if there is a need. It will be updated in case it
is needed.
2024-11-01 10:34:03 -07:00
Simon Pilgrim
718d50d6d0 [VectorCombine] foldPermuteOfBinops - prefer the new fold for matching costs.
Minor tweak to #114101 - as we're reducing the instruction count, we should prefer the fold if the old/new costs are the same.
2024-11-01 17:28:37 +00:00
Matt Arsenault
8e61aaa021 AMDGPU: Fix illegal commute with frame index (#114497)
In ca409892c5, frame indexes started
being treated more like registers, rather than immediates. Update
the commute logic to avoid failing the verifier by moving illegal
SGPR operands in place of a frame index.
2024-11-01 10:02:29 -07:00
Louis Dionne
d301b59b7b [libc++][NFC] Add a static assertion to document an assumption in std::hash (#114440)
The implementation of std::hash for unsigned long makes the (correct)
assumption that size_t is at least as large as unsigned long. If that
were not the case on a platform, the implementation of std::hash for
unsigned long would be absolutely terrible. Add a static assertion to
document that assumption.
2024-11-01 12:58:15 -04:00
Min-Yih Hsu
64314dedeb [InlineCost] Print inline cost for invoke call sites as well (#114476)
Previously InlineCostAnnotationPrinter only prints inline cost for call
instructions. I don't think there is any reason not to analyze invoke
and its callee, and this patch adds such support.
2024-11-01 09:55:17 -07:00
Luke Lau
faa385a9f4 [RISCV] Add tests for length changing shuffles
Tests taken from Luke's 88147 with minimal changes by me (preames).

The main case of interest here is when mask length is less than source
length (i.e. length is decreasing).  We often scalarize these, which
on RISCV can be quite painful.
2024-11-01 09:51:39 -07:00
c8ef
b57b3f6425 [NFC] Simple typo correction. (#114548) 2024-11-02 00:40:57 +08:00