pub fn find_return_block_indices(&self) -> Vec<usize> {
        let mut result = vec![];

        if let Some(sel_fn) = self.selected_function {
            let func = &self.module.functions[sel_fn];

            for (idx, blk) in func.blocks.iter().enumerate() {
                // OpReturn must be the last instruction in a block
                let last_instr = blk.instructions.last().unwrap();

                match last_instr.class.opcode {
                    spirv::Op::Return | spirv::Op::ReturnValue => {
                        result.push(idx);
                    }
                    _ => {}
                }
            }
        }

        result
    }
/// Find all blocks that end in OpReturn
Find all blocks that end in OpReturn
Find all blocks that end in OpReturn
pub fn find_return_block_indices(&self) -> Vec<usize> {
        let mut result = vec![];
        if let Some(sel_fn) = self.selected_function {
            let func = &self.module.functions[sel_fn];
            for (idx, blk) in func.blocks.iter().enumerate() {
                // OpReturn must be the last instruction in a block
                let last_instr = blk.instructions.last().unwrap();
                match last_instr.class.opcode {
                    spirv::Op::Return | spirv::Op::ReturnValue => {
                        result.push(idx);
                    }
                    _ => {}
                }
            }
        }
        result
    }
pub fn find_return_block_indices ( & self ) -> Vec < usize > { let mut result = vec ! [ ] ; if let Some ( sel_fn ) = self . selected_function { let func = & self . module . functions [ sel_fn ] ; for ( idx , blk ) in func . blocks . iter ( ) . enumerate ( ) { // OpReturn must be the last instruction in a block let last_instr = blk . instructions . last ( ) . unwrap ( ) ; match last_instr . class . opcode { spirv :: Op :: Return | spirv :: Op :: ReturnValue => { result . push ( idx ) ; } _ => { } } } } result }
Find all blocks that end in OpReturn
Find all blocks that end in OpReturn
&self
&self