This is an archive of the discontinued LLVM Phabricator instance.

[X86] Add support for stack probing on x86_64 Darwin
AbandonedPublic

Authored by aemerson on Dec 5 2017, 2:52 PM.

Details

Reviewers
hans
Summary

[X86] Add support for stack probing on x86_64 Darwin.

This change re-uses the existing infrastructure for generating calls to a stack probing function. The stack probing is done for static and dynamic stack objects. As a result of the code re-use, I've renamed the WIN_ALLOCA node to DYN_ALLOCA and the related optimisation pass.

A new TargetOption is added to enable stack probing for non-Windows targets, for which currently only Darwin is supported.

Diff Detail

Repository
rL LLVM

Event Timeline

aemerson created this revision.Dec 5 2017, 2:52 PM
aemerson updated this revision to Diff 125623.Dec 5 2017, 2:55 PM

Remove whitespace.

I'm a little confused here, is the intent that this will be the default on the platform? If not, can you explain the functional difference between this and just using the "probe-stack" attribute with ___chkstk_darwin?

I'm a little confused here, is the intent that this will be the default on the platform? If not, can you explain the functional difference between this and just using the "probe-stack" attribute with ___chkstk_darwin?

Yes, that's the intention. There are also ABI differences between Darwin and Windows meaning that we need to potentially save RAX entry. This patch is trying to generalise the existing support hence why I've renamed things to make it less Windows-specific (although of course it's still not universally supported, just extended to Darwin).

aemerson abandoned this revision.May 16 2018, 3:49 AM