@@ -335,9 +335,6 @@ class PhaseTransform : public Phase {
335
335
const Type* limit_type) const
336
336
{ ShouldNotCallThis (); return NULL ; }
337
337
338
- // Delayed node rehash if this is an IGVN phase
339
- virtual void igvn_rehash_node_delayed (Node* n) {}
340
-
341
338
// true if CFG node d dominates CFG node n
342
339
virtual bool is_dominator (Node *d, Node *n) { fatal (" unimplemented for this pass" ); return false ; };
343
340
@@ -369,18 +366,18 @@ class PhaseTransform : public Phase {
369
366
class PhaseValues : public PhaseTransform {
370
367
protected:
371
368
NodeHash _table; // Hash table for value-numbering
372
-
369
+ bool _iterGVN;
373
370
public:
374
- PhaseValues ( Arena * arena, uint est_max_size );
375
- PhaseValues ( PhaseValues *pt );
376
- NOT_PRODUCT ( ~PhaseValues (); )
377
- virtual PhaseIterGVN * is_IterGVN () { return 0 ; }
371
+ PhaseValues (Arena* arena, uint est_max_size);
372
+ PhaseValues (PhaseValues* pt );
373
+ NOT_PRODUCT (~PhaseValues ();)
374
+ PhaseIterGVN* is_IterGVN () { return (_iterGVN) ? (PhaseIterGVN*) this : NULL ; }
378
375
379
376
// Some Ideal and other transforms delete --> modify --> insert values
380
- bool hash_delete (Node * n) { return _table.hash_delete (n); }
381
- void hash_insert (Node * n) { _table.hash_insert (n); }
382
- Node * hash_find_insert (Node * n){ return _table.hash_find_insert (n); }
383
- Node * hash_find (const Node * n) { return _table.hash_find (n); }
377
+ bool hash_delete (Node* n) { return _table.hash_delete (n); }
378
+ void hash_insert (Node* n) { _table.hash_insert (n); }
379
+ Node* hash_find_insert (Node* n){ return _table.hash_find_insert (n); }
380
+ Node* hash_find (const Node* n) { return _table.hash_find (n); }
384
381
385
382
// Used after parsing to eliminate values that are no longer in program
386
383
void remove_useless_nodes (VectorSet &useful) {
@@ -391,8 +388,8 @@ class PhaseValues : public PhaseTransform {
391
388
392
389
virtual ConNode* uncached_makecon (const Type* t); // override from PhaseTransform
393
390
394
- virtual const Type* saturate (const Type* new_type, const Type* old_type,
395
- const Type* limit_type) const
391
+ const Type* saturate (const Type* new_type, const Type* old_type,
392
+ const Type* limit_type) const
396
393
{ return new_type; }
397
394
398
395
#ifndef PRODUCT
@@ -463,15 +460,13 @@ class PhaseIterGVN : public PhaseGVN {
463
460
// improvement, such that it would take many (>>10) steps to reach 2**32.
464
461
465
462
public:
466
- PhaseIterGVN ( PhaseIterGVN *igvn ); // Used by CCP constructor
467
- PhaseIterGVN ( PhaseGVN *gvn ); // Used after Parser
463
+ PhaseIterGVN (PhaseIterGVN* igvn ); // Used by CCP constructor
464
+ PhaseIterGVN (PhaseGVN* gvn ); // Used after Parser
468
465
469
466
// Idealize new Node 'n' with respect to its inputs and its value
470
467
virtual Node *transform ( Node *a_node );
471
468
virtual void record_for_igvn (Node *n) { }
472
469
473
- virtual PhaseIterGVN *is_IterGVN () { return this ; }
474
-
475
470
Unique_Node_List _worklist; // Iterative worklist
476
471
477
472
// Given def-use info and an initial worklist, apply Node::Ideal,
@@ -527,10 +522,6 @@ class PhaseIterGVN : public PhaseGVN {
527
522
_worklist.push (n);
528
523
}
529
524
530
- void igvn_rehash_node_delayed (Node* n) {
531
- rehash_node_delayed (n);
532
- }
533
-
534
525
// Replace ith edge of "n" with "in"
535
526
void replace_input_of (Node* n, int i, Node* in) {
536
527
rehash_node_delayed (n);
0 commit comments