adding a new pragma in OpenMP

Hi,
  I am trying to add an extension to OpenMP through a new pragma. I was wondering if there is any way I can declare a new pragma and define a set of rules for macro expansion or use PassManager in LLVM to expand the pragma. Thanks in advance.

Regards,
--Hari

Hi Hari,

   I am trying to add an extension to OpenMP through a new pragma. I was
wondering if there is any way I can declare a new pragma and define a
set of rules for macro expansion or use PassManager in LLVM to expand
the pragma. Thanks in advance.

the only LLVM front-ends that support OpenMP are llvm-gcc and dragonegg.
Both of these expand out all OpenMP constructs before generating LLVM IR.
(LLVM IR has no special support for OpenMP). So any new pragma support
needs to be added to one of these front-ends. For both front-ends, the
OpenMP expansion is done by gcc's OpenMP lowering pass. So adding a new
pragma to one of these is exactly the same as adding a new pragma to gcc.

Ciao,

Duncan.