<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Target/AMDGPU/AMDGPUSplitModule.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[AMDGPU] Remove const on a return type. (#168490)</title>
<updated>2025-11-18T15:16:58+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-11-18T15:16:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=00ef94805a8c3ced416f8854b80452eb7d0bac2a'/>
<id>00ef94805a8c3ced416f8854b80452eb7d0bac2a</id>
<content type='text'>
While I am at it, this patch switches to the constructor that takes
a container instead of a pair of begin/end.

Identified with readability-const-return-type.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While I am at it, this patch switches to the constructor that takes
a container instead of a pair of begin/end.

Identified with readability-const-return-type.</pre>
</div>
</content>
</entry>
<entry>
<title>[AMDGPU][SplitModule] Do not create empty modules (#135761)</title>
<updated>2025-04-25T07:36:41+00:00</updated>
<author>
<name>Pierre van Houtryve</name>
<email>pierre.vanhoutryve@amd.com</email>
</author>
<published>2025-04-25T07:36:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2168455ef4cdbec9df3b63900fe9b316154187cf'/>
<id>2168455ef4cdbec9df3b63900fe9b316154187cf</id>
<content type='text'>
Skip creating a module if no function is going to be imported.
Also includes a change so that if the first partition is empty (which
can happen),
we import global with non-local linkage into the first non-empty
partition, instead
of P0 all the time.

I thought we'd need to change users of the SplitModule callback so they
can deal with less modules
than the number requested, but no. We already return only 1 module in
some cases and
it seems to be handled just fine.

Fixes SWDEV-523146</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Skip creating a module if no function is going to be imported.
Also includes a change so that if the first partition is empty (which
can happen),
we import global with non-local linkage into the first non-empty
partition, instead
of P0 all the time.

I thought we'd need to change users of the SplitModule callback so they
can deal with less modules
than the number requested, but no. We already return only 1 module in
some cases and
it seems to be handled just fine.

Fixes SWDEV-523146</pre>
</div>
</content>
</entry>
<entry>
<title>[CostModel] Fix InlineSizeEstimatorAnalysis after #135596</title>
<updated>2025-04-23T07:20:12+00:00</updated>
<author>
<name>David Green</name>
<email>david.green@arm.com</email>
</author>
<published>2025-04-23T07:20:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=dd3de590ebd63566a1a54eb0e2140c433a9add84'/>
<id>dd3de590ebd63566a1a54eb0e2140c433a9add84</id>
<content type='text'>
Fix a reference to getValue() being optional in InlineSizeEstimatorAnalysis, a
file that is not included in the default build. A "warning: enumerated and
non-enumerated type in conditional expression" warning is fixed in AMDGPU too.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix a reference to getValue() being optional in InlineSizeEstimatorAnalysis, a
file that is not included in the default build. A "warning: enumerated and
non-enumerated type in conditional expression" warning is fixed in AMDGPU too.
</pre>
</div>
</content>
</entry>
<entry>
<title>[CostModel] Remove optional from InstructionCost::getValue() (#135596)</title>
<updated>2025-04-23T06:46:27+00:00</updated>
<author>
<name>David Green</name>
<email>david.green@arm.com</email>
</author>
<published>2025-04-23T06:46:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=98b6f8dc699d789d834e5b6d810ed217f560aad0'/>
<id>98b6f8dc699d789d834e5b6d810ed217f560aad0</id>
<content type='text'>
InstructionCost is already an optional value, containing an Invalid
state that can be checked with isValid(). There is little point in
returning another optional from getValue(). Most uses do not make use of
it being a std::optional, dereferencing the value directly (either
isValid has been checked previously or the Cost is assumed to be valid).
The one case that does in AMDGPU used value_or which has been replaced
by a isValid() check.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
InstructionCost is already an optional value, containing an Invalid
state that can be checked with isValid(). There is little point in
returning another optional from getValue(). Most uses do not make use of
it being a std::optional, dereferencing the value directly (either
isValid has been checked previously or the Cost is assumed to be valid).
The one case that does in AMDGPU used value_or which has been replaced
by a isValid() check.</pre>
</div>
</content>
</entry>
<entry>
<title>[EquivClasses] Shorten members_{begin,end} idiom (#134373)</title>
<updated>2025-04-04T13:34:08+00:00</updated>
<author>
<name>Ramkumar Ramachandra</name>
<email>ramkumar.ramachandra@codasip.com</email>
</author>
<published>2025-04-04T13:34:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fd6260f13bfecfb13537e184f4e8365cf35492fd'/>
<id>fd6260f13bfecfb13537e184f4e8365cf35492fd</id>
<content type='text'>
Introduce members() iterator-helper to shorten the members_{begin,end}
idiom. A previous attempt of this patch was #130319, which had to be
reverted due to unit-test failures when attempting to call members() on
the end iterator. In this patch, members() accepts either an ECValue or
an ElemTy, which is more intuitive and doesn't suffer from the same
issue.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce members() iterator-helper to shorten the members_{begin,end}
idiom. A previous attempt of this patch was #130319, which had to be
reverted due to unit-test failures when attempting to call members() on
the end iterator. In this patch, members() accepts either an ECValue or
an ElemTy, which is more intuitive and doesn't suffer from the same
issue.</pre>
</div>
</content>
</entry>
<entry>
<title>[EquivalenceClasses] Use SmallVector for deterministic iteration order. (#134075)</title>
<updated>2025-04-02T19:27:43+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-04-02T19:27:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3bdf9a08804a5b424fd32fef3b0089f3a6db839d'/>
<id>3bdf9a08804a5b424fd32fef3b0089f3a6db839d</id>
<content type='text'>
Currently iterators over EquivalenceClasses will iterate over std::set,
which guarantees the order specified by the comperator. Unfortunately in
many cases, EquivalenceClasses are used with pointers, so iterating over
std::set of pointers will not be deterministic across runs.

There are multiple places that explicitly try to sort the equivalence
classes before using them to try to get a deterministic order
(LowerTypeTests, SplitModule), but there are others that do not at the
moment and this can result at least in non-determinstic value naming in
Float2Int.

This patch updates EquivalenceClasses to keep track of all members via a
extra SmallVector and removes code from LowerTypeTests and SplitModule
to sort the classes before processing.

Overall it looks like compile-time slightly decreases in most cases, but
close to noise:

https://llvm-compile-time-tracker.com/compare.php?from=7d441d9892295a6eb8aaf481e1715f039f6f224f&amp;to=b0c2ac67a88d3ef86987e2f82115ea0170675a17&amp;stat=instructions

PR: https://github.com/llvm/llvm-project/pull/134075</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently iterators over EquivalenceClasses will iterate over std::set,
which guarantees the order specified by the comperator. Unfortunately in
many cases, EquivalenceClasses are used with pointers, so iterating over
std::set of pointers will not be deterministic across runs.

There are multiple places that explicitly try to sort the equivalence
classes before using them to try to get a deterministic order
(LowerTypeTests, SplitModule), but there are others that do not at the
moment and this can result at least in non-determinstic value naming in
Float2Int.

This patch updates EquivalenceClasses to keep track of all members via a
extra SmallVector and removes code from LowerTypeTests and SplitModule
to sort the classes before processing.

Overall it looks like compile-time slightly decreases in most cases, but
close to noise:

https://llvm-compile-time-tracker.com/compare.php?from=7d441d9892295a6eb8aaf481e1715f039f6f224f&amp;to=b0c2ac67a88d3ef86987e2f82115ea0170675a17&amp;stat=instructions

PR: https://github.com/llvm/llvm-project/pull/134075</pre>
</div>
</content>
</entry>
<entry>
<title>[EquivalenceClasses] Update member_begin to take ECValue (NFC).</title>
<updated>2025-04-01T08:28:46+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-04-01T08:28:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9e5bfbf77db0945f59c0d18012a8e6d43c711b3a'/>
<id>9e5bfbf77db0945f59c0d18012a8e6d43c711b3a</id>
<content type='text'>
Remove a level of indirection and update code to use range-based for
loops.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove a level of indirection and update code to use range-based for
loops.
</pre>
</div>
</content>
</entry>
<entry>
<title>[Target] Use *Set::insert_range (NFC) (#132140)</title>
<updated>2025-03-20T16:09:30+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-03-20T16:09:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=71935281e02cfaef2bd109bcb58f0d80039ffd15'/>
<id>71935281e02cfaef2bd109bcb58f0d80039ffd15</id>
<content type='text'>
DenseSet, SmallPtrSet, SmallSet, SetVector, and StringSet recently
gained C++23-style insert_range.  This patch replaces:

  Dest.insert(Src.begin(), Src.end());

with:

  Dest.insert_range(Src);

This patch does not touch custom begin like succ_begin for now.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
DenseSet, SmallPtrSet, SmallSet, SetVector, and StringSet recently
gained C++23-style insert_range.  This patch replaces:

  Dest.insert(Src.begin(), Src.end());

with:

  Dest.insert_range(Src);

This patch does not touch custom begin like succ_begin for now.</pre>
</div>
</content>
</entry>
<entry>
<title>[Support] Introduce new `AdvisoryLock` interface (#130989)</title>
<updated>2025-03-13T17:54:51+00:00</updated>
<author>
<name>Jan Svoboda</name>
<email>jan_svoboda@apple.com</email>
</author>
<published>2025-03-13T17:54:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d8dfdafc1d75ab17f742d40ab93240a10c216507'/>
<id>d8dfdafc1d75ab17f742d40ab93240a10c216507</id>
<content type='text'>
This PR abstracts the `LockFileManager` API into new `AdvisoryLock`
interface. This is so that we can create an alternative implementation
for Clang implicitly-built modules that is optimized for single-process
environment.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR abstracts the `LockFileManager` API into new `AdvisoryLock`
interface. This is so that we can create an alternative implementation
for Clang implicitly-built modules that is optimized for single-process
environment.</pre>
</div>
</content>
</entry>
<entry>
<title>[Support] Do not remove lock file on failure (#130834)</title>
<updated>2025-03-12T15:51:00+00:00</updated>
<author>
<name>Jan Svoboda</name>
<email>jan_svoboda@apple.com</email>
</author>
<published>2025-03-12T15:51:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f4d599cda90aa06d1e1a95474a0ee3a4053e77dd'/>
<id>f4d599cda90aa06d1e1a95474a0ee3a4053e77dd</id>
<content type='text'>
Clients of `LockFileManager` call `unsafeRemoveLockFile()` whenever
`tryLock()` fails. However looking at the code, there are no scenarios
where this actually does something useful. This PR removes such calls.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Clients of `LockFileManager` call `unsafeRemoveLockFile()` whenever
`tryLock()` fails. However looking at the code, there are no scenarios
where this actually does something useful. This PR removes such calls.</pre>
</div>
</content>
</entry>
</feed>
