Commit d6f56cd5 authored by 原梓轩's avatar 原梓轩
Browse files

useless opt

parent 0e447bcf
No related merge requests found
Showing with 9 additions and 3 deletions
+9 -3
......@@ -363,9 +363,11 @@ impl RegisterRewriter {
}
}
for reg in used_set {
if let Some(inst) = self.load_from_stack(reg, sf) {
insts.push(inst);
if analyser.flow().from_duplicate(&label).len() != 1 {
for reg in used_set {
if let Some(inst) = self.load_from_stack(reg, sf) {
insts.push(inst);
}
}
}
......
......@@ -227,6 +227,10 @@ impl LiveVariableAnalyser {
}
}
pub fn flow(&self) -> &GlobalFLowGraph {
&self.flow
}
pub fn ins(&self, label: &Label) -> &HashSet<Register> {
self.ins.get(label).unwrap()
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment