[LLVMdev] contraction of FP operations

Chris Lattner clattner at apple.com
Tue Jun 14 21:06:51 PDT 2011


On Jun 12, 2011, at 1:51 PM, Alasdair Grant wrote:

> Hi,
> 
> clang deals with #pragma STDC FP_CONTRACT and updates the setting of
> FPOptions::fp_contract, but how is this made use of in the back end?
> Is there some way to find out, for any given pair of floating-point
> operations, whether they can be contracted into one (according to
> their local pragma settings), or is this not yet implemented?

Not yet implemented.  Propagating this through the optimizer is a large amount of work.  We do have various global variables in include/llvm/Target/TargetOptions.h that get set for -ffast-math and other global settings, but these are huge hacks.

-Chris



More information about the llvm-dev mailing list