<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;">On Aug 1, 2013, at 6:42 PM, Ye, Mei <<a href="mailto:Mei.Ye@amd.com">Mei.Ye@amd.com</a>> wrote:<br><div><br class="Apple-interchange-newline"><blockquote type="cite"><div lang="EN-US" link="blue" vlink="purple" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div class="WordSection1" style="page: WordSection1;"><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">Attached patch re-factor the code out from SimplifyCFG.   Please review.  Thanks a lot.<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"> </span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">-Mei<o:p></o:p></span></div></div><span><odc_refactor></span></div></blockquote></div><br><div>Thanks for making those changes. I’m ok with this patch as-is. A couple questions though:</div><div><br></div><div>I thought that FlattenCFGPass would be a target pass, AMDGPUFlattenCFG. Other targets could add their own equivalent pass but may choose to interleave other target-specific CFG transforms. Do you foresee adding more CFG transforms for AMD? If so, you may want to start with this as a target pass so you can extend it incrementally without being forced to checkin to target-independent code.</div><div><br></div><div>This is just curiosity, but does this patch measurably increase compile time? If so I’m curious if you can plugin a target-specific inlining pass. That could improve your compile time in general.</div><div><br></div><div>-Andy</div></body></html>