<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jun 8, 2012, at 8:38 AM, Hal Finkel wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; 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-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Author: hfinkel<br>Date: Fri Jun  8 10:38:21 2012<br>New Revision: 158204<br><br>URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=158204&view=rev">http://llvm.org/viewvc/llvm-project?rev=158204&view=rev</a><br>Log:<br>Add the PPCCTRLoops pass: a PPC machine-code-level optimization pass to form CTR-based loop branching code.<br><br>This pass is derived from the Hexagon HardwareLoops pass. The only significant enhancement over the Hexagon<br>pass is that PPCCTRLoops will also attempt to delete the replaced add and compare operations if they are<br>no longer otherwise used. Also, invalid preheader DebugLoc is not used.<br></span></blockquote></div><br><div>Silly question, but how impossible would it be to abstract both of these out to a target-independent hardware loop formation pass, which would be parameterized by a new TargetHardwareLoopInfo class?</div><div><br></div><div>-Chris</div></body></html>