<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;"><br><div><div>On Jun 10, 2014, at 11:52 AM, Eric Christopher <<a href="mailto:echristo@gmail.com">echristo@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="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;">On Tue, Jun 10, 2014 at 11:48 AM, Owen Anderson <<a href="mailto:resistor@mac.com">resistor@mac.com</a>> wrote:<br><blockquote type="cite"><br>On Jun 10, 2014, at 11:37 AM, Hal Finkel <<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a>> wrote:<br><br><br>Yep. Though I have to admit that it'd be nice if we had a range<br>propagation pass that would clean this up rather than special casing.<br>:\<br><br><br>Doesn't LVI do range propagation?<br><br><br><br>Sort of.<br><br>That said, range propagation isn’t a good solution to this problem.<br>SwitchLowering generally happens towards the end of a compilation pipeline,<br>and you don’t want to run any significant set of CFG optimizations after it<br>because they might re-introduce switches.<br><br></blockquote><br>Fair enough. I figured range propagation would just prove dead blocks<br>without doing significant CFG optimizations.<br></div></blockquote></div><br><div>It probably doesn’t do any today, but we don’t have a good way to enforce the invariant that it won’t in the future. More generally, LowerSwitch is firmly a <i>lowering</i> operation, and it’s not unreasonable to assume we won’t be running a lot of optimizations after it. It should try to produce good output without the need for further cleanup.</div><div><br></div><div>—Owen</div></body></html>