< prev index next >

src/hotspot/share/gc/shared/c2/barrierSetC2.hpp

Print this page
*** 1,7 ***
  /*
!  * Copyright (c) 2018, 2025, 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.
--- 1,7 ---
  /*
!  * Copyright (c) 2018, 2026, 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.

*** 259,10 ***
--- 259,12 ---
  
    // Preserve the value in reg across runtime calls in this barrier.
    void preserve(Register reg);
    // Do not preserve the value in reg across runtime calls in this barrier.
    void dont_preserve(Register reg);
+   // Check if register is in preserved set
+   bool is_preserved(Register reg) const;
    // Set of registers whose value needs to be preserved across runtime calls in this barrier.
    const RegMask& preserve_set() const;
  };
  
  // This is the top-level class for the backend of the Access API in C2.

*** 337,10 ***
--- 339,11 ---
    // This could for example comprise macro nodes to be expanded during macro expansion.
    virtual void* create_barrier_state(Arena* comp_arena) const { return nullptr; }
    // If the BarrierSetC2 state has barrier nodes in its compilation
    // unit state to be expanded later, then now is the time to do so.
    virtual bool expand_barriers(Compile* C, PhaseIterGVN& igvn) const { return false; }
+   virtual void final_refinement(Compile* C) const { }
    virtual bool optimize_loops(PhaseIdealLoop* phase, LoopOptsMode mode, VectorSet& visited, Node_Stack& nstack, Node_List& worklist) const { return false; }
    virtual bool strip_mined_loops_expanded(LoopOptsMode mode) const { return false; }
    virtual bool is_gc_specific_loop_opts_pass(LoopOptsMode mode) const { return false; }
    // Estimated size of the node barrier in number of C2 Ideal nodes.
    // This is used to guide heuristics in C2, e.g. whether to unroll a loop.

*** 368,11 ***
    virtual bool matcher_is_store_load_barrier(Node* x, uint xop) const { return false; }
  
    // Whether the given phi node joins OOPs from fast and slow allocation paths.
    static bool is_allocation(const Node* node);
    // Elide GC barriers from a Mach node according to elide_dominated_barriers().
!   virtual void elide_dominated_barrier(MachNode* mach) const { }
    // Elide GC barriers from instructions in 'accesses' if they are dominated by
    // instructions in 'access_dominators' (according to elide_mach_barrier()) and
    // there is no safepoint poll in between.
    void elide_dominated_barriers(Node_List& accesses, Node_List& access_dominators) const;
    virtual void late_barrier_analysis() const { }
--- 371,11 ---
    virtual bool matcher_is_store_load_barrier(Node* x, uint xop) const { return false; }
  
    // Whether the given phi node joins OOPs from fast and slow allocation paths.
    static bool is_allocation(const Node* node);
    // Elide GC barriers from a Mach node according to elide_dominated_barriers().
!   virtual void elide_dominated_barrier(MachNode* mach, MachNode* dominator) const { }
    // Elide GC barriers from instructions in 'accesses' if they are dominated by
    // instructions in 'access_dominators' (according to elide_mach_barrier()) and
    // there is no safepoint poll in between.
    void elide_dominated_barriers(Node_List& accesses, Node_List& access_dominators) const;
    virtual void late_barrier_analysis() const { }
< prev index next >