[llvm-dev] GlobalOPT and non-default ctor priorities

De Azevedo Piovezan, Felipe via llvm-dev llvm-dev at lists.llvm.org
Fri Feb 8 13:38:00 PST 2019


When GlobalOPT iterates over the constructors in @llvm_global_ctors, it gives up if it sees a single ctor that does not have priority 65535 [1]
Naively, it seems that it should attempt to evaluate them in priority order and stop evaluating as soon as the first ctor cannot be evaluated (further ctors could depend on the first ctor that could not be evaluated).
Is there anything that could prevent this idea from working? Why does GlobalOPT dislike anything with priority different from 65535?

[1] lib/Transforms/Utils/findGlobalCtors.cpp::findGlobalCtors

Felipe de Azevedo Piovezan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190208/1efa4ddf/attachment.html>

More information about the llvm-dev mailing list