Searched defs:constant (Results 1 - 25 of 36) sorted by relevance

12

/art/tools/dexfuzz/src/dexfuzz/rawdex/formats/
H A DContainsConst.java22 * Every Format that contains a value that is a constant (that includes instructions like
23 * const/4, but also add-int/lit8) should implement this interface, to allow the constant
29 public void setConst(Instruction insn, long constant); argument
H A DFormat11n.java53 public void setConst(Instruction insn, long constant) { argument
54 insn.vregB = constant;
H A DFormat21h.java54 public void setConst(Instruction insn, long constant) { argument
55 insn.vregB = constant;
H A DFormat21s.java54 public void setConst(Instruction insn, long constant) { argument
55 insn.vregB = constant;
H A DFormat22b.java55 public void setConst(Instruction insn, long constant) { argument
56 insn.vregC = constant;
H A DFormat22s.java54 public void setConst(Instruction insn, long constant) { argument
55 insn.vregC = constant;
H A DFormat31i.java54 public void setConst(Instruction insn, long constant) { argument
55 insn.vregB = constant;
H A DFormat51l.java57 public void setConst(Instruction insn, long constant) { argument
58 insn.vregB = constant;
/art/compiler/optimizing/
H A Dlive_ranges_test.cc170 // Test for the 4 constant.
179 // Test for the 0 constant.
181 // The then branch is a hole for this constant, therefore its interval has 2 ranges.
249 // Test for the 0 constant.
258 // Test for the 4 constant.
266 // Test for the 5 constant.
328 // Test for the 0 constant.
329 HIntConstant* constant = liveness.GetInstructionFromSsaIndex(0)->AsIntConstant(); local
330 LiveInterval* interval = constant->GetLiveInterval();
406 // Test for the 0 constant
[all...]
H A Dssa_test.cc53 void VisitIntConstant(HIntConstant* constant) OVERRIDE {
54 PrintPreInstruction(constant); variable
55 str_ += constant->DebugName();
57 PrintInt(constant->GetValue());
58 PrintPostInstruction(constant); variable
H A Dlocations.cc52 HConstant* constant = instruction->AsConstant(); local
53 if (constant != nullptr) {
54 int64_t value = CodeGenerator::GetInt64ValueOf(constant);
56 return Location::ConstantLocation(constant);
63 HConstant* constant = instruction->AsConstant(); local
64 if (constant != nullptr) {
65 int64_t value = CodeGenerator::GetInt64ValueOf(constant);
67 return Location::ConstantLocation(constant);
H A Dnodes_x86.h35 // Load a constant value from the constant table.
39 HConstant* constant)
40 : HExpression(constant->GetType(), SideEffects::None(), kNoDexPc) {
42 SetRawInputAt(1, constant);
59 // Version of HNeg with access to the constant table for FP types.
38 HX86LoadFromConstantTable(HX86ComputeBaseMethodAddress* method_base, HConstant* constant) argument
H A Dconstant_folding.cc41 // yielding a constant. For example `input * 0` is replaced by a
42 // null constant.
71 // so that an instruction turned into a constant, used as input of
73 // instruction into a constant as well.
88 // Constant folding: replace `op(a)' with a constant at compile
89 // time if `a' is a constant.
90 HConstant* constant = inst->TryStaticEvaluation(); local
91 if (constant != nullptr) {
92 inst->ReplaceWith(constant);
98 // Constant folding: replace `op(a, b)' with a constant a
100 HConstant* constant = inst->TryStaticEvaluation(); local
113 HConstant* constant = inst->AsTypeConversion()->TryStaticEvaluation(); local
[all...]
H A Dcommon_arm64.h196 static bool CanEncodeConstantAsImmediate(HConstant* constant, HInstruction* instr) { argument
197 DCHECK(constant->IsIntConstant() || constant->IsLongConstant() || constant->IsNullConstant())
198 << constant->DebugName();
200 // For single uses we let VIXL handle the constant generation since it will
202 if (constant->GetUses().HasExactlyOneElement()) {
211 int64_t value = CodeGenerator::GetInt64ValueOf(constant);
234 static inline Location ARM64EncodableConstantOrRegister(HInstruction* constant, argument
236 if (constant
[all...]
H A Dlocations.h73 // Verify that non-constant location kinds do not interfere with kConstant.
98 static Location ConstantLocation(HConstant* constant) { argument
99 DCHECK(constant != nullptr);
100 return Location(kConstant | reinterpret_cast<uintptr_t>(constant));
403 // a constant locations. Values of enumeration Kind are selected in such a
H A Dssa_builder.cc47 // If we got here, we are comparing against a reference and the int constant
48 // should be replaced with a null constant.
50 // can only be the 0 constant.
553 * integers, but when doing the SSA form, we might realize the constant
555 * constant to make the operations correctly typed.
557 HFloatConstant* SsaBuilder::GetFloatEquivalent(HIntConstant* constant) { argument
558 // We place the floating point constant next to this constant.
559 HFloatConstant* result = constant->GetNext()->AsFloatConstant();
561 float value = bit_cast<float, int32_t>(constant
579 GetDoubleEquivalent(HLongConstant* constant) argument
[all...]
H A Dgraph_visualizer.cc296 HConstant* constant = location.GetConstant(); local
297 if (constant->IsIntConstant()) {
298 stream << constant->AsIntConstant()->GetValue();
299 } else if (constant->IsLongConstant()) {
300 stream << constant->AsLongConstant()->GetValue();
H A Dinliner.cc699 HConstant* constant; local
701 constant = graph_->GetLongConstant(
704 constant = graph_->GetIntConstant(
708 HNotEqual* compare = new (graph_->GetArena()) HNotEqual(class_table_get, constant);
H A Dload_store_elimination.cc359 // Different constant indices do not alias.
678 // // a[0] can now be replaced with constant 2, and the null check on it can be removed.
723 HInstruction* constant = GetDefaultValue(instruction->GetType()); local
725 substitute_instructions_for_loads_.push_back(constant);
726 heap_values[idx] = constant;
745 // we do an array get on an instruction that originates from the null constant
793 // with non-constant index.
H A Dbounds_check_elimination.cc31 * A value bound is represented as a pair of value and constant,
36 ValueBound(HInstruction* instruction, int32_t constant) { argument
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 t
487 int32_t constant = range->GetLower().GetConstant(); variable
835 int32_t constant = index->AsIntConstant()->GetValue(); variable
1098 int32_t constant = instruction->GetRight()->AsIntConstant()->GetValue(); variable
[all...]
H A Dcode_generator.h351 // Check that null value is not represented as an integer constant.
377 static int32_t GetInt32ValueOf(HConstant* constant) { argument
378 if (constant->IsIntConstant()) {
379 return constant->AsIntConstant()->GetValue();
380 } else if (constant->IsNullConstant()) {
383 DCHECK(constant->IsFloatConstant());
384 return bit_cast<int32_t, float>(constant->AsFloatConstant()->GetValue());
388 static int64_t GetInt64ValueOf(HConstant* constant) { argument
389 if (constant->IsIntConstant()) {
390 return constant
[all...]
H A Dinstruction_builder.cc1370 HLoadClass* constant = new (arena_) HLoadClass(graph_->GetCurrentMethod(), local
1377 AppendInstruction(constant);
1379 HInstruction* cls = constant;
1383 cls = new (arena_) HClinitCheck(constant, dex_pc);
1711 HIntConstant* constant = graph_->GetIntConstant(instruction.VRegB_11n(), dex_pc); local
1712 UpdateLocal(register_index, constant);
1718 HIntConstant* constant = graph_->GetIntConstant(instruction.VRegB_21s(), dex_pc); local
1719 UpdateLocal(register_index, constant);
1725 HIntConstant* constant = graph_->GetIntConstant(instruction.VRegB_31i(), dex_pc); local
1726 UpdateLocal(register_index, constant);
1732 HIntConstant* constant = graph_->GetIntConstant(instruction.VRegB_21h() << 16, dex_pc); local
1743 HLongConstant* constant = graph_->GetLongConstant(value, dex_pc); local
1754 HLongConstant* constant = graph_->GetLongConstant(value, dex_pc); local
1761 HLongConstant* constant = graph_->GetLongConstant(instruction.VRegB_51l(), dex_pc); local
1769 HLongConstant* constant = graph_->GetLongConstant(value, dex_pc); local
[all...]
H A Dinstruction_simplifier.cc141 bool AreAllBitsSet(HConstant* constant) { argument
142 return Int64FromConstant(constant) == -1;
296 // Shift distances are both constant, try replacing with Ror if they
593 // We are comparing the boolean to a constant which is of type int and can
594 // be any constant.
624 // We are comparing the boolean to a constant which is of type int and can
625 // be any constant.
736 // If the array is a NewArray with constant size, replace the array length
737 // with the constant instruction. This helps the bounds check elimination phase.
871 HConstant* constant local
[all...]
H A Dintrinsics_arm.cc1124 // or directly dispatch if we have a constant.
1452 // We have already checked in the LocationsBuilder for the constant case.
1558 int32_t constant = src_pos.GetConstant()->AsIntConstant()->GetValue(); local
1559 __ AddConstant(temp1, src, element_size * constant + offset);
1566 int32_t constant = dest_pos.GetConstant()->AsIntConstant()->GetValue(); local
1567 __ AddConstant(temp2, dest, element_size * constant + offset);
1574 int32_t constant = length.GetConstant()->AsIntConstant()->GetValue(); local
1575 __ AddConstant(temp3, temp1, element_size * constant);
H A Dnodes.cc32 // Enable floating-point static evaluation during constant folding
480 void HGraph::InsertConstant(HConstant* constant) { argument
497 entry_block_->AddInstruction(constant);
499 entry_block_->InsertInstructionBefore(constant, insert_before);
504 // For simplicity, don't bother reviving the cached null constant if it is
553 LOG(FATAL) << "Unsupported constant type";
558 void HGraph::CacheFloatConstant(HFloatConstant* constant) { argument
559 int32_t value = bit_cast<int32_t, float>(constant->GetValue());
561 cached_float_constants_.Overwrite(value, constant);
564 void HGraph::CacheDoubleConstant(HDoubleConstant* constant) { argument
[all...]

Completed in 260 milliseconds

12