[all-commits] [llvm/llvm-project] 7c0acc: Lower Fortran intrinsic to a runtime call/llvm int...
kiranchandramohan via All-commits
all-commits at lists.llvm.org
Fri Feb 25 09:42:14 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7c0acc1a989ae2765e0b7e20d6bc005280351956
https://github.com/llvm/llvm-project/commit/7c0acc1a989ae2765e0b7e20d6bc005280351956
Author: Kiran Chandramohan <kiran.chandramohan at arm.com>
Date: 2022-02-25 (Fri, 25 Feb 2022)
Changed paths:
M flang/lib/Lower/IntrinsicCall.cpp
A flang/test/Lower/Intrinsics/abs.f90
A flang/test/Lower/Intrinsics/missing-math-runtime.f90
Log Message:
-----------
Lower Fortran intrinsic to a runtime call/llvm intrinsic
This patch brings in code which can lower a Fortran intrinsic to
a runtime call or an llvm intrinsic. For math intrinsics the
runtime call is to the `math` or `pgmath` library. Non-math
intrinsics are covered by the Flang runtime. A distance computation
mechanism is introduced to find the runtime function that closely
matches the types of the intrinsic call.
In this patch, the `abs` intrinsic is lowered in the following way,
-> Integer version is lowered as a group of MLIR/FIR operations
-> Real version is lowered to llvm intrinsics
-> Complex version is lowered to the `math_hypot` runtime function
This patch is part of upstreaming from the fir-dev branch of https://github.com/flang-compiler/f18-llvm-project
Reviewed By: clementval
Differential Revision: https://reviews.llvm.org/D120403
Co-authored-by: Jean Perier <jperier at nvidia.com>
Co-authored-by: Eric Schweitz <eschweitz at nvidia.com>
Co-authored-by: zacharyselk <zrselk at gmail.com>
Co-authored-by: V Donaldson <vdonaldson at nvidia.com>
Co-authored-by: Valentin Clement <clementval at gmail.com>
More information about the All-commits
mailing list