Skip to content

Conversation

@z1-cciauto
Copy link
Collaborator

No description provided.

zyn0217 and others added 16 commits November 12, 2025 12:10
Found it while looking at other stuffs.
…#166791)

Support for lowering collapse already exists within
`genLoopNestClauses`, which is called when lowering taskloop. However,
the TODO message still included the Collapse clause, so it was not
activated. By removing this, it enables lowering of the Collapse clause
in taskloop.
…llvm#167684)

We've been seeing (rare) crashes from both
`CPlusPlusLanguage::SymbolNameFitsToLanguage` and
`ObjCLanguage::SymbolNameFitsToLanguage` when we try to read contents of
the `ConstString`s of the `Mangled` parameter. I'm not entirely sure how
that can happen (current theory is corrupted stack somehow which
overwrites `ConstString::m_string` to an invalid pointer) but I'm not
able to confirm that.

One thing these crashes had in common is that they operate on the
`Mangled` object we copied into `SymbolNameFitsToLanguage` by value.
While I can't see off the top why that would cause it to contain
unintiailized/corrupt `ConstString`s, the class is sufficiently large
enough to probably pass it by `const &` anyway. This is what this patch
does.

rdar://164519648
…StringRef (llvm#167660)

We've seen some crashes around this area (particularly around
checking/handling raw C-strings). Dealing with `StringRef`s makes it a
bit easier to reason about.

This doesn't fix anything per se, but is an improvement in readability.

rdar://164519648
In the LLVM-C library, there is currently no way to get information about a
DbgRecord - which is the new way to attach debug information to llvm
instructions.

We can only iterate on debug records with LLVMGetFirstDbgRecord/
LLVMGetLastDbgRecord/LLVMGetNextDbgRecord, but there is no way to read
information.

This PR adds utility functions to read DbgRecord information.
…tor (llvm#163558)

This patch applies the same optimization as implemented in llvm#151304 to
the overloads taking an allocator as the second argument.

Apple M4:
```
Benchmark                                                               old             new    Difference    % Difference
-----------------------------------------------------------  --------------  --------------  ------------  --------------
std::map<int,_int>::ctor(&&,_different_allocs)/0                      14.59           12.78         -1.81         -12.41%
std::map<int,_int>::ctor(&&,_different_allocs)/1024                16407.05         6265.11     -10141.94         -61.81%
std::map<int,_int>::ctor(&&,_different_allocs)/32                    395.99          199.76       -196.23         -49.56%
std::map<int,_int>::ctor(&&,_different_allocs)/8192               141478.67        53767.84     -87710.83         -62.00%
std::map<int,_int>::ctor(const&,_alloc)/0                             12.83           12.71         -0.12          -0.94%
std::map<int,_int>::ctor(const&,_alloc)/1024                        9979.71         7849.11      -2130.59         -21.35%
std::map<int,_int>::ctor(const&,_alloc)/32                           283.82          266.05        -17.77          -6.26%
std::map<int,_int>::ctor(const&,_alloc)/8192                       81418.63        63190.41     -18228.21         -22.39%
std::map<std::string,_int>::ctor(&&,_different_allocs)/0              14.58           12.68         -1.90         -13.00%
std::map<std::string,_int>::ctor(&&,_different_allocs)/1024        19513.56         7806.04     -11707.52         -60.00%
std::map<std::string,_int>::ctor(&&,_different_allocs)/32            477.80          247.28       -230.52         -48.25%
std::map<std::string,_int>::ctor(&&,_different_allocs)/8192       504558.78        69592.21    -434966.56         -86.21%
std::map<std::string,_int>::ctor(const&,_alloc)/0                     12.64           12.60         -0.04          -0.33%
std::map<std::string,_int>::ctor(const&,_alloc)/1024               43198.53        37220.54      -5977.99         -13.84%
std::map<std::string,_int>::ctor(const&,_alloc)/32                   928.39          867.03        -61.36          -6.61%
std::map<std::string,_int>::ctor(const&,_alloc)/8192              461313.81       389200.82     -72112.99         -15.63%
```
Handle each event type in a different function
Only the fortran source files in flang/test have been modified. The
other files in the directory will be cleaned up in subsequent commits
…lvm#149042)

Building on top of llvm#148817,
introduce a new abstract LastActiveLane opcode that gets lowered to
Not(Mask) → FirstActiveLane(NotMask) → Sub(result, 1).

When folding the tail, update all extracts for uses outside the loop the
extract the value of the last actice lane.

See also llvm#148603

PR: llvm#149042
llvm#164671)

Make use of AVX512 VPLZCNT/VPOPCNT to perform the big integer bit counts per vector element and then use VPCOMPRESS to extract the first non-zero element result.

There's more we can do here (widen/split other vector widths etc.) - but this is a good starting point.
Without this patch, DenseMap::swap and SmallDenseMap::swap are
inconsistent because DenseMap::swap increments the epoch while
SmallDenseMap::swap does not.

This patch solves the inconsistency by making DenseMapBase::swap the
public entry point and renaming the existing swap to swapImpl.

To ease the review process, this patch does not move or group
functions according to access specifiers like private: and protected:.
This commit adds support for legalizing pointer casts between array and
vector types within the SPIRV backend.

This is necessary to handle cases where a vector is loaded from or
stored to an array, which can occur with HLSL matrix types.

The following changes are included:
- Added  to load a vector from an array.
- Added  to store a vector to an array.
- Added the  test case to verify the functionality.
@z1-cciauto z1-cciauto requested a review from a team November 12, 2025 15:28
@z1-cciauto
Copy link
Collaborator Author

@z1-cciauto z1-cciauto merged commit ab0b829 into amd-staging Nov 12, 2025
13 checks passed
@z1-cciauto z1-cciauto deleted the upstream_merge_202511121028 branch November 12, 2025 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.