fix a bug when longest_path is not integer, try 'ldpw3, w1, [x0, #0x48]' in AArch64

This commit is contained in:
Qingcai Jiang
2021-12-30 21:32:29 +08:00
parent 0e984f4ec7
commit 71b9a17ab8

View File

@@ -225,7 +225,7 @@ class KernelDG(nx.DiGraph):
node["latency_cp"] = self.dg.edges[(s, d)]["latency"]
path_latency += node["latency_cp"]
# add latency for last instruction
node = self._get_node_by_lineno(longest_path[-1])
node = self._get_node_by_lineno(int(longest_path[-1]))
node["latency_cp"] = node["latency"]
if max_latency_instr["latency"] > path_latency:
max_latency_instr["latency_cp"] = float(max_latency_instr["latency"])