removed caching logic; saves 400MB for an ORC booting compiler (#19989)
This commit is contained in:
parent
ad0aee5354
commit
7a29a782f8
1 changed files with 1 additions and 8 deletions
|
|
@ -80,12 +80,6 @@ import sets, hashes
|
||||||
|
|
||||||
proc hash(n: PNode): Hash = hash(cast[pointer](n))
|
proc hash(n: PNode): Hash = hash(cast[pointer](n))
|
||||||
|
|
||||||
proc aliasesCached(cache: var Table[(PNode, PNode), AliasKind], obj, field: PNode): AliasKind =
|
|
||||||
let key = (obj, field)
|
|
||||||
if not cache.hasKey(key):
|
|
||||||
cache[key] = aliases(obj, field)
|
|
||||||
cache[key]
|
|
||||||
|
|
||||||
type
|
type
|
||||||
State = ref object
|
State = ref object
|
||||||
lastReads: IntSet
|
lastReads: IntSet
|
||||||
|
|
@ -116,9 +110,8 @@ proc mergeStates(a: var State, b: sink State) =
|
||||||
a.alreadySeen.incl b.alreadySeen
|
a.alreadySeen.incl b.alreadySeen
|
||||||
|
|
||||||
proc computeLastReadsAndFirstWrites(cfg: ControlFlowGraph) =
|
proc computeLastReadsAndFirstWrites(cfg: ControlFlowGraph) =
|
||||||
var cache = initTable[(PNode, PNode), AliasKind]()
|
|
||||||
template aliasesCached(obj, field: PNode): AliasKind =
|
template aliasesCached(obj, field: PNode): AliasKind =
|
||||||
aliasesCached(cache, obj, field)
|
aliases(obj, field)
|
||||||
|
|
||||||
var cfg = cfg
|
var cfg = cfg
|
||||||
preprocessCfg(cfg)
|
preprocessCfg(cfg)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue