This is an archive of the discontinued LLVM Phabricator instance.

[FuzzMutate] Correctly insert sinks and sources around invoke instructions
ClosedPublic

Authored by igor-laevsky on Dec 5 2017, 8:26 AM.

Details

Summary

Invoke instructions are terminators which produce results. They can match operand descriptor in which case we are going to insert load or store operation right after invoke . In this change I decided to exclude invokes from findPointer candidates altogether in order to avoid this kind of problems.

Diff Detail

Repository
rL LLVM

Event Timeline

igor-laevsky created this revision.Dec 5 2017, 8:26 AM
bogner added inline comments.Dec 5 2017, 3:24 PM
lib/FuzzMutate/RandomIRBuilder.cpp
156–157 ↗(On Diff #125533)

Would isa<TerminatorInst> or whatever work here? I guess this is the only case, but it seems fine to be more general.

Hi Justin, I updated the diff to bail on all TerminatorInsts. I agree that it's better to be more general here.

bogner accepted this revision.Dec 7 2017, 9:44 AM
This revision is now accepted and ready to land.Dec 7 2017, 9:44 AM
This revision was automatically updated to reflect the committed changes.