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

Unified Diff: courgette/adjustment_method.cc

Issue 2793153003: [Courgette] Refactor: Store Label Annotation in AssemblyProgram for patch generation. (Closed)
Patch Set: Rename *_label_annotation to *_label_annotations. Created 3 years, 8 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 | « no previous file | courgette/adjustment_method_2.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: courgette/adjustment_method.cc
diff --git a/courgette/adjustment_method.cc b/courgette/adjustment_method.cc
index d6718bc8d919add050c364381bd038c3c34d67ee..c1b4131a92aed9c726b9f4e320952fa9264e4496 100644
--- a/courgette/adjustment_method.cc
+++ b/courgette/adjustment_method.cc
@@ -14,7 +14,6 @@
#include <string>
#include <vector>
-#include "base/bind.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/strings/string_number_conversions.h"
@@ -595,16 +594,10 @@ class GraphAdjuster : public AdjustmentMethod {
private:
void CollectTraces(const AssemblyProgram* program, Trace* abs32, Trace* rel32,
bool is_model) {
- AssemblyProgram::LabelHandler abs32_handler =
- base::Bind(&GraphAdjuster::ReferenceLabel, base::Unretained(this),
- abs32, is_model);
- AssemblyProgram::LabelHandler rel32_handler =
- base::Bind(&GraphAdjuster::ReferenceLabel, base::Unretained(this),
- rel32, is_model);
-
- program->HandleInstructionLabels({{ABS32, abs32_handler},
- {REL32, rel32_handler},
- {REL32ARM, rel32_handler}});
+ for (Label* label : program->abs32_label_annotations())
+ ReferenceLabel(abs32, is_model, label);
+ for (Label* label : program->rel32_label_annotations())
+ ReferenceLabel(rel32, is_model, label);
// TODO(sra): we could simply append all the labels in index order to
// incorporate some costing for entropy (bigger deltas) that will be
« no previous file with comments | « no previous file | courgette/adjustment_method_2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698