diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2022-07-09 06:46:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-09 06:46:05 +0200 |
commit | 7a29a782f84ebceec0fb5c3d39bb484621831fca (patch) | |
tree | 17d774bcaa23719421a21a836485bcae9c852369 /compiler | |
parent | ad0aee535435ac9b22c2ee9ef02085ffdc901d48 (diff) | |
download | Nim-7a29a782f84ebceec0fb5c3d39bb484621831fca.tar.gz |
removed caching logic; saves 400MB for an ORC booting compiler (#19989)
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/injectdestructors.nim | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/compiler/injectdestructors.nim b/compiler/injectdestructors.nim index 6500c5bc7..867d30d96 100644 --- a/compiler/injectdestructors.nim +++ b/compiler/injectdestructors.nim @@ -80,12 +80,6 @@ import sets, hashes 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 State = ref object lastReads: IntSet @@ -116,9 +110,8 @@ proc mergeStates(a: var State, b: sink State) = a.alreadySeen.incl b.alreadySeen proc computeLastReadsAndFirstWrites(cfg: ControlFlowGraph) = - var cache = initTable[(PNode, PNode), AliasKind]() template aliasesCached(obj, field: PNode): AliasKind = - aliasesCached(cache, obj, field) + aliases(obj, field) var cfg = cfg preprocessCfg(cfg) |