This is an archive of the discontinued LLVM Phabricator instance.

Set some fast math attributes in setFunctionAttributes
ClosedPublic

Authored by arsenm on Dec 10 2019, 4:48 AM.

Details

Reviewers
echristo
Summary

This will provide a more consistent view to codegen for these
attributes. The current system is somewhat awkward, and the fields in
TargetOptions are reset based on the command line flag if the
attribute isn't set. By forcing these attributes with the flag, there
can never be an inconsistency in the behavior if code directly
inspects the attribute on the function without considering the command
line flags.

Diff Detail

Event Timeline

arsenm created this revision.Dec 10 2019, 4:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 10 2019, 4:48 AM

It'd be much nicer to get rid of resetTargetOptions here? Can we do that yet?

It'd be much nicer to get rid of resetTargetOptions here? Can we do that yet?

I've thought about putting a bit in the function/MachineFunction for these, partly as an aid to writing IR-free MIR tests. I think that's the next step

This revision is now accepted and ready to land.Jan 15 2020, 4:31 PM