[flang][NFC] Move and rework pgmath description used in folding
This change prepares usage of lipgmath description in lowering. - Removes the static variable templates that were used to abstract libpgmath description - Move the description to pgmath.h.inc header and rework the macros so that they can both be used to declare pgmath functions and use them. The way they are to be used is left to pgmath.h.inc user that must define PGMATH_USE_XX macros that will be called for all pgmath functions in pgmath.h.inc. - In intrinsic-library.cpp define PGMATH_USE_XX macro callbacks in order to capture function pointers to pgmath functions as well as a description of their type. This will be used for constant folding using pgmath. - Change atan/atan2 handling to use atan2 instead of atan when there are two arguments because it is easier to handle in the runtime description. Also fixes lipgmath linking regression after D78215 cmake changes. This change is motivated by the need to use a similar pgmath description in lowering. The difference is that no function pointers will be taken there, and instead only the function name and type are needed. Reviewed By: schweitz, sscalpone Differential Revision: https://reviews.llvm.org/D83051
Loading
Please sign in to comment