summaryrefslogtreecommitdiff
path: root/compiler/optimizing/nodes_x86.h
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2024-10-10 15:48:50 +0200
committer VladimĂ­r Marko <vmarko@google.com> 2024-10-11 09:37:33 +0000
commitd7118f354652f570e0d8a5e6092fff962ae1a25d (patch)
treedec4005916a5a135a28eb5d0d732ea5a4198a0b0 /compiler/optimizing/nodes_x86.h
parentbcb5c19e5e200607fe76294aeb5273ddac5f04ae (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/nodes_x86.h')
-rw-r--r--compiler/optimizing/nodes_x86.h29
1 files changed, 5 insertions, 24 deletions
diff --git a/compiler/optimizing/nodes_x86.h b/compiler/optimizing/nodes_x86.h
index 14d9823355..71c4f7aeeb 100644
--- a/compiler/optimizing/nodes_x86.h
+++ b/compiler/optimizing/nodes_x86.h
@@ -142,22 +142,10 @@ class HX86AndNot final : public HBinaryOperation {
template <typename T> static T Compute(T x, T y) { return ~x & y; }
HConstant* Evaluate(HIntConstant* x, HIntConstant* y) const override {
- return GetBlock()->GetGraph()->GetIntConstant(
- Compute(x->GetValue(), y->GetValue()), GetDexPc());
+ return GetBlock()->GetGraph()->GetIntConstant(Compute(x->GetValue(), y->GetValue()));
}
HConstant* Evaluate(HLongConstant* x, HLongConstant* y) const override {
- return GetBlock()->GetGraph()->GetLongConstant(
- Compute(x->GetValue(), y->GetValue()), GetDexPc());
- }
- HConstant* Evaluate([[maybe_unused]] HFloatConstant* x,
- [[maybe_unused]] HFloatConstant* y) const override {
- LOG(FATAL) << DebugName() << " is not defined for float values";
- UNREACHABLE();
- }
- HConstant* Evaluate([[maybe_unused]] HDoubleConstant* x,
- [[maybe_unused]] HDoubleConstant* y) const override {
- LOG(FATAL) << DebugName() << " is not defined for double values";
- UNREACHABLE();
+ return GetBlock()->GetGraph()->GetLongConstant(Compute(x->GetValue(), y->GetValue()));
}
DECLARE_INSTRUCTION(X86AndNot);
@@ -191,19 +179,12 @@ class HX86MaskOrResetLeastSetBit final : public HUnaryOperation {
}
HConstant* Evaluate(HIntConstant* x) const override {
- return GetBlock()->GetGraph()->GetIntConstant(Compute(x->GetValue()), GetDexPc());
+ return GetBlock()->GetGraph()->GetIntConstant(Compute(x->GetValue()));
}
HConstant* Evaluate(HLongConstant* x) const override {
- return GetBlock()->GetGraph()->GetLongConstant(Compute(x->GetValue()), GetDexPc());
- }
- HConstant* Evaluate([[maybe_unused]] HFloatConstant* x) const override {
- LOG(FATAL) << DebugName() << "is not defined for float values";
- UNREACHABLE();
- }
- HConstant* Evaluate([[maybe_unused]] HDoubleConstant* x) const override {
- LOG(FATAL) << DebugName() << "is not defined for double values";
- UNREACHABLE();
+ return GetBlock()->GetGraph()->GetLongConstant(Compute(x->GetValue()));
}
+
InstructionKind GetOpKind() const { return op_kind_; }
DECLARE_INSTRUCTION(X86MaskOrResetLeastSetBit);