[PATCH] D66987: [InlineCost] Perform caller store analysis

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 3 16:45:22 PDT 2019


chandlerc added a comment.

This idea isn't fundamentally flawed, its a good idea and something we've discussed many times.

The tricky thing I think will be getting it right.

I think you're going to need a much more powerful form of analysis, specifically something like MemorySSA to do this kind of thing well. Integrating MemorySSA into the inliner and using it to do powerful store->load forwarding would be *awesome*, but it is also going to be a quite a lot of work I fear.

Doing something simpler is likely possible along the lines of what you're starting to do here, but I fear we will have to chase a very long tail of subtle corner cases even with these kinds of simplifications (only look at stores in the callee, only look at constant offsets, etc. etc.).

Not sure how far down you want to go on this rabbit hole? That'll somewhat dictate the direction I suggest...


Repository:
  rL LLVM

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

https://reviews.llvm.org/D66987





More information about the llvm-commits mailing list