Skip to content

s390x: Refactor branch and jumptable emission#3717

Merged
cfallin merged 1 commit into
bytecodealliance:mainfrom
uweigand:s390x-branchtarget
Jan 25, 2022
Merged

s390x: Refactor branch and jumptable emission#3717
cfallin merged 1 commit into
bytecodealliance:mainfrom
uweigand:s390x-branchtarget

Conversation

@uweigand
Copy link
Copy Markdown
Member

The BranchTarget abstraction is no longer needed, since all branches are
being emitted using a MachLabel target. Remove BranchTarget and simply
use MachLabel everywhere a branch target is required. (This brings the
s390x back-end in line with what x64 does as well.)

In addition, simplify jumptable emission by moving all instructions
that do not depend on the internal label (i.e. the conditional branch
to the default label, as well as the scaling the index register) out of
the combined JTSequence instruction.

This refactoring will make moving branch generation to ISLE easier.

CC @cfallin

The BranchTarget abstraction is no longer needed, since all branches are
being emitted using a MachLabel target.  Remove BranchTarget and simply
use MachLabel everywhere a branch target is required.  (This brings the
s390x back-end in line with what x64 does as well.)

In addition, simplify jumptable emission by moving all instructions
that do not depend on the internal label (i.e. the conditional branch
to the default label, as well as the scaling the index register) out of
the combined JTSequence instruction.

This refactoring will make moving branch generation to ISLE easier.
@github-actions github-actions Bot added the cranelift Issues related to the Cranelift code generator label Jan 24, 2022
Copy link
Copy Markdown
Member

@cfallin cfallin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@cfallin cfallin merged commit ce63a11 into bytecodealliance:main Jan 25, 2022
@uweigand uweigand deleted the s390x-branchtarget branch January 25, 2022 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cranelift Issues related to the Cranelift code generator

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants