[Ada] Narrow large arithmetic and comparison operations
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 24 Apr 2020 20:50:50 +0000 (22:50 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 18 Jun 2020 09:08:36 +0000 (05:08 -0400)
commit6c8e4f7e38ec5c8aae7b3d475462bf64e61eea99
treeac26c1a66323d506f0cfcf402bea75ef3b06b7c8
parent4bfab79a72afbe0f6232668fdfa4b56a6aaea2e6
[Ada] Narrow large arithmetic and comparison operations

2020-06-18  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

* exp_ch4.adb (Narrow_Large_Operation): New procedure to try
and narrow large arithmetic and comparison operations.
(Expand_N_In): Call it.
(Expand_N_Op_Abs): Likewise.
(Expand_N_Op_Add): Likewise.
(Expand_N_Op_Divide): Likewise.
(Expand_N_Op_Eq): Likewise.
(Expand_N_Op_Ge): Likewise.
(Expand_N_Op_Gt): Likewise.
(Expand_N_Op_Le): Likewise.
(Expand_N_Op_Lt): Likewise.
(Expand_N_Op_Minus): Likewise.
(Expand_N_Op_Mod): Likewise.
(Expand_N_Op_Multiply): Likewise.
(Expand_N_Op_Ne): Likewise.
(Expand_N_Op_Plus): Likewise.
(Expand_N_Op_Rem): Likewise.
(Expand_N_Op_Subtract): Likewise.
(Expand_N_Type_Conversion): Use Convert_To procedure.
* exp_ch9.adb (Is_Pure_Barrier) <N_Identifier>: Skip all
numeric types.
<N_Type_Conversion>: Use explicit criterion.
gcc/ada/exp_ch4.adb
gcc/ada/exp_ch9.adb