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

Tobias Grosser tobias at grosser.es
Tue Jun 10 23:15:01 PDT 2014


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



More information about the llvm-commits mailing list