| Index: src/IceLiveness.h
|
| diff --git a/src/IceLiveness.h b/src/IceLiveness.h
|
| index 70578d42b518dcbd9bc2698049331f683865dfa3..f1f6ad9021995849544d4cf0b31cc9e6022b8a32 100644
|
| --- a/src/IceLiveness.h
|
| +++ b/src/IceLiveness.h
|
| @@ -67,7 +67,11 @@ public:
|
| Cfg *getFunc() const { return Func; }
|
| LivenessMode getMode() const { return Mode; }
|
| Variable *getVariable(SizeT LiveIndex, const CfgNode *Node) const;
|
| - SizeT getLiveIndex(SizeT VarIndex) const { return VarToLiveMap[VarIndex]; }
|
| + SizeT getLiveIndex(SizeT VarIndex) const {
|
| + const SizeT LiveIndex = VarToLiveMap[VarIndex];
|
| + assert(LiveIndex != InvalidLiveIndex);
|
| + return LiveIndex;
|
| + }
|
| SizeT getNumGlobalVars() const { return NumGlobals; }
|
| SizeT getNumVarsInNode(const CfgNode *Node) const {
|
| return NumGlobals + Nodes[Node->getIndex()].NumLocals;
|
| @@ -106,6 +110,7 @@ private:
|
| if (Index >= Nodes.size())
|
| Nodes.resize(Index + 1);
|
| }
|
| + static constexpr SizeT InvalidLiveIndex = -1;
|
| Cfg *Func;
|
| LivenessMode Mode;
|
| SizeT NumGlobals = 0;
|
|
|