<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp, 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>[SystemZ] Mark RELOC_NONE as not having size for SystemZ (#167027)</title>
<updated>2025-11-07T22:46:59+00:00</updated>
<author>
<name>Daniel Thornburgh</name>
<email>dthorn@google.com</email>
</author>
<published>2025-11-07T22:46:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=397701f3a0a05f8569f923b283bc66b124795b4a'/>
<id>397701f3a0a05f8569f923b283bc66b124795b4a</id>
<content type='text'>
This fixes forward an issue in PR #147427.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes forward an issue in PR #147427.</pre>
</div>
</content>
</entry>
<entry>
<title>[SystemZ] Treat FAKE_USE instructions as instructions without a size (#144390)</title>
<updated>2025-06-18T09:29:23+00:00</updated>
<author>
<name>Stephen Tozer</name>
<email>stephen.tozer@sony.com</email>
</author>
<published>2025-06-18T09:29:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=757a0e6d3b6130a984960ee413a3c8a6f99c7cb5'/>
<id>757a0e6d3b6130a984960ee413a3c8a6f99c7cb5</id>
<content type='text'>
This patch fixes an error in which `FAKE_USE` instructions would trigger
an assertion in SystemZLongBranch due to them having a size of 0 without
being excepted in the assertion that each instruction, other than a set
of known 0-size instruction types, should have a non-0 size.

`FAKE_USE` instructions are no-op instructions that are emitted into
LLVM by the `-fextend-variable-liveness` clang flag to help preserve the
liveness of source variables in optimized code, and therefore they
should be understood as being valid size 0 instructions.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes an error in which `FAKE_USE` instructions would trigger
an assertion in SystemZLongBranch due to them having a size of 0 without
being excepted in the assertion that each instruction, other than a set
of known 0-size instruction types, should have a non-0 size.

`FAKE_USE` instructions are no-op instructions that are emitted into
LLVM by the `-fextend-variable-liveness` clang flag to help preserve the
liveness of source variables in optimized code, and therefore they
should be understood as being valid size 0 instructions.</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC][CodeGen] Adopt MachineFunctionProperties convenience accessors (#141101)</title>
<updated>2025-05-23T15:30:29+00:00</updated>
<author>
<name>Rahul Joshi</name>
<email>rjoshi@nvidia.com</email>
</author>
<published>2025-05-23T15:30:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=52c2e45c11ee37d8efcf87cbfa5c9f23cbdd566b'/>
<id>52c2e45c11ee37d8efcf87cbfa5c9f23cbdd566b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[SystemZ] Add check for INIT_UNDEF in getInstSizeInBytes (#134661)</title>
<updated>2025-04-10T20:16:20+00:00</updated>
<author>
<name>tltao</name>
<email>tony.le.tao@gmail.com</email>
</author>
<published>2025-04-10T20:16:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=18189430abbbc13b055d029683413e992a3eac2d'/>
<id>18189430abbbc13b055d029683413e992a3eac2d</id>
<content type='text'>
Due to some optimization changes, INIT_UNDEF is making its way to
`getInstSizeInBytes` in `llvm/lib/Target/SystemZ/SystemZLongBranch.cpp`
but we do not have an exception there in the assert. Since INIT_UNDEF is
described as being similar to IMPLICIT_DEF and there is a check for
IMPLICIT_DEF, it seems logical to also add a check for INIT_UNDEF.

---------

Co-authored-by: Tony Tao &lt;tonytao@ca.ibm.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Due to some optimization changes, INIT_UNDEF is making its way to
`getInstSizeInBytes` in `llvm/lib/Target/SystemZ/SystemZLongBranch.cpp`
but we do not have an exception there in the assert. Since INIT_UNDEF is
described as being similar to IMPLICIT_DEF and there is a check for
IMPLICIT_DEF, it seems logical to also add a check for INIT_UNDEF.

---------

Co-authored-by: Tony Tao &lt;tonytao@ca.ibm.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC][LLVM][SystemZ] Cleanup pass initialization for SystemZ (#134450)</title>
<updated>2025-04-08T01:08:55+00:00</updated>
<author>
<name>Rahul Joshi</name>
<email>rjoshi@nvidia.com</email>
</author>
<published>2025-04-08T01:08:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=80fde75dc6c50a7d32f6dbfda9a6f2c24890b5cc'/>
<id>80fde75dc6c50a7d32f6dbfda9a6f2c24890b5cc</id>
<content type='text'>
- Remove calls to pass initialization from pass constructors.
- https://github.com/llvm/llvm-project/issues/111767</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Remove calls to pass initialization from pass constructors.
- https://github.com/llvm/llvm-project/issues/111767</pre>
</div>
</content>
</entry>
<entry>
<title>[SystemZ, DebugInfo] Instrument SystemZ backend passes for Instr-Ref DebugInfo (#133061)</title>
<updated>2025-03-31T17:30:06+00:00</updated>
<author>
<name>Dominik Steenken</name>
<email>dost@de.ibm.com</email>
</author>
<published>2025-03-31T17:30:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e9a3ea2218b754a96be4f44240c3f8ee9cbd26c9'/>
<id>e9a3ea2218b754a96be4f44240c3f8ee9cbd26c9</id>
<content type='text'>
This PR instruments the optimization passes in the SystemZ backend with
calls to `MachineFunction::substituteDebugValuesForInst` where
instruction substitutions are made to instructions that may compute
tracked values.

Tests are also added for each of the substitutions that were inserted.
Details on the individual passes follow.

### systemz-copy-physregs
When a copy targets an access register, we redirect the copy via an
auxiliary register. This leads to the final result being written by a
newly inserted SAR instruction, rather than the original MI, so we need
to update the debug value tracking to account for this.

### systemz-long-branch
This pass relaxes relative branch instructions based on the actual
locations of blocks. Only one of the branch instructions qualifies for
debug value tracking: BRCT, i.e. branch-relative-on-count, which
subtracts 1 from a register and branches if the result is not zero. This
is relaxed into an add-immediate and a conditional branch, so any
`debug-instr-number` present must move to the add-immediate instruction.

### systemz-post-rewrite
This pass replaces `LOCRMux` and `SELRMux` pseudoinstructions with
either the real versions of those instructions, or with branching
programs that implement the intent of the Pseudo. In all these cases,
any `debug-instr-number` attached to the pseudo needs to be reallocated
to the appropriate instruction in the result, either LOCR, SELR, or a
COPY.

### systemz-elim-compare
Similar to systemz-long-branch, for this pass, only few substitutions
are necessary, since it mainly deals with conditional branch
instructions. The only exceptiona are again branch-relative-on-count, as
it modifies a counter as part of the instruction, as well as any of the
load instructions that are affected.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR instruments the optimization passes in the SystemZ backend with
calls to `MachineFunction::substituteDebugValuesForInst` where
instruction substitutions are made to instructions that may compute
tracked values.

Tests are also added for each of the substitutions that were inserted.
Details on the individual passes follow.

### systemz-copy-physregs
When a copy targets an access register, we redirect the copy via an
auxiliary register. This leads to the final result being written by a
newly inserted SAR instruction, rather than the original MI, so we need
to update the debug value tracking to account for this.

### systemz-long-branch
This pass relaxes relative branch instructions based on the actual
locations of blocks. Only one of the branch instructions qualifies for
debug value tracking: BRCT, i.e. branch-relative-on-count, which
subtracts 1 from a register and branches if the result is not zero. This
is relaxed into an add-immediate and a conditional branch, so any
`debug-instr-number` present must move to the add-immediate instruction.

### systemz-post-rewrite
This pass replaces `LOCRMux` and `SELRMux` pseudoinstructions with
either the real versions of those instructions, or with branching
programs that implement the intent of the Pseudo. In all these cases,
any `debug-instr-number` attached to the pseudo needs to be reallocated
to the appropriate instruction in the result, either LOCR, SELR, or a
COPY.

### systemz-elim-compare
Similar to systemz-long-branch, for this pass, only few substitutions
are necessary, since it mainly deals with conditional branch
instructions. The only exceptiona are again branch-relative-on-count, as
it modifies a counter as part of the instruction, as well as any of the
load instructions that are affected.</pre>
</div>
</content>
</entry>
<entry>
<title>SystemZ: Add support for __builtin_setjmp and __builtin_longjmp. (#119257)</title>
<updated>2024-12-10T18:50:51+00:00</updated>
<author>
<name>anoopkg6</name>
<email>anoop.kumar6@ibm.com</email>
</author>
<published>2024-12-10T18:50:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=dc04d414df9c243bb90d7cfc683a632a2c032c62'/>
<id>dc04d414df9c243bb90d7cfc683a632a2c032c62</id>
<content type='text'>
This pr includes fixes for original pr##116642.
Implementation for __builtin_setjmp and __builtin_longjmp for SystemZ..</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This pr includes fixes for original pr##116642.
Implementation for __builtin_setjmp and __builtin_longjmp for SystemZ..</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[SystemZ] Add support for __builtin_setjmp and __builtin_longjmp (#116642)"</title>
<updated>2024-12-06T23:55:54+00:00</updated>
<author>
<name>Ulrich Weigand</name>
<email>ulrich.weigand@de.ibm.com</email>
</author>
<published>2024-12-06T23:55:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8787bc72a61aa43a6e937647b6797ddb2ff287d2'/>
<id>8787bc72a61aa43a6e937647b6797ddb2ff287d2</id>
<content type='text'>
This reverts commit 030bbc92a705758f1131fb29cab5be6d6a27dd1f.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 030bbc92a705758f1131fb29cab5be6d6a27dd1f.
</pre>
</div>
</content>
</entry>
<entry>
<title>[SystemZ] Add support for __builtin_setjmp and __builtin_longjmp (#116642)</title>
<updated>2024-12-06T22:33:33+00:00</updated>
<author>
<name>anoopkg6</name>
<email>anoop.kumar6@ibm.com</email>
</author>
<published>2024-12-06T22:33:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=030bbc92a705758f1131fb29cab5be6d6a27dd1f'/>
<id>030bbc92a705758f1131fb29cab5be6d6a27dd1f</id>
<content type='text'>
Implementation for __builtin_setjmp and __builtin_longjmp for SystemZ.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implementation for __builtin_setjmp and __builtin_longjmp for SystemZ.</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen] Introduce a generic MEMBARRIER instruction [mostly-nfc]</title>
<updated>2023-01-11T15:26:27+00:00</updated>
<author>
<name>Philip Reames</name>
<email>preames@rivosinc.com</email>
</author>
<published>2023-01-11T15:18:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=eb44226986fcbeb4325e5f668e5646e9646958bc'/>
<id>eb44226986fcbeb4325e5f668e5646e9646958bc</id>
<content type='text'>
This is a follow up to D141317 which extends the common code to include a target independent pseudo instruction. This is an alternative to (subset of) D92842 which tries to be as close to NFC as possible.

A couple things to call out.
* The test change in X86 is because we loose the scheduling information on the instruction. However, I think this was actually a bug in x86 since no instruction was emitted for a MEMBARRIER. Concluding that a meta instruction has latency just seems wrong?
* I intentionally left some parts of D92842 out. Specifically, several of the changes in the X86 code (data independence and outlining) appear functional, and likely worthy of their own review. Additionally, I'm not handling ARM/AArch64 at all. Those targets need the ordering whereas none of the others do. I want to get this in and tested before retrofitting in ordering to support those targets.

Differential Revision: https://reviews.llvm.org/D141408
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a follow up to D141317 which extends the common code to include a target independent pseudo instruction. This is an alternative to (subset of) D92842 which tries to be as close to NFC as possible.

A couple things to call out.
* The test change in X86 is because we loose the scheduling information on the instruction. However, I think this was actually a bug in x86 since no instruction was emitted for a MEMBARRIER. Concluding that a meta instruction has latency just seems wrong?
* I intentionally left some parts of D92842 out. Specifically, several of the changes in the X86 code (data independence and outlining) appear functional, and likely worthy of their own review. Additionally, I'm not handling ARM/AArch64 at all. Those targets need the ordering whereas none of the others do. I want to get this in and tested before retrofitting in ordering to support those targets.

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