[LLVMdev] Branch-like intrinsic
eslee3 at uiuc.edu
Mon Apr 14 13:53:13 PDT 2008
Is there a way to implement an intrinsic that looks like a conditional
branch so that it has 2 edges to 2 basic blocks?
Taking a step back, I'm trying to make a special branch where Passes
treat it just like a regular conditional branch except that it's
condition is opaque to everyone, so it isn't removed by optimizations.
Additionally, the special branch would codegen (to x86) to something
other than the regular branch instructions.
Otherwise, I would need to implement the intrinsic as something that
returns its opaque value, and I would add a conditional branch that
consumes the value right away.
More information about the llvm-dev