Skip to content

Commit

Permalink
wazevo(ssa): refactors pass execution (tetratelabs#2089)
Browse files Browse the repository at this point in the history
Signed-off-by: Takeshi Yoneda <[email protected]>
  • Loading branch information
mathetake authored and evacchi committed Feb 28, 2024
1 parent a7b0013 commit 822866f
Show file tree
Hide file tree
Showing 10 changed files with 506 additions and 486 deletions.
6 changes: 0 additions & 6 deletions internal/engine/wazevo/backend/backend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2449,12 +2449,6 @@ L2 (SSA Block: blk2):
fmt.Println(ssab.Format())
}

ssab.LayoutBlocks()
if verbose {
fmt.Println("============ SSA after block layout ============")
fmt.Println(ssab.Format())
}

// Lowers the SSA to ISA specific code.
be.Lower()
if verbose {
Expand Down
11 changes: 0 additions & 11 deletions internal/engine/wazevo/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,17 +351,6 @@ func (e *engine) compileLocalWasmFunction(
wazevoapi.VerifyOrSetDeterministicCompilationContextValue(ctx, "Optimized SSA", ssaBuilder.Format())
}

// Finalize the layout of SSA blocks which might use the optimization results.
ssaBuilder.LayoutBlocks()

if wazevoapi.PrintBlockLaidOutSSA && wazevoapi.PrintEnabledIndex(ctx) {
fmt.Printf("[[[Laidout SSA for %s]]]%s\n", wazevoapi.GetCurrentFunctionName(ctx), ssaBuilder.Format())
}

if wazevoapi.DeterministicCompilationVerifierEnabled {
wazevoapi.VerifyOrSetDeterministicCompilationContextValue(ctx, "Block laid out SSA", ssaBuilder.Format())
}

// Now our ssaBuilder contains the necessary information to further lower them to
// machine code.
original, rels, err := be.Compile(ctx)
Expand Down
Loading

0 comments on commit 822866f

Please sign in to comment.