/* * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. *
*/
class AbstractCompiler; class Arena; class Bundle; class Block; class Block_Array; class C2_MacroAssembler; class ciMethod; class Compile; class MachNode; class MachSafePointNode; class Node; class PhaseCFG; #ifndef PRODUCT #define DEBUG_ARG(x) , x #else #define DEBUG_ARG(x) #endif
// Define the initial sizes for allocation of the resizable code buffer enum {
initial_const_capacity = 4 * 1024
};
class BufferSizingData { public: int _stub; int _code; int _const; int _reloc;
// We move non-hot code of the nmethod entry barrier to an out-of-line stub class C2EntryBarrierStub: public ArenaObj {
Label _slow_path;
Label _continuation;
Label _guard; // Used on AArch64 and RISCV
class PhaseOutput : public Phase { private: // Instruction bits passed off to the VM int _method_size; // Size of nmethod code segment in bytes
CodeBuffer _code_buffer; // Where the code is assembled int _first_block_size; // Size of unvalidated entry point code / OSR poison code
ExceptionHandlerTable _handler_table; // Table of native-code exception handlers
ImplicitExceptionTable _inc_table; // Table of implicit null checks in native code
C2SafepointPollStubTable _safepoint_poll_table;// Table for safepoint polls
C2EntryBarrierStubTable _entry_barrier_table; // Table for entry barrier stubs
OopMapSet* _oop_map_set; // Table of oop maps (one for each safepoint location)
BufferBlob* _scratch_buffer_blob; // For temporary code buffers.
relocInfo* _scratch_locs_memory; // For temporary code buffers. int _scratch_const_size; // For temporary code buffers. bool _in_scratch_emit_size; // true when in scratch_emit_size.
int _frame_slots; // Size of total frame in stack slots
CodeOffsets _code_offsets; // Offsets into the code for various interesting entries
uint _node_bundling_limit;
Bundle* _node_bundling_base; // Information for instruction bundling
// For deopt int _orig_pc_slot; int _orig_pc_slot_offset_in_bytes;
ConstantTable _constant_table; // The constant table for this compilation unit.
// Convert Nodes to instruction bits and pass off to the VM void Output(); bool need_stack_bang(int frame_size_in_bytes) const; bool need_register_stack_bang() const; void compute_loop_first_inst_sizes();
// The architecture description provides short branch variants for some long // branch instructions. Replace eligible long branches with short branches. void shorten_branches(uint* blk_starts); // If "objs" contains an ObjectValue whose id is "id", returns it, else NULL. static ObjectValue* sv_for_node_id(GrowableArray<ScopeValue*> *objs, int id); staticvoid set_sv_for_object_node(GrowableArray<ScopeValue*> *objs, ObjectValue* sv); void FillLocArray( int idx, MachSafePointNode* sfpt, Node *local,
GrowableArray<ScopeValue*> *array,
GrowableArray<ScopeValue*> *objs );
void Process_OopMap_Node(MachNode *mach, int current_offset);
enum ScratchBufferBlob {
MAX_inst_size = 2048,
MAX_locs_size = 128, // number of relocInfo elements
MAX_const_size = 128,
MAX_stubs_size = 128
};
int frame_slots() const { return _frame_slots; } int frame_size_in_words() const; // frame_slots in units of the polymorphic 'words' int frame_size_in_bytes() const { return _frame_slots << LogBytesPerInt; }
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.