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

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

Issue 2081443002: [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 c6d75e80204b6c83f8490a1b484bf1aed5d3a98d..b31a2c17901793383cbd65aee6561e157b3fb3c1 100644
--- a/src/compiler/register-allocator-verifier.h
+++ b/src/compiler/register-allocator-verifier.h
@@ -99,12 +99,12 @@ class FinalAssessment final : public Assessment {
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 {
Mircea Trofin 2016/06/18 00:39:32 Can you move this line back to where it was, since
bbudge 2016/06/18 22:15:51 I moved it so it would be near the other getter, a
return original_pending_assessment_;
}
@@ -116,17 +116,11 @@ class FinalAssessment final : public Assessment {
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*, OperandAsKeyLess> OperandMap;
+ typedef ZoneMap<InstructionOperand, Assessment*, CompareOperandModuloType>
+ OperandMap;
explicit BlockAssessments(Zone* zone)
: map_(zone), map_for_moves_(zone), zone_(zone) {}
void Drop(InstructionOperand operand) { map_.erase(operand); }
@@ -204,11 +198,11 @@ class RegisterAllocatorVerifier final : public ZoneObject {
class DelayedAssessments : public ZoneObject {
public:
+ typedef ZoneMap<InstructionOperand, int, CompareOperandModuloType>
+ OperandMap;
explicit DelayedAssessments(Zone* zone) : map_(zone) {}
- const ZoneMap<InstructionOperand, int, OperandAsKeyLess>& map() const {
- return map_;
- }
+ const OperandMap& map() const { return map_; }
void AddDelayedAssessment(InstructionOperand op, int vreg) {
auto it = map_.find(op);
@@ -220,7 +214,7 @@ class RegisterAllocatorVerifier final : public ZoneObject {
}
private:
- ZoneMap<InstructionOperand, int, OperandAsKeyLess> map_;
+ OperandMap 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