comparison src/share/vm/opto/type.hpp @ 17726:085b304a1cc5

8027754: Enable loop optimizations for loops with MathExact inside Reviewed-by: kvn, iveresov
author rbackman
date Thu, 23 Jan 2014 12:08:28 +0100
parents de95063c0e34
children 62825ea7e51f
comparison
equal deleted inserted replaced
17725:b4ce4e9eb97d 17726:085b304a1cc5
487 TypeInt( jint lo, jint hi, int w ); 487 TypeInt( jint lo, jint hi, int w );
488 protected: 488 protected:
489 virtual const Type *filter_helper(const Type *kills, bool include_speculative) const; 489 virtual const Type *filter_helper(const Type *kills, bool include_speculative) const;
490 490
491 public: 491 public:
492 typedef jint NativeType;
492 virtual bool eq( const Type *t ) const; 493 virtual bool eq( const Type *t ) const;
493 virtual int hash() const; // Type specific hashing 494 virtual int hash() const; // Type specific hashing
494 virtual bool singleton(void) const; // TRUE if type is a singleton 495 virtual bool singleton(void) const; // TRUE if type is a singleton
495 virtual bool empty(void) const; // TRUE if type is vacuous 496 virtual bool empty(void) const; // TRUE if type is vacuous
496 const jint _lo, _hi; // Lower bound, upper bound 497 const jint _lo, _hi; // Lower bound, upper bound
529 static const TypeInt *SHORT; 530 static const TypeInt *SHORT;
530 static const TypeInt *POS; 531 static const TypeInt *POS;
531 static const TypeInt *POS1; 532 static const TypeInt *POS1;
532 static const TypeInt *INT; 533 static const TypeInt *INT;
533 static const TypeInt *SYMINT; // symmetric range [-max_jint..max_jint] 534 static const TypeInt *SYMINT; // symmetric range [-max_jint..max_jint]
535 static const TypeInt *TYPE_DOMAIN; // alias for TypeInt::INT
536
537 static const TypeInt *as_self(const Type *t) { return t->is_int(); }
534 #ifndef PRODUCT 538 #ifndef PRODUCT
535 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; 539 virtual void dump2( Dict &d, uint depth, outputStream *st ) const;
536 #endif 540 #endif
537 }; 541 };
538 542
544 TypeLong( jlong lo, jlong hi, int w ); 548 TypeLong( jlong lo, jlong hi, int w );
545 protected: 549 protected:
546 // Do not kill _widen bits. 550 // Do not kill _widen bits.
547 virtual const Type *filter_helper(const Type *kills, bool include_speculative) const; 551 virtual const Type *filter_helper(const Type *kills, bool include_speculative) const;
548 public: 552 public:
553 typedef jlong NativeType;
549 virtual bool eq( const Type *t ) const; 554 virtual bool eq( const Type *t ) const;
550 virtual int hash() const; // Type specific hashing 555 virtual int hash() const; // Type specific hashing
551 virtual bool singleton(void) const; // TRUE if type is a singleton 556 virtual bool singleton(void) const; // TRUE if type is a singleton
552 virtual bool empty(void) const; // TRUE if type is vacuous 557 virtual bool empty(void) const; // TRUE if type is vacuous
553 public: 558 public:
562 int is_con() const { return _lo==_hi; } 567 int is_con() const { return _lo==_hi; }
563 bool is_con(int i) const { return is_con() && _lo == i; } 568 bool is_con(int i) const { return is_con() && _lo == i; }
564 jlong get_con() const { assert( is_con(), "" ); return _lo; } 569 jlong get_con() const { assert( is_con(), "" ); return _lo; }
565 570
566 virtual bool is_finite() const; // Has a finite value 571 virtual bool is_finite() const; // Has a finite value
572
567 573
568 virtual const Type *xmeet( const Type *t ) const; 574 virtual const Type *xmeet( const Type *t ) const;
569 virtual const Type *xdual() const; // Compute dual right now. 575 virtual const Type *xdual() const; // Compute dual right now.
570 virtual const Type *widen( const Type *t, const Type* limit_type ) const; 576 virtual const Type *widen( const Type *t, const Type* limit_type ) const;
571 virtual const Type *narrow( const Type *t ) const; 577 virtual const Type *narrow( const Type *t ) const;
575 static const TypeLong *ONE; 581 static const TypeLong *ONE;
576 static const TypeLong *POS; 582 static const TypeLong *POS;
577 static const TypeLong *LONG; 583 static const TypeLong *LONG;
578 static const TypeLong *INT; // 32-bit subrange [min_jint..max_jint] 584 static const TypeLong *INT; // 32-bit subrange [min_jint..max_jint]
579 static const TypeLong *UINT; // 32-bit unsigned [0..max_juint] 585 static const TypeLong *UINT; // 32-bit unsigned [0..max_juint]
586 static const TypeLong *TYPE_DOMAIN; // alias for TypeLong::LONG
587
588 // static convenience methods.
589 static const TypeLong *as_self(const Type *t) { return t->is_long(); }
590
580 #ifndef PRODUCT 591 #ifndef PRODUCT
581 virtual void dump2( Dict &d, uint, outputStream *st ) const;// Specialized per-Type dumping 592 virtual void dump2( Dict &d, uint, outputStream *st ) const;// Specialized per-Type dumping
582 #endif 593 #endif
583 }; 594 };
584 595