Skip to content

Commit ee913f3

Browse files
authored
Add DCE and parallel store optimization for token ordering. (#149)
1 parent b94d60d commit ee913f3

6 files changed

Lines changed: 887 additions & 12 deletions

File tree

src/compiler/codegen.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ include("codegen/utils.jl")
44
include("codegen/passes/token_keys.jl") # TokenKey, TokenRole, ACQUIRE_TOKEN_KEY
55
include("codegen/passes/alias_analysis.jl") # alias_analysis_pass!
66
include("codegen/passes/token_order.jl") # token_order_pass!
7+
include("codegen/passes/dce.jl") # dce_pass!
78
include("codegen/kernel.jl")
89
include("codegen/control_flow.jl")
910
include("codegen/statements.jl")

src/compiler/codegen/kernel.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ function emit_kernel!(writer::BytecodeWriter, func_buf::Vector{UInt8},
148148
# Run alias analysis and token ordering pass on the structured IR.
149149
alias_result = alias_analysis_pass!(sci)
150150
token_order_pass!(sci, alias_result)
151+
dce_pass!(sci)
151152

152153
# Cache the token bytecode type for codegen
153154
ctx.token_type = Token(tt)

0 commit comments

Comments
 (0)