[flang] Initial support for FastMathAttr setup in FirOpBuilder.
Provide FirOpBuilder::setFastMathFlags() to configure FastMathFlags for the builder. Set FastMathAttr for operations based on FirOpBuilder configuration via mlir::OpBuilder::Listener. This is a little bit hacky solution, because we lose the ability to hook other listeners to FirOpBuilder. There are also potential issues with OpBuilder::clone() - the hook will be invoked for cloned operations and will effectively overwrite FastMathAttr with the ones configured in FirOpBuilder, which should not be happening. We should teach mlir::OpBuilder about FastMathAttr setup in future. Reviewed By: jeanPerier, kiranchandramohan Differential Revision: https://reviews.llvm.org/D137390
Loading
Please sign in to comment