Using leaf_function_p in a backend is dangerous as it incorrectly returns
commit3eb2dcec8ac53ff1f0020128383ad13de93e84b6
authorwilco <wilco@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 15 Dec 2016 17:51:46 +0000 (15 17:51 +0000)
committerwilco <wilco@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 15 Dec 2016 17:51:46 +0000 (15 17:51 +0000)
tree3efaf35c4f2642a0e1b90f31d9f0f631446ba7f9
parent00fa4edc3d6289252aa27ab45a7b4e641e261e86
Using leaf_function_p in a backend is dangerous as it incorrectly returns
false if it is called while in a sequence (for example during prolog/epilog
generation).  Replace all uses with crtl->is_leaf as this is now initialized
early enough in ira.c.  This typically causes no code generation differences
unless there was a bug due to leaf_function_p returning the wrong value.

    gcc/
        * config/arm/arm.h (TARGET_BACKTRACE): Use crtl->is_leaf.
        * config/arm/arm.c (arm_option_check_internal): Improve comment.
        (thumb_force_lr_save): Use crtl->is_leaf.
        (arm_get_frame_offsets): Remove comment.  Use crtl->is_leaf.
        (thumb_far_jump_used_p): Remove comment.
        (arm_frame_pointer_required): Use crtl->is_leaf.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@243720 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/arm/arm.c
gcc/config/arm/arm.h