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

Side by Side Diff: src/IceInstARM32.h

Issue 1392383003: Subzero: Consider all instruction variables for register preference. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 5 years, 2 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/IceInst.cpp ('k') | src/IceInstVarIter.h » ('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/IceInstARM32.h - ARM32 machine instructions --*- C++ -*-===// 1 //===- subzero/src/IceInstARM32.h - ARM32 machine 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 /// \file 10 /// \file
(...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1145 public: 1145 public:
1146 static InstARM32Mov *create(Cfg *Func, Variable *Dest, Operand *Src, 1146 static InstARM32Mov *create(Cfg *Func, Variable *Dest, Operand *Src,
1147 CondARM32::Cond Predicate) { 1147 CondARM32::Cond Predicate) {
1148 return new (Func->allocate<InstARM32Mov>()) 1148 return new (Func->allocate<InstARM32Mov>())
1149 InstARM32Mov(Func, Dest, Src, Predicate); 1149 InstARM32Mov(Func, Dest, Src, Predicate);
1150 } 1150 }
1151 bool isRedundantAssign() const override { 1151 bool isRedundantAssign() const override {
1152 return !isMultiDest() && !isMultiSource() && 1152 return !isMultiDest() && !isMultiSource() &&
1153 checkForRedundantAssign(getDest(), getSrc(0)); 1153 checkForRedundantAssign(getDest(), getSrc(0));
1154 } 1154 }
1155 bool isSimpleAssign() const override { return true; } 1155 bool isVarAssign() const override { return llvm::isa<Variable>(getSrc(0)); }
1156 void emit(const Cfg *Func) const override; 1156 void emit(const Cfg *Func) const override;
1157 void emitIAS(const Cfg *Func) const override; 1157 void emitIAS(const Cfg *Func) const override;
1158 void dump(const Cfg *Func) const override; 1158 void dump(const Cfg *Func) const override;
1159 static bool classof(const Inst *Inst) { return isClassof(Inst, Mov); } 1159 static bool classof(const Inst *Inst) { return isClassof(Inst, Mov); }
1160 1160
1161 bool isMultiDest() const { return DestHi != nullptr; } 1161 bool isMultiDest() const { return DestHi != nullptr; }
1162 1162
1163 bool isMultiSource() const { 1163 bool isMultiSource() const {
1164 assert(getSrcSize() == 1 || getSrcSize() == 2); 1164 assert(getSrcSize() == 1 || getSrcSize() == 2);
1165 return getSrcSize() == 2; 1165 return getSrcSize() == 2;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 // default implementations. Without this, there is the possibility of ODR 1261 // default implementations. Without this, there is the possibility of ODR
1262 // violations and link errors. 1262 // violations and link errors.
1263 1263
1264 template <> void InstARM32Ldr::emit(const Cfg *Func) const; 1264 template <> void InstARM32Ldr::emit(const Cfg *Func) const;
1265 template <> void InstARM32Movw::emit(const Cfg *Func) const; 1265 template <> void InstARM32Movw::emit(const Cfg *Func) const;
1266 template <> void InstARM32Movt::emit(const Cfg *Func) const; 1266 template <> void InstARM32Movt::emit(const Cfg *Func) const;
1267 1267
1268 } // end of namespace Ice 1268 } // end of namespace Ice
1269 1269
1270 #endif // SUBZERO_SRC_ICEINSTARM32_H 1270 #endif // SUBZERO_SRC_ICEINSTARM32_H
OLDNEW
« no previous file with comments | « src/IceInst.cpp ('k') | src/IceInstVarIter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698