[comp.lang.c] Induction variable type / vc on Convex

boogaard@ruunsa.fys.ruu.nl (Martin vdBoogaard) (02/22/91)

I use the Convex vectorizing C compiler vc (version 3.0) with -O2
optimization to compile a piece of C code featuring some simple array
manipulations. The array indices are non-negative, so I use an unsigned
int as an array index. To my surprise this inhibits vectorization of
even the simplest array operation. Using int instead of unsigned int
solves the problem.

Is there an optimization expert who can brief me on why unsigned int
indices are a problem to the Convex code optimizer? More in general,
am I wrong in using unsigned int instead of int in the first place?

I've found that some people reading this group get irritated by
OS-specific questions. I'm sorry, I haven't yet found newsgroups
comp.unix.convex or comp.lang.c.vector.


Martin J. van den Boogaard         | Dept. of Atomic & Interface Physics
                                   | Debye Institute--Utrecht University
boogaard@fys.ruu.nl                | P.O. Box 80.000, NL-3508 TA Utrecht
boogaard@hutruu51.bitnet           | the Netherlands, +31 30 532904
------------------------------------------------------------------------
"I feel that if a person can't communicate,
                  the very least he can do is to shut up." -- Tom Lehrer
------------------------------------------------------------------------

mcdonald@aries.scs.uiuc.edu (Doug McDonald) (02/22/91)

In article <1946@ruunsa.fys.ruu.nl> boogaard@ruunsa.fys.ruu.nl (Martin vdBoogaard) writes:
>I use the Convex vectorizing C compiler vc (version 3.0) with -O2



This is a  *****VERY****** machine specific thing!!!


DO NOT POST IT HERE!!!


Post it in comp.sys.convex, if there is such a thing.


Of course, you probably will have a better chance of a answer if you
call Convex on the telephone.

I get very tired of hearing about things that pertain to systems not
of interest to me. I am interested ONLY in IBM PC related matters,
if they are machine specific. So I read the appropriate groups.


Doug McDonald

jrbd@craycos.com (James Davies) (02/23/91)

In article <1991Feb22.172142.16426@ux1.cso.uiuc.edu> mcdonald@aries.scs.uiuc.edu (Doug McDonald) writes:
>
>In article <1946@ruunsa.fys.ruu.nl> boogaard@ruunsa.fys.ruu.nl (Martin vdBoogaard) writes:
>>I use the Convex vectorizing C compiler vc (version 3.0) with -O2
>
>This is a  *****VERY****** machine specific thing!!!
>
>DO NOT POST IT HERE!!!

Personally, I'm getting tired of the continual complaining about inappropriate
posting.  Maybe we need a *daily* VVFAQ posting (very very FAQ) with a few
lines, something like this:

------------ suggested daily posting ---------------
If you aren't a regular reader of comp.lang.c, or you aren't
sure if your question is appropriate, get the FAQ from <whereever>
and read it first.

If your question isn't about the C language, but about a specific
system or compiler, please post to the system-specific newsgroup
(comp.sys.ibm.pc.programmer, comp.sys.convex, etc.)

If you think someone else isn't following these guidelines, please
don't *post* your response to them.  Send them email instead.

Thank you for your cooperation.
-----------------------------------------------------

garry@ceco.ceco.com (Garry Garrett) (02/24/91)

In article <1991Feb22.172142.16426@ux1.cso.uiuc.edu>, mcdonald@aries.scs.uiuc.edu (Doug McDonald) writes:
> 
> In article <1946@ruunsa.fys.ruu.nl> boogaard@ruunsa.fys.ruu.nl (Martin vdBoogaard) writes:
> >I use the Convex vectorizing C compiler vc (version 3.0) with -O2
> 
> This is a  *****VERY****** machine specific thing!!!
> 
> DO NOT POST IT HERE!!!

	I tend to disagree with this kind of attitude.  Many times the poster
is unsure if his or her problem is machine specific, compiler specific, or
a problem with C itself.  It never hurts to inform the audiance what compiler
you are using, and what platform you are using.  I get tired of people posting
machine specific answers for the wrong type of machine.  Not all of us have
the same machine running the same version of the same C compiler.  It would
almost be wastfull to have a zillion different newsgroups like comp.lang.c.ibm.pc
comp.lang.c.sunos, comp.lang.c.hp9000, comp.lang.c.prime.6550 ...  The same
discussions would happen again and again in all of these newsgroups.  I do agree
that when the poster knows that their question is machine specific, then they
should ask it in the appropriate newsgroup, but IMHO, comp.lang.c should be
a place where we can share our ideas all C issues, not just "Standard" C issues.
	Suppose someone has a question like "I have an IBM AT using Microsoft C
version 5.1 and I want to do xyz...".  Someone else can the answer "On my SUN 
running SUNOS 4.0 it's done like this..."  That way perhaps they poster with
the IBM may write his solution in such a way that it uses function calls similar
to the SUN's (even if he or she has to write a few that come with SUNOS), so
that one day, if the posters code is ever ported to a Unix platform it may 
require little or no modification to the source code.  I think that when a
poster has a question about their C compiler, that question BELONGS here.
I realize that there are alot of posters on this board who disagree with that
point of view, but it is only my opinion.

Garry Garrett