Intrinsics and it's documentation.

Hi,

While going through the list of intrinsics in Intrinsics.td, I found
that it does not match the list given in Language Reference [1]. Does
this mean that they are not to be used / don't work? Or is it just
that the documentation is outdated?

Thanks & Regards,
-Mahadevan.

[1] LLVM Language Reference Manual — LLVM 16.0.0git documentation

Which one specifically? It probably means they are missing documentation.

-Chris

Intrinsics only in Intrinsics.td:

llvm.atomic.las
llvm.atomic.lcs
llvm.atomic.lss
llvm.flt.rounds
llvm.longjmp
llvm.setjmp
llvm.siglongjmp
llvm.sigsetjmp

Intrinsics only in Language Reference:

llvm.atomic.cmp.swap
llvm.atomic.load.add
llvm.atomic.load.sub
llvm.atomic.load.nand

Thanks & Regards,
-Mahadevan.

While going through the list of intrinsics in Intrinsics.td, I found
that it does not match the list given in Language Reference [1]. Does
this mean that they are not to be used / don't work? Or is it just
that the documentation is outdated?

Which one specifically? It probably means they are missing documentation.

Intrinsics only in Intrinsics.td:

llvm.atomic.las
llvm.atomic.lcs
llvm.atomic.lss

Are you comparing trunk LangRef.html to trunk Intrinsics.td? (The
trunk version of Intrinsics.td is at is at
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Intrinsics.td?revision=52706&view=markup.)

llvm.flt.rounds

This is used to implement the FLT_ROUNDS macro in float.h; it
definitely should be documented. (That said, at the moment, LLVM
doesn't correctly support messing with rounding modes at the moment;
it doesn't know that floating-point operations depend on the FP
control register.)

llvm.longjmp
llvm.setjmp
llvm.siglongjmp
llvm.sigsetjmp

These are used by the LowerSetJmp pass; however, llvm-gcc doesn't use
that pass, and the code itself hasn't been touched for years. Anyone
know if LowerSetJmp still works/whether there are any known bugs/why
llvm-gcc isn't using this pass?

-Eli

llvm-gcc3 used this pass. It produced code that isn't abi complaint with other compilers and had a few other problems. We should probably rip it out. The CFG needs to be extended to properly model setjmp/longjmp at some point. Right now we depend on variables being marked volatile in the presence of longjmp, which is a pretty horrible (but effective) hack.

-Chris