Skip to content

Commit

Permalink
[IR] reimplemented intenger optimizations + [FIX] fixed load ir printing
Browse files Browse the repository at this point in the history
  • Loading branch information
Cr0a3 committed Nov 10, 2024
1 parent 6d52aaf commit b2ac92f
Show file tree
Hide file tree
Showing 5 changed files with 381 additions and 27 deletions.
8 changes: 4 additions & 4 deletions src/IR/nodes/load.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ use super::{EvalOptVisitor, IROperand, Ir, Load};

impl Ir for Load {
fn dump(&self) -> String {
format!("{} = load {}, {}", self.inner1.name, self.inner3, self.inner2)
format!("{} = load {} {}", self.inner1.name, self.inner2, self.inner3)
}

fn dumpColored(&self, profile: crate::Support::ColorProfile) -> String {
format!("{} = {} {}, {}",
format!("{} = {} {} {}",
profile.markup(&self.inner1.name, ColorClass::Var),
profile.markup("load", ColorClass::Instr),
profile.markup(&self.inner3.to_string(), ColorClass::Ty),
profile.markup(&self.inner2.to_string(), ColorClass::Var),
profile.markup(&self.inner2.to_string(), ColorClass::Ty),
profile.markup(&self.inner3.to_string(), ColorClass::Var),
)
}

Expand Down
Loading

0 comments on commit b2ac92f

Please sign in to comment.