Fznamznon wrote: > This is fragile: it depends on CanDevirtualizeCall here matching the > corresponding devirtualization code in EmitObjectDelete. I'd rather not have > that implicit coupling.
Thanks for the feedback. I agree. I was thinking that actually stripping the virtual call can be beneficial for optimizations. I also noticed that MSVC does remove the virtual call and replaces it with the loop. The PR title is probably confusing. I should've named it "Fix devirtualization of vector deleting dtor call" instead of "do not attempt". I tried to move common bits to a separate function, so the checking mechanism is the same. If that doesn't make sense (since I do know very little about optimizations), we can call `emitVirtualObjectDelete()` directly. https://github.com/llvm/llvm-project/pull/183741 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
