Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/compiler/codegen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
include("codegen/utils.jl")
include("codegen/irutils.jl") # SSAMap/Block mutation helpers
include("codegen/passes/token_keys.jl") # TokenKey, TokenRole, ACQUIRE_TOKEN_KEY
include("codegen/passes/rewrite.jl") # @rewrite, rewrite_patterns! framework
include("codegen/passes/rewrite_patterns.jl") # scalar_view_elim_pass!, fma_fusion_pass!
include("codegen/passes/alias_analysis.jl") # alias_analysis_pass!
include("codegen/passes/token_order.jl") # token_order_pass!
include("codegen/kernel.jl")
Expand Down
6 changes: 6 additions & 0 deletions src/compiler/codegen/kernel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ function emit_kernel!(writer::BytecodeWriter, func_buf::Vector{UInt8},
# ReturnNode terminators to YieldOp, which the token pass then extends.
hoist_returns!(ctx.sci.entry)

# Eliminate redundant to_scalar/from_scalar chains from broadcast wrapping.
scalar_view_elim_pass!(sci)

# Fuse mul+add/sub into fma to reduce register pressure.
fma_fusion_pass!(sci)

# Run alias analysis and token ordering pass on the structured IR.
alias_result = alias_analysis_pass!(sci)
token_order_pass!(sci, alias_result)
Expand Down
Loading
Loading