[Flang][HLFIR] Intrinsics: Propagate fast math flags
authorKiran Chandramohan <kiran.chandramohan@arm.com>
Tue, 18 Jul 2023 09:10:45 +0000 (09:10 +0000)
committerKiran Chandramohan <kiran.chandramohan@arm.com>
Tue, 18 Jul 2023 09:26:59 +0000 (09:26 +0000)
commitfe705c3426b4ea30d210465553862628b07300b1
treeb2a3d36314be5bebcc23cadcf000d06d65d3bd6e
parent41f478f0419781f6968de0661ce570916c9de863
[Flang][HLFIR] Intrinsics: Propagate fast math flags

Add a new FirOpBuilder constructor to propagate the fast math flag
from an operation. Use this constructor in the LowerHLFIRIntrinsics
pass.

This fixes the performance issue with the hlfir intrinsics flow
for polyhedron/test_fpu2.

Reviewed By: tblah, vzakhari

Differential Revision: https://reviews.llvm.org/D155438
flang/include/flang/Optimizer/Builder/FIRBuilder.h
flang/lib/Optimizer/HLFIR/Transforms/LowerHLFIRIntrinsics.cpp
flang/test/HLFIR/matmul-lowering.fir
flang/test/HLFIR/product-lowering.fir
flang/test/HLFIR/sum-lowering.fir