Displaying 2 results from an estimated 2 matches for "checkshadowptr".
2011 Oct 12
2
[LLVMdev] insert ICmpInst/BranchIns in Pass?
...eck
if 2 GlobalVariables are equal or not. If they are not I would like to
call a function. I've tried splitting the current block and then
inserting before the existing instructions, but for some reason this
seems to ruin the iterator(i). What is the correct way todo something
like this?
void checkShadowPtr(Module &M, Function &F, inst_iterator i,
GlobalVariable *shadow, Value *val) {
/* Split old Block */
BasicBlock *bb = i->getParent();
BasicBlock *bb_after = i->getParent()->splitBasicBlock(&*i);
bb->getTerminator()->eraseFromParent();
/* Test */
ICmpInst *t...
2011 Oct 12
0
[LLVMdev] insert ICmpInst/BranchIns in Pass?
...equal or not. If they are not I would like to
> call a function. I've tried splitting the current block and then
> inserting before the existing instructions, but for some reason this
> seems to ruin the iterator(i). What is the correct way todo something
> like this?
>
> void checkShadowPtr(Module &M, Function &F, inst_iterator i,
> GlobalVariable *shadow, Value *val) {
inst_iterator is hiding iterators which aren't going to stay
consistent across this kind of change. I'd suggest explicitly using
Function::iterator and BasicBlock::iterator to keep track of where y...