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

Side by Side Diff: src/IceOperand.cpp

Issue 1516753008: Subzero: Use "auto" per (unwritten) auto coding style. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: More <cast> instances without the llvm:: prefix Created 5 years 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/IceInstMIPS32.cpp ('k') | src/IcePhiLoweringImpl.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/IceOperand.cpp - High-level operand implementation -----===// 1 //===- subzero/src/IceOperand.cpp - High-level operand implementation -----===//
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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 322
323 for (Inst &I : Node->getPhis()) { 323 for (Inst &I : Node->getPhis()) {
324 if (I.isDeleted()) 324 if (I.isDeleted())
325 continue; 325 continue;
326 if (Variable *Dest = I.getDest()) { 326 if (Variable *Dest = I.getDest()) {
327 SizeT DestNum = Dest->getIndex(); 327 SizeT DestNum = Dest->getIndex();
328 assert(DestNum < Metadata.size()); 328 assert(DestNum < Metadata.size());
329 Metadata[DestNum].markDef(Kind, &I, Node); 329 Metadata[DestNum].markDef(Kind, &I, Node);
330 } 330 }
331 for (SizeT SrcNum = 0; SrcNum < I.getSrcSize(); ++SrcNum) { 331 for (SizeT SrcNum = 0; SrcNum < I.getSrcSize(); ++SrcNum) {
332 if (const Variable *Var = llvm::dyn_cast<Variable>(I.getSrc(SrcNum))) { 332 if (auto *Var = llvm::dyn_cast<Variable>(I.getSrc(SrcNum))) {
333 SizeT VarNum = Var->getIndex(); 333 SizeT VarNum = Var->getIndex();
334 assert(VarNum < Metadata.size()); 334 assert(VarNum < Metadata.size());
335 constexpr bool IsImplicit = false; 335 constexpr bool IsImplicit = false;
336 Metadata[VarNum].markUse(Kind, &I, Node, IsImplicit); 336 Metadata[VarNum].markUse(Kind, &I, Node, IsImplicit);
337 } 337 }
338 } 338 }
339 } 339 }
340 340
341 for (Inst &I : Node->getInsts()) { 341 for (Inst &I : Node->getInsts()) {
342 if (I.isDeleted()) 342 if (I.isDeleted())
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 if (getType() != IceType_i32 && getType() != IceType_i16 && 547 if (getType() != IceType_i32 && getType() != IceType_i16 &&
548 getType() != IceType_i8) 548 getType() != IceType_i8)
549 return false; 549 return false;
550 // The Following checks if the signed representation of Value is between 550 // The Following checks if the signed representation of Value is between
551 // -Threshold/2 and +Threshold/2 551 // -Threshold/2 and +Threshold/2
552 bool largerThanThreshold = Threshold / 2 + Value >= Threshold; 552 bool largerThanThreshold = Threshold / 2 + Value >= Threshold;
553 return largerThanThreshold; 553 return largerThanThreshold;
554 } 554 }
555 555
556 } // end of namespace Ice 556 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceInstMIPS32.cpp ('k') | src/IcePhiLoweringImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698