<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Support/SuffixTree.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>[llvm] Use llvm::SmallVector::pop_back_val (NFC) (#136533)</title>
<updated>2025-04-21T15:13:16+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-04-21T15:13:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=cfc2b0d094f705aa0995eff0dc5f1faf1440a769'/>
<id>cfc2b0d094f705aa0995eff0dc5f1faf1440a769</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Use llvm::SmallVector::pop_back_val (NFC) (#136441)</title>
<updated>2025-04-19T18:49:19+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-04-19T18:49:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=031475594abd8a66b88a1687706651579e840421'/>
<id>031475594abd8a66b88a1687706651579e840421</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Use llvm::append_range (NFC) (#133658)</title>
<updated>2025-03-31T01:43:02+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-03-31T01:43:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6257621f41d1deb31cfbfcee993a75991a0bca13'/>
<id>6257621f41d1deb31cfbfcee993a75991a0bca13</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[Support] Avoid repeated hash lookups (NFC) (#132517)</title>
<updated>2025-03-22T15:09:28+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-03-22T15:09:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2b69a499407a2bfa55f20486e7810b91f20ea910'/>
<id>2b69a499407a2bfa55f20486e7810b91f20ea910</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[MachineOutliner] Leaf Descendants (#90275)</title>
<updated>2024-06-18T14:13:05+00:00</updated>
<author>
<name>Xuan Zhang</name>
<email>144393379+xuanzh-meta@users.noreply.github.com</email>
</author>
<published>2024-06-18T14:13:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d9a00ed3668803d11675b103fe9b6ed077ddc4c1'/>
<id>d9a00ed3668803d11675b103fe9b6ed077ddc4c1</id>
<content type='text'>
This PR  depends on https://github.com/llvm/llvm-project/pull/90264

In the current implementation, only leaf children of each internal node
in the suffix tree are included as candidates for outlining. But all
leaf descendants are outlining candidates, which we include in the new
implementation. This is enabled on a flag `outliner-leaf-descendants`
which is default to be true.

The reason for _enabling this on a flag_ is because machine outliner is
not the only pass that uses suffix tree.

The reason for _having this default to be true_ is because including all
leaf descendants show consistent size win.
* For Clang/LLD, it shows around 3% reduction in text segment size when
compared to the baseline `-Oz` linker binary.
 * For selected benchmark tests in LLVM test suite 
 
| run (CTMark/) | only leaf children | all leaf descendants | reduction
% |

|------------------|--------------------|----------------------|-------------|
| lencod | 349624 | 348564 | -0.2004% |
| SPASS | 219672 | 218440 | -0.4738% |
| kc | 271956 | 250068 | -0.4506% |
| sqlite3 | 223920 | 222484 | -0.5471% |
| 7zip-benchmark | 405364 | 401244 | -0.3428% |
| bullet | 139820 | 138340 | -0.8315% |
| consumer-typeset | 295684 | 286628 | -1.2295% |
| pairlocalalign | 72236 | 71936 | -0.2164% |
| tramp3d-v4 | 189572 | 183676 | -2.9668% |

This is part of an enhanced version of machine outliner -- see
[RFC](https://discourse.llvm.org/t/rfc-enhanced-machine-outliner-part-1-fulllto-part-2-thinlto-nolto-to-come/78732).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR  depends on https://github.com/llvm/llvm-project/pull/90264

In the current implementation, only leaf children of each internal node
in the suffix tree are included as candidates for outlining. But all
leaf descendants are outlining candidates, which we include in the new
implementation. This is enabled on a flag `outliner-leaf-descendants`
which is default to be true.

The reason for _enabling this on a flag_ is because machine outliner is
not the only pass that uses suffix tree.

The reason for _having this default to be true_ is because including all
leaf descendants show consistent size win.
* For Clang/LLD, it shows around 3% reduction in text segment size when
compared to the baseline `-Oz` linker binary.
 * For selected benchmark tests in LLVM test suite 
 
| run (CTMark/) | only leaf children | all leaf descendants | reduction
% |

|------------------|--------------------|----------------------|-------------|
| lencod | 349624 | 348564 | -0.2004% |
| SPASS | 219672 | 218440 | -0.4738% |
| kc | 271956 | 250068 | -0.4506% |
| sqlite3 | 223920 | 222484 | -0.5471% |
| 7zip-benchmark | 405364 | 401244 | -0.3428% |
| bullet | 139820 | 138340 | -0.8315% |
| consumer-typeset | 295684 | 286628 | -1.2295% |
| pairlocalalign | 72236 | 71936 | -0.2164% |
| tramp3d-v4 | 189572 | 183676 | -2.9668% |

This is part of an enhanced version of machine outliner -- see
[RFC](https://discourse.llvm.org/t/rfc-enhanced-machine-outliner-part-1-fulllto-part-2-thinlto-nolto-to-come/78732).</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC] update comments from an earlier version of SuffixTree (#89800)</title>
<updated>2024-04-26T16:52:43+00:00</updated>
<author>
<name>Xuan Zhang</name>
<email>144393379+xuanzh-meta@users.noreply.github.com</email>
</author>
<published>2024-04-26T16:52:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7683d07d84fa7206e435fca5a2d518a9ee8b5b56'/>
<id>7683d07d84fa7206e435fca5a2d518a9ee8b5b56</id>
<content type='text'>
LeafChildren is used in an earlier version of the SuffixTree
implementation to keep track of each nodes' leaf nodes. In the
new/current version, this variable is no longer used, but a comment is
left behind. This patch updates the comment.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
LeafChildren is used in an earlier version of the SuffixTree
implementation to keep track of each nodes' leaf nodes. In the
new/current version, this variable is no longer used, but a comment is
left behind. This patch updates the comment.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[SuffixTree] Add suffix tree statistics"</title>
<updated>2023-05-13T00:09:26+00:00</updated>
<author>
<name>Jessica Paquette</name>
<email>jpaquette@apple.com</email>
</author>
<published>2023-05-13T00:09:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9c0a349788d3dee8fb7bd4c6ade58163f4985b52'/>
<id>9c0a349788d3dee8fb7bd4c6ade58163f4985b52</id>
<content type='text'>
This reverts commit d3a6a05b1f95564f2c66f885a83cf0dbe1a004a9.

Some bots don't like it.

Boo.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit d3a6a05b1f95564f2c66f885a83cf0dbe1a004a9.

Some bots don't like it.

Boo.
</pre>
</div>
</content>
</entry>
<entry>
<title>[SuffixTree] Add suffix tree statistics</title>
<updated>2023-05-13T00:05:04+00:00</updated>
<author>
<name>Jessica Paquette</name>
<email>jpaquette@apple.com</email>
</author>
<published>2023-05-12T23:21:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d3a6a05b1f95564f2c66f885a83cf0dbe1a004a9'/>
<id>d3a6a05b1f95564f2c66f885a83cf0dbe1a004a9</id>
<content type='text'>
Sometimes you want to see how much is being allocated in your data structure
in general.

Add statistics that show how many internal and leaf nodes have been allocated
in the suffix tree over the course of its construction.

Also add a testcase that shows that we actually get these stats out when we're
outlining stuff.

The test shows that we get the expected O(n) leaf nodes, a split, and so on.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sometimes you want to see how much is being allocated in your data structure
in general.

Add statistics that show how many internal and leaf nodes have been allocated
in the suffix tree over the course of its construction.

Also add a testcase that shows that we actually get these stats out when we're
outlining stuff.

The test shows that we get the expected O(n) leaf nodes, a split, and so on.
</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC] SuffixTree: Move advance() into SuffixTree.cpp + more cleanup</title>
<updated>2023-05-12T05:29:47+00:00</updated>
<author>
<name>Jessica Paquette</name>
<email>jpaquette@apple.com</email>
</author>
<published>2023-05-12T05:24:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c2eeaf105a45fe26c302418b7c835161aedba6c2'/>
<id>c2eeaf105a45fe26c302418b7c835161aedba6c2</id>
<content type='text'>
Allows us to knock out a couple more includes from the header file.

Also clang-format SuffixTree.cpp while we're here.

Also use SuffixTreeNode::EmptyIdx in a couple more places.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allows us to knock out a couple more includes from the header file.

Also clang-format SuffixTree.cpp while we're here.

Also use SuffixTreeNode::EmptyIdx in a couple more places.
</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC] SuffixTree: Move EmptyIdx into SuffixTreeNode and add a root allocator</title>
<updated>2023-05-12T03:41:49+00:00</updated>
<author>
<name>Jessica Paquette</name>
<email>jpaquette@apple.com</email>
</author>
<published>2023-05-12T03:41:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=66520c04cf28ab3e6f700f8a5d0b294100fc9abc'/>
<id>66520c04cf28ab3e6f700f8a5d0b294100fc9abc</id>
<content type='text'>
This makes it clearer that EmptyIdx is related to the node.

Also add an allocator for the root so that in the main SuffixTree code we don't
see gross stuff like a nullptr parent etc.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes it clearer that EmptyIdx is related to the node.

Also add an allocator for the root so that in the main SuffixTree code we don't
see gross stuff like a nullptr parent etc.
</pre>
</div>
</content>
</entry>
</feed>
