projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
62b89bb
)
smtbmc: Avoid unnecessary deep copies during unrolling
author
Jannis Harder
<me@jix.one>
Mon, 28 Mar 2022 10:37:11 +0000
(12:37 +0200)
committer
Jannis Harder
<me@jix.one>
Mon, 28 Mar 2022 11:03:48 +0000
(13:03 +0200)
backends/smt2/smtio.py
patch
|
blob
|
history
diff --git
a/backends/smt2/smtio.py
b/backends/smt2/smtio.py
index 3d458e6cffc9a0cbd2ce0987d1340160558d76b5..14feec30d156e3e62dad45c39d0f0559df6fbad3 100644
(file)
--- 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
import subprocess
if os.name == "posix":
import resource
-from copy import
deep
copy
+from copy import copy
from select import select
from time import time
from queue import Queue, Empty
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:
key = tuple(stmt)
if key not in self.unroll_cache:
- decl =
deep
copy(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]
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((
if stmt == "(push 1)":
self.unroll_stack.append((
-
deep
copy(self.unroll_sorts),
-
deep
copy(self.unroll_objs),
-
deep
copy(self.unroll_decls),
-
deep
copy(self.unroll_cache),
+ copy(self.unroll_sorts),
+ copy(self.unroll_objs),
+ copy(self.unroll_decls),
+ copy(self.unroll_cache),
))
if stmt == "(pop 1)":
))
if stmt == "(pop 1)":