<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/test/CodeGen/WebAssembly/userstack.ll, 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>[CodeGen] Convert tests to opaque pointers (NFC)</title>
<updated>2024-02-05T13:07:09+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2024-02-05T13:02:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ff9af4c43ad71eeba2cabe99609cfaa0fd54c1d0'/>
<id>ff9af4c43ad71eeba2cabe99609cfaa0fd54c1d0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[WebAssembly] Define local sp if `llvm.stacksave` is used (#68133)</title>
<updated>2023-10-03T21:51:35+00:00</updated>
<author>
<name>Yuta Saito</name>
<email>ysaito22@apple.com</email>
</author>
<published>2023-10-03T21:51:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=da0ca5dee489aa46ca7f10237aa0dfa01f9b43ea'/>
<id>da0ca5dee489aa46ca7f10237aa0dfa01f9b43ea</id>
<content type='text'>
Usually `llvm.stacksave/stackrestore` are used together with `alloca`
but they can appear without it (e.g. `alloca` can be optimized away).
WebAssembly's function local physical user sp register, which is
referenced by `llvm.stacksave` is created while frame lowering and
replaced with virtual register.
However the sp register was not created when `llvm.stacksave` is used
without `alloca`, and it led MIR verification failure about
use-before-def of sp virtual register.

Resolves https://github.com/llvm/llvm-project/issues/62235</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Usually `llvm.stacksave/stackrestore` are used together with `alloca`
but they can appear without it (e.g. `alloca` can be optimized away).
WebAssembly's function local physical user sp register, which is
referenced by `llvm.stacksave` is created while frame lowering and
replaced with virtual register.
However the sp register was not created when `llvm.stacksave` is used
without `alloca`, and it led MIR verification failure about
use-before-def of sp virtual register.

Resolves https://github.com/llvm/llvm-project/issues/62235</pre>
</div>
</content>
</entry>
<entry>
<title>[PEI][WebAssembly] Switch to backwards frame index elimination</title>
<updated>2023-08-03T09:21:43+00:00</updated>
<author>
<name>Jay Foad</name>
<email>jay.foad@amd.com</email>
</author>
<published>2023-06-08T13:39:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0da19a2be5648140d6cfab4340866dc2bd58c4a9'/>
<id>0da19a2be5648140d6cfab4340866dc2bd58c4a9</id>
<content type='text'>
Backwards frame index elimination uses backwards register scavenging,
which is preferred because it does not rely on accurate kill flags.

Differential Revision: https://reviews.llvm.org/D156691
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Backwards frame index elimination uses backwards register scavenging,
which is preferred because it does not rely on accurate kill flags.

Differential Revision: https://reviews.llvm.org/D156691
</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC][WebAssembly] Updated tests</title>
<updated>2023-01-26T10:26:24+00:00</updated>
<author>
<name>Samuel Parker</name>
<email>sam.parker@arm.com</email>
</author>
<published>2023-01-26T10:26:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=41080b2fdd4b6c57d5a2926d6157b9847342b3a1'/>
<id>41080b2fdd4b6c57d5a2926d6157b9847342b3a1</id>
<content type='text'>
Run update_llc_test_checks on a number of codegen tests.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Run update_llc_test_checks on a number of codegen tests.
</pre>
</div>
</content>
</entry>
<entry>
<title>[WebAssembly] Convert some tests to opaque pointers (NFC)</title>
<updated>2022-12-19T12:07:59+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2022-12-19T12:07:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=73856247eef35f5336e485dc009842a5b991c421'/>
<id>73856247eef35f5336e485dc009842a5b991c421</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[WebAssembly] Added initial type checker to MC Assembler</title>
<updated>2021-07-09T21:07:25+00:00</updated>
<author>
<name>Wouter van Oortmerssen</name>
<email>aardappel@gmail.com</email>
</author>
<published>2021-06-07T19:10:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9647a6f719ee4b1c23eea7aef368c1dcd5317949'/>
<id>9647a6f719ee4b1c23eea7aef368c1dcd5317949</id>
<content type='text'>
This to protect against non-sensical instruction sequences being assembled,
which would either cause asserts/crashes further down, or a Wasm module being output that doesn't validate.

Unlike a validator, this type checker is able to give type-errors as part of the parsing process, which makes the assembler much friendlier to be used by humans writing manual input.

