(Note, this list is stuff in the Scalar directory only. Everything in
Vectorize would n eed it, etc)
And in case folks want more evidence that reasonable llvm developers need
something that just gives easy and right answers, see
https://reviews.llvm.org/D22547 from just yesterday
To move this along, i will go build the analysis (I already have it mostly
done, actually). If someone updates our docs to make this stuff clear and
obvious, that would be wonderful
The analysis currently computes, internally, for a given BB:
EarliestLoadHoistBarrier (used to see if you can move something out of a
block)
LatestLoadHoistBarrier (used to find the latest safe insertion point in a
block, if any)
EarliestStoreSinkBarrier (insertion)
LatestStoreSinkBarrier (movement)
(stores are maythrow dependent, loads are
isGuaranteedToTransferExecutionToSuccessor dependent)
I'm still coming up with the external API, the users all want to know
either:
1. Can i move a load up out of this block to a direct predecessor
2. Can i move a store down out of this block to a direct successor
GVN's current load PRE is complex to get "right" from it's current
standpoint, the APi that will provide the easiest way to fix it will be:
3. What is the latest insertion point in a block for a load, if it is safe
(IE the block does not end in an instruction you cannot move the load
before).
Nothing is doing global store sinking right now that i see, so nothing
needs the analogous store api.