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

Unified Diff: src/machine-type.h

Issue 2382013003: [Turbofan] Streamline InstructionOperand predicate methods. (Closed)
Patch Set: Rebase. Created 4 years, 2 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/instruction.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/machine-type.h
diff --git a/src/machine-type.h b/src/machine-type.h
index 062e15d9c9a9d7a668d695d166f4b4b36655183e..e9605d7280fbdd28bb53292092ef97130cae4d0c 100644
--- a/src/machine-type.h
+++ b/src/machine-type.h
@@ -22,12 +22,14 @@ enum class MachineRepresentation : uint8_t {
kWord16,
kWord32,
kWord64,
- kFloat32,
- kFloat64, // must follow kFloat32
- kSimd128, // must follow kFloat64
kTaggedSigned,
kTaggedPointer,
- kTagged
+ kTagged,
+ // FP representations must be last, and in order of increasing size.
+ kFloat32,
+ kFloat64,
+ kSimd128,
+ kFirstFPRepresentation = kFloat32
};
const char* MachineReprToString(MachineRepresentation);
@@ -224,9 +226,7 @@ std::ostream& operator<<(std::ostream& os, MachineSemantic type);
std::ostream& operator<<(std::ostream& os, MachineType type);
inline bool IsFloatingPoint(MachineRepresentation rep) {
- return rep == MachineRepresentation::kFloat32 ||
- rep == MachineRepresentation::kFloat64 ||
- rep == MachineRepresentation::kSimd128;
+ return rep >= MachineRepresentation::kFirstFPRepresentation;
}
inline bool CanBeTaggedPointer(MachineRepresentation rep) {
« no previous file with comments | « src/compiler/instruction.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698