<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Transforms/IPO/ModuleInliner.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>[ctxprof] Use `isInSpecializedModule` as criteria for using contextual profile (#134468)</title>
<updated>2025-04-08T02:55:00+00:00</updated>
<author>
<name>Mircea Trofin</name>
<email>mtrofin@google.com</email>
</author>
<published>2025-04-08T02:55:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f1bb2fe3562d2fe9a43c79ec8af908fdff23a33a'/>
<id>f1bb2fe3562d2fe9a43c79ec8af908fdff23a33a</id>
<content type='text'>
After #134340, the availability of contextual profile isn't in itself an indication of compiling the module containing all the functions covered by that profile.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After #134340, the availability of contextual profile isn't in itself an indication of compiling the module containing all the functions covered by that profile.</pre>
</div>
</content>
</entry>
<entry>
<title>[ctxprof][nfc] Prepare CtxProfAnalysis for flat profiles (#129623)</title>
<updated>2025-03-05T00:42:47+00:00</updated>
<author>
<name>Mircea Trofin</name>
<email>mtrofin@google.com</email>
</author>
<published>2025-03-05T00:42:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2068a18c86ab0f6f80e268dc3bc1a5329ee51715'/>
<id>2068a18c86ab0f6f80e268dc3bc1a5329ee51715</id>
<content type='text'>
Mostly remove the equivalence "no contexts == no CtxProfAnalysis result", and instead check explicitly there are no contextual profiles.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Mostly remove the equivalence "no contexts == no CtxProfAnalysis result", and instead check explicitly there are no contextual profiles.</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC]Make file-local cl::opt global variables static (#126486)</title>
<updated>2025-03-03T06:46:33+00:00</updated>
<author>
<name>chrisPyr</name>
<email>32153107+chrisPyr@users.noreply.github.com</email>
</author>
<published>2025-03-03T06:46:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=71f4c7dabec0f32b2d475e8e08f0da99628a067c'/>
<id>71f4c7dabec0f32b2d475e8e08f0da99628a067c</id>
<content type='text'>
#125983</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
#125983</pre>
</div>
</content>
</entry>
<entry>
<title>[ctx_prof] Simple ICP criteria during module inliner (#109881)</title>
<updated>2024-09-25T22:05:52+00:00</updated>
<author>
<name>Mircea Trofin</name>
<email>mtrofin@google.com</email>
</author>
<published>2024-09-25T22:05:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c8365feed7af6d17cd2cc04cdc7fe0247f87e9c8'/>
<id>c8365feed7af6d17cd2cc04cdc7fe0247f87e9c8</id>
<content type='text'>
This is mostly for test: under contextual profiling, we perform ICP for those indirect callsites which have targets marked as `alwaysinline`.

This helped uncover a bug with the way the profile was updated upon ICP, where we were skipping over the update if the target wasn't called in that context. That was resulting in incorrect counts for the indirect BB.

Also flyby fix to the total/direct count values, they should be 64-bit (as all counters are in the contextual profile)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is mostly for test: under contextual profiling, we perform ICP for those indirect callsites which have targets marked as `alwaysinline`.

This helped uncover a bug with the way the profile was updated upon ICP, where we were skipping over the update if the target wasn't called in that context. That was resulting in incorrect counts for the indirect BB.

Also flyby fix to the total/direct count values, they should be 64-bit (as all counters are in the contextual profile)</pre>
</div>
</content>
</entry>
<entry>
<title>[ctx_prof] Insert the ctx prof flattener after the module inliner (#107499)</title>
<updated>2024-09-10T01:16:24+00:00</updated>
<author>
<name>Mircea Trofin</name>
<email>mtrofin@google.com</email>
</author>
<published>2024-09-10T01:16:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3b2261809471a018de50e745c0d475b048c66fd4'/>
<id>3b2261809471a018de50e745c0d475b048c66fd4</id>
<content type='text'>
This patch enables experimenting with the contextual profile. ICP is currently disabled in this case - will reenable it subsequently. Also subsequently the inline cost model / decision making would be updated to be context-aware. Right now, this just achieves "complete use" of the profile, in that it's ingested, maintained, and sunk to a flat profile when not needed anymore.

Issue [#89287](https://github.com/llvm/llvm-project/issues/89287)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch enables experimenting with the contextual profile. ICP is currently disabled in this case - will reenable it subsequently. Also subsequently the inline cost model / decision making would be updated to be context-aware. Right now, this just achieves "complete use" of the profile, in that it's ingested, maintained, and sunk to a flat profile when not needed anymore.

Issue [#89287](https://github.com/llvm/llvm-project/issues/89287)</pre>
</div>
</content>
</entry>
<entry>
<title>[ctx_prof] Add Inlining support (#106154)</title>
<updated>2024-09-03T23:14:05+00:00</updated>
<author>
<name>Mircea Trofin</name>
<email>mtrofin@google.com</email>
</author>
<published>2024-09-03T23:14:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3209766608d14fbb0add96916a28c3f98fed9460'/>
<id>3209766608d14fbb0add96916a28c3f98fed9460</id>
<content type='text'>
Add an overload of `InlineFunction` that updates the contextual profile. If there is no contextual profile, this overload is equivalent to the non-contextual profile variant.

Post-inlining, the update mainly consists of:
- making the PGO instrumentation of the callee "the caller's": the owner function (the "name" parameter of the instrumentation instructions) becomes the caller, and new index values are allocated for each of the callee's indices (this happens for both increment and callsite instrumentation instructions)
- in the contextual profile:
   - each context corresponding to the caller has its counters updated to incorporate the counters inherited from the callee at the inlined callsite. Counter values are copied as-is because no scaling is required since the profile is contextual.
   - the contexts of the callee (at the inlined callsite) are moved to the caller.
   - the callee context at the inlined callsite is deleted.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add an overload of `InlineFunction` that updates the contextual profile. If there is no contextual profile, this overload is equivalent to the non-contextual profile variant.

Post-inlining, the update mainly consists of:
- making the PGO instrumentation of the callee "the caller's": the owner function (the "name" parameter of the instrumentation instructions) becomes the caller, and new index values are allocated for each of the callee's indices (this happens for both increment and callsite instrumentation instructions)
- in the contextual profile:
   - each context corresponding to the caller has its counters updated to incorporate the counters inherited from the callee at the inlined callsite. Counter values are copied as-is because no scaling is required since the profile is contextual.
   - the contexts of the callee (at the inlined callsite) are moved to the caller.
   - the callee context at the inlined callsite is deleted.</pre>
</div>
</content>
</entry>
<entry>
<title>[ModuleInliner] Remove an inapplicable comment</title>
<updated>2023-05-28T05:26:37+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2023-05-28T05:26:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=65f40cb455f8eaf83c163793d19640b56393c1e5'/>
<id>65f40cb455f8eaf83c163793d19640b56393c1e5</id>
<content type='text'>
The module inliner has its own logic in deciding the order in which
call sites are inlined, so the comment is inapplicable.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The module inliner has its own logic in deciding the order in which
call sites are inlined, so the comment is inapplicable.
</pre>
</div>
</content>
</entry>
<entry>
<title>[AlwaysInliner] Make legacy pass like the new pass</title>
<updated>2023-03-21T18:04:22+00:00</updated>
<author>
<name>Arthur Eubanks</name>
<email>aeubanks@google.com</email>
</author>
<published>2023-03-20T18:18:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fa6ea7a419f37befbed04368bcb8af4c718facbb'/>
<id>fa6ea7a419f37befbed04368bcb8af4c718facbb</id>
<content type='text'>
The legacy pass is only used in AMDGPU codegen, which doesn't care about running it in call graph order (it actually has to work around that fact).

Make the legacy pass a module pass and share code with the new pass.

This allows us to remove the legacy inliner infrastructure.

Reviewed By: mtrofin

Differential Revision: https://reviews.llvm.org/D146446
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The legacy pass is only used in AMDGPU codegen, which doesn't care about running it in call graph order (it actually has to work around that fact).

Make the legacy pass a module pass and share code with the new pass.

This allows us to remove the legacy inliner infrastructure.

Reviewed By: mtrofin

Differential Revision: https://reviews.llvm.org/D146446
</pre>
</div>
</content>
</entry>
<entry>
<title>[InlineOrder] Plugin Inline Order</title>
<updated>2023-03-15T17:15:14+00:00</updated>
<author>
<name>ibricchi</name>
<email>ibricchi@student.ethz.ch</email>
</author>
<published>2023-03-15T17:14:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=65f7ebe72e4ca1b788e13dfbd2f71b5beeffba7d'/>
<id>65f7ebe72e4ca1b788e13dfbd2f71b5beeffba7d</id>
<content type='text'>
Adds the ability to load a plugin to control the inline order.
This allows developing and distributing inlining heuristics
outside of tree. And together with the inline advisor plugins
allows for fine grained control of the inliner.

The PluginInlineOrderAnalysis class serves as the entry point
for dynamic advisors. Plugins must register instances of this
class to provide their own InlineOrder.

Reviewed By: kazu

Differential Revision: https://reviews.llvm.org/D140637
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds the ability to load a plugin to control the inline order.
This allows developing and distributing inlining heuristics
outside of tree. And together with the inline advisor plugins
allows for fine grained control of the inliner.

The PluginInlineOrderAnalysis class serves as the entry point
for dynamic advisors. Plugins must register instances of this
class to provide their own InlineOrder.

Reviewed By: kazu

Differential Revision: https://reviews.llvm.org/D140637
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[InlineOrder] Plugin Inline Order"</title>
<updated>2023-03-15T17:12:04+00:00</updated>
<author>
<name>Jake Egan</name>
<email>jake.egan@ibm.com</email>
</author>
<published>2023-03-15T17:12:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1628a5695e329903efc71d6fbe6eb0392639ad7e'/>
<id>1628a5695e329903efc71d6fbe6eb0392639ad7e</id>
<content type='text'>
This commit is causing a CMake error on AIX. Will recommit with
a fix.

This reverts commit e46d8a731535afcf0c5c2a2f6cf3c5d4fb69cd5b.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit is causing a CMake error on AIX. Will recommit with
a fix.

This reverts commit e46d8a731535afcf0c5c2a2f6cf3c5d4fb69cd5b.
</pre>
</div>
</content>
</entry>
</feed>
