VarAction2: Remove mul and div operations with constant 1
This commit is contained in:
@@ -225,6 +225,19 @@ inline bool IsEvalAdjustWithZeroAlwaysZero(DeterministicSpriteGroupAdjustOperati
|
||||
}
|
||||
}
|
||||
|
||||
inline bool IsEvalAdjustWithOneRemovable(DeterministicSpriteGroupAdjustOperation op)
|
||||
{
|
||||
switch (op) {
|
||||
case DSGA_OP_MUL:
|
||||
case DSGA_OP_SDIV:
|
||||
case DSGA_OP_UDIV:
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
inline bool IsEvalAdjustWithSideEffects(DeterministicSpriteGroupAdjustOperation op)
|
||||
{
|
||||
switch (op) {
|
||||
|
||||
Reference in New Issue
Block a user