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

Side by Side Diff: src/IceInst.h

Issue 476323004: Start adding an integrated assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: make fixups part of address Created 6 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 | « src/IceGlobalContext.cpp ('k') | src/IceInst.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceInst.h - High-level instructions ----------*- C++ -*-===// 1 //===- subzero/src/IceInst.h - High-level instructions ----------*- 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 // This file declares the Inst class and its target-independent 10 // This file declares the Inst class and its target-independent
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // Updates the status of the Variables contained within the 95 // Updates the status of the Variables contained within the
96 // instruction. In particular, it marks where the Dest variable is 96 // instruction. In particular, it marks where the Dest variable is
97 // first assigned, and it tracks whether variables are live across 97 // first assigned, and it tracks whether variables are live across
98 // basic blocks, i.e. used in a different block from their definition. 98 // basic blocks, i.e. used in a different block from their definition.
99 void updateVars(CfgNode *Node); 99 void updateVars(CfgNode *Node);
100 100
101 void livenessLightweight(llvm::BitVector &Live); 101 void livenessLightweight(llvm::BitVector &Live);
102 void liveness(InstNumberT InstNumber, llvm::BitVector &Live, 102 void liveness(InstNumberT InstNumber, llvm::BitVector &Live,
103 Liveness *Liveness, const CfgNode *Node); 103 Liveness *Liveness, const CfgNode *Node);
104 virtual void emit(const Cfg *Func) const; 104 virtual void emit(const Cfg *Func) const;
105 virtual void emitIAS(const Cfg *Func) const;
105 virtual void dump(const Cfg *Func) const; 106 virtual void dump(const Cfg *Func) const;
106 virtual void dumpExtras(const Cfg *Func) const; 107 virtual void dumpExtras(const Cfg *Func) const;
107 void dumpDecorated(const Cfg *Func) const; 108 void dumpDecorated(const Cfg *Func) const;
108 void emitSources(const Cfg *Func) const; 109 void emitSources(const Cfg *Func) const;
109 void dumpSources(const Cfg *Func) const; 110 void dumpSources(const Cfg *Func) const;
110 void dumpDest(const Cfg *Func) const; 111 void dumpDest(const Cfg *Func) const;
111 virtual bool isRedundantAssign() const { return false; } 112 virtual bool isRedundantAssign() const { return false; }
112 113
113 virtual ~Inst() {} 114 virtual ~Inst() {}
114 115
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 739
739 // This instruction is ignored if Linked->isDeleted() is true. 740 // This instruction is ignored if Linked->isDeleted() is true.
740 const Inst *Linked; 741 const Inst *Linked;
741 }; 742 };
742 743
743 // The Target instruction is the base class for all target-specific 744 // The Target instruction is the base class for all target-specific
744 // instructions. 745 // instructions.
745 class InstTarget : public Inst { 746 class InstTarget : public Inst {
746 public: 747 public:
747 virtual void emit(const Cfg *Func) const = 0; 748 virtual void emit(const Cfg *Func) const = 0;
749 virtual void emitIAS(const Cfg *Func) const = 0;
748 virtual void dump(const Cfg *Func) const; 750 virtual void dump(const Cfg *Func) const;
749 virtual void dumpExtras(const Cfg *Func) const; 751 virtual void dumpExtras(const Cfg *Func) const;
750 static bool classof(const Inst *Inst) { return Inst->getKind() >= Target; } 752 static bool classof(const Inst *Inst) { return Inst->getKind() >= Target; }
751 753
752 protected: 754 protected:
753 InstTarget(Cfg *Func, InstKind Kind, SizeT MaxSrcs, Variable *Dest) 755 InstTarget(Cfg *Func, InstKind Kind, SizeT MaxSrcs, Variable *Dest)
754 : Inst(Func, Kind, MaxSrcs, Dest) { 756 : Inst(Func, Kind, MaxSrcs, Dest) {
755 assert(Kind >= Target); 757 assert(Kind >= Target);
756 } 758 }
757 InstTarget(const InstTarget &) LLVM_DELETED_FUNCTION; 759 InstTarget(const InstTarget &) LLVM_DELETED_FUNCTION;
758 InstTarget &operator=(const InstTarget &) LLVM_DELETED_FUNCTION; 760 InstTarget &operator=(const InstTarget &) LLVM_DELETED_FUNCTION;
759 virtual ~InstTarget() {} 761 virtual ~InstTarget() {}
760 }; 762 };
761 763
762 } // end of namespace Ice 764 } // end of namespace Ice
763 765
764 #endif // SUBZERO_SRC_ICEINST_H 766 #endif // SUBZERO_SRC_ICEINST_H
OLDNEW
« no previous file with comments | « src/IceGlobalContext.cpp ('k') | src/IceInst.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698