This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Cleanups in inter-unit inlining engine


This removes a component in the record attached to every subprogram considered
for inter-unit inlining, which doesn't serve any useful purpose.

In addition, this fixes a small inconsistency in the code driving inter-unit
inlining from the front-end.  The code was at the same time discarding the
subprograms that cannot be inlined outside their unit, typically nested
subprograms, and taking them into account to build the edges of the callgraph.

This could later fool the algorithm computing the transitive closure of the
calls inlined from the main unit because vertices of the callgraph were not
present in the table of inlined subprograms.

No simple testcase.

Tested on x86_64-pc-linux-gnu, committed on trunk

2015-10-16  Eric Botcazou  <ebotcazou@adacore.com>

	* inline.adb (Subp_Info): Remove Listed component.
	(Add_Inlined_Subprogram): Take an entity instead of an index.
	Do not set Listed component to True.
	(New_Entry): Do not initialize Listed component to False.
	(Analyze_Inlined_Bodies): Do not test Listed component
	(Must_Inline): Add calls not in the main unit only
	if they are in a subprogram that can be inlined outside its unit.
	(Add_Inlined_Body): Move test around and add comment.

Attachment: difs
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]