Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow up on #1981 - TDCU copy propagation correctness #2032

Open
siegfriedpammer opened this issue Jun 11, 2020 · 0 comments
Open

Follow up on #1981 - TDCU copy propagation correctness #2032

siegfriedpammer opened this issue Jun 11, 2020 · 0 comments
Labels
C# Decompiler The decompiler engine itself Enhancement Areas for improvement

Comments

@siegfriedpammer
Copy link
Member

Currently aggressive TDCU only works correctly, if no local variable is assigned in the aggregate as well as the body of the ILFunction. See Test9 of the SROA test suite.

There are two options we already have discussed:
original and copy are ILVariables

  1. ensure that original.LoadCount == 1 && original.IsSingeDefinition && stloc copy(ldloc original) dominates all other uses of copy
  2. or neither original nor copy is mutated (after initialization), so all uses see the same reference: original.IsSingleDefinition && copy.IsSingleDefinition && copy.StoreInstructions.Single().MatchLdLoc(original)

Find a way to make sure either condition holds before and after TDCU or find another applicable condition.

@dgrunwald dgrunwald changed the title Follow up on #1981 Follow up on #1981 - TDCU copy propagation correctness Jun 14, 2020
@siegfriedpammer siegfriedpammer added C# Decompiler The decompiler engine itself Enhancement Areas for improvement labels Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C# Decompiler The decompiler engine itself Enhancement Areas for improvement
Projects
None yet
Development

No branches or pull requests

1 participant