summaryrefslogtreecommitdiff
path: root/compiler/optimizing/ssa_liveness_analysis.h
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2017-09-21 22:50:39 +0100
committer Vladimir Marko <vmarko@google.com> 2017-09-25 15:45:01 +0100
commit0ebe0d83138bba1996e9c8007969b5381d972b32 (patch)
treea5ee66ebc5b587ade97e56ac8fc7d832fbbed4af /compiler/optimizing/ssa_liveness_analysis.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/ssa_liveness_analysis.h')
-rw-r--r--compiler/optimizing/ssa_liveness_analysis.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/compiler/optimizing/ssa_liveness_analysis.h b/compiler/optimizing/ssa_liveness_analysis.h
index a6681575a2..ec4ab31d61 100644
--- a/compiler/optimizing/ssa_liveness_analysis.h
+++ b/compiler/optimizing/ssa_liveness_analysis.h
@@ -262,16 +262,16 @@ class SafepointPosition : public ArenaObject<kArenaAllocSsaLiveness> {
class LiveInterval : public ArenaObject<kArenaAllocSsaLiveness> {
public:
static LiveInterval* MakeInterval(ArenaAllocator* allocator,
- Primitive::Type type,
+ DataType::Type type,
HInstruction* instruction = nullptr) {
return new (allocator) LiveInterval(allocator, type, instruction);
}
- static LiveInterval* MakeFixedInterval(ArenaAllocator* allocator, int reg, Primitive::Type type) {
+ static LiveInterval* MakeFixedInterval(ArenaAllocator* allocator, int reg, DataType::Type type) {
return new (allocator) LiveInterval(allocator, type, nullptr, true, reg, false);
}
- static LiveInterval* MakeTempInterval(ArenaAllocator* allocator, Primitive::Type type) {
+ static LiveInterval* MakeTempInterval(ArenaAllocator* allocator, DataType::Type type) {
return new (allocator) LiveInterval(allocator, type, nullptr, false, kNoRegister, true);
}
@@ -608,7 +608,7 @@ class LiveInterval : public ArenaObject<kArenaAllocSsaLiveness> {
return parent_->env_uses_;
}
- Primitive::Type GetType() const {
+ DataType::Type GetType() const {
return type_;
}
@@ -783,7 +783,7 @@ class LiveInterval : public ArenaObject<kArenaAllocSsaLiveness> {
size_t NumberOfSpillSlotsNeeded() const;
bool IsFloatingPoint() const {
- return type_ == Primitive::kPrimFloat || type_ == Primitive::kPrimDouble;
+ return type_ == DataType::Type::kFloat32 || type_ == DataType::Type::kFloat64;
}
// Converts the location of the interval to a `Location` object.
@@ -970,7 +970,7 @@ class LiveInterval : public ArenaObject<kArenaAllocSsaLiveness> {
private:
LiveInterval(ArenaAllocator* allocator,
- Primitive::Type type,
+ DataType::Type type,
HInstruction* defined_by = nullptr,
bool is_fixed = false,
int reg = kNoRegister,
@@ -1102,7 +1102,7 @@ class LiveInterval : public ArenaObject<kArenaAllocSsaLiveness> {
EnvUsePositionList env_uses_;
// The instruction type this interval corresponds to.
- const Primitive::Type type_;
+ const DataType::Type type_;
// Live interval that is the result of a split.
LiveInterval* next_sibling_;
@@ -1262,7 +1262,7 @@ class SsaLivenessAnalysis : public ValueObject {
// the exception handler to its location at the top of the catch block.
if (env_holder->CanThrowIntoCatchBlock()) return true;
if (instruction->GetBlock()->GetGraph()->IsDebuggable()) return true;
- return instruction->GetType() == Primitive::kPrimNot;
+ return instruction->GetType() == DataType::Type::kReference;
}
void CheckNoLiveInIrreducibleLoop(const HBasicBlock& block) const {