15bool IsBitcast(Node* node) {
19 return node->opcode() == IrOpcode::kBitcastTaggedToWordForTagAndSmiBits ||
20 node->opcode() == IrOpcode::kBitcastWordToTaggedSigned;
23bool OwnedByWord32Op(Node* node) {
24#if V8_TARGET_ARCH_LOONG64 || V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_RISCV64
27 for (Node*
const use : node->uses()) {
28 switch (use->opcode()) {
29 case IrOpcode::kWord32Equal:
30 case IrOpcode::kInt32LessThan:
31 case IrOpcode::kInt32LessThanOrEqual:
32 case IrOpcode::kUint32LessThan:
33 case IrOpcode::kUint32LessThanOrEqual:
34 case IrOpcode::kChangeInt32ToInt64:
35#define Word32Op(Name) case IrOpcode::k##Name:
47void Replace(Node* node, Node* replacement) {
48 for (Edge edge : node->use_edges()) {
49 edge.UpdateTo(replacement);
65 for (
int i = 0;
i < node->InputCount();
i++) {
68 if (input ==
nullptr)
continue;
69 if (input->opcode() == IrOpcode::kTruncateInt64ToInt32 &&
70 OwnedByWord32Op(input)) {
71 Replace(input, input->InputAt(0));
74 Replace(input, input->InputAt(0));
95 is_builtin_(is_builtin) {}
BitcastElider(Zone *zone, TFGraph *graph, bool is_builtin)
ZoneQueue< Node * > to_visit_
void VisitNode(Node *node)
V8_INLINE void Set(Node *node, State state)
V8_INLINE State Get(const Node *node)
Node * InputAt(int index) const
#define MACHINE_BINOP_32_LIST(V)