Hi All,<div><br></div><div>This patch adds support for the FP_CONTRACT pragma to clang. It adds a bit to BinaryOperator and CXXOperatorCallExpr to track the FP_CONTRACT pragma state as each AST node is constructed. Pragma state is made to follow scope correctly by having an RAII object save and restore the state when the parser encounters a new compound statement body. The -ffp-contract option is tested during codegen, and fmuladd intrinsics (representing fusing opportunities) are output only if --ffp-contract=on.</div>
<div><br></div><div>This patch does NOT include warnings/errors for specifying FP_CONTRACT in invalid contexts that could be confusing (e.g. introducing FP_CONTRACT at class scope). I think it's reasonable to start by supporting valid use cases, and add restrictions/diagnostics in a follow-up patch.</div>
<div><br></div><div>Comments and feedback most welcome.</div><div><br></div><div>Cheers,</div><div>Lang.</div>