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

Unified Diff: src/compiler/representation-change.h

Issue 2476593002: [turbofan] Improve representation selection for HeapObject checking. (Closed)
Patch Set: REBASE and fix. Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/opcodes.h ('k') | src/compiler/representation-change.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/representation-change.h
diff --git a/src/compiler/representation-change.h b/src/compiler/representation-change.h
index 8950b53f685179a3fb3aeec18617a772f82a392b..d7895da82504a86bc26443a3de32c2e010a562bf 100644
--- a/src/compiler/representation-change.h
+++ b/src/compiler/representation-change.h
@@ -80,7 +80,8 @@ enum class TypeCheckKind : uint8_t {
kSignedSmall,
kSigned32,
kNumber,
- kNumberOrOddball
+ kNumberOrOddball,
+ kHeapObject
};
inline std::ostream& operator<<(std::ostream& os, TypeCheckKind type_check) {
@@ -95,6 +96,8 @@ inline std::ostream& operator<<(std::ostream& os, TypeCheckKind type_check) {
return os << "Number";
case TypeCheckKind::kNumberOrOddball:
return os << "NumberOrOddball";
+ case TypeCheckKind::kHeapObject:
+ return os << "HeapObject";
}
UNREACHABLE();
return os;
@@ -152,6 +155,10 @@ class UseInfo {
}
// Possibly deoptimizing conversions.
+ static UseInfo CheckedHeapObjectAsTaggedPointer() {
+ return UseInfo(MachineRepresentation::kTaggedPointer, Truncation::Any(),
+ TypeCheckKind::kHeapObject);
+ }
static UseInfo CheckedSignedSmallAsTaggedSigned() {
return UseInfo(MachineRepresentation::kTaggedSigned, Truncation::Any(),
TypeCheckKind::kSignedSmall);
@@ -260,7 +267,8 @@ class RepresentationChanger final {
UseInfo use_info);
Node* GetTaggedPointerRepresentationFor(Node* node,
MachineRepresentation output_rep,
- Type* output_type);
+ Type* output_type, Node* use_node,
+ UseInfo use_info);
Node* GetTaggedRepresentationFor(Node* node, MachineRepresentation output_rep,
Type* output_type, Truncation truncation);
Node* GetFloat32RepresentationFor(Node* node,
@@ -284,8 +292,10 @@ class RepresentationChanger final {
Node* InsertChangeFloat32ToFloat64(Node* node);
Node* InsertChangeFloat64ToInt32(Node* node);
Node* InsertChangeFloat64ToUint32(Node* node);
+ Node* InsertChangeInt32ToFloat64(Node* node);
Node* InsertChangeTaggedSignedToInt32(Node* node);
Node* InsertChangeTaggedToFloat64(Node* node);
+ Node* InsertChangeUint32ToFloat64(Node* node);
Node* InsertConversion(Node* node, const Operator* op, Node* use_node);
« no previous file with comments | « src/compiler/opcodes.h ('k') | src/compiler/representation-change.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698