[llvm-commits] [llvm] r167912 - in /llvm/trunk: lib/CodeGen/SelectionDAG/DAGCombiner.cpp test/CodeGen/X86/pr14333.ll

Rafael EspĂ­ndola rafael.espindola at gmail.com
Wed Nov 14 06:37:37 PST 2012


> On 14/11/12 14:09, Rafael EspĂ­ndola wrote:
>>
>> Can we include this in 3.2?
>
>
> maybe RAUW itself should loop like this?  After all, who expects a RAUW to
> leave
> uses around?

Not sure, the implementation has this comment:

  // Iterate over all the existing uses of From. New uses will be added
  // to the beginning of the use list, which we avoid visiting.
  // This specifically avoids visiting uses of From that arise while the
  // replacement is happening, because any such uses would be the result
  // of CSE: If an existing node looks like From after one of its operands
  // is replaced by To, we don't want to replace of all its users with To
  // too. See PR3018 for more info.

The problem is that some of the uses introduced by CSE might not have
the same properties that caused the caller to decide to replace all
(existing) uses. Maybe replaceAllUsesWith should be
replaceAllExistingUsesWith and replaceAllUsesWith would include this
loop?

> Ciao, Duncan.

Cheers,
Rafael




More information about the llvm-commits mailing list