diff options
author | 2024-10-10 15:48:50 +0200 | |
---|---|---|
committer | 2024-10-11 09:37:33 +0000 | |
commit | d7118f354652f570e0d8a5e6092fff962ae1a25d (patch) | |
tree | dec4005916a5a135a28eb5d0d732ea5a4198a0b0 /compiler/optimizing/instruction_simplifier.cc | |
parent | bcb5c19e5e200607fe76294aeb5273ddac5f04ae (diff) |
Do not record dex PC in constant HIR.
Due to the dedplication of constants, the dex PC can be
useless or even misleading.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: I501abc3cca920415b3118e92b06a01b173b2406a
Diffstat (limited to 'compiler/optimizing/instruction_simplifier.cc')
-rw-r--r-- | compiler/optimizing/instruction_simplifier.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/optimizing/instruction_simplifier.cc b/compiler/optimizing/instruction_simplifier.cc index cd2371d90c..d12e7e7af0 100644 --- a/compiler/optimizing/instruction_simplifier.cc +++ b/compiler/optimizing/instruction_simplifier.cc @@ -1840,7 +1840,7 @@ static HInstruction* CreateUnsignedConditionReplacement(ArenaAllocator* allocato // unsigned(-1) < 0 -> False // 0 < 0 -> False // 1 < 0 -> False - return block->GetGraph()->GetConstant(DataType::Type::kBool, 0, cond->GetDexPc()); + return block->GetGraph()->GetConstant(DataType::Type::kBool, 0); case HInstruction::kBelowOrEqual: // BelowOrEqual(Compare(x, y), 0) transforms into Equal(x, y) // unsigned(-1) <= 0 -> False @@ -1858,7 +1858,7 @@ static HInstruction* CreateUnsignedConditionReplacement(ArenaAllocator* allocato // unsigned(-1) >= 0 -> True // 0 >= 0 -> True // 1 >= 0 -> True - return block->GetGraph()->GetConstant(DataType::Type::kBool, 1, cond->GetDexPc()); + return block->GetGraph()->GetConstant(DataType::Type::kBool, 1); default: LOG(FATAL) << "Unknown ConditionType " << cond->GetKind(); UNREACHABLE(); @@ -1961,12 +1961,12 @@ static HInstruction* CheckSignedToUnsignedCompareConversion(HInstruction* operan HIntConstant* int_constant = constant->AsIntConstant(); int32_t old_value = int_constant->GetValue(); int32_t new_value = old_value - std::numeric_limits<int32_t>::min(); - return operand->GetBlock()->GetGraph()->GetIntConstant(new_value, constant->GetDexPc()); + return operand->GetBlock()->GetGraph()->GetIntConstant(new_value); } else if (constant->IsLongConstant()) { HLongConstant* long_constant = constant->AsLongConstant(); int64_t old_value = long_constant->GetValue(); int64_t new_value = old_value - std::numeric_limits<int64_t>::min(); - return operand->GetBlock()->GetGraph()->GetLongConstant(new_value, constant->GetDexPc()); + return operand->GetBlock()->GetGraph()->GetLongConstant(new_value); } else { return nullptr; } |