search for: setcondition

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

Did you mean: getcondition
2010 Feb 08
1
[LLVMdev] converting an unconditional into a conditional branch
...rning to use the llvm API, but I got a question for which I haven't found a good answer yet: What is the best way to turn an unconditional branch into a conditional branch? All I want to do is add two more operands, a successor and a condition. But no matter how I try to do this any one of setCondition()/setOperand()/setSuccessor() causes an assertion like these: Cannot set condition of unconditional branch! Successor # out of range for Branch! setOperand() out of range! Can this only be done by completely replacing the unconditional branch instruction with a new, conditional one or is there a...
2011 Jan 03
1
[LLVMdev] Erasing dead blocks
Dear LLVM developers, I have a question regarding the IPSCCP class and the handling of dead blocks: The file lib/Transforms/Scalar/SCCP.cpp of llvm 2.8 from contains some code to deal with a dead block which could not be folded (line 1909ff). This happens when a user of this dead block is a branch or switch with an undef condition. The action taken than is to replace this terminator with an