<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; "><br><div><div>On Oct 5, 2012, at 11:57 AM, Hal Finkel <<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><blockquote type="cite" style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><blockquote type="cite">In addition, merging the tools will allow the consolidation of<br>target-specific code in OPT. There is code in InstCombine, for<br>example, that specifically deals with x86 intrinsics. This code<br>should be moved into a callback provided by the x86 target.<br>Currently, however, this is not possible because of this<br>separation.<br><br></blockquote><br>Making the data available to the passes is just fine, I don't see a<br>need to merge the two tools.<br></blockquote><br style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; display: inline !important; float: none; ">Fair enough. Do you think that we should move LSR into OPT once that is possible?</span></blockquote></div><br><div>Eric's point is important, that IR canonicalization passes need to be distinct from target lowering passes. If OPT and LLC embody that distinction, then LSR is the loop optimization that is currently in the correct place. Partial unrolling and vectorization should be moved to LLC, along with a slew of other "codegen preparation" hacks that are implemented in OPT for convenience. OPT is super convenient because it allows invoking individual passes and IR serialization.</div><div><br></div><div>Chandler's right that merging tools is not necessary to solve this problem but a good thing to do anyway for conveinence, as long as we maintain the distinction above at the driver level.</div><div><br></div><div>-Andy</div></body></html>