fix corner case in LLVMBasedCFG::getStartPointsOf #429
Merged
pdschubert merged 2 commits intodevelopmentfrom Oct 21, 2021
Merged
fix corner case in LLVMBasedCFG::getStartPointsOf #429pdschubert merged 2 commits intodevelopmentfrom
pdschubert merged 2 commits intodevelopmentfrom
Conversation
…ug instructions, return first non-debug instruction of function
vulder
requested changes
Oct 20, 2021
Comment on lines
+139
to
+140
| if (IgnoreDbgInstructions && EntryInst->isDebugOrPseudoInst()) { | ||
| return {EntryInst->getNextNonDebugInstruction()}; |
Collaborator
There was a problem hiding this comment.
Option 1:
Suggested change
| if (IgnoreDbgInstructions && EntryInst->isDebugOrPseudoInst()) { | |
| return {EntryInst->getNextNonDebugInstruction()}; | |
| if (IgnoreDbgInstructions && EntryInst->isDebugOrPseudoInst()) { | |
| return {EntryInst->getNextNonDebugInstruction(true)}; |
Option 2:
Suggested change
| if (IgnoreDbgInstructions && EntryInst->isDebugOrPseudoInst()) { | |
| return {EntryInst->getNextNonDebugInstruction()}; | |
| if (IgnoreDbgInstructions && isa<DbgInfoIntrinsic>(EntryInst)) { | |
| return {EntryInst->getNextNonDebugInstruction()}; |
I guess, to make this look consistent, we should also skip PseudoOperations? Or, as an alternative, only check for isDebug.
I'm not quite sure if it would be ok to skip PseudoInsts. From the little documentation that I could find, PseudoProbeInst are a wrapper class for inspecting calls to intrinsic functions and, as far as I know, phasar can (should be able to) model intrinsics as well (at least the common ones, where we can easily model the effects like memcmp or memcpy).
What's your opinion on this topic?
@pdschubert what do you think?
Member
There was a problem hiding this comment.
Yes, I think we should check and skip debug instructions only. @MMory what's your point on this?
… of getSuccsOf and getPredsOf, fixes in LLVMBasedCFG::getSuccsOf and LLVMBasedCFG::getPredsOf
vulder
approved these changes
Oct 20, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
when ignoring debug instructions, return first non-debug instruction of function