[LLVMdev] some thoughts on the semantics of !fpmath

Rafael Espíndola rafael.espindola at gmail.com
Tue Apr 17 11:29:36 PDT 2012


> 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.

I am also not sure if it is at all possible to design a metadata
system that allows passes to ignore it. I don't think that is true for
any metadata we have other than debug info (if you don't consider
broken debug info).

IMHO the advantage that is still left in using metadata is that it is
easier to implement gradually, since passes are allowed to drop it.

Without metadata, changing the IL is an atomic operation where every
pass has to be audited for correctness. If we insist that passes must
drop metadata that they don't know about, support can be added one
pass at a time.

> -Eli

Cheers,
Rafael




More information about the llvm-dev mailing list