Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: src/compiler/register-allocator-verifier.h

Issue 2078243002: Revert of [Turbofan] Clean up register allocator and verifier code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/register-allocator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_; }
« no previous file with comments | « src/compiler/register-allocator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698