× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: stack vs. storage-to-storage
  • From: Blair Wyman <wyman@xxxxxxxxxxxx>
  • Date: Wed, 24 Nov 1999 19:02:37 -0600 (CST)

Excerpts from mi400: 24-Nov-99 Re: stack vs. storage-to-st..
leif@attglobal.net (1174*) 

> I don't think that the MI architecture requires you to store variables 
> you don't use.  

Well, if the variables are observable, I know it does.  This is a
fundamental bugaboo of the MI's storage-to-storage architecture.  We had
to code the MI Transformer (the component that permits Original MI
programs to be retranslated to RISC using the optimizing translator
instead of the old translator) in such a fashion as to honor every MI
store, bar-none. 

> I would confess, that since I don't use x and y 
> either, the whole program could be optimized away.  

...but not if there is a single MI instruction with an observable store
target.  Removing that instruction's side-effects violates the
architecture.  IMO, part of this extreme standpoint is based on the
integrity of the single-level store. 

> Anyway, in the vast majority of RPG type applications 
> there are hardly much gained by optimizing complicated 
> expressions. 

Not to be argumentative, but I do not agree, and would suggest that an
ILE/RPG benchmark be crafted that is executed and timed at a few
optimization levels -- say levels 10, 20 and 40.  Or, we could peel
apart the disassemblies again -- that was illustrative.   

Frankly, I think we'll see considerable speedups at higher optimization
levels.  I believe this because -- although the high-level language
semantic may be straightforward -- the low-level code-gen for RPG is
undoubtedly quite complicated, and surely amenable to some global
analysis and optimization. 

For instance, optimized re-use of partial established addressability
could be a significant factor.  (It's really just a special case of
common subexpression elimination...) 

When referencing fields of a based structure several times, it's
possible for the compiler to store 'most' of the addressability
calculation to the base of the structure in a global temp, and reuse
that partial addressability in subsequent references.  Btw, this is
valid in, and used for, OMI. 

Thanks for the discussion!  This is good stuff, and hopefully not too
far off-topic for the MI400 list... 

-blair 
+---
| This is the MI Programmers Mailing List!
| To submit a new message, send your mail to MI400@midrange.com.
| To subscribe to this list send email to MI400-SUB@midrange.com.
| To unsubscribe from this list send email to MI400-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: dr2@cssas400.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.