Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

give ability to plugins to edit blocks before locking #2336

Merged
merged 1 commit into from
Nov 2, 2024

Conversation

eybisi
Copy link
Contributor

@eybisi eybisi commented Nov 2, 2024

Plugins can use .before('BlockFinisher') to edit blocks before they are locked.

Description

If any plugin wants to edit control flow graph after BlockProcessor, blocks are locked. This PR moves mth.finishBasicBlocks(); line to another visitor called BlockFinisher. So plugins can use .before('BlockFinisher') to edit blocks before they are locked.

BlockProcessor adds many informations to methodnode, loops, dominators etc.. These are very useful for tracing control flow and editing (for example removing control flow flattening)
Fixes : #2335

Plugins can use .before('BlockFinisher') to edit blocks before they are
locked.
@skylot skylot merged commit 4c74e8e into skylot:master Nov 2, 2024
4 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature] Allow plugins to edit BlockNodes
2 participants