fix and implement ConditionalBranchFolder, Unreachable Code Eliminator#1041
fix and implement ConditionalBranchFolder, Unreachable Code Eliminator#1041sahilagichani14 wants to merge 20 commits intodevelopfrom
Conversation
swissiety
left a comment
There was a problem hiding this comment.
this seems expensive - old Soot did cut the connection to the never reached branch and was calling UnreachableCodeEliminator afterwards, which at least looks simpler/cleaner than the current state (havent checked if the proposed algorithm is faster e.g. due to a possible smaller n?)
sootup.java.core/src/main/java/sootup/java/core/interceptors/ConditionalBranchFolder.java
Outdated
Show resolved
Hide resolved
Old soot has a connection to statements and not blocks, so removing a statement is simpler than removing intermediate blocks. |
can you explain why? I would assume it is instantly "infecting" the complete block (so all its following |
…r-removes-complete-tail-of-the-cfg
…at least one continuous block sequence that has no exception range applied to its last block)
|
fixing the iterator should have fixed: |
…r-removes-complete-tail-of-the-cfg
progress: -2 failing
…r-removes-complete-tail-of-the-cfg # Conflicts: # sootup.java.bytecode.frontend/src/test/java/sootup/java/bytecode/frontend/TryCatchFinallyTests.java # sootup.java.bytecode.frontend/src/test/java/sootup/java/bytecode/frontend/interceptors/ConditionalBranchFolderTest.java
…r-removes-complete-tail-of-the-cfg
…omplete-tail-of-the-cfg
…r-removes-complete-tail-of-the-cfg
|
ping. |
Todo: fix for try-catch blocks