Skip to content

Commit

Permalink
Merge pull request #27126 from JuliaLang/kf/sroarebase
Browse files Browse the repository at this point in the history
Introduce improved SROA pass
  • Loading branch information
Keno authored May 17, 2018
2 parents 254ab94 + 9100329 commit d44944d
Show file tree
Hide file tree
Showing 8 changed files with 909 additions and 208 deletions.
10 changes: 8 additions & 2 deletions base/compiler/ssair/driver.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ include("compiler/ssair/passes.jl")
include("compiler/ssair/inlining2.jl")
include("compiler/ssair/verify.jl")
include("compiler/ssair/legacy.jl")
@isdefined(Base) && include("compiler/ssair/show.jl")
#@isdefined(Base) && include("compiler/ssair/show.jl")

function normalize_expr(stmt::Expr)
if stmt.head === :gotoifnot
Expand Down Expand Up @@ -159,14 +159,20 @@ end

function run_passes(ci::CodeInfo, nargs::Int, linetable::Vector{LineInfoNode}, sv::OptimizationState)
ir = just_construct_ssa(ci, copy(ci.code), nargs, linetable)
#@Base.show ("after_construct", ir)
# TODO: Domsorting can produce an updated domtree - no need to recompute here
@timeit "compact 1" ir = compact!(ir)
#@timeit "verify 1" verify_ir(ir)
@timeit "Inlining" ir = ssa_inlining_pass!(ir, linetable, sv)
#@timeit "verify 2" verify_ir(ir)
@timeit "domtree 2" domtree = construct_domtree(ir.cfg)
ir = compact!(ir)
#@Base.show ("before_sroa", ir)
@timeit "SROA" ir = getfield_elim_pass!(ir, domtree)
@timeit "compact 2" ir = compact!(ir)
#@Base.show ir.new_nodes
#@Base.show ("after_sroa", ir)
ir = adce_pass!(ir)
#@Base.show ("after_adce", ir)
@timeit "type lift" ir = type_lift_pass!(ir)
@timeit "compact 3" ir = compact!(ir)
#@Base.show ir
Expand Down
Loading

2 comments on commit d44944d

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily benchmark build, I will reply here when finished:

@nanosoldier runbenchmarks(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @ararslan

Please sign in to comment.