> Do you have a suggestion for how best to enable this optimization for some > languages and disable it for others?Function attribute or metadata to let the optimizer know that all loops in the given function are finite? That should allow mixing IL files from different languages.> Ciao, > > Duncan.Cheers, Rafael
Hi Rafael,>> Do you have a suggestion for how best to enable this optimization for some >> languages and disable it for others? > > Function attribute or metadata to let the optimizer know that all > loops in the given function are finite? That should allow mixing IL > files from different languages.a function attribute would be suboptimal if you inline C++ code into an Ada function or vice versa, though it could be made to be conservatively correct. Ciao, Duncan.
> a function attribute would be suboptimal if you inline C++ code into an > Ada function or vice versa, though it could be made to be conservatively > correct.It would be ok for C being inlined into ADA since ADA is the more restrictive one. If we inline any ADA function with loops into a C++ one we would have to drop the attribute from the caller. To do better we would have to mark the loops. That looks a bit harder to track :-)> Ciao, > > Duncan. >Cheers, Rafael