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

Support nothrow attribute on function calls #1517

Closed
lattner opened this issue Jan 30, 2007 · 6 comments
Closed

Support nothrow attribute on function calls #1517

lattner opened this issue Jan 30, 2007 · 6 comments
Labels
bugzilla Issues migrated from bugzilla enhancement Improving things as opposed to bug fixing, e.g. new or missing feature llvm:asmparser

Comments

@lattner
Copy link
Collaborator

lattner commented Jan 30, 2007

Bugzilla Link 1145
Resolution FIXED
Resolved on Feb 22, 2010 12:41
Version 1.0
OS All

Extended Description

With exception table support under development, it will soon be useful to know if a function can throw or
not. The front-end has this info for some functions (those marked throw()) and the prune-eh pass
computes this info, but there is no way to record this info in the IR for the code generator to use.

It should be straight-forward to add an attribute to functions to indicate that they cannot throw. If the
front-end sets this, it will make the prune-eh pass more effective (deleting more landing pads) and the
code generator can then start using it.

-Chris

@llvmbot
Copy link
Collaborator

llvmbot commented Jan 30, 2007

this is akin to the existing "noreturn" attribute, not a big deal.

@lattner
Copy link
Collaborator Author

lattner commented Jan 30, 2007

yep

@llvmbot
Copy link
Collaborator

llvmbot commented Mar 22, 2007

This patch:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070319/046076.html

adds a "NoUnwindAttribute" to the FunctionType class's list of attributes. No
use of it is yet made.

@lattner
Copy link
Collaborator Author

lattner commented Mar 22, 2007

doesn't this need asm/bc support?

@llvmbot
Copy link
Collaborator

llvmbot commented Mar 22, 2007

Did I close the PR? :)

Nothing needs to be done for bytecode, its just stored as an integer bit mask.
This is just using another bit. AsmParser and AsmWriter do need to be updated to
support the flag. After that, its up to someone else to actually use it.

@llvmbot
Copy link
Collaborator

llvmbot commented Mar 22, 2007

These patches add assembly support for nounwind and noreturn attributes:

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070319/046082.html
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070319/046084.html
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070319/046086.html
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070319/046088.html

Test case is here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070319/046087.html

Both nothrow and noreturn are now fully supported in VMCore, Bytecode, and
Assembly. I'm closing this bug as done since all that it asks has been
completed. Changes to the prune-eh pass should be done under a separate PR.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
@Endilll Endilll added enhancement Improving things as opposed to bug fixing, e.g. new or missing feature and removed new-feature labels Aug 15, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla enhancement Improving things as opposed to bug fixing, e.g. new or missing feature llvm:asmparser
Projects
None yet
Development

No branches or pull requests

3 participants