arsenm wrote:

> I don't understand the high level motivation here. "Normal" 
> combining/simplification order is to visit the operands of an instruction 
> before you visit the instruction itself. 

Pattern matching is bottom up. This is essentially a selection problem, and 
selection is done bottom up.

> That way the "visit" function can assume that the operands have already been 
> simplified. 

This is one of the problems, you want to see the original value before it's 
been dirtied up by the transformations.

> GlobalISel combines already work this way,

The globalisel combiner is in reverse order.

Doing it in reverse also largely avoids the problem of stale uniformity info. 
All newly created values are falsely seen as uniform. If you do it in reverse, 
you don't encounter those new incorrect values 



https://github.com/llvm/llvm-project/pull/145484
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to