This revision was automatically updated to reflect the committed changes.
Closed by commit rL305862: Prevent devirtualization of calls to un-instantiated
functions. (authored by ssrivastava).
Changed prior to commit:
https://reviews.llvm.org/D22057?vs=71432&id=103273#toc
Repository:
rL LLVM
rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.
In https://reviews.llvm.org/D22057#543199, @Sunil_Srivastava wrote:
> Now: Why the InstantiationIsPending bit is not precisely tracking the
> presence in the PendingInstantiations list?
[...
Prazek added a comment.
I have read the patch, but I don't have enough knowledge about C++ rules and
fronted to accept it. Richard?
Comment at: lib/Sema/Sema.cpp:684
+ for (auto PII : Pending)
+if (FunctionDecl *Func = dyn_cast(PII.first))
+ Func->setMar
Sunil_Srivastava added a comment.
Ping
https://reviews.llvm.org/D22057
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Sunil_Srivastava added a comment.
A friendly ping.
https://reviews.llvm.org/D22057
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Sunil_Srivastava added a comment.
ping
https://reviews.llvm.org/D22057
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Sunil_Srivastava added a comment.
Ping
https://reviews.llvm.org/D22057
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Sunil_Srivastava updated this revision to Diff 71432.
Sunil_Srivastava added a comment.
This is an update to address points raised by Richard Smith:
1. The bit and the access functions have been renamed from
MarkedForPendingInstantiation to InstantiationIsPending.
2. It closely, though not entir
Prazek added a subscriber: Prazek.
Comment at: lib/Sema/Sema.cpp:684
@@ +683,3 @@
+ for (auto PII : Pending)
+if (FunctionDecl *Func = dyn_cast(PII.first))
+ Func->setMarkedForPendingInstantiation();
Dry. Use auto
https://reviews.llvm.org/
Quuxplusone added inline comments.
Comment at: test/CodeGen/no-devirt.cpp:16
@@ +15,3 @@
+ if (a > 6) return data[a] ; // Should not devirtualize
+ if (a > 4) return data.func1(a); // Should devirtualize
+ return data.func2(a);// Should devirtualize
Sunil_Srivastava added inline comments.
Comment at: test/CodeGen/no-devirt.cpp:16
@@ +15,3 @@
+ if (a > 6) return data[a] ; // Should not devirtualize
+ if (a > 4) return data.func1(a); // Should devirtualize
+ return data.func2(a);// Should devirtualize
---
Quuxplusone added a subscriber: Quuxplusone.
Comment at: test/CodeGen/no-devirt.cpp:16
@@ +15,3 @@
+ if (a > 6) return data[a] ; // Should not devirtualize
+ if (a > 4) return data.func1(a); // Should devirtualize
+ return data.func2(a);// Should devirtualiz
rsmith added inline comments.
Comment at: include/clang/AST/Decl.h:1602
@@ -1601,2 +1601,3 @@
unsigned IsConstexpr : 1;
+ unsigned IsMarkedForPendingInstantiation : 1;
Drop the `MarkedFor` here. This flag *is* the mark from the point of view of a
user of th
Sunil_Srivastava added a comment.
Ping.
https://reviews.llvm.org/D22057
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Sunil_Srivastava created this revision.
Sunil_Srivastava added a reviewer: rsmith.
Sunil_Srivastava added a subscriber: cfe-commits.
This review is for a fix for PR 27895, but it requires some discussion. The
bugzilla and the email exchange with Richard Smith in
http://lists.llvm.org/pipermail/c
15 matches
Mail list logo