Displaying 2 results from an estimated 2 matches for "switchbb".
Did you mean:
switchbd
2008 Sep 27
0
[LLVMdev] SwitchInstr::removeCase() doesn't remove PHINodes' predecessors
...yself?
You get to take care of it yourself.
If it is the later what's the best way to handle that? (from
> what I could see I would need to iterate over all the instructions in the
> target BB and fix PHI Nodes if the target block becomes unreachable).
TargetBB->removePredecessor(SwitchBB). Note that you should call this
before you call removeCase!
Nick
2008 Sep 27
2
[LLVMdev] SwitchInstr::removeCase() doesn't remove PHINodes' predecessors
Hi,
I've been writing an optimization pass (described on the ML previously).
Sometimes this pass removes some case entries from switch instructions,
which cause an abort because removeCase() doesn't fix the PHINodes
predecessors when needed.
e.g.:
define i32 @foo() nounwind {
ifthen:
%call = call i32 @bar()
switch i32 %call, label %myphi [
i32 0, label %ifelse
i32 1, label