A Comparison of Some Schemes for Translating Logic to C.

Bart Demoen, G Maris · 1994

The general improvement of C compilers, and some new non standard features of gcc have made it more attractive to compile (logic) to C: it is no longer unthinkable that the speed of a native code optimizer can be matched and even beaten by a scheme that compiles to C and lets most of the hard work be done by the C compiler. The new features, especially gcc's treatment of labels as first class types, are a clear invitation to abandon native code generators. Also, the possibility to assign hardware registers to global variables looks attractive at first sight. Three schemes for exploiting a C compiler in the compilation of different languages, are examined and their effectiveness is measured. The conclusion is that it is probably better not to make use of all the features gcc offers. We also show that if C compilers were a bit smarter about compiling the C switch statement, compliance to standard C would become even more attractive. The measurements were done on different risc platforms ...

Read the paper · More papers on PaperTik