<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Apr 26, 2017, at 6:43 PM, John McCall via swift-dev <<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">On Apr 26, 2017, at 6:11 PM, Michael Gottesman <<a href="mailto:mgottesman@apple.com" class="">mgottesman@apple.com</a>> wrote:<br class=""><blockquote type="cite" class="">On Apr 26, 2017, at 1:44 PM, John McCall <<a href="mailto:rjmccall@apple.com" class="">rjmccall@apple.com</a>> wrote:<br class=""><br class=""><blockquote type="cite" class="">On Apr 26, 2017, at 4:24 PM, Michael Gottesman via swift-dev <<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>> wrote:<br class="">Hey everyone.<br class=""><br class="">I am currently doing some small fixes to SILSuccessor (adding some comments and fixing some issues exposed by LLVM upstream). As I read the code it became pretty apparent that the name is a misnomer... SILSuccessor is not just representing a successor, rather it is representing a whole CFG edge. This can be seen in how SILSuccessor is used to iterate over the predecessors of the block.<br class=""><br class="">With that in mind, I would like to rename SILSuccessor to SILCFGEdge. It will make it much clearer without knowing any context what this data structure is used for.<br class=""><br class="">Any objections, disagreements, flames, etc?<br class=""></blockquote><br class="">It seems a little unnecessary to me. The successor relationship is an edge, and all the edges of the local CFG are successor relationships. I guess it looks a little funny that the edges into a block are represented by "successors", but I think when you think about it it makes sense.<br class=""></blockquote><br class="">IMO this is more of an issue than something "looking funny". Using code named "successor" to look up the "predecessors" of a block is misleading and results in unnecessary cognitive overhead for the reader who has to "think about it" for it to make sense.<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Uh, sure, but this is also not something most people have to deal with a ton, and it's a learn-once-and-remember sort of thing.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" class="">"SILCFGEdge" is also not a very attractive name because of the two abbreviations. If you had a nice alternative to "CFGEdge" that was less biased to the beginning/end (like Successor/Predecessor are), I probably wouldn't object.<br class=""></blockquote><br class="">Ok. Maybe SILControlFlowEdge?<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">A bit elaborate, but it could work. Honestly, this is not a type I have to write out much.</span></div></div></blockquote><br class=""></div><div>How about just SILEdge?</div><div><br class=""></div><div>(Honestly I’d prefer to keep it as SILSuccessor and avoid the churn from this, but if it is important to you, I won’t object to changing it.)</div></body></html>