[LLVMdev] how to eliminate dead infinite loops?

Duncan Sands baldrick at free.fr
Mon Nov 29 04:26:59 PST 2010


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.



More information about the llvm-dev mailing list