<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp, branch users/nico/python-2</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>[NFC][DebugInfo] Use iterator-flavour getFirstNonPHI at many call-sites (#123737)</title>
<updated>2025-01-24T13:27:56+00:00</updated>
<author>
<name>Jeremy Morse</name>
<email>jeremy.morse@sony.com</email>
</author>
<published>2025-01-24T13:27:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6292a808b3524d9ba6f4ce55bc5b9e547b088dd8'/>
<id>6292a808b3524d9ba6f4ce55bc5b9e547b088dd8</id>
<content type='text'>
As part of the "RemoveDIs" project, BasicBlock::iterator now carries a
debug-info bit that's needed when getFirstNonPHI and similar feed into
instruction insertion positions. Call-sites where that's necessary were
updated a year ago; but to ensure some type safety however, we'd like to
have all calls to getFirstNonPHI use the iterator-returning version.

This patch changes a bunch of call-sites calling getFirstNonPHI to use
getFirstNonPHIIt, which returns an iterator. All these call sites are
where it's obviously safe to fetch the iterator then dereference it. A
follow-up patch will contain less-obviously-safe changes.

We'll eventually deprecate and remove the instruction-pointer
getFirstNonPHI, but not before adding concise documentation of what
considerations are needed (very few).

---------

Co-authored-by: Stephen Tozer &lt;Melamoto@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As part of the "RemoveDIs" project, BasicBlock::iterator now carries a
debug-info bit that's needed when getFirstNonPHI and similar feed into
instruction insertion positions. Call-sites where that's necessary were
updated a year ago; but to ensure some type safety however, we'd like to
have all calls to getFirstNonPHI use the iterator-returning version.

This patch changes a bunch of call-sites calling getFirstNonPHI to use
getFirstNonPHIIt, which returns an iterator. All these call sites are
where it's obviously safe to fetch the iterator then dereference it. A
follow-up patch will contain less-obviously-safe changes.

We'll eventually deprecate and remove the instruction-pointer
getFirstNonPHI, but not before adding concise documentation of what
considerations are needed (very few).

---------

Co-authored-by: Stephen Tozer &lt;Melamoto@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[Transforms] Migrate to a new version of getValueProfDataFromInst (#96380)</title>
<updated>2024-06-30T21:54:07+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2024-06-30T21:54:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3cf762b7b77e62761eedde02f03e968353bdb7a0'/>
<id>3cf762b7b77e62761eedde02f03e968353bdb7a0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[Transforms] Migrate to a new version of getValueProfDataFromInst (#95442)</title>
<updated>2024-06-14T16:35:32+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2024-06-14T16:35:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2f5ec13761fa672cb39ff147d876c2604c08bcae'/>
<id>2f5ec13761fa672cb39ff147d876c2604c08bcae</id>
<content type='text'>
Note that the version of getValueProfDataFromInst that returns bool
has been "deprecated" since:

  commit 1e15371dd8843dfc52b9435afaa133997c1773d8
  Author: Mingming Liu &lt;mingmingl@google.com&gt;
  Date:   Mon Apr 1 15:14:49 2024 -0700

---------

Co-authored-by: Mingming Liu &lt;minglotus6@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Note that the version of getValueProfDataFromInst that returns bool
has been "deprecated" since:

  commit 1e15371dd8843dfc52b9435afaa133997c1773d8
  Author: Mingming Liu &lt;mingmingl@google.com&gt;
  Date:   Mon Apr 1 15:14:49 2024 -0700

---------

Co-authored-by: Mingming Liu &lt;minglotus6@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[Instrumentation] Remove an extraneous ArrayRef (NFC) (#94890)</title>
<updated>2024-06-09T16:32:52+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2024-06-09T16:32:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f7ccb320859b9e341f74dc0cd7791a3b871eb937'/>
<id>f7ccb320859b9e341f74dc0cd7791a3b871eb937</id>
<content type='text'>
We can implicitly convert RemainingVDs to an ArrayRef.  Note that
RemainingVDs is of type SmallVector&lt;InstrProfValueData, 24&gt;.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can implicitly convert RemainingVDs to an ArrayRef.  Note that
RemainingVDs is of type SmallVector&lt;InstrProfValueData, 24&gt;.</pre>
</div>
</content>
</entry>
<entry>
<title>Use BlockFrequency type in more places (NFC) (#68266)</title>
<updated>2023-10-05T18:40:17+00:00</updated>
<author>
<name>Matthias Braun</name>
<email>matze@braunis.de</email>
</author>
<published>2023-10-05T18:40:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5181156b3743df29dc840e15990d9202b3501f60'/>
<id>5181156b3743df29dc840e15990d9202b3501f60</id>
<content type='text'>
The `BlockFrequency` class abstracts `uint64_t` frequency values. Use it
more consistently in various APIs and disable implicit conversion to
make usage more consistent and explicit.

- Use `BlockFrequency Freq` parameter for `setBlockFreq`,
`getProfileCountFromFreq` and `setBlockFreqAndScale` functions.
- Return `BlockFrequency` in `getEntryFreq()` functions.
- While on it change some `const BlockFrequency&amp; Freq` parameters to
plain `BlockFreqency Freq`.
- Mark `BlockFrequency(uint64_t)` constructor as explicit.
- Add missing `BlockFrequency::operator!=`.
- Remove `uint64_t BlockFreqency::getMaxFrequency()`.
- Add `BlockFrequency BlockFrequency::max()` function.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The `BlockFrequency` class abstracts `uint64_t` frequency values. Use it
more consistently in various APIs and disable implicit conversion to
make usage more consistent and explicit.

- Use `BlockFrequency Freq` parameter for `setBlockFreq`,
`getProfileCountFromFreq` and `setBlockFreqAndScale` functions.
- Return `BlockFrequency` in `getEntryFreq()` functions.
- While on it change some `const BlockFrequency&amp; Freq` parameters to
plain `BlockFreqency Freq`.
- Mark `BlockFrequency(uint64_t)` constructor as explicit.
- Add missing `BlockFrequency::operator!=`.
- Remove `uint64_t BlockFreqency::getMaxFrequency()`.
- Add `BlockFrequency BlockFrequency::max()` function.</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC][PGO] Prefix duplicate profile MemOp entry diagnostic with 'warning:'</title>
<updated>2023-02-27T22:04:27+00:00</updated>
<author>
<name>Matthew Voss</name>
<email>matthew.voss@sony.com</email>
</author>
<published>2023-02-27T22:04:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4364e2429cd4e3a640cbb84e565420fcfa830478'/>
<id>4364e2429cd4e3a640cbb84e565420fcfa830478</id>
<content type='text'>
Adding this prefix will indicate clearly that the compiler doesn't exit
when it hits this diagnostic. Searches for other non-fatal diagnostics
will also be able to find this diagnostic easily.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adding this prefix will indicate clearly that the compiler doesn't exit
when it hits this diagnostic. Searches for other non-fatal diagnostics
will also be able to find this diagnostic easily.
</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC] Rename Instruction::insertAt() to Instruction::insertInto(), to be consistent with BasicBlock::insertInto()</title>
<updated>2022-12-15T20:27:45+00:00</updated>
<author>
<name>Vasileios Porpodas</name>
<email>vporpodas@google.com</email>
</author>
<published>2022-12-15T01:42:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=32b38d248fd3c75abc5c86ab6677b6cb08a703cc'/>
<id>32b38d248fd3c75abc5c86ab6677b6cb08a703cc</id>
<content type='text'>
Differential Revision: https://reviews.llvm.org/D140085
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Differential Revision: https://reviews.llvm.org/D140085
</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC] Cleanup: Replaces BB-&gt;getInstList().insert() with I-&gt;insertAt().</title>
<updated>2022-12-12T21:33:05+00:00</updated>
<author>
<name>Vasileios Porpodas</name>
<email>vporpodas@google.com</email>
</author>
<published>2022-11-28T22:43:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=06911ba6ea1e552d3bcaed2728c92a9aa6cbf4d2'/>
<id>06911ba6ea1e552d3bcaed2728c92a9aa6cbf4d2</id>
<content type='text'>
This is part of a series of cleanup patches towards making BasicBlock::getInstList() private.

Differential Revision: https://reviews.llvm.org/D138877
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is part of a series of cleanup patches towards making BasicBlock::getInstList() private.

Differential Revision: https://reviews.llvm.org/D138877
</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm-profdata] Check for all duplicate entries in MemOpSize table</title>
<updated>2022-11-05T00:08:54+00:00</updated>
<author>
<name>Matthew Voss</name>
<email>matthew.voss@sony.com</email>
</author>
<published>2022-11-05T00:08:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a4b543a5a541eeff5a7ba92ada4b0d809a2c8482'/>
<id>a4b543a5a541eeff5a7ba92ada4b0d809a2c8482</id>
<content type='text'>
Previously, we only checked for duplicate zero entries when merging a
MemOPSize table (see D92074), but a user recently provided a reproducer
demonstrating that other entries can also be duplicated. As demonstrated
by the test in this patch, PGOMemOPSizeOpt can potentially generate
invalid IR for non-zero, non-consecutive duplicate entries. This seems
to be a rare case, since the duplicate entry is often below the
threshold, but possible. This patch extends the existing warning to
check for any duplicate values in the table, both in the optimization
and in llvm-profdata.

Differential Revision: https://reviews.llvm.org/D136211
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, we only checked for duplicate zero entries when merging a
MemOPSize table (see D92074), but a user recently provided a reproducer
demonstrating that other entries can also be duplicated. As demonstrated
by the test in this patch, PGOMemOPSizeOpt can potentially generate
invalid IR for non-zero, non-consecutive duplicate entries. This seems
to be a rare case, since the duplicate entry is often below the
threshold, but possible. This patch extends the existing warning to
check for any duplicate values in the table, both in the optimization
and in llvm-profdata.

Differential Revision: https://reviews.llvm.org/D136211
</pre>
</div>
</content>
</entry>
<entry>
<title>[PGO] Do not create block count annotations when all weights are 0,</title>
<updated>2022-10-13T21:57:42+00:00</updated>
<author>
<name>Wolfgang Pieb</name>
<email>wolfgang_pieb@playstation.sony.com</email>
</author>
<published>2022-09-16T16:40:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b43a1d1bd97816d32388e78fd5659f732edc82c9'/>
<id>b43a1d1bd97816d32388e78fd5659f732edc82c9</id>
<content type='text'>
avoiding an assertion.

A BB with a nonzero count, whose successor blocks all have 0 counts, could
cause an assertion. Don't create any branch weights in this case.

Reviewed By: xur

Differential Revision: https://reviews.llvm.org/D134203
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
avoiding an assertion.

A BB with a nonzero count, whose successor blocks all have 0 counts, could
cause an assertion. Don't create any branch weights in this case.

Reviewed By: xur

Differential Revision: https://reviews.llvm.org/D134203
</pre>
</div>
</content>
</entry>
</feed>
