[swift-dev] Renaming SILSuccessor -> SILCFGEdge

Andrew Trick atrick at apple.com
Fri Apr 28 00:43:09 CDT 2017

> On Apr 26, 2017, at 1:24 PM, Michael Gottesman via swift-dev <swift-dev at swift.org> wrote:
> Hey everyone.
> 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.
> 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.
> Any objections, disagreements, flames, etc?
> Michael

Please call this SILBasicBlockEdge. CFG isn’t used anywhere in SIL type names.The guiding principle is to minimize the variation names used for the same entity.


More information about the swift-dev mailing list