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

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: Change the previous underscore naming style 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 // This file declares the Liveness and LivenessNode classes, 10 // This file declares the Liveness and LivenessNode classes,
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 // LivenessNode::NumGlobals. 53 // LivenessNode::NumGlobals.
54 LivenessBV LiveIn, LiveOut; 54 LivenessBV LiveIn, LiveOut;
55 // LiveBegin and LiveEnd track the instruction numbers of the start 55 // LiveBegin and LiveEnd track the instruction numbers of the start
56 // and end of each variable's live range within this block. The 56 // and end of each variable's live range within this block. The
57 // index/key of each element is less than NumLocals + 57 // index/key of each element is less than NumLocals +
58 // Liveness::NumGlobals. 58 // Liveness::NumGlobals.
59 LiveBeginEndMap LiveBegin, LiveEnd; 59 LiveBeginEndMap LiveBegin, LiveEnd;
60 }; 60 };
61 61
62 public: 62 public:
63 Liveness(Cfg *Func, LivenessMode Mode) : Func(Func), Mode(Mode) {} 63 Liveness(Cfg *MyFunc, LivenessMode MyMode) : Func(MyFunc), Mode(MyMode) {}
64 void init(); 64 void init();
65 Cfg *getFunc() const { return Func; } 65 Cfg *getFunc() const { return Func; }
66 LivenessMode getMode() const { return Mode; } 66 LivenessMode getMode() const { return Mode; }
67 Variable *getVariable(SizeT LiveIndex, const CfgNode *Node) const; 67 Variable *getVariable(SizeT LiveIndex, const CfgNode *Node) const;
68 SizeT getLiveIndex(SizeT VarIndex) const { return VarToLiveMap[VarIndex]; } 68 SizeT getLiveIndex(SizeT VarIndex) const { return VarToLiveMap[VarIndex]; }
69 SizeT getNumGlobalVars() const { return NumGlobals; } 69 SizeT getNumGlobalVars() const { return NumGlobals; }
70 SizeT getNumVarsInNode(const CfgNode *Node) const { 70 SizeT getNumVarsInNode(const CfgNode *Node) const {
71 return NumGlobals + Nodes[Node->getIndex()].NumLocals; 71 return NumGlobals + Nodes[Node->getIndex()].NumLocals;
72 } 72 }
73 SizeT &getNumNonDeadPhis(const CfgNode *Node) { 73 SizeT &getNumNonDeadPhis(const CfgNode *Node) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 // within its basic block. 109 // within its basic block.
110 std::vector<SizeT> VarToLiveMap; 110 std::vector<SizeT> VarToLiveMap;
111 // LiveToVarMap is analogous to LivenessNode::LiveToVarMap, but for 111 // LiveToVarMap is analogous to LivenessNode::LiveToVarMap, but for
112 // non-local variables. 112 // non-local variables.
113 std::vector<Variable *> LiveToVarMap; 113 std::vector<Variable *> LiveToVarMap;
114 }; 114 };
115 115
116 } // end of namespace Ice 116 } // end of namespace Ice
117 117
118 #endif // SUBZERO_SRC_ICELIVENESS_H 118 #endif // SUBZERO_SRC_ICELIVENESS_H
OLDNEW
« src/IceInstARM32.h ('K') | « src/IceInstX8632.cpp ('k') | src/IceOperand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698