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

Allow user to overload cfg_simplify! #546

Closed

Conversation

MilesCranmer
Copy link

@MilesCranmer MilesCranmer commented Feb 17, 2024

Allows users to overload the method Cthulhu.cfg_simplify!

(NOTE Cthulhu.cfg_simplify! != CC.cfg_simplify! so this isn't messing with internals of the compiler).

This is so that power users can just turn it off in their startup.jl and avoid this super annoying bug: #523 which seems like we are just waiting on Julia 1.11 for a fix.

Here's how to use it. In your startup.jl file:

using Cthulhu  # Regular import

# Rewrite buggy code:
import Cthulhu: cfg_simplify!
cfg_simplify!(ir) = ir

@aviatesk
Copy link
Member

I think the right fix here would be to disable cfg_simplify! on v1.10 at all, or replace it with the proper round-trip. See #548.

@MilesCranmer
Copy link
Author

SGTM, thanks!

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.

2 participants