Using leaf_function_p in a backend is dangerous as it incorrectly returns false...
authorWilco Dijkstra <wdijkstr@arm.com>
Thu, 15 Dec 2016 17:51:46 +0000 (17:51 +0000)
committerWilco Dijkstra <wilco@gcc.gnu.org>
Thu, 15 Dec 2016 17:51:46 +0000 (17:51 +0000)
commita3038e190b271744d0b5e2e83d389864fed4d54e
tree3efaf35c4f2642a0e1b90f31d9f0f631446ba7f9
parent4d044f0bb743d2c5afcab8e52536975b5ff48cc9
Using leaf_function_p in a backend is dangerous as it incorrectly returns false...

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.

From-SVN: r243720
gcc/ChangeLog
gcc/config/arm/arm.c
gcc/config/arm/arm.h