Skip to main content

luaur_code_gen/methods/
remove_dead_store_state_use_reg.rs

1use crate::records::remove_dead_store_state::RemoveDeadStoreState;
2use crate::records::store_reg_info::StoreRegInfo;
3
4impl RemoveDeadStoreState {
5    pub fn use_reg(&mut self, reg: u8) {
6        let reg_info: &mut StoreRegInfo = &mut self.info[reg as usize];
7
8        // Register read doesn't clear the known tag
9        reg_info.tag_inst_idx = !0u32;
10        reg_info.value_inst_idx = !0u32;
11        reg_info.tvalue_inst_idx = !0u32;
12        reg_info.maybe_gco = false;
13    }
14}