summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-22 11:17:01 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-22 11:17:01 +0000
commitf6284fc9dc25d7c965b5b4447e7b2823803fe5d7 (patch)
treef0c8d4732732c4f922c4c8e15657948940521012
parente7da9b8481922497790d0d0ed861894786c23958 (diff)
downloadppe42-gcc-f6284fc9dc25d7c965b5b4447e7b2823803fe5d7.tar.gz
ppe42-gcc-f6284fc9dc25d7c965b5b4447e7b2823803fe5d7.zip
2014-01-22 Jerome Guitton <guitton@adacore.com>
* mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by arm. 2014-01-22 Robert Dewar <dewar@adacore.com> * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206919 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ada/ChangeLog9
-rw-r--r--gcc/ada/gnat_rm.texi3
-rw-r--r--gcc/ada/gnat_ugn.texi43
-rw-r--r--gcc/ada/mlib-tgt-specific-vxworks.adb4
4 files changed, 57 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 5a23f0a793e..68a641495b3 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,12 @@
+2014-01-22 Jerome Guitton <guitton@adacore.com>
+
+ * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
+ arm.
+
+2014-01-22 Robert Dewar <dewar@adacore.com>
+
+ * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
+
2014-01-22 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/Makefile.in: Minor fixes.
diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi
index 80aa33d6630..adf4ec20a9d 100644
--- a/gcc/ada/gnat_rm.texi
+++ b/gcc/ada/gnat_rm.texi
@@ -5060,6 +5060,9 @@ desired. If the argument @code{No} is present, the task must not be
optimized. GNAT does not attempt to optimize any tasks in this manner
(since protected objects are available in place of passive tasks).
+For more information on the subject of passive tasks, see the section
+``Passive Task Optimization'' in the GNAT Users Guide.
+
@node Pragma Persistent_BSS
@unnumberedsec Pragma Persistent_BSS
@findex Persistent_BSS
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index b8cc039868c..c84b0a9430b 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -10154,6 +10154,7 @@ some guidelines on debugging optimized code.
* Other Optimization Switches::
* Optimization and Strict Aliasing::
* Aliased Variables and Optimization::
+* Passive Task Optimization::
@ifset vms
* Coverage Analysis::
@@ -10999,6 +11000,48 @@ inhibits optimizations that assume the value cannot be assigned.
This means that the above example will in fact "work" reliably,
that is, it will produce the expected results.
+@node Passive Task Optimization
+@subsection Passive Task Optimization
+@cindex Passive Task
+
+A passive task is one which is sufficiently simple that
+in theory a compiler could recognize it an implement it
+efficiently without creating a new thread. The original design
+of Ada 83 had in mind this kind of passive task optimization, but
+only a few Ada 83 compilers attempted it. The problem was that
+it was difficult to determine the exact conditions under which
+the optimization was possible. The result is a very fragile
+optimization where a very minor change in the program can
+suddenly silently make a task non-optimizable.
+
+With the revisiting of this issue in Ada 95, there was general
+agreement that this approach was fundamentally flawed, and the
+notion of protected types was introduced. When using protected
+types, the restrictions are well defined, and you KNOW that the
+operations will be optimized, and furthermore this optimized
+performance is fully portable.
+
+Although it would theoretically be possible for GNAT to attempt to
+do this optimization, but it really doesn't make sense in the
+context of Ada 95, and none of the Ada 95 compilers implement
+this optimization as far as we know. In particular GNAT never
+attempts to perform this optimization.
+
+In any new Ada 95 code that is written, you should always
+use protected types in place of tasks that might be able to
+be optimized in this manner.
+Of course this does not help if you have legacy Ada 83 code
+that depends on this optimization, but it is unusual to encounter
+a case where the performance gains from this optimization
+are significant.
+
+Your program should work correctly without this optimization. If
+you have performance problems, then the most practical
+approach is to figure out exactly where these performance problems
+arise, and update those particular tasks to be protected types. Note
+that typically clients of the tasks who call entries, will not have
+to be modified, only the task definition itself.
+
@ifset vms
@node Coverage Analysis
@subsection Coverage Analysis
diff --git a/gcc/ada/mlib-tgt-specific-vxworks.adb b/gcc/ada/mlib-tgt-specific-vxworks.adb
index 17a9d74a17f..29abd80147f 100644
--- a/gcc/ada/mlib-tgt-specific-vxworks.adb
+++ b/gcc/ada/mlib-tgt-specific-vxworks.adb
@@ -7,7 +7,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 2003-2011, Free Software Foundation, Inc. --
+-- Copyright (C) 2003-2013, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -157,7 +157,7 @@ package body MLib.Tgt.Specific is
return "sparc";
elsif Target_Name (Target_Name'First .. Index) = "sparc64" then
return "sparc64";
- elsif Target_Name (Target_Name'First .. Index) = "xscale" then
+ elsif Target_Name (Target_Name'First .. Index) = "arm" then
return "arm";
elsif Target_Name (Target_Name'First .. Index) = "i586" then
return "pentium";
OpenPOWER on IntegriCloud