* extend OpenMP on gcc
@ 2013-07-07 23:03 Hayder
0 siblings, 0 replies; only message in thread
From: Hayder @ 2013-07-07 23:03 UTC (permalink / raw)
To: gcc-help
I am working on supporting OpenMP on Single-chip Cloud computer (SCC).
Actually, I don't have enough experience to extend or modified the compiler.
So, I have question please and I need your help.
You know the OpenMP on gcc compiler collects all the pointer references of
shared variable and integer and put them in structure (imp_data_t).
My question is:
Could I extend the complier (using plugin as example) to add the offset of
shared variable not the reference pointer?HOW?
For example:
int i;
#pragma omp parallel shared(i)
{
foo(i);
}
|
|
V
bb 2: gimple_omp_parallel
bb 3: GIMPLE_OMP_RETURN
Merging blocks 2 and 6
Merging blocks 2 and 4
OMP_APP (int argc, char * * argv)
{
int i;
int D.5212;
struct .omp_data_s.0 .omp_data_o.1;
int D.5219;
<bb 2>:
i = 4;
.omp_data_o.1.i = i;
======================================convert to===============>
.omp_data_o.1.i=(void*)(&i - base_address); //saving the offset of the
variable
__builtin_GOMP_parallel_start (OMP_APP._omp_fn.0, &.omp_data_o.1, 0);
OMP_APP._omp_fn.0 (&.omp_data_o.1);
__builtin_GOMP_parallel_end ();
i = .omp_data_o.1.i;
D.5212 = 0;
return D.5212;
}
I am looking to hearing you
Thanks in advance
--
View this message in context: http://gcc.1065356.n5.nabble.com/extend-OpenMP-on-gcc-tp951279.html
Sent from the gcc - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-07-05 23:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-07 23:03 extend OpenMP on gcc Hayder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).