diff options
author | 2017-09-21 22:50:39 +0100 | |
---|---|---|
committer | 2017-09-25 15:45:01 +0100 | |
commit | 0ebe0d83138bba1996e9c8007969b5381d972b32 (patch) | |
tree | a5ee66ebc5b587ade97e56ac8fc7d832fbbed4af /compiler/optimizing/induction_var_analysis.h | |
parent | e1e347dace0ded83774999bb26c37527dcdb1d5a (diff) |
ART: Introduce compiler data type.
Replace most uses of the runtime's Primitive in compiler
with a new class DataType. This prepares for introducing
new types, such as Uint8, that the runtime does not need
to know about.
Test: m test-art-host-gtest
Test: testrunner.py --host
Bug: 23964345
Change-Id: Iec2ad82454eec678fffcd8279a9746b90feb9b0c
Diffstat (limited to 'compiler/optimizing/induction_var_analysis.h')
-rw-r--r-- | compiler/optimizing/induction_var_analysis.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/compiler/optimizing/induction_var_analysis.h b/compiler/optimizing/induction_var_analysis.h index 39b39cdf55..421b3ab9d0 100644 --- a/compiler/optimizing/induction_var_analysis.h +++ b/compiler/optimizing/induction_var_analysis.h @@ -103,7 +103,7 @@ class HInductionVarAnalysis : public HOptimization { InductionInfo* a, InductionInfo* b, HInstruction* f, - Primitive::Type t) + DataType::Type t) : induction_class(ic), operation(op), op_a(a), @@ -115,7 +115,7 @@ class HInductionVarAnalysis : public HOptimization { InductionInfo* op_a; InductionInfo* op_b; HInstruction* fetch; - Primitive::Type type; // precision of operation + DataType::Type type; // precision of operation }; bool IsVisitedNode(HInstruction* instruction) const { @@ -136,7 +136,7 @@ class HInductionVarAnalysis : public HOptimization { InductionInfo* CreateTripCount(InductionOp op, InductionInfo* a, InductionInfo* b, - Primitive::Type type) { + DataType::Type type) { DCHECK(a != nullptr && b != nullptr); return new (graph_->GetArena()) InductionInfo(kInvariant, op, a, b, nullptr, type); } @@ -146,7 +146,7 @@ class HInductionVarAnalysis : public HOptimization { InductionInfo* a, InductionInfo* b, HInstruction* f, - Primitive::Type type) { + DataType::Type type) { DCHECK(a != nullptr && b != nullptr); return new (graph_->GetArena()) InductionInfo(ic, op, a, b, f, type); } @@ -167,7 +167,7 @@ class HInductionVarAnalysis : public HOptimization { InductionInfo* TransferAddSub(InductionInfo* a, InductionInfo* b, InductionOp op); InductionInfo* TransferNeg(InductionInfo* a); InductionInfo* TransferMul(InductionInfo* a, InductionInfo* b); - InductionInfo* TransferConversion(InductionInfo* a, Primitive::Type from, Primitive::Type to); + InductionInfo* TransferConversion(InductionInfo* a, DataType::Type from, DataType::Type to); // Solvers. InductionInfo* SolvePhi(HInstruction* phi, size_t input_index, size_t adjust_input_size); @@ -200,30 +200,30 @@ class HInductionVarAnalysis : public HOptimization { void VisitCondition(HLoopInformation* loop, InductionInfo* a, InductionInfo* b, - Primitive::Type type, + DataType::Type type, IfCondition cmp); void VisitTripCount(HLoopInformation* loop, InductionInfo* lower_expr, InductionInfo* upper_expr, InductionInfo* stride, int64_t stride_value, - Primitive::Type type, + DataType::Type type, IfCondition cmp); bool IsTaken(InductionInfo* lower_expr, InductionInfo* upper_expr, IfCondition cmp); bool IsFinite(InductionInfo* upper_expr, int64_t stride_value, - Primitive::Type type, + DataType::Type type, IfCondition cmp); bool FitsNarrowerControl(InductionInfo* lower_expr, InductionInfo* upper_expr, int64_t stride_value, - Primitive::Type type, + DataType::Type type, IfCondition cmp); // Assign and lookup. void AssignInfo(HLoopInformation* loop, HInstruction* instruction, InductionInfo* info); InductionInfo* LookupInfo(HLoopInformation* loop, HInstruction* instruction); - InductionInfo* CreateConstant(int64_t value, Primitive::Type type); + InductionInfo* CreateConstant(int64_t value, DataType::Type type); InductionInfo* CreateSimplifiedInvariant(InductionOp op, InductionInfo* a, InductionInfo* b); HInstruction* GetShiftConstant(HLoopInformation* loop, HInstruction* instruction, @@ -250,7 +250,7 @@ class HInductionVarAnalysis : public HOptimization { ArenaSafeMap<HInstruction*, NodeInfo> map_; ArenaVector<HInstruction*> scc_; ArenaSafeMap<HInstruction*, InductionInfo*> cycle_; - Primitive::Type type_; + DataType::Type type_; /** * Maintains the results of the analysis as a mapping from loops to a mapping from instructions |