[llvm] PHIElimination: add target hook to control reuse. (PR #163604)

Junjie Gu via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 10 08:14:31 PST 2025


jgu222 wrote:

I feel there is misunderstanding here. Here is what I think this pass should do:
  1.  PHIElimination is generic and its translation is expected to be functionally correct for all targets
  2.  reuse in PHIElimination is an optional optimization. PHIElimination should function correctly with or without this reuse.
  
The reason for this PR is that (1) does not hold for our target.  We can surely work-around it.  But if so, why do we always perform this optimization when we know it is not correct for all targets ?  Especially,  this optimization is optional and potentially expensive ?

https://github.com/llvm/llvm-project/pull/163604


More information about the llvm-commits mailing list