[PATCH] CodeGen: Devirtualize member calls on classes that are provably final.
benny.kra at gmail.com
Sun Aug 25 10:38:04 PDT 2013
Hi rjmccall, rsmith,
The idea is as follows:
1. After CodeGenModule::Release is called we know that the AST is complete and we
can compute which classes with internal linkage have no children.
2. Do a recursive AST visitation to find those classes. We do this lazily on the
first attempt to emit a virtual call.
3. Now emit direct calls when the class whose member is called is in this list.
This is common in code bases with many anonymous namespaces and virtual calls,
such as LLVM. PR16984.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 8041 bytes
Desc: not available
More information about the cfe-commits