Advertisement
kkubak

Untitled

Nov 9th, 2020
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. BasicBlock *B = ((llvm::Instruction*)(gdi.target))->getParent();
  2. auto *load_instr = (*(llvm::Instruction*)(gdi.target)).clone();
  3. /* Insert copied load instruction before actual load instruction */
  4. B->getInstList().insert(gdi.source_use->getIterator(), load_instr);
  5. load_instr->setName(load_to_copy->getName());
  6. args.push_back(load_instr);
  7. insertPt = load_instr->getNextNode();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement