Page MenuHomePhabricator

X86: introduce a new `FrameBuilder` type
AcceptedPublic

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