<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/CodeGen/GlobalMergeFunctions.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>[llvm] annotate remaining CodeGen and CodeGenTypes library interfaces for DLL export (#145361)</title>
<updated>2025-06-25T20:00:59+00:00</updated>
<author>
<name>Andrew Rogers</name>
<email>andrurogerz@gmail.com</email>
</author>
<published>2025-06-25T20:00:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ad0fba211cc98ce2677a77cc4511bd1751ea9e68'/>
<id>ad0fba211cc98ce2677a77cc4511bd1751ea9e68</id>
<content type='text'>
## Purpose

This patch is one in a series of code-mods that annotate LLVM’s public
interface for export. This patch annotates the remaining LLVM CodeGen
and CodeGenTypes library interfaces that were missed in, or modified
since, previous patches. The annotations currently have no meaningful
impact on the LLVM build; however, they are a prerequisite to support an
LLVM Windows DLL (shared library) build.

## Background

This effort is tracked in #109483. Additional context is provided in
[this
discourse](https://discourse.llvm.org/t/psa-annotating-llvm-public-interface/85307),
and documentation for `LLVM_ABI` and related annotations is found in the
LLVM repo
[here](https://github.com/llvm/llvm-project/blob/main/llvm/docs/InterfaceExportAnnotations.rst).

## Overview

The bulk of these changes were generated automatically using the
[Interface Definition Scanner (IDS)](https://github.com/compnerd/ids)
tool, followed formatting with `git clang-format`.

The following manual adjustments were also applied after running IDS:
- Explicitly instantiate `CallLowering::setArgFlags` template method
instances in `CodeGen/GlobalISel/CallLowering.h` and annotate them with
`LLVM_ABI`. These methods are already explicitly instantiated in
`lib/CodeGen/GlobalISel/CallLowering.cpp` but were not `extern` declared
in the header.
- Annotate several explicit template instantiations with
`LLVM_EXPORT_TEMPLATE`.
- Include `llvm/CodeGen/Passes.h` from
`llvm/lib/CodeGen/GlobalMergeFunctions.cpp` to pick up the declaration
of `llvm::createGlobalMergeFuncPass` with the `LLVM_ABI` annotation
(instead of adding `LLVM_ABI` to the function definition in this file)

## Validation

Local builds and tests to validate cross-platform compatibility. This
included llvm, clang, and lldb on the following configurations:

- Windows with MSVC
- Windows with Clang
- Linux with GCC
- Linux with Clang
- Darwin with Clang</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
## Purpose

This patch is one in a series of code-mods that annotate LLVM’s public
interface for export. This patch annotates the remaining LLVM CodeGen
and CodeGenTypes library interfaces that were missed in, or modified
since, previous patches. The annotations currently have no meaningful
impact on the LLVM build; however, they are a prerequisite to support an
LLVM Windows DLL (shared library) build.

## Background

This effort is tracked in #109483. Additional context is provided in
[this
discourse](https://discourse.llvm.org/t/psa-annotating-llvm-public-interface/85307),
and documentation for `LLVM_ABI` and related annotations is found in the
LLVM repo
[here](https://github.com/llvm/llvm-project/blob/main/llvm/docs/InterfaceExportAnnotations.rst).

## Overview

The bulk of these changes were generated automatically using the
[Interface Definition Scanner (IDS)](https://github.com/compnerd/ids)
tool, followed formatting with `git clang-format`.

The following manual adjustments were also applied after running IDS:
- Explicitly instantiate `CallLowering::setArgFlags` template method
instances in `CodeGen/GlobalISel/CallLowering.h` and annotate them with
`LLVM_ABI`. These methods are already explicitly instantiated in
`lib/CodeGen/GlobalISel/CallLowering.cpp` but were not `extern` declared
in the header.
- Annotate several explicit template instantiations with
`LLVM_EXPORT_TEMPLATE`.
- Include `llvm/CodeGen/Passes.h` from
`llvm/lib/CodeGen/GlobalMergeFunctions.cpp` to pick up the declaration
of `llvm::createGlobalMergeFuncPass` with the `LLVM_ABI` annotation
(instead of adding `LLVM_ABI` to the function definition in this file)

## Validation

Local builds and tests to validate cross-platform compatibility. This
included llvm, clang, and lldb on the following configurations:

- Windows with MSVC
- Windows with Clang
- Linux with GCC
- Linux with Clang
- Darwin with Clang</pre>
</div>
</content>
</entry>
<entry>
<title>[CGData] Make an option to skip reading Names into StableFunctionMap (#142095)</title>
<updated>2025-06-10T14:33:40+00:00</updated>
<author>
<name>Zhaoxuan Jiang</name>
<email>jiangzhaoxuan94@gmail.com</email>
</author>
<published>2025-06-10T14:33:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=713702109a02cb340224cc7c086dcf0f371db45b'/>
<id>713702109a02cb340224cc7c086dcf0f371db45b</id>
<content type='text'>
Names are used for debugging purpose and have no impact on codegen. For
a non-trivial project, reading them consumes a lot of memory and slows
down the compilation significantly. This patch adds a field in the
indexed CGData to remember the total size of Names, and creates a
command-line option to skip reading Names by advancing the pointer when
deserializing the indexed CGData.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Names are used for debugging purpose and have no impact on codegen. For
a non-trivial project, reading them consumes a lot of memory and slows
down the compilation significantly. This patch adds a field in the
indexed CGData to remember the total size of Names, and creates a
command-line option to skip reading Names by advancing the pointer when
deserializing the indexed CGData.</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Remove redundant calls to std::unique_ptr&lt;T&gt;::get (NFC) (#138236)</title>
<updated>2025-05-02T15:53:53+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-05-02T15:53:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4ec473e0e19c1586f27ebc146249b10acb3b8769'/>
<id>4ec473e0e19c1586f27ebc146249b10acb3b8769</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[MergeFunc] Fix crash caused by bitcasting ArrayType (#133259)</title>
<updated>2025-04-04T09:16:40+00:00</updated>
<author>
<name>Tobias Stadler</name>
<email>mail@stadler-tobias.de</email>
</author>
<published>2025-04-04T09:16:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1302610f03a1f10c2eea4c66445ccba4c52887b6'/>
<id>1302610f03a1f10c2eea4c66445ccba4c52887b6</id>
<content type='text'>
createCast in MergeFunctions did not consider ArrayTypes, which results
in the creation of a bitcast between ArrayTypes in the thunk function,
leading to an assertion failure in the provided test case.

The version of createCast in GlobalMergeFunctions does handle
ArrayTypes, so this common code has been factored out into the
IRBuilder.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
createCast in MergeFunctions did not consider ArrayTypes, which results
in the creation of a bitcast between ArrayTypes in the thunk function,
leading to an assertion failure in the provided test case.

The version of createCast in GlobalMergeFunctions does handle
ArrayTypes, so this common code has been factored out into the
IRBuilder.</pre>
</div>
</content>
</entry>
<entry>
<title>[CGData][Merger] Avoid merging the attached call target (#121030)</title>
<updated>2024-12-27T19:59:25+00:00</updated>
<author>
<name>Kyungwoo Lee</name>
<email>kyulee@meta.com</email>
</author>
<published>2024-12-27T19:59:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=815343e7dd32cc4c5c903ac52daf87aaa4e4cd6e'/>
<id>815343e7dd32cc4c5c903ac52daf87aaa4e4cd6e</id>
<content type='text'>
For global function merging, the target of the arc-attached call must be
a constant and cannot be parameterized.
This change adds a check to bypass this case in `canParameterizeCallOperand()`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For global function merging, the target of the arc-attached call must be
a constant and cannot be parameterized.
This change adds a check to bypass this case in `canParameterizeCallOperand()`.</pre>
</div>
</content>
</entry>
<entry>
<title>[CGData] Change placeholder from `undef` to `poison` when initializing a vector [NFC] (#119134)</title>
<updated>2024-12-10T15:04:41+00:00</updated>
<author>
<name>Pedro Lobo</name>
<email>pedro.lobo@tecnico.ulisboa.pt</email>
</author>
<published>2024-12-10T15:04:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=20b071c0ebd9a5de7e1893cf6f1d6081819015c8'/>
<id>20b071c0ebd9a5de7e1893cf6f1d6081819015c8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Reland [CGData][GMF] Skip No Params (#116548)</title>
<updated>2024-11-25T21:55:02+00:00</updated>
<author>
<name>Kyungwoo Lee</name>
<email>kyulee@meta.com</email>
</author>
<published>2024-11-25T18:57:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fe69a20cc1e46bf8473aaef1be8a1805c80fc9d4'/>
<id>fe69a20cc1e46bf8473aaef1be8a1805c80fc9d4</id>
<content type='text'>
This update follows up on change #112671 and is mostly a NFC, with the following exceptions:
  - Introduced `-global-merging-skip-no-params` to bypass merging when no parameters are required.
  - Parameter count is now calculated based on the unique hash count.
  - Added `-global-merging-inst-overhead` to adjust the instruction overhead, reflecting the machine instruction size.
  - Costs and benefits are now computed using the double data type. Since the finalization process occurs offline, this should not significantly impact build time.
  - Moved a sorting operation outside of the loop.

This is a patch for
https://discourse.llvm.org/t/rfc-global-function-merging/82608.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This update follows up on change #112671 and is mostly a NFC, with the following exceptions:
  - Introduced `-global-merging-skip-no-params` to bypass merging when no parameters are required.
  - Parameter count is now calculated based on the unique hash count.
  - Added `-global-merging-inst-overhead` to adjust the instruction overhead, reflecting the machine instruction size.
  - Costs and benefits are now computed using the double data type. Since the finalization process occurs offline, this should not significantly impact build time.
  - Moved a sorting operation outside of the loop.

This is a patch for
https://discourse.llvm.org/t/rfc-global-function-merging/82608.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[CGData][GMF] Skip No Params (#116548)"</title>
<updated>2024-11-25T19:09:29+00:00</updated>
<author>
<name>Kyungwoo Lee</name>
<email>kyulee@meta.com</email>
</author>
<published>2024-11-25T19:09:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fe3c23b439b9a2d00442d9bc6a4ca86f73066a3d'/>
<id>fe3c23b439b9a2d00442d9bc6a4ca86f73066a3d</id>
<content type='text'>
This reverts commit fdf1f69c57ac3667d27c35e097040284edb1f574.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit fdf1f69c57ac3667d27c35e097040284edb1f574.
</pre>
</div>
</content>
</entry>
<entry>
<title>[CGData][GMF] Skip No Params (#116548)</title>
<updated>2024-11-25T18:57:41+00:00</updated>
<author>
<name>Kyungwoo Lee</name>
<email>kyulee@meta.com</email>
</author>
<published>2024-11-25T18:57:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fdf1f69c57ac3667d27c35e097040284edb1f574'/>
<id>fdf1f69c57ac3667d27c35e097040284edb1f574</id>
<content type='text'>
This update follows up on change #112671 and is mostly a NFC, with the following exceptions:
  - Introduced `-global-merging-skip-no-params` to bypass merging when no parameters are required.
  - Parameter count is now calculated based on the unique hash count.
  - Added `-global-merging-inst-overhead` to adjust the instruction overhead, reflecting the machine instruction size.
  - Costs and benefits are now computed using the double data type. Since the finalization process occurs offline, this should not significantly impact build time.
  - Moved a sorting operation outside of the loop.

This is a patch for
https://discourse.llvm.org/t/rfc-global-function-merging/82608.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This update follows up on change #112671 and is mostly a NFC, with the following exceptions:
  - Introduced `-global-merging-skip-no-params` to bypass merging when no parameters are required.
  - Parameter count is now calculated based on the unique hash count.
  - Added `-global-merging-inst-overhead` to adjust the instruction overhead, reflecting the machine instruction size.
  - Costs and benefits are now computed using the double data type. Since the finalization process occurs offline, this should not significantly impact build time.
  - Moved a sorting operation outside of the loop.

This is a patch for
https://discourse.llvm.org/t/rfc-global-function-merging/82608.</pre>
</div>
</content>
</entry>
<entry>
<title>Fix crash from [CGData] Global Merge Functions (#112671) (#116241)</title>
<updated>2024-11-15T22:57:17+00:00</updated>
<author>
<name>Kyungwoo Lee</name>
<email>kyulee@meta.com</email>
</author>
<published>2024-11-15T22:57:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=816c975ea7b27a784c8f0d6a9b92571ebc97d4a3'/>
<id>816c975ea7b27a784c8f0d6a9b92571ebc97d4a3</id>
<content type='text'>
Module summary index is optional for this pass, and we shouldn't run it,
but import it as necessary.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Module summary index is optional for this pass, and we shouldn't run it,
but import it as necessary.</pre>
</div>
</content>
</entry>
</feed>
