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

Unified Diff: runtime/vm/flow_graph_optimizer.h

Issue 79653002: Merge TRUNCDIV and MOD into one instruction. Icorporated feedback from CL https://codereview.chromi… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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/flow_graph_optimizer.h
===================================================================
--- runtime/vm/flow_graph_optimizer.h (revision 30485)
+++ runtime/vm/flow_graph_optimizer.h (working copy)
@@ -31,7 +31,8 @@
// Optimize (a << b) & c pattern: if c is a positive Smi or zero, then the
// shift can be a truncating Smi shift-left and result is always Smi.
- void TryOptimizeLeftShiftWithBitAndPattern();
+ // Merge instructions.
+ void TryOptimizePatterns();
// Returns true if any instructions were canonicalized away.
bool Canonicalize();
@@ -203,6 +204,7 @@
void OptimizeLeftShiftBitAndSmiOp(Definition* bit_and_instr,
Definition* left_instr,
Definition* right_instr);
+ void TryMergeTruncDivMod(GrowableArray<BinarySmiOpInstr*>* merge_candidates);
FlowGraph* flow_graph_;

Powered by Google App Engine
This is Rietveld 408576698