Hi Chris, > /// RemapNode - If the specified value was already legalized to another > value, > /// replace it by that value. > void DAGTypeLegalizer::RemapNode(SDOperand &N) { > - DenseMap<SDOperand, SDOperand>::iterator I = ReplacedNodes.find(N); > - if (I != ReplacedNodes.end()) { > - RemapNode(I->second); > + for (DenseMap<SDOperand, SDOperand>::iterator I = ReplacedNodes.find(N); > + I != ReplacedNodes.end(); I = ReplacedNodes.find(N)) > N = I->second; > - } > }
in the original version this updated the map too (or at least it was supposed to). For example, suppose we remap N and the map contained: N -> A A -> B B -> C then afterwards we would get N = C, but also the map would be modified to: N -> C A -> C B -> C This was supposed to speed up later lookups. > + if (SDNode *P = TLI.ExpandOperationResult(N, DAG)) { > + // Everything that once used N now uses P. P had better not require > + // custom expansion. How about an assertion that it doesn't require custom expansion? Ciao, Duncan. _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits