8282208: Reduce MachNode size
Reviewed-by: kvn, thartmann, jiefu
This commit is contained in:
parent
aaab2cb416
commit
5035bf5e6c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -204,9 +204,6 @@ public:
|
|||||||
// Base type for all machine specific nodes. All node classes generated by the
|
// Base type for all machine specific nodes. All node classes generated by the
|
||||||
// ADLC inherit from this class.
|
// ADLC inherit from this class.
|
||||||
class MachNode : public Node {
|
class MachNode : public Node {
|
||||||
private:
|
|
||||||
bool _removed = false;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MachNode() : Node((uint)0), _barrier(0), _num_opnds(0), _opnds(NULL) {
|
MachNode() : Node((uint)0), _barrier(0), _num_opnds(0), _opnds(NULL) {
|
||||||
init_class_id(Class_Mach);
|
init_class_id(Class_Mach);
|
||||||
@ -277,9 +274,9 @@ public:
|
|||||||
// more leafs. Must be set by MachNode constructor to point to an
|
// more leafs. Must be set by MachNode constructor to point to an
|
||||||
// internal array of MachOpers. The MachOper array is sized by
|
// internal array of MachOpers. The MachOper array is sized by
|
||||||
// specific MachNodes described in the ADL.
|
// specific MachNodes described in the ADL.
|
||||||
uint _num_opnds;
|
uint16_t _num_opnds;
|
||||||
MachOper **_opnds;
|
MachOper **_opnds;
|
||||||
uint num_opnds() const { return _num_opnds; }
|
uint16_t num_opnds() const { return _num_opnds; }
|
||||||
|
|
||||||
// Emit bytes into cbuf
|
// Emit bytes into cbuf
|
||||||
virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const;
|
virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const;
|
||||||
@ -375,8 +372,8 @@ public:
|
|||||||
|
|
||||||
// Returns true if this node is a check that can be implemented with a trap.
|
// Returns true if this node is a check that can be implemented with a trap.
|
||||||
virtual bool is_TrapBasedCheckNode() const { return false; }
|
virtual bool is_TrapBasedCheckNode() const { return false; }
|
||||||
void set_removed() { _removed = true; }
|
void set_removed() { add_flag(Flag_is_removed_by_peephole); }
|
||||||
bool get_removed() { return _removed; }
|
bool get_removed() { return (flags() & Flag_is_removed_by_peephole) != 0; }
|
||||||
|
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
virtual const char *Name() const = 0; // Machine-specific name
|
virtual const char *Name() const = 0; // Machine-specific name
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -786,7 +786,8 @@ public:
|
|||||||
Flag_is_expensive = 1 << 14,
|
Flag_is_expensive = 1 << 14,
|
||||||
Flag_is_predicated_vector = 1 << 15,
|
Flag_is_predicated_vector = 1 << 15,
|
||||||
Flag_for_post_loop_opts_igvn = 1 << 16,
|
Flag_for_post_loop_opts_igvn = 1 << 16,
|
||||||
_last_flag = Flag_for_post_loop_opts_igvn
|
Flag_is_removed_by_peephole = 1 << 17,
|
||||||
|
_last_flag = Flag_is_removed_by_peephole
|
||||||
};
|
};
|
||||||
|
|
||||||
class PD;
|
class PD;
|
||||||
@ -1247,15 +1248,16 @@ public:
|
|||||||
#ifdef ASSERT
|
#ifdef ASSERT
|
||||||
void verify_construction();
|
void verify_construction();
|
||||||
bool verify_jvms(const JVMState* jvms) const;
|
bool verify_jvms(const JVMState* jvms) const;
|
||||||
int _debug_idx; // Unique value assigned to every node.
|
|
||||||
int debug_idx() const { return _debug_idx; }
|
|
||||||
void set_debug_idx( int debug_idx ) { _debug_idx = debug_idx; }
|
|
||||||
|
|
||||||
Node* _debug_orig; // Original version of this, if any.
|
Node* _debug_orig; // Original version of this, if any.
|
||||||
Node* debug_orig() const { return _debug_orig; }
|
Node* debug_orig() const { return _debug_orig; }
|
||||||
void set_debug_orig(Node* orig); // _debug_orig = orig
|
void set_debug_orig(Node* orig); // _debug_orig = orig
|
||||||
void dump_orig(outputStream *st, bool print_key = true) const;
|
void dump_orig(outputStream *st, bool print_key = true) const;
|
||||||
|
|
||||||
|
int _debug_idx; // Unique value assigned to every node.
|
||||||
|
int debug_idx() const { return _debug_idx; }
|
||||||
|
void set_debug_idx( int debug_idx ) { _debug_idx = debug_idx; }
|
||||||
|
|
||||||
int _hash_lock; // Barrier to modifications of nodes in the hash table
|
int _hash_lock; // Barrier to modifications of nodes in the hash table
|
||||||
void enter_hash_lock() { ++_hash_lock; assert(_hash_lock < 99, "in too many hash tables?"); }
|
void enter_hash_lock() { ++_hash_lock; assert(_hash_lock < 99, "in too many hash tables?"); }
|
||||||
void exit_hash_lock() { --_hash_lock; assert(_hash_lock >= 0, "mispaired hash locks"); }
|
void exit_hash_lock() { --_hash_lock; assert(_hash_lock >= 0, "mispaired hash locks"); }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user