Skip to main content

luaur_code_gen/functions/
get_instruction_count_code_gen_lower.rs

1use crate::enums::ir_cmd::IrCmd;
2use crate::records::ir_inst::IrInst;
3use alloc::vec::Vec;
4
5#[inline]
6pub fn get_instruction_count_vector_ir_inst_ir_cmd(instructions: &Vec<IrInst>, cmd: IrCmd) -> u32 {
7    let mut count = 0;
8    for inst in instructions {
9        if inst.cmd == cmd {
10            count += 1;
11        }
12    }
13    count
14}