[gcc(refs/users/aoliva/heads/testme)] make sin and cos generics inlineable

Alexandre Oliva aoliva@gcc.gnu.org
Tue Oct 6 10:45:41 GMT 2020


https://gcc.gnu.org/g:b62b2062b56eb70e922f153d18cfbfa56b9ff08c

commit b62b2062b56eb70e922f153d18cfbfa56b9ff08c
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Tue Sep 29 12:52:41 2020 -0300

    make sin and cos generics inlineable

Diff:
---
 gcc/ada/libgnat/a-ngcefu.ads | 2 ++
 gcc/ada/libgnat/a-ngelfu.ads | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/gcc/ada/libgnat/a-ngcefu.ads b/gcc/ada/libgnat/a-ngcefu.ads
index 576c84ab267..ca0256ece08 100644
--- a/gcc/ada/libgnat/a-ngcefu.ads
+++ b/gcc/ada/libgnat/a-ngcefu.ads
@@ -33,7 +33,9 @@ package Ada.Numerics.Generic_Complex_Elementary_Functions is
    function "**" (Left : Real'Base; Right : Complex)   return Complex;
 
    function Sin (X : Complex) return Complex;
+   pragma Inline (Sin);
    function Cos (X : Complex) return Complex;
+   pragma Inline (Cos);
    function Tan (X : Complex) return Complex;
    function Cot (X : Complex) return Complex;
 
diff --git a/gcc/ada/libgnat/a-ngelfu.ads b/gcc/ada/libgnat/a-ngelfu.ads
index 1a8e1764d21..957c4946aec 100644
--- a/gcc/ada/libgnat/a-ngelfu.ads
+++ b/gcc/ada/libgnat/a-ngelfu.ads
@@ -94,6 +94,7 @@ is
    function Sin (X : Float_Type'Base) return Float_Type'Base with
      Post => Sin'Result in -1.0 .. 1.0
        and then (if X = 0.0 then Sin'Result = 0.0);
+   pragma Inline (Sin);
 
    function Sin (X, Cycle : Float_Type'Base) return Float_Type'Base with
      Pre  => Cycle > 0.0,
@@ -103,6 +104,7 @@ is
    function Cos (X : Float_Type'Base) return Float_Type'Base with
      Post => Cos'Result in -1.0 .. 1.0
        and then (if X = 0.0 then Cos'Result = 1.0);
+   pragma Inline (Cos);
 
    function Cos (X, Cycle : Float_Type'Base) return Float_Type'Base with
      Pre  => Cycle > 0.0,


More information about the Gcc-cvs mailing list