/* * Copyright (c) 2018, 2022, 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. *
*/
// This means the access is mismatched. This means the value of an access // is not equivalent to the value pointed to by the address. const DecoratorSet C2_MISMATCHED = DECORATOR_LAST << 1; // The access may not be aligned to its natural size. const DecoratorSet C2_UNALIGNED = DECORATOR_LAST << 2; // The atomic cmpxchg is weak, meaning that spurious false negatives are allowed, // but never false positives. const DecoratorSet C2_WEAK_CMPXCHG = DECORATOR_LAST << 3; // This denotes that a load has control dependency. const DecoratorSet C2_CONTROL_DEPENDENT_LOAD = DECORATOR_LAST << 4; // This denotes that a load that must be pinned, but may float above safepoints. const DecoratorSet C2_UNKNOWN_CONTROL_LOAD = DECORATOR_LAST << 5; // This denotes that the access is produced from the sun.misc.Unsafe intrinsics. const DecoratorSet C2_UNSAFE_ACCESS = DECORATOR_LAST << 6; // This denotes that the access mutates state. const DecoratorSet C2_WRITE_ACCESS = DECORATOR_LAST << 7; // This denotes that the access reads state. const DecoratorSet C2_READ_ACCESS = DECORATOR_LAST << 8; // A nearby allocation? const DecoratorSet C2_TIGHTLY_COUPLED_ALLOC = DECORATOR_LAST << 9; // Loads and stores from an arraycopy being optimized const DecoratorSet C2_ARRAY_COPY = DECORATOR_LAST << 10; // Loads from immutable memory const DecoratorSet C2_IMMUTABLE_MEMORY = DECORATOR_LAST << 11;
class Compile; class ConnectionGraph; class GraphKit; class IdealKit; class Node; class PhaseGVN; class PhaseIdealLoop; class PhaseMacroExpand; class Type; class TypePtr; class Unique_Node_List;
// This class wraps a node and a type. class C2AccessValue: public StackObj { protected:
Node* _node; const Type* _type;
// This class wraps a bunch of context parameters that are passed around in the // BarrierSetC2 backend hierarchy, for loads and stores, to reduce boiler plate. class C2Access: public StackObj { protected:
DecoratorSet _decorators;
BasicType _type;
Node* _base;
C2AccessValuePtr& _addr;
Node* _raw_access;
uint8_t _barrier_data;
void set_raw_access(Node* raw_access) { _raw_access = raw_access; } virtualvoid set_memory() {} // no-op for normal accesses, but not for atomic accesses.
// This class wraps a bunch of context parameters that are passed around in the // BarrierSetC2 backend hierarchy, for atomic accesses, to reduce boiler plate. class C2AtomicParseAccess: public C2ParseAccess {
Node* _memory;
uint _alias_idx;
// C2Access for optimization time calls to the BarrierSetC2 backend. class C2OptAccess: public C2Access {
PhaseGVN& _gvn;
MergeMemNode* _mem;
Node* _ctl;
// This is the top-level class for the backend of the Access API in C2. // The top-level class is responsible for performing raw accesses. The // various GC barrier sets inherit from the BarrierSetC2 class to sprinkle // barriers into the accesses. class BarrierSetC2: public CHeapObj<mtGC> { protected: virtualvoid resolve_address(C2Access& access) const; virtual Node* store_at_resolved(C2Access& access, C2AccessValue& val) const; virtual Node* load_at_resolved(C2Access& access, const Type* val_type) const;
public: // This is the entry-point for the backend to perform accesses through the Access API. virtual Node* store_at(C2Access& access, C2AccessValue& val) const; virtual Node* load_at(C2Access& access, const Type* val_type) const;
// Allow barrier sets to have shared state that is preserved across a compilation unit. // This could for example comprise macro nodes to be expanded during macro expansion. virtualvoid* create_barrier_state(Arena* comp_arena) const { return NULL; } // If the BarrierSetC2 state has barrier nodes in its compilation // unit state to be expanded later, then now is the time to do so. virtualbool expand_barriers(Compile* C, PhaseIterGVN& igvn) const { returnfalse; } virtualbool optimize_loops(PhaseIdealLoop* phase, LoopOptsMode mode, VectorSet& visited, Node_Stack& nstack, Node_List& worklist) const { returnfalse; } virtualbool strip_mined_loops_expanded(LoopOptsMode mode) const { returnfalse; } virtualbool is_gc_specific_loop_opts_pass(LoopOptsMode mode) const { returnfalse; }
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.