On Wed, Mar 20, 2019 at 4:16 PM Qing Zhao <qing.z...@oracle.com> wrote: > > Hi, > > there is a bug in the current support for -flive-patching=inline-only-static: > > it rejects inlining of external always_inline routine, therefore triggers a > compilation time error. > > we should always inline “always_inline” routines. > > please review the following simple patch, it has been bootstrapped and > regression tested on aarch64. > > Okay for committing?
To me this seems like can_inline_edge_p was the wrong spot to disable inlining for -flive-patching=inline-only-static and instead it should have been in can_inline_edge_by_limits_p which already has proper allowance for always-inline. So can you move the check there, like after /* gcc.dg/pr43564.c. Apply user-forced inline even at -O0. */ else if (always_inline) ; ? > thanks. > > Qing. > > gcc/ChangeLog: > > 2019-03-20 qing zhao <qing.z...@oracle.com> > > PR tree-optimization/89730 > * ipa-inline.c (can_inline_edge_p): Grant always_inline even when > -flive-patching=inline-only-static. > > gcc/testsuite/ChangeLog: > > 2019-03-20 qing zhao <qing.z...@oracle.com> > > * gcc.dg/live-patching-4.c: New test. >