comparison src/share/vm/opto/type.hpp @ 14495:cd5d10655495

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 45467c53f178
children 484a359ff649
comparison
equal deleted inserted replaced
14494:5292439ef895 14495:cd5d10655495
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:
565 570
566 // Check for positive 32-bit value. 571 // Check for positive 32-bit value.
567 int is_positive_int() const { return _lo >= 0 && _hi <= (jlong)max_jint; } 572 int is_positive_int() const { return _lo >= 0 && _hi <= (jlong)max_jint; }
568 573
569 virtual bool is_finite() const; // Has a finite value 574 virtual bool is_finite() const; // Has a finite value
575
570 576
571 virtual const Type *xmeet( const Type *t ) const; 577 virtual const Type *xmeet( const Type *t ) const;
572 virtual const Type *xdual() const; // Compute dual right now. 578 virtual const Type *xdual() const; // Compute dual right now.
573 virtual const Type *widen( const Type *t, const Type* limit_type ) const; 579 virtual const Type *widen( const Type *t, const Type* limit_type ) const;
574 virtual const Type *narrow( const Type *t ) const; 580 virtual const Type *narrow( const Type *t ) const;
578 static const TypeLong *ONE; 584 static const TypeLong *ONE;
579 static const TypeLong *POS; 585 static const TypeLong *POS;
580 static const TypeLong *LONG; 586 static const TypeLong *LONG;
581 static const TypeLong *INT; // 32-bit subrange [min_jint..max_jint] 587 static const TypeLong *INT; // 32-bit subrange [min_jint..max_jint]
582 static const TypeLong *UINT; // 32-bit unsigned [0..max_juint] 588 static const TypeLong *UINT; // 32-bit unsigned [0..max_juint]
589 static const TypeLong *TYPE_DOMAIN; // alias for TypeLong::LONG
590
591 // static convenience methods.
592 static const TypeLong *as_self(const Type *t) { return t->is_long(); }
593
583 #ifndef PRODUCT 594 #ifndef PRODUCT
584 virtual void dump2( Dict &d, uint, outputStream *st ) const;// Specialized per-Type dumping 595 virtual void dump2( Dict &d, uint, outputStream *st ) const;// Specialized per-Type dumping
585 #endif 596 #endif
586 }; 597 };
587 598