From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: ** X-Spam-Status: No, score=2.6 required=5.0 tests=BAYES_20,INVALID_DATE, MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!ncrlnk!ncrcae!hubcap!billwolf%hazel.cs.clemson.edu From: billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu (William Thomas Wolfe, 2847 ) Newsgroups: comp.lang.ada Subject: Re: preprocessing & optimization Message-ID: <7491@hubcap.clemson.edu> Date: 19 Dec 89 21:29:43 GMT References: <20600027@inmet> Sender: news@hubcap.clemson.edu Reply-To: billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu List-Id: >From stt@inmet.inmet.com: > preprocessors create no optimization problem, > since they operate at the lexical, or possibly syntactic, level, > long before the optimizer takes a look at the program. Are you sure that this is true in the general case? (Not just for current compiler products, but in the general case?) If a preprocessor takes a high-level construct and reduces it to a series of lower-level constructs, then isn't there a certain loss of exploitable semantic content? Perhaps many present optimizers are not engaging in this level of sophistication, but analytically speaking, the most heavy-duty of optimizing compilers would squeeze the final drops from every single bit of semantic knowledge available to it, using semantics to develop sophisticated reasoning leading to proofs that certain optimizations can be safely performed. If something like Anna/TSL were incorporated into Ada, and the preprocessor were to preserve all the semantic information during transformation (inserting annotations to restore the semantics lost during preprocessing), then under those conditions the actions of a preprocessor would probably not incur any penalty. But if this is not the case, then it would seem, at least theoretically, that there would be considerable losses in the potential for optimization. Bill Wolfe, wtwolfe@hubcap.clemson.edu