Subject: Re: compiler status in 1.74

From: Zheng Gengbin <[email-masked]>
Date: Tue, 18 Mar 1997 21:54:47 +0800 (EAT)

On Mon, 17 Mar 1997, Guansong Zhang wrote:

> Hi,
> 
> In this leter, I try to summarize the hpfCompiler status in package 1.74. So we
> may have more clear idea on what we should do next. Please make comments on
> related issues.
> 
> The compiler package includes the following parts,
> 
> 1) Shell script.
> 
> 2) Transformation program, coded mainly based on class library provided by the
> frontEnd system.
> 
> 3) To f77 transformation.
> 
> 4) Testsuite.
> 
> Part one:
> 
> The shell scripts are used to help both compiler developer and user to use
> multiple transformation program. At present time, a source program in HPF can
> be easily turned into F90 node program. The configuration when make the package
> helps to generate those scripts, so the executable in the frontEnd package can
> be found without pointing out explicitly.
> 

	On HP , this shell script have some troubles , I have corrected them .
Also your configure.in have same problem.

> I hope further develope the scripts in the system, so the node program
> compiling and linking will also be much more easier. This will need more stable
> install methods of Adlib and its F77 interface.
> 
> I will work with Bryan on Adlib about auto configuration soon. As to the
> Fortran interface, I think it can be put together with the compiler package. So
> it is easier when installing the package.
> 

	I think there are also some difficulties to decide the fortran function
defined in C , whether it should add '__' or not .

> But it also means things like C Fortran objects linkage, F90 F77 compiler
> should taken care of. This also need run time interface be part of the compiler
> package.
> 
> Part two:
> 
> Currently, there are three passes compose transformation program.
> 
> Program format transformation:
> 
> 	trans2: pass to handle array assignment format, things like array
> section, where construct will be changed to forall statement.
> 
> 	trans1: pass to handle data mapping directives. ( I think we need to
> improve this pass a little, so its meaning will be more clear. ) The method to
> deal with default declaration should be improved.
> 
> Node program generation:
> 
> 	trans0: generating node program based on runtime interface. For those
> program patterns can not be handled, warrning should be given.
> 
> It should be noticed that in program format transformation, through different
> passes, the program should be kept the same semantics as the source program.
> While in trans0, the HPF program changed to seperated addressed Fortran node
> program.
> 
> We can further divided trans0 in to the following relative independent parts:
> 
> 1) Dad generation according to mapping directives. Please note, some thing can
> be done in trans1 to make this part easy. But I think If Adlib F77 interface
> provide direct support, things should be done in this part. Such as data
> distribution without template, though old transG did not do so.
> 
> I hope we can talk more about this part. It will be a great help to have a
> clear documentation on Adlib interface.
> 

	Since we already have transG there , I don't think it is easy to
adopt the second method because in that case transg will have some big
change .

> 2) Assignment. This part is not finished yet. I will continue work on this. As
> I wrote before, the next thing I will do is to support ghost area. If you have
> any question, let me know.
> 

	I don't know if trans0 have deal the assignment statement not in
forall . I think we also must transform the separate assign statement .

> 3) Procedure. only inherit is touched. But it seems posed a problem for trans1.
>

	I have changed a little to fix this problem . And I also improve
the trans0 so that it can deal with the case when an array is aligned 
with an array of inherit attributes.
 
	Also there are some bugs in the transprocstmt , I found it cannot
deal with the scalar dummy and cannot differentiate two conditions whether
a array reference is an array element(scalar) or array section .This bug
ia also fixed .

> 4) Independent. not touched
> 
> 5) Control flow construct. Most of them handled. I don't think there is much
> left.
> 
> Part three:
> 
> tof77 is used to do the work. Please note the current unparse is for f90. If
> the frontEnd is used in this program, unparse may need to improved, things like
> a flag to unparse as f77 format may needed. Please be careful, don't make it
> can not work as before.
> 
> Part four:
> 
> Since our package is not streamlined, the work can not be test easily. So pay
> attention to the node program generated each time. see if there is problem
> after a modification.
> 
> Since you will work on trans1 and trans0 part1, I'd like to know you plane
> about it.
> 

	I am not quite sure what is our strategy to create a default data 
mapping . I think my strategy is not well-polished and it is relatively
easy . In fact the default mapping should also consider the context of
the source program . I think this I will considered in optimizing phase.
As to the interface of trans1 , i will discuss this with you later .
	Next I will deal with the align replicate . but I am not sure 
if Adlib have provided such surpport when create dad . Have you any idea
about this ?
	Also pointer and allocate attribute bring trouble to data mapping .
I have worked out some strategy to deal with this .I will try this later .

	Also besides these work , I also will spent some time to work
out the semantics checking part of HPF 2.0 . Hopefully I will give you
a new version tomorrow .
	
	Another question , have you upgrade the unparse to the HPF 2.0 ?

Zheng

---

From: Zheng Gengbin <[email-masked]>
Date: Thu, 20 Mar 1997 13:59:35 +0800 (EAT)

On Tue, 18 Mar 1997, Guansong Zhang wrote:

> 
> On Mar 18,  9:54pm, Zheng Gengbin wrote:
> > Subject: Re: compiler status in 1.74
> >From Prof. Li, I think you are willing to do this part of the work. Besides you
> already changed this part. This part of trans0 do need more change. And I think
> it belongs to the first preority too (along with ghost erea in forall.) Do you
> have time to do this?
>

	Yes , I am keeping improve this part .

> I remember if the lhs of the assignment is a scalar, trans0 can handle it. If
> lhs is a array element, trans0 can not. I hope trans2 can change it to simple
> forall, with lb +1 = ub
>

	Yes , this is an easy way to deal with this problem . I will try it.  
 
> Procedure part need to be improved any way, but I don't have time to check it
> now, please make sure you change is correct.
> 
> I have a suggestion, I think we should concentrate on the first preority for
> the moment. I think it is dad generation and forall ghost erea. If you can work
> on the first part, while I work on the second. Our package will make big
> progress within next month. Do you agree?
> 

	Ok , then I will concentrate my energy on this dad generation .
In fact I am anxious about your progress on forall , because there is really
a big amount of work there .

Zheng