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

Side by Side Diff: src/IcePhiLoweringImpl.h

Issue 1341423002: Reflow comments to use the full width. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix spelling and rebase Created 5 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/IceOperand.cpp ('k') | src/IceRNG.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/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
11 /// This contains utilities for targets to lower Phis. 11 /// This contains utilities for targets to lower Phis.
12 /// 12 ///
13 //===----------------------------------------------------------------------===// 13 //===----------------------------------------------------------------------===//
14 14
15 #ifndef SUBZERO_SRC_ICEPHILOWERINGIMPL_H 15 #ifndef SUBZERO_SRC_ICEPHILOWERINGIMPL_H
16 #define SUBZERO_SRC_ICEPHILOWERINGIMPL_H 16 #define SUBZERO_SRC_ICEPHILOWERINGIMPL_H
17 17
18 #include "IceCfg.h" 18 #include "IceCfg.h"
19 #include "IceCfgNode.h" 19 #include "IceCfgNode.h"
20 #include "IceDefs.h" 20 #include "IceDefs.h"
21 #include "IceInst.h" 21 #include "IceInst.h"
22 #include "IceOperand.h" 22 #include "IceOperand.h"
23 23
24 namespace Ice { 24 namespace Ice {
25 namespace PhiLowering { 25 namespace PhiLowering {
26 26
27 // Turn an i64 Phi instruction into a pair of i32 Phi instructions, to 27 /// Turn an i64 Phi instruction into a pair of i32 Phi instructions, to preserve
28 // preserve integrity of liveness analysis. This is needed for 32-bit 28 /// integrity of liveness analysis. This is needed for 32-bit targets. This
29 // targets. This assumes the 32-bit target has loOperand, hiOperand, 29 /// assumes the 32-bit target has loOperand, hiOperand, and legalizeUndef
30 // and legalizeUndef methods. Undef values are also legalized, since 30 /// methods. Undef values are also legalized, since loOperand() and hiOperand()
31 // loOperand() and hiOperand() 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 Variable *DestLo = llvm::cast<Variable>(Target->loOperand(Dest));
41 Variable *DestHi = llvm::cast<Variable>(Target->hiOperand(Dest)); 41 Variable *DestHi = llvm::cast<Variable>(Target->hiOperand(Dest));
(...skipping 10 matching lines...) Expand all
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/IceRNG.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698