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

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

Issue 2207893002: [turbofan] Consume SignedSmall feedback for number operations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/redundancy-elimination.cc ('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 a9fc283c7e101c2d1031cfde0ed23fdaee620c84..80d5a73bd9f299c321f005883deb91993ede4811 100644
--- a/src/compiler/representation-change.h
+++ b/src/compiler/representation-change.h
@@ -74,12 +74,19 @@ class Truncation final {
static bool LessGeneral(TruncationKind rep1, TruncationKind rep2);
};
-enum class TypeCheckKind : uint8_t { kNone, kSigned32, kNumberOrOddball };
+enum class TypeCheckKind : uint8_t {
+ kNone,
+ kSignedSmall,
+ kSigned32,
+ kNumberOrOddball
+};
inline std::ostream& operator<<(std::ostream& os, TypeCheckKind type_check) {
switch (type_check) {
case TypeCheckKind::kNone:
return os << "None";
+ case TypeCheckKind::kSignedSmall:
+ return os << "SignedSmall";
case TypeCheckKind::kSigned32:
return os << "Signed32";
case TypeCheckKind::kNumberOrOddball:
@@ -131,6 +138,10 @@ class UseInfo {
}
// Possibly deoptimizing conversions.
+ static UseInfo CheckedSignedSmallAsWord32() {
+ return UseInfo(MachineRepresentation::kWord32, Truncation::Any(),
+ TypeCheckKind::kSignedSmall);
+ }
static UseInfo CheckedSigned32AsWord32() {
return UseInfo(MachineRepresentation::kWord32, Truncation::Any(),
TypeCheckKind::kSigned32);
« no previous file with comments | « src/compiler/redundancy-elimination.cc ('k') | src/compiler/representation-change.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698