search for: postblock

Displaying 1 result from an estimated 1 matches for "postblock".

2017 Mar 04
2
Figuring out return address of a call
...callq *%rax 102: .marker My approach is to find call addresses through a function pass, split the basic block *after* the call instruction, then generate a BlockAddress as follows: if (auto CL = dyn_cast<CallInst>(&*I)) { BasicBlock *callblock = (*CL)->getParent(); BasicBlock *postblock = callblock->splitBasicBlock((*CL)->getNextNode()); BlockAddress *retaddr = BlockAddress::get(postblock); ... } This works well except that the BlockAddress is slightly off. I run into the problem that during code generation, my BlockAddress is moved past the instructions that store...