Skip to content

give ability to plugins to edit blocks before locking#2336

Merged
skylot merged 1 commit intoskylot:masterfrom
eybisi:plugin-edit-block
Nov 2, 2024
Merged

give ability to plugins to edit blocks before locking#2336
skylot merged 1 commit intoskylot:masterfrom
eybisi:plugin-edit-block

Conversation

@eybisi
Copy link
Copy Markdown
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
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.

[feature] Allow plugins to edit BlockNodes

2 participants