<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/test/Transforms/HotColdSplit/split-cold-2.ll, 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>[llvm] Remove `br i1 undef` from some regression tests [NFC] (#116161)</title>
<updated>2024-11-15T14:19:50+00:00</updated>
<author>
<name>Lee Wei</name>
<email>lee10202013@gmail.com</email>
</author>
<published>2024-11-15T14:19:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8ee638fd175245eff88d77e1607e478db237dd41'/>
<id>8ee638fd175245eff88d77e1607e478db237dd41</id>
<content type='text'>
This PR removes tests with `br i1 undef` under
`llvm/tests/Transforms/HotColdSplit` and `llvm/tests/Transforms/I*`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR removes tests with `br i1 undef` under
`llvm/tests/Transforms/HotColdSplit` and `llvm/tests/Transforms/I*`.</pre>
</div>
</content>
</entry>
<entry>
<title>[HotColdSplit Test] Check that the outlined functions have internal visibility</title>
<updated>2023-08-27T13:48:11+00:00</updated>
<author>
<name>AdityaK</name>
<email>1894981+hiraditya@users.noreply.github.com</email>
</author>
<published>2023-08-26T16:35:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5897b449472e4848c2531e8bdeb6fba4f207f2c6'/>
<id>5897b449472e4848c2531e8bdeb6fba4f207f2c6</id>
<content type='text'>
Reviewers: vsk, eli.friedman, yassingh

Differential Revision: https://reviews.llvm.org/D158937
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewers: vsk, eli.friedman, yassingh

Differential Revision: https://reviews.llvm.org/D158937
</pre>
</div>
</content>
</entry>
<entry>
<title>[test] Remove duplicate RUN lines in Transform tests</title>
<updated>2022-12-08T10:47:16+00:00</updated>
<author>
<name>Bjorn Pettersson</name>
<email>bjorn.a.pettersson@ericsson.com</email>
</author>
<published>2022-12-08T10:28:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3528e63d89305907b3d6e0f59f7b03b94a12dacc'/>
<id>3528e63d89305907b3d6e0f59f7b03b94a12dacc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC] Port all (but one) HotColdSplit tests to `-passes=` syntax</title>
<updated>2022-12-07T20:15:16+00:00</updated>
<author>
<name>Roman Lebedev</name>
<email>lebedev.ri@gmail.com</email>
</author>
<published>2022-12-07T19:42:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4d211ac84212cbf1ea8b98584df585df781c6557'/>
<id>4d211ac84212cbf1ea8b98584df585df781c6557</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[PM/CC1] Add -f[no-]split-cold-code CC1 option to toggle splitting"</title>
<updated>2020-10-19T10:31:14+00:00</updated>
<author>
<name>Hans Wennborg</name>
<email>hans@chromium.org</email>
</author>
<published>2020-10-19T10:23:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0628bea5137047232f37c94b74bf26aa9b55f605'/>
<id>0628bea5137047232f37c94b74bf26aa9b55f605</id>
<content type='text'>
This broke Chromium's PGO build, it seems because hot-cold-splitting got turned
on unintentionally. See comment on the code review for repro etc.

&gt; This patch adds -f[no-]split-cold-code CC1 options to clang. This allows
&gt; the splitting pass to be toggled on/off. The current method of passing
&gt; `-mllvm -hot-cold-split=true` to clang isn't ideal as it may not compose
&gt; correctly (say, with `-O0` or `-Oz`).
&gt;
&gt; To implement the -fsplit-cold-code option, an attribute is applied to
&gt; functions to indicate that they may be considered for splitting. This
&gt; removes some complexity from the old/new PM pipeline builders, and
&gt; behaves as expected when LTO is enabled.
&gt;
&gt; Co-authored by: Saleem Abdulrasool &lt;compnerd@compnerd.org&gt;
&gt; Differential Revision: https://reviews.llvm.org/D57265
&gt; Reviewed By: Aditya Kumar, Vedant Kumar
&gt; Reviewers: Teresa Johnson, Aditya Kumar, Fedor Sergeev, Philip Pfaffe, Vedant Kumar

