summaryrefslogtreecommitdiff
path: root/compiler/optimizing/loop_optimization.h
diff options
context:
space:
mode:
authorVladimir Marko <vmarko@google.com>2017-09-21 22:50:39 +0100
committerVladimir Marko <vmarko@google.com>2017-09-25 15:45:01 +0100
commit0ebe0d83138bba1996e9c8007969b5381d972b32 (patch)
treea5ee66ebc5b587ade97e56ac8fc7d832fbbed4af /compiler/optimizing/loop_optimization.h
parente1e347dace0ded83774999bb26c37527dcdb1d5a (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/loop_optimization.h')
-rw-r--r--compiler/optimizing/loop_optimization.h18
1 files changed, 9 insertions, 9 deletions
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.