avoid remove&reinsert of call when splitting block for inlining
authorAlexandre Oliva <aoliva@redhat.com>
Wed, 10 May 2017 10:16:54 +0000 (10:16 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Wed, 10 May 2017 10:16:54 +0000 (10:16 +0000)
commite1ad2926a08a65efae413d84673e11ba695f2bd4
tree97c8067510e1da022eb7b05fa24ef82a66880abf
parentf00b411f5437114d7ee7107be1d150b7d893dfc7
avoid remove&reinsert of call when splitting block for inlining

We used to split the inlined-into block at (= after) the call, and then
remove the call from the first block to insert it in the second.

The removal may cause unnecessary and unrecoverable resetting of debug
insns: we do not generate debug temps for calls.

Avoid the remove-and-reinsert dance by splitting the block before the
call.

for  gcc/ChangeLog

* tree-inline.c (expand_call_inline): Split block at stmt
before the call.

for  gcc/testsuite/ChangeLog

* gcc.dg/guality/inline-params-2.c: New.

From-SVN: r247830
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/guality/inline-params-2.c [new file with mode: 0644]
gcc/tree-inline.c