<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h, 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>[WebAssembly] Clean up CustomMappingTraits&lt;BBNumberMap&gt; (NFC) (#167155)</title>
<updated>2025-11-08T18:16:39+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-11-08T18:16:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6b42c913fa803bf4b8054d528f823c4102d6e3a8'/>
<id>6b42c913fa803bf4b8054d528f823c4102d6e3a8</id>
<content type='text'>
This patch does two things for readability:

- Use structured bindings.
- Remove extraneous .c_str().

Note that YamlIO.mapRequired takes StringRef as the key type.  As
such, we can implicitly construct StringRef from std::string.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch does two things for readability:

- Use structured bindings.
- Remove extraneous .c_str().

Note that YamlIO.mapRequired takes StringRef as the key type.  As
such, we can implicitly construct StringRef from std::string.</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Remove redundant str() and c_str() (NFC) (#166012)</title>
<updated>2025-11-01T19:42:06+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-11-01T19:42:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e7a23c4020840e8e0a2e7f535306cd08f3a8fced'/>
<id>e7a23c4020840e8e0a2e7f535306cd08f3a8fced</id>
<content type='text'>
io.mapRequired takes StringRef as the key type.  As such, we do not
need to create extraneous copies with str().c_str() or str().

Identified with readability-redundant-string-cstr.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
io.mapRequired takes StringRef as the key type.  As such, we do not
need to create extraneous copies with str().c_str() or str().

Identified with readability-redundant-string-cstr.</pre>
</div>
</content>
</entry>
<entry>
<title>[Target] Add "override" where appropriate (NFC) (#165083)</title>
<updated>2025-10-25T13:23:43+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-10-25T13:23:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=84857775b76f7e27096d9ac311b378f99a8442c7'/>
<id>84857775b76f7e27096d9ac311b378f99a8442c7</id>
<content type='text'>
Note that "override" makes "virtual" redundant.

Identified with modernize-use-override.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Note that "override" makes "virtual" redundant.

Identified with modernize-use-override.</pre>
</div>
</content>
</entry>
<entry>
<title>[WebAssembly] Use Register instead of unsigned. NFC</title>
<updated>2025-02-25T07:22:20+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@sifive.com</email>
</author>
<published>2025-02-25T07:22:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9b298a1d3d2280c2b09f4a905d079bab008b5290'/>
<id>9b298a1d3d2280c2b09f4a905d079bab008b5290</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[WebAssembly] Use Register instead of unsigned. NFC</title>
<updated>2025-02-23T06:45:06+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@sifive.com</email>
</author>
<published>2025-02-23T06:45:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4efad490af2b96af58fc84f7562c9e643b6a160e'/>
<id>4efad490af2b96af58fc84f7562c9e643b6a160e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen] Remove static member function Register::virtReg2Index. NFC (#127962)</title>
<updated>2025-02-20T07:34:55+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@sifive.com</email>
</author>
<published>2025-02-20T07:34:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=77183a46a5fd4e0b92ea91096c6d58bea7a7f43b'/>
<id>77183a46a5fd4e0b92ea91096c6d58bea7a7f43b</id>
<content type='text'>
Use the nonstatic member instead.

I'm pretty sure the code in SPRIV is a layering violation. MC layer
files are using a CodeGen header.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the nonstatic member instead.

I'm pretty sure the code in SPRIV is a layering violation. MC layer
files are using a CodeGen header.</pre>
</div>
</content>
</entry>
<entry>
<title>[WebAssembly] Allocate MCSymbolWasm data on MCContext (#85866)</title>
<updated>2024-04-02T17:59:29+00:00</updated>
<author>
<name>Tim Neumann</name>
<email>timnn@google.com</email>
</author>
<published>2024-04-02T17:59:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f792f14b01605453c7c0c17f3b4564335c0d9d14'/>
<id>f792f14b01605453c7c0c17f3b4564335c0d9d14</id>
<content type='text'>
Fixes #85578, a use-after-free caused by some `MCSymbolWasm` data being
freed too early.

Previously, `WebAssemblyAsmParser` owned the data that is moved to
`MCContext` by this PR, which caused problems when handling module ASM,
because the ASM parser was destroyed after parsing the module ASM, but
the symbols persisted.

The added test passes locally with an LLVM build with AddressSanitizer
enabled.

Implementation notes:

* I've called the added method
&lt;code&gt;allocate&lt;b&gt;&lt;i&gt;Generic&lt;/i&gt;&lt;/b&gt;String&lt;/code&gt; and added the second
paragraph of its documentation to maybe guide people a bit on when to
use this method (based on my (limited) understanding of the `MCContext`
class). We could also just call it `allocateString` and remove that
second paragraph.
* The added `createWasmSignature` method does not support taking the
return and parameter types as arguments: Specifying them afterwards is
barely any longer and prevents them from being accidentally specified in
the wrong order.
* This removes a _"TODO: Do the uniquing of Signatures here instead of
ObjectFileWriter?"_ since the field it's attached to is also removed.
Let me know if you think that TODO should be preserved somewhere.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #85578, a use-after-free caused by some `MCSymbolWasm` data being
freed too early.

Previously, `WebAssemblyAsmParser` owned the data that is moved to
`MCContext` by this PR, which caused problems when handling module ASM,
because the ASM parser was destroyed after parsing the module ASM, but
the symbols persisted.

The added test passes locally with an LLVM build with AddressSanitizer
enabled.

Implementation notes:

* I've called the added method
&lt;code&gt;allocate&lt;b&gt;&lt;i&gt;Generic&lt;/i&gt;&lt;/b&gt;String&lt;/code&gt; and added the second
paragraph of its documentation to maybe guide people a bit on when to
use this method (based on my (limited) understanding of the `MCContext`
class). We could also just call it `allocateString` and remove that
second paragraph.
* The added `createWasmSignature` method does not support taking the
return and parameter types as arguments: Specifying them afterwards is
barely any longer and prevents them from being accidentally specified in
the wrong order.
* This removes a _"TODO: Do the uniquing of Signatures here instead of
ObjectFileWriter?"_ since the field it's attached to is also removed.
Let me know if you think that TODO should be preserved somewhere.</pre>
</div>
</content>
</entry>
<entry>
<title>[WebAssembly] Pass ArrayRef by value (NFC) (#85732)</title>
<updated>2024-03-19T18:00:33+00:00</updated>
<author>
<name>Heejin Ahn</name>
<email>aheejin@gmail.com</email>
</author>
<published>2024-03-19T18:00:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=71b69dd21becdfbf8922674ce6ca4129926660ab'/>
<id>71b69dd21becdfbf8922674ce6ca4129926660ab</id>
<content type='text'>
`ArrayRef` is supposed to be passed by value:

https://github.com/llvm/llvm-project/blob/bda05140fb758156ae35f3919e6283d94bfa3905/llvm/include/llvm/ADT/ArrayRef.h#L38-L39</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`ArrayRef` is supposed to be passed by value:

https://github.com/llvm/llvm-project/blob/bda05140fb758156ae35f3919e6283d94bfa3905/llvm/include/llvm/ADT/ArrayRef.h#L38-L39</pre>
</div>
</content>
</entry>
<entry>
<title>[WebAssembly] Create separation between MC and CodeGen layers</title>
<updated>2023-08-18T21:08:37+00:00</updated>
<author>
<name>Reid Kleckner</name>
<email>rnk@google.com</email>
</author>
<published>2023-07-26T22:55:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=984dc4b9cdca2fa9ef1b33535679756b22957e67'/>
<id>984dc4b9cdca2fa9ef1b33535679756b22957e67</id>
<content type='text'>
Move WebAssemblyUtilities from Utils to the CodeGen library. It
primarily deals in MIR layer types, so it really lives in the CodeGen
library.

Move a variety of other things around to try create better separation.

See issue #64166 for more info on layering.

Move llvm/include/CodeGen/WasmAddressSpaces.h back to
llvm/lib/Target/WebAssembly/Utils.

Differential Revision: https://reviews.llvm.org/D156472
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move WebAssemblyUtilities from Utils to the CodeGen library. It
primarily deals in MIR layer types, so it really lives in the CodeGen
library.

Move a variety of other things around to try create better separation.

See issue #64166 for more info on layering.

Move llvm/include/CodeGen/WasmAddressSpaces.h back to
llvm/lib/Target/WebAssembly/Utils.

Differential Revision: https://reviews.llvm.org/D156472
</pre>
</div>
</content>
</entry>
<entry>
<title>CodeGen: Don't lazily construct MachineFunctionInfo</title>
<updated>2022-12-21T15:49:32+00:00</updated>
<author>
<name>Matt Arsenault</name>
<email>Matthew.Arsenault@amd.com</email>
</author>
<published>2020-06-18T13:00:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=69e75ae695d9ef1360a2a1fbefd6e0e0456c3f7b'/>
<id>69e75ae695d9ef1360a2a1fbefd6e0e0456c3f7b</id>
<content type='text'>
This fixes what I consider to be an API flaw I've tripped over
multiple times. The point this is constructed isn't well defined, so
depending on where this is first called, you can conclude different
information based on the MachineFunction. For example, the AMDGPU
implementation inspected the MachineFrameInfo on construction for the
stack objects and if the frame has calls. This kind of worked in
SelectionDAG which visited all allocas up front, but broke in
GlobalISel which hasn't visited any of the IR when arguments are
lowered.

I've run into similar problems before with the MIR parser and trying
to make use of other MachineFunction fields, so I think it's best to
just categorically disallow dependency on the MachineFunction state in
the constructor and to always construct this at the same time as the
MachineFunction itself.

A missing feature I still could use is a way to access an custom
analysis pass on the IR here.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes what I consider to be an API flaw I've tripped over
multiple times. The point this is constructed isn't well defined, so
depending on where this is first called, you can conclude different
information based on the MachineFunction. For example, the AMDGPU
implementation inspected the MachineFrameInfo on construction for the
stack objects and if the frame has calls. This kind of worked in
SelectionDAG which visited all allocas up front, but broke in
GlobalISel which hasn't visited any of the IR when arguments are
lowered.

I've run into similar problems before with the MIR parser and trying
to make use of other MachineFunction fields, so I think it's best to
just categorically disallow dependency on the MachineFunction state in
the constructor and to always construct this at the same time as the
MachineFunction itself.

A missing feature I still could use is a way to access an custom
analysis pass on the IR here.
</pre>
</div>
</content>
</entry>
</feed>
