This is an archive of the discontinued LLVM Phabricator instance.

X86: introduce a new `FrameBuilder` type
AbandonedPublic

Authored by compnerd on Jun 18 2021, 11:06 AM.

Details

Reviewers
rnk
Summary

This introduces a new FrameBuilder type to try to reduce the
complexity in the PEI handling in the frame lowering. This is
currently a small added complexity for incrementally migrating
the implementation to this type which can be shared across the
prologue and epilogue emission as they both recompute a shared
set of information. It should allow for the prologue emission
to become a dispatch over the format - funclet, windows 32/64,
or Unix.

Diff Detail

Event Timeline

compnerd created this revision.Jun 18 2021, 11:06 AM
compnerd requested review of this revision.Jun 18 2021, 11:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 18 2021, 11:06 AM
rnk accepted this revision.Jun 22 2021, 3:44 PM

Looks good to me!

llvm/lib/Target/X86/X86FrameLowering.cpp
1786

As future work, you could probably add FrameBuilder::BuildMI methods that return a MachineInstrBuilder and fill in the standard insertion point and debug location, and which perhaps include the TII.get() opcode lookup.

This revision is now accepted and ready to land.Jun 22 2021, 3:44 PM
compnerd abandoned this revision.Aug 4 2023, 7:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 4 2023, 7:41 AM