< prev index next >

src/share/vm/opto/buildOopMap.cpp

Print this page




  30 #include "opto/machnode.hpp"
  31 #include "opto/matcher.hpp"
  32 #include "opto/phase.hpp"
  33 #include "opto/regalloc.hpp"
  34 #include "opto/rootnode.hpp"
  35 #ifdef TARGET_ARCH_x86
  36 # include "vmreg_x86.inline.hpp"
  37 #endif
  38 #ifdef TARGET_ARCH_sparc
  39 # include "vmreg_sparc.inline.hpp"
  40 #endif
  41 #ifdef TARGET_ARCH_zero
  42 # include "vmreg_zero.inline.hpp"
  43 #endif
  44 #ifdef TARGET_ARCH_arm
  45 # include "vmreg_arm.inline.hpp"
  46 #endif
  47 #ifdef TARGET_ARCH_ppc
  48 # include "vmreg_ppc.inline.hpp"
  49 #endif



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




  30 #include "opto/machnode.hpp"
  31 #include "opto/matcher.hpp"
  32 #include "opto/phase.hpp"
  33 #include "opto/regalloc.hpp"
  34 #include "opto/rootnode.hpp"
  35 #ifdef TARGET_ARCH_x86
  36 # include "vmreg_x86.inline.hpp"
  37 #endif
  38 #ifdef TARGET_ARCH_sparc
  39 # include "vmreg_sparc.inline.hpp"
  40 #endif
  41 #ifdef TARGET_ARCH_zero
  42 # include "vmreg_zero.inline.hpp"
  43 #endif
  44 #ifdef TARGET_ARCH_arm
  45 # include "vmreg_arm.inline.hpp"
  46 #endif
  47 #ifdef TARGET_ARCH_ppc
  48 # include "vmreg_ppc.inline.hpp"
  49 #endif
  50 #ifdef TARGET_ARCH_aarch32
  51 # include "vmreg_aarch32.inline.hpp"
  52 #endif
  53 
  54 // The functions in this file builds OopMaps after all scheduling is done.
  55 //
  56 // OopMaps contain a list of all registers and stack-slots containing oops (so
  57 // they can be updated by GC).  OopMaps also contain a list of derived-pointer
  58 // base-pointer pairs.  When the base is moved, the derived pointer moves to
  59 // follow it.  Finally, any registers holding callee-save values are also
  60 // recorded.  These might contain oops, but only the caller knows.
  61 //
  62 // BuildOopMaps implements a simple forward reaching-defs solution.  At each
  63 // GC point we'll have the reaching-def Nodes.  If the reaching Nodes are
  64 // typed as pointers (no offset), then they are oops.  Pointers+offsets are
  65 // derived pointers, and bases can be found from them.  Finally, we'll also
  66 // track reaching callee-save values.  Note that a copy of a callee-save value
  67 // "kills" it's source, so that only 1 copy of a callee-save value is alive at
  68 // a time.
  69 //
  70 // We run a simple bitvector liveness pass to help trim out dead oops.  Due to
  71 // irreducible loops, we can have a reaching def of an oop that only reaches
  72 // along one path and no way to know if it's valid or not on the other path.


< prev index next >