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

Fix removal of trivial exception-handling blocks from spawned tasks #273

Merged
merged 2 commits into from
Sep 9, 2024

Conversation

neboat
Copy link
Collaborator

@neboat neboat commented Sep 5, 2024

This PR fixes the removal of trivial exception-handling blocks from spawned tasks.

Previously, SimplifyCFG would remove these blocks incrementally, mainly using standard logic for serial code. But as of commit 333cdd4 in llvm/llvm-project, this process ends up transforming invokes in spawned tasks to calls marked with the does-not-throw attribute. That attribute prevents subsequent Tapir lowering from reintroducing landingpads for those calls, specifically to cleanup parallel-runtime data structures.

To resolve this issue, this PR revises the logic to remove trivial exception-handling blocks in tasks as a unit. This change allows these blocks to be removed without any associated invoke being marked does-not-throw. Most existing regression tests for the removal of exception-handling blocks from tasks are therefore still correct.

This PR should resolve the runtime crash mentioned in issue #266.

@neboat neboat merged commit 5cf6d42 into OpenCilk:dev/18.x Sep 9, 2024
9 checks passed
@neboat neboat deleted the dev/18.x-detach-trivial-unwind branch November 23, 2024 00:18
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.

1 participant