1.1 --- a/src/share/vm/opto/node.cpp Mon Mar 09 13:34:00 2009 -0700 1.2 +++ b/src/share/vm/opto/node.cpp Thu Mar 12 18:16:36 2009 -0700 1.3 @@ -968,22 +968,23 @@ 1.4 // Example: when reshape "(X+3)+4" into "X+7" you must leave the Node for 1.5 // "X+3" unchanged in case it is shared. 1.6 // 1.7 -// If you modify the 'this' pointer's inputs, you must use 'set_req' with 1.8 -// def-use info. If you are making a new Node (either as the new root or 1.9 -// some new internal piece) you must NOT use set_req with def-use info. 1.10 -// You can make a new Node with either 'new' or 'clone'. In either case, 1.11 -// def-use info is (correctly) not generated. 1.12 +// If you modify the 'this' pointer's inputs, you should use 1.13 +// 'set_req'. If you are making a new Node (either as the new root or 1.14 +// some new internal piece) you may use 'init_req' to set the initial 1.15 +// value. You can make a new Node with either 'new' or 'clone'. In 1.16 +// either case, def-use info is correctly maintained. 1.17 +// 1.18 // Example: reshape "(X+3)+4" into "X+7": 1.19 -// set_req(1,in(1)->in(1) /* grab X */, du /* must use DU on 'this' */); 1.20 -// set_req(2,phase->intcon(7),du); 1.21 +// set_req(1, in(1)->in(1)); 1.22 +// set_req(2, phase->intcon(7)); 1.23 // return this; 1.24 -// Example: reshape "X*4" into "X<<1" 1.25 -// return new (C,3) LShiftINode( in(1), phase->intcon(1) ); 1.26 +// Example: reshape "X*4" into "X<<2" 1.27 +// return new (C,3) LShiftINode(in(1), phase->intcon(2)); 1.28 // 1.29 // You must call 'phase->transform(X)' on any new Nodes X you make, except 1.30 -// for the returned root node. Example: reshape "X*31" with "(X<<5)-1". 1.31 +// for the returned root node. Example: reshape "X*31" with "(X<<5)-X". 1.32 // Node *shift=phase->transform(new(C,3)LShiftINode(in(1),phase->intcon(5))); 1.33 -// return new (C,3) AddINode(shift, phase->intcon(-1)); 1.34 +// return new (C,3) AddINode(shift, in(1)); 1.35 // 1.36 // When making a Node for a constant use 'phase->makecon' or 'phase->intcon'. 1.37 // These forms are faster than 'phase->transform(new (C,1) ConNode())' and Do 1.38 @@ -1679,7 +1680,7 @@ 1.39 if (visited.member(this)) return; 1.40 visited.push(this); 1.41 1.42 - // Walk over all input edges, checking for correspondance 1.43 + // Walk over all input edges, checking for correspondence 1.44 for( i = 0; i < len(); i++ ) { 1.45 n = in(i); 1.46 if (n != NULL && !n->is_top()) { 1.47 @@ -1723,7 +1724,7 @@ 1.48 // Contained in new_space or old_space? 1.49 VectorSet *v = C->node_arena()->contains(n) ? &new_space : &old_space; 1.50 // Check for visited in the proper space. Numberings are not unique 1.51 - // across spaces so we need a seperate VectorSet for each space. 1.52 + // across spaces so we need a separate VectorSet for each space. 1.53 if( v->test_set(n->_idx) ) return; 1.54 1.55 if (n->is_Con() && n->bottom_type() == Type::TOP) {