Lines Matching refs:truncation
15 class Truncation final {
18 static Truncation None() { return Truncation(TruncationKind::kNone); }
19 static Truncation Bool() { return Truncation(TruncationKind::kBool); }
20 static Truncation Word32() { return Truncation(TruncationKind::kWord32); }
21 static Truncation Word64() { return Truncation(TruncationKind::kWord64); }
22 static Truncation Float64() { return Truncation(TruncationKind::kFloat64); }
23 static Truncation Any() { return Truncation(TruncationKind::kAny); }
25 static Truncation Generalize(Truncation t1, Truncation t2) {
26 return Truncation(Generalize(t1.kind(), t2.kind()));
50 bool operator==(Truncation other) const { return kind() == other.kind(); }
51 bool operator!=(Truncation other) const { return !(*this == other); }
55 bool IsLessGeneralThan(Truncation other) {
69 explicit Truncation(TruncationKind kind) : kind_(kind) {}
111 // about what part of the input is used (we call this truncation) and what
121 UseInfo(MachineRepresentation representation, Truncation truncation,
126 truncation_(truncation),
130 return UseInfo(MachineRepresentation::kWord32, Truncation::Word32());
133 return UseInfo(MachineRepresentation::kWord64, Truncation::Word64());
136 return UseInfo(MachineRepresentation::kBit, Truncation::Bool());
139 return UseInfo(MachineRepresentation::kFloat32, Truncation::Any());
142 return UseInfo(MachineRepresentation::kFloat64, Truncation::Float64());
148 return UseInfo(MachineRepresentation::kTagged, Truncation::Any());
151 return UseInfo(MachineRepresentation::kTaggedSigned, Truncation::Any());
154 return UseInfo(MachineRepresentation::kTaggedPointer, Truncation::Any());
159 return UseInfo(MachineRepresentation::kTaggedPointer, Truncation::Any(),
163 return UseInfo(MachineRepresentation::kTaggedSigned, Truncation::Any(),
169 return UseInfo(MachineRepresentation::kWord32, Truncation::Any(),
175 return UseInfo(MachineRepresentation::kWord32, Truncation::Any(),
179 return UseInfo(MachineRepresentation::kFloat64, Truncation::Float64(),
183 return UseInfo(MachineRepresentation::kWord32, Truncation::Word32(),
187 return UseInfo(MachineRepresentation::kFloat64, Truncation::Any(),
191 return UseInfo(MachineRepresentation::kWord32, Truncation::Word32(),
197 return UseInfo(MachineRepresentation::kNone, Truncation::Any());
200 return UseInfo(MachineRepresentation::kNone, Truncation::Bool());
205 return UseInfo(MachineRepresentation::kNone, Truncation::None());
209 Truncation truncation() const { return truncation_; }
215 Truncation truncation_;
232 // Changes representation from {output_type} to {use_rep}. The {truncation}
273 Type* output_type, Truncation truncation);
276 Type* output_type, Truncation truncation);