From 0ebe0d83138bba1996e9c8007969b5381d972b32 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Thu, 21 Sep 2017 22:50:39 +0100 Subject: 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 --- compiler/optimizing/loop_optimization.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'compiler/optimizing/loop_optimization.h') diff --git a/compiler/optimizing/loop_optimization.h b/compiler/optimizing/loop_optimization.h index ae2ea76f47..6e6e3873f9 100644 --- a/compiler/optimizing/loop_optimization.h +++ b/compiler/optimizing/loop_optimization.h @@ -91,7 +91,7 @@ class HLoopOptimization : public HOptimization { * Representation of a unit-stride array reference. */ struct ArrayReference { - ArrayReference(HInstruction* b, HInstruction* o, Primitive::Type t, bool l) + ArrayReference(HInstruction* b, HInstruction* o, DataType::Type t, bool l) : base(b), offset(o), type(t), lhs(l) { } bool operator<(const ArrayReference& other) const { return @@ -103,7 +103,7 @@ class HLoopOptimization : public HOptimization { } HInstruction* base; // base address HInstruction* offset; // offset + i - Primitive::Type type; // component type + DataType::Type type; // component type bool lhs; // def/use }; @@ -147,36 +147,36 @@ class HLoopOptimization : public HOptimization { bool VectorizeUse(LoopNode* node, HInstruction* instruction, bool generate_code, - Primitive::Type type, + DataType::Type type, uint64_t restrictions); - bool TrySetVectorType(Primitive::Type type, /*out*/ uint64_t* restrictions); + bool TrySetVectorType(DataType::Type type, /*out*/ uint64_t* restrictions); bool TrySetVectorLength(uint32_t length); - void GenerateVecInv(HInstruction* org, Primitive::Type type); + void GenerateVecInv(HInstruction* org, DataType::Type type); void GenerateVecSub(HInstruction* org, HInstruction* offset); void GenerateVecMem(HInstruction* org, HInstruction* opa, HInstruction* opb, HInstruction* offset, - Primitive::Type type); + DataType::Type type); void GenerateVecReductionPhi(HPhi* phi); void GenerateVecReductionPhiInputs(HPhi* phi, HInstruction* reduction); HInstruction* ReduceAndExtractIfNeeded(HInstruction* instruction); void GenerateVecOp(HInstruction* org, HInstruction* opa, HInstruction* opb, - Primitive::Type type, + DataType::Type type, bool is_unsigned = false); // Vectorization idioms. bool VectorizeHalvingAddIdiom(LoopNode* node, HInstruction* instruction, bool generate_code, - Primitive::Type type, + DataType::Type type, uint64_t restrictions); bool VectorizeSADIdiom(LoopNode* node, HInstruction* instruction, bool generate_code, - Primitive::Type type, + DataType::Type type, uint64_t restrictions); // Vectorization heuristics. -- cgit v1.2.3-59-g8ed1b