< prev index next >

src/share/vm/opto/buildOopMap.cpp

Print this page




  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  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "code/vmreg.inline.hpp"
  27 #include "compiler/oopMap.hpp"
  28 #include "memory/resourceArea.hpp"
  29 #include "opto/addnode.hpp"
  30 #include "opto/callnode.hpp"
  31 #include "opto/compile.hpp"
  32 #include "opto/machnode.hpp"
  33 #include "opto/matcher.hpp"
  34 #include "opto/phase.hpp"
  35 #include "opto/regalloc.hpp"
  36 #include "opto/rootnode.hpp"

  37 
  38 // The functions in this file builds OopMaps after all scheduling is done.
  39 //
  40 // OopMaps contain a list of all registers and stack-slots containing oops (so
  41 // they can be updated by GC).  OopMaps also contain a list of derived-pointer
  42 // base-pointer pairs.  When the base is moved, the derived pointer moves to
  43 // follow it.  Finally, any registers holding callee-save values are also
  44 // recorded.  These might contain oops, but only the caller knows.
  45 //
  46 // BuildOopMaps implements a simple forward reaching-defs solution.  At each
  47 // GC point we'll have the reaching-def Nodes.  If the reaching Nodes are
  48 // typed as pointers (no offset), then they are oops.  Pointers+offsets are
  49 // derived pointers, and bases can be found from them.  Finally, we'll also
  50 // track reaching callee-save values.  Note that a copy of a callee-save value
  51 // "kills" it's source, so that only 1 copy of a callee-save value is alive at
  52 // a time.
  53 //
  54 // We run a simple bitvector liveness pass to help trim out dead oops.  Due to
  55 // irreducible loops, we can have a reaching def of an oop that only reaches
  56 // along one path and no way to know if it's valid or not on the other path.




  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  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "code/vmreg.inline.hpp"
  27 #include "compiler/oopMap.hpp"
  28 #include "memory/resourceArea.hpp"
  29 #include "opto/addnode.hpp"
  30 #include "opto/callnode.hpp"
  31 #include "opto/compile.hpp"
  32 #include "opto/machnode.hpp"
  33 #include "opto/matcher.hpp"
  34 #include "opto/phase.hpp"
  35 #include "opto/regalloc.hpp"
  36 #include "opto/rootnode.hpp"
  37 #include "utilities/align.hpp"
  38 
  39 // The functions in this file builds OopMaps after all scheduling is done.
  40 //
  41 // OopMaps contain a list of all registers and stack-slots containing oops (so
  42 // they can be updated by GC).  OopMaps also contain a list of derived-pointer
  43 // base-pointer pairs.  When the base is moved, the derived pointer moves to
  44 // follow it.  Finally, any registers holding callee-save values are also
  45 // recorded.  These might contain oops, but only the caller knows.
  46 //
  47 // BuildOopMaps implements a simple forward reaching-defs solution.  At each
  48 // GC point we'll have the reaching-def Nodes.  If the reaching Nodes are
  49 // typed as pointers (no offset), then they are oops.  Pointers+offsets are
  50 // derived pointers, and bases can be found from them.  Finally, we'll also
  51 // track reaching callee-save values.  Note that a copy of a callee-save value
  52 // "kills" it's source, so that only 1 copy of a callee-save value is alive at
  53 // a time.
  54 //
  55 // We run a simple bitvector liveness pass to help trim out dead oops.  Due to
  56 // irreducible loops, we can have a reaching def of an oop that only reaches
  57 // along one path and no way to know if it's valid or not on the other path.


< prev index next >