Generating gimple statements from pragma's

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi ML Readers,

I am looking for help to make a GCC plugin.

The plugin aims to add pragma's to GCC. These pragma's would have the effect of inserting calls to runtime library functions a very specific points in the code.

Here is an example:

If I write:

int a, b;

...

#pragma mypragma opt(a, b)
{
    int c;
    c = b;
    a += c;
    b = a;
}

the resulting gimple should be equivalent to this:

int a, b;

...

runtime_start ();
runtime_require ( a );
runtime_require ( b );
runtime_check ();
{
    int c;
    c = b;
    a += c;
    b = a;
}
runtime_finalize ();

I found in the examples how to add pragma's but I am not sure how can I detect the block next to the pragma, check that all variable in the opt option are accessible in the scope of the block and finally how can I add calls to the runtime functions.

Thanks for helping,
Julien.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux