<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Thanks Owen.<div><br></div><div>New patch attached.</div><div><br></div><div><div><div>On Oct 8, 2013, at 11:48 AM, Owen Anderson <<a href="mailto:resistor@mac.com">resistor@mac.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi Quentin,<div><br></div><div>After some more thought about it, I think I can be convinced that your approach is an overall benefit provided:</div><div><br></div><div> - You incorporate the free-vs-expensive bitcast modification, as you already have proposed</div></div></blockquote>Done.</div><div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div> - You provide clear documentation/comments on what the has-paired-load callback means and when a target should or should not implement it.  In particular, I think it needs to call out that a target should only set it if it plans to perform post-isel load combining.</div></div></blockquote><div>Done, here is the related modification:</div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">+  /// Return true if the target supplies and combines to a paired load</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">+  /// two loaded values of type LoadedType next to each other in memory.</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">+  /// RequiredAlignment gives the minimal alignment constraints that must be met to</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">+  /// be able to select this paired load.</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">+  ///</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">+  /// This information is *not* used to generate actual paired loads, but it is used</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">+  /// to generate a sequence of loads that is easier to combine into a paired load.</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">+  /// For instance, something like this:</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">+  /// a = load i64* addr</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">+  /// b = trunc i64 a to i32</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">+  /// c = lshr i64 a, 32</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">+  /// d = trunc i64 c to i32</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">+  /// will be optimized into:</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">+  /// b = load i32* addr1</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">+  /// d = load i32* addr2</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">+  /// Where addr1 = addr2 +/- sizeof(i32).</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">+  ///</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">+  /// In other words, unless the target performs a post-isel load combining, this </div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">+  /// information should not be provided because it will generate more loads.</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">+  virtual bool hasPairedLoad(Type * /*LoadedType*/,</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">+                             unsigned & /*RequiredAligment*/) const {</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">+    return false;</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">+  }</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">+</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">+  virtual bool hasPairedLoad(EVT /*LoadedType*/,</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">+                             unsigned & /*RequiredAligment*/) const {</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">+    return false;</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">+  }</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">+</div><div><br></div><div>Is the message clear?</div></div><div><br></div><div>Thanks again for your help!</div><div><br></div><div>-Quentin</div><div></div></div></div></body></html>