| Index: lib/Bitcode/NaCl/Writer/NaClValueEnumerator.h
|
| diff --git a/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.h b/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.h
|
| index 9e9954883a61406ab6a946e552bf6ab93aed6a56..8b30ee3ce2b3671d8ff91a5d7a640abca3d1f214 100644
|
| --- a/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.h
|
| +++ b/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.h
|
| @@ -42,8 +42,17 @@ public:
|
| // For each value, we remember its Value* and occurrence frequency.
|
| typedef std::vector<std::pair<const Value*, unsigned> > ValueList;
|
| private:
|
| + // Defines unique ID's for each type.
|
| typedef DenseMap<Type*, unsigned> TypeMapType;
|
| TypeMapType TypeMap;
|
| + // Defines the number of references to each type. If defined,
|
| + // we are in the first pass of collecting types, and reference counts
|
| + // should be added to the map. If undefined, we are in the second pass
|
| + // that actually assigns type IDs, based on frequency counts found in
|
| + // the first pass.
|
| + typedef TypeMapType TypeCountMapType;
|
| + TypeCountMapType* TypeCountMap;
|
| +
|
| TypeList Types;
|
|
|
| typedef DenseMap<const Value*, unsigned> ValueMapType;
|
| @@ -152,6 +161,7 @@ public:
|
| void purgeFunction();
|
|
|
| private:
|
| + void OptimizeTypes(const Module *M);
|
| void OptimizeConstants(unsigned CstStart, unsigned CstEnd);
|
|
|
| void EnumerateMDNodeOperands(const MDNode *N);
|
|
|