Question about PTXFrameLowering

Hi all,

I’m learning the PTX backend and confused by the following problem. In the constructor of PTXFrameLowering, StackAlignment and LocalAreaOffset are assigned 2 and -2, respectively. Since PTX has neither stack frame nor stack pointer, why StackAlignment and LocalAreaOffset are needed and where does 2 and -2 come from? Any explanation is appreciated. Thank you in advance!

Yours Sincerely,
Lei Mou

Hi all,

I’m learning the PTX backend and confused by the following problem. In the constructor of PTXFrameLowering, StackAlignment and LocalAreaOffset are assigned 2 and -2, respectively. Since PTX has neither stack frame nor stack pointer, why StackAlignment and LocalAreaOffset are needed and where does 2 and -2 come from? Any explanation is appreciated. Thank you in advance!

There’s really no good reason for that. Stack frames may be set up to store .local variables, but that functionality is not 100% right now and needs work. The best I could say is, “don’t worry about it.” :slight_smile:

Hi Justin,

Thank you for your reply. Then I’ll just ignore this issue. :slight_smile:

Regards,
Lei Mou