[all-commits] [llvm/llvm-project] eb3056: [flang][NFC] Move and rework pgmath description us...

jeanPerier via All-commits all-commits at lists.llvm.org
Fri Jul 3 01:20:15 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: eb305631bec6bf6765c44dcfbb7ec9e8eca41be4
      https://github.com/llvm/llvm-project/commit/eb305631bec6bf6765c44dcfbb7ec9e8eca41be4
  Author: Jean Perier <jperier at nvidia.com>
  Date:   2020-07-03 (Fri, 03 Jul 2020)

  Changed paths:
    M flang/lib/Evaluate/CMakeLists.txt
    M flang/lib/Evaluate/fold-real.cpp
    M flang/lib/Evaluate/intrinsics-library.cpp
    A flang/runtime/pgmath.h.inc

  Log Message:
  -----------
  [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




More information about the All-commits mailing list