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

Unified Diff: runtime/vm/intermediate_language.h

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/flow_graph_type_propagator.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.h
===================================================================
--- runtime/vm/intermediate_language.h (revision 30823)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -6667,6 +6667,8 @@
static intptr_t InputCountFor(MergedMathInstr::Kind kind) {
if (kind == kTruncDivMod) {
return 2;
+ } else if (kind == kSinCos) {
+ return 1;
} else {
UNIMPLEMENTED();
return -1;
@@ -6687,6 +6689,8 @@
virtual bool CanDeoptimize() const {
if (kind_ == kTruncDivMod) {
return true;
+ } else if (kind_ == kSinCos) {
+ return false;
} else {
UNIMPLEMENTED();
return false;
@@ -6696,6 +6700,8 @@
virtual Representation representation() const {
if (kind_ == kTruncDivMod) {
return kTagged;
+ } else if (kind_ == kSinCos) {
+ return kTagged;
} else {
UNIMPLEMENTED();
return kTagged;
@@ -6703,9 +6709,11 @@
}
virtual Representation RequiredInputRepresentation(intptr_t idx) const {
+ ASSERT((0 <= idx) && (idx < InputCount()));
if (kind_ == kTruncDivMod) {
- ASSERT((0 <= idx) && (idx < InputCount()));
return kTagged;
+ } else if (kind_ == kSinCos) {
+ return kUnboxedDouble;
} else {
UNIMPLEMENTED();
return kTagged;
@@ -6714,6 +6722,10 @@
virtual intptr_t DeoptimizationTarget() const { return deopt_id_; }
+ // Returns the result index for one of the merged instructjons
+ static intptr_t ResultIndexOf(MethodRecognizer::Kind kind);
+ static intptr_t ResultIndexOf(Token::Kind token);
+
DECLARE_INSTRUCTION(MergedMath)
// Returns a structure describing the location constraints required
@@ -6737,6 +6749,7 @@
static const char* KindToCString(MergedMathInstr::Kind kind) {
if (kind == kTruncDivMod) return "TruncDivMod";
+ if (kind == kSinCos) return "SinCos";
UNIMPLEMENTED();
return "";
}
« no previous file with comments | « runtime/vm/flow_graph_type_propagator.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698