* [Ada] Build activation chain for BIP only when needed
@ 2021-11-09 9:45 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-11-09 9:45 UTC (permalink / raw)
To: gcc-patches; +Cc: Etienne Servais
[-- Attachment #1: Type: text/plain, Size: 266 bytes --]
In some cases, BIP references tasking while it is not needed. Check if
this is needed before adding this reference.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch6.adb (Expand_Actuals): Add a condition to check for the
possibility of task.
[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 698 bytes --]
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
--- a/gcc/ada/exp_ch6.adb
+++ b/gcc/ada/exp_ch6.adb
@@ -2292,8 +2292,11 @@ package body Exp_Ch6 is
null;
elsif Is_Build_In_Place_Function_Call (Actual) then
- Build_Activation_Chain_Entity (N);
- Build_Master_Entity (Etype (Actual));
+ if Might_Have_Tasks (Etype (Actual)) then
+ Build_Activation_Chain_Entity (N);
+ Build_Master_Entity (Etype (Actual));
+ end if;
+
Make_Build_In_Place_Call_In_Anonymous_Context (Actual);
-- Ada 2005 (AI-318-02): Specialization of the previous case for
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-09 9:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-09 9:45 [Ada] Build activation chain for BIP only when needed Pierre-Marie de Rodat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).