nx_opt.nx
buildroot/runtime/nx_opt.nx
about
dependencies 6 imports · 49 importers
diagram shows first 10 each side; +0 more imports, +39 more importers in the complete lists below.
imports: nx_syscalls.nxnx_types.nxnx_ir.nxnx_dom_fn.nxnx_bck_elide.nxnx_opt_eqsat_pass.nx
imported by: nx_compile_field_candidate_t280.nxnx_compile_wat.nxnx_compile_wat_call_operands_t143.nxnx_compile_wat_scalararm.nxnx_compile_x86.nxnx_dom_oracle_gate.nxnx_main.nxnx_nxc.nxnx_opt_eqsat_oracle_gate.nxnx_opt_eqsat_pass_gate.nxnx_rv64_atomic_gate.nxnx_smoke_nxc_pipeline.nxnx_smoke_nxc_pipeline10.nxnx_smoke_nxc_pipeline12.nxnx_smoke_nxc_pipeline13.nxnx_smoke_nxc_pipeline14.nxnx_smoke_nxc_pipeline15.nxnx_smoke_nxc_pipeline2.nxnx_smoke_nxc_pipeline7.nxnx_smoke_nxc_pipeline8.nxnx_smoke_nxc_pipeline9.nxnx_smoke_nxc_tilde.nxnx_vcc_color_wat.nxnx_vcc_probe_wat.nxnx_wgsl.nxnx_wgsl_authored_t55.nxnx_wgsl_before_front_t217.nxnx_wgsl_canonical_skin_t140.nxnx_wgsl_cast_control_t181.nxnx_wgsl_cast_lbs_t181.nxnx_wgsl_cast_material_t181.nxnx_wgsl_cloud_transport_t155.nxnx_wgsl_cumulus_release_t161.nxnx_wgsl_cumulus_t156.nxnx_wgsl_depth_candidate_t192.nxnx_wgsl_eye_t138.nxnx_wgsl_face_mask_t163.nxnx_wgsl_front_candidate_t217.nxnx_wgsl_inspection_t165.nxnx_wgsl_sand_baseline_t137.nxnx_wgsl_sand_private_t137.nxnx_wgsl_scene_light_candidate_t364.nxnx_wgsl_skin_t138.nxnx_wgsl_sky_light_t154.nxnx_wgsl_sky_private_20260910.nxnx_wgsl_sky_review_t154.nxnx_wgsl_static_t335.nxnx_wgsl_world_depth_t195.nxopt.nx
structs
| 3286 | struct VraResult |
consts
| 334 | const INL_MAX_BODY_INSTRS: i64 = 24 |
| 939 | const OPT_LOAD_FWD_MAX_WALK: i64 = 64 |
| 962 | const OPT_LOAD_FWD_CROSS_BLOCK: i64 = 0 |
| 2148 | const CSE_TABLE_CAP: i64 = 256 |
| 2466 | const LICM_MAX_BLOCKS: i64 = 4096 |
| 2590 | const LICM_HOIST_LIVE: i64 = 1 |
| 2594 | const LICM_G9_LOAD_HOIST: i64 = 1 |
| 2598 | const LICM_CONSERVATIVE: i64 = 0 |
| 2603 | const NEGCTL_SKIP_PARENT_REBUILD: i64 = 0 |
| 3647 | const DSE_MAX_TRACKED: i64 = 256 |
functions
| 47 | func fold_binop(op: i64, a: i64, b: i64, ok: *i64) -> i64 called by 1: opt_const_fold |
| 97 | func opt_const_fold(f: *Function) -> i64 |
| 151 | func is_const_val(f: *Function, id: i64, want: i64) -> i64 |
| 158 | func rewrite_to_copy(inst: *Instr, src_id: i64) -> i64 |
| 166 | func make_result_zero(f: *Function, inst: *Instr) -> i64 |
| 196 | func can_inline(callee: *Function) -> i64; called by 1: opt_inline_module |
| 197 | func inline_call(caller: *Function, bb: *BasicBlock, called by 1: opt_inline_module |
| 203 | func inl_remap(table: *i64, id: i64, cap: i64) -> i64 |
| 220 | func inl_snapshot_block(cb: *BasicBlock, snap: *i64) -> i64 called by 1: inline_call |
| 231 | func inl_clone_instr(caller: *Function, bb: *BasicBlock, call_inst: *Instr, |
| 261 | func inl_clone_all(caller: *Function, bb: *BasicBlock, call_inst: *Instr, |
| 279 | func opt_inline_module(m: *Module) -> i64 called by 4: nxc_compilemainmainnxc_compile calls 5: sys_mmapsys_read_fileblock_atcan_inlineinline_call |
| 349 | func inl_op_safe(op: i64) -> i64 called by 1: can_inline |
| 374 | func can_inline(callee: *Function) -> i64 |
| 398 | func inline_call(caller: *Function, bb: *BasicBlock, |
| 517 | func opt_gvn_block(f: *Function) -> i64 |
| 630 | func opt_sccp_branches(f: *Function) -> i64 |
| 686 | func opt_mem2reg_simple(f: *Function) -> i64 |
| 805 | func opt_alloca_const(f: *Function) -> i64 |
| 964 | func opt_load_forward(f: *Function) -> i64 |
| 1079 | func const_one(f: *Function) -> i64; |
| 1081 | func opt_simplify(f: *Function) -> i64 |
| 1164 | func const_one(f: *Function) -> i64 |
| 1195 | func op_is_pure(op: i64) -> i64 called by 1: opt_dce |
| 1212 | func mark_used(f: *Function, used: *u8) -> i64 |
| 1263 | func unlink(b: *BasicBlock, inst: *Instr) -> i64 |
| 1279 | func opt_dce(f: *Function) -> i64 |
| 1320 | func comptime_eval_binop(op: i64, a: i64, b: i64) -> i64 |
| 1388 | func opt_module_const_return(m: *Module) -> i64 |
| 1551 | func opt_module_dce_mark(m: *Module, live: *u8) -> i64 |
| 1659 | func opt_sweep_unreachable_function(f: *Function) -> i64 |
| 1861 | func opt_copyprop(f: *Function) -> i64 |
| 1941 | func if_br_cond_then_1_else_n(inst: *Instr) -> i64; called by 1: opt_copy_forward |
| 1942 | func read_op(inst: *Instr, idx: i64) -> i64; |
| 1943 | func write_op(inst: *Instr, idx: i64, v: i64) -> i64; |
| 1956 | func opt_copy_forward(f: *Function) -> i64 |
| 2053 | func if_br_cond_then_1_else_n(inst: *Instr) -> i64 |
| 2064 | func read_op(inst: *Instr, idx: i64) -> i64 |
| 2091 | func write_op(inst: *Instr, idx: i64, v: i64) -> i64 |
| 2152 | func cse_is_candidate(op: i64) -> i64 called by 1: opt_cse |
| 2177 | func cse_is_commutative(op: i64) -> i64 called by 1: opt_cse |
| 2188 | func opt_cse(f: *Function) -> i64 |
| 2288 | func skip_bridges(f: *Function, b: *BasicBlock, hops_left: i64) -> *BasicBlock |
| 2308 | func add_succ(bb: *BasicBlock, t: *BasicBlock) -> i64 called by 1: opt_thread_jumps |
| 2314 | func add_pred(bb: *BasicBlock, p: *BasicBlock) -> i64 called by 1: opt_thread_jumps |
| 2321 | func opt_thread_jumps(f: *Function) -> i64 |
| 2414 | func licm_is_hoistable(op: i64) -> i64; called by 1: opt_licm |
| 2420 | func operands_are_loop_invariant(f: *Function, inst: *Instr, called by 1: opt_licm |
| 2423 | func hoist_instr(inst: *Instr, preheader: *BasicBlock) -> i64; called by 1: opt_licm |
| 2424 | func mark_loop_body_nx(f: *Function, header: *BasicBlock, called by 1: opt_licm |
| 2482 | func cfg_block_by_id(f: *Function, id: i64) -> *BasicBlock |
| 2492 | func cfg_add_pred(b: *BasicBlock, p: *BasicBlock) -> i64 called by 1: cfg_rebuild_edges |
| 2500 | func cfg_rebuild_edges(f: *Function) -> i64 called by 4: mainopt_load_forwardopt_bounds_check_elimopt_licm calls 3: block_atcfg_block_by_idcfg_add_pred |
| 2566 | func cfg_rebuild_parents(f: *Function) -> i64 |
| 2618 | func opt_bounds_check_elim(f: *Function) -> i64 called by 1: opt_run calls 8: bck_elide_livecfg_rebuild_edgescfg_rebuild_parentssys_mmapdom_compute_fnbck_elide_dominated+2 |
| 2638 | func opt_licm(f: *Function) -> i64 called by 1: opt_run calls 14: cfg_rebuild_edgescfg_rebuild_parentsblock_atsys_mmapdom_compute_fnlicm_build_escape_map+8 |
| 2885 | func licm_is_hoistable(op: i64) -> i64 |
| 2925 | func opt_opk(inst: *Instr, k: i64) -> i64 |
| 2956 | func licm_alloca_noescape(f: *Function, aid: i64) -> i64 |
| 2988 | func licm_store_dominated_by_header(f: *Function, aid: i64, info: *DomInfoFn, |
| 3009 | func licm_build_escape_map(f: *Function, esc: *u8) -> i64 |
| 3040 | func licm_build_store_dom_map(f: *Function, info: *DomInfoFn, header: *BasicBlock, stdom: *u8) -> i64 |
| 3064 | func licm_load_hoistable_memo(f: *Function, inst: *Instr, esc: *u8, stdom: *u8) -> i64 |
| 3080 | func licm_load_hoistable(f: *Function, inst: *Instr, info: *DomInfoFn, |
| 3108 | func operands_are_loop_invariant(f: *Function, inst: *Instr, |
| 3184 | func hoist_instr(inst: *Instr, preheader: *BasicBlock) -> i64 |
| 3228 | func mark_loop_body_nx(f: *Function, header: *BasicBlock, |
| 3292 | func opt_vra_compute(f: *Function) -> *VraResult; |
| 3293 | func vra_is_nonneg(vra: *VraResult, v: i64) -> i64; called by 1: opt_strength_reduce |
| 3295 | func opt_compare_fold(f: *Function) -> i64 |
| 3385 | func opt_vra_compute(f: *Function) -> *VraResult |
| 3473 | func vra_is_nonneg(vra: *VraResult, v: i64) -> i64 |
| 3510 | func opt_reassoc(f: *Function) -> i64 |
| 3577 | func opt_block_merge(f: *Function) -> i64 |
| 3649 | func opt_dse(f: *Function) -> i64 |
| 3741 | func is_pow2(n: i64, shift_out: *i64) -> i64 |
| 3754 | func opt_strength_reduce(f: *Function) -> i64 |
| 3855 | func opt_tail_call(f: *Function) -> i64 |
| 3946 | func opt_run(f: *Function) -> i64 called by 23: nxc_compilecompilemainmainmainmain+17 calls 19: opt_mem2reg_simpleopt_sccp_branchesopt_const_foldopt_copypropopt_copy_forwardopt_cse+13 |