Ideas for Google Summer of Code

2009-03-29 Thread phil++
Hello All,

I am a PhD student who has been working with CUDA for the GPU and also
gcc for Cell BE for about a year now. (By work I mean developing
applications).  I am looking to bring GCC closer to being able to
support OpenCL as a Google Summer of Code.  Here are some of my ideas:

1. Make an NVIDIA GPU backend
2. Make the OpenCL runtime for the Cell Processor
3. Make the OpenCL runtime for a homogeneous processor

What idea is most valuable to the gcc community?  Are there any other
more valuable ideas?

About me:  I have been reading the gcc mailing list for about 6 months
now, I have submitted my first patch to a simple package that comes
with Ubuntu (glife).  I have been programming in C for about 10 years
and C++ for less.

Phil Pratt-Szeliga


Re: Ideas for Google Summer of Code

2009-03-30 Thread phil++
Hi All,

Thanks for the feedback.  As far as the NVIDIA ISA details, I have the
pdf that describes it.  In the CUDA toolkit, available on NVIDIA's
website there is a pdf named ptx_isa_1.3.pdf under the doc directory.
(Get it from here http://www.nvidia.com/object/cuda_get.html).

So we can do Intel, ATI and NVIDIA GPU backends.  NVIDIA already has
an implementation of OpenCL working.
http://www.nvidia.com/object/cuda_opencl.html.  Would there be any
sharing involved with them??

I am working on my proposal now and I will post it to this list before
final submission (I've got to hurry, they are due April 3rd).  I will
mainly focus on this pdf:
http://www.khronos.org/developers/library/overview/opencl_overview.pdf,
page 13

Phil Pratt-Szeliga


On Mon, Mar 30, 2009 at 12:39 PM, Joe Buck  wrote:
> On Mon, Mar 30, 2009 at 01:09:56AM -0700, Paolo Bonzini wrote:
>> > I am a PhD student who has been working with CUDA for the GPU and also
>> > gcc for Cell BE for about a year now. (By work I mean developing
>> > applications).  I am looking to bring GCC closer to being able to
>> > support OpenCL as a Google Summer of Code.
>>
>> This is very interesting and I'm willing to help with mentoring.
>> However I think your projects are more ahead than what is actually in
>> GCC right now!
>>
>> Regarding the NVIDIA GPU backend, I think NVIDIA is not yet distributing
>> details about the instruction set unlike ATI, is it?  In this case, I
>> think ATI would be a better match.
>
> Intel GPUs as well.  I think that at this stage, there's only sufficient
> documentation available to do a GPU back end for Intel and ATI, not nVidia
> (though I don't know if any progress has been made via reverse
> engineering, perhaps by the nouveau project).  I think anyone who pursues
> this angle would be well-advised to look at more than one architecture.
>


Re: Ideas for Google Summer of Code

2009-03-30 Thread phil++
Start getting up to speed and get to know mentors.  Prepare design.
May 23rd - Begin coding.
June 30th - Target runtime library is done.
July 30th - OpenCL runtime is done.
August 10th - Support Documentation is done.

Benefit to GCC:
This project will bring GCC a step closer to supporting OpenCL for the
CPU and Cell
targets.  The target runtime library will be an intermediate
deliverable that can be
used until the OpenCL C compiler is done.
=

Thanks for all of the support and interest so far everyone!

Sincerely,
Phil Pratt-Szeliga


Adding support for demangling MSVC symbols to libiberty

2006-10-14 Thread Phil Lello
Hi all!

I'm currently investigating adding support for demangling/undecorating MSVC
style symbols to libiberty.

Is anyone else already working on this?

Has this been considered in the past, but rejected for some reason?

Should I have posted this to a different GCC list? :P


Thanks,

Phil Lello


Packing of structure fields and whole structs

2006-12-05 Thread Phil Endecott

Dear GCC Experts,

I am trying to understand the subtleties of __attribute__((packed)).  I 
have some code that works on x86, where unaligned accesses work, but 
fails on ARM where they do not.


As far as I can see, if I declare a struct with the packed attribute 
applied to the whole struct, like this:


struct test {
  int a;
  int b;
} __attribute__((packed));

and then use it like this:

{
  char c;
  struct test t;
}

Then t will be packed next to c, and t.a and t.b will be unaligned.  
This is not what I want!


There are lots of examples in the Linux kernel headers (if you have a 
source tree handy, grep for them).  Here's one example picked at random:


#define FDDI_K_OUI_LEN  3
struct fddi_snap_hdr
{
__u8dsap;   /* always 0xAA */
__u8ssap;   /* always 0xAA */
__u8ctrl;   /* always 0x03 */
__u8oui[FDDI_K_OUI_LEN];/* organizational universal id */
__be16  ethertype;  /* packet type ID field 
*/
} __attribute__ ((packed));

As far as I can see, making this packed can only cause trouble.  If 
packed wasn't there there would still be no gaps between the fields - 
would there? - and variables of this type would be word-aligned, so the 
16-bit field would be 16-bit aligned, and it would work on an ARM.  But 
by declaring it as packed then a variable of this type will be packed 
at any alignment (e.g. char c; struct fddi_snap_hdr x;) and the 16-bit 
field may be unaligned.


Am I completely misunderstanding all of this?

I am using gcc 4.1.2.

Here is the test that I have been using to investigate this:

struct test {
  int a;
  int b;
}__attribute__((packed));
char c = 1;
struct test t = { .a=2, .b=3 };

arm-linux-gnu-gcc -S test.c

.file   "test.c"
.global c
.data
.type   c, %object
.size   c, 1
c:
.byte   1
.global t
.type   t, %object
.size   t, 8
t:
.4byte  2
.4byte  3
.ident  "GCC: (GNU) 4.1.2 20061028 (prerelease) (Debian 4.1.1-19)"


Many thanks in advance for any advice.

Regards,

Phil.

(you're welcome to Cc: any replies as I'm subscribed to the digest.)






Re: We're out of tree codes; now what?

2007-03-23 Thread Phil Edwards
On Wed, Mar 21, 2007 at 10:51:06AM -0700, Mike Stump wrote:
> But seriously, I think we need to press autoconf into generating 100x  
> faster code 90% of the time.  Maybe prebundling answers for the  
> common targets...

Ek, imake!  :-)
 
Every time I've played with precomputing cache answers, I almost immediately
run into problems where the answers need to be customized or recalculated,
even for situations which I would have labelled as "common".  Even preloading
the cache only saves a little bit of time compared to the time for all
the zillions of tiny files bring created, compiled, deleted.


-- 
 what does your robot do, sam?
 it collects data about the surrounding environment, then discards
it and drives into walls


Re: Slightly OT: We should move #gcc off of FreeNode

2005-02-28 Thread Phil Edwards
On Wed, Feb 23, 2005 at 12:56:20PM -0500, Patrick McFarland wrote:
> On Wednesday 23 February 2005 11:03 am, Florian Weimer wrote:
> >
> > I though that #gcc on oftc.net was more active, anyway, or has this
> > changed?
> 
> This was more of a request for the #gcc on freenode to catch up with the rest 
> of the #gcc and finally move to oftc.

Before this month, I spent a fair amount of time on both.

The #gcc on oftc is used by developers for informal realtime discussion
about the compiler internals.  It's very very useful.

The #gcc on freenode is a cesspit of flamewars about "what is the best
programming language kthx" and questions that can all be answered by a
bot repeating "You need to go read the user's manual" every 10 minutes.

One is for internals development, one is for users who don't read.

The second should not be merged with the first.  (If you try, the first
will quietly move elsewhere.)  The second needs to either stay where it is,
or die and not be missed.


-- 
Behind everything some further thing is found, forever; thus the tree behind
the bird, stone beneath soil, the sun behind Urth.  Behind our efforts, let
there be found our efforts.
  - Ascian saying, as related by Loyal to the Group of Seventeen


%dil in x86 inline asm

2005-05-25 Thread Phil Endecott

Dear GCC experts,

I'm having trouble compiling code that uses the following macro from the 
Apache Portable Runtime:


#define apr_atomic_cas(mem,with,cmp) \
({ apr_atomic_t prev; \
asm volatile ("lock; cmpxchgl %1, %2"  \
 : "=a" (prev)   \
 : "r" (with), "m" (*(mem)), "0"(cmp) \
 : "memory"); \
prev;})

It seems that on some machines it tries to use the AMD64 register %dil, 
which does not exist on a regular x86 machine, and gives an assembler error.


I've found bug 10153 and its duplicates which seem to be describing 
essentially the same thing, but say that the input is invalid because it 
uses "r" rather than "q".  I don't know enough about x86 to understand 
this; presumably only certain registers can be used with this 
instruction, or something.


However, naively, I'd argue that it is never right for gcc to use a 
register that doesn't exist on the target architecture.  Can someone 
justify its behaviour?  If the input is illegal surely it should 
generate an error.


Can you suggest how Apache should correct this code?

(I should explain that I have not seen this error first-hand myself. 
I'm the author of a GPL program, Anyterm, and have had this error 
reported by other users.  I'm therefore "debugging at a distance".  The 
platform that causes the problems is Mandrake 10.1.  I'm afraid I don't 
even know what version of gcc it has.)



Thanks for any suggestions.

--Phil.




Re: backslash whitespace newline

2005-10-25 Thread Phil Edwards
On Mon, Oct 24, 2005 at 10:07:33PM -0400, DJ Delorie wrote:
> 
> > Please name such systems.  We can then know to not use them, and can  
> > document in the manual they are broken if we wish.
> 
> IIRC the Windows cut-n-paste cuts a rectangle, not as-printed.

Yes, to this day, even using their latest command shells.  Curse them.


-- 
"It won't be any more frightening than the time
 I climbed up an elevator shaft with my teeth."
- Sunny Baudelaire


Re: diffing directories with merged-as-deleted files?

2005-11-03 Thread Phil Edwards
On Fri, Nov 04, 2005 at 12:58:11AM +0100, Giovanni Bajo wrote:
> Joern RENNECKE <[EMAIL PROTECTED]> wrote:
> 
> > P.S.: When I use a diff-cmd with -N, I not only get a diff for the 44
> > files that are different,
> > but also a header for each of the 752 files that are identical, i.e.
> > two lines for each file like:
> >
> > Index: gcc/tree-ssa-operands.c
> > ===
> >
> > cvs would never do such nonsense.
> 
> Absolutely! It would just print all the directory names in the middle of the
> diffs. I call that nonsense as well.

Somewhere I have a tiny awk script to remove all that garbage, ping me if
I should hunt it up.


-- 
Behind everything some further thing is found, forever; thus the tree behind
the bird, stone beneath soil, the sun behind Urth.  Behind our efforts, let
there be found our efforts.
  - Ascian saying, as related by Loyal to the Group of Seventeen


Re: [C++] Should the complexity of std::list::size() be O(n) or O(1)?

2005-11-25 Thread Phil Edwards
On Wed, Nov 23, 2005 at 07:42:35PM +0800, ?? wrote:
> 
> The C++ standard said Container::size() should have constant complexity
> (ISO/IEC 14882:1998, pp. 461, Table 65), while the std::list::size() in
> current STL of GCC is defined as { std::distance(begin(), end()); }, whose
> complexiy is O(n).
>  
> Is it a bug?

This is a FAQ.

-- 
Behind everything some further thing is found, forever; thus the tree behind
the bird, stone beneath soil, the sun behind Urth.  Behind our efforts, let
there be found our efforts.
  - Ascian saying, as related by Loyal to the Group of Seventeen


Re: [C++] Should the complexity of std::list::size() be O(n) or O(1)?

2005-11-25 Thread Phil Edwards
On Fri, Nov 25, 2005 at 01:17:42PM -0500, Howard Hinnant wrote:
> On Nov 25, 2005, at 9:28 AM, Phil Edwards wrote:
> 
> >On Wed, Nov 23, 2005 at 07:42:35PM +0800, ?? wrote:
> >>
> >>The C++ standard said Container::size() should have constant  
> >>complexity
> >>(ISO/IEC 14882:1998, pp. 461, Table 65), while the std::list::size 
> >>() in
> >>current STL of GCC is defined as { std::distance(begin(), end 
> >>()); }, whose
> >>complexiy is O(n).
> >>
> >>Is it a bug?
> >
> >This is a FAQ.
> 
> I could not find it here:
> 
> http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html


http://gcc.gnu.org/onlinedocs/libstdc++/23_containers/howto.html#6

-- 
You're proposing to build a box with a light on top of it.  The light is
supposed to go off when you carry the box into a room that has a Unicorn
in it.  How do you show that it works?
 - Dr. Gene "spaf" Spafford, at Dr. Wenliang Du's qualifing exam


How to efficiently unpack 8 bytes from a 64-bit integer?

2016-02-18 Thread Phil Ruffwind
Hello all,

I am trying to analyze the optimized results of following code.  The
intent is to unpack a 64-bit integer into a struct containing eight
8-bit integers.  The optimized result was very promising at first, but
I then discovered that whenever the unpacking function gets inlined
into another function, the optimization no longer works.

/* a struct of eight 8-bit integers */
struct alpha {
int8_t a;
int8_t b;
...
int8_t h;
};

struct alpha unpack(uint64_t x)
{
struct alpha r;
memcpy(&r, &x, 8);
return r;
}

struct alpha wrapper(uint64_t y)
{
return unpack(y);
}

The code was compiled with gcc 5.3.0 on Linux 4.4.1 with -O3 on x86-64.

The `unpack` function optimizes fine.  It produces the following
assembly as expected:

mov rax, rdi
ret

Given that `wrapper` is a trivial wrapper around `unpack`, I would
expect the same.  But in reality this is what I got from gcc:

mov eax, edi
xor ecx, ecx
mov esi, edi
shr ax, 8
mov cl, dil
shr esi, 24
mov ch, al
mov rax, rdi
movzx edx, sil
and eax, 16711680
and rcx, -16711681
sal rdx, 24
movabs rsi, -4278190081
or rcx, rax
mov rax, rcx
movabs rcx, -1095216660481
and rax, rsi
or rax, rdx
movabs rdx, 1095216660480
and rdx, rdi
and rax, rcx
movabs rcx, -280375465082881
or rax, rdx
movabs rdx, 280375465082880
and rdx, rdi
and rax, rcx
movabs rcx, -71776119061217281
or rax, rdx
movabs rdx, 71776119061217280
and rdx, rdi
and rax, rcx
shr rdi, 56
or rax, rdx
sal rdi, 56
movabs rdx, 72057594037927935
and rax, rdx
or rax, rdi
ret

This seems quite strange.  Somehow the inlining process seems to have
screwed up the potential optimizations.  Is there a someway to prevent
this from happening short of disabling inlining?  Or perhaps there is
a better way to write this code so that gcc would optimize more
predictably?

I would appreciate any advice, thanks.

Phil


Re: How to efficiently unpack 8 bytes from a 64-bit integer?

2016-02-19 Thread Phil Ruffwind
I tried to look for a workaround for this.  It seemed that using a
union instead of memcpy was enough to convince GCC to optimize into a
single "mov".

struct alpha unpack(uint64_t x)
{
union {
struct alpha r;
uint64_t i;
} u;
u.i = x;
return u.r;
}

But that trick turned out to be short-lived.  If I wrap the wrapper
with another function:

struct alpha wrapperwrapper(uint64_t y)
{
return wrapper(y);
}

I get the same 37-line assembly generated for this function.  What's
even more strange is that if I just define two identical wrappers in
the same translation unit:

struct alpha wrapper(uint64_t y)
{
return unpack(y);
}

struct alpha wrapper2(uint64_t y)
{
return unpack(y);
}

One of them gets optimized perfectly, while the other fails, even
though the bodies of the two functions are completely identical!


Re: How to efficiently unpack 8 bytes from a 64-bit integer?

2016-02-19 Thread Phil Ruffwind
> Can you please open a bugreport?

Done: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69871


Re: GCC GSOC 2016

2016-03-03 Thread Phil Muldoon
On 03/03/16 13:13, Pedro Alves wrote:
> On 03/03/2016 10:32 AM, Manuel López-Ibáñez wrote:
> 
>>
>> [*] Projects I would be willing to mentor:
> 
> 
>> * Revive the gdb compile project
>> (https://sourceware.org/gdb/wiki/GCCCompileAndExecute), which seems dead.
> 
> This one's very much alive, actually.  I've added a few folks who are
> working on it (Keith, Alex, Phil), who could perhaps fill us in on
> status.  It'd be great if more people got engaged in the project,
> of course!

As Pedro notes, the project is very much alive and active. Mea Culpa
on the wiki, we'll do better on that.

Right now we are tackling C++. Not surprisingly, this is much harder
than Plain Old C, so I suspect we've gone quiet (and been quiet)
trying to solve the C++ issues. We'll do better communicating there,
too.

For reference, the branches we work out of are:

On GDB:

users/pmuldoon/c++compile

And on GCC:

aoliva/libcp1

Also, as Pedro notes, there are just three of us working on the GDB
and GCC side; help, hacking and advice would be most welcome and we'd
be happy to help anyone out getting started.

Cheers

Phil


Overloading raw pointers

2014-07-15 Thread Phil Bouchard

Hi,

I am the author of a deterministic memory manager:
https://svn.boost.org/svn/boost/sandbox/block_ptr/

I just have a quick question: is it possible to overload all raw 
pointers with a template "smart pointer"?


If not then I would hope this can be made possible.


Regards,
-Phil



Re: libcc1 still breaks bootstrap (with clang as system compiler)

2014-10-30 Thread Phil Muldoon
On 30/10/14 21:47, Gerald Pfeifer wrote:
> Now the  error is gone on my nightly FreeBSD test systems,
> I am getting the following:
>
> In file included from /scratch2/tmp/gerald/gcc-HEAD/libcc1/plugin.cc:58:
> In file included from /usr/include/c++/v1/string:438:
> In file included from /usr/include/c++/v1/cwchar:107:
> In file included from /usr/include/c++/v1/cwctype:54:
> /usr/include/c++/v1/cctype:51:72: error: use of undeclared identifier
> 'do_not_use_isalnum_with_safe_ctype'
> inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isalnum(int __c) {return 
> isalnum(__c);}
>^
> /scratch2/tmp/gerald/gcc-HEAD/libcc1/../include/safe-ctype.h:126:20:
> note: expanded from macro 'isalnum'
> #define isalnum(c) do_not_use_isalnum_with_safe_ctype
>^

Sorry for the issues.  Jakub has a patch pending that disables libcc1
on bootstrap so that may alleviate the issue.  However if you let me
know your ./configure parameters and any other build parameters I will
attempt to replicate the issue.

Cheers

Phil



Re: [patch, build] Restore bootstrap in building libcc1 on darwin

2014-11-25 Thread Phil Muldoon
On 25/11/14 20:37, Mike Stump wrote:
> On Nov 23, 2014, at 4:06 PM, FX  wrote:
>> One question to build maintainers, and one patch submitted to top-level 
>> configure.ac
>
> So, not sure who wants to review this.  From the darwin perspective, Ok.

I mean from my limited viewpoint it looks fine. As long as the .so is
built, that's really our only goal from a GDB point of view.  But I am
not a maintainer, so I have refrained from commenting on this change,
as it seems fairly straightforward.  Though I am no expert on GCC
build systems.

Cheers

Phil



Re: [patch, build] Restore bootstrap in building libcc1 on darwin

2014-12-05 Thread Phil Muldoon
On 05/12/14 22:40, Jeff Law wrote:
> On 12/05/14 15:34, Dominique Dhumieres wrote:
>>> As I've tried to explain, that is IMHO wrong though.
>>> If what you are after is the -B stuff too, then perhaps:
>>> ...
>>
>> Sorry but it does not work:
> BTW, thanks for working with Jakub on this.  We're going to be getting a 
> Darwin box for Jakub and other folks in the Red Hat team to use when the need 
> arises to dig into these kind of issues.
>
> However, until that box arrives and is setup, this kind of iteration is the 
> only way he can test Darwin stuff.
>
> Jeff
>

Indeed I feel especially bad in these scenarios where patches are
suggested for a patch I submitted and are causing you folks problems.
I really do not want to do that.  So many architectures for GCC, so
very few resources.  Hopefully as Jeff indicates, this will be sorted
soon.  Again from a libcc1 point of view, as long as we have the .so
built on all configurations, that is what matters.  I have not chipped
into these threads as I have nothing to say/recommend about darwin
architectures :( I do read them all, though.

Cheers,

Phil



arm926 branch cost

2009-05-25 Thread Phil Fong

At the end of config/arm/arm926ejs.md, branch costs are modeled with:

>;; Branch instructions are difficult to model accurately.  The ARM
>;; core can predict most branches.  If the branch is predicted
>;; correctly, and predicted early enough, the branch can be completely
>;; eliminated from the instruction stream.  Some branches can
>;; therefore appear to require zero cycles to execute.  We assume that
>;; all branches are predicted correctly, and that the latency is
>;; therefore the minimum value.
>
>(define_insn_reservation "9_branch_op" 0
> (and (eq_attr "tune" "arm926ejs")
>  (eq_attr "type" "branch"))
> "nothing")
In arm.md "*arm_cond_branch" and "*arm_cond_branch_reversed" have attr "type" 
set to "branch".

This seems to disagree with Section 8.3 of the ARM9EJ-S Technical Reference 
Manual (ARM DDI 0222B) which says:
"Any ARM or Thumb branch, and an ARM branch with link operation
takes three cycles"
Presumably, branches that are not taken take 1 cycle like any other 
non-executed conditional instruction.  

In addition, arm926ejs.md does not model the cost of alu instructions like mov, 
etc. with the PC as the destination.  According to the reference manual, these 
are either 3 or 4 cycles.

The section section above from arm926ejs.md also appears in arm1026ejs.md.  The 
arm1026 has branch prediction while the arm926 does not according to their 
respective reference manuals.

Am I mis-understanding what "define_insn_reservation" means?  There
does not appear to be anything the arm_adjust_cost in arm.c which
affects branching costs.

Phil


  


Re: Creating gcc-newbies mailing list

2007-07-27 Thread Phil Edwards
On Fri, Jul 27, 2007 at 02:51:00PM +0100, Manuel López-Ibáñez wrote:
> On 27/07/07, Rask Ingemann Lambertsen <[EMAIL PROTECTED]> wrote:
> >If you ask me, we should rename gcc@ to gcc-development@ and maybe rename
> > gcc-help@ to [EMAIL PROTECTED]
> 
> ... gcc-dev@, keep gcc@ as an alias for gcc-dev@, replace in the
> webpage gcc@ by gcc-dev@ and put gcc-help@ the first in the list.

"-dev" and "-development" could be mistaken for "dev[elopment] using
GCC".  So could "gcc-hackers" and "gcc-advanced", which were the next
two possibilities which popped into my head.

If we go to the trouble of renaming lists, let's really drive the point
home and call it "gcc-internals" or "gcc-maintainters" or the like.


Putting gcc-help as the first address mentioned in lists.html is a
good idea.

Aliasing gcc@ to anything other than gcc-help@ or to an autoresponder which
points people to lists.html will not do much to address the problem, in my
humble/harsh opinion... but then I'm something of an unforgiving hardnose
when it comes to offtopic messages, so perhaps that opinion should be
discounted.  :-)


-- 
 what does your robot do, sam?
 it collects data about the surrounding environment, then discards
it and drives into walls


libiberty: make install doesn't install obstack.h (mingw32)

2007-12-10 Thread Phil Lello

According to http://gcc.gnu.org/onlinedocs/libiberty/Using.html:

> Passing --enable-install-libiberty to the configure script when 
building |libiberty| causes the header files and archive library to be 
installed when make install is run


When I run make install against the current svn libiberty code, 
obstack.h doesn't get installed.


I'm cross-compiling for Win32 (via ./configure --host=i586-mingw32msvc 
--prefix=/usr/i586-mingw32msvc  --enable-install-libiberty), 
specifically because I want the obstack functionality missing on this 
platfrom.


Is the omission of obstack.h a mistake, or by design? If by design, what 
is the reason?


Thanks,

Phil


Re: OpenCL inquire

2009-06-23 Thread Phil Pratt-Szeliga
The following emails have been transfered between Soufiane and I.
Paolo Bonzini asked that I cc the
emails to the list.

=
Hi Soufiane,

I am working on OpenCL for google summer of code.  I just emailled my
mentor asking about what the rules of collaboration are while I am
being paid under gsoc.  (It is a little fuzzy on the website: Q: Can a
group apply for and work on a single proposal? A: No, only an
individual may work on a given project. Of course, students should
feel free to collaborate with others to accomplish their project
goals.)

You can certainly do work on your own and I would love to work with you.
I will let you know what my mentor says.

Sincerely,
Phil
=
Hello Phil,

I am happy to work with you, just tell me which parser do you use?
do you convert your parsed OpenCL grammar to ATI IL or Stream?
can i start from where you are or should i do all the work from scratch!

Soufiane


Hi Soufiane,

My gsoc project is not making an OpenCL C compiler, but instead the
supporting infrastructure.  I have made rough draft functions that
support clCreateContext, clCreateCommandQueue, clCreateMemoryObject,
clCreateProgramWithBinaries, clCreateKernel, clEnqueueNDRangeKernel
and clEnqueueBufferRead.  Without an OpenCL C compiler, I get use
clCreateProgramWithBinaries to load compiled code into the runtime. So
far this works to load dynamic link libraries on the cpu (without
knowing the number of kernel arguments at compile time).  I am making
a structure where there are various drivers for all the different
devices and I am focusing on CPU and Cell.  So if you wanted to make a
device driver to load and execute the ATI binaries, that would be a
big help (as long as it is okay with google).

We use git for this project.  There is barely any documentation right
now as I am developing things still (and things can change a little if
you need info for the driver).  The code is in github:
http://github.com/pcpratts/gcc_opencl/tree/master

The code I was talking about is in cl/devices/cpu/generic/driver.c

To run the code you will need the dependencies in the NOTES file.
Also you will need to put the output of
# lshw -xml > lshw_output.xml

in the root folder of the project.

Phil


Compiling gcc 4.4.0 for Cell

2009-06-28 Thread Phil Pratt-Szeliga
Hello gcc list,

I am trying to compile gcc 4.4.0 for the Cell processor for my google
summer of code project (GCC's OpenCL implementation starting point).

I have used OpenMP for some things and now I am trying to compile
everything on the Cell.  OpenMP is supported in the ppu-gcc 4.1.0 so
I am trying to upgrade my PS3 to gcc 4.4.0.

I did
#ppu-gcc -v
and that got me how gcc was configured for the cell.

So I pasted most of it into the shell:

[r...@ps3 gcc-4.4.0]# ./configure --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-as=/usr/bin/ppu-as --with-ld=/usr/bin/ppu-ld --enable-threads
--with-system-zlib --disable-checking --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-languages=c,c++,fortran,ada
--disable-nls --enable-clocale=gnu
--enable-version-specific-runtime-libs --with-long-double-128
--program-prefix=ppu- --disable-bootstrap --host=ppu
--build=powerpc64-unknown-linux-gnu --target=ppu
checking build system type... powerpc64-unknown-linux-gnu
checking host system type... Invalid configuration `ppu': machine
`ppu' not recognized
configure: error: /bin/sh ./config.sub ppu failed
[r...@ps3 gcc-4.4.0]#

Anyone have any tips to get this compiled?

Thanks.

Sincererly,
Phil Pratt-Szeliga


Region array SSA

2012-03-21 Thread Phil Pratt-Szeliga
Hello,

I am a PhD student studying compilers. I am wondering, is there any
representation of array regions in the gcc/g++ IR? (Like in this
paper: http://dl.acm.org/citation.cfm?id=1152165).

I am having quite a hard time understanding how to build this IR from
the paper. Does anyone on this list have experience with this IR or
any array SSA form? I want to use this in my research, so I would be
interested in paying a small consulting fee if someone was able to
give me real advice/algorithms/help on constructing an array SSA form
like the one in the paper.

Thanks for any help,
Phil Pratt-Szeliga
Syracuse University