mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Rukletsov <ruklet...@gmail.com>
Subject Re: Review Request 66779: Inserted explicit moves in libprocess.
Date Wed, 25 Apr 2018 08:48:41 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/66779/#review201903
-----------------------------------------------------------


Ship it!




Ship It!

- Alexander Rukletsov


On April 24, 2018, 6:58 p.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66779/
> -----------------------------------------------------------
> 
> (Updated April 24, 2018, 6:58 p.m.)
> 
> 
> Review request for mesos and Alexander Rukletsov.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> In this patch we insert explicit moves in places where otherwise the
> value would have been copied. In particular, an argument passed as an
> rvalue will be available as an lvalue in a functions body, and an
> explict cast back to an rvalue is required to avoid creating a copy.
> Similarly, when the type of the return value is different from the
> type of the value being returned a temporary will be constructed to
> convert to the correct type, and might be optimized due to RVO, but
> nothing in (N)RVO would cause the conversion to use RVO; inserting an
> explicit move will allow the compiler to select a potentially more
> efficient way to construct the return value.
> 
> These instances were identified by a new move-related diagnostic added
> recently to clang-7.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/address.hpp 7fb980eb3a6e7faf4c4273f13187d6a6b1baa305

>   3rdparty/libprocess/src/memory_profiler.cpp 5d6e9dc9b6d26c0efd5f2383d5ad36a136861591

> 
> 
> Diff: https://reviews.apache.org/r/66779/diff/1/
> 
> 
> Testing
> -------
> 
> `make check` with `clang-7` and `clang-6`
> 
> 
> Thanks,
> 
> Benjamin Bannier
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message