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

Side by Side Diff: runtime/vm/intermediate_language.h

Issue 23144003: Fold Box(Unbox(v)) and Unbox(Box(v)) for Float32x4 and Uint32x4 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_
6 #define VM_INTERMEDIATE_LANGUAGE_H_ 6 #define VM_INTERMEDIATE_LANGUAGE_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 4384 matching lines...) Expand 10 before | Expand all | Expand 10 after
4395 DECLARE_INSTRUCTION(BoxFloat32x4) 4395 DECLARE_INSTRUCTION(BoxFloat32x4)
4396 virtual CompileType ComputeType() const; 4396 virtual CompileType ComputeType() const;
4397 4397
4398 virtual bool AllowsCSE() const { return true; } 4398 virtual bool AllowsCSE() const { return true; }
4399 virtual EffectSet Effects() const { return EffectSet::None(); } 4399 virtual EffectSet Effects() const { return EffectSet::None(); }
4400 virtual EffectSet Dependencies() const { return EffectSet::None(); } 4400 virtual EffectSet Dependencies() const { return EffectSet::None(); }
4401 virtual bool AttributesEqual(Instruction* other) const { return true; } 4401 virtual bool AttributesEqual(Instruction* other) const { return true; }
4402 4402
4403 virtual bool MayThrow() const { return false; } 4403 virtual bool MayThrow() const { return false; }
4404 4404
4405 Definition* Canonicalize(FlowGraph* flow_graph);
4406
4405 private: 4407 private:
4406 DISALLOW_COPY_AND_ASSIGN(BoxFloat32x4Instr); 4408 DISALLOW_COPY_AND_ASSIGN(BoxFloat32x4Instr);
4407 }; 4409 };
4408 4410
4409 4411
4410 class BoxUint32x4Instr : public TemplateDefinition<1> { 4412 class BoxUint32x4Instr : public TemplateDefinition<1> {
4411 public: 4413 public:
4412 explicit BoxUint32x4Instr(Value* value) { 4414 explicit BoxUint32x4Instr(Value* value) {
4413 SetInputAt(0, value); 4415 SetInputAt(0, value);
4414 } 4416 }
(...skipping 10 matching lines...) Expand all
4425 DECLARE_INSTRUCTION(BoxUint32x4) 4427 DECLARE_INSTRUCTION(BoxUint32x4)
4426 virtual CompileType ComputeType() const; 4428 virtual CompileType ComputeType() const;
4427 4429
4428 virtual bool AllowsCSE() const { return true; } 4430 virtual bool AllowsCSE() const { return true; }
4429 virtual EffectSet Effects() const { return EffectSet::None(); } 4431 virtual EffectSet Effects() const { return EffectSet::None(); }
4430 virtual EffectSet Dependencies() const { return EffectSet::None(); } 4432 virtual EffectSet Dependencies() const { return EffectSet::None(); }
4431 virtual bool AttributesEqual(Instruction* other) const { return true; } 4433 virtual bool AttributesEqual(Instruction* other) const { return true; }
4432 4434
4433 virtual bool MayThrow() const { return false; } 4435 virtual bool MayThrow() const { return false; }
4434 4436
4437 Definition* Canonicalize(FlowGraph* flow_graph);
4438
4435 private: 4439 private:
4436 DISALLOW_COPY_AND_ASSIGN(BoxUint32x4Instr); 4440 DISALLOW_COPY_AND_ASSIGN(BoxUint32x4Instr);
4437 }; 4441 };
4438 4442
4439 4443
4440 class BoxIntegerInstr : public TemplateDefinition<1> { 4444 class BoxIntegerInstr : public TemplateDefinition<1> {
4441 public: 4445 public:
4442 explicit BoxIntegerInstr(Value* value) { 4446 explicit BoxIntegerInstr(Value* value) {
4443 SetInputAt(0, value); 4447 SetInputAt(0, value);
4444 } 4448 }
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
4522 DECLARE_INSTRUCTION(UnboxFloat32x4) 4526 DECLARE_INSTRUCTION(UnboxFloat32x4)
4523 virtual CompileType ComputeType() const; 4527 virtual CompileType ComputeType() const;
4524 4528
4525 virtual bool AllowsCSE() const { return true; } 4529 virtual bool AllowsCSE() const { return true; }
4526 virtual EffectSet Effects() const { return EffectSet::None(); } 4530 virtual EffectSet Effects() const { return EffectSet::None(); }
4527 virtual EffectSet Dependencies() const { return EffectSet::None(); } 4531 virtual EffectSet Dependencies() const { return EffectSet::None(); }
4528 virtual bool AttributesEqual(Instruction* other) const { return true; } 4532 virtual bool AttributesEqual(Instruction* other) const { return true; }
4529 4533
4530 virtual bool MayThrow() const { return false; } 4534 virtual bool MayThrow() const { return false; }
4531 4535
4536 Definition* Canonicalize(FlowGraph* flow_graph);
4537
4532 private: 4538 private:
4533 DISALLOW_COPY_AND_ASSIGN(UnboxFloat32x4Instr); 4539 DISALLOW_COPY_AND_ASSIGN(UnboxFloat32x4Instr);
4534 }; 4540 };
4535 4541
4536 4542
4537 class UnboxUint32x4Instr : public TemplateDefinition<1> { 4543 class UnboxUint32x4Instr : public TemplateDefinition<1> {
4538 public: 4544 public:
4539 UnboxUint32x4Instr(Value* value, intptr_t deopt_id) { 4545 UnboxUint32x4Instr(Value* value, intptr_t deopt_id) {
4540 SetInputAt(0, value); 4546 SetInputAt(0, value);
4541 deopt_id_ = deopt_id; 4547 deopt_id_ = deopt_id;
(...skipping 12 matching lines...) Expand all
4554 virtual bool AllowsCSE() const { return true; } 4560 virtual bool AllowsCSE() const { return true; }
4555 virtual EffectSet Effects() const { return EffectSet::None(); } 4561 virtual EffectSet Effects() const { return EffectSet::None(); }
4556 virtual EffectSet Dependencies() const { return EffectSet::None(); } 4562 virtual EffectSet Dependencies() const { return EffectSet::None(); }
4557 virtual bool AttributesEqual(Instruction* other) const { return true; } 4563 virtual bool AttributesEqual(Instruction* other) const { return true; }
4558 4564
4559 DECLARE_INSTRUCTION(UnboxUint32x4) 4565 DECLARE_INSTRUCTION(UnboxUint32x4)
4560 virtual CompileType ComputeType() const; 4566 virtual CompileType ComputeType() const;
4561 4567
4562 virtual bool MayThrow() const { return false; } 4568 virtual bool MayThrow() const { return false; }
4563 4569
4570 Definition* Canonicalize(FlowGraph* flow_graph);
4571
4564 private: 4572 private:
4565 DISALLOW_COPY_AND_ASSIGN(UnboxUint32x4Instr); 4573 DISALLOW_COPY_AND_ASSIGN(UnboxUint32x4Instr);
4566 }; 4574 };
4567 4575
4568 4576
4569 class UnboxIntegerInstr : public TemplateDefinition<1> { 4577 class UnboxIntegerInstr : public TemplateDefinition<1> {
4570 public: 4578 public:
4571 UnboxIntegerInstr(Value* value, intptr_t deopt_id) { 4579 UnboxIntegerInstr(Value* value, intptr_t deopt_id) {
4572 SetInputAt(0, value); 4580 SetInputAt(0, value);
4573 deopt_id_ = deopt_id; 4581 deopt_id_ = deopt_id;
(...skipping 2159 matching lines...) Expand 10 before | Expand all | Expand 10 after
6733 ForwardInstructionIterator* current_iterator_; 6741 ForwardInstructionIterator* current_iterator_;
6734 6742
6735 private: 6743 private:
6736 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 6744 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
6737 }; 6745 };
6738 6746
6739 6747
6740 } // namespace dart 6748 } // namespace dart
6741 6749
6742 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 6750 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698