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.
Paths
| Differential D155438
[Flang][HLFIR] Intrinsics: Propagate fast math flags ClosedPublic Authored by kiranchandramohan on Jul 17 2023, 4:04 AM.
Details Summary Add a new FirOpBuilder constructor to propagate the fast math flag This fixes the performance issue with the hlfir intrinsics flow
Diff Detail
Event TimelineHerald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJul 17 2023, 4:04 AM
This revision is now accepted and ready to land.Jul 17 2023, 5:36 AM This revision was landed with ongoing or failed builds.Jul 18 2023, 2:27 AM Closed by commit rGfe705c3426b4: [Flang][HLFIR] Intrinsics: Propagate fast math flags (authored by kiranchandramohan). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 541408 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
|
I have opted to create a new constructor for FirOpbuilder inheriting fast attributes from op. Alternative could have been a getBuilder function in this pass that constructs and then sets the fast math flag.