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

Unified Diff: runtime/vm/intermediate_language.h

Issue 262823009: Convert BinadryDoubleOp to MathUnaryInstr double-square if both inputs are the same. Uses less regi… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | « runtime/vm/il_printer.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 35712)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -5069,14 +5069,21 @@
class MathUnaryInstr : public TemplateDefinition<1> {
public:
- MathUnaryInstr(MethodRecognizer::Kind kind, Value* value, intptr_t deopt_id)
+ enum MathUnaryKind {
+ kIllegal,
+ kSin,
+ kCos,
+ kSqrt,
+ kDoubleSquare,
+ };
+ MathUnaryInstr(MathUnaryKind kind, Value* value, intptr_t deopt_id)
: kind_(kind) {
SetInputAt(0, value);
deopt_id_ = deopt_id;
}
Value* value() const { return inputs_[0]; }
- MethodRecognizer::Kind kind() const { return kind_; }
+ MathUnaryKind kind() const { return kind_; }
const RuntimeEntry& TargetFunction() const;
virtual void PrintOperandsTo(BufferFormatter* f) const;
@@ -5112,8 +5119,10 @@
Definition* Canonicalize(FlowGraph* flow_graph);
+ static const char* KindToCString(MathUnaryKind kind);
+
private:
- const MethodRecognizer::Kind kind_;
+ const MathUnaryKind kind_;
DISALLOW_COPY_AND_ASSIGN(MathUnaryInstr);
};
« no previous file with comments | « runtime/vm/il_printer.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698