-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Goal
Combine sequential basic blocks that have no other predecessors/successors.
Why High-Impact
- 25-35% of code has mergeable blocks
- Reduces CFG complexity (faster execution in interpreters)
- Cleanup after DCE and branch removal
- Improves cache locality
Tasks
- Implement CFG construction
- Identify blocks with single predecessor/successor
- Merge block contents
- Update branch targets
- Add tests for block merging scenarios
Dependencies
- Requires Control Flow Representation in ISLE #12 (Control Flow Representation)
- Recommended: Dead Code Elimination (DCE) #13 (DCE), Branch Simplification (RemoveUnusedBrs) #16 (RemoveUnusedBrs) for maximum benefit
Implementation Complexity
Medium
Priority
HIGH
Estimated Time
1-2 weeks (after control flow support)
References
- wasm-opt: merge-blocks pass
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request