Data flow improvements in pseudo code generator
This commit is contained in:
12
h8536/cli.py
12
h8536/cli.py
@@ -6,12 +6,15 @@ from pathlib import Path
|
||||
from .analysis import build_call_graph, collect_labels, linear_sweep, trace
|
||||
from .cycles import annotate_cycles
|
||||
from .data_analysis import analyze_unreached_data
|
||||
from .dataflow import analyze_dataflow
|
||||
from .decoder import H8536Decoder
|
||||
from .formatting import parse_int
|
||||
from .indirect import analyze_indirect_flow
|
||||
from .peripheral_access import analyze_peripheral_access
|
||||
from .render import format_callgraph_dot, format_listing, write_json
|
||||
from .rom import Rom
|
||||
from .sci import analyze_sci
|
||||
from .symbols import discover_symbols
|
||||
from .timing import summarize_timing
|
||||
from .vectors import read_dtc_vectors_max, read_dtc_vectors_min, read_vectors_max, read_vectors_min
|
||||
|
||||
@@ -72,9 +75,12 @@ def main() -> int:
|
||||
annotate_cycles(instructions, args.mode)
|
||||
data_candidates = analyze_unreached_data(rom, instructions, args.start, end)
|
||||
call_graph = build_call_graph(instructions, vectors, labels)
|
||||
dataflow = analyze_dataflow(instructions, labels, call_graph)
|
||||
symbols = discover_symbols(instructions, data_candidates=data_candidates)
|
||||
timing_summary = summarize_timing(instructions, labels, call_graph) if args.timing else None
|
||||
sci_analysis = analyze_sci(instructions, clock_hz=args.clock_hz)
|
||||
peripheral_access = analyze_peripheral_access(instructions)
|
||||
indirect_flow = analyze_indirect_flow(rom, instructions, labels)
|
||||
|
||||
args.out.parent.mkdir(parents=True, exist_ok=True)
|
||||
args.out.write_text(
|
||||
@@ -92,6 +98,9 @@ def main() -> int:
|
||||
show_cycles=args.cycles,
|
||||
sci_analysis=sci_analysis,
|
||||
peripheral_access=peripheral_access,
|
||||
indirect_flow=indirect_flow,
|
||||
dataflow=dataflow,
|
||||
symbols=symbols,
|
||||
),
|
||||
encoding="utf-8",
|
||||
)
|
||||
@@ -108,6 +117,9 @@ def main() -> int:
|
||||
timing_summary=timing_summary,
|
||||
sci_analysis=sci_analysis,
|
||||
peripheral_access=peripheral_access,
|
||||
indirect_flow=indirect_flow,
|
||||
dataflow=dataflow,
|
||||
symbols=symbols,
|
||||
)
|
||||
if args.callgraph_dot:
|
||||
args.callgraph_dot.parent.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
Reference in New Issue
Block a user