Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AArch64][SME] Disable tail-call optimization for __arm_locally_streaming functions. #65258

Merged

Conversation

sdesmalen-arm
Copy link
Collaborator

@sdesmalen-arm sdesmalen-arm commented Sep 4, 2023

When calling a function which requires no streaming-mode change from an __arm_locally_streaming function, LLVM would otherwise emit:

// function prologue
smstart
b streaming_compatible_function // tail call
// never an smstop

…ming functions.

When calling e.g. a streaming-compatible function (which requires no streaming-mode change),
LLVM would otherwise emit:

  // function prologue
  smstart
  b streaming_compatible_function   // tail call
  // never an smstop
Copy link
Contributor

@MDevereau MDevereau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When calling e.g. a streaming-compatible function (which requires no streaming-mode change)

nit, commit message using e.g. implies there are other cases you know of but there's only one test case here

@sdesmalen-arm
Copy link
Collaborator Author

When calling e.g. a streaming-compatible function (which requires no streaming-mode change)

nit, commit message using e.g. implies there are other cases you know of but there's only one test case here

The other case would be where the callee would be an __arm_streaming function, which would have caused CallerAttrs.requiresSMChange(CalleeAttrs) to return false. I didn't think it was useful to add a test-case for this, because a call for __arm_locally_streaming -> __arm_streaming_compatible results in the same answer for CallerAttrs.requiresSMChange(CalleeAttrs), and this interface is already tested extensively in another test.

@sdesmalen-arm sdesmalen-arm merged commit dbf9b93 into llvm:main Sep 4, 2023
1 check passed
@sdesmalen-arm sdesmalen-arm deleted the fix-streaming-body-tail-call branch September 4, 2023 14:11
avillega pushed a commit to avillega/llvm-project that referenced this pull request Sep 11, 2023
…ming functions. (llvm#65258)

When calling a function which requires no streaming-mode change from an
__arm_locally_streaming function, LLVM would otherwise emit:

  // function prologue
  smstart
  b streaming_compatible_function   // tail call
  // never an smstop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants