mirror of
https://github.com/RRZE-HPC/OSACA.git
synced 2025-12-16 09:00:05 +01:00
Inlined conversion of LD/ST memory operands
This commit is contained in:
@@ -145,15 +145,8 @@ class MachineModel(object):
|
||||
# List containing classes with same name/instruction
|
||||
self._data["instruction_forms_dict"][iform["name"]].append(new_iform)
|
||||
self._data["internal_version"] = self.INTERNAL_VERSION
|
||||
self.load_store_tp()
|
||||
if not lazy:
|
||||
# cache internal representation for future use
|
||||
self._write_in_cache(self._path)
|
||||
# Store in runtime cache
|
||||
if not lazy:
|
||||
MachineModel._runtime_cache[self._path] = self._data
|
||||
|
||||
def load_store_tp(self):
|
||||
# Convert load and store throughput memory operands to classes
|
||||
new_throughputs = []
|
||||
if "load_throughput" in self._data:
|
||||
for m in self._data["load_throughput"]:
|
||||
@@ -183,6 +176,14 @@ class MachineModel(object):
|
||||
)
|
||||
self._data["store_throughput"] = new_throughputs
|
||||
|
||||
|
||||
if not lazy:
|
||||
# cache internal representation for future use
|
||||
self._write_in_cache(self._path)
|
||||
# Store in runtime cache
|
||||
if not lazy:
|
||||
MachineModel._runtime_cache[self._path] = self._data
|
||||
|
||||
def operand_to_class(self, o, new_operands):
|
||||
"""Convert an operand from dict type to class"""
|
||||
if o["class"] == "register":
|
||||
|
||||
Reference in New Issue
Block a user