<div dir="ltr"><div> </div>
<div>Specifically, I need a way to represent indirect branch instruction (in binary) as an equivalent LLVM instruction. With switch instruction , I would have to list all the possible targets and then initialize the corresponding instruction. I was just thinking whether it might be possible to have some kind of indirect branch where label is a "variable" and not an explicit label present in module.</div>

<div> </div>
<div>-Kapil<br></div>
<div class="gmail_quote">On Wed, Jul 23, 2008 at 10:36 PM, Eli Friedman <<a href="mailto:eli.friedman@gmail.com">eli.friedman@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>
<div></div>
<div class="Wj3C7c">On Wed, Jul 23, 2008 at 5:57 PM, kapil anand <<a href="mailto:kapilanand2@gmail.com">kapilanand2@gmail.com</a>> wrote:<br>> Hi,<br>><br>> I was thinking about the ways to represent indirect branch in LLVM. It seems<br>
> that "Switch instruction" is the only way to logically represent indirect<br>> branch inside LLVM.<br>> Is there any other easier way to represent indirect branch in LLVM?<br><br></div></div>Yeah, that's essentially it; the only forms of control flow LLVM<br>
supports are branches/switches, calls, and exceptions.  There's been<br>some discussion that this makes it difficult to represent some<br>constructs, like setjmp/longjmp and the gcc goto from nested function<br>extension, but nobody has really proposed anything yet.<br>
<br>LLVM supports turning functions with the fastcc calling convention<br>into tail calls; that can be useful in some cases. Is there something<br>in particular you're running into issues with?<br><br>-Eli<br>_______________________________________________<br>
LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu/" target="_blank">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div><br></div>