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

Side by Side Diff: include/llvm/Bitcode/NaCl/NaClBitcodeValueDist.h

Issue 1151093004: Changes from 3.7 merge to files not in upstream (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Created 5 years, 7 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 //===-- NaClBitcodeValueDist.h ---------------------------------------------===/ / 1 //===-- NaClBitcodeValueDist.h ---------------------------------------------===/ /
2 // Defines distribution maps to separate out values at each index 2 // Defines distribution maps to separate out values at each index
3 // in a bitcode record. 3 // in a bitcode record.
4 // 4 //
5 // The LLVM Compiler Infrastructure 5 // The LLVM Compiler Infrastructure
6 // 6 //
7 // This file is distributed under the University of Illinois Open Source 7 // This file is distributed under the University of Illinois Open Source
8 // License. See LICENSE.TXT for details. 8 // License. See LICENSE.TXT for details.
9 // 9 //
10 //===----------------------------------------------------------------------===// 10 //===----------------------------------------------------------------------===//
(...skipping 27 matching lines...) Expand all
38 38
39 /// Converts a bitcode record value to the corresponding range index that 39 /// Converts a bitcode record value to the corresponding range index that
40 /// contains the value. 40 /// contains the value.
41 NaClValueRangeIndexType GetNaClValueRangeIndex(NaClBitcodeDistValue Value); 41 NaClValueRangeIndexType GetNaClValueRangeIndex(NaClBitcodeDistValue Value);
42 42
43 /// Converts a range index into the corresponding range of values. 43 /// Converts a range index into the corresponding range of values.
44 NaClValueRangeType GetNaClValueRange(NaClValueRangeIndexType RangeIndex); 44 NaClValueRangeType GetNaClValueRange(NaClValueRangeIndexType RangeIndex);
45 45
46 /// Defines the distribution of range indices. 46 /// Defines the distribution of range indices.
47 class NaClBitcodeValueDistElement : public NaClBitcodeDistElement { 47 class NaClBitcodeValueDistElement : public NaClBitcodeDistElement {
48 NaClBitcodeValueDistElement(const NaClBitcodeValueDistElement&) 48 NaClBitcodeValueDistElement(const NaClBitcodeValueDistElement&) = delete;
49 LLVM_DELETED_FUNCTION; 49 void operator=(const NaClBitcodeValueDistElement&) = delete;
50 void operator=(const NaClBitcodeValueDistElement&) LLVM_DELETED_FUNCTION;
51 50
52 public: 51 public:
53 static bool classof(const NaClBitcodeDistElement *Element) { 52 static bool classof(const NaClBitcodeDistElement *Element) {
54 return Element->getKind() >= RDE_ValueDist && 53 return Element->getKind() >= RDE_ValueDist &&
55 Element->getKind() < RDE_ValueDistLast; 54 Element->getKind() < RDE_ValueDistLast;
56 } 55 }
57 56
58 NaClBitcodeValueDistElement() 57 NaClBitcodeValueDistElement()
59 : NaClBitcodeDistElement(RDE_ValueDist) 58 : NaClBitcodeDistElement(RDE_ValueDist)
60 {} 59 {}
(...skipping 14 matching lines...) Expand all
75 virtual const char *GetValueHeader() const; 74 virtual const char *GetValueHeader() const;
76 75
77 virtual void PrintRowValue(raw_ostream &Stream, 76 virtual void PrintRowValue(raw_ostream &Stream,
78 NaClBitcodeDistValue Value, 77 NaClBitcodeDistValue Value,
79 const NaClBitcodeDist *Distribution) const; 78 const NaClBitcodeDist *Distribution) const;
80 }; 79 };
81 80
82 /// Defines the distribution of values for a set of value indices for 81 /// Defines the distribution of values for a set of value indices for
83 /// bitcode records. 82 /// bitcode records.
84 class NaClBitcodeValueDist : public NaClBitcodeDist { 83 class NaClBitcodeValueDist : public NaClBitcodeDist {
85 NaClBitcodeValueDist(const NaClBitcodeValueDist&) LLVM_DELETED_FUNCTION; 84 NaClBitcodeValueDist(const NaClBitcodeValueDist&) = delete;
86 void operator=(const NaClBitcodeValueDist&) LLVM_DELETED_FUNCTION; 85 void operator=(const NaClBitcodeValueDist&) = delete;
87 86
88 public: 87 public:
89 static bool classof(const NaClBitcodeDist *Dist) { 88 static bool classof(const NaClBitcodeDist *Dist) {
90 return Dist->getKind() >= RD_ValueDist && 89 return Dist->getKind() >= RD_ValueDist &&
91 Dist->getKind() < RD_ValueDistLast; 90 Dist->getKind() < RD_ValueDistLast;
92 } 91 }
93 92
94 /// Builds a value distribution for the given set of value indices. 93 /// Builds a value distribution for the given set of value indices.
95 /// If AllRemainingIndices is false, only value Index is considered. 94 /// If AllRemainingIndices is false, only value Index is considered.
96 /// Otherwise, builds a value distribution for all values stored in 95 /// Otherwise, builds a value distribution for all values stored in
(...skipping 21 matching lines...) Expand all
118 // If true, then tracks all indices >= Index. Otherwise only Index. 117 // If true, then tracks all indices >= Index. Otherwise only Index.
119 bool AllRemainingIndices; 118 bool AllRemainingIndices;
120 }; 119 };
121 120
122 /// Defines the value distribution for each value index in corresponding 121 /// Defines the value distribution for each value index in corresponding
123 /// bitcode records. This is a helper class used to separate each element 122 /// bitcode records. This is a helper class used to separate each element
124 /// in the bitcode record, so that we can determine the proper abbreviation 123 /// in the bitcode record, so that we can determine the proper abbreviation
125 /// for each element. 124 /// for each element.
126 class NaClBitcodeValueIndexDistElement : public NaClBitcodeDistElement { 125 class NaClBitcodeValueIndexDistElement : public NaClBitcodeDistElement {
127 NaClBitcodeValueIndexDistElement( 126 NaClBitcodeValueIndexDistElement(
128 const NaClBitcodeValueIndexDistElement&) LLVM_DELETED_FUNCTION; 127 const NaClBitcodeValueIndexDistElement&) = delete;
129 void operator=( 128 void operator=(
130 const NaClBitcodeValueIndexDistElement&) LLVM_DELETED_FUNCTION; 129 const NaClBitcodeValueIndexDistElement&) = delete;
131 130
132 public: 131 public:
133 static bool classof(const NaClBitcodeDistElement *Element) { 132 static bool classof(const NaClBitcodeDistElement *Element) {
134 return Element->getKind() <= RDE_ValueIndexDist && 133 return Element->getKind() <= RDE_ValueIndexDist &&
135 Element->getKind() < RDE_ValueIndexDistLast; 134 Element->getKind() < RDE_ValueIndexDistLast;
136 } 135 }
137 136
138 explicit NaClBitcodeValueIndexDistElement(unsigned Index=0) 137 explicit NaClBitcodeValueIndexDistElement(unsigned Index=0)
139 : NaClBitcodeDistElement(RDE_ValueIndexDist), 138 : NaClBitcodeDistElement(RDE_ValueIndexDist),
140 ValueDist(Index) { 139 ValueDist(Index) {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 // Nested blocks used by GetNestedDistributions. 173 // Nested blocks used by GetNestedDistributions.
175 SmallVector<NaClBitcodeDist*, 1> NestedDists; 174 SmallVector<NaClBitcodeDist*, 1> NestedDists;
176 175
177 // The value distribution associated with the given index. 176 // The value distribution associated with the given index.
178 NaClBitcodeValueDist ValueDist; 177 NaClBitcodeValueDist ValueDist;
179 }; 178 };
180 179
181 } 180 }
182 181
183 #endif 182 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698