[LLVMdev] function terminators

Duncan Sands baldrick at free.fr
Wed May 18 06:40:32 PDT 2011


Hi John,

>>>      Does llvm provide a way to determine instructions that cause control to
>>> leave functions? For example, return statements and exit statements cause
>>> control exit out of function.
>> there is no "exit" statement.
>>
>>     I am looking for something similar to basic block
>>> terminators. Thanks.
>> Control can leave a function either (1) due to a return instruction
>> (ReturnInst); or (2) due to a function call (CallInst or InvokeInst).
>> A function call can return normally, unwind an exception or never
>> return (eg: infinite loop or causing the program to exit).
>
> To add to what Duncan said, there is also the unwind instruction (which
> is similar to the ReturnInst).

yes, I forgot about the unwind instruction.

   The exception handling intrinsics may
> also cause control to leave a function,

they don't.

Ciao, Duncan.

  but I haven't looked at them
> and, therefore, do not know for certain.
>
> The Language Reference Manual (http://llvm.org/docs/LangRef.html) may be
> of help.
>
> -- John T.
>
>> Ciao, Duncan.
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list