hotspot/src/share/vm/opto/compile.cpp
changeset 29337 ef2be52deeaf
parent 28912 27fac2f8fdbe
child 29341 dedd5ddb0f95
equal deleted inserted replaced
29336:b287769dcff1 29337:ef2be52deeaf
    40 #include "opto/callnode.hpp"
    40 #include "opto/callnode.hpp"
    41 #include "opto/cfgnode.hpp"
    41 #include "opto/cfgnode.hpp"
    42 #include "opto/chaitin.hpp"
    42 #include "opto/chaitin.hpp"
    43 #include "opto/compile.hpp"
    43 #include "opto/compile.hpp"
    44 #include "opto/connode.hpp"
    44 #include "opto/connode.hpp"
       
    45 #include "opto/convertnode.hpp"
    45 #include "opto/divnode.hpp"
    46 #include "opto/divnode.hpp"
    46 #include "opto/escape.hpp"
    47 #include "opto/escape.hpp"
    47 #include "opto/idealGraphPrinter.hpp"
    48 #include "opto/idealGraphPrinter.hpp"
    48 #include "opto/loopnode.hpp"
    49 #include "opto/loopnode.hpp"
    49 #include "opto/machnode.hpp"
    50 #include "opto/machnode.hpp"
  3864   }
  3865   }
  3865 
  3866 
  3866   return SSC_full_test;
  3867   return SSC_full_test;
  3867 }
  3868 }
  3868 
  3869 
       
  3870 Node* Compile::conv_I2X_index(PhaseGVN *phase, Node* idx, const TypeInt* sizetype) {
       
  3871 #ifdef _LP64
       
  3872   // The scaled index operand to AddP must be a clean 64-bit value.
       
  3873   // Java allows a 32-bit int to be incremented to a negative
       
  3874   // value, which appears in a 64-bit register as a large
       
  3875   // positive number.  Using that large positive number as an
       
  3876   // operand in pointer arithmetic has bad consequences.
       
  3877   // On the other hand, 32-bit overflow is rare, and the possibility
       
  3878   // can often be excluded, if we annotate the ConvI2L node with
       
  3879   // a type assertion that its value is known to be a small positive
       
  3880   // number.  (The prior range check has ensured this.)
       
  3881   // This assertion is used by ConvI2LNode::Ideal.
       
  3882   int index_max = max_jint - 1;  // array size is max_jint, index is one less
       
  3883   if (sizetype != NULL)  index_max = sizetype->_hi - 1;
       
  3884   const TypeLong* lidxtype = TypeLong::make(CONST64(0), index_max, Type::WidenMax);
       
  3885   idx = phase->transform(new ConvI2LNode(idx, lidxtype));
       
  3886 #endif
       
  3887   return idx;
       
  3888 }
       
  3889 
  3869 // The message about the current inlining is accumulated in
  3890 // The message about the current inlining is accumulated in
  3870 // _print_inlining_stream and transfered into the _print_inlining_list
  3891 // _print_inlining_stream and transfered into the _print_inlining_list
  3871 // once we know whether inlining succeeds or not. For regular
  3892 // once we know whether inlining succeeds or not. For regular
  3872 // inlining, messages are appended to the buffer pointed by
  3893 // inlining, messages are appended to the buffer pointed by
  3873 // _print_inlining_idx in the _print_inlining_list. For late inlining,
  3894 // _print_inlining_idx in the _print_inlining_list. For late inlining,