aboutsummaryrefslogtreecommitdiffstats
path: root/backends/smt2
diff options
context:
space:
mode:
authorJannis Harder <me@jix.one>2022-03-28 16:59:26 +0200
committerGitHub <noreply@github.com>2022-03-28 16:59:26 +0200
commit8cc8c5efde627e904eb58049d38218e70be3f046 (patch)
treed8a8e3abbefef4b3f2b72842c2c88853fa5b9098 /backends/smt2
parent17e2a3048c8ec2610d5fbd52ad5ce52964644e66 (diff)
parentd25daa6203fd7e19b9e829ebcad8f92780ddca1d (diff)
downloadyosys-8cc8c5efde627e904eb58049d38218e70be3f046.tar.gz
yosys-8cc8c5efde627e904eb58049d38218e70be3f046.tar.bz2
yosys-8cc8c5efde627e904eb58049d38218e70be3f046.zip
Merge pull request #3253 from jix/smtbmc-nodeepcopy
smtbmc: Avoid unnecessary deep copies during unrolling
Diffstat (limited to 'backends/smt2')
-rw-r--r--backends/smt2/smtio.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/backends/smt2/smtio.py b/backends/smt2/smtio.py
index 3d458e6cf..14feec30d 100644
--- a/backends/smt2/smtio.py
+++ b/backends/smt2/smtio.py
@@ -20,7 +20,7 @@ import sys, re, os, signal
import subprocess
if os.name == "posix":
import resource
-from copy import deepcopy
+from copy import copy
from select import select
from time import time
from queue import Queue, Empty
@@ -301,7 +301,7 @@ class SmtIo:
key = tuple(stmt)
if key not in self.unroll_cache:
- decl = deepcopy(self.unroll_decls[key[0]])
+ decl = copy(self.unroll_decls[key[0]])
self.unroll_cache[key] = "|UNROLL#%d|" % self.unroll_idcnt
decl[1] = self.unroll_cache[key]
@@ -442,10 +442,10 @@ class SmtIo:
if stmt == "(push 1)":
self.unroll_stack.append((
- deepcopy(self.unroll_sorts),
- deepcopy(self.unroll_objs),
- deepcopy(self.unroll_decls),
- deepcopy(self.unroll_cache),
+ copy(self.unroll_sorts),
+ copy(self.unroll_objs),
+ copy(self.unroll_decls),
+ copy(self.unroll_cache),
))
if stmt == "(pop 1)":