use of org.mapleir.ir.code.Expr in project maple-ir by LLVM-but-worse.
the class SSAGenPass method collectUses.
private void collectUses(Expr e) {
for (Expr c : e.enumerateWithSelf()) {
if (c.getOpcode() == Opcode.LOCAL_LOAD) {
VarExpr ve = (VarExpr) c;
pool.uses.get(ve.getLocal()).add(ve);
}
}
}
use of org.mapleir.ir.code.Expr in project maple-ir by LLVM-but-worse.
the class SSAGenPass method getValue.
private Expr getValue(Expr e) {
if (e.getOpcode() == Opcode.LOCAL_LOAD) {
VarExpr v = (VarExpr) e;
AbstractCopyStmt def = pool.defs.get(v.getLocal());
Expr val = def.getExpression();
if (!def.isSynthetic() && def.getOpcode() != Opcode.PHI_STORE) {
return getValue(val);
}
}
return e;
}
Aggregations