This reverts commit 273c299d5d649a0222fbde03c9a41e41913751b4.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This broke Chromium's PGO build, it seems because hot-cold-splitting got turned
on unintentionally. See comment on the code review for repro etc.

&gt; This patch adds -f[no-]split-cold-code CC1 options to clang. This allows
&gt; the splitting pass to be toggled on/off. The current method of passing
&gt; `-mllvm -hot-cold-split=true` to clang isn't ideal as it may not compose
&gt; correctly (say, with `-O0` or `-Oz`).
&gt;
&gt; To implement the -fsplit-cold-code option, an attribute is applied to
&gt; functions to indicate that they may be considered for splitting. This
&gt; removes some complexity from the old/new PM pipeline builders, and
&gt; behaves as expected when LTO is enabled.
&gt;
&gt; Co-authored by: Saleem Abdulrasool &lt;compnerd@compnerd.org&gt;
&gt; Differential Revision: https://reviews.llvm.org/D57265
&gt; Reviewed By: Aditya Kumar, Vedant Kumar
&gt; Reviewers: Teresa Johnson, Aditya Kumar, Fedor Sergeev, Philip Pfaffe, Vedant Kumar

This reverts commit 273c299d5d649a0222fbde03c9a41e41913751b4.
</pre>
</div>
</content>
</entry>
<entry>
<title>[PM/CC1] Add -f[no-]split-cold-code CC1 option to toggle splitting</title>
<updated>2020-10-15T23:13:33+00:00</updated>
<author>
<name>Vedant Kumar</name>
<email>vsk@apple.com</email>
</author>
<published>2020-10-13T21:35:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=273c299d5d649a0222fbde03c9a41e41913751b4'/>
<id>273c299d5d649a0222fbde03c9a41e41913751b4</id>
<content type='text'>
This patch adds -f[no-]split-cold-code CC1 options to clang. This allows
the splitting pass to be toggled on/off. The current method of passing
`-mllvm -hot-cold-split=true` to clang isn't ideal as it may not compose
correctly (say, with `-O0` or `-Oz`).

To implement the -fsplit-cold-code option, an attribute is applied to
functions to indicate that they may be considered for splitting. This
removes some complexity from the old/new PM pipeline builders, and
behaves as expected when LTO is enabled.

Co-authored by: Saleem Abdulrasool &lt;compnerd@compnerd.org&gt;
Differential Revision: https://reviews.llvm.org/D57265
Reviewed By: Aditya Kumar, Vedant Kumar
Reviewers: Teresa Johnson, Aditya Kumar, Fedor Sergeev, Philip Pfaffe, Vedant Kumar
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds -f[no-]split-cold-code CC1 options to clang. This allows
the splitting pass to be toggled on/off. The current method of passing
`-mllvm -hot-cold-split=true` to clang isn't ideal as it may not compose
correctly (say, with `-O0` or `-Oz`).

To implement the -fsplit-cold-code option, an attribute is applied to
functions to indicate that they may be considered for splitting. This
removes some complexity from the old/new PM pipeline builders, and
behaves as expected when LTO is enabled.

Co-authored by: Saleem Abdulrasool &lt;compnerd@compnerd.org&gt;
Differential Revision: https://reviews.llvm.org/D57265
Reviewed By: Aditya Kumar, Vedant Kumar
Reviewers: Teresa Johnson, Aditya Kumar, Fedor Sergeev, Philip Pfaffe, Vedant Kumar
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Temporarily Revert "Add basic loop fusion pass.""</title>
<updated>2019-04-17T04:52:47+00:00</updated>
<author>
<name>Eric Christopher</name>
<email>echristo@gmail.com</email>
</author>
<published>2019-04-17T04:52:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=cee313d288a4faf0355d76fb6e0e927e211d08a5'/>
<id>cee313d288a4faf0355d76fb6e0e927e211d08a5</id>
<content type='text'>
The reversion apparently deleted the test/Transforms directory.

Will be re-reverting again.

llvm-svn: 358552
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The reversion apparently deleted the test/Transforms directory.

Will be re-reverting again.

llvm-svn: 358552
</pre>
</div>
</content>
</entry>
<entry>
<title>Temporarily Revert "Add basic loop fusion pass."</title>
<updated>2019-04-17T02:12:23+00:00</updated>
<author>
<name>Eric Christopher</name>
<email>echristo@gmail.com</email>
</author>
<published>2019-04-17T02:12:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a86343512845c9c1fdbac865fea88aa5fce7142a'/>
<id>a86343512845c9c1fdbac865fea88aa5fce7142a</id>
<content type='text'>
As it's causing some bot failures (and per request from kbarton).

This reverts commit r358543/ab70da07286e618016e78247e4a24fcb84077fda.

llvm-svn: 358546
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As it's causing some bot failures (and per request from kbarton).

This reverts commit r358543/ab70da07286e618016e78247e4a24fcb84077fda.

llvm-svn: 358546
</pre>
</div>
</content>
</entry>
<entry>
<title>[HotColdSplit] Introduce a cost model to control splitting behavior</title>
<updated>2019-01-25T18:30:37+00:00</updated>
<author>
<name>Vedant Kumar</name>
<email>vsk@apple.com</email>
</author>
<published>2019-01-25T18:30:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=db3f9774eefc662cbcf976b51f459c80d2664d82'/>
<id>db3f9774eefc662cbcf976b51f459c80d2664d82</id>
<content type='text'>
The main goal of the model is to avoid *increasing* function size, as
that would eradicate any memory locality benefits from splitting. This
happens when:

  - There are too many inputs or outputs to the cold region. Argument
    materialization and reloads of outputs have a cost.

  - The cold region has too many distinct exit blocks, causing a large
    switch to be formed in the caller.

  - The code size cost of the split code is less than the cost of a
    set-up call.

A secondary goal is to prevent excessive overall binary size growth.

With the cost model in place, I experimented to find a splitting
threshold that works well in practice. To make warm &amp; cold code easily
separable for analysis purposes, I moved split functions to a "cold"
section. I experimented with thresholds between [0, 4] and set the
default to the threshold which minimized geomean __text size.

Experiment data from building LNT+externals for X86 (N = 639 programs,
all sizes in bytes):

| Configuration | __text geom size | __cold geom size | TEXT geom size |
| **-Os**       | 1736.3           | 0, n=0           | 10961.6        |
| -Os, thresh=0 | 1740.53          | 124.482, n=134   | 11014          |
| -Os, thresh=1 | 1734.79          | 57.8781, n=90    | 10978.6        |
| -Os, thresh=2 | ** 1733.85 **    | 65.6604, n=61    | 10977.6        |
| -Os, thresh=3 | 1733.85          | 65.3071, n=61    | 10977.6        |
| -Os, thresh=4 | 1735.08          | 67.5156, n=54    | 10965.7        |
| **-Oz**       | 1554.4           | 0, n=0           | 10153          |
| -Oz, thresh=2 | ** 1552.2 **     | 65.633, n=61     | 10176          |
| **-O3**       | 2563.37          | 0, n=0           | 13105.4        |
| -O3, thresh=2 | ** 2559.49 **    | 71.1072, n=61    | 13162.4        |

Picking thresh=2 reduces the geomean __text section size by 0.14% at
-Os, -Oz, and -O3 and causes ~0.2% growth in the TEXT segment. Note that
TEXT size is page-aligned, whereas section sizes are byte-aligned.

Experiment data from building LNT+externals for ARM64 (N = 558 programs,
all sizes in bytes):

| Configuration | __text geom size | __cold geom size | TEXT geom size |
| **-Os**       | 1763.96          | 0, n=0           | 42934.9        |
| -Os, thresh=2 | ** 1760.9 **     | 76.6755, n=61    | 42934.9        |

Picking thresh=2 reduces the geomean __text section size by 0.17% at
-Os and causes no growth in the TEXT segment.

Measurements were done with D57082 (r352080) applied.

Differential Revision: https://reviews.llvm.org/D57125

llvm-svn: 352228
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The main goal of the model is to avoid *increasing* function size, as
that would eradicate any memory locality benefits from splitting. This
happens when:

  - There are too many inputs or outputs to the cold region. Argument
    materialization and reloads of outputs have a cost.

  - The cold region has too many distinct exit blocks, causing a large
    switch to be formed in the caller.

  - The code size cost of the split code is less than the cost of a
    set-up call.

A secondary goal is to prevent excessive overall binary size growth.

With the cost model in place, I experimented to find a splitting
threshold that works well in practice. To make warm &amp; cold code easily
separable for analysis purposes, I moved split functions to a "cold"
section. I experimented with thresholds between [0, 4] and set the
default to the threshold which minimized geomean __text size.

Experiment data from building LNT+externals for X86 (N = 639 programs,
all sizes in bytes):

| Configuration | __text geom size | __cold geom size | TEXT geom size |
| **-Os**       | 1736.3           | 0, n=0           | 10961.6        |
| -Os, thresh=0 | 1740.53          | 124.482, n=134   | 11014          |
| -Os, thresh=1 | 1734.79          | 57.8781, n=90    | 10978.6        |
| -Os, thresh=2 | ** 1733.85 **    | 65.6604, n=61    | 10977.6        |
| -Os, thresh=3 | 1733.85          | 65.3071, n=61    | 10977.6        |
| -Os, thresh=4 | 1735.08          | 67.5156, n=54    | 10965.7        |
| **-Oz**       | 1554.4           | 0, n=0           | 10153          |
| -Oz, thresh=2 | ** 1552.2 **     | 65.633, n=61     | 10176          |
| **-O3**       | 2563.37          | 0, n=0           | 13105.4        |
| -O3, thresh=2 | ** 2559.49 **    | 71.1072, n=61    | 13162.4        |

Picking thresh=2 reduces the geomean __text section size by 0.14% at
-Os, -Oz, and -O3 and causes ~0.2% growth in the TEXT segment. Note that
TEXT size is page-aligned, whereas section sizes are byte-aligned.

Experiment data from building LNT+externals for ARM64 (N = 558 programs,
all sizes in bytes):

| Configuration | __text geom size | __cold geom size | TEXT geom size |
| **-Os**       | 1763.96          | 0, n=0           | 42934.9        |
| -Os, thresh=2 | ** 1760.9 **     | 76.6755, n=61    | 42934.9        |

Picking thresh=2 reduces the geomean __text section size by 0.17% at
-Os and causes no growth in the TEXT segment.

Measurements were done with D57082 (r352080) applied.

Differential Revision: https://reviews.llvm.org/D57125

llvm-svn: 352228
</pre>
</div>
</content>
</entry>
<entry>
<title>[HotColdSplit] Simplify tests by lowering their splitting thresholds</title>
<updated>2019-01-17T21:29:34+00:00</updated>
<author>
<name>Vedant Kumar</name>
<email>vsk@apple.com</email>
</author>
<published>2019-01-17T21:29:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=32a014d0483e821566e42d68e270f53456b9b1df'/>
<id>32a014d0483e821566e42d68e270f53456b9b1df</id>
<content type='text'>
This gets rid of the brittle/mysterious calls to @sink()/@sideeffect()
peppered throughout the test cases. They are no longer needed to force
splitting to occur.

llvm-svn: 351480
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This gets rid of the brittle/mysterious calls to @sink()/@sideeffect()
peppered throughout the test cases. They are no longer needed to force
splitting to occur.

llvm-svn: 351480
</pre>
</div>
</content>
</entry>
</feed>
