Lines Matching defs:constant

31  * A value bound is represented as a pair of value and constant,
36 ValueBound(HInstruction* instruction, int32_t constant) {
38 // Normalize ValueBound with constant instruction.
40 if (!WouldAddOverflowOrUnderflow(instr_const, constant)) {
42 constant_ = instr_const + constant;
47 constant_ = constant;
88 // Return result: either false and "null+0" or true and "instr+constant".
108 // a constant or array length related value.
230 // Favor constant as lower bound.
249 // Add a constant to a ValueBound.
266 // (array.length + non-positive-constant) won't overflow an int.
349 // Shift a range by a constant.
350 ValueRange* Add(int32_t constant) const {
352 ValueBound lower = lower_.Add(constant, &overflow, &underflow);
358 ValueBound upper = upper_.Add(constant, &overflow, &underflow);
487 int32_t constant = range->GetLower().GetConstant();
488 if (constant >= (std::numeric_limits<int32_t>::min() - increment_)) {
493 // For non-constant lower bound, just assume might be underflow. Give up narrowing.
736 // No constant or array.length+c format bound found.
817 // Non-constant index.
818 ValueBound lower = ValueBound(nullptr, 0); // constant 0
835 int32_t constant = index->AsIntConstant()->GetValue();
836 if (constant < 0) {
840 if (constant < array_length->AsIntConstant()->GetValue()) {
851 if (constant < lower.GetConstant()) {
861 // We currently don't do it for non-constant index since a valid array[i] can't prove
863 if (constant == std::numeric_limits<int32_t>::max()) {
867 ValueBound lower = ValueBound(nullptr, constant + 1);
920 // Add constant 0. It's really a fixed value.
931 // No constant or array.length+c bound found.
1098 int32_t constant = instruction->GetRight()->AsIntConstant()->GetValue();
1099 if (constant > 0) {
1100 // constant serves as a mask so any number masked with it
1101 // gets a [0, constant] value range.
1105 ValueBound(nullptr, constant));
1204 // Collect all bounds checks that are still there and that are related as "a[base + constant]"
1236 // constant is seen along *all* conditional paths that follow.