]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Small cleanup and improvement in inlining machinery
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Aug 2019 08:08:11 +0000 (08:08 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Aug 2019 08:08:11 +0000 (08:08 +0000)
commitb212de5b83e02c0a4874c01bb608a5a7ed3701b4
treeac6436df178f213ee10ea420e35687fa567137c8
parent2cd122d86563059827383a474cf5888834283205
[Ada] Small cleanup and improvement in inlining machinery

This is a small cleanup in the inlining machinery of the front-end
dealing with back-end inlining.  It should save a few cycles at -O0 by
stopping it from doing useless work.  No functional changes.

2019-08-13  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

* exp_ch6.adb: Remove with and use clauses for Sem_Ch12.
(Expand_Call_Helper): Swap the back-end inlining case and the
special front-end expansion case.  In back-end inlining mode, do
not invoke Add_Inlined_Body unless the call may be inlined.
* inline.ads (Add_Pending_Instantiation): New function moved
from...
* inline.adb (Add_Inlined_Body): Simplify comment.  Turn test on
the enclosing unit into assertion.
(Add_Pending_Instantiation): New function moved from...
* sem_ch12.ads (Add_Pending_Instantiation): ...here.
* sem_ch12.adb (Add_Pending_Instantiation): ...here.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@274353 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/ChangeLog
gcc/ada/exp_ch6.adb
gcc/ada/inline.adb
gcc/ada/inline.ads
gcc/ada/sem_ch12.adb
gcc/ada/sem_ch12.ads