[PATCH] D139415: [RFC][WebAssembly] Optimize GEPs

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 7 02:11:35 PST 2022


samparker added a comment.

> Do you have specific examples of those existing passes deficiencies?

I'd firstly say that I think this is a very webassembly shaped problem, I don't think any other architectures will have similar addressing modes.

As to the specific problems, it's mainly due to SCEVExpander often not being able to regenerate no wrap flags or inbound geps. Judging by the number of TODOs in that area, and I think I've done some in the past, it seems very much non-trivial. The function that I was looking at for this was SCEVExpander::expandAddToGEP. If there is a clear plan on how this can be implemented, I would be very happy to hear it.

LSR is just the driver of the problem... but a very dense driver at that (which I struggle with!), but the main problem is that it isn't very 'predictable' when it comes to unrolled loops, due it's complexity limit, which results in LSR behaving differently for different sized loops.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139415



More information about the llvm-commits mailing list