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 default-hook synthesis on Cilksan's instrumentation pass #296

Merged

Conversation

neboat
Copy link
Collaborator

@neboat neboat commented Dec 2, 2024

This PR fixes some issues with Cilksan's instrumentation pass.

  • When synthesizing default instrumentation hooks, make sure the synthesized hook has a ret instruction that returns an appropriate value if the synthesized hook does not return void.
  • If a hook has been synthesized previously, go ahead and return that hook. This way, synthesized hooks don't end up with lots of unnecessary dead basic blocks.
  • Search for debug information to attach to __csan_task and __csan_detach_continue hooks, in case such debug information isn't available exactly at the hook-insertion point.

These changes fix various compiler crashes with Cilksan, including those in #291.

@neboat neboat merged commit c06a130 into OpenCilk:dev/18.x Dec 4, 2024
7 checks passed
@neboat neboat deleted the dev/18.x-cilksan-hyper-lookup-hooks branch December 4, 2024 00:30
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