[cfe-dev] GCCBuiltin in Intrinsics*.td
aj14889 at yahoo.com
Fri Mar 1 14:24:55 PST 2013
I am extending LLVM to build a new language and a new target. I'm using builtins in Clang and trying to lower those to LLVM intrinsics. This seems to be an easy approach based on what I've read.
So far, I have added my new builtins to /clang/include/clang/Basic/BuiltinsMyTarget.def and added the corresponding intrinsic to /include/llvm/IntrinsicsMyTarget.td.
Looking at the LLVM codebase, it seems like all of the target-specific builtins are defined as GCCBuiltin (e.g in /include/llvm/IntrinsicsX86.td). The target-independet ones are not however (in /include/llvm/intrinsics.td). What does GCCBuiltin mean here? Does it have something to do with the llvm-gcc frontend? Can I define my clang forntend builtins like I did and still use the GCCBuiltin tag when defining my intrinsics?
More information about the cfe-dev