1. A non-transitory computer readable storage media having instructions stored thereon that, when executed by a computer, implement a method for optimizing if statements in a program, the method comprising: identifying a conditional expression having an inclusion relation corresponding to a plurality of conditional statements in the program, wherein a result of the conditional expression is representative of a result of the plurality of conditional statements respectively; and moving the conditional expression to a move destination in the program, wherein moving the conditional expression comprises: in the case where a result of the conditional expression is not cached in a variable, generating an if statement for the conditional expression and caching a result of the conditional expression in a new variable, wherein the if statement is generated in increasing order of a cost of execution of the program; and in the case where the result of the conditional expression is cached in the variable, replacing a conditional operator of the conditional expression with a logical operator, prior to caching the result in the new variable, in response to the result of the conditional expression being cached in a variable.