Skip to content

Is LocalSplitter included by StaticSingleAssignmentFormer? #1122

Answered by wangzun66
Liyw979 asked this question in Q&A
Discussion options

You must be logged in to vote

In fact, LocalSplitter and StaticSingleAssignmentFormer are two different BodyInterceptors. Their relationship is not one of containment. When a CFG has no fork-joins, as shown in LocalSplitter Example_1, their effects are similar, although the renaming way differs slightly. When a CFG contains fork-joins, as shown in LocalSplitter Example_2, their effects are very different. LocalSplitter treats the same local variables that appears in both branches as a single local variable. In contrast, StaticSingleAssignmentFormer treats them as two different local variables and adds an assignment with a phi-expression at their merge point to distinguish them.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Liyw979
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants