<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp, branch users/pcc/spr/elf-add-preferred-function-alignment-flag</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>[LLVM] Make `MachineBlockFrequencyInfo`'s constructor arguments const (NFC) (#149279)</title>
<updated>2025-07-18T09:28:13+00:00</updated>
<author>
<name>Lucas Ramirez</name>
<email>11032120+lucas-rami@users.noreply.github.com</email>
</author>
<published>2025-07-18T09:28:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ee8756e8551bc9ae5bf60e1ff16abaa95d61c234'/>
<id>ee8756e8551bc9ae5bf60e1ff16abaa95d61c234</id>
<content type='text'>
This avoids having to call `MachineBlockFrequencyInfo::calculate`
manually if one of the parameters is const.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This avoids having to call `MachineBlockFrequencyInfo::calculate`
manually if one of the parameters is const.</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen][NewPM] Port `machine-block-freq` to new pass manager (#98317)</title>
<updated>2024-07-12T07:45:01+00:00</updated>
<author>
<name>paperchalice</name>
<email>liujunchang97@outlook.com</email>
</author>
<published>2024-07-12T07:45:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=099899961c1e89a1789f534579d35a74a2ef1dda'/>
<id>099899961c1e89a1789f534579d35a74a2ef1dda</id>
<content type='text'>
- Add `MachineBlockFrequencyAnalysis`.
- Add `MachineBlockFrequencyPrinterPass`.
- Use `MachineBlockFrequencyInfoWrapperPass` in legacy pass manager.
- `LazyMachineBlockFrequencyInfo::print` is empty, drop it due to new
pass manager migration.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Add `MachineBlockFrequencyAnalysis`.
- Add `MachineBlockFrequencyPrinterPass`.
- Use `MachineBlockFrequencyInfoWrapperPass` in legacy pass manager.
- `LazyMachineBlockFrequencyInfo::print` is empty, drop it due to new
pass manager migration.</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen][NewPM] Port `machine-loops` to new pass manager (#97793)</title>
<updated>2024-07-09T01:11:18+00:00</updated>
<author>
<name>paperchalice</name>
<email>liujunchang97@outlook.com</email>
</author>
<published>2024-07-09T01:11:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=79d0de2ac37b6b7d66720611935d1dd7fc4fbd43'/>
<id>79d0de2ac37b6b7d66720611935d1dd7fc4fbd43</id>
<content type='text'>
- Add `MachineLoopAnalysis`.
- Add `MachineLoopPrinterPass`.
- Convert to `MachineLoopInfoWrapperPass` in legacy pass manager.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Add `MachineLoopAnalysis`.
- Add `MachineLoopPrinterPass`.
- Convert to `MachineLoopInfoWrapperPass` in legacy pass manager.</pre>
</div>
</content>
</entry>
<entry>
<title>Reapply "[CodeGen][NewPM] Port machine-branch-prob to new pass manager" (#96858) (#96869)</title>
<updated>2024-06-28T02:59:23+00:00</updated>
<author>
<name>paperchalice</name>
<email>liujunchang97@outlook.com</email>
</author>
<published>2024-06-28T02:59:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d38b518e0444b42123ac05ac5cce267baecec294'/>
<id>d38b518e0444b42123ac05ac5cce267baecec294</id>
<content type='text'>
This reverts commit ab58b6d58edf6a7c8881044fc716ca435d7a0156.
In `CodeGen/Generic/MachineBranchProb.ll`, `llc` crashed with dumped MIR
when targeting PowerPC. Move test to `llc/new-pm`, which is X86
specific.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit ab58b6d58edf6a7c8881044fc716ca435d7a0156.
In `CodeGen/Generic/MachineBranchProb.ll`, `llc` crashed with dumped MIR
when targeting PowerPC. Move test to `llc/new-pm`, which is X86
specific.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[CodeGen][NewPM] Port machine-branch-prob to new pass manager" (#96858)</title>
<updated>2024-06-27T07:00:17+00:00</updated>
<author>
<name>paperchalice</name>
<email>liujunchang97@outlook.com</email>
</author>
<published>2024-06-27T07:00:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ab58b6d58edf6a7c8881044fc716ca435d7a0156'/>
<id>ab58b6d58edf6a7c8881044fc716ca435d7a0156</id>
<content type='text'>
Reverts llvm/llvm-project#96389
Some ppc bots failed.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reverts llvm/llvm-project#96389
Some ppc bots failed.</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen][NewPM] Port machine-branch-prob to new pass manager (#96389)</title>
<updated>2024-06-27T06:04:51+00:00</updated>
<author>
<name>paperchalice</name>
<email>liujunchang97@outlook.com</email>
</author>
<published>2024-06-27T06:04:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=73e46c2bb4949be986d9eac98d95a206d7f003e2'/>
<id>73e46c2bb4949be986d9eac98d95a206d7f003e2</id>
<content type='text'>
Like IR version `print&lt;branch-prob&gt;`, there is also a
`print&lt;machine-branch-prob&gt;`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Like IR version `print&lt;branch-prob&gt;`, there is also a
`print&lt;machine-branch-prob&gt;`.</pre>
</div>
</content>
</entry>
<entry>
<title>[Analysis, CodeGen, DebugInfo] Use StringRef::operator== instead of StringRef::equals (NFC) (#91304)</title>
<updated>2024-05-07T17:20:10+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2024-05-07T17:20:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=026a29e8b38aad79568de033d0e8e5d2e6bb4250'/>
<id>026a29e8b38aad79568de033d0e8e5d2e6bb4250</id>
<content type='text'>
I'm planning to remove StringRef::equals in favor of
StringRef::operator==.

- StringRef::operator==/!= outnumber StringRef::equals by a factor of
  53 under llvm/ in terms of their usage.

- The elimination of StringRef::equals brings StringRef closer to
  std::string_view, which has operator== but not equals.

- S == "foo" is more readable than S.equals("foo"), especially for
  !Long.Expression.equals("str") vs Long.Expression != "str".</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I'm planning to remove StringRef::equals in favor of
StringRef::operator==.

- StringRef::operator==/!= outnumber StringRef::equals by a factor of
  53 under llvm/ in terms of their usage.

- The elimination of StringRef::equals brings StringRef closer to
  std::string_view, which has operator== but not equals.

- S == "foo" is more readable than S.equals("foo"), especially for
  !Long.Expression.equals("str") vs Long.Expression != "str".</pre>
</div>
</content>
</entry>
<entry>
<title>[SHT_LLVM_BB_ADDR_MAP] Adds pretty printing of BFI and BPI for PGO Analysis Map in tools. (#82292)</title>
<updated>2024-02-27T19:13:00+00:00</updated>
<author>
<name>Micah Weston</name>
<email>micahsweston@gmail.com</email>
</author>
<published>2024-02-27T19:13:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9ca8db352d22444feabd859380252f13826a8aff'/>
<id>9ca8db352d22444feabd859380252f13826a8aff</id>
<content type='text'>
Primary change is to add a flag `--pretty-pgo-analysis-map` to
llvm-readobj and llvm-objdump that prints block frequencies and branch
probabilities in the same manner as BFI and BPI respectively. This can
be helpful if you are manually inspecting the outputs from the tools.

In order to print, I moved the `printBlockFreqImpl` function from
Analysis to Support and renamed it to `printRelativeBlockFreq`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Primary change is to add a flag `--pretty-pgo-analysis-map` to
llvm-readobj and llvm-objdump that prints block frequencies and branch
probabilities in the same manner as BFI and BPI respectively. This can
be helpful if you are manually inspecting the outputs from the tools.

In order to print, I moved the `printBlockFreqImpl` function from
Analysis to Support and renamed it to `printRelativeBlockFreq`.</pre>
</div>
</content>
</entry>
<entry>
<title>BlockFrequencyInfo: Add PrintBlockFreq helper (#67512)</title>
<updated>2023-10-06T01:26:50+00:00</updated>
<author>
<name>Matthias Braun</name>
<email>matze@braunis.de</email>
</author>
<published>2023-10-06T01:26:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2e26d091060e87629f23163433b5e2fd450b54bf'/>
<id>2e26d091060e87629f23163433b5e2fd450b54bf</id>
<content type='text'>
- Refactor the (Machine)BlockFrequencyInfo::printBlockFreq functions
into a `PrintBlockFreq()` function returning a `Printable` object. This
simplifies usage as it can be directly piped to a `raw_ostream` like
`dbgs() &lt;&lt; PrintBlockFreq(MBFI, Freq) &lt;&lt; '\n';`.
- Previously there was an interesting behavior where
`BlockFrequencyInfoImpl` stores frequencies both as a `Scaled64` number
and as an `uint64_t`. Most algorithms use the `BlockFrequency`
abstraction with the integers, the print function for basic blocks
printed the `Scaled64` number potentially showing higher accuracy than
was used by the algorithm. This changes things to only print
`BlockFrequency` values.
- Replace some instances of `dbgs() &lt;&lt; Freq.getFrequency()` with the new
function.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Refactor the (Machine)BlockFrequencyInfo::printBlockFreq functions
into a `PrintBlockFreq()` function returning a `Printable` object. This
simplifies usage as it can be directly piped to a `raw_ostream` like
`dbgs() &lt;&lt; PrintBlockFreq(MBFI, Freq) &lt;&lt; '\n';`.
- Previously there was an interesting behavior where
`BlockFrequencyInfoImpl` stores frequencies both as a `Scaled64` number
and as an `uint64_t`. Most algorithms use the `BlockFrequency`
abstraction with the integers, the print function for basic blocks
printed the `Scaled64` number potentially showing higher accuracy than
was used by the algorithm. This changes things to only print
`BlockFrequency` values.
- Replace some instances of `dbgs() &lt;&lt; Freq.getFrequency()` with the new
function.</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>
</feed>
