src/share/vm/opto/type.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/opto

src/share/vm/opto/type.hpp

Print this page
rev 5902 : 8027754: Enable loop optimizations for loops with MathExact inside


 441   static const TypeF *make(float f);
 442 
 443   virtual bool        is_finite() const;  // Has a finite value
 444   virtual bool        is_nan()    const;  // Is not a number (NaN)
 445 
 446   virtual const Type *xmeet( const Type *t ) const;
 447   virtual const Type *xdual() const;    // Compute dual right now.
 448   // Convenience common pre-built types.
 449   static const TypeF *ZERO; // positive zero only
 450   static const TypeF *ONE;
 451 #ifndef PRODUCT
 452   virtual void dump2( Dict &d, uint depth, outputStream *st ) const;
 453 #endif
 454 };
 455 
 456 //------------------------------TypeD------------------------------------------
 457 // Class of Double-Constant Types.
 458 class TypeD : public Type {
 459   TypeD( double d ) : Type(DoubleCon), _d(d) {};
 460 public:

 461   virtual bool eq( const Type *t ) const;
 462   virtual int  hash() const;             // Type specific hashing
 463   virtual bool singleton(void) const;    // TRUE if type is a singleton
 464   virtual bool empty(void) const;        // TRUE if type is vacuous
 465 public:
 466   const double _d;              // Double constant
 467 
 468   static const TypeD *make(double d);
 469 
 470   virtual bool        is_finite() const;  // Has a finite value
 471   virtual bool        is_nan()    const;  // Is not a number (NaN)
 472 
 473   virtual const Type *xmeet( const Type *t ) const;
 474   virtual const Type *xdual() const;    // Compute dual right now.
 475   // Convenience common pre-built types.
 476   static const TypeD *ZERO; // positive zero only
 477   static const TypeD *ONE;
 478 #ifndef PRODUCT
 479   virtual void dump2( Dict &d, uint depth, outputStream *st ) const;
 480 #endif


 514   // Do not kill _widen bits.
 515   // Convenience common pre-built types.
 516   static const TypeInt *MINUS_1;
 517   static const TypeInt *ZERO;
 518   static const TypeInt *ONE;
 519   static const TypeInt *BOOL;
 520   static const TypeInt *CC;
 521   static const TypeInt *CC_LT;  // [-1]  == MINUS_1
 522   static const TypeInt *CC_GT;  // [1]   == ONE
 523   static const TypeInt *CC_EQ;  // [0]   == ZERO
 524   static const TypeInt *CC_LE;  // [-1,0]
 525   static const TypeInt *CC_GE;  // [0,1] == BOOL (!)
 526   static const TypeInt *BYTE;
 527   static const TypeInt *UBYTE;
 528   static const TypeInt *CHAR;
 529   static const TypeInt *SHORT;
 530   static const TypeInt *POS;
 531   static const TypeInt *POS1;
 532   static const TypeInt *INT;
 533   static const TypeInt *SYMINT; // symmetric range [-max_jint..max_jint]


 534 #ifndef PRODUCT
 535   virtual void dump2( Dict &d, uint depth, outputStream *st ) const;
 536 #endif
 537 };
 538 
 539 
 540 //------------------------------TypeLong---------------------------------------
 541 // Class of long integer ranges, the set of integers between a lower bound and
 542 // an upper bound, inclusive.
 543 class TypeLong : public Type {
 544   TypeLong( jlong lo, jlong hi, int w );
 545 protected:
 546   // Do not kill _widen bits.
 547   virtual const Type *filter_helper(const Type *kills, bool include_speculative) const;
 548 public:

 549   virtual bool eq( const Type *t ) const;
 550   virtual int  hash() const;             // Type specific hashing
 551   virtual bool singleton(void) const;    // TRUE if type is a singleton
 552   virtual bool empty(void) const;        // TRUE if type is vacuous
 553 public:
 554   const jlong _lo, _hi;         // Lower bound, upper bound
 555   const short _widen;           // Limit on times we widen this sucker
 556 
 557   static const TypeLong *make(jlong lo);
 558   // must always specify w
 559   static const TypeLong *make(jlong lo, jlong hi, int w);
 560 
 561   // Check for single integer
 562   int is_con() const { return _lo==_hi; }
 563   bool is_con(int i) const { return is_con() && _lo == i; }
 564   jlong get_con() const { assert( is_con(), "" ); return _lo; }
 565 
 566   // Check for positive 32-bit value.
 567   int is_positive_int() const { return _lo >= 0 && _hi <= (jlong)max_jint; }
 568 
 569   virtual bool        is_finite() const;  // Has a finite value
 570 
 571   virtual const Type *xmeet( const Type *t ) const;
 572   virtual const Type *xdual() const;    // Compute dual right now.
 573   virtual const Type *widen( const Type *t, const Type* limit_type ) const;
 574   virtual const Type *narrow( const Type *t ) const;
 575   // Convenience common pre-built types.
 576   static const TypeLong *MINUS_1;
 577   static const TypeLong *ZERO;
 578   static const TypeLong *ONE;
 579   static const TypeLong *POS;
 580   static const TypeLong *LONG;
 581   static const TypeLong *INT;    // 32-bit subrange [min_jint..max_jint]
 582   static const TypeLong *UINT;   // 32-bit unsigned [0..max_juint]

 583 #ifndef PRODUCT
 584   virtual void dump2( Dict &d, uint, outputStream *st  ) const;// Specialized per-Type dumping
 585 #endif
 586 };
 587 
 588 //------------------------------TypeTuple--------------------------------------
 589 // Class of Tuple Types, essentially type collections for function signatures
 590 // and class layouts.  It happens to also be a fast cache for the HotSpot
 591 // signature types.
 592 class TypeTuple : public Type {
 593   TypeTuple( uint cnt, const Type **fields ) : Type(Tuple), _cnt(cnt), _fields(fields) { }
 594 public:
 595   virtual bool eq( const Type *t ) const;
 596   virtual int  hash() const;             // Type specific hashing
 597   virtual bool singleton(void) const;    // TRUE if type is a singleton
 598   virtual bool empty(void) const;        // TRUE if type is vacuous
 599 
 600 public:
 601   const uint          _cnt;              // Count of fields
 602   const Type ** const _fields;           // Array of field types




 441   static const TypeF *make(float f);
 442 
 443   virtual bool        is_finite() const;  // Has a finite value
 444   virtual bool        is_nan()    const;  // Is not a number (NaN)
 445 
 446   virtual const Type *xmeet( const Type *t ) const;
 447   virtual const Type *xdual() const;    // Compute dual right now.
 448   // Convenience common pre-built types.
 449   static const TypeF *ZERO; // positive zero only
 450   static const TypeF *ONE;
 451 #ifndef PRODUCT
 452   virtual void dump2( Dict &d, uint depth, outputStream *st ) const;
 453 #endif
 454 };
 455 
 456 //------------------------------TypeD------------------------------------------
 457 // Class of Double-Constant Types.
 458 class TypeD : public Type {
 459   TypeD( double d ) : Type(DoubleCon), _d(d) {};
 460 public:
 461   typedef jint native_type_t;
 462   virtual bool eq( const Type *t ) const;
 463   virtual int  hash() const;             // Type specific hashing
 464   virtual bool singleton(void) const;    // TRUE if type is a singleton
 465   virtual bool empty(void) const;        // TRUE if type is vacuous
 466 public:
 467   const double _d;              // Double constant
 468 
 469   static const TypeD *make(double d);
 470 
 471   virtual bool        is_finite() const;  // Has a finite value
 472   virtual bool        is_nan()    const;  // Is not a number (NaN)
 473 
 474   virtual const Type *xmeet( const Type *t ) const;
 475   virtual const Type *xdual() const;    // Compute dual right now.
 476   // Convenience common pre-built types.
 477   static const TypeD *ZERO; // positive zero only
 478   static const TypeD *ONE;
 479 #ifndef PRODUCT
 480   virtual void dump2( Dict &d, uint depth, outputStream *st ) const;
 481 #endif


 515   // Do not kill _widen bits.
 516   // Convenience common pre-built types.
 517   static const TypeInt *MINUS_1;
 518   static const TypeInt *ZERO;
 519   static const TypeInt *ONE;
 520   static const TypeInt *BOOL;
 521   static const TypeInt *CC;
 522   static const TypeInt *CC_LT;  // [-1]  == MINUS_1
 523   static const TypeInt *CC_GT;  // [1]   == ONE
 524   static const TypeInt *CC_EQ;  // [0]   == ZERO
 525   static const TypeInt *CC_LE;  // [-1,0]
 526   static const TypeInt *CC_GE;  // [0,1] == BOOL (!)
 527   static const TypeInt *BYTE;
 528   static const TypeInt *UBYTE;
 529   static const TypeInt *CHAR;
 530   static const TypeInt *SHORT;
 531   static const TypeInt *POS;
 532   static const TypeInt *POS1;
 533   static const TypeInt *INT;
 534   static const TypeInt *SYMINT; // symmetric range [-max_jint..max_jint]
 535 
 536   static const Type *top() { return TypeInt::INT; }
 537 #ifndef PRODUCT
 538   virtual void dump2( Dict &d, uint depth, outputStream *st ) const;
 539 #endif
 540 };
 541 
 542 
 543 //------------------------------TypeLong---------------------------------------
 544 // Class of long integer ranges, the set of integers between a lower bound and
 545 // an upper bound, inclusive.
 546 class TypeLong : public Type {
 547   TypeLong( jlong lo, jlong hi, int w );
 548 protected:
 549   // Do not kill _widen bits.
 550   virtual const Type *filter_helper(const Type *kills, bool include_speculative) const;
 551 public:
 552   typedef jlong native_type_t;
 553   virtual bool eq( const Type *t ) const;
 554   virtual int  hash() const;             // Type specific hashing
 555   virtual bool singleton(void) const;    // TRUE if type is a singleton
 556   virtual bool empty(void) const;        // TRUE if type is vacuous
 557 public:
 558   const jlong _lo, _hi;         // Lower bound, upper bound
 559   const short _widen;           // Limit on times we widen this sucker
 560 
 561   static const TypeLong *make(jlong lo);
 562   // must always specify w
 563   static const TypeLong *make(jlong lo, jlong hi, int w);
 564 
 565   // Check for single integer
 566   int is_con() const { return _lo==_hi; }
 567   bool is_con(int i) const { return is_con() && _lo == i; }
 568   jlong get_con() const { assert( is_con(), "" ); return _lo; }
 569 
 570   // Check for positive 32-bit value.
 571   int is_positive_int() const { return _lo >= 0 && _hi <= (jlong)max_jint; }
 572 
 573   virtual bool        is_finite() const;  // Has a finite value
 574 
 575   virtual const Type *xmeet( const Type *t ) const;
 576   virtual const Type *xdual() const;    // Compute dual right now.
 577   virtual const Type *widen( const Type *t, const Type* limit_type ) const;
 578   virtual const Type *narrow( const Type *t ) const;
 579   // Convenience common pre-built types.
 580   static const TypeLong *MINUS_1;
 581   static const TypeLong *ZERO;
 582   static const TypeLong *ONE;
 583   static const TypeLong *POS;
 584   static const TypeLong *LONG;
 585   static const TypeLong *INT;    // 32-bit subrange [min_jint..max_jint]
 586   static const TypeLong *UINT;   // 32-bit unsigned [0..max_juint]
 587   static const Type *top() { return TypeLong::LONG; }
 588 #ifndef PRODUCT
 589   virtual void dump2( Dict &d, uint, outputStream *st  ) const;// Specialized per-Type dumping
 590 #endif
 591 };
 592 
 593 //------------------------------TypeTuple--------------------------------------
 594 // Class of Tuple Types, essentially type collections for function signatures
 595 // and class layouts.  It happens to also be a fast cache for the HotSpot
 596 // signature types.
 597 class TypeTuple : public Type {
 598   TypeTuple( uint cnt, const Type **fields ) : Type(Tuple), _cnt(cnt), _fields(fields) { }
 599 public:
 600   virtual bool eq( const Type *t ) const;
 601   virtual int  hash() const;             // Type specific hashing
 602   virtual bool singleton(void) const;    // TRUE if type is a singleton
 603   virtual bool empty(void) const;        // TRUE if type is vacuous
 604 
 605 public:
 606   const uint          _cnt;              // Count of fields
 607   const Type ** const _fields;           // Array of field types


src/share/vm/opto/type.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File