code wiki / _hdl_build / nx_superopt_opt_test.nx
nx_superopt_opt_test.nx
buildroot/runtime/_hdl_build/nx_superopt_opt_test.nx
about
nx_superopt_opt_test.nx -- the optimal superoptimizer finds the SHORTEST program
for a set of functions (constant-multiply + branchless bit-tricks), verified over
FULL-RANGE 64-bit inputs (negatives, sign bit). Reports the op count, which is the
number to put 1:1 against gcc -O2's instruction count in the honest board.
Known answer: every target's shortest program found + held-out verified -> exit 0.
dependencies 1 imports · 0 importers
imports: nx_superopt_opt.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 9 | func op_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 10 | func op_num(v: i64) -> i64 |
| 18 | func op_opname(o: i64) -> *u8 called by 1: op_describe |
| 24 | func op_describe(op: *i64, a: *i64, b: *i64, L: i64) -> i64 |
| 35 | func op_target(id: i64, x: i64) -> i64 called by 1: main |
| 43 | func op_name(id: i64) -> *u8 called by 1: main |
| 52 | func main() -> i64 |