ChuanqiXu added a comment.

In D115222#3177269 <https://reviews.llvm.org/D115222#3177269>, @rjmccall wrote:

> Like a lot of the switched-resume lowering, this intrinsic is extremely tied 
> to C++ semantics.  If C++ doesn't actually allow the optimization anymore, 
> then I completely agree that we should go ahead and remove the intrinsic.  If 
> it's allowed and we just haven't implemented it yet, then okay, it might be 
> best to remove it, but an unused intrinsic that we're planning to start using 
> soon-ish isn't really doing any harm.

From the feedback from Lewis, this optimization is allowed. Here is the link: 
http://eel.is/c++draft/class.copy.elision#1.3. I would add it to my TOOD list. 
But the priority might not be high since I am working on C++20's module 
recently. So it might be the case that the optimization would start `soon`. So 
I think it might be better to remove it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115222/new/

https://reviews.llvm.org/D115222

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to