378 void dominated_by(Node* prev_dom, PhaseIterGVN* igvn);
379 int is_range_check(Node* &range, Node* &index, jint &offset);
380 Node* fold_compares(PhaseIterGVN* phase);
381 static Node* up_one_dom(Node* curr, bool linear_only = false);
382
383 // Takes the type of val and filters it through the test represented
384 // by if_proj and returns a more refined type if one is produced.
385 // Returns NULL is it couldn't improve the type.
386 static const TypeInt* filtered_int_type(PhaseGVN* phase, Node* val, Node* if_proj);
387
388 #ifndef PRODUCT
389 virtual void dump_spec(outputStream *st) const;
390 virtual void related(GrowableArray <Node *> *in_rel, GrowableArray <Node *> *out_rel, bool compact) const;
391 #endif
392 };
393
394 class IfProjNode : public CProjNode {
395 public:
396 IfProjNode(IfNode *ifnode, uint idx) : CProjNode(ifnode,idx) {}
397 virtual Node *Identity(PhaseTransform *phase);
398
399 protected:
400 // Type of If input when this branch is always taken
401 virtual bool always_taken(const TypeTuple* t) const = 0;
402
403 #ifndef PRODUCT
404 public:
405 virtual void related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const;
406 #endif
407 };
408
409 class IfTrueNode : public IfProjNode {
410 public:
411 IfTrueNode( IfNode *ifnode ) : IfProjNode(ifnode,1) {
412 init_class_id(Class_IfTrue);
413 }
414 virtual int Opcode() const;
415
416 protected:
417 virtual bool always_taken(const TypeTuple* t) const { return t == TypeTuple::IFTRUE; }
|
378 void dominated_by(Node* prev_dom, PhaseIterGVN* igvn);
379 int is_range_check(Node* &range, Node* &index, jint &offset);
380 Node* fold_compares(PhaseIterGVN* phase);
381 static Node* up_one_dom(Node* curr, bool linear_only = false);
382
383 // Takes the type of val and filters it through the test represented
384 // by if_proj and returns a more refined type if one is produced.
385 // Returns NULL is it couldn't improve the type.
386 static const TypeInt* filtered_int_type(PhaseGVN* phase, Node* val, Node* if_proj);
387
388 #ifndef PRODUCT
389 virtual void dump_spec(outputStream *st) const;
390 virtual void related(GrowableArray <Node *> *in_rel, GrowableArray <Node *> *out_rel, bool compact) const;
391 #endif
392 };
393
394 class IfProjNode : public CProjNode {
395 public:
396 IfProjNode(IfNode *ifnode, uint idx) : CProjNode(ifnode,idx) {}
397 virtual Node *Identity(PhaseTransform *phase);
398 virtual Node* Ideal(PhaseGVN* phase, bool can_reshape);
399
400 protected:
401 // Type of If input when this branch is always taken
402 virtual bool always_taken(const TypeTuple* t) const = 0;
403
404 #ifndef PRODUCT
405 public:
406 virtual void related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const;
407 #endif
408 };
409
410 class IfTrueNode : public IfProjNode {
411 public:
412 IfTrueNode( IfNode *ifnode ) : IfProjNode(ifnode,1) {
413 init_class_id(Class_IfTrue);
414 }
415 virtual int Opcode() const;
416
417 protected:
418 virtual bool always_taken(const TypeTuple* t) const { return t == TypeTuple::IFTRUE; }
|