Home | History | Annotate | Download | only in ssa

Lines Matching full:constant

27 import com.android.dx.rop.cst.Constant;
36 * A small variant of Wegman and Zadeck's Sparse Conditional Constant
42 private static final int CONSTANT = 1;
50 /** For those registers that are constant, this is the constant value */
51 private Constant[] latticeConstants;
73 this.latticeConstants = new Constant[this.regCount];
87 * Performs sparse conditional constant propagation on a method.
129 * @param cst Constant value (may be null)
132 private boolean setLatticeValueTo(int reg, int value, Constant cst) {
133 if (value != CONSTANT) {
156 * CONSTANT x CONSTANT = CONSTANT if equal constants, VARYING otherwise
168 Constant phiConstant = null;
180 if (sourceRegValue == CONSTANT) {
183 phiResultValue = CONSTANT;
229 case CONSTANT: return "CONSTANT";
247 // Check if the insn is a branch with a constant condition
249 Constant cA = null;
250 Constant cB = null;
255 latticeValues[regA] == CONSTANT) {
263 latticeValues[regB] == CONSTANT) {
336 * If condition is constant, add only the target block to the
363 * @return constant result or null if not simulatable.
365 private Constant simulateMath(SsaInsn insn, int resultType) {
370 Constant cA;
371 Constant cB;
373 if (latticeValues[regA] != CONSTANT) {
384 if (latticeValues[regB] != CONSTANT) {
392 //TODO handle a constant of 0 with MUL or AND
491 Constant resultConstant = null;
496 resultValue = CONSTANT;
521 resultValue = CONSTANT;
526 if (latticeValues[resultReg] == CONSTANT) {
597 * Replaces TypeBearers in source register specs with constant type
603 if (latticeValues[reg] != CONSTANT) {
616 * The definition was a constant already.
622 // Update the destination RegisterSpec with the constant value
652 * Replaces branches that have constant conditions with gotos
669 * longer have constant conditions (no nonexecutable successors)