Hi, On 09/25/2017 10:54 AM, Pierre-Marie de Rodat wrote:
This patch improves the performance of the code generated by the compiler for attribute Image when applied to user-defined enumeration types and the sources are compiled with optimizations enabled.
it looks like this is in essence inlining the run-time library routine. In which case, shouldn't you only do it if inlining is enabled? For example, it seems rather odd to do this if compiling with -Os.
Best wishes, Duncan.
No test required. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-25 Javier Miranda <mira...@adacore.com> * exp_imgv.adb (Is_User_Defined_Enumeration_Type): New subprogram. (Expand_User_Defined_Enumeration_Image): New subprogram. (Expand_Image_Attribute): Enable speed-optimized expansion of user-defined enumeration types when we are compiling with optimizations enabled.