Skip to content

Commit

Permalink
PTA: ignore fence inst if we do not analyze threads
Browse files Browse the repository at this point in the history
  • Loading branch information
mchalupa committed Dec 13, 2022
1 parent 2132fdc commit 8fe16d3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/llvm/PointerAnalysis/PointerGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ LLVMPointerGraphBuilder::buildInstruction(const llvm::Instruction &Inst) {
seq = &createUnknown(&Inst);
break;
default:
llvm::errs() << Inst << "\n";
llvm::errs() << "[pta] UNHANDLED: " << Inst << "\n";
assert(0 && "Unhandled instruction");
seq = &createUnknown(&Inst);
}
Expand All @@ -432,6 +432,9 @@ bool LLVMPointerGraphBuilder::isRelevantInstruction(
case Instruction::Switch:
case Instruction::Unreachable:
return false;
case Instruction::Fence:
// this one is relevant only if we analyze threads
return _options.threads;
case Instruction::Call:
return isRelevantCall(&Inst, invalidate_nodes, _options);
default:
Expand Down

0 comments on commit 8fe16d3

Please sign in to comment.