-
Notifications
You must be signed in to change notification settings - Fork 31
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
Improve dynamic pure loop cutting #619
Conversation
Issue #584 should be fixed in this PR now. I don't know about issue #583. The new loop cutting is semantically equivalent to the old one (it detects the exact same sort of side effects). EDIT: |
I confirm both issues are solved now. I still need to review the code. |
// FIXME: The reasoning about safe/unsafe registers is not correct because | ||
// we do not traverse the control-flow but naively go top-down through the loop. | ||
// We need to use proper dominator reasoning! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have this DominatorTree
class, what else is needed to properly do this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing but time :P. This code was always like this (i.e. not entirely correct).
Added simple DominatorAnalysis with static helper methods. Simplified DynamicPureLoopCutting using new dominator trees.
It now instruments the code without using ExecutionStatus.
into a single new pass: DynamicSpinLoopDetection. - Renamed OptionNames accordingly.
136ca7d
to
20342f9
Compare
The goal of this PR is to improve
DynamicPureLoopCutting
in order to fix issues like #584and maybe let it detect different types of (conditional) side-effects.(Will be done in a different PR).I added a new general-purpose
DominatorTree
class that can compute and represent dominator trees of graphs.This class might be useful for other program (or even wmm?) analyses.
DominatorTree
class.DynamicPureLoopCutting
usingDominatorTree
.DynamicPureLoopCutting
DynamicPureLoopCutting
andSimpleSpinLoopDetection
into a single pass (the pass is namedDynamicSpinLoopDetection
).