From: Chris Wilson <cwilson@CS.Stanford.EDU>
Date: Sat, 23 Jul 94 21:43:10 PDT
Subject: Re: Back end
Message-Id: <CMM.0.90.4.775024990.cwilson@Xenon.Stanford.EDU>
> Some questions:
>
>
>
> 1. In the documentation for SUIF, a translator from SUIF
>
> to C, text, and ps are mentioned. Where do these
>
> translators live?
SUIF to C: the ``s2c'' program
SUIF to text: the ``printsuif'' program
SUIF to ps (postscript): the ``spp'' program
There are man pages provided for these programs.
> What's the different between SUIF to
>
> C and SUIF to text? Isn't the "text" a source code
>
> representation of what is abstractly represented in
>
> SUIF?
``SUIF to text'' means a mapping from SUIF objects to text which
corresponds as closely as possible to the SUIF code. While ``s2c''
also maps SUIF to text, the mapping isn't as direct and a lot of
details are lost because the goal is to produce C code with the same
semantics.
Either ``s2c'' or ``printsuif'' can be useful for looking at SUIF
code. It just depends on how much detail you need.
> 2. Implmentation of unimodular transformations.
>
> I read through and played with skweel. If scc is
>
> called with the -parallel flag, then skweel is
>
> automatically called with -P -T -i flags set.
>
> But, what it I just want to run unimodular
>
> transformation? As an example, can you
>
> tell me the exact steps for running the unimodular
>
> transformation (permutation) on pg 4 of the
>
> transform.ps doc? That is, how is the transformation
>
> matrix input? Basicly, I'm looking for a description
>
> of the n-step process for running a unimodular transformation
>
> of an input source code, given a transformation
>
> matrix T.
Unimodular transformations are handled by a library, not a pass.
Passes that need to do unimodular transformations call library
routines. Skweel is just one particular pass that calls the library
to do the unimodular transformations it has chosen. The name of the
library is ``transform'' and it provides an interface to do unimodular
transformations (and other loop transformations).
There isn't a direct interface for a human to specify transformation
matrices. The system is designed to allow compiler passes to decide
where to do loop transformations.
If you have a particular input source code and a particular
transformation matrix T you wanted to apply to a particular loop nest,
here's what you would do:
1. Write a new SUIF pass. This pass would probably be very short,
but you would have to be familiar with the basics of SUIF (see
the SUIF Cookbook that we provide with the other documentation
for examples of simple SUIF passes). Your new pass would have to
find the particular loop nest you are interested in first.
Perhaps that would just mean grabbing the first loop nest it
finds. Then it would call the transform library and pass it your
matrix and a pointer to the SUIF code for that loop nest. The
library would apply the transformation and then your pass could
let the main library write the output SUIF file.
2. Create the input file. If your test program is the Fortran
program ``example.f'' you would type:
scc -.spd example.f
If your test program were the C program ``example.c'' you would
type:
scc -.spd example.c
Either of these would create the SUIF file ``example.spd''. You
could then run ``s2c'' or ``printsuif'' to look at this file, if
you were interested.
3. Run your new SUIF program. You'd probably type something like
newpass example.spd example.sout
This would produce the SUIF file ``example.sout''. Now you're
done. The file ``example.sout'' should now have the SUIF code
for the transformed program. You could use ``s2c'' to see the
new loop nest.
> Thanks,
>
>
>
> Dave
I hope that helps.
--Chris
From: chesney@cps.msu.edu
Date: Sat, 23 Jul 1994 20:49:51 +0500
Subject: Back end
Message-Id: <9407240049.AA16700@pacific>
Some questions:
1. In the documentation for SUIF, a translator from SUIF
to C, text, and ps are mentioned. Where do these
translators live? What's the different between SUIF to
C and SUIF to text? Isn't the "text" a source code
representation of what is abstractly represented in
SUIF?
2. Implmentation of unimodular transformations.
I read through and played with skweel. If scc is
called with the -parallel flag, then skweel is
automatically called with -P -T -i flags set.
But, what it I just want to run unimodular
transformation? As an example, can you
tell me the exact steps for running the unimodular
transformation (permutation) on pg 4 of the
transform.ps doc? That is, how is the transformation
matrix input? Basicly, I'm looking for a description
of the n-step process for running a unimodular transformation
of an input source code, given a transformation
matrix T.
Thanks,
Dave