From db36e78ca183563fe72aee0f26bb3bead6898556 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Mon, 12 Oct 2020 18:55:37 -0300 Subject: [PATCH] make sin and cos generics inlineable Enable the sincos optimization within callers of these (single-argument) elementary functions. 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 --git a/gcc/ada/libgnat/a-ngelfu.ads b/gcc/ada/libgnat/a-ngelfu.ads index 1a8e1764d21..70f9b7a969d 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); -- 2.30.2