Skip to content

[AArch64] Use helper class for emitting CFI instructions into MIR (NFCI) #136004

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions llvm/include/llvm/CodeGen/CFIInstBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ class CFIInstBuilder {
nullptr, TRI.getDwarfRegNum(Reg, IsEH)));
}

void buildDefCFAOffset(int64_t Offset) const {
insertCFIInst(MCCFIInstruction::cfiDefCfaOffset(nullptr, Offset));
void buildDefCFAOffset(int64_t Offset, MCSymbol *Label = nullptr) const {
insertCFIInst(MCCFIInstruction::cfiDefCfaOffset(Label, Offset));
}

void buildAdjustCFAOffset(int64_t Adjustment) const {
Expand All @@ -80,6 +80,14 @@ class CFIInstBuilder {
nullptr, TRI.getDwarfRegNum(Reg, IsEH), Offset));
}

void buildNegateRAState() const {
insertCFIInst(MCCFIInstruction::createNegateRAState(nullptr));
}

void buildNegateRAStateWithPC() const {
insertCFIInst(MCCFIInstruction::createNegateRAStateWithPC(nullptr));
}

void buildRegister(MCRegister Reg1, MCRegister Reg2) const {
insertCFIInst(MCCFIInstruction::createRegister(
nullptr, TRI.getDwarfRegNum(Reg1, IsEH),
Expand Down
Loading
Loading