I use Linux FC23 which has gcc 5.3. The default LDFLAGS for upcxx come out as :
-O3 --param max-inline-insns-single=35000 --param inline-unit-growth=10000 --param large-function-growth=200000 -Winline -Wno-unused -Wno-unused-parameter -Wno-address
With -O3 I get lots of warnings about the inlining. E.g. (few out of many):
/eng/upc/dev/nenad/upcxx/bld/upcxx/include/upcxx/future/core.hpp: In function ‘int main()’:
/eng/upc/dev/nenad/upcxx/bld/upcxx/include/upcxx/future/core.hpp:526:17: warning: inlining failed in call to ‘static void upcxx::detail::future_header_ops_general::decref_header(upcxx::detail::future_header*) [with T = {}]’: call is unlikely and code size would grow [-Winline]
inline void future_header_ops_general::decref_header(future_header *hdr) {
^
In file included from /eng/upc/dev/nenad/upcxx/bld/upcxx/include/upcxx/future/make_future.hpp:5:0,
from /eng/upc/dev/nenad/upcxx/bld/upcxx/include/upcxx/future/apply.hpp:5,
from /eng/upc/dev/nenad/upcxx/bld/upcxx/include/upcxx/future.hpp:7,
from /eng/upc/dev/nenad/upcxx/bld/upcxx/include/upcxx/backend.hpp:8,
from /eng/upc/dev/nenad/upcxx/bld/upcxx/include/upcxx/allocate.hpp:8,
from /eng/upc/dev/nenad/upcxx/bld/upcxx/include/upcxx/upcxx.hpp:4,
from loc_put.cpp:1:
/eng/upc/dev/nenad/upcxx/bld/upcxx/include/upcxx/future/impl_shref.hpp:132:11: warning: called from here [-Winline]
HeaderOps::template decref_header<T...>(this->hdr_);
^
In file included from /eng/upc/dev/nenad/upcxx/bld/upcxx/include/upcxx/future.hpp:4:0,
from /eng/upc/dev/nenad/upcxx/bld/upcxx/include/upcxx/backend.hpp:8,
from /eng/upc/dev/nenad/upcxx/bld/upcxx/include/upcxx/allocate.hpp:8,
from /eng/upc/dev/nenad/upcxx/bld/upcxx/include/upcxx/upcxx.hpp:4,
from loc_put.cpp:1:
/eng/upc/dev/nenad/upcxx/bld/upcxx/include/upcxx/future/core.hpp:526:17: warning: inlining failed in call to ‘static void upcxx::detail::future_header_ops_general::decref_header(upcxx::detail::future_header*) [with T = {}]’: call is unlikely and code size would grow [-Winline]
inline void future_header_ops_general::decref_header(future_header *hdr) {
Dan and @PHHargrove are looking into a good solution for this for a future release.
For now, the recommended workaround is to add
-Wno-inlineat the end of the C++ command-line in your Makefile to silence the warnings if you encounter this issue.