Skip to content

Commit

Permalink
Add insert logic for error case
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardt committed Feb 6, 2019
1 parent bb13509 commit f5b92db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions magma/backend/coreir_.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,8 @@ def get_constant_instance(self, constant, num_bits, module_definition):
def compile_dependencies(self, defn):
pass_ = InstanceGraphPass(defn)
pass_.run()
dependency_names = [key.name for key, _ in pass_.tsortedgraph]
logger.debug(f"tsortedgraph: {dependency_names}")
for key, _ in pass_.tsortedgraph:
if key == defn:
continue
Expand Down
2 changes: 2 additions & 0 deletions magma/uniquification.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ def __call__(self, definition):
insert = True
self.original_names[definition] = name
type(definition).rename(definition, new_name)
else:
insert = True
if insert:
self.seen[name][key] = definition

Expand Down

0 comments on commit f5b92db

Please sign in to comment.