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

Unified Diff: runtime/vm/compiler.cc

Issue 92433002: Merge sin(a), cos(a) into one instruction. TODO: Implement for ARM and MIPS. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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 | « runtime/vm/code_generator.cc ('k') | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
===================================================================
--- runtime/vm/compiler.cc (revision 30823)
+++ runtime/vm/compiler.cc (working copy)
@@ -354,10 +354,8 @@
optimizer.ApplyICData();
DEBUG_ASSERT(flow_graph->VerifyUseLists());
- // Optimize (a << b) & c patterns, merge operations. Must occur before
- // 'SelectRepresentations' which inserts conversion nodes.
- // TODO(srdjan): Moved before inlining until environment use list can
- // be used to detect when shift-left is outside the scope of bit-and.
+ // Optimize (a << b) & c patterns, merge operations.
+ // Run early in order to have more opportunity to optimize left shifts.
optimizer.TryOptimizePatterns();
DEBUG_ASSERT(flow_graph->VerifyUseLists());
@@ -440,6 +438,13 @@
DEBUG_ASSERT(flow_graph->VerifyUseLists());
}
}
+
+ // Optimize (a << b) & c patterns, merge operations.
+ // Run after CSE in order to have more opportunity to merge
+ // instructions that have same inputs.
+ optimizer.TryOptimizePatterns();
+ DEBUG_ASSERT(flow_graph->VerifyUseLists());
+
if (FLAG_loop_invariant_code_motion &&
(function.deoptimization_counter() <
FLAG_deoptimization_counter_licm_threshold)) {
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698