Because the MC system is single pass (instructions aren't even stored in MC format, they are directly output) the type checker has to be single pass as well, which means that from now on .globaltype and .functype decls must come before their use. An extra pass is added to Codegen to collect information for this purpose, since AsmPrinter is normally single pass / streaming as well, and would otherwise generate this information on the fly.

A `-no-type-check` flag was added to llvm-mc (and any other tools that take asm input) that surpresses type errors, as a quick escape hatch for tests that were not intended to be type correct.

This is a first version of the type checker that ignores control flow, i.e. it checks that types are correct along the linear path, but not the branch path. This will still catch most errors. Branch checking could be added in the future.

Differential Revision: https://reviews.llvm.org/D104945
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This to protect against non-sensical instruction sequences being assembled,
which would either cause asserts/crashes further down, or a Wasm module being output that doesn't validate.

Unlike a validator, this type checker is able to give type-errors as part of the parsing process, which makes the assembler much friendlier to be used by humans writing manual input.

Because the MC system is single pass (instructions aren't even stored in MC format, they are directly output) the type checker has to be single pass as well, which means that from now on .globaltype and .functype decls must come before their use. An extra pass is added to Codegen to collect information for this purpose, since AsmPrinter is normally single pass / streaming as well, and would otherwise generate this information on the fly.

A `-no-type-check` flag was added to llvm-mc (and any other tools that take asm input) that surpresses type errors, as a quick escape hatch for tests that were not intended to be type correct.

This is a first version of the type checker that ignores control flow, i.e. it checks that types are correct along the linear path, but not the branch path. This will still catch most errors. Branch checking could be added in the future.

Differential Revision: https://reviews.llvm.org/D104945
</pre>
</div>
</content>
</entry>
<entry>
<title>[WebAssembly] Don't fold frame offset for global addresses</title>
<updated>2020-11-03T22:56:25+00:00</updated>
<author>
<name>Julien Jorge</name>
<email>jjorge@quarkslab.com</email>
</author>
<published>2020-11-02T01:29:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0fca6517118d435f9c2d7afe6135fd5f357509b5'/>
<id>0fca6517118d435f9c2d7afe6135fd5f357509b5</id>
<content type='text'>
When machine instructions are in the form of
```
%0 = CONST_I32 @str
%1 = ADD_I32 %stack.0, %0
%2 = LOAD 0, 0, %1
```

In the `ADD_I32` instruction, it is possible to fold it if `%0` is a
`CONST_I32` from an immediate number. But in this case it is a global
address, so we shouldn't do that. But we haven't checked if the operand
of `ADD` is an immediate so far. This fixes the problem. (The case
applies the same for `ADD_I64` and `CONST_I64` instructions.)

Fixes https://bugs.llvm.org/show_bug.cgi?id=47944.

Patch by Julien Jorge (jjorge@quarkslab.com)

Reviewed By: dschuff

Differential Revision: https://reviews.llvm.org/D90577
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When machine instructions are in the form of
```
%0 = CONST_I32 @str
%1 = ADD_I32 %stack.0, %0
%2 = LOAD 0, 0, %1
```

In the `ADD_I32` instruction, it is possible to fold it if `%0` is a
`CONST_I32` from an immediate number. But in this case it is a global
address, so we shouldn't do that. But we haven't checked if the operand
of `ADD` is an immediate so far. This fixes the problem. (The case
applies the same for `ADD_I64` and `CONST_I64` instructions.)

Fixes https://bugs.llvm.org/show_bug.cgi?id=47944.

Patch by Julien Jorge (jjorge@quarkslab.com)

Reviewed By: dschuff

Differential Revision: https://reviews.llvm.org/D90577
</pre>
</div>
</content>
</entry>
<entry>
<title>[WebAssembly] Adding 64-bit versions of __stack_pointer and other globals</title>
<updated>2020-06-25T22:52:44+00:00</updated>
<author>
<name>Wouter van Oortmerssen</name>
<email>aardappel@gmail.com</email>
</author>
<published>2020-06-15T22:31:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b9a539c01084a572e406579c326a0da1e22e286f'/>
<id>b9a539c01084a572e406579c326a0da1e22e286f</id>
<content type='text'>
We have 6 globals, all of which except for __table_base are 64-bit under wasm64.

Differential Revision: https://reviews.llvm.org/D82130
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We have 6 globals, all of which except for __table_base are 64-bit under wasm64.

Differential Revision: https://reviews.llvm.org/D82130
</pre>
</div>
</content>
</entry>
<entry>
<title>[WebAssembly] Update CodeGen test expectations after rL354697. NFC</title>
<updated>2019-02-23T00:07:39+00:00</updated>
<author>
<name>Sam Clegg</name>
<email>sbc@chromium.org</email>
</author>
<published>2019-02-23T00:07:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=275d15ecf3476b7f884174e1c85f4894fb815bf1'/>
<id>275d15ecf3476b7f884174e1c85f4894fb815bf1</id>
<content type='text'>
llvm-svn: 354705
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
llvm-svn: 354705
</pre>
</div>
</content>
</entry>
<entry>
<title>[WebAssembly] Massive instruction renaming</title>
<updated>2019-01-08T06:25:55+00:00</updated>
<author>
<name>Thomas Lively</name>
<email>tlively@google.com</email>
</author>
<published>2019-01-08T06:25:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6a87ddac9a056c9a7b75eb630908aa356d8a1028'/>
<id>6a87ddac9a056c9a7b75eb630908aa356d8a1028</id>
<content type='text'>
Summary:
An automated renaming of all the instructions listed at
https://github.com/WebAssembly/spec/issues/884#issuecomment-426433329
as well as some similarly-named identifiers.

Reviewers: aheejin, dschuff, aardappel

Subscribers: sbc100, jgravelle-google, eraman, sunfish, jfb, llvm-commits

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

llvm-svn: 350609
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
An automated renaming of all the instructions listed at
https://github.com/WebAssembly/spec/issues/884#issuecomment-426433329
as well as some similarly-named identifiers.

Reviewers: aheejin, dschuff, aardappel

Subscribers: sbc100, jgravelle-google, eraman, sunfish, jfb, llvm-commits

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

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