search for: nwinst

Displaying 2 results from an estimated 2 matches for "nwinst".

Did you mean: newinst
2008 Apr 16
2
[LLVMdev] Problems in removing a cloned instruction.
...lls = false, hasDynamicAllocas = false, hasStaticAllocas = false, isTerminal =false; // Loop over all instructions, and copy them over. for (BasicBlock::const_iterator II = BB->begin(), IE = BB->end(); II != IE; ++II) { const Instruction *NwInst = cast<Instruction>((II)); Instruction *NewInst = II->clone(); if(ReturnInst *RI = dyn_cast<ReturnInst>(NewInst)) { cerr << "\n Return Found : " << *RI<< "\n"; Instruction *N...
2008 Apr 16
0
[LLVMdev] Problems in removing a cloned instruction.
...lse, > hasStaticAllocas = false, isTerminal =false; > > // Loop over all instructions, and copy them over. > for (BasicBlock::const_iterator II = BB->begin(), IE = BB->end(); > II != IE; ++II) > { > const Instruction *NwInst = cast<Instruction>((II)); What's this for? You don't seem to use it anywhere? > Instruction *NewInst = II->clone(); Why do you clone the instruction here already? Can't you wait until you know that II is not a ReturnInst? AFAIK you can simply dyn_cast II instea...