[PATCH] D139907: [FuzzMutate] RandomIRBuilder has more source and sink type now.

Peter Rong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 26 15:59:33 PST 2022


Peter marked 7 inline comments as done.
Peter added inline comments.


================
Comment at: llvm/lib/FuzzMutate/RandomIRBuilder.cpp:42
+/// block
+template <typename DomTree = DominatorTree>
+static std::vector<BasicBlock *> getDominatees(BasicBlock *BB) {
----------------
arsenm wrote:
> You shouldn't need this template stuff, you're operating directly on IR with the IR version of the tree?
Ah yes. The template is there just in case I need `PostDominatorTree`. I can add it back when I need it in the future.


================
Comment at: llvm/lib/FuzzMutate/RandomIRBuilder.cpp:317
+          if (PointerType *PtrTy = dyn_cast<PointerType>(I.getType())) {
+            if (PtrTy->isOpaqueOrPointeeTypeMatches(V->getType())) {
+              return new StoreInst(V, &I, Insts.back());
----------------
arsenm wrote:
> Shouldn't bother handling typed pointers?
I'm sorry I don't fully understand. What do you mean we shouldn't handle typed pointers? Since we have no knowledge what we are mutating on, I think we should consider the possibility that the pointer is typed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139907/new/

https://reviews.llvm.org/D139907



More information about the llvm-commits mailing list