<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Transforms/IPO/AlwaysInliner.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>[Analysis] Remove skipSCC (#127412)</title>
<updated>2025-02-18T17:59:12+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-02-18T17:59:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5d4eb08379cc2574fc8641576c8e5cfc37fe2e6e'/>
<id>5d4eb08379cc2574fc8641576c8e5cfc37fe2e6e</id>
<content type='text'>
The last use was removed in:

  commit fa6ea7a419f37befbed04368bcb8af4c718facbb
  Author: Arthur Eubanks &lt;aeubanks@google.com&gt;
  Date:   Mon Mar 20 11:18:35 2023 -0700</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The last use was removed in:

  commit fa6ea7a419f37befbed04368bcb8af4c718facbb
  Author: Arthur Eubanks &lt;aeubanks@google.com&gt;
  Date:   Mon Mar 20 11:18:35 2023 -0700</pre>
</div>
</content>
</entry>
<entry>
<title>[AlwaysInline] Fix analysis invalidation (#119566)</title>
<updated>2024-12-12T11:59:59+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2024-12-12T11:59:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2be41e7aee1c72177019a219ccd8e0cfccdbb52b'/>
<id>2be41e7aee1c72177019a219ccd8e0cfccdbb52b</id>
<content type='text'>
This is a followup to #117750. Currently, AlwaysInline only invalidates
analyses at the end, by returning that no analyses are preserved.
However, this means that analyses fetched during inlining may be
outdated. The aforementioned PR exposed this issue.

Instead, bring the logic closer to what the normal inliner does, by
directly invalidating the caller in FAM. This should make sure that we
don't receive any outdated analyses even if they are fetched during
inlining.

Also drop the BFI updating entirely -- there's no point in doing it if
we're going to invalidate everything anyway.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a followup to #117750. Currently, AlwaysInline only invalidates
analyses at the end, by returning that no analyses are preserved.
However, this means that analyses fetched during inlining may be
outdated. The aforementioned PR exposed this issue.

Instead, bring the logic closer to what the normal inliner does, by
directly invalidating the caller in FAM. This should make sure that we
don't receive any outdated analyses even if they are fetched during
inlining.

Also drop the BFI updating entirely -- there's no point in doing it if
we're going to invalidate everything anyway.</pre>
</div>
</content>
</entry>
<entry>
<title>[AlwaysInline] Avoid unnecessary BFI fetches (#117750)</title>
<updated>2024-11-27T14:53:21+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2024-11-27T14:53:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=43ee6f7a01fca8cf08e1029c54acc23240b86fca'/>
<id>43ee6f7a01fca8cf08e1029c54acc23240b86fca</id>
<content type='text'>
AlwaysInliner doesn't use BFI itself, it only updates it. If BFI is not
already computed, it will spend time to first compute it, and then
update it. This is not necessary: If BFI is not available in the first
place, there is no need to update it.

This is mainly relevant in debug builds for IR that has a lot of
alwaysinline functions.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
AlwaysInliner doesn't use BFI itself, it only updates it. If BFI is not
already computed, it will spend time to first compute it, and then
update it. This is not necessary: If BFI is not available in the first
place, there is no need to update it.

This is mainly relevant in debug builds for IR that has a lot of
alwaysinline functions.</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC][AlwaysInliner] Reduce AlwaysInliner memory consumption. (#96958)</title>
<updated>2024-07-02T08:43:49+00:00</updated>
<author>
<name>Daniil Fukalov</name>
<email>1671137+dfukalov@users.noreply.github.com</email>
</author>
<published>2024-07-02T08:43:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=12c1156207e8c0d63701487f210ce90c4b7da938'/>
<id>12c1156207e8c0d63701487f210ce90c4b7da938</id>
<content type='text'>
Refactored AlwaysInliner to remove some of inlined functions earlier.

Before the change AlwaysInliner walked through all functions in the
module and inlined them into calls where it is appropriate. Removing of
the dead inlined functions was performed only after all of inlining. For
the test case from the issue
[59126](https://github.com/llvm/llvm-project/issues/59126) compiler
consumes all of the memory on 64GB machine, so is killed.

The change checks if just inlined function can be removed from the
module and removes it.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Refactored AlwaysInliner to remove some of inlined functions earlier.

Before the change AlwaysInliner walked through all functions in the
module and inlined them into calls where it is appropriate. Removing of
the dead inlined functions was performed only after all of inlining. For
the test case from the issue
[59126](https://github.com/llvm/llvm-project/issues/59126) compiler
consumes all of the memory on 64GB machine, so is killed.

The change checks if just inlined function can be removed from the
module and removes it.</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>[IPO] Reorder parameters of InlineFunction (NFC)</title>
<updated>2022-09-20T16:09:38+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2022-09-20T16:09:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=00874c48ea4d291908517afaab50d1dcbfb016c3'/>
<id>00874c48ea4d291908517afaab50d1dcbfb016c3</id>
<content type='text'>
With the recent addition of new parameter MergeAttributes (D134117),
callers need to specify several default parameters before getting to
specify the new parameter.

This patch reorders the parameters so that callers do not have to
specify as many default parameters.

Differential Revision: https://reviews.llvm.org/D134125
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With the recent addition of new parameter MergeAttributes (D134117),
callers need to specify several default parameters before getting to
specify the new parameter.

This patch reorders the parameters so that callers do not have to
specify as many default parameters.

Differential Revision: https://reviews.llvm.org/D134125
</pre>
</div>
</content>
</entry>
<entry>
<title>[Transforms] Merge function attributes within InlineFunction (NFC)</title>
<updated>2022-09-18T06:10:23+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2022-09-18T06:10:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=284f0397e2779d9de6613c81539367f9b35d460f'/>
<id>284f0397e2779d9de6613c81539367f9b35d460f</id>
<content type='text'>
In the past, we've had a bug resulting in a compiler crash after
forgetting to merge function attributes (D105729).

This patch teaches InlineFunction to merge function attributes.  This
way, we minimize the "time" when the IR is valid, but the function
attributes are not.

Differential Revision: https://reviews.llvm.org/D134117
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the past, we've had a bug resulting in a compiler crash after
forgetting to merge function attributes (D105729).

This patch teaches InlineFunction to merge function attributes.  This
way, we minimize the "time" when the IR is valid, but the function
attributes are not.

Differential Revision: https://reviews.llvm.org/D134117
</pre>
</div>
</content>
</entry>
<entry>
<title>Cleanup includes: Transforms/IPO</title>
<updated>2022-03-22T09:06:28+00:00</updated>
<author>
<name>serge-sans-paille</name>
<email>sguelton@redhat.com</email>
</author>
<published>2022-03-21T20:53:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f1985a3f855d3676c5aad0e5c258d2ea38598f44'/>
<id>f1985a3f855d3676c5aad0e5c258d2ea38598f44</id>
<content type='text'>
Preprocessor output diff: -238205 lines
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup
Differential Revision: https://reviews.llvm.org/D122183
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Preprocessor output diff: -238205 lines
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup
Differential Revision: https://reviews.llvm.org/D122183
</pre>
</div>
</content>
</entry>
<entry>
<title>[AlwaysInliner] Emit inline remark only when successful</title>
<updated>2022-03-17T22:40:24+00:00</updated>
<author>
<name>Ellis Hoag</name>
<email>ellis.sparky.hoag@gmail.com</email>
</author>
<published>2022-03-17T20:00:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f6b5142ac2e4c49b9eff4c22d699f464a6812feb'/>
<id>f6b5142ac2e4c49b9eff4c22d699f464a6812feb</id>
<content type='text'>
Failures in `InlineFunction()` are caught after D121722, but `emitInlinedIntoBasedOnCost()` should only be called when inlining is successful. This also removes an unnecessary call to `shouldInline()` which always returned `InlineCost::getAlways()`.

Reviewed By: kyulee, nikic

Differential Revision: https://reviews.llvm.org/D121946
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Failures in `InlineFunction()` are caught after D121722, but `emitInlinedIntoBasedOnCost()` should only be called when inlining is successful. This also removes an unnecessary call to `shouldInline()` which always returned `InlineCost::getAlways()`.

Reviewed By: kyulee, nikic

Differential Revision: https://reviews.llvm.org/D121946
</pre>
</div>
</content>
</entry>
<entry>
<title>[AlwaysInliner] Check inliner errors even without assserts</title>
<updated>2022-03-17T17:16:23+00:00</updated>
<author>
<name>Ellis Hoag</name>
<email>ellis.sparky.hoag@gmail.com</email>
</author>
<published>2022-03-15T18:10:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=84c6689b1511cc7bcad8f9f166bdc9808b8cdac8'/>
<id>84c6689b1511cc7bcad8f9f166bdc9808b8cdac8</id>
<content type='text'>
When we build clang without asserts we should still check the result of
`InlineFunction()` to be sure there wasn't an error. Otherwise we could
incorrectly merge attributes in the next line.

This also removes a redundent call to `getCaller()`.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D121722
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When we build clang without asserts we should still check the result of
`InlineFunction()` to be sure there wasn't an error. Otherwise we could
incorrectly merge attributes in the next line.

This also removes a redundent call to `getCaller()`.

Reviewed By: nikic

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