On Tue, Jul 8, 2008 at 12:00 AM, Chris Lattner <sabre at nondot.org> wrote:> On Mon, 7 Jul 2008, Mahadevan R wrote: >> 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 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.
On Mon, Jul 7, 2008 at 6:41 PM, Mahadevan R <mdevan.foobar at gmail.com> wrote:> On Tue, Jul 8, 2008 at 12:00 AM, Chris Lattner <sabre at nondot.org> wrote: >> On Mon, 7 Jul 2008, Mahadevan R wrote: >>> 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.lssAre 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.roundsThis 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.sigsetjmpThese 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
On Jul 7, 2008, at 8:31 PM, Eli Friedman wrote:>> 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?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