Skip to content

Add support for no_split_stack attribute to LLVM. Use it on main #1226

Closed

Description

@brson

Currently our __morestack method has to do an ugly check to detect whether it is being called from main. gcc supports a no_split_stack attribute that can be used to suppress the split-stack prologue. We should add it to LLVM and use it.

Activity

  1. brson commented on Nov 28, 2011

    @brson
    ContributorAuthor

    C shim functions run on the C stack so they need to not have the prologue either

  2. brson commented on Mar 6, 2012

    @brson
    ContributorAuthor

    Ditto for crust functions.

  3. brson commented on Mar 6, 2012

    @brson
    ContributorAuthor

    There was some noise on llvm-dev about this recently but I didn't notice if anything became of it.

  4. ghost assigned on Apr 12, 2012
  5. bblum commented on Jun 11, 2012

    @bblum
    Contributor

    After the changed C stack switching design, it will be essential that C shims have the prologue. Same for crust functions.

    My changes to i386 __morestack make the "ugly check" less ugly, but the check could still stand to go away entirely.

  6. bblum commented on Jun 21, 2012

    @bblum
    Contributor

    C stack switching was dropped; nothing was done about the ugly check.

  7. brson commented on Jan 14, 2013

    @brson
    ContributorAuthor

    @amuxtux I'm not clear on the obstacles to implementing __morestack on ARM but I opened an issue about it: #4489. If you intend to disable stack growth on ARM then the easiest way is probably to completely turn off the split stack prologue on ARM (the code for which is here).

  8. emberian commented on Jul 12, 2013

    @emberian
    Contributor

    Triage bump; still relevant, esp with recent split-stack discussions.

  9. brson commented on Jul 28, 2013

    @brson
    ContributorAuthor

    This is required for the new scheduler in order to implement split stacks.

  10. added a commit that references this issue on Aug 20, 2013
  11. alexcrichton commented on Aug 20, 2013

    @alexcrichton
    Member

    This attribute has now been implemented in LLVM, and it's available for use via the no_split_stack attribute. Currently there are no users of it, however.

  12. catamorphism commented on Sep 26, 2013

    @catamorphism
    Contributor

    Done, closing

  13. added a commit that references this issue on May 15, 2022
    74b9232
  14. added 2 commits that reference this issue on Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.I-slowIssue: Problems and improvements with respect to performance of generated code.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions