Skip to content

Avoid falling into an infinite cycle due to PHI loop#5

Open
timmyyuan wants to merge 1 commit intoumnsec:mainfrom
timmyyuan:break-deadloop
Open

Avoid falling into an infinite cycle due to PHI loop#5
timmyyuan wants to merge 1 commit intoumnsec:mainfrom
timmyyuan:break-deadloop

Conversation

@timmyyuan
Copy link

This bug can be exposed by mem.bc

@kengiter
Copy link
Contributor

Thanks for the catch. I will need to test it on more large programs before merging it.

@kengiter
Copy link
Contributor

kengiter commented Mar 28, 2023

The current implementation for handling PHINode has to be improved. It basically tries each incoming value and selects the "right" one. That is why it uses NVisited to temporarily hold the visited nodes. If we simply use Visited, the analysis results will be incorrect.

@timmyyuan
Copy link
Author

I see what you're getting at now. This is a backtracking algorithm. Is there an easy fix for it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants