[llvm] [WPD]Regard unreachable function as a possible devirtualizable target (PR #115668)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 12 13:19:07 PST 2024


================
@@ -167,6 +167,18 @@ static cl::list<std::string>
                       cl::desc("Prevent function(s) from being devirtualized"),
                       cl::Hidden, cl::CommaSeparated);
 
+/// A function is unreachable if its entry block ends with 'unreachable' IR
----------------
teresajohnson wrote:

Can you note that this is useful for removing abstract class virtual destructors, which are emitted with a trap and unreachable instruction, and add a TODO to identify these more precisely?

https://github.com/llvm/llvm-project/pull/115668


More information about the llvm-commits mailing list