<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>Hi,</div><div><br></div><div>the attached patch iteratively hoists two loads to the same address out of a diamond (hammock) and merges them</div><div>into a single load in the header. Similar it sinks and merges two stores to the tail block. The algorithm</div><div>iterates over the instructions of one side of the diamond and attempts to find a matching load/store on</div><div>the other side. It hoists / sinks when it thinks it safe to do so. It runs as part of GVN in the GVN preparation</div><div>loop.  I tailored the code as conservative as possible to catch the initial cases we are interested in, which </div><div>keeps code size and complexity in check. The optimization helps hiding load latencies and triggering if-conversion.</div><div><br></div><div>The optimization gives gains on some internal benchmarks and about ~2% on SPEC mcf.</div><div><br></div><div>I have not measured a sizable compiler-time impact.</div><div><br></div><div>Cheers</div><div>Gerolf</div><div><br></div><div></div><div></div></body></html>