« Return to Thread: leveraging back-end C compiler features in the gcc-based front-end

leveraging back-end C compiler features in the gcc-based front-end

by Bob Frankel :: Rate this Message:

| View in Thread

i'm looking into using llvm with TI's MSP430, for which a C compiler from TI already exists; the idea here is to use llc -march=c and then pass the generated C code on to the TI compiler.  as it turns out, the TI C compiler supports a number of (processor-specific) intrinsics that expose much of the underlying CPU architecture directly to the C programmer -- registers, pseudo-functions for enabling/disabling interrupts and reading/writing status bits, etc.

is there a way to leverage these (non-gcc) intrinsics in the llvm gcc-based frontend -- perhaps flagging their use in such a way that they effectively "pass through" the optimizer and are emitted "as is" in the generated C code?   in some respects, you can think of this usage as not unlike dropping inline asm code into the C sources.

bob frankel


_______________________________________________
LLVM Developers mailing list
LLVMdev@...         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

 « Return to Thread: leveraging back-end C compiler features in the gcc-based front-end