[LLVMdev] LLVM Assembly code
John Criswell
criswell at cs.uiuc.edu
Wed Jun 22 08:23:21 PDT 2005
Manvi Agarwal wrote:
> Hi,
>
> I have generated llvm assembly file using following commands:
> llvm-ld main.o fir.o
> llvm-dis a.out.bc
>
> I get a.out.ll as the llvm assembly file. When i go through this assembly
> file I come across the following code
> fir.entry: ; preds = %loopexit.1.i
> call void %print( sbyte* getelementptr ([2 x sbyte]* %.str_3, int
> 0, int 0), float* getelementptr ([97 x float]* %y, int 0, int 0), int 97 )
> call void %exit( int 0 )
> unreachable
>
>
> Can anybody please tell me what is meant by "unreachable"? The output is
> coming fine.
The unreachable instruction tells the LLVM compiler that the statement
cannot be reached. It allows LLVM to optimize the program more
aggressively.
In this case, the unreachable instruction was probably inserted by the
LLVM GCC frontend because it knows that the call to exit() will never
return.
-- John T.
>
> Regards,
> manvi
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
--
John T. Criswell
Research Programmer
University of Illinois at Urbana-Champaign
"It's today!" said Piglet. "My favorite day," said Pooh.
More information about the llvm-dev
mailing list