--- old/src/hotspot/share/opto/compile.hpp 2019-03-11 14:26:39.718354691 +0100 +++ new/src/hotspot/share/opto/compile.hpp 2019-03-11 14:26:39.486354694 +0100 @@ -48,6 +48,7 @@ class AddPNode; class Block; class Bundle; +class CallNode; class C2Compiler; class CallGenerator; class CloneMap; @@ -84,6 +85,7 @@ class TypePtr; class TypeOopPtr; class TypeFunc; +class ValueTypeBaseNode; class Unique_Node_List; class nmethod; class WarmCallInfo; @@ -380,6 +382,10 @@ int _orig_pc_slot; int _orig_pc_slot_offset_in_bytes; + // For value type calling convention + int _sp_inc_slot; + int _sp_inc_slot_offset_in_bytes; + int _major_progress; // Count of something big happening bool _inlining_progress; // progress doing incremental inlining? bool _inlining_incrementally;// Are we doing incremental inlining (post parse) @@ -430,6 +436,7 @@ GrowableArray* _expensive_nodes; // List of nodes that are expensive to compute and that we'd better not let the GVN freely common GrowableArray* _range_check_casts; // List of CastII nodes with a range check dependency GrowableArray* _opaque4_nodes; // List of Opaque4 nodes that have a default value + Unique_Node_List* _value_type_nodes; // List of ValueType nodes ConnectionGraph* _congraph; #ifndef PRODUCT IdealGraphPrinter* _printer; @@ -715,6 +722,11 @@ uint max_node_limit() const { return (uint)_max_node_limit; } void set_max_node_limit(uint n) { _max_node_limit = n; } + // Support for scalarized value type calling convention + bool has_scalarized_args() const { return _method != NULL && _method->has_scalarized_args(); } + bool needs_stack_repair() const { return _method != NULL && _method->get_Method()->needs_stack_repair(); } + int sp_inc_offset() const { return _sp_inc_slot_offset_in_bytes; } + // check the CompilerOracle for special behaviours for this compile bool method_has_option(const char * option) { return method() != NULL && method()->has_option(option); @@ -836,6 +848,12 @@ int opaque4_count() const { return _opaque4_nodes->length(); } void remove_opaque4_nodes(PhaseIterGVN &igvn); + // Keep track of value type nodes for later processing + void add_value_type(Node* n); + void remove_value_type(Node* n); + void process_value_types(PhaseIterGVN &igvn); + bool can_add_value_type() const { return _value_type_nodes != NULL; } + // remove the opaque nodes that protect the predicates so that the unused checks and // uncommon traps will be eliminated from the graph. void cleanup_loop_predicates(PhaseIterGVN &igvn); @@ -1368,6 +1386,8 @@ // Convert integer value to a narrowed long type dependent on ctrl (for example, a range check) static Node* constrained_convI2L(PhaseGVN* phase, Node* value, const TypeInt* itype, Node* ctrl); + Node* optimize_acmp(PhaseGVN* phase, Node* a, Node* b); + // Auxiliary method for randomized fuzzing/stressing static bool randomized_select(int count);