[PATCH] D118144: [GVN] Support chain of phi nodes in exit blocks.

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 31 12:20:18 PST 2022


reames added a comment.

Really not a fan here.

I think what we need to do is recognize the address clobber being from a select, and then perform both sides of the memory dependency "as if" we had two loads at the point of the select.  Doing that would let this work generically.

I'd mentioned this scheme in the prior patch, but I was sorta okay with the special casing there.  I'm really not on board with the extension made here.

Note that you don't need to go all the way to the fully general scheme.  You could fork the analysis only once and handle only the case where there's a single select on the address.  You do need to be consistent for both within block and cross block, but that's a different issue.

As an aside, I think this whole problem gets much easier if we can use the MSSA interfaces.  I know there's someone trying to switch legacy GVN to MSSA.  It might be worth trying to drive that through, and then revisiting.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118144/new/

https://reviews.llvm.org/D118144



More information about the llvm-commits mailing list