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

Unified Diff: runtime/vm/intermediate_language.h

Issue 12540002: Implement a branch optimization pass. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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
Index: runtime/vm/intermediate_language.h
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index 5c2a4390f21d7eaeac42413de41b91ef82c847f3..afde121898bcd101d41b1499dbee2116c3010f04 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -563,7 +563,7 @@ class Instruction : public ZoneAllocated {
void set_next(Instruction* instr) {
ASSERT(!IsGraphEntry());
ASSERT(!IsReturn());
- ASSERT(!IsControl());
+ ASSERT(!IsControl() || (instr == NULL));
ASSERT(!IsPhi());
ASSERT(instr == NULL || !instr->IsBlockEntry());
// TODO(fschneider): Also add Throw and ReThrow to the list of instructions
@@ -1312,6 +1312,7 @@ class Definition : public Instruction {
bool HasUses() const {
return (input_use_list_ != NULL) || (env_use_list_ != NULL);
}
+ bool HasOnlyUse(Value* use) const;
Value* input_use_list() const { return input_use_list_; }
void set_input_use_list(Value* head) { input_use_list_ = head; }
@@ -2033,6 +2034,8 @@ class ConstantInstr : public TemplateDefinition<0> {
DECLARE_INSTRUCTION(Constant)
virtual CompileType ComputeType() const;
+ virtual Definition* Canonicalize(FlowGraphOptimizer* optimizer);
+
const Object& value() const { return value_; }
virtual void PrintOperandsTo(BufferFormatter* f) const;

Powered by Google App Engine
This is Rietveld 408576698