< prev index next >

src/hotspot/share/c1/c1_RangeCheckElimination.hpp

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 #ifndef SHARE_VM_C1_C1_RANGECHECKELIMINATION_HPP
  26 #define SHARE_VM_C1_C1_RANGECHECKELIMINATION_HPP
  27 
  28 #include "c1/c1_Instruction.hpp"
  29 
  30 // Base class for range check elimination
  31 class RangeCheckElimination : AllStatic {
  32 public:
  33   static void eliminate(IR *ir);
  34 };
  35 
  36 // Implementation
  37 class RangeCheckEliminator VALUE_OBJ_CLASS_SPEC {
  38 private:
  39   int _number_of_instructions;
  40   bool _optimistic; // Insert predicates and deoptimize when they fail
  41   IR *_ir;
  42 
  43   typedef GrowableArray<BlockBegin*> BlockBeginList;
  44   typedef GrowableArray<int> IntegerStack;
  45 
  46   class Verification : public BlockClosure {
  47   // RangeCheckEliminator::Verification should never get instatiated on the heap.
  48   private:
  49     void* operator new(size_t size) throw();
  50     void* operator new[](size_t size) throw();
  51     void operator delete(void* p) { ShouldNotReachHere(); }
  52     void operator delete[](void* p) { ShouldNotReachHere(); }
  53 
  54     IR *_ir;
  55     boolArray _used;
  56     BlockBeginList _current;
  57     BlockBeginList _successors;




  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 #ifndef SHARE_VM_C1_C1_RANGECHECKELIMINATION_HPP
  26 #define SHARE_VM_C1_C1_RANGECHECKELIMINATION_HPP
  27 
  28 #include "c1/c1_Instruction.hpp"
  29 
  30 // Base class for range check elimination
  31 class RangeCheckElimination : AllStatic {
  32 public:
  33   static void eliminate(IR *ir);
  34 };
  35 
  36 // Implementation
  37 class RangeCheckEliminator {
  38 private:
  39   int _number_of_instructions;
  40   bool _optimistic; // Insert predicates and deoptimize when they fail
  41   IR *_ir;
  42 
  43   typedef GrowableArray<BlockBegin*> BlockBeginList;
  44   typedef GrowableArray<int> IntegerStack;
  45 
  46   class Verification : public BlockClosure {
  47   // RangeCheckEliminator::Verification should never get instatiated on the heap.
  48   private:
  49     void* operator new(size_t size) throw();
  50     void* operator new[](size_t size) throw();
  51     void operator delete(void* p) { ShouldNotReachHere(); }
  52     void operator delete[](void* p) { ShouldNotReachHere(); }
  53 
  54     IR *_ir;
  55     boolArray _used;
  56     BlockBeginList _current;
  57     BlockBeginList _successors;


< prev index next >