[PATCH] Review for hoisting and sinking of equivalent memory instruction (Instruction Merge Pass)

Daniel Berlin dberlin at dberlin.org
Wed Jun 11 21:04:44 PDT 2014

It's not possible to do a *complete* job of store sinking/load
hoisting in better time bounds.

However,  it is possible to do *this* particular part of it in better
time bounds (through creative use of value numbering loads and a hash
table).  LLVM doesn't have the infrastructure right now to make this
easy, however.

On Tue, Jun 10, 2014 at 11:15 PM, Tobias Grosser <tobias at grosser.es> wrote:
> On 10/06/2014 22:43, Gerolf Hoflehner wrote:
>> Hi chandlerc,
>> This pass iteratively hoists two loads to the same address out of a
>> diamond (hammock) and merges them
>> into a single load in the header. Similar it sinks and merges two stores
>> to the tail block. The algorithm
>> iterates over the instructions of one side of the diamond and attempts to
>> find a matching load/store on
>> the other side. It hoists / sinks when it thinks it safe to do so.  I
>> tailored the code as conservative as possible to catch the initial cases we
>> are interested in, which keeps code size and complexity in check. The
>> optimization helps hiding load latencies and triggering if-conversion.
>> http://reviews.llvm.org/D4096
> Hi Gerolf,
> just a high-level comment. This algorithm seems to have quadratic run time.
> Is this intended?
> Cheers,
> Tobias
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

More information about the llvm-commits mailing list