Index: src/compiler/register-allocator-verifier.h |
diff --git a/src/compiler/register-allocator-verifier.h b/src/compiler/register-allocator-verifier.h |
index b31a2c17901793383cbd65aee6561e157b3fb3c1..c6d75e80204b6c83f8490a1b484bf1aed5d3a98d 100644 |
--- a/src/compiler/register-allocator-verifier.h |
+++ b/src/compiler/register-allocator-verifier.h |
@@ -99,12 +99,12 @@ |
virtual_register_(virtual_register), |
original_pending_assessment_(original_pending) {} |
+ int virtual_register() const { return virtual_register_; } |
static const FinalAssessment* cast(const Assessment* assessment) { |
CHECK(assessment->kind() == Final); |
return static_cast<const FinalAssessment*>(assessment); |
} |
- int virtual_register() const { return virtual_register_; } |
const PendingAssessment* original_pending_assessment() const { |
return original_pending_assessment_; |
} |
@@ -116,11 +116,17 @@ |
DISALLOW_COPY_AND_ASSIGN(FinalAssessment); |
}; |
+struct OperandAsKeyLess { |
+ bool operator()(const InstructionOperand& a, |
+ const InstructionOperand& b) const { |
+ return a.CompareCanonicalized(b); |
+ } |
+}; |
+ |
// Assessments associated with a basic block. |
class BlockAssessments : public ZoneObject { |
public: |
- typedef ZoneMap<InstructionOperand, Assessment*, CompareOperandModuloType> |
- OperandMap; |
+ typedef ZoneMap<InstructionOperand, Assessment*, OperandAsKeyLess> OperandMap; |
explicit BlockAssessments(Zone* zone) |
: map_(zone), map_for_moves_(zone), zone_(zone) {} |
void Drop(InstructionOperand operand) { map_.erase(operand); } |
@@ -198,11 +204,11 @@ |
class DelayedAssessments : public ZoneObject { |
public: |
- typedef ZoneMap<InstructionOperand, int, CompareOperandModuloType> |
- OperandMap; |
explicit DelayedAssessments(Zone* zone) : map_(zone) {} |
- const OperandMap& map() const { return map_; } |
+ const ZoneMap<InstructionOperand, int, OperandAsKeyLess>& map() const { |
+ return map_; |
+ } |
void AddDelayedAssessment(InstructionOperand op, int vreg) { |
auto it = map_.find(op); |
@@ -214,7 +220,7 @@ |
} |
private: |
- OperandMap map_; |
+ ZoneMap<InstructionOperand, int, OperandAsKeyLess> map_; |
}; |
Zone* zone() const { return zone_; } |