1 /*
2 * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
86 int get_store_barrier(C2Access& access) const;
87
88 virtual Node* load_at_resolved(C2Access& access, const Type* val_type) const;
89 virtual Node* store_at_resolved(C2Access& access, C2AccessValue& val) const;
90 virtual Node* atomic_cmpxchg_val_at_resolved(C2AtomicParseAccess& access, Node* expected_val,
91 Node* new_val, const Type* value_type) const;
92 virtual Node* atomic_cmpxchg_bool_at_resolved(C2AtomicParseAccess& access, Node* expected_val,
93 Node* new_val, const Type* value_type) const;
94 virtual Node* atomic_xchg_at_resolved(C2AtomicParseAccess& access, Node* new_val, const Type* value_type) const;
95
96 public:
97 virtual void eliminate_gc_barrier(PhaseMacroExpand* macro, Node* node) const;
98 virtual void eliminate_gc_barrier_data(Node* node) const;
99 virtual bool expand_barriers(Compile* C, PhaseIterGVN& igvn) const;
100 virtual uint estimated_barrier_size(const Node* node) const;
101 virtual bool can_initialize_object(const StoreNode* store) const;
102 virtual void clone_at_expansion(PhaseMacroExpand* phase,
103 ArrayCopyNode* ac) const;
104 virtual void* create_barrier_state(Arena* comp_arena) const;
105 virtual void emit_stubs(CodeBuffer& cb) const;
106 virtual void elide_dominated_barrier(MachNode* mach) const;
107 virtual void late_barrier_analysis() const;
108
109 #ifndef PRODUCT
110 virtual void dump_barrier_data(const MachNode* mach, outputStream* st) const;
111 #endif
112 };
113
114 #endif // SHARE_GC_G1_C2_G1BARRIERSETC2_HPP
|
1 /*
2 * Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
86 int get_store_barrier(C2Access& access) const;
87
88 virtual Node* load_at_resolved(C2Access& access, const Type* val_type) const;
89 virtual Node* store_at_resolved(C2Access& access, C2AccessValue& val) const;
90 virtual Node* atomic_cmpxchg_val_at_resolved(C2AtomicParseAccess& access, Node* expected_val,
91 Node* new_val, const Type* value_type) const;
92 virtual Node* atomic_cmpxchg_bool_at_resolved(C2AtomicParseAccess& access, Node* expected_val,
93 Node* new_val, const Type* value_type) const;
94 virtual Node* atomic_xchg_at_resolved(C2AtomicParseAccess& access, Node* new_val, const Type* value_type) const;
95
96 public:
97 virtual void eliminate_gc_barrier(PhaseMacroExpand* macro, Node* node) const;
98 virtual void eliminate_gc_barrier_data(Node* node) const;
99 virtual bool expand_barriers(Compile* C, PhaseIterGVN& igvn) const;
100 virtual uint estimated_barrier_size(const Node* node) const;
101 virtual bool can_initialize_object(const StoreNode* store) const;
102 virtual void clone_at_expansion(PhaseMacroExpand* phase,
103 ArrayCopyNode* ac) const;
104 virtual void* create_barrier_state(Arena* comp_arena) const;
105 virtual void emit_stubs(CodeBuffer& cb) const;
106 virtual void elide_dominated_barrier(MachNode* mach, MachNode* dominator) const;
107 virtual void late_barrier_analysis() const;
108
109 #ifndef PRODUCT
110 virtual void dump_barrier_data(const MachNode* mach, outputStream* st) const;
111 #endif
112 };
113
114 #endif // SHARE_GC_G1_C2_G1BARRIERSETC2_HPP
|