[LLVMdev] some thoughts on the semantics of !fpmath
eli.friedman at gmail.com
Tue Apr 17 13:16:59 CDT 2012
On Tue, Apr 17, 2012 at 9:16 AM, Renato Golin <rengolin at systemcall.org> wrote:
> With FP precision, you might be able to use different instructions or
> ignore specific traps on more relaxed models, and the back-end can
> only know that if you kept the metadata until the end.
> I appreciate the cost of strict metadata semantics to the IR, but I
> think we're at a point that either we use a decent metadata engine or
> none at all.
The point isn't whether it's a good idea to discard FP precision data
(or vectorization data, or debug data), but rather whether IR
transformations are allowed to treat a meta-data annotated instruction
as having the same semantics as an unannotated instruction. If
transformation passes which aren't metadata aware aren't allowed to
reason about an annotated instruction, there's no point to metadata in
the first place: we can just introduce new intrinsics/instructions, or
change the definition of an existing instruction/intrinsic.
More information about the LLVMdev