[Fwd: question on optimizing calls to library functions]
Toon Moene
toon@moene.org
Sat Dec 13 20:09:00 GMT 2008
Richard Guenther wrote:
> On Wed, Dec 10, 2008 at 5:55 PM, Daniel Franke <franke.daniel@gmail.com> wrote:
>> These questions are probably quite basic, but this is uncharted land for me.
>> There be dragons, I expect.
>
> ;)
You'd be surprised how simple it is. I did this about 7-8 years ago for
g77. That frontend had a table with various attributes of Fortran
intrinsics. It was very easy to add a column to that table saying "this
function is constant", "this function is pure", or "unknown".
Then, the function that scanned the table for attributes for a certain
intrinsic would set (the equivalent of) TREE_READONLY on the struct that
was handed over to the backend based on the added column.
It really was that simple.
--
Toon Moene - e-mail: toon@moene.org (*NEW*) - phone: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
At home: http://moene.org/~toon/
Progress of GNU Fortran: http://gcc.gnu.org/gcc-4.4/changes.html
More information about the Fortran
mailing list