Hi all, This patch implements the target-specific inlining rules. The basic philosophy is that we want to definitely reject inlining if the callee's architecture is not a subset, feature-wise, of the caller's. Beyond that, we want to allow inlining if the callee is always_inline. If it's not, we reject inlining if the TargetSave options don't match up in a way that's described in the comments in the patch. Generally, we try to allow as much inlining as possible for the benefit of LTO. However, if the architectural features of the callee are not a subset of the features of the caller, then we must reject inlining. For example, inlining a function with 'simd' into a function without 'simd' is not allowed. Also, inlining a non-strict-align function into a strict-align function is not allowed. These two restrictions apply even when the callee is tagged with always_inline because they can affect the correctness of the program. Beyond that, we reject inlining only if the user has explicitly specified attributes/options for both the caller and the callee and they don't match up. An exception to that are the tuning CPUs. We want to allow inlining even when the tuning CPUs don't match. Bootstrapped and tested on aarch64. Ok for trunk? Thanks, Kyrill 2015-07-16 Kyrylo Tkachov * config/aarch64/aarch64.c (aarch64_reject_inlining): New function. (aarch64_can_inline_p): Likewise. (TARGET_CAN_INLINE_P): Define.