[PATCH] D38133: [CGP] Make optimizeMemoryInst introduce a select/phi if it improves things

John Brawn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 25 09:30:55 PDT 2017


john.brawn added a comment.

OK, so looking at the comments here and looking at https://reviews.llvm.org/D36073 what looks like it would be the easiest way to progress things forwards is:

- I split out the select handling into a separate patch.
- I split out a patch which gathers the AddrModes and figures out how they differ, but then bails out when we get to sinking if we have more than one.
- @skatkov modifies https://reviews.llvm.org/D36073 to build on top of this - from a brief look at FindCommonBase and the functions they call it looks like they could be modified to handle taking the AddrModes vector, so then we can handle the DifferentBase case similar to as in this patch but with AddrMode.BaseReg = FindCommonBase() instead of AddrMode.BaseReg = CreateSelectOrPhi().
- I then write a patch on top of that which modifies FindCommonBase to handle the fields other than the base register.

Does this seem reasonable?


Repository:
  rL LLVM

https://reviews.llvm.org/D38133





More information about the llvm-commits mailing list