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

Side by Side Diff: src/IceInstMIPS32.h

Issue 2289043002: [SubZero] Implement lowerSwitch for MIPS (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addressed review comments Created 4 years, 3 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
« no previous file with comments | « no previous file | src/IceInstMIPS32.cpp » ('j') | src/IceTargetLoweringMIPS32.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceInstMIPS32.h - MIPS32 machine instrs --*- C++ -*-=== // 1 //===- subzero/src/IceInstMIPS32.h - MIPS32 machine instrs --*- C++ -*-=== //
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 /// 9 ///
10 /// \file 10 /// \file
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 } 662 }
663 663
664 static InstMIPS32Br *create(Cfg *Func, CfgNode *TargetTrue, 664 static InstMIPS32Br *create(Cfg *Func, CfgNode *TargetTrue,
665 CfgNode *TargetFalse, Operand *Src0, 665 CfgNode *TargetFalse, Operand *Src0,
666 CondMIPS32::Cond Cond) { 666 CondMIPS32::Cond Cond) {
667 constexpr InstMIPS32Label *NoLabel = nullptr; 667 constexpr InstMIPS32Label *NoLabel = nullptr;
668 return new (Func->allocate<InstMIPS32Br>()) 668 return new (Func->allocate<InstMIPS32Br>())
669 InstMIPS32Br(Func, TargetTrue, TargetFalse, Src0, NoLabel, Cond); 669 InstMIPS32Br(Func, TargetTrue, TargetFalse, Src0, NoLabel, Cond);
670 } 670 }
671 671
672 static InstMIPS32Br *create(Cfg *Func, CfgNode *TargetTrue,
673 CfgNode *TargetFalse, Operand *Src0,
674 Operand *Src1, const InstMIPS32Label *Label,
675 CondMIPS32::Cond Cond) {
676 return new (Func->allocate<InstMIPS32Br>())
677 InstMIPS32Br(Func, TargetTrue, TargetFalse, Src0, Src1, Label, Cond);
678 }
679
672 const CfgNode *getTargetTrue() const { return TargetTrue; } 680 const CfgNode *getTargetTrue() const { return TargetTrue; }
673 const CfgNode *getTargetFalse() const { return TargetFalse; } 681 const CfgNode *getTargetFalse() const { return TargetFalse; }
674 CondMIPS32::Cond getPredicate() const { return Predicate; } 682 CondMIPS32::Cond getPredicate() const { return Predicate; }
675 void setPredicate(CondMIPS32::Cond Pred) { Predicate = Pred; } 683 void setPredicate(CondMIPS32::Cond Pred) { Predicate = Pred; }
676 bool optimizeBranch(const CfgNode *NextNode); 684 bool optimizeBranch(const CfgNode *NextNode);
677 bool isUnconditionalBranch() const override { 685 bool isUnconditionalBranch() const override {
678 return Predicate == CondMIPS32::AL; 686 return Predicate == CondMIPS32::AL;
679 } 687 }
680 bool repointEdges(CfgNode *OldNode, CfgNode *NewNode) override; 688 bool repointEdges(CfgNode *OldNode, CfgNode *NewNode) override;
681 void emit(const Cfg *Func) const override; 689 void emit(const Cfg *Func) const override;
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
904 template <> void InstMIPS32Mtlo::emit(const Cfg *Func) const; 912 template <> void InstMIPS32Mtlo::emit(const Cfg *Func) const;
905 template <> void InstMIPS32Mthi::emit(const Cfg *Func) const; 913 template <> void InstMIPS32Mthi::emit(const Cfg *Func) const;
906 template <> void InstMIPS32Mult::emit(const Cfg *Func) const; 914 template <> void InstMIPS32Mult::emit(const Cfg *Func) const;
907 template <> void InstMIPS32Multu::emit(const Cfg *Func) const; 915 template <> void InstMIPS32Multu::emit(const Cfg *Func) const;
908 template <> void InstMIPS32Lui::emit(const Cfg *Func) const; 916 template <> void InstMIPS32Lui::emit(const Cfg *Func) const;
909 917
910 } // end of namespace MIPS32 918 } // end of namespace MIPS32
911 } // end of namespace Ice 919 } // end of namespace Ice
912 920
913 #endif // SUBZERO_SRC_ICEINSTMIPS32_H 921 #endif // SUBZERO_SRC_ICEINSTMIPS32_H
OLDNEW
« no previous file with comments | « no previous file | src/IceInstMIPS32.cpp » ('j') | src/IceTargetLoweringMIPS32.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698