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

[BOLT][NFC] Return Error from BinaryFunctionPass::runOnFunctions #81521

Conversation

aaupov
Copy link
Contributor

@aaupov aaupov commented Feb 12, 2024

As part of the effort to refactor old error handling code that
would directly call exit(1), in this patch we change the
interface to BinaryFunctionPass to return an Error on
runOnFunctions(). This gives passes the ability to report a
serious problem to the caller (RewriteInstance class), so the
caller may decide how to best handle the exceptional situation.

Co-authored-by: Rafael Auler rafaelauler@fb.com

Test Plan: NFC

Created using spr 1.3.4
Copy link
Contributor

@rafaelauler rafaelauler left a comment

Choose a reason for hiding this comment

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

Thanks, Amir. As commit message I think we can put something like:

As part of the effort to refactor old error handling code that
would directly call exit(1), in this patch we change the
interface to BinaryFunctionPass to return an Error on
runOnFunctions(). This gives passes the ability to report a
serious problem to the caller (RewriteInstance class), so the
caller may decide how to best handle the exceptional situation.

@aaupov aaupov merged commit a5f3d1a into main Feb 12, 2024
5 checks passed
@aaupov aaupov deleted the users/aaupov/spr/boltnfc-return-error-from-binaryfunctionpassrunonfunctions-2 branch February 12, 2024 22:36
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