This is an archive of the discontinued LLVM Phabricator instance.

Don't update NoTrappingFPMath and FPDenormalMode in resetTargetOptions
ClosedPublic

Authored by ostannard on Jul 18 2019, 9:14 AM.

Details

Summary

We'd like to remove this whole function, because these are properties of
functions, not the target as a whole. These two are easy to remove
because they are only used for emitting ARM build attributes, which
expects them to represent the defaults for the whole module, not just
the last function generated.

This is needed to get correct build attributes when using IPRA on ARM,
because IPRA causes resetTargetOptions to get called before
ARMAsmPrinter::emitAttributes.

Diff Detail

Event Timeline

ostannard created this revision.Jul 18 2019, 9:14 AM
SjoerdMeijer accepted this revision.Jul 19 2019, 1:10 AM

I agree with this:

We'd like to remove this whole function, because these are properties of functions

that's why this looks good to me. Perhaps just a minor advance warning about this:

These two are easy to remove because they are only used for emitting ARM build attributes

because build attributes and downstream math library selection issues was the whole reason to add this.
If we don't set these build attributes, I am almost certain that without there will be downstream fall out because of this, so we might want to set these build attributes somewhere else (and indeed do it the right way).

This revision is now accepted and ready to land.Jul 19 2019, 1:10 AM
This revision was automatically updated to reflect the committed changes.