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

Side by Side Diff: src/IceLiveness.h

Issue 1221643012: Subzero: Add -Wshadow to the build. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 5 years, 5 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
OLDNEW
1 //===- subzero/src/IceLiveness.h - Liveness analysis ------------*- C++ -*-===// 1 //===- subzero/src/IceLiveness.h - Liveness analysis ------------*- 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // LivenessNode::NumGlobals. 54 // LivenessNode::NumGlobals.
55 LivenessBV LiveIn, LiveOut; 55 LivenessBV LiveIn, LiveOut;
56 // LiveBegin and LiveEnd track the instruction numbers of the start 56 // LiveBegin and LiveEnd track the instruction numbers of the start
57 // and end of each variable's live range within this block. The 57 // and end of each variable's live range within this block. The
58 // index/key of each element is less than NumLocals + 58 // index/key of each element is less than NumLocals +
59 // Liveness::NumGlobals. 59 // Liveness::NumGlobals.
60 LiveBeginEndMap LiveBegin, LiveEnd; 60 LiveBeginEndMap LiveBegin, LiveEnd;
61 }; 61 };
62 62
63 public: 63 public:
64 Liveness(Cfg *Func, LivenessMode Mode) : Func(Func), Mode(Mode) {} 64 Liveness(Cfg *MyFunc, LivenessMode MyMode) : Func(MyFunc), Mode(MyMode) {}
65 void init(); 65 void init();
66 Cfg *getFunc() const { return Func; } 66 Cfg *getFunc() const { return Func; }
67 LivenessMode getMode() const { return Mode; } 67 LivenessMode getMode() const { return Mode; }
68 Variable *getVariable(SizeT LiveIndex, const CfgNode *Node) const; 68 Variable *getVariable(SizeT LiveIndex, const CfgNode *Node) const;
69 SizeT getLiveIndex(SizeT VarIndex) const { return VarToLiveMap[VarIndex]; } 69 SizeT getLiveIndex(SizeT VarIndex) const { return VarToLiveMap[VarIndex]; }
70 SizeT getNumGlobalVars() const { return NumGlobals; } 70 SizeT getNumGlobalVars() const { return NumGlobals; }
71 SizeT getNumVarsInNode(const CfgNode *Node) const { 71 SizeT getNumVarsInNode(const CfgNode *Node) const {
72 return NumGlobals + Nodes[Node->getIndex()].NumLocals; 72 return NumGlobals + Nodes[Node->getIndex()].NumLocals;
73 } 73 }
74 SizeT &getNumNonDeadPhis(const CfgNode *Node) { 74 SizeT &getNumNonDeadPhis(const CfgNode *Node) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 /// within its basic block. 110 /// within its basic block.
111 std::vector<SizeT> VarToLiveMap; 111 std::vector<SizeT> VarToLiveMap;
112 /// LiveToVarMap is analogous to LivenessNode::LiveToVarMap, but for 112 /// LiveToVarMap is analogous to LivenessNode::LiveToVarMap, but for
113 /// non-local variables. 113 /// non-local variables.
114 std::vector<Variable *> LiveToVarMap; 114 std::vector<Variable *> LiveToVarMap;
115 }; 115 };
116 116
117 } // end of namespace Ice 117 } // end of namespace Ice
118 118
119 #endif // SUBZERO_SRC_ICELIVENESS_H 119 #endif // SUBZERO_SRC_ICELIVENESS_H
OLDNEW
« src/IceInst.h ('K') | « src/IceInstX86BaseImpl.h ('k') | src/IceOperand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698