[LLVMdev] some thoughts on the semantics of !fpmath

Hal Finkel hfinkel at anl.gov
Tue Apr 17 05:54:54 PDT 2012


On Tue, 17 Apr 2012 08:38:18 -0400
Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:

> > It also has the problem that there's nothing preventing a
> > pass like GVN from merging a !fpmath-decorated operation with an
> > undecorated operation, and nothing requiring it to strip
> > the !fpmath tag when it does so. (This is a general problem
> > with LLVM metadata semantics.)
> 
> Can it? My impression from the last discussion on alias analysis is
> that a pass can drop metadata it doesn't know, but it cannot ignore
> it, so GVN would have to drop the metadata in this case.

I agree; I think that GVN should keep metadata that is the same and
drop metadata that differs. GVN might want to understand how to merge
certain kinds of metadata (line numbers in debug info?), but that is
not really necessary.

In reality, metadata might want to have merging rules and a defined API
so that metadata merging can be used by a number of passes
(vectorization will need this too). For example, merging fp-accuracy
data should choose the more-stringent bound, but not really be removed
all together.

 -Hal

> 
> > Dan
> >
> 
> Cheers,
> Rafael
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev



-- 
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory




More information about the llvm-dev mailing list