< prev index next >

src/share/vm/c1/c1_LIRGenerator.hpp

Print this page




  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  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_LIRGENERATOR_HPP
  26 #define SHARE_VM_C1_C1_LIRGENERATOR_HPP
  27 
  28 #include "c1/c1_Instruction.hpp"
  29 #include "c1/c1_LIR.hpp"
  30 #include "ci/ciMethodData.hpp"

  31 #include "utilities/sizes.hpp"
  32 
  33 // The classes responsible for code emission and register allocation
  34 
  35 
  36 class LIRGenerator;
  37 class LIREmitter;
  38 class Invoke;
  39 class SwitchRange;
  40 class LIRItem;
  41 
  42 define_array(LIRItemArray, LIRItem*)
  43 define_stack(LIRItemList, LIRItemArray)
  44 
  45 class SwitchRange: public CompilationResourceObj {
  46  private:
  47   int _low_key;
  48   int _high_key;
  49   BlockBegin* _sux;
  50  public:


 419     case If::geq: l = lir_cond_greaterEqual; break;
 420     case If::gtr: l = lir_cond_greater;      break;
 421     case If::aeq: l = lir_cond_aboveEqual;   break;
 422     case If::beq: l = lir_cond_belowEqual;   break;
 423     default: fatal("You must pass valid If::Condition");
 424     };
 425     return l;
 426   }
 427 
 428 #ifdef __SOFTFP__
 429   void do_soft_float_compare(If *x);
 430 #endif // __SOFTFP__
 431 
 432   void init();
 433 
 434   SwitchRangeArray* create_lookup_ranges(TableSwitch* x);
 435   SwitchRangeArray* create_lookup_ranges(LookupSwitch* x);
 436   void do_SwitchRanges(SwitchRangeArray* x, LIR_Opr value, BlockBegin* default_sux);
 437 
 438   void do_RuntimeCall(address routine, int expected_arguments, Intrinsic* x);
 439 #ifdef TRACE_HAVE_INTRINSICS
 440   void do_ThreadIDIntrinsic(Intrinsic* x);
 441   void do_ClassIDIntrinsic(Intrinsic* x);

 442 #endif
 443   ciKlass* profile_type(ciMethodData* md, int md_first_offset, int md_offset, intptr_t profiled_k,
 444                         Value arg, LIR_Opr& mdp, bool not_null, ciKlass* signature_at_call_k,
 445                         ciKlass* callee_signature_k);
 446   void profile_arguments(ProfileCall* x);
 447   void profile_parameters(Base* x);
 448   void profile_parameters_at_call(ProfileCall* x);
 449   LIR_Opr maybe_mask_boolean(StoreIndexed* x, LIR_Opr array, LIR_Opr value, CodeEmitInfo*& null_check_info);
 450 
 451  public:
 452   Compilation*  compilation() const              { return _compilation; }
 453   FrameMap*     frame_map() const                { return _compilation->frame_map(); }
 454   ciMethod*     method() const                   { return _method; }
 455   BlockBegin*   block() const                    { return _block; }
 456   IRScope*      scope() const                    { return block()->scope(); }
 457 
 458   int max_virtual_register_number() const        { return _virtual_register_number; }
 459 
 460   void block_do(BlockBegin* block);
 461 




  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  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_LIRGENERATOR_HPP
  26 #define SHARE_VM_C1_C1_LIRGENERATOR_HPP
  27 
  28 #include "c1/c1_Instruction.hpp"
  29 #include "c1/c1_LIR.hpp"
  30 #include "ci/ciMethodData.hpp"
  31 #include "jfr/support/jfrIntrinsics.hpp"
  32 #include "utilities/sizes.hpp"
  33 
  34 // The classes responsible for code emission and register allocation
  35 
  36 
  37 class LIRGenerator;
  38 class LIREmitter;
  39 class Invoke;
  40 class SwitchRange;
  41 class LIRItem;
  42 
  43 define_array(LIRItemArray, LIRItem*)
  44 define_stack(LIRItemList, LIRItemArray)
  45 
  46 class SwitchRange: public CompilationResourceObj {
  47  private:
  48   int _low_key;
  49   int _high_key;
  50   BlockBegin* _sux;
  51  public:


 420     case If::geq: l = lir_cond_greaterEqual; break;
 421     case If::gtr: l = lir_cond_greater;      break;
 422     case If::aeq: l = lir_cond_aboveEqual;   break;
 423     case If::beq: l = lir_cond_belowEqual;   break;
 424     default: fatal("You must pass valid If::Condition");
 425     };
 426     return l;
 427   }
 428 
 429 #ifdef __SOFTFP__
 430   void do_soft_float_compare(If *x);
 431 #endif // __SOFTFP__
 432 
 433   void init();
 434 
 435   SwitchRangeArray* create_lookup_ranges(TableSwitch* x);
 436   SwitchRangeArray* create_lookup_ranges(LookupSwitch* x);
 437   void do_SwitchRanges(SwitchRangeArray* x, LIR_Opr value, BlockBegin* default_sux);
 438 
 439   void do_RuntimeCall(address routine, int expected_arguments, Intrinsic* x);
 440 #ifdef JFR_HAVE_INTRINSICS

 441   void do_ClassIDIntrinsic(Intrinsic* x);
 442   void do_getEventWriter(Intrinsic* x);
 443 #endif
 444   ciKlass* profile_type(ciMethodData* md, int md_first_offset, int md_offset, intptr_t profiled_k,
 445                         Value arg, LIR_Opr& mdp, bool not_null, ciKlass* signature_at_call_k,
 446                         ciKlass* callee_signature_k);
 447   void profile_arguments(ProfileCall* x);
 448   void profile_parameters(Base* x);
 449   void profile_parameters_at_call(ProfileCall* x);
 450   LIR_Opr maybe_mask_boolean(StoreIndexed* x, LIR_Opr array, LIR_Opr value, CodeEmitInfo*& null_check_info);
 451 
 452  public:
 453   Compilation*  compilation() const              { return _compilation; }
 454   FrameMap*     frame_map() const                { return _compilation->frame_map(); }
 455   ciMethod*     method() const                   { return _method; }
 456   BlockBegin*   block() const                    { return _block; }
 457   IRScope*      scope() const                    { return block()->scope(); }
 458 
 459   int max_virtual_register_number() const        { return _virtual_register_number; }
 460 
 461   void block_do(BlockBegin* block);
 462 


< prev index next >