Skip to content

Commit a2e73ca

Browse files
committed
Update comment
Change-Id: I5dca6eaca8613a33e89a5cec9cc7d2c0f9cc7fb5
1 parent 5539ca7 commit a2e73ca

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

llvm/lib/Target/AArch64/MachineSMEABIPass.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -485,10 +485,12 @@ void MachineSMEABI::emitAllocateLazySaveBuffer(
485485

486486
// 1. Allocate the lazy save buffer.
487487
if (Buffer == AArch64::NoRegister) {
488-
// TODO This function grows the stack with a subtraction, which doesn't work
489-
// on Windows. Some refactoring to share the functionality in
490-
// LowerWindowsDYNAMIC_STACKALLOC will be required once the Windows ABI
491-
// supports SME
488+
// TODO: On Windows, we allocate the lazy save buffer in SelectionDAG (so
489+
// Buffer != AArch64::NoRegister). This is done to reuse the existing
490+
// expansions (which can insert stack checks). This works, but it means we
491+
// will always allocate the lazy save buffer (even if the function contains
492+
// no lazy saves). If we want to handle Windows here, we'll need to
493+
// implement something similar to LowerWindowsDYNAMIC_STACKALLOC.
492494
assert(!Subtarget.isTargetWindows() &&
493495
"Lazy ZA save is not yet supported on Windows");
494496
Buffer = MRI.createVirtualRegister(&AArch64::GPR64RegClass);

0 commit comments

Comments
 (0)