Commit c34a692b authored by zygzagZ's avatar zygzagZ

cleanup

parent 46d82364
......@@ -116,12 +116,10 @@ void QuadrupleGenerator::visitELitInt(ELitInt *p) {
void QuadrupleGenerator::visitELitTrue(ELitTrue *p) {
lastVar = alloc(1);
// if (labelTrue) addQuad<QJump>(labelTrue);
}
void QuadrupleGenerator::visitELitFalse(ELitFalse *p) {
lastVar = alloc(0);
// if (labelFalse) addQuad<QJump>(labelFalse);
}
void QuadrupleGenerator::visitEString(EString *p) {
......
......@@ -101,8 +101,6 @@ private:
void addLastVarCondJump(const VariablePtr& l, Quadruple::Op op, const VariablePtr& r) {
if (labelTrue && labelFalse) {
addQuad<QJumpCond>(labelTrue, l, op, r);
// testy jump assign
// addQuad<QAssign>(lastVar, l, op, r);
addQuad<QJump>(labelFalse);
return;
} else if (labelTrue) {
......@@ -111,9 +109,6 @@ private:
} else if (labelFalse) {
addQuad<QJumpCond>(labelFalse, l, op.neg(), r);
lastVar = alloc(1);
} else {
// testy jump assign
// return;
}
addQuad<QAssign>(lastVar, l, op, r);
}
......
......@@ -9,7 +9,7 @@ void RegisterAllocator::analyseLive() {
for (const auto& q : v->writes) {
q->block->flow.addDef(v);
}
if (/*!v->info ||*/ v->constExpr) continue;
if (v->constExpr) continue;
for (const auto& q : v->uses) {
q->block->flow.addUse(v);
}
......
Markdown is supported
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