This is an archive of the discontinued LLVM Phabricator instance.

[ARM,AArch64] Check the no-stack-arg-probe attribute for dynamic stack probes
ClosedPublic

Authored by mstorsjo on Mar 9 2018, 1:14 AM.

Details

Summary

This extends the use of this attribute on ARM and AArch64 from SVN r325900 where it was only checked for fixed stack allocations on ARM/AArch64, but for both fixed and dynamic stack allocations on X86).

This also adds a testcase for the existing use of disabling the fixed stack probe with the attribute on ARM and AArch64.

The manual SelectionDAG code for subtracting from the SP register feels very clunky; is there any way to make this fall back to the default behaviour of Expand in this particular case, instead of handcoding it?

Diff Detail

Repository
rL LLVM

Event Timeline

mstorsjo created this revision.Mar 9 2018, 1:14 AM
mstorsjo updated this revision to Diff 137925.Mar 10 2018, 1:31 PM

Removed a leftover out of place comment in one of the tests.

hans added a comment.Mar 12 2018, 2:50 AM

Sorry for not being responsive here. I think someone more familiar with the ARM target needs to take a look.

aemerson added inline comments.Mar 15 2018, 6:15 AM
lib/Target/AArch64/AArch64ISelLowering.cpp
7530 ↗(On Diff #137925)

This is unfortunate, ideally we could fall back to Expand here.

7537 ↗(On Diff #137925)

What about the alignment?

lib/Target/ARM/ARMISelLowering.cpp
13959 ↗(On Diff #137925)

Alignment again?

mstorsjo added inline comments.Mar 15 2018, 12:49 PM
lib/Target/AArch64/AArch64ISelLowering.cpp
7530 ↗(On Diff #137925)

Yes, I'd like to do that - do you have any suggestions on how to?

7537 ↗(On Diff #137925)

Right, will fix.

aemerson added inline comments.Mar 16 2018, 7:18 AM
lib/Target/AArch64/AArch64ISelLowering.cpp
7530 ↗(On Diff #137925)

I don't, unless we could make this a codegen option.

mstorsjo updated this revision to Diff 138770.Mar 16 2018, 2:29 PM

Take alignment into account

aemerson accepted this revision.Mar 19 2018, 11:08 AM
This revision is now accepted and ready to land.Mar 19 2018, 11:08 AM
This revision was automatically updated to reflect the committed changes.