This is an archive of the discontinued LLVM Phabricator instance.

[X86] Use BuildStackAdjustment in stack probes
ClosedPublic

Authored by cuviper on Sep 22 2022, 3:42 PM.

Details

Summary

This has the advantage of dealing with live EFLAGS, using LEA instead of
SUB if needed to avoid clobbering. That also respects feature "lea-sp".

We could allow unrolled stack probing from blocks with live-EFLAGS, if
canUseAsEpilogue learns when emitStackProbeInlineGeneric will be used.

Depends on D134494

Diff Detail

Event Timeline

cuviper created this revision.Sep 22 2022, 3:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 22 2022, 3:42 PM
cuviper requested review of this revision.Sep 22 2022, 3:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 22 2022, 3:42 PM

I wasn't aware of BuildStackAdjustment. It makes the code much cleaner, thanks a lot @cuviper for cleaning up the code like this.

This revision is now accepted and ready to land.Sep 23 2022, 12:17 AM
This revision was automatically updated to reflect the committed changes.