WARNING! Access to this system is limited to authorised users only.
Unauthorised users may be subject to prosecution.
Unauthorised access to this system is a criminal offence under Australian law (Federal Crimes Act 1914 Part VIA)
It is a criminal offence to:
(1) Obtain access to data without authority. -Penalty 2 years imprisonment.
(2) Damage, delete, alter or insert data without authority. -Penalty 10 years imprisonment.
User activity is monitored and recorded. Anyone using this system expressly consents to such monitoring and recording.

To protect your data, the CISO officer has suggested users to enable 2FA as soon as possible.
Currently 2.7% of users enabled 2FA.

coloring.rs 568 Bytes
Newer Older
qinsoon's avatar
qinsoon committed
1
2
3
use compiler::backend::reg_alloc::liveness::InterferenceGraph; 
use vm::machine_code::CompiledFunction;

4
5
use compiler::backend::GPR_COUNT;

qinsoon's avatar
qinsoon committed
6
7
8
pub struct GraphColoring <'a> {
    ig: InterferenceGraph,
    cur_cf: &'a CompiledFunction,
9
    K: usize
qinsoon's avatar
qinsoon committed
10
11
12
13
14
15
16
}

impl <'a> GraphColoring <'a> {
    pub fn start (cf: &CompiledFunction, ig: InterferenceGraph) {
        let mut coloring = GraphColoring {
            ig: ig,
            cur_cf: cf, 
17
            K: 0
qinsoon's avatar
qinsoon committed
18
19
20
21
22
23
        };
        
        coloring.init();
    }
    
    fn init (&mut self) {
24
        self.K = GPR_COUNT;
qinsoon's avatar
qinsoon committed
25
26
    }
}