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/licm_test.cc | |
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/licm_test.cc')
-rw-r--r-- | compiler/optimizing/licm_test.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/compiler/optimizing/licm_test.cc b/compiler/optimizing/licm_test.cc index 8967d7cef2..0617e60cfe 100644 --- a/compiler/optimizing/licm_test.cc +++ b/compiler/optimizing/licm_test.cc @@ -78,7 +78,7 @@ class LICMTest : public CommonCompilerTest { parameter_ = new (&allocator_) HParameterValue(graph_->GetDexFile(), dex::TypeIndex(0), 0, - Primitive::kPrimNot); + DataType::Type::kReference); entry_->AddInstruction(parameter_); int_constant_ = graph_->GetIntConstant(42); float_constant_ = graph_->GetFloatConstant(42.0f); @@ -125,7 +125,7 @@ TEST_F(LICMTest, FieldHoisting) { // Populate the loop with instructions: set/get field with different types. HInstruction* get_field = new (&allocator_) HInstanceFieldGet(parameter_, nullptr, - Primitive::kPrimLong, + DataType::Type::kInt64, MemberOffset(10), false, kUnknownFieldIndex, @@ -134,7 +134,7 @@ TEST_F(LICMTest, FieldHoisting) { 0); loop_body_->InsertInstructionBefore(get_field, loop_body_->GetLastInstruction()); HInstruction* set_field = new (&allocator_) HInstanceFieldSet( - parameter_, int_constant_, nullptr, Primitive::kPrimInt, MemberOffset(20), + parameter_, int_constant_, nullptr, DataType::Type::kInt32, MemberOffset(20), false, kUnknownFieldIndex, kUnknownClassDefIndex, graph_->GetDexFile(), 0); loop_body_->InsertInstructionBefore(set_field, loop_body_->GetLastInstruction()); @@ -152,7 +152,7 @@ TEST_F(LICMTest, NoFieldHoisting) { ScopedNullHandle<mirror::DexCache> dex_cache; HInstruction* get_field = new (&allocator_) HInstanceFieldGet(parameter_, nullptr, - Primitive::kPrimLong, + DataType::Type::kInt64, MemberOffset(10), false, kUnknownFieldIndex, @@ -163,7 +163,7 @@ TEST_F(LICMTest, NoFieldHoisting) { HInstruction* set_field = new (&allocator_) HInstanceFieldSet(parameter_, get_field, nullptr, - Primitive::kPrimLong, + DataType::Type::kInt64, MemberOffset(10), false, kUnknownFieldIndex, @@ -184,10 +184,10 @@ TEST_F(LICMTest, ArrayHoisting) { // Populate the loop with instructions: set/get array with different types. HInstruction* get_array = new (&allocator_) HArrayGet( - parameter_, int_constant_, Primitive::kPrimInt, 0); + parameter_, int_constant_, DataType::Type::kInt32, 0); loop_body_->InsertInstructionBefore(get_array, loop_body_->GetLastInstruction()); HInstruction* set_array = new (&allocator_) HArraySet( - parameter_, int_constant_, float_constant_, Primitive::kPrimFloat, 0); + parameter_, int_constant_, float_constant_, DataType::Type::kFloat32, 0); loop_body_->InsertInstructionBefore(set_array, loop_body_->GetLastInstruction()); EXPECT_EQ(get_array->GetBlock(), loop_body_); @@ -202,10 +202,10 @@ TEST_F(LICMTest, NoArrayHoisting) { // Populate the loop with instructions: set/get array with same types. HInstruction* get_array = new (&allocator_) HArrayGet( - parameter_, int_constant_, Primitive::kPrimFloat, 0); + parameter_, int_constant_, DataType::Type::kFloat32, 0); loop_body_->InsertInstructionBefore(get_array, loop_body_->GetLastInstruction()); HInstruction* set_array = new (&allocator_) HArraySet( - parameter_, get_array, float_constant_, Primitive::kPrimFloat, 0); + parameter_, get_array, float_constant_, DataType::Type::kFloat32, 0); loop_body_->InsertInstructionBefore(set_array, loop_body_->GetLastInstruction()); EXPECT_EQ(get_array->GetBlock(), loop_body_); |