Skip to content

Commit

Permalink
Update metadata cache to use stringified key.
Browse files Browse the repository at this point in the history
  • Loading branch information
jiel-nv committed Mar 3, 2025
1 parent a85c314 commit 851236e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion llvmlite/ir/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ def add_debug_info(self, kind, operands, is_distinct=False):
an instruction.
"""
operands = tuple(sorted(self._fix_di_operands(operands.items())))
key = (kind, operands, is_distinct)
str_op_key = tuple(sorted(self.str_ditok_operands(operands.items())))
key = (kind, str_op_key, is_distinct)
if key not in self._metadatacache:
n = len(self.metadata)
di = values.DIValue(self, is_distinct, kind, operands, name=str(n))
Expand Down

0 comments on commit 851236e

Please sign in to comment.