367 #if OPTO_DU_ITERATOR_ASSERT
368 // Record that a change happened here.
369 debug_only(_last_del = _out[i]; ++_del_tick);
370 #endif
371 _out[i] = _out[--_outcnt];
372 // Smash the old edge so it can't be used accidentally.
373 debug_only(_out[_outcnt] = (Node *)(uintptr_t)0xdeadbeef);
374 }
375
376 #ifdef ASSERT
377 bool is_dead() const;
378 #define is_not_dead(n) ((n) == NULL || !VerifyIterativeGVN || !((n)->is_dead()))
379 #endif
380 // Check whether node has become unreachable
381 bool is_unreachable(PhaseIterGVN &igvn) const;
382
383 // Set a required input edge, also updates corresponding output edge
384 void add_req( Node *n ); // Append a NEW required input
385 void add_req_batch( Node* n, uint m ); // Append m NEW required inputs (all n).
386 void del_req( uint idx ); // Delete required edge & compact
387 void ins_req( uint i, Node *n ); // Insert a NEW required input
388 void set_req( uint i, Node *n ) {
389 assert( is_not_dead(n), "can not use dead node");
390 assert( i < _cnt, err_msg_res("oob: i=%d, _cnt=%d", i, _cnt));
391 assert( !VerifyHashTableKeys || _hash_lock == 0,
392 "remove node from hash table before modifying it");
393 Node** p = &_in[i]; // cache this._in, across the del_out call
394 if (*p != NULL) (*p)->del_out((Node *)this);
395 (*p) = n;
396 if (n != NULL) n->add_out((Node *)this);
397 }
398 // Light version of set_req() to init inputs after node creation.
399 void init_req( uint i, Node *n ) {
400 assert( i == 0 && this == n ||
401 is_not_dead(n), "can not use dead node");
402 assert( i < _cnt, "oob");
403 assert( !VerifyHashTableKeys || _hash_lock == 0,
404 "remove node from hash table before modifying it");
405 assert( _in[i] == NULL, "sanity");
406 _in[i] = n;
|
367 #if OPTO_DU_ITERATOR_ASSERT
368 // Record that a change happened here.
369 debug_only(_last_del = _out[i]; ++_del_tick);
370 #endif
371 _out[i] = _out[--_outcnt];
372 // Smash the old edge so it can't be used accidentally.
373 debug_only(_out[_outcnt] = (Node *)(uintptr_t)0xdeadbeef);
374 }
375
376 #ifdef ASSERT
377 bool is_dead() const;
378 #define is_not_dead(n) ((n) == NULL || !VerifyIterativeGVN || !((n)->is_dead()))
379 #endif
380 // Check whether node has become unreachable
381 bool is_unreachable(PhaseIterGVN &igvn) const;
382
383 // Set a required input edge, also updates corresponding output edge
384 void add_req( Node *n ); // Append a NEW required input
385 void add_req_batch( Node* n, uint m ); // Append m NEW required inputs (all n).
386 void del_req( uint idx ); // Delete required edge & compact
387 void del_req_ordered( uint idx ); // Delete required edge & compact with preserved order
388 void ins_req( uint i, Node *n ); // Insert a NEW required input
389 void set_req( uint i, Node *n ) {
390 assert( is_not_dead(n), "can not use dead node");
391 assert( i < _cnt, err_msg_res("oob: i=%d, _cnt=%d", i, _cnt));
392 assert( !VerifyHashTableKeys || _hash_lock == 0,
393 "remove node from hash table before modifying it");
394 Node** p = &_in[i]; // cache this._in, across the del_out call
395 if (*p != NULL) (*p)->del_out((Node *)this);
396 (*p) = n;
397 if (n != NULL) n->add_out((Node *)this);
398 }
399 // Light version of set_req() to init inputs after node creation.
400 void init_req( uint i, Node *n ) {
401 assert( i == 0 && this == n ||
402 is_not_dead(n), "can not use dead node");
403 assert( i < _cnt, "oob");
404 assert( !VerifyHashTableKeys || _hash_lock == 0,
405 "remove node from hash table before modifying it");
406 assert( _in[i] == NULL, "sanity");
407 _in[i] = n;
|