Skip to content

fix corner case in LLVMBasedCFG::getStartPointsOf #429

Merged
pdschubert merged 2 commits intodevelopmentfrom
f-fixStartPointsDbg
Oct 21, 2021
Merged

fix corner case in LLVMBasedCFG::getStartPointsOf #429
pdschubert merged 2 commits intodevelopmentfrom
f-fixStartPointsDbg

Conversation

@MMory
Copy link
Copy Markdown
Member

@MMory MMory commented Oct 19, 2021

when ignoring debug instructions, return first non-debug instruction of function

…ug instructions, return first non-debug instruction of function
@MMory MMory requested review from pdschubert and vulder October 19, 2021 16:55
Comment on lines +139 to +140
if (IgnoreDbgInstructions && EntryInst->isDebugOrPseudoInst()) {
return {EntryInst->getNextNonDebugInstruction()};
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@pdschubert pdschubert merged commit 224f5f6 into development Oct 21, 2021
@pdschubert pdschubert deleted the f-fixStartPointsDbg branch October 21, 2021 08:03
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.

3 participants