To protect your data, the CISO officer has suggested users to enable GitLab 2FA as soon as possible.

inst_sel.rs 566 Bytes
Newer Older
1
2
use ast::ir::*;
use ast::inst::Instruction_::*;
qinsoon's avatar
qinsoon committed
3
use vm::context::VM;
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

use compiler::CompilerPass;

pub struct InstructionSelection {
    name: &'static str
}

impl InstructionSelection {
    pub fn new() -> InstructionSelection {
        InstructionSelection{name: "Instruction Selection (ARM)"}
    }
}

impl CompilerPass for InstructionSelection {
    fn name(&self) -> &'static str {
        self.name
    }
    
    #[allow(unused_variables)]
qinsoon's avatar
qinsoon committed
23
    fn start_function(&mut self, vm: &VM, func: &mut MuFunctionVersion) {
24
25
        println!("{}", self.name());
    }
26
}