diff mbox series

[Ada,FYI] make sin and cos generics inlineable

Message ID orblh7kt97.fsf@livre.home
State New
Headers show
Series [Ada,FYI] make sin and cos generics inlineable | expand

Commit Message

Alexandre Oliva Oct. 12, 2020, 9:51 p.m. UTC
Enable the sincos optimization within callers of these
(single-argument) elementary functions.

Regstrapped on x86_64-linux-gnu, approved by Arno, checking in.

for  gcc/ada/ChangeLog

	* libgnat/a-ngelfu.ads (Sin, Cos): Make the single-argument
	functions inline.
---
 gcc/ada/libgnat/a-ngelfu.ads |    2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/gcc/ada/libgnat/a-ngelfu.ads b/gcc/ada/libgnat/a-ngelfu.ads
index 1a8e176..70f9b7a 100644
--- a/gcc/ada/libgnat/a-ngelfu.ads
+++ b/gcc/ada/libgnat/a-ngelfu.ads
@@ -92,6 +92,7 @@  is
        and then (if Left  = 0.0 then "**"'Result = 0.0);
 
    function Sin (X : Float_Type'Base) return Float_Type'Base with
+     Inline,
      Post => Sin'Result in -1.0 .. 1.0
        and then (if X = 0.0 then Sin'Result = 0.0);
 
@@ -101,6 +102,7 @@  is
        and then (if X = 0.0 then Sin'Result = 0.0);
 
    function Cos (X : Float_Type'Base) return Float_Type'Base with
+     Inline,
      Post => Cos'Result in -1.0 .. 1.0
        and then (if X = 0.0 then Cos'Result = 1.0);