[PATCH] D63161: Devirtualize destructor of final class.

2019-07-09 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added a comment. Recommitted as https://reviews.llvm.org/rL365509 Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63161/new/ https://reviews.llvm.org/D63161 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[PATCH] D63161: Devirtualize destructor of final class.

2019-07-08 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added a comment. This was reverted due to some internal test failure. But it turned out a false alarm. I'll work on recommitting it. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63161/new/ https://reviews.llvm.org/D63161 _

[PATCH] D63161: Devirtualize destructor of final class.

2019-07-04 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a subscriber: rdhindsa. xbolva00 added a comment. You, @rdhindsa, should report here why you reverted this commit. It is really weird to revert random commits without more information. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63161/new/ https:

[PATCH] D63161: Devirtualize destructor of final class.

2019-07-04 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. https://reviews.llvm.org/rL364359 Why this was reverted ? Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63161/new/ https://reviews.llvm.org/D63161 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D63161: Devirtualize destructor of final class.

2019-06-21 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364100: Devirtualize destructor of final class. (authored by yamauchi, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTI

[PATCH] D63161: Devirtualize destructor of final class.

2019-06-21 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi updated this revision to Diff 206053. yamauchi marked 2 inline comments as done. yamauchi added a comment. Comments addressed. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63161/new/ https://reviews.llvm.org/D63161 Files: lib/CodeGen/CGExprCXX.cpp

[PATCH] D63161: Devirtualize destructor of final class.

2019-06-20 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: test/CodeGenCXX/devirtualize-dtor-final.cpp:20 + void evil(D *p) { +// CHECK-NOT: call void@_ZN5Test11DD1Ev +delete p; Missing space after `void` here Repository: rC Clang CHANGES SINCE LAST ACTION https:/

[PATCH] D63161: Devirtualize destructor of final class.

2019-06-20 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Thanks! Minor comment then feel free to commit. Comment at: lib/CodeGen/CGExprCXX.cpp:1877 + DevirtualizedDtor->getParent(); + if (getCXXRecord(Base) ==

[PATCH] D63161: Devirtualize destructor of final class.

2019-06-18 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi updated this revision to Diff 205381. yamauchi added a comment. Updated. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63161/new/ https://reviews.llvm.org/D63161 Files: lib/CodeGen/CGExprCXX.cpp test/CodeGenCXX/devirtualize-dtor-final.cpp Index: t

[PATCH] D63161: Devirtualize destructor of final class.

2019-06-17 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/CGExprCXX.cpp:1887 +Dtor = DevirtualizedDtor; +Ptr = CGF.EmitPointerWithAlignment(Inner); + } else { yamauchi wrote: > rsmith wrote: > > In this case we'll emit the inner expre

[PATCH] D63161: Devirtualize destructor of final class.

2019-06-17 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi marked 2 inline comments as done. yamauchi added inline comments. Comment at: lib/CodeGen/CGExprCXX.cpp:1887 +Dtor = DevirtualizedDtor; +Ptr = CGF.EmitPointerWithAlignment(Inner); + } else { rsmith wrote: > In this case w

[PATCH] D63161: Devirtualize destructor of final class.

2019-06-14 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/CGExprCXX.cpp:1867-1868 - if (Dtor->isVirtual()) { + if (Dtor->isVirtual() && + !(Dtor->hasAttr() || RD->hasAttr())) { CGF.CGM.getCXXABI().emitVirtualObjectDelete(CGF, DE, Ptr, ElementType, --

[PATCH] D63161: Devirtualize destructor of final class.

2019-06-14 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi marked an inline comment as done. yamauchi added inline comments. Comment at: lib/CodeGen/CGExprCXX.cpp:1871 + CGF.CGM.getLangOpts().AppleKext))) + Dtor = DevirtualizedDtor; +else { rsmith wrot

[PATCH] D63161: Devirtualize destructor of final class.

2019-06-14 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi updated this revision to Diff 204852. yamauchi marked an inline comment as done. yamauchi added a comment. Addressed comment. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63161/new/ https://reviews.llvm.org/D63161 Files: lib/CodeGen/CGExprCXX.cpp t

[PATCH] D63161: Devirtualize destructor of final class.

2019-06-13 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/CGExprCXX.cpp:1871 + CGF.CGM.getLangOpts().AppleKext))) + Dtor = DevirtualizedDtor; +else { `Dtor` could be the destructor for a type derived from `

[PATCH] D63161: Devirtualize destructor of final class.

2019-06-12 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi marked 2 inline comments as done. yamauchi added inline comments. Comment at: lib/CodeGen/CGExprCXX.cpp:1867-1868 - if (Dtor->isVirtual()) { + if (Dtor->isVirtual() && + !(Dtor->hasAttr() || RD->hasAttr())) { CGF.CGM.getCXXABI().emitVirtualO

[PATCH] D63161: Devirtualize destructor of final class.

2019-06-12 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi updated this revision to Diff 204365. yamauchi added a comment. Using getDevirtualizedMethod. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63161/new/ https://reviews.llvm.org/D63161 Files: lib/CodeGen/CGExprCXX.cpp test/CodeGenCXX/devirtualize-dtor

[PATCH] D63161: Devirtualize destructor of final class.

2019-06-11 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/CGExprCXX.cpp:1867-1868 - if (Dtor->isVirtual()) { + if (Dtor->isVirtual() && + !(Dtor->hasAttr() || RD->hasAttr())) { CGF.CGM.getCXXABI().emitVirtualObjectDelete(CGF, DE, Ptr, ElementType, --

[PATCH] D63161: Devirtualize destructor of final class.

2019-06-11 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi created this revision. yamauchi added a reviewer: davidxl. Herald added a subscriber: Prazek. Herald added a project: clang. Take advantage of the final keyword to devirtualize destructor calls. Fix https://bugs.llvm.org/show_bug.cgi?id=21368 Repository: rC Clang https://reviews.llv