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

Side by Side Diff: src/IcePhiLoweringImpl.h

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/IceOperand.cpp ('k') | src/IceTargetLowering.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/IcePhiLoweringImpl.h - Phi lowering -----*- C++ -*-===// 1 //===------ subzero/src/IcePhiLoweringImpl.h - Phi lowering -----*- 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 19 matching lines...) Expand all
30 /// methods. Undef values are also legalized, since loOperand() and hiOperand() 30 /// methods. Undef values are also legalized, since loOperand() and hiOperand()
31 /// don't expect Undef input. 31 /// don't expect Undef input.
32 template <class TargetT> 32 template <class TargetT>
33 void prelowerPhis32Bit(TargetT *Target, CfgNode *Node, Cfg *Func) { 33 void prelowerPhis32Bit(TargetT *Target, CfgNode *Node, Cfg *Func) {
34 for (Inst &I : Node->getPhis()) { 34 for (Inst &I : Node->getPhis()) {
35 auto *Phi = llvm::dyn_cast<InstPhi>(&I); 35 auto *Phi = llvm::dyn_cast<InstPhi>(&I);
36 if (Phi->isDeleted()) 36 if (Phi->isDeleted())
37 continue; 37 continue;
38 Variable *Dest = Phi->getDest(); 38 Variable *Dest = Phi->getDest();
39 if (Dest->getType() == IceType_i64) { 39 if (Dest->getType() == IceType_i64) {
40 Variable *DestLo = llvm::cast<Variable>(Target->loOperand(Dest)); 40 auto *DestLo = llvm::cast<Variable>(Target->loOperand(Dest));
41 Variable *DestHi = llvm::cast<Variable>(Target->hiOperand(Dest)); 41 auto *DestHi = llvm::cast<Variable>(Target->hiOperand(Dest));
42 InstPhi *PhiLo = InstPhi::create(Func, Phi->getSrcSize(), DestLo); 42 auto *PhiLo = InstPhi::create(Func, Phi->getSrcSize(), DestLo);
43 InstPhi *PhiHi = InstPhi::create(Func, Phi->getSrcSize(), DestHi); 43 auto *PhiHi = InstPhi::create(Func, Phi->getSrcSize(), DestHi);
44 for (SizeT I = 0; I < Phi->getSrcSize(); ++I) { 44 for (SizeT I = 0; I < Phi->getSrcSize(); ++I) {
45 Operand *Src = Phi->getSrc(I); 45 Operand *Src = Phi->getSrc(I);
46 CfgNode *Label = Phi->getLabel(I); 46 CfgNode *Label = Phi->getLabel(I);
47 Src = Target->legalizeUndef(Src); 47 Src = Target->legalizeUndef(Src);
48 PhiLo->addArgument(Target->loOperand(Src), Label); 48 PhiLo->addArgument(Target->loOperand(Src), Label);
49 PhiHi->addArgument(Target->hiOperand(Src), Label); 49 PhiHi->addArgument(Target->hiOperand(Src), Label);
50 } 50 }
51 Node->getPhis().push_back(PhiLo); 51 Node->getPhis().push_back(PhiLo);
52 Node->getPhis().push_back(PhiHi); 52 Node->getPhis().push_back(PhiHi);
53 Phi->setDeleted(); 53 Phi->setDeleted();
54 } 54 }
55 } 55 }
56 } 56 }
57 57
58 } // end of namespace PhiLowering 58 } // end of namespace PhiLowering
59 } // end of namespace Ice 59 } // end of namespace Ice
60 60
61 #endif // SUBZERO_SRC_ICEPHILOWERINGIMPL_H 61 #endif // SUBZERO_SRC_ICEPHILOWERINGIMPL_H
OLDNEW
« no previous file with comments | « src/IceOperand.cpp ('k') | src/IceTargetLowering.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698