[LLVMdev] leveraging back-end C compiler features in the gcc-based front-end
eli.friedman at gmail.com
Sun May 3 18:40:54 PDT 2009
On Sun, May 3, 2009 at 6:19 PM, Bob Frankel <bios.bob.frankel at gmail.com> wrote:
> i'm looking into using llvm with TI's MSP430
Ah, you're in luck then: an MSP430 backend was checked in to SVN today
:) I don't think it's mature enough for general use yet, though.
> 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.
You could try just generating calls to the builtins in question; if
you're lucky, it'll just work... if not, you can always use sed (or
equivalent) to manipulate the C output into the correct form.
More information about the llvm-dev