Skip to content

Commit

Permalink
Merge pull request #37884 from JuliaLang/vc/dynamic_snca
Browse files Browse the repository at this point in the history
Implement dynamic SNCA domtree algorithm
  • Loading branch information
vchuravy authored Oct 15, 2020
2 parents a8d0968 + f7852e3 commit 86bbe09
Show file tree
Hide file tree
Showing 8 changed files with 683 additions and 281 deletions.
32 changes: 32 additions & 0 deletions base/compiler/ssair/basicblock.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

"""
Like UnitRange{Int}, but can handle the `last` field, being temporarily
< first (this can happen during compacting)
"""
struct StmtRange <: AbstractUnitRange{Int}
start::Int
stop::Int
end

first(r::StmtRange) = r.start
last(r::StmtRange) = r.stop
iterate(r::StmtRange, state=0) = (last(r) - first(r) < state) ? nothing : (first(r) + state, state + 1)

StmtRange(range::UnitRange{Int}) = StmtRange(first(range), last(range))

struct BasicBlock
stmts::StmtRange
preds::Vector{Int}
succs::Vector{Int}
end

function BasicBlock(stmts::StmtRange)
return BasicBlock(stmts, Int[], Int[])
end

function BasicBlock(old_bb, stmts)
return BasicBlock(stmts, old_bb.preds, old_bb.succs)
end

copy(bb::BasicBlock) = BasicBlock(bb.stmts, copy(bb.preds), copy(bb.succs))
Loading

4 comments on commit 86bbe09

@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.

Executing the daily package evaluation, I will reply here when finished:

@nanosoldier runtests(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 - successfully executed benchmarks. A full report can be found here. cc @christopher-dG

@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 package evaluation job has completed - possible new issues were detected. A full report can be found here. cc @maleadt

Please sign in to comment.