////////////////////////////////////////////////////////////////////// // // LogIorInsn::SimplifyOutputAux // // (logior x 0) = x // (logior x -1) = -1 // Operand* LogIorInsn::SimplifyOutputAux() const { if (ir_operand_equal(GetSx(), 0)) { return GetSy(); } if (ir_operand_equal(GetSy(), 0)) { return GetSx(); } if (ir_operand_equal(GetSx(), -1) || ir_operand_equal(GetSy(), -1)) { return ir_make_real(GetTy(), -1); } return GetOutput(); } // LogIorInsn::SimplifyOutputAux
////////////////////////////////////////////////////////////////////// // // ShrInsn::SimplifyOutputAux // // (ash 0 n) = 0 // (ash x 0) = x // Operand* ShrInsn::SimplifyOutputAux() const { if (ir_operand_equal(GetSx(), 0)) return ir_make_real(GetTy(), 0); if (ir_operand_equal(GetSy(), 0)) return GetSx(); return GetOutput(); } // ShrInsn::SimplifyOutputAux
void GlBattery::Translate() { glTranslatef(GetTx(), GetTy(), 0.0f); }
void GlCell::Translate() { glTranslatef(GetTx(), 0.f, GetTy()